@segment/action-destinations 3.64.0 → 3.65.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.
@@ -1,8 +1,10 @@
1
1
  export interface Payload {
2
- customerProfileId: string;
3
- attributes?: {
4
- [k: string]: unknown;
5
- };
2
+ data: {
3
+ customerProfileId: string;
4
+ attributes?: {
5
+ [k: string]: unknown;
6
+ };
7
+ }[];
6
8
  mutualAttributes?: {
7
9
  [k: string]: unknown;
8
10
  };
@@ -5,20 +5,28 @@ const action = {
5
5
  title: 'Update Multiple Customer Profiles’ Attributes',
6
6
  description: 'This updates attributes for multiple customer profiles.',
7
7
  fields: {
8
- customerProfileId: { ...t1_properties_1.customerProfileId },
9
- attributes: { ...t1_properties_1.attribute },
10
- mutualAttributes: { ...t1_properties_1.attribute }
8
+ data: {
9
+ label: 'Data item to change customer profile attributes',
10
+ description: 'An array of JSON objects that contains customer profile identifier and list of attributes and their values. Customer profile ID is required.',
11
+ type: 'object',
12
+ multiple: true,
13
+ properties: {
14
+ customerProfileId: { ...t1_properties_1.customerProfileId },
15
+ attributes: { ...t1_properties_1.attribute }
16
+ },
17
+ required: true
18
+ },
19
+ mutualAttributes: {
20
+ ...t1_properties_1.attribute,
21
+ label: 'Mutual Attribute-Value pairs',
22
+ description: 'This may contain mutual list of attributes and their values for every customer profile in the "data" array.'
23
+ }
11
24
  },
12
25
  perform: (request, { payload }) => {
13
26
  return request(`https://integration.talon.one/segment/customer_profiles/attributes`, {
14
27
  method: 'put',
15
28
  json: {
16
- data: [
17
- {
18
- customerProfileId: payload.customerProfileId,
19
- attributes: payload.attributes
20
- }
21
- ],
29
+ data: payload.data,
22
30
  mutualAttributes: payload.mutualAttributes
23
31
  }
24
32
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/talon-one/updateCustomerProfilesAttributes/index.ts"],"names":[],"mappings":";;AAGA,oDAA+D;AAE/D,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,+CAA+C;IACtD,WAAW,EAAE,yDAAyD;IACtE,MAAM,EAAE;QACN,iBAAiB,EAAE,EAAE,GAAG,iCAAiB,EAAE;QAC3C,UAAU,EAAE,EAAE,GAAG,yBAAS,EAAE;QAC5B,gBAAgB,EAAE,EAAE,GAAG,yBAAS,EAAE;KACnC;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAEhC,OAAO,OAAO,CAAC,oEAAoE,EAAE;YACnF,MAAM,EAAE,KAAK;YACb,IAAI,EAAE;gBACJ,IAAI,EAAE;oBACJ;wBACE,iBAAiB,EAAE,OAAO,CAAC,iBAAiB;wBAC5C,UAAU,EAAE,OAAO,CAAC,UAAU;qBAC/B;iBACF;gBACD,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;aAC3C;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/talon-one/updateCustomerProfilesAttributes/index.ts"],"names":[],"mappings":";;AAGA,oDAA+D;AAE/D,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,+CAA+C;IACtD,WAAW,EAAE,yDAAyD;IACtE,MAAM,EAAE;QACN,IAAI,EAAE;YACJ,KAAK,EAAE,iDAAiD;YACxD,WAAW,EACT,8IAA8I;YAChJ,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE;gBACV,iBAAiB,EAAE,EAAE,GAAG,iCAAiB,EAAE;gBAC3C,UAAU,EAAE,EAAE,GAAG,yBAAS,EAAE;aAC7B;YACD,QAAQ,EAAE,IAAI;SACf;QACD,gBAAgB,EAAE;YAChB,GAAG,yBAAS;YACZ,KAAK,EAAE,8BAA8B;YACrC,WAAW,EACT,6GAA6G;SAChH;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAEhC,OAAO,OAAO,CAAC,oEAAoE,EAAE;YACnF,MAAM,EAAE,KAAK;YACb,IAAI,EAAE;gBACJ,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;aAC3C;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@segment/action-destinations",
3
3
  "description": "Destination Actions engine and definitions.",
4
- "version": "3.64.0",
4
+ "version": "3.65.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/segmentio/action-destinations",
@@ -62,5 +62,5 @@
62
62
  "<rootDir>/test/setup-after-env.ts"
63
63
  ]
64
64
  },
65
- "gitHead": "4ff4c4a172e3b30c7351b7adc72ff8d3f7d93dec"
65
+ "gitHead": "be5f3f8b4bebfa7c0f0f09912e52cddfeab38270"
66
66
  }