@segment/action-destinations 3.43.0 → 3.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/dist/destinations/close/createUpdateContactAndLead/generated-types.d.ts +12 -0
  2. package/dist/destinations/close/createUpdateContactAndLead/generated-types.js +3 -0
  3. package/dist/destinations/close/createUpdateContactAndLead/generated-types.js.map +1 -0
  4. package/dist/destinations/close/createUpdateContactAndLead/index.d.ts +5 -0
  5. package/dist/destinations/close/createUpdateContactAndLead/index.js +89 -0
  6. package/dist/destinations/close/createUpdateContactAndLead/index.js.map +1 -0
  7. package/dist/destinations/close/generated-types.d.ts +4 -0
  8. package/dist/destinations/close/generated-types.js +3 -0
  9. package/dist/destinations/close/generated-types.js.map +1 -0
  10. package/dist/destinations/close/index.d.ts +4 -0
  11. package/dist/destinations/close/index.js +49 -0
  12. package/dist/destinations/close/index.js.map +1 -0
  13. package/dist/destinations/cordial/addContactToList/generated-types.d.ts +6 -0
  14. package/dist/destinations/cordial/addContactToList/generated-types.js +3 -0
  15. package/dist/destinations/cordial/addContactToList/generated-types.js.map +1 -0
  16. package/dist/destinations/cordial/addContactToList/index.d.ts +5 -0
  17. package/dist/destinations/cordial/addContactToList/index.js +45 -0
  18. package/dist/destinations/cordial/addContactToList/index.js.map +1 -0
  19. package/dist/destinations/cordial/common-fields.d.ts +2 -0
  20. package/dist/destinations/cordial/common-fields.js +21 -0
  21. package/dist/destinations/cordial/common-fields.js.map +1 -0
  22. package/dist/destinations/cordial/cordial-client.d.ts +36 -0
  23. package/dist/destinations/cordial/cordial-client.js +121 -0
  24. package/dist/destinations/cordial/cordial-client.js.map +1 -0
  25. package/dist/destinations/cordial/createContactactivity/generated-types.d.ts +9 -0
  26. package/dist/destinations/cordial/createContactactivity/generated-types.js +3 -0
  27. package/dist/destinations/cordial/createContactactivity/generated-types.js.map +1 -0
  28. package/dist/destinations/cordial/createContactactivity/index.d.ts +5 -0
  29. package/dist/destinations/cordial/createContactactivity/index.js +46 -0
  30. package/dist/destinations/cordial/createContactactivity/index.js.map +1 -0
  31. package/dist/destinations/cordial/generated-types.d.ts +4 -0
  32. package/dist/destinations/cordial/generated-types.js +3 -0
  33. package/dist/destinations/cordial/generated-types.js.map +1 -0
  34. package/dist/destinations/cordial/index.d.ts +4 -0
  35. package/dist/destinations/cordial/index.js +53 -0
  36. package/dist/destinations/cordial/index.js.map +1 -0
  37. package/dist/destinations/cordial/removeContactFromList/generated-types.d.ts +6 -0
  38. package/dist/destinations/cordial/removeContactFromList/generated-types.js +3 -0
  39. package/dist/destinations/cordial/removeContactFromList/generated-types.js.map +1 -0
  40. package/dist/destinations/cordial/removeContactFromList/index.d.ts +5 -0
  41. package/dist/destinations/cordial/removeContactFromList/index.js +47 -0
  42. package/dist/destinations/cordial/removeContactFromList/index.js.map +1 -0
  43. package/dist/destinations/cordial/upsertContact/generated-types.d.ts +7 -0
  44. package/dist/destinations/cordial/upsertContact/generated-types.js +3 -0
  45. package/dist/destinations/cordial/upsertContact/generated-types.js.map +1 -0
  46. package/dist/destinations/cordial/upsertContact/index.d.ts +5 -0
  47. package/dist/destinations/cordial/upsertContact/index.js +33 -0
  48. package/dist/destinations/cordial/upsertContact/index.js.map +1 -0
  49. package/dist/destinations/cordial/user-identifier.d.ts +5 -0
  50. package/dist/destinations/cordial/user-identifier.js +11 -0
  51. package/dist/destinations/cordial/user-identifier.js.map +1 -0
  52. package/dist/destinations/customerio/utils.js +1 -1
  53. package/dist/destinations/customerio/utils.js.map +1 -1
  54. package/dist/destinations/friendbuy/cloudUtil.d.ts +4 -4
  55. package/dist/destinations/friendbuy/cloudUtil.js +31 -15
  56. package/dist/destinations/friendbuy/cloudUtil.js.map +1 -1
  57. package/dist/destinations/friendbuy/index.js +2 -2
  58. package/dist/destinations/friendbuy/index.js.map +1 -1
  59. package/dist/destinations/friendbuy/trackCustomEvent/generated-types.d.ts +1 -0
  60. package/dist/destinations/friendbuy/trackCustomEvent/index.js +8 -5
  61. package/dist/destinations/friendbuy/trackCustomEvent/index.js.map +1 -1
  62. package/dist/destinations/friendbuy/trackCustomer/index.js +4 -3
  63. package/dist/destinations/friendbuy/trackCustomer/index.js.map +1 -1
  64. package/dist/destinations/friendbuy/trackPurchase/generated-types.d.ts +2 -0
  65. package/dist/destinations/friendbuy/trackPurchase/index.js +29 -29
  66. package/dist/destinations/friendbuy/trackPurchase/index.js.map +1 -1
  67. package/dist/destinations/friendbuy/trackSignUp/generated-types.d.ts +3 -0
  68. package/dist/destinations/friendbuy/trackSignUp/index.js +7 -3
  69. package/dist/destinations/friendbuy/trackSignUp/index.js.map +1 -1
  70. package/dist/destinations/gainsight-px-cloud-action/common-fields.d.ts +2 -0
  71. package/dist/destinations/gainsight-px-cloud-action/common-fields.js +277 -0
  72. package/dist/destinations/gainsight-px-cloud-action/common-fields.js.map +1 -0
  73. package/dist/destinations/gainsight-px-cloud-action/generated-types.d.ts +4 -0
  74. package/dist/destinations/gainsight-px-cloud-action/generated-types.js +3 -0
  75. package/dist/destinations/gainsight-px-cloud-action/generated-types.js.map +1 -0
  76. package/dist/destinations/gainsight-px-cloud-action/groupIdentify/generated-types.d.ts +60 -0
  77. package/dist/destinations/gainsight-px-cloud-action/groupIdentify/generated-types.js +3 -0
  78. package/dist/destinations/gainsight-px-cloud-action/groupIdentify/generated-types.js.map +1 -0
  79. package/dist/destinations/gainsight-px-cloud-action/groupIdentify/index.d.ts +5 -0
  80. package/dist/destinations/gainsight-px-cloud-action/groupIdentify/index.js +38 -0
  81. package/dist/destinations/gainsight-px-cloud-action/groupIdentify/index.js.map +1 -0
  82. package/dist/destinations/gainsight-px-cloud-action/identifyUser/generated-types.d.ts +59 -0
  83. package/dist/destinations/gainsight-px-cloud-action/identifyUser/generated-types.js +3 -0
  84. package/dist/destinations/gainsight-px-cloud-action/identifyUser/generated-types.js.map +1 -0
  85. package/dist/destinations/gainsight-px-cloud-action/identifyUser/index.d.ts +5 -0
  86. package/dist/destinations/gainsight-px-cloud-action/identifyUser/index.js +29 -0
  87. package/dist/destinations/gainsight-px-cloud-action/identifyUser/index.js.map +1 -0
  88. package/dist/destinations/gainsight-px-cloud-action/index.d.ts +4 -0
  89. package/dist/destinations/gainsight-px-cloud-action/index.js +100 -0
  90. package/dist/destinations/gainsight-px-cloud-action/index.js.map +1 -0
  91. package/dist/destinations/gainsight-px-cloud-action/regional-endpoints.d.ts +12 -0
  92. package/dist/destinations/gainsight-px-cloud-action/regional-endpoints.js +19 -0
  93. package/dist/destinations/gainsight-px-cloud-action/regional-endpoints.js.map +1 -0
  94. package/dist/destinations/gainsight-px-cloud-action/trackEvent/generated-types.d.ts +60 -0
  95. package/dist/destinations/gainsight-px-cloud-action/trackEvent/generated-types.js +3 -0
  96. package/dist/destinations/gainsight-px-cloud-action/trackEvent/generated-types.js.map +1 -0
  97. package/dist/destinations/gainsight-px-cloud-action/trackEvent/index.d.ts +5 -0
  98. package/dist/destinations/gainsight-px-cloud-action/trackEvent/index.js +37 -0
  99. package/dist/destinations/gainsight-px-cloud-action/trackEvent/index.js.map +1 -0
  100. package/dist/destinations/gainsight-px-cloud-action/trackPageView/generated-types.d.ts +63 -0
  101. package/dist/destinations/gainsight-px-cloud-action/trackPageView/generated-types.js +3 -0
  102. package/dist/destinations/gainsight-px-cloud-action/trackPageView/generated-types.js.map +1 -0
  103. package/dist/destinations/gainsight-px-cloud-action/trackPageView/index.d.ts +5 -0
  104. package/dist/destinations/gainsight-px-cloud-action/trackPageView/index.js +60 -0
  105. package/dist/destinations/gainsight-px-cloud-action/trackPageView/index.js.map +1 -0
  106. package/dist/destinations/index.js +3 -0
  107. package/dist/destinations/index.js.map +1 -1
  108. package/dist/destinations/salesforce/index.js +1 -1
  109. package/dist/destinations/salesforce/index.js.map +1 -1
  110. package/package.json +4 -5
@@ -0,0 +1,12 @@
1
+ export interface Payload {
2
+ lead_name?: string;
3
+ contact_name?: string;
4
+ contact_email?: string;
5
+ contact_phone?: string;
6
+ contact_url?: string;
7
+ contact_title?: string;
8
+ contact_external_id?: string;
9
+ contact_custom_fields?: {
10
+ [k: string]: unknown;
11
+ };
12
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/close/createUpdateContactAndLead/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import type { ActionDefinition } from '@segment/actions-core';
2
+ import type { Settings } from '../generated-types';
3
+ import type { Payload } from './generated-types';
4
+ declare const action: ActionDefinition<Settings, Payload>;
5
+ export default action;
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const action = {
4
+ title: 'Create or Update Contact and Lead',
5
+ description: '',
6
+ defaultSubscription: 'type = "identify"',
7
+ fields: {
8
+ lead_name: {
9
+ label: 'Lead Name',
10
+ description: '',
11
+ type: 'string',
12
+ required: false,
13
+ default: {
14
+ '@path': '$.traits.company.name'
15
+ }
16
+ },
17
+ contact_name: {
18
+ label: 'Contact Name',
19
+ description: '',
20
+ type: 'string',
21
+ required: false,
22
+ default: {
23
+ '@path': '$.traits.name'
24
+ }
25
+ },
26
+ contact_email: {
27
+ label: 'Contact Email',
28
+ description: '',
29
+ type: 'string',
30
+ required: false,
31
+ default: {
32
+ '@path': '$.traits.email'
33
+ }
34
+ },
35
+ contact_phone: {
36
+ label: 'Contact Phone',
37
+ description: '',
38
+ type: 'string',
39
+ required: false,
40
+ default: {
41
+ '@path': '$.traits.phone'
42
+ }
43
+ },
44
+ contact_url: {
45
+ label: 'Contact URL',
46
+ description: '',
47
+ type: 'string',
48
+ required: false,
49
+ default: {
50
+ '@path': '$.traits.website'
51
+ }
52
+ },
53
+ contact_title: {
54
+ label: 'Contact Title',
55
+ description: '',
56
+ type: 'string',
57
+ required: false,
58
+ default: {
59
+ '@path': '$.traits.title'
60
+ }
61
+ },
62
+ contact_external_id: {
63
+ label: 'Contact User ID',
64
+ description: 'Your ID that identifies the Contact. Contact Custom Field ID for User ID must be defined in the global integration settings.',
65
+ type: 'string',
66
+ required: false,
67
+ default: {
68
+ '@path': '$.userId'
69
+ }
70
+ },
71
+ contact_custom_fields: {
72
+ label: 'Contact Custom Fields',
73
+ description: 'Custom Fields to set on the Contact. Key should be Custom Field ID (`cf_xxxx`).',
74
+ type: 'object',
75
+ required: false
76
+ }
77
+ },
78
+ perform: (request, data) => {
79
+ const settings = {
80
+ contact_custom_field_id_for_user_id: data.settings.contact_custom_field_id_for_user_id
81
+ };
82
+ return request('https://services.close.com/webhooks/segment/actions/create-update-contact-and-lead/', {
83
+ method: 'post',
84
+ json: { action_payload: data.payload, settings }
85
+ });
86
+ }
87
+ };
88
+ exports.default = action;
89
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/close/createUpdateContactAndLead/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,mCAAmC;IAC1C,WAAW,EAAE,EAAE;IACf,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,SAAS,EAAE;YACT,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,EAAE;YACf,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE;gBACP,OAAO,EAAE,uBAAuB;aACjC;SACF;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,cAAc;YACrB,WAAW,EAAE,EAAE;YACf,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE;gBACP,OAAO,EAAE,eAAe;aACzB;SACF;QACD,aAAa,EAAE;YACb,KAAK,EAAE,eAAe;YACtB,WAAW,EAAE,EAAE;YACf,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,O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ings {
2
+ api_key: string;
3
+ contact_custom_field_id_for_user_id?: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/close/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { DestinationDefinition } from '@segment/actions-core';
2
+ import type { Settings } from './generated-types';
3
+ declare const destination: DestinationDefinition<Settings>;
4
+ export default destination;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const createUpdateContactAndLead_1 = __importDefault(require("./createUpdateContactAndLead"));
7
+ const destination = {
8
+ name: 'Close',
9
+ slug: 'close',
10
+ mode: 'cloud',
11
+ authentication: {
12
+ scheme: 'basic',
13
+ fields: {
14
+ api_key: {
15
+ label: 'API key',
16
+ description: 'Your Close API key.',
17
+ type: 'string',
18
+ required: true
19
+ },
20
+ contact_custom_field_id_for_user_id: {
21
+ label: 'Contact Custom Field ID for User ID',
22
+ description: "Enter the ID of a Contact Custom Field that'll be " +
23
+ "used to store User ID. You'll need to create this Contact " +
24
+ 'Custom Field in Close first, and then the integration will use ' +
25
+ 'this field to store the User ID when creating new contacts, ' +
26
+ 'and/or will be used as a lookup key when updating existing ' +
27
+ 'Contacts. If this field is not filled out, it will only ' +
28
+ 'lookup and de-dupe based on email.',
29
+ type: 'string',
30
+ default: '',
31
+ required: false
32
+ }
33
+ },
34
+ testAuthentication: (request) => {
35
+ return request(`https://api.close.com/api/v1/me/`);
36
+ }
37
+ },
38
+ extendRequest({ settings }) {
39
+ return {
40
+ username: settings.api_key,
41
+ password: ''
42
+ };
43
+ },
44
+ actions: {
45
+ createUpdateContactAndLead: createUpdateContactAndLead_1.default
46
+ }
47
+ };
48
+ exports.default = destination;
49
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/close/index.ts"],"names":[],"mappings":";;;;;AAGA,8FAAqE;AAErE,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,OAAO;QACf,MAAM,EAAE;YACN,OAAO,EAAE;gBACP,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,qBAAqB;gBAClC,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,mCAAmC,EAAE;gBACnC,KAAK,EAAE,qCAAqC;gBAC5C,WAAW,EACT,oDAAoD;oBACpD,4DAA4D;oBAC5D,iEAAiE;oBACjE,8DAA8D;oBAC9D,6DAA6D;oBAC7D,0DAA0D;oBAC1D,oCAAoC;gBACtC,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,KAAK;aAChB;SACF;QACD,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE;YAC9B,OAAO,OAAO,CAAC,kCAAkC,CAAC,CAAA;QACpD,CAAC;KACF;IAED,aAAa,CAAC,EAAE,QAAQ,EAAE;QACxB,OAAO;YACL,QAAQ,EAAE,QAAQ,CAAC,OAAO;YAC1B,QAAQ,EAAE,EAAE;SACb,CAAA;IACH,CAAC;IAQD,OAAO,EAAE;QACP,0BAA0B,EAA1B,oCAA0B;KAC3B;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
@@ -0,0 +1,6 @@
1
+ export interface Payload {
2
+ identifyByKey: string;
3
+ identifyByValue: string;
4
+ groupId: string;
5
+ listName?: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/cordial/addContactToList/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import type { ActionDefinition } from '@segment/actions-core';
2
+ import type { Settings } from '../generated-types';
3
+ import type { Payload } from './generated-types';
4
+ declare const action: ActionDefinition<Settings, Payload>;
5
+ export default action;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const cordial_client_1 = __importDefault(require("../cordial-client"));
7
+ const user_identifier_1 = require("../user-identifier");
8
+ const common_fields_1 = require("../common-fields");
9
+ const action = {
10
+ title: 'Add Contact to List',
11
+ description: 'Add Contact to Cordial List',
12
+ defaultSubscription: 'type = "group"',
13
+ fields: {
14
+ ...common_fields_1.commonFields,
15
+ groupId: {
16
+ label: 'Group ID',
17
+ description: 'Segment Group ID',
18
+ type: 'string',
19
+ required: true,
20
+ default: {
21
+ '@path': '$.groupId'
22
+ }
23
+ },
24
+ listName: {
25
+ label: 'List Name',
26
+ description: 'Cordial List Name',
27
+ type: 'string',
28
+ default: {
29
+ '@if': {
30
+ exists: { '@path': '$.traits.name' },
31
+ then: { '@path': '$.traits.name' },
32
+ else: { '@path': '$.groupId' }
33
+ }
34
+ }
35
+ }
36
+ },
37
+ perform: async (request, { settings, payload }) => {
38
+ const client = new cordial_client_1.default(settings, request);
39
+ const list = await client.upsertList(payload.groupId, payload.listName);
40
+ const userIdentifier = user_identifier_1.getUserIdentifier(payload.identifyByKey, payload.identifyByValue);
41
+ return client.addContactToList(userIdentifier, list);
42
+ }
43
+ };
44
+ exports.default = action;
45
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/cordial/addContactToList/index.ts"],"names":[],"mappings":";;;;;AAGA,uEAA6C;AAC7C,wDAAsD;AACtD,oDAA+C;AAE/C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EAAE,6BAA6B;IAC1C,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,GAAG,4BAAY;QACf,OAAO,EAAE;YACP,KAAK,EAAE,UAAU;YACjB,WAAW,EAAE,kBAAkB;YAC/B,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,WAAW;aACrB;SACF;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,mBAAmB;YAChC,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;oBACpC,IAAI,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;oBAClC,IAAI,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;iBAC/B;aACF;SACF;KACF;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;QACnD,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAA;QACvE,MAAM,cAAc,GAAG,mCAAiB,CAAC,OAAO,CAAC,aAAa,EAAE,OAAO,CAAC,eAAe,CAAC,CAAA;QACxF,OAAO,MAAM,CAAC,gBAAgB,CAAC,cAAc,EAAE,IAAI,CAAC,CAAA;IACtD,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { InputField } from '@segment/actions-core';
2
+ export declare const commonFields: Record<string, InputField>;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.commonFields = void 0;
4
+ exports.commonFields = {
5
+ identifyByKey: {
6
+ label: 'Contact IdentifyBy key',
7
+ description: 'Property key by which Cordial contact should be identified. May be any primary or secondary key (e.g. cID, email, segment_id etc.)',
8
+ type: 'string',
9
+ required: true
10
+ },
11
+ identifyByValue: {
12
+ label: 'Contact IdentifyBy value',
13
+ description: 'Value for defined key',
14
+ type: 'string',
15
+ required: true,
16
+ default: {
17
+ '@path': '$.userId'
18
+ }
19
+ }
20
+ };
21
+ //# sourceMappingURL=common-fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common-fields.js","sourceRoot":"","sources":["../../../src/destinations/cordial/common-fields.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAA+B;IACtD,aAAa,EAAE;QACb,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EACT,oIAAoI;QACtI,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;KACf;IACD,eAAe,EAAE;QACf,KAAK,EAAE,0BAA0B;QACjC,WAAW,EAAE,uBAAuB;QACpC,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE;YACP,OAAO,EAAE,UAAU;SACpB;KACF;CACF,CAAA"}
@@ -0,0 +1,36 @@
1
+ import { Settings } from './generated-types';
2
+ import { RequestClient } from '@segment/actions-core';
3
+ import { Payload as ContactActivityPayload } from './createContactactivity/generated-types';
4
+ import { UserIdentifier } from "./user-identifier";
5
+ interface Attribute {
6
+ name: string;
7
+ type: string;
8
+ key: string;
9
+ }
10
+ interface ContactAttributes {
11
+ [key: string]: string | number;
12
+ }
13
+ interface List {
14
+ id: number;
15
+ name: string;
16
+ segment_group_id: string;
17
+ }
18
+ declare class CordialClient {
19
+ private readonly apiUrl;
20
+ private readonly request;
21
+ constructor(settings: Settings, request: RequestClient);
22
+ addContactActivity(payload: ContactActivityPayload): Promise<import("@segment/actions-core").ModifiedResponse<unknown>>;
23
+ upsertContact(userIdentifier: UserIdentifier, attributes?: ContactAttributes): Promise<import("@segment/actions-core").ModifiedResponse<unknown>>;
24
+ getList(segmentGroupId: string, listName?: string): Promise<List | null>;
25
+ upsertList(segmentGroupId: string, listName?: string): Promise<List>;
26
+ addContactToList(userIdentifier: UserIdentifier, list: List): Promise<import("@segment/actions-core").ModifiedResponse<unknown>>;
27
+ removeContactFromList(userIdentifier: UserIdentifier, list: List): Promise<import("@segment/actions-core").ModifiedResponse<unknown>>;
28
+ transformAttributes(rawAttributes: {
29
+ [key: string]: any;
30
+ }): Promise<ContactAttributes>;
31
+ protected getAttributes(): Promise<{
32
+ [key: string]: Attribute;
33
+ }>;
34
+ protected prepareListName(listName: string): string;
35
+ }
36
+ export default CordialClient;
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class CordialClient {
4
+ constructor(settings, request) {
5
+ this.apiUrl = `${settings.endpoint}/v2`;
6
+ this.request = request;
7
+ }
8
+ addContactActivity(payload) {
9
+ return this.request(`${this.apiUrl}/contactactivities`, {
10
+ method: 'post',
11
+ json: {
12
+ [payload.identifyByKey]: payload.identifyByValue,
13
+ a: payload.action,
14
+ time: payload.time,
15
+ properties: payload.properties
16
+ }
17
+ });
18
+ }
19
+ async upsertContact(userIdentifier, attributes) {
20
+ return this.request(`${this.apiUrl}/contacts`, {
21
+ method: 'post',
22
+ json: {
23
+ ...userIdentifier,
24
+ ...attributes,
25
+ request_source: 'integration-segment'
26
+ }
27
+ });
28
+ }
29
+ async getList(segmentGroupId, listName) {
30
+ let result = null;
31
+ try {
32
+ const lists = await this.request(`${this.apiUrl}/accountlists`, {
33
+ method: 'get'
34
+ });
35
+ for (const list of lists.data) {
36
+ if (list.segment_group_id == segmentGroupId) {
37
+ result = list;
38
+ break;
39
+ }
40
+ }
41
+ if (!result && listName) {
42
+ listName = this.prepareListName(listName);
43
+ for (const list of lists.data) {
44
+ if (list.name == listName) {
45
+ result = list;
46
+ break;
47
+ }
48
+ }
49
+ }
50
+ }
51
+ catch (e) {
52
+ return result;
53
+ }
54
+ return result;
55
+ }
56
+ async upsertList(segmentGroupId, listName) {
57
+ const list = await this.getList(segmentGroupId, listName);
58
+ if (list) {
59
+ return list;
60
+ }
61
+ if (!listName) {
62
+ listName = 'segment_' + segmentGroupId;
63
+ }
64
+ listName = this.prepareListName(listName);
65
+ const response = await this.request(`${this.apiUrl}/accountlists`, {
66
+ method: 'post',
67
+ json: {
68
+ name: listName,
69
+ enhanced: true,
70
+ segment_group_id: segmentGroupId
71
+ }
72
+ });
73
+ return {
74
+ id: response.data.id,
75
+ name: listName,
76
+ segment_group_id: segmentGroupId
77
+ };
78
+ }
79
+ async addContactToList(userIdentifier, list) {
80
+ return this.request(`${this.apiUrl}/contacts`, {
81
+ method: 'post',
82
+ json: {
83
+ ...userIdentifier,
84
+ [list.name]: true
85
+ }
86
+ });
87
+ }
88
+ async removeContactFromList(userIdentifier, list) {
89
+ return this.request(`${this.apiUrl}/contacts`, {
90
+ method: 'post',
91
+ json: {
92
+ ...userIdentifier,
93
+ [list.name]: false
94
+ }
95
+ });
96
+ }
97
+ async transformAttributes(rawAttributes) {
98
+ const attributes = {};
99
+ const availableAttributes = await this.getAttributes();
100
+ for (const key in availableAttributes) {
101
+ if (key in rawAttributes) {
102
+ const value = rawAttributes[key];
103
+ if (typeof value !== 'object') {
104
+ attributes[key] = value;
105
+ }
106
+ }
107
+ }
108
+ return attributes;
109
+ }
110
+ async getAttributes() {
111
+ const response = await this.request(`${this.apiUrl}/accountcontactattributes`, {
112
+ method: 'get'
113
+ });
114
+ return response.data;
115
+ }
116
+ prepareListName(listName) {
117
+ return listName.replace(' ', '-');
118
+ }
119
+ }
120
+ exports.default = CordialClient;
121
+ //# sourceMappingURL=cordial-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cordial-client.js","sourceRoot":"","sources":["../../../src/destinations/cordial/cordial-client.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I,CAAC,IAAI,CAAC,EAAE,IAAI;aAClB;SACF,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,qBAAqB,CAAC,cAA8B,EAAE,IAAU;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,WAAW,EAAE;YAC7C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,GAAG,cAAc;gBACjB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK;aACnB;SACF,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,mBAAmB,CAAC,aAAqC;QAC7D,MAAM,UAAU,GAAsB,EAAE,CAAA;QACxC,MAAM,mBAAmB,GAAG,MAAM,IAAI,CAAC,aAAa,EAAE,CAAA;QAEtD,KAAK,MAAM,GAAG,IAAI,mBAAmB,EAAE;YACrC,IAAI,GAAG,IAAI,aAAa,EAAE;gBACxB,MAAM,KAAK,GAAG,aAAa,CAAC,GAAG,CAAC,CAAA;gBAChC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;oBAC7B,UAAU,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;iBACxB;aACF;SACF;QAED,OAAO,UAAU,CAAA;IACnB,CAAC;IAES,KAAK,CAAC,aAAa;QAC3B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAA+B,GAAG,IAAI,CAAC,MAAM,2BAA2B,EAAE;YAC3G,MAAM,EAAE,KAAK;SACd,CAAC,CAAA;QAEF,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;IAES,eAAe,CAAC,QAAgB;QACxC,OAAO,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;IACnC,CAAC;CACF;AAED,kBAAe,aAAa,CAAA"}
@@ -0,0 +1,9 @@
1
+ export interface Payload {
2
+ identifyByKey: string;
3
+ identifyByValue: string;
4
+ action: string;
5
+ time?: string | number;
6
+ properties?: {
7
+ [k: string]: unknown;
8
+ };
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/cordial/createContactactivity/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import type { ActionDefinition } from '@segment/actions-core';
2
+ import type { Settings } from '../generated-types';
3
+ import type { Payload } from './generated-types';
4
+ declare const action: ActionDefinition<Settings, Payload>;
5
+ export default action;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const cordial_client_1 = __importDefault(require("../cordial-client"));
7
+ const common_fields_1 = require("../common-fields");
8
+ const action = {
9
+ title: 'Create Contactactivity',
10
+ description: "Create Cordial Contactactivity from Segment's track and page events",
11
+ defaultSubscription: 'type = "track" or type = "page"',
12
+ fields: {
13
+ ...common_fields_1.commonFields,
14
+ action: {
15
+ label: 'Event name',
16
+ description: 'Segment event name',
17
+ type: 'string',
18
+ required: true,
19
+ default: {
20
+ '@path': '$.event'
21
+ }
22
+ },
23
+ time: {
24
+ label: 'Event sentAt',
25
+ description: 'Segment event sentAt',
26
+ type: 'datetime',
27
+ default: {
28
+ '@path': '$.sentAt'
29
+ }
30
+ },
31
+ properties: {
32
+ label: 'Event properties',
33
+ description: 'Segment event properties',
34
+ type: 'object',
35
+ default: {
36
+ '@path': '$.properties'
37
+ }
38
+ }
39
+ },
40
+ perform: (request, { settings, payload }) => {
41
+ const client = new cordial_client_1.default(settings, request);
42
+ return client.addContactActivity(payload);
43
+ }
44
+ };
45
+ exports.default = action;
46
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/cordial/createContactactivity/index.ts"],"names":[],"mappings":";;;;;AAGA,uEAA6C;AAC7C,oDAA+C;AAE/C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,wBAAwB;IAC/B,WAAW,EAAE,qEAAqE;IAClF,mBAAmB,EAAE,iCAAiC;IACtD,MAAM,EAAE;QACN,GAAG,4BAAY;QACf,MAAM,EAAE;YACN,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,oBAAoB;YACjC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,SAAS;aACnB;SACF;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,cAAc;YACrB,WAAW,EAAE,sBAAsB;YACnC,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,UAAU,EAAE;YACV,KAAK,EAAE,kBAAkB;YACzB,WAAW,EAAE,0BAA0B;YACvC,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,cAAc;aACxB;SACF;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAC1C,MAAM,MAAM,GAAG,IAAI,wBAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;QACnD,OAAO,MAAM,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAA;IAC3C,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,4 @@
1
+ export interface Settings {
2
+ apiKey: string;
3
+ endpoint: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/cordial/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { DestinationDefinition } from '@segment/actions-core';
2
+ import type { Settings } from './generated-types';
3
+ declare const destination: DestinationDefinition<Settings>;
4
+ export default destination;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const createContactactivity_1 = __importDefault(require("./createContactactivity"));
7
+ const upsertContact_1 = __importDefault(require("./upsertContact"));
8
+ const addContactToList_1 = __importDefault(require("./addContactToList"));
9
+ const removeContactFromList_1 = __importDefault(require("./removeContactFromList"));
10
+ const destination = {
11
+ name: 'Cordial (Actions)',
12
+ description: 'Sync Segment Users, Groups and Events to Cordial',
13
+ slug: 'actions-cordial',
14
+ mode: 'cloud',
15
+ authentication: {
16
+ scheme: 'basic',
17
+ fields: {
18
+ apiKey: {
19
+ label: 'API Key',
20
+ description: 'Your Cordial API Key',
21
+ type: 'string',
22
+ required: true
23
+ },
24
+ endpoint: {
25
+ label: 'Endpoint',
26
+ description: "Cordial API endpoint. Leave default, unless you've been provided with another one. [See more details](https://support.cordial.com/hc/en-us/sections/200553578-REST-API-Introduction-and-Overview)",
27
+ type: 'string',
28
+ required: true,
29
+ format: 'uri',
30
+ choices: [
31
+ { label: 'US-EAST (https://api.cordial.io)', value: 'https://api.cordial.io' },
32
+ { label: 'US-WEST (https://api.usw2.cordial.io)', value: 'https://api.usw2.cordial.io' },
33
+ { label: 'Staging (https://api.stg.cordialdev.com)', value: 'https://api.stg.cordialdev.com' }
34
+ ],
35
+ default: 'https://api.cordial.io'
36
+ }
37
+ },
38
+ testAuthentication: (request, { settings }) => {
39
+ return request(settings.endpoint + '/v2/health');
40
+ }
41
+ },
42
+ extendRequest({ settings }) {
43
+ return { username: settings.apiKey };
44
+ },
45
+ actions: {
46
+ createContactactivity: createContactactivity_1.default,
47
+ upsertContact: upsertContact_1.default,
48
+ addContactToList: addContactToList_1.default,
49
+ removeContactFromList: removeContactFromList_1.default
50
+ }
51
+ };
52
+ exports.default = destination;
53
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/cordial/index.ts"],"names":[],"mappings":";;;;;AAGA,oFAA2D;AAC3D,oEAA2C;AAC3C,0EAAiD;AACjD,oFAA2D;AAE3D,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,kDAAkD;IAC/D,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,OAAO;QACf,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,sBAAsB;gBACnC,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,QAAQ,EAAE;gBACR,KAAK,EAAE,UAAU;gBACjB,WAAW,EACT,mMAAmM;gBACrM,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;gBACd,MAAM,EAAE,KAAK;gBACb,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,kCAAkC,EAAE,KAAK,EAAE,wBAAwB,EAAE;oBAC9E,EAAE,KAAK,EAAE,uCAAuC,EAAE,KAAK,EAAE,6BAA6B,EAAE;oBACxF,EAAE,KAAK,EAAE,0CAA0C,EAAE,KAAK,EAAE,gCAAgC,EAAE;iBAC/F;gBACD,OAAO,EAAE,wBAAwB;aAClC;SACF;QACD,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAC5C,OAAO,OAAO,CAAC,QAAQ,CAAC,QAAQ,GAAG,YAAY,CAAC,CAAA;QAClD,CAAC;KACF;IAED,aAAa,CAAC,EAAE,QAAQ,EAAE;QACxB,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAA;IACtC,CAAC;IAED,OAAO,EAAE;QACP,qBAAqB,EAArB,+BAAqB;QACrB,aAAa,EAAb,uBAAa;QACb,gBAAgB,EAAhB,0BAAgB;QAChB,qBAAqB,EAArB,+BAAqB;KACtB;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
@@ -0,0 +1,6 @@
1
+ export interface Payload {
2
+ identifyByKey: string;
3
+ identifyByValue: string;
4
+ groupId: string;
5
+ listName?: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/cordial/removeContactFromList/generated-types.ts"],"names":[],"mappings":""}