@segment/action-destinations 3.82.1-alpha.22 → 3.82.1-alpha.6

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 (94) hide show
  1. package/dist/destinations/cordial/addProductToCart/generated-types.d.ts +17 -0
  2. package/dist/destinations/{intercom → cordial/addProductToCart}/generated-types.js +0 -0
  3. package/dist/destinations/cordial/addProductToCart/generated-types.js.map +1 -0
  4. package/dist/destinations/{intercom/groupIdentifyContact → cordial/addProductToCart}/index.d.ts +1 -1
  5. package/dist/destinations/cordial/addProductToCart/index.js +116 -0
  6. package/dist/destinations/cordial/addProductToCart/index.js.map +1 -0
  7. package/dist/destinations/cordial/cordial-client.d.ts +6 -0
  8. package/dist/destinations/cordial/cordial-client.js +42 -0
  9. package/dist/destinations/cordial/cordial-client.js.map +1 -1
  10. package/dist/destinations/cordial/index.js +9 -3
  11. package/dist/destinations/cordial/index.js.map +1 -1
  12. package/dist/destinations/cordial/removeProductFromCart/generated-types.d.ts +7 -0
  13. package/dist/destinations/{intercom/groupIdentifyContact → cordial/removeProductFromCart}/generated-types.js +0 -0
  14. package/dist/destinations/cordial/removeProductFromCart/generated-types.js.map +1 -0
  15. package/dist/destinations/{intercom/identifyContact → cordial/removeProductFromCart}/index.d.ts +1 -1
  16. package/dist/destinations/cordial/removeProductFromCart/index.js +44 -0
  17. package/dist/destinations/cordial/removeProductFromCart/index.js.map +1 -0
  18. package/dist/destinations/cordial/upsertOrder/generated-types.d.ts +26 -0
  19. package/dist/destinations/{intercom/identifyContact → cordial/upsertOrder}/generated-types.js +0 -0
  20. package/dist/destinations/cordial/upsertOrder/generated-types.js.map +1 -0
  21. package/dist/destinations/cordial/upsertOrder/index.d.ts +5 -0
  22. package/dist/destinations/cordial/upsertOrder/index.js +179 -0
  23. package/dist/destinations/cordial/upsertOrder/index.js.map +1 -0
  24. package/dist/destinations/customerio/index.js +1 -1
  25. package/dist/destinations/customerio/index.js.map +1 -1
  26. package/dist/destinations/{intercom → fullstory}/generated-types.d.ts +1 -0
  27. package/dist/destinations/fullstory/generated-types.js +3 -0
  28. package/dist/destinations/fullstory/generated-types.js.map +1 -0
  29. package/dist/destinations/fullstory/identifyUser/generated-types.d.ts +9 -0
  30. package/dist/destinations/fullstory/identifyUser/generated-types.js +3 -0
  31. package/dist/destinations/fullstory/identifyUser/generated-types.js.map +1 -0
  32. package/dist/destinations/fullstory/identifyUser/index.d.ts +4 -0
  33. package/dist/destinations/fullstory/identifyUser/index.js +73 -0
  34. package/dist/destinations/fullstory/identifyUser/index.js.map +1 -0
  35. package/dist/destinations/{intercom → fullstory}/index.d.ts +0 -0
  36. package/dist/destinations/fullstory/index.js +56 -0
  37. package/dist/destinations/fullstory/index.js.map +1 -0
  38. package/dist/destinations/fullstory/request-params.d.ts +18 -0
  39. package/dist/destinations/fullstory/request-params.js +70 -0
  40. package/dist/destinations/fullstory/request-params.js.map +1 -0
  41. package/dist/destinations/fullstory/trackEvent/generated-types.d.ts +10 -0
  42. package/dist/destinations/fullstory/trackEvent/generated-types.js +3 -0
  43. package/dist/destinations/fullstory/trackEvent/generated-types.js.map +1 -0
  44. package/dist/destinations/fullstory/trackEvent/index.d.ts +5 -0
  45. package/dist/destinations/fullstory/trackEvent/index.js +79 -0
  46. package/dist/destinations/fullstory/trackEvent/index.js.map +1 -0
  47. package/dist/destinations/fullstory/vars.d.ts +3 -0
  48. package/dist/destinations/fullstory/vars.js +100 -0
  49. package/dist/destinations/fullstory/vars.js.map +1 -0
  50. package/dist/destinations/google-enhanced-conversions/postConversion/index.js +2 -3
  51. package/dist/destinations/google-enhanced-conversions/postConversion/index.js.map +1 -1
  52. package/dist/destinations/index.js +0 -1
  53. package/dist/destinations/index.js.map +1 -1
  54. package/dist/destinations/personas-messaging-sendgrid/sendEmail/generated-types.d.ts +0 -3
  55. package/dist/destinations/personas-messaging-sendgrid/sendEmail/index.js +2 -45
  56. package/dist/destinations/personas-messaging-sendgrid/sendEmail/index.js.map +1 -1
  57. package/dist/destinations/talon-one/index.js +5 -1
  58. package/dist/destinations/talon-one/index.js.map +1 -1
  59. package/dist/destinations/talon-one/t1-properties.d.ts +5 -0
  60. package/dist/destinations/talon-one/t1-properties.js +179 -1
  61. package/dist/destinations/talon-one/t1-properties.js.map +1 -1
  62. package/dist/destinations/talon-one/trackEvent/generated-types.d.ts +4 -0
  63. package/dist/destinations/talon-one/trackEvent/index.js +37 -2
  64. package/dist/destinations/talon-one/trackEvent/index.js.map +1 -1
  65. package/dist/destinations/talon-one/updateCustomerProfile/generated-types.d.ts +4 -0
  66. package/dist/destinations/talon-one/updateCustomerProfile/index.js +38 -3
  67. package/dist/destinations/talon-one/updateCustomerProfile/index.js.map +1 -1
  68. package/dist/destinations/talon-one/updateCustomerProfileV2/generated-types.d.ts +19 -0
  69. package/dist/destinations/talon-one/updateCustomerProfileV2/generated-types.js +3 -0
  70. package/dist/destinations/talon-one/updateCustomerProfileV2/generated-types.js.map +1 -0
  71. package/dist/destinations/talon-one/updateCustomerProfileV2/index.d.ts +5 -0
  72. package/dist/destinations/talon-one/updateCustomerProfileV2/index.js +36 -0
  73. package/dist/destinations/talon-one/updateCustomerProfileV2/index.js.map +1 -0
  74. package/dist/destinations/talon-one/updateCustomerProfilesAttributes/generated-types.d.ts +4 -0
  75. package/dist/destinations/talon-one/updateCustomerProfilesAttributes/index.js +36 -1
  76. package/dist/destinations/talon-one/updateCustomerProfilesAttributes/index.js.map +1 -1
  77. package/dist/destinations/talon-one/updateCustomerSession/generated-types.d.ts +47 -0
  78. package/dist/destinations/talon-one/updateCustomerSession/generated-types.js +3 -0
  79. package/dist/destinations/talon-one/updateCustomerSession/generated-types.js.map +1 -0
  80. package/dist/destinations/talon-one/updateCustomerSession/index.d.ts +5 -0
  81. package/dist/destinations/talon-one/updateCustomerSession/index.js +117 -0
  82. package/dist/destinations/talon-one/updateCustomerSession/index.js.map +1 -0
  83. package/package.json +4 -4
  84. package/dist/destinations/intercom/generated-types.js.map +0 -1
  85. package/dist/destinations/intercom/groupIdentifyContact/generated-types.d.ts +0 -14
  86. package/dist/destinations/intercom/groupIdentifyContact/generated-types.js.map +0 -1
  87. package/dist/destinations/intercom/groupIdentifyContact/index.js +0 -122
  88. package/dist/destinations/intercom/groupIdentifyContact/index.js.map +0 -1
  89. package/dist/destinations/intercom/identifyContact/generated-types.d.ts +0 -15
  90. package/dist/destinations/intercom/identifyContact/generated-types.js.map +0 -1
  91. package/dist/destinations/intercom/identifyContact/index.js +0 -153
  92. package/dist/destinations/intercom/identifyContact/index.js.map +0 -1
  93. package/dist/destinations/intercom/index.js +0 -37
  94. package/dist/destinations/intercom/index.js.map +0 -1
@@ -0,0 +1,17 @@
1
+ export interface Payload {
2
+ userIdentities: {
3
+ [k: string]: unknown;
4
+ };
5
+ productID: string;
6
+ sku: string;
7
+ qty: number;
8
+ category: string;
9
+ name: string;
10
+ description?: string;
11
+ itemPrice?: number;
12
+ url?: string;
13
+ imageUrl?: string;
14
+ properties?: {
15
+ [k: string]: unknown;
16
+ };
17
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/cordial/addProductToCart/generated-types.ts"],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- import { ActionDefinition } from '@segment/actions-core';
1
+ import type { ActionDefinition } from '@segment/actions-core';
2
2
  import type { Settings } from '../generated-types';
3
3
  import type { Payload } from './generated-types';
4
4
  declare const action: ActionDefinition<Settings, Payload>;
@@ -0,0 +1,116 @@
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 action = {
8
+ title: 'Add Product to Cart',
9
+ description: 'Add product to Cordial contact cart',
10
+ defaultSubscription: 'type = "track" and event = "Product Added"',
11
+ fields: {
12
+ userIdentities: {
13
+ label: 'User Identities',
14
+ description: 'An ordered list of contact identifiers in Cordial. Each item in the list represents an identifier. For example, `channels.email.address -> userId` and/or `customerId -> traits.customerId`. At least one identifier should be valid otherwise the contact will not be identified and the request will be ignored.',
15
+ type: 'object',
16
+ required: true,
17
+ defaultObjectUI: 'keyvalue:only'
18
+ },
19
+ productID: {
20
+ label: 'Product ID',
21
+ description: 'Internal identifier of a product',
22
+ type: 'string',
23
+ required: true,
24
+ default: {
25
+ '@path': '$.properties.product_id'
26
+ }
27
+ },
28
+ sku: {
29
+ label: 'SKU',
30
+ description: 'SKU of a product',
31
+ type: 'string',
32
+ required: true,
33
+ default: {
34
+ '@path': '$.properties.sku'
35
+ }
36
+ },
37
+ qty: {
38
+ label: 'Quantity',
39
+ description: 'Quantity of a product',
40
+ type: 'integer',
41
+ required: true,
42
+ default: {
43
+ '@path': '$.properties.quantity'
44
+ }
45
+ },
46
+ category: {
47
+ label: 'Category',
48
+ description: 'Category of a product',
49
+ type: 'string',
50
+ required: true,
51
+ default: {
52
+ '@path': '$.properties.category'
53
+ }
54
+ },
55
+ name: {
56
+ label: 'Name',
57
+ description: 'Name of a product',
58
+ type: 'string',
59
+ required: true,
60
+ default: {
61
+ '@path': '$.properties.name'
62
+ }
63
+ },
64
+ description: {
65
+ label: 'Description',
66
+ description: 'Description of a product',
67
+ type: 'string',
68
+ required: false
69
+ },
70
+ itemPrice: {
71
+ label: 'Price',
72
+ description: 'Price of a product',
73
+ type: 'number',
74
+ required: false,
75
+ default: {
76
+ '@path': '$.properties.price'
77
+ }
78
+ },
79
+ url: {
80
+ label: 'URL',
81
+ description: 'URL of a product',
82
+ type: 'string',
83
+ required: false,
84
+ default: {
85
+ '@path': '$.properties.url'
86
+ }
87
+ },
88
+ imageUrl: {
89
+ label: 'Image URL',
90
+ description: 'Image of a product',
91
+ type: 'string',
92
+ required: false,
93
+ default: {
94
+ '@path': '$.properties.image_url'
95
+ }
96
+ },
97
+ properties: {
98
+ label: 'Properties',
99
+ description: 'Properties of a product (e.g brand, color, size)',
100
+ type: 'object',
101
+ required: false,
102
+ default: {
103
+ brand: { '@path': '$.properties.brand' },
104
+ variant: { '@path': '$.properties.variant' },
105
+ coupon: { '@path': '$.properties.coupon' }
106
+ },
107
+ defaultObjectUI: 'keyvalue:only'
108
+ },
109
+ },
110
+ perform: (request, { settings, payload }) => {
111
+ const client = new cordial_client_1.default(settings, request);
112
+ return client.addProductToCart(payload);
113
+ }
114
+ };
115
+ exports.default = action;
116
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/cordial/addProductToCart/index.ts"],"names":[],"mappings":";;;;;AAGA,uEAA8C;AAE9C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EAAE,qCAAqC;IAClD,mBAAmB,EAAE,4CAA4C;IACjE,MAAM,EAAE;QACN,cAAc,EAAE;YACd,KAAK,EAAE,iBAAiB;YACxB,WAAW,EACT,oTAAoT;YACtT,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,eAAe,EAAE,eAAe;SACjC;QACD,SAAS,EAAE;YACT,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,kCAAkC;YAC/C,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,yBAAyB;aACnC;SACF;QACD,GAAG,EAAE;YACH,KAAK,EAAE,KAAK;YACZ,WAAW,EAAE,kBAAkB;YAC/B,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,kBAAkB;aAC5B;SACF;QACD,GAAG,EAAE;YACH,KAAK,EAAE,UAAU;YACjB,WAAW,EAAE,uBAAuB;YACpC,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,uBAAuB;aACjC;SACF;QACD,QAAQ,EA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AE,qBAAqB,EAAE;aAC3C;YACD,eAAe,EAAE,eAAe;SACjC;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,gBAAgB,CAAC,OAAO,CAAC,CAAA;IACzC,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -4,6 +4,9 @@ import { Payload as AddContactToListPayload } from './addContactToList/generated
4
4
  import { Payload as CreateContactactivityPayload } from './createContactactivity/generated-types';
5
5
  import { Payload as RemoveContactFromListPayload } from './removeContactFromList/generated-types';
6
6
  import { Payload as UpsertContactPayload } from './upsertContact/generated-types';
7
+ import { Payload as AddProductToCartPayload } from './addProductToCart/generated-types';
8
+ import { Payload as RemoveProductFromCartPayload } from './removeProductFromCart/generated-types';
9
+ import { Payload as UpsertOrder } from './upsertOrder/generated-types';
7
10
  declare class CordialClient {
8
11
  private readonly apiUrl;
9
12
  private readonly request;
@@ -12,5 +15,8 @@ declare class CordialClient {
12
15
  upsertContact(payload: UpsertContactPayload): Promise<import("@segment/actions-core").ModifiedResponse<unknown>>;
13
16
  addContactToList(payload: AddContactToListPayload): Promise<import("@segment/actions-core").ModifiedResponse<unknown>>;
14
17
  removeContactFromList(payload: RemoveContactFromListPayload): Promise<import("@segment/actions-core").ModifiedResponse<unknown>>;
18
+ addProductToCart(payload: AddProductToCartPayload): Promise<import("@segment/actions-core").ModifiedResponse<unknown>>;
19
+ removeProductFromCart(payload: RemoveProductFromCartPayload): Promise<import("@segment/actions-core").ModifiedResponse<unknown>>;
20
+ upsertOrder(payload: UpsertOrder): Promise<import("@segment/actions-core").ModifiedResponse<unknown>>;
15
21
  }
16
22
  export default CordialClient;
@@ -45,6 +45,48 @@ class CordialClient {
45
45
  }
46
46
  });
47
47
  }
48
+ async addProductToCart(payload) {
49
+ return this.request(`${this.apiUrl}/addProductToCart`, {
50
+ method: 'post',
51
+ json: {
52
+ userIdentities: payload.userIdentities,
53
+ productID: payload.productID,
54
+ sku: payload.sku,
55
+ qty: payload.qty,
56
+ category: payload.category,
57
+ name: payload.name,
58
+ description: payload.description,
59
+ itemPrice: payload.itemPrice,
60
+ url: payload.url,
61
+ imageUrl: payload.imageUrl,
62
+ properties: payload.properties
63
+ }
64
+ });
65
+ }
66
+ async removeProductFromCart(payload) {
67
+ return this.request(`${this.apiUrl}/removeProductFromCart`, {
68
+ method: 'post',
69
+ json: {
70
+ userIdentities: payload.userIdentities,
71
+ productID: payload.productID,
72
+ qty: payload.qty
73
+ }
74
+ });
75
+ }
76
+ async upsertOrder(payload) {
77
+ return this.request(`${this.apiUrl}/upsertOrder`, {
78
+ method: 'post',
79
+ json: {
80
+ userIdentities: payload.userIdentities,
81
+ orderID: payload.orderID,
82
+ purchaseDate: payload.purchaseDate,
83
+ status: payload.status,
84
+ totalAmount: payload.totalAmount,
85
+ properties: payload.properties,
86
+ items: payload.items
87
+ }
88
+ });
89
+ }
48
90
  }
49
91
  exports.default = CordialClient;
50
92
  //# sourceMappingURL=cordial-client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cordial-client.js","sourceRoot":"","sources":["../../../src/destinations/cordial/cordial-client.ts"],"names":[],"mappings":";;AAOA,MAAM,aAAa;IAIjB,YAAY,QAAkB,EAAE,OAAsB;QACpD,IAAI,CAAC,MAAM,GAAG,GAAG,QAAQ,CAAC,QAAQ,cAAc,CAAA;QAChD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;IAED,kBAAkB,CAAC,OAAqC;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,wBAAwB,EAAE;YAC1D,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,cAAc,EAAE,OAAO,CAAC,cAAc;gBACtC,MAAM,EAAE,OAAO,CAAC,MAAM;gBACt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AE,OAAO,CAAC,WAAW;gBAChC,UAAU,EAAE,OAAO,CAAC,UAAU;gBAC9B,KAAK,EAAE,OAAO,CAAC,KAAK;aACrB;SACF,CAAC,CAAA;IACJ,CAAC;CACF;AAED,kBAAe,aAAa,CAAA"}
@@ -7,6 +7,9 @@ const createContactactivity_1 = __importDefault(require("./createContactactivity
7
7
  const upsertContact_1 = __importDefault(require("./upsertContact"));
8
8
  const addContactToList_1 = __importDefault(require("./addContactToList"));
9
9
  const removeContactFromList_1 = __importDefault(require("./removeContactFromList"));
10
+ const addProductToCart_1 = __importDefault(require("./addProductToCart"));
11
+ const removeProductFromCart_1 = __importDefault(require("./removeProductFromCart"));
12
+ const upsertOrder_1 = __importDefault(require("./upsertOrder"));
10
13
  const destination = {
11
14
  name: 'Cordial (Actions)',
12
15
  description: 'Sync Segment Users, Groups and Events to Cordial',
@@ -31,19 +34,22 @@ const destination = {
31
34
  }
32
35
  },
33
36
  testAuthentication: (request, { settings }) => {
34
- return request(settings.endpoint + '/api/checkAuth');
37
+ return request(settings.endpoint + '/api/checkAuth', { headers: { 'Content-Type': 'application/json' } });
35
38
  }
36
39
  },
37
40
  extendRequest({ settings }) {
38
41
  return {
39
- headers: { 'x-api-key': `${settings.apiKey}`, 'Accept': 'application/json' },
42
+ headers: { 'x-api-key': `${settings.apiKey}`, 'Accept': 'application/json' }
40
43
  };
41
44
  },
42
45
  actions: {
43
46
  createContactactivity: createContactactivity_1.default,
44
47
  upsertContact: upsertContact_1.default,
45
48
  addContactToList: addContactToList_1.default,
46
- removeContactFromList: removeContactFromList_1.default
49
+ removeContactFromList: removeContactFromList_1.default,
50
+ addProductToCart: addProductToCart_1.default,
51
+ removeProductFromCart: removeProductFromCart_1.default,
52
+ upsertOrder: upsertOrder_1.default
47
53
  }
48
54
  };
49
55
  exports.default = destination;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/cordial/index.ts"],"names":[],"mappings":";;;;;AAGA,oFAA2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
6
+ qty: number;
7
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/cordial/removeProductFromCart/generated-types.ts"],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- import { ActionDefinition } from '@segment/actions-core';
1
+ import type { ActionDefinition } from '@segment/actions-core';
2
2
  import type { Settings } from '../generated-types';
3
3
  import type { Payload } from './generated-types';
4
4
  declare const action: ActionDefinition<Settings, Payload>;
@@ -0,0 +1,44 @@
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 action = {
8
+ title: 'Remove Product from Cart',
9
+ description: 'Removes product from Cordial contact cart',
10
+ defaultSubscription: 'type = "track" and event = "Product Removed"',
11
+ fields: {
12
+ userIdentities: {
13
+ label: 'User Identities',
14
+ description: 'An ordered list of contact identifiers in Cordial. Each item in the list represents an identifier. For example, `channels.email.address -> userId` and/or `customerId -> traits.customerId`. At least one identifier should be valid otherwise the contact will not be identified and the request will be ignored.',
15
+ type: 'object',
16
+ required: true,
17
+ defaultObjectUI: 'keyvalue:only'
18
+ },
19
+ productID: {
20
+ label: 'Product ID',
21
+ description: 'Internal identifier of a product',
22
+ type: 'string',
23
+ required: true,
24
+ default: {
25
+ '@path': '$.properties.product_id'
26
+ }
27
+ },
28
+ qty: {
29
+ label: 'Quantity',
30
+ description: 'Quantity of a product',
31
+ type: 'integer',
32
+ required: true,
33
+ default: {
34
+ '@path': '$.properties.quantity'
35
+ }
36
+ }
37
+ },
38
+ perform: (request, { settings, payload }) => {
39
+ const client = new cordial_client_1.default(settings, request);
40
+ return client.removeProductFromCart(payload);
41
+ }
42
+ };
43
+ exports.default = action;
44
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/cordial/removeProductFromCart/index.ts"],"names":[],"mappings":";;;;;AAGA,uEAA8C;AAE9C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,0BAA0B;IACjC,WAAW,EAAE,2CAA2C;IACxD,mBAAmB,EAAE,8CAA8C;IACnE,MAAM,EAAE;QACN,cAAc,EAAE;YACd,KAAK,EAAE,iBAAiB;YACxB,WAAW,EACT,oTAAoT;YACtT,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,eAAe,EAAE,eAAe;SACjC;QACD,SAAS,EAAE;YACT,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,kCAAkC;YAC/C,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,yBAAyB;aACnC;SACF;QACD,GAAG,EAAE;YACH,KAAK,EAAE,UAAU;YACjB,WAAW,EAAE,uBAAuB;YACpC,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,uBAAuB;aACjC;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,qBAAqB,CAAC,OAAO,CAAC,CAAA;IAC9C,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,26 @@
1
+ export interface Payload {
2
+ userIdentities: {
3
+ [k: string]: unknown;
4
+ };
5
+ orderID: string;
6
+ purchaseDate: string | number;
7
+ status: string;
8
+ totalAmount: number;
9
+ properties?: {
10
+ [k: string]: unknown;
11
+ };
12
+ items: {
13
+ productID: string;
14
+ sku: string;
15
+ category?: string;
16
+ name: string;
17
+ manufacturerName?: string;
18
+ itemPrice?: number;
19
+ qty?: number;
20
+ url?: string;
21
+ imageUrl?: string;
22
+ properties?: {
23
+ [k: string]: unknown;
24
+ };
25
+ }[];
26
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/cordial/upsertOrder/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,179 @@
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 action = {
8
+ title: 'Upsert Order',
9
+ description: 'Upserts order to Cordial',
10
+ defaultSubscription: 'event = "Order Completed" or event = "Order Updated" or event = "Order Refunded" or event = "Order Cancelled"',
11
+ fields: {
12
+ userIdentities: {
13
+ label: 'User Identities',
14
+ description: 'An ordered list of contact identifiers in Cordial. Each item in the list represents an identifier. For example, `channels.email.address -> userId` and/or `customerId -> traits.customerId`. At least one identifier should be valid otherwise the contact will not be identified and the request will be ignored.',
15
+ type: 'object',
16
+ required: true,
17
+ defaultObjectUI: 'keyvalue:only'
18
+ },
19
+ orderID: {
20
+ label: 'Order ID',
21
+ description: 'Internal identifier of an order',
22
+ type: 'string',
23
+ required: true,
24
+ default: {
25
+ '@path': '$.properties.order_id'
26
+ }
27
+ },
28
+ purchaseDate: {
29
+ label: 'Order purchase date',
30
+ description: 'Order purchase date',
31
+ type: 'datetime',
32
+ required: true,
33
+ default: {
34
+ '@path': '$.timestamp'
35
+ }
36
+ },
37
+ status: {
38
+ label: 'Order status',
39
+ description: 'Order status (e.g. completed/cancelled/returned)',
40
+ type: 'string',
41
+ required: true,
42
+ default: {
43
+ '@path': '$.event'
44
+ }
45
+ },
46
+ totalAmount: {
47
+ label: 'Order total',
48
+ description: 'Order total amount',
49
+ type: 'number',
50
+ required: true,
51
+ default: {
52
+ '@path': '$.properties.total'
53
+ }
54
+ },
55
+ properties: {
56
+ label: 'Order properties',
57
+ description: 'Additional order properties (e.g. affiliation/tax/revenue)',
58
+ type: 'object',
59
+ required: false,
60
+ default: {
61
+ affiliation: { '@path': '$.properties.affiliation' },
62
+ revenue: { '@path': '$.properties.revenue' },
63
+ shipping: { '@path': '$.properties.shipping' },
64
+ tax: { '@path': '$.properties.tax' },
65
+ discount: { '@path': '$.properties.discount' },
66
+ coupon: { '@path': '$.properties.coupon' },
67
+ currency: { '@path': '$.properties.currency' }
68
+ },
69
+ defaultObjectUI: 'keyvalue:only'
70
+ },
71
+ items: {
72
+ label: 'Order items',
73
+ description: 'Order items',
74
+ type: 'object',
75
+ required: true,
76
+ multiple: true,
77
+ properties: {
78
+ productID: {
79
+ label: 'ID',
80
+ description: 'ID of the purchased item.',
81
+ type: 'string',
82
+ required: true
83
+ },
84
+ sku: {
85
+ label: 'SKU',
86
+ description: 'SKU of the purchased item.',
87
+ type: 'string',
88
+ required: true
89
+ },
90
+ category: {
91
+ label: 'Category',
92
+ description: 'Category of the purchased item.',
93
+ type: 'string'
94
+ },
95
+ name: {
96
+ label: 'Name',
97
+ description: 'Name of the purchased item.',
98
+ type: 'string',
99
+ required: true
100
+ },
101
+ manufacturerName: {
102
+ label: 'Manufacturer name',
103
+ description: 'Manufacturer name of the purchased item.',
104
+ type: 'string',
105
+ },
106
+ itemPrice: {
107
+ label: 'Price',
108
+ description: 'Price of the purchased item.',
109
+ type: 'number',
110
+ },
111
+ qty: {
112
+ label: 'Quantity',
113
+ description: 'Quantity of the purchased item.',
114
+ type: 'integer',
115
+ },
116
+ url: {
117
+ label: 'URL',
118
+ description: 'URL of the purchased item.',
119
+ type: 'string',
120
+ },
121
+ imageUrl: {
122
+ label: 'Image URL',
123
+ description: 'Image URL of the purchased item.',
124
+ type: 'string',
125
+ },
126
+ properties: {
127
+ label: 'Properties',
128
+ description: 'Additional properties of the purchased item.',
129
+ type: 'object',
130
+ }
131
+ },
132
+ default: {
133
+ '@arrayPath': [
134
+ '$.properties.products',
135
+ {
136
+ productID: {
137
+ '@path': '$.product_id'
138
+ },
139
+ sku: {
140
+ '@path': '$.sku'
141
+ },
142
+ category: {
143
+ '@path': '$.category'
144
+ },
145
+ name: {
146
+ '@path': '$.name'
147
+ },
148
+ manufacturerNname: {
149
+ '@path': '$.brand'
150
+ },
151
+ itemPrice: {
152
+ '@path': '$.price'
153
+ },
154
+ qty: {
155
+ '@path': '$.quantity'
156
+ },
157
+ url: {
158
+ '@path': '$.url'
159
+ },
160
+ imageUrl: {
161
+ '@path': '$.image_url'
162
+ },
163
+ properties: {
164
+ variant: { '@path': '$.variant' },
165
+ coupon: { '@path': '$.coupon' }
166
+ },
167
+ }
168
+ ]
169
+ },
170
+ defaultObjectUI: 'keyvalue:only'
171
+ },
172
+ },
173
+ perform: (request, { settings, payload }) => {
174
+ const client = new cordial_client_1.default(settings, request);
175
+ return client.upsertOrder(payload);
176
+ }
177
+ };
178
+ exports.default = action;
179
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/cordial/upsertOrder/index.ts"],"names":[],"mappings":";;;;;AAGA,uEAA8C;AAE9C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,0BAA0B;IACvC,mBAAmB,EAAE,+GAA+G;IACpI,MAAM,EAAE;QACN,cAAc,EAAE;YACd,KAAK,EAAE,iBAAiB;YACxB,WAAW,EACT,oTAAoT;YACtT,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,eAAe,EAAE,eAAe;SACjC;QACD,OAAO,EAAE;YACP,KAAK,EAAE,UAAU;YACjB,WAAW,EAAE,iCAAiC;YAC9C,IAAI,EAAE,QAAQ;YACd,QAAQ,EAA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BACT,OAAO,EAAE,cAAc;yBACxB;wBACD,GAAG,EAAE;4BACH,OAAO,EAAE,OAAO;yBACjB;wBACD,QAAQ,EAAE;4BACR,OAAO,EAAE,YAAY;yBACtB;wBACD,IAAI,EAAE;4BACJ,OAAO,EAAE,QAAQ;yBAClB;wBACD,iBAAiB,EAAE;4BACjB,OAAO,EAAE,SAAS;yBACnB;wBACD,SAAS,EAAE;4BACT,OAAO,EAAE,SAAS;yBACnB;wBACD,GAAG,EAAE;4BACH,OAAO,EAAE,YAAY;yBACtB;wBACD,GAAG,EAAE;4BACH,OAAO,EAAE,OAAO;yBACjB;wBACD,QAAQ,EAAE;4BACR,OAAO,EAAE,aAAa;yBACvB;wBACD,UAAU,EAAE;4BACV,OAAO,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;4BACjC,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;yBAChC;qBACF;iBACF;aACF;YACD,eAAe,EAAE,eAAe;SACjC;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,WAAW,CAAC,OAAO,CAAC,CAAA;IACpC,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -12,7 +12,7 @@ const trackPageView_1 = __importDefault(require("./trackPageView"));
12
12
  const trackScreenView_1 = __importDefault(require("./trackScreenView"));
13
13
  const utils_1 = require("./utils");
14
14
  const destination = {
15
- name: 'Actions Customerio',
15
+ name: 'Actions Customerio1',
16
16
  slug: 'actions-customerio',
17
17
  mode: 'cloud',
18
18
  authentication: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/customerio/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAAqD;AACrD,8EAAqD;AACrD,kEAAyC;AACzC,8EAA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OAAO,CAAA;QAE1B,MAAM,GAAG,GAAG,GAAG,wBAAgB,CAAC,aAAa,CAAC,qBAAqB,MAAM,EAAE,CAAA;QAE3E,OAAO,OAAO,CAAC,GAAG,EAAE;YAClB,MAAM,EAAE,QAAQ;SACjB,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
@@ -1,2 +1,3 @@
1
1
  export interface Settings {
2
+ apiKey: string;
2
3
  }
@@ -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/fullstory/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ export interface Payload {
2
+ userId: string;
3
+ anonymousId?: string;
4
+ displayName?: string;
5
+ email?: string;
6
+ traits?: {
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/fullstory/identifyUser/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { ActionDefinition } from '@segment/actions-core';
2
+ import type { Settings } from '../generated-types';
3
+ declare const action: ActionDefinition<Settings>;
4
+ export default action;