Skip to content

Commit

Permalink
fix: intercom router response
Browse files Browse the repository at this point in the history
  • Loading branch information
mihir-4116 committed Feb 1, 2024
1 parent 8ca8822 commit ec6f602
Show file tree
Hide file tree
Showing 4 changed files with 434 additions and 12 deletions.
6 changes: 4 additions & 2 deletions src/cdk/v2/destinations/intercom/rtWorkflow.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
bindings:
- name: handleRtTfSingleEventError
path: ../../../../v0/util/index
- name: isDefinedAndNotNull
path: ../../../../v0/util

steps:
- name: validateInput
Expand All @@ -14,8 +16,8 @@ steps:

- name: successfulEvents
template: |
$.outputs.transform#idx.output.({
"batchedRequest": .,
$.outputs.transform#idx{$.isDefinedAndNotNull(.output)}.({
"batchedRequest": .output,
"batched": false,
"destination": ^[idx].destination,
"metadata": ^[idx].metadata[],
Expand Down
6 changes: 3 additions & 3 deletions test/integrations/destinations/intercom/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ const deleteNwData = [
{
httpReq: {
method: 'post',
url: 'https://api.intercom.io/contacts/search',
url: 'https://api.eu.intercom.io/contacts/search',
data: {
query: {
operator: 'AND',
Expand Down Expand Up @@ -309,7 +309,7 @@ const deleteNwData = [
{
httpReq: {
method: 'post',
url: 'https://api.intercom.io/companies',
url: 'https://api.eu.intercom.io/companies',
data: {
company_id: 'rudderlabs',
name: 'RudderStack',
Expand Down Expand Up @@ -344,7 +344,7 @@ const deleteNwData = [
{
httpReq: {
method: 'post',
url: 'https://api.intercom.io/companies',
url: 'https://api.eu.intercom.io/companies',
data: {
company_id: 'rudderlabs',
name: 'RudderStack',
Expand Down
4 changes: 2 additions & 2 deletions test/integrations/destinations/intercom/processor/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ export const data = [
Config: {
apiKey: 'testApiKey',
apiVersion: 'latest',
apiServer: 'standard',
apiServer: 'eu',
sendAnonymousId: false,
},
},
Expand All @@ -990,7 +990,7 @@ export const data = [
FORM: {},
JSON_ARRAY: {},
},
endpoint: 'https://api.intercom.io/contacts/70701240741e45d040/companies',
endpoint: 'https://api.eu.intercom.io/contacts/70701240741e45d040/companies',
headers: {
Accept: 'application/json',
Authorization: 'Bearer testApiKey',
Expand Down
Loading

0 comments on commit ec6f602

Please sign in to comment.