@segment/action-destinations 3.131.1-tiktok-audiences.14 → 3.132.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 (173) hide show
  1. package/dist/destinations/algolia-insights/algolia-insight-api.d.ts +26 -0
  2. package/dist/destinations/algolia-insights/algolia-insight-api.js +8 -0
  3. package/dist/destinations/algolia-insights/algolia-insight-api.js.map +1 -0
  4. package/dist/destinations/algolia-insights/conversionEvents/generated-types.d.ts +9 -0
  5. package/dist/destinations/{tiktok-audiences/addUser → algolia-insights/conversionEvents}/generated-types.js +0 -0
  6. package/dist/destinations/algolia-insights/conversionEvents/generated-types.js.map +1 -0
  7. package/dist/destinations/algolia-insights/conversionEvents/index.d.ts +6 -0
  8. package/dist/destinations/algolia-insights/conversionEvents/index.js +83 -0
  9. package/dist/destinations/algolia-insights/conversionEvents/index.js.map +1 -0
  10. package/dist/destinations/algolia-insights/generated-types.d.ts +4 -0
  11. package/dist/destinations/{tiktok-audiences → algolia-insights}/generated-types.js +0 -0
  12. package/dist/destinations/algolia-insights/generated-types.js.map +1 -0
  13. package/dist/destinations/algolia-insights/index.d.ts +5 -0
  14. package/dist/destinations/algolia-insights/index.js +54 -0
  15. package/dist/destinations/algolia-insights/index.js.map +1 -0
  16. package/dist/destinations/algolia-insights/productClickedEvents/generated-types.d.ts +8 -0
  17. package/dist/destinations/{tiktok-audiences/removeUser → algolia-insights/productClickedEvents}/generated-types.js +0 -0
  18. package/dist/destinations/algolia-insights/productClickedEvents/generated-types.js.map +1 -0
  19. package/dist/destinations/algolia-insights/productClickedEvents/index.d.ts +6 -0
  20. package/dist/destinations/algolia-insights/productClickedEvents/index.js +91 -0
  21. package/dist/destinations/algolia-insights/productClickedEvents/index.js.map +1 -0
  22. package/dist/destinations/algolia-insights/productViewedEvents/generated-types.d.ts +7 -0
  23. package/dist/destinations/algolia-insights/productViewedEvents/generated-types.js +3 -0
  24. package/dist/destinations/algolia-insights/productViewedEvents/generated-types.js.map +1 -0
  25. package/dist/destinations/algolia-insights/productViewedEvents/index.d.ts +6 -0
  26. package/dist/destinations/algolia-insights/productViewedEvents/index.js +81 -0
  27. package/dist/destinations/algolia-insights/productViewedEvents/index.js.map +1 -0
  28. package/dist/destinations/blackbaud-raisers-edge-nxt/api/index.d.ts +20 -0
  29. package/dist/destinations/blackbaud-raisers-edge-nxt/api/index.js +133 -0
  30. package/dist/destinations/blackbaud-raisers-edge-nxt/api/index.js.map +1 -0
  31. package/dist/destinations/blackbaud-raisers-edge-nxt/constants/index.d.ts +2 -0
  32. package/dist/destinations/blackbaud-raisers-edge-nxt/constants/index.js +6 -0
  33. package/dist/destinations/blackbaud-raisers-edge-nxt/constants/index.js.map +1 -0
  34. package/dist/destinations/blackbaud-raisers-edge-nxt/createOrUpdateIndividualConstituent/fixtures.d.ts +80 -0
  35. package/dist/destinations/blackbaud-raisers-edge-nxt/createOrUpdateIndividualConstituent/fixtures.js +151 -0
  36. package/dist/destinations/blackbaud-raisers-edge-nxt/createOrUpdateIndividualConstituent/fixtures.js.map +1 -0
  37. package/dist/destinations/blackbaud-raisers-edge-nxt/createOrUpdateIndividualConstituent/generated-types.d.ts +35 -0
  38. package/dist/destinations/blackbaud-raisers-edge-nxt/createOrUpdateIndividualConstituent/generated-types.js +3 -0
  39. package/dist/destinations/blackbaud-raisers-edge-nxt/createOrUpdateIndividualConstituent/generated-types.js.map +1 -0
  40. package/dist/destinations/{tiktok-audiences/removeUser → blackbaud-raisers-edge-nxt/createOrUpdateIndividualConstituent}/index.d.ts +1 -1
  41. package/dist/destinations/blackbaud-raisers-edge-nxt/createOrUpdateIndividualConstituent/index.js +619 -0
  42. package/dist/destinations/blackbaud-raisers-edge-nxt/createOrUpdateIndividualConstituent/index.js.map +1 -0
  43. package/dist/destinations/blackbaud-raisers-edge-nxt/generated-types.d.ts +3 -0
  44. package/dist/destinations/blackbaud-raisers-edge-nxt/generated-types.js +3 -0
  45. package/dist/destinations/blackbaud-raisers-edge-nxt/generated-types.js.map +1 -0
  46. package/dist/destinations/{tiktok-audiences → blackbaud-raisers-edge-nxt}/index.d.ts +0 -0
  47. package/dist/destinations/blackbaud-raisers-edge-nxt/index.js +53 -0
  48. package/dist/destinations/blackbaud-raisers-edge-nxt/index.js.map +1 -0
  49. package/dist/destinations/blackbaud-raisers-edge-nxt/types/index.d.ts +67 -0
  50. package/dist/destinations/{tiktok-audiences/types.js → blackbaud-raisers-edge-nxt/types/index.js} +1 -1
  51. package/dist/destinations/blackbaud-raisers-edge-nxt/types/index.js.map +1 -0
  52. package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.d.ts +8 -0
  53. package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.js +44 -0
  54. package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.js.map +1 -0
  55. package/dist/destinations/heap/flat.d.ts +1 -2
  56. package/dist/destinations/heap/flat.js +11 -1
  57. package/dist/destinations/heap/flat.js.map +1 -1
  58. package/dist/destinations/heap/heapUtils.d.ts +8 -0
  59. package/dist/destinations/heap/heapUtils.js +41 -0
  60. package/dist/destinations/heap/heapUtils.js.map +1 -0
  61. package/dist/destinations/heap/trackEvent/generated-types.d.ts +0 -1
  62. package/dist/destinations/heap/trackEvent/index.js +18 -54
  63. package/dist/destinations/heap/trackEvent/index.js.map +1 -1
  64. package/dist/destinations/index.js +6 -1
  65. package/dist/destinations/index.js.map +1 -1
  66. package/dist/destinations/launchpad/generated-types.d.ts +5 -0
  67. package/dist/destinations/launchpad/generated-types.js +3 -0
  68. package/dist/destinations/launchpad/generated-types.js.map +1 -0
  69. package/dist/destinations/launchpad/groupIdentifyUser/generated-types.d.ts +9 -0
  70. package/dist/destinations/launchpad/groupIdentifyUser/generated-types.js +3 -0
  71. package/dist/destinations/launchpad/groupIdentifyUser/generated-types.js.map +1 -0
  72. package/dist/destinations/launchpad/groupIdentifyUser/index.d.ts +5 -0
  73. package/dist/destinations/launchpad/groupIdentifyUser/index.js +79 -0
  74. package/dist/destinations/launchpad/groupIdentifyUser/index.js.map +1 -0
  75. package/dist/destinations/launchpad/identifyUser/generated-types.d.ts +8 -0
  76. package/dist/destinations/launchpad/identifyUser/generated-types.js +3 -0
  77. package/dist/destinations/launchpad/identifyUser/generated-types.js.map +1 -0
  78. package/dist/destinations/launchpad/identifyUser/index.d.ts +5 -0
  79. package/dist/destinations/launchpad/identifyUser/index.js +79 -0
  80. package/dist/destinations/launchpad/identifyUser/index.js.map +1 -0
  81. package/dist/destinations/launchpad/index.d.ts +4 -0
  82. package/dist/destinations/launchpad/index.js +96 -0
  83. package/dist/destinations/launchpad/index.js.map +1 -0
  84. package/dist/destinations/launchpad/launchpad-types.d.ts +28 -0
  85. package/dist/destinations/launchpad/launchpad-types.js +3 -0
  86. package/dist/destinations/launchpad/launchpad-types.js.map +1 -0
  87. package/dist/destinations/launchpad/trackEvent/generated-types.d.ts +18 -0
  88. package/dist/destinations/launchpad/trackEvent/generated-types.js +3 -0
  89. package/dist/destinations/launchpad/trackEvent/generated-types.js.map +1 -0
  90. package/dist/destinations/launchpad/trackEvent/index.d.ts +5 -0
  91. package/dist/destinations/launchpad/trackEvent/index.js +62 -0
  92. package/dist/destinations/launchpad/trackEvent/index.js.map +1 -0
  93. package/dist/destinations/launchpad/trackEvent/launchpad-properties.d.ts +2 -0
  94. package/dist/destinations/launchpad/trackEvent/launchpad-properties.js +87 -0
  95. package/dist/destinations/launchpad/trackEvent/launchpad-properties.js.map +1 -0
  96. package/dist/destinations/launchpad/utils.d.ts +6 -0
  97. package/dist/destinations/launchpad/utils.js +20 -0
  98. package/dist/destinations/launchpad/utils.js.map +1 -0
  99. package/dist/destinations/livelike-cloud/generated-types.d.ts +4 -0
  100. package/dist/destinations/livelike-cloud/generated-types.js +3 -0
  101. package/dist/destinations/livelike-cloud/generated-types.js.map +1 -0
  102. package/dist/destinations/livelike-cloud/index.d.ts +4 -0
  103. package/dist/destinations/livelike-cloud/index.js +84 -0
  104. package/dist/destinations/livelike-cloud/index.js.map +1 -0
  105. package/dist/destinations/livelike-cloud/properties.d.ts +1 -0
  106. package/dist/destinations/livelike-cloud/properties.js +5 -0
  107. package/dist/destinations/livelike-cloud/properties.js.map +1 -0
  108. package/dist/destinations/livelike-cloud/trackEvent/generated-types.d.ts +11 -0
  109. package/dist/destinations/livelike-cloud/trackEvent/generated-types.js +3 -0
  110. package/dist/destinations/livelike-cloud/trackEvent/generated-types.js.map +1 -0
  111. package/dist/destinations/livelike-cloud/trackEvent/index.d.ts +5 -0
  112. package/dist/destinations/livelike-cloud/trackEvent/index.js +101 -0
  113. package/dist/destinations/livelike-cloud/trackEvent/index.js.map +1 -0
  114. package/dist/destinations/pinterest-conversions/generated-types.d.ts +4 -0
  115. package/dist/destinations/pinterest-conversions/generated-types.js +3 -0
  116. package/dist/destinations/pinterest-conversions/generated-types.js.map +1 -0
  117. package/dist/destinations/pinterest-conversions/index.d.ts +4 -0
  118. package/dist/destinations/pinterest-conversions/index.js +35 -0
  119. package/dist/destinations/pinterest-conversions/index.js.map +1 -0
  120. package/dist/destinations/pinterest-conversions/reportConversionEvent/generated-types.d.ts +2 -0
  121. package/dist/destinations/pinterest-conversions/reportConversionEvent/generated-types.js +3 -0
  122. package/dist/destinations/pinterest-conversions/reportConversionEvent/generated-types.js.map +1 -0
  123. package/dist/destinations/{tiktok-audiences/addUser → pinterest-conversions/reportConversionEvent}/index.d.ts +0 -0
  124. package/dist/destinations/pinterest-conversions/reportConversionEvent/index.js +11 -0
  125. package/dist/destinations/pinterest-conversions/reportConversionEvent/index.js.map +1 -0
  126. package/dist/destinations/twilio-studio/generated-types.d.ts +6 -0
  127. package/dist/destinations/twilio-studio/generated-types.js +3 -0
  128. package/dist/destinations/twilio-studio/generated-types.js.map +1 -0
  129. package/dist/destinations/twilio-studio/index.d.ts +4 -0
  130. package/dist/destinations/twilio-studio/index.js +55 -0
  131. package/dist/destinations/twilio-studio/index.js.map +1 -0
  132. package/dist/destinations/twilio-studio/triggerStudioFlow/generated-types.d.ts +8 -0
  133. package/dist/destinations/twilio-studio/triggerStudioFlow/generated-types.js +3 -0
  134. package/dist/destinations/twilio-studio/triggerStudioFlow/generated-types.js.map +1 -0
  135. package/dist/destinations/twilio-studio/triggerStudioFlow/index.d.ts +5 -0
  136. package/dist/destinations/twilio-studio/triggerStudioFlow/index.js +84 -0
  137. package/dist/destinations/twilio-studio/triggerStudioFlow/index.js.map +1 -0
  138. package/dist/destinations/twilio-studio/utils.d.ts +29 -0
  139. package/dist/destinations/twilio-studio/utils.js +43 -0
  140. package/dist/destinations/twilio-studio/utils.js.map +1 -0
  141. package/dist/destinations/vwo/identifyUser/index.js +6 -6
  142. package/dist/destinations/vwo/identifyUser/index.js.map +1 -1
  143. package/dist/destinations/vwo/index.js +1 -1
  144. package/dist/destinations/vwo/index.js.map +1 -1
  145. package/dist/destinations/vwo/pageVisit/index.js +6 -6
  146. package/dist/destinations/vwo/pageVisit/index.js.map +1 -1
  147. package/dist/destinations/vwo/trackEvent/index.js +7 -7
  148. package/dist/destinations/vwo/trackEvent/index.js.map +1 -1
  149. package/dist/destinations/vwo/utility.js +2 -2
  150. package/package.json +4 -4
  151. package/dist/destinations/tiktok-audiences/addUser/generated-types.d.ts +0 -9
  152. package/dist/destinations/tiktok-audiences/addUser/generated-types.js.map +0 -1
  153. package/dist/destinations/tiktok-audiences/addUser/index.js +0 -88
  154. package/dist/destinations/tiktok-audiences/addUser/index.js.map +0 -1
  155. package/dist/destinations/tiktok-audiences/api/index.d.ts +0 -11
  156. package/dist/destinations/tiktok-audiences/api/index.js +0 -38
  157. package/dist/destinations/tiktok-audiences/api/index.js.map +0 -1
  158. package/dist/destinations/tiktok-audiences/constants.d.ts +0 -2
  159. package/dist/destinations/tiktok-audiences/constants.js +0 -6
  160. package/dist/destinations/tiktok-audiences/constants.js.map +0 -1
  161. package/dist/destinations/tiktok-audiences/functions.d.ts +0 -8
  162. package/dist/destinations/tiktok-audiences/functions.js +0 -72
  163. package/dist/destinations/tiktok-audiences/functions.js.map +0 -1
  164. package/dist/destinations/tiktok-audiences/generated-types.d.ts +0 -3
  165. package/dist/destinations/tiktok-audiences/generated-types.js.map +0 -1
  166. package/dist/destinations/tiktok-audiences/index.js +0 -37
  167. package/dist/destinations/tiktok-audiences/index.js.map +0 -1
  168. package/dist/destinations/tiktok-audiences/removeUser/generated-types.d.ts +0 -9
  169. package/dist/destinations/tiktok-audiences/removeUser/generated-types.js.map +0 -1
  170. package/dist/destinations/tiktok-audiences/removeUser/index.js +0 -88
  171. package/dist/destinations/tiktok-audiences/removeUser/index.js.map +0 -1
  172. package/dist/destinations/tiktok-audiences/types.d.ts +0 -33
  173. package/dist/destinations/tiktok-audiences/types.js.map +0 -1
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const utility_1 = require("../utility");
4
4
  const action = {
5
5
  title: 'Track Event',
6
- description: 'Sends track events to VWO',
6
+ description: `Sends Segment's track event to VWO`,
7
7
  defaultSubscription: 'type = "track"',
8
8
  fields: {
9
9
  name: {
10
- description: 'The name of the event.',
10
+ description: 'Name of the event',
11
11
  label: 'Name',
12
12
  required: true,
13
13
  type: 'string',
@@ -16,7 +16,7 @@ const action = {
16
16
  }
17
17
  },
18
18
  properties: {
19
- description: 'A JSON object containing additional properties that will be associated with the event.',
19
+ description: 'JSON object containing additional properties that will be associated with the event.',
20
20
  label: 'Properties',
21
21
  required: false,
22
22
  type: 'object',
@@ -34,7 +34,7 @@ const action = {
34
34
  }
35
35
  },
36
36
  page: {
37
- description: 'Page Context',
37
+ description: 'Contains context information regarding a webpage',
38
38
  label: 'Page',
39
39
  required: true,
40
40
  type: 'object',
@@ -43,7 +43,7 @@ const action = {
43
43
  }
44
44
  },
45
45
  ip: {
46
- description: 'IP Address',
46
+ description: 'IP address of the user',
47
47
  label: 'IP Address',
48
48
  required: false,
49
49
  type: 'string',
@@ -52,7 +52,7 @@ const action = {
52
52
  }
53
53
  },
54
54
  userAgent: {
55
- description: 'User Agent',
55
+ description: 'User-Agent of the user',
56
56
  label: 'User Agent',
57
57
  required: true,
58
58
  type: 'string',
@@ -61,7 +61,7 @@ const action = {
61
61
  }
62
62
  },
63
63
  timestamp: {
64
- description: 'Timestamp',
64
+ description: 'Timestamp on the event',
65
65
  label: 'Timestamp',
66
66
  required: true,
67
67
  type: 'string',
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/vwo/trackEvent/index.ts"],"names":[],"mappings":";;AAGA,wCAA6D;AAE7D,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,2BAA2B;IACxC,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,IAAI,EAAE;YACJ,WAAW,EAAE,wBAAwB;YACrC,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,SAAS;aACnB;SACF;QACD,UAAU,EAAE;YACV,WAAW,EAAE,wFAAwF;YACrG,KAAK,EAAE,YAAY;YACnB,QAAQ,EAAE,KAAK;YACf,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,cAAc;aACxB;SACF;QACD,OAAO,EAAE;YACP,WAAW,EAAE,UAAU;YACvB,KAAK,EAAE,UAAU;YACjB,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,uBAAuB;aACjC;SACF;QACD,IAAI,EAAE;YACJ,WAAW,EAAE,cAAc;YAC3B,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,gBAAgB;aAC1B;SACF;QACD,EAAE,EAAE;YACF,WAAW,EAAE,YAAY;YACzB,KAAK,EAAE,YAAY;YACnB,QAAQ,EAAE,KAAK;YACf,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;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AO,EAAE,EAAE,EAAE;QAC1C,MAAM,kBAAkB,GAAG,2BAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;QAC1D,MAAM,EAAE,OAAO,EAAE,iBAAiB,EAAE,GAAG,uBAAa,CAAC,kBAAkB,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;QAC7F,iBAAiB,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAA;QAChE,MAAM,QAAQ,GAAG,sDAAsD,kBAAkB,MAAM,QAAQ,CAAC,YAAY,EAAE,CAAA;QACtH,OAAO,OAAO,CAAC,QAAQ,EAAE;YACvB,MAAM,EAAE,MAAM;YACd,OAAO;YACP,IAAI,EAAE,iBAAiB;SACxB,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -45,13 +45,13 @@ function formatPayload(name, payload, isCustomEvent, isTrack = false) {
45
45
  }
46
46
  exports.formatPayload = formatPayload;
47
47
  function sanitiseEventName(name) {
48
- return 'segment_' + name;
48
+ return 'segment.' + name;
49
49
  }
50
50
  exports.sanitiseEventName = sanitiseEventName;
51
51
  function formatAttributes(attributes) {
52
52
  const formattedAttributes = {};
53
53
  for (const key in attributes) {
54
- formattedAttributes[`segment_${key}`] = attributes[key];
54
+ formattedAttributes[`segment.${key}`] = attributes[key];
55
55
  }
56
56
  return formattedAttributes;
57
57
  }
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.131.1-tiktok-audiences.14+923d2c172",
4
+ "version": "3.132.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/segmentio/action-destinations",
@@ -39,8 +39,8 @@
39
39
  "dependencies": {
40
40
  "@amplitude/ua-parser-js": "^0.7.25",
41
41
  "@segment/a1-notation": "^2.1.4",
42
- "@segment/actions-core": "^3.51.0",
43
- "@segment/actions-shared": "^1.33.0",
42
+ "@segment/actions-core": "^3.52.0",
43
+ "@segment/actions-shared": "^1.34.0",
44
44
  "@types/node": "^18.11.15",
45
45
  "cheerio": "^1.0.0-rc.10",
46
46
  "dayjs": "^1.10.7",
@@ -68,5 +68,5 @@
68
68
  "lcov"
69
69
  ]
70
70
  },
71
- "gitHead": "923d2c172edecf6d9190b1aac6f3d9f3038ab4e0"
71
+ "gitHead": "b057e9e882022cd1f1f7926aa495acc24c3d5c47"
72
72
  }
@@ -1,9 +0,0 @@
1
- export interface Payload {
2
- custom_audience_name?: string;
3
- id_type?: string;
4
- email?: string;
5
- google_advertising_id?: string;
6
- event_name?: string;
7
- enable_batching?: boolean;
8
- personas_audience_key?: string;
9
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/tiktok-audiences/addUser/generated-types.ts"],"names":[],"mappings":""}
@@ -1,88 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const api_1 = require("../api");
4
- const functions_1 = require("../functions");
5
- const action = {
6
- title: 'Add Users to Audience',
7
- description: 'Sync contacts from an Engage Audience to a TikTok Audience Segment.',
8
- defaultSubscription: 'event = "Audience Entered"',
9
- fields: {
10
- custom_audience_name: {
11
- label: 'Custom Audience Name',
12
- description: 'Custom audience name of audience to be created. Please note that names over 70 characters will be truncated to 67 characters with "..." appended. This field is set only when Segment creates a new audience. Updating this field after Segment has created an audience will not update the audience name in TikTok.',
13
- type: 'string',
14
- default: {
15
- '@path': '$.properties.audience_key'
16
- }
17
- },
18
- id_type: {
19
- label: 'ID Type',
20
- description: 'Encryption type to be used for populating the audience.',
21
- type: 'string',
22
- choices: [
23
- { label: 'Email', value: 'EMAIL_SHA256' },
24
- { label: 'Google Advertising ID', value: 'GAID_SHA256' }
25
- ]
26
- },
27
- email: {
28
- label: 'User Email',
29
- description: "The user's email address to send to LinkedIn.",
30
- type: 'hidden',
31
- default: {
32
- '@path': '$.context.traits.email'
33
- }
34
- },
35
- google_advertising_id: {
36
- label: 'User Google Advertising ID',
37
- description: "The user's Google Advertising ID to send to LinkedIn.",
38
- type: 'hidden',
39
- default: {
40
- '@path': '$.context.device.advertisingId'
41
- }
42
- },
43
- event_name: {
44
- label: 'Event Name',
45
- description: 'The name of the current Segment event.',
46
- type: 'hidden',
47
- default: {
48
- '@path': '$.event'
49
- }
50
- },
51
- enable_batching: {
52
- label: 'Enable Batching',
53
- description: 'Enable batching of requests to the TikTok Audiences.',
54
- type: 'boolean',
55
- default: true
56
- },
57
- personas_audience_key: {
58
- label: 'Segment Engage Audience Key',
59
- description: 'The `audience_key` of the Engage audience you want to sync to TikTok. This value must be a hard-coded string variable, e.g. `personas_test_audience`, in order for batching to work properly.',
60
- type: 'string'
61
- }
62
- },
63
- perform: async (request, { settings, payload }) => {
64
- return processPayload(request, settings, [payload]);
65
- },
66
- performBatch: async (request, { settings, payload }) => {
67
- return processPayload(request, settings, payload);
68
- }
69
- };
70
- async function processPayload(request, settings, payloads) {
71
- functions_1.validate(payloads);
72
- const TikTokApiClient = new api_1.TikTokAudiences(request);
73
- const audiences = await functions_1.getAllAudiences(TikTokApiClient, settings);
74
- const audience_id = await functions_1.getAudienceID(TikTokApiClient, settings, payloads[0], audiences);
75
- const users = functions_1.extractUsers(payloads, audience_id);
76
- let res;
77
- if (users.length > 0) {
78
- const elements = {
79
- advertiser_ids: [settings.advertiser_id],
80
- action: 'add',
81
- data: users
82
- };
83
- res = await TikTokApiClient.batchUpdate(elements);
84
- }
85
- return res;
86
- }
87
- exports.default = action;
88
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/tiktok-audiences/addUser/index.ts"],"names":[],"mappings":";;AAEA,gCAAwC;AAGxC,4CAAqF;AAErF,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,uBAAuB;IAC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AAc,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAA;IACrD,CAAC;IACD,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QACrD,OAAO,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;IACnD,CAAC;CACF,CAAA;AAED,KAAK,UAAU,cAAc,CAAC,OAAsB,EAAE,QAAkB,EAAE,QAAmB;IAC3F,oBAAQ,CAAC,QAAQ,CAAC,CAAA;IAClB,MAAM,eAAe,GAAoB,IAAI,qBAAe,CAAC,OAAO,CAAC,CAAA;IAErE,MAAM,SAAS,GAAG,MAAM,2BAAe,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAA;IAElE,MAAM,WAAW,GAAG,MAAM,yBAAa,CAAC,eAAe,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;IAE1F,MAAM,KAAK,GAAG,wBAAY,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAA;IAEjD,IAAI,GAAG,CAAA;IACP,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;QACpB,MAAM,QAAQ,GAAG;YACf,cAAc,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC;YACxC,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,KAAK;SACZ,CAAA;QACD,GAAG,GAAG,MAAM,eAAe,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;KAClD;IAED,OAAO,GAAG,CAAA;AACZ,CAAC;AAED,kBAAe,MAAM,CAAA"}
@@ -1,11 +0,0 @@
1
- import type { RequestClient, ModifiedResponse } from '@segment/actions-core';
2
- import type { Settings } from '../generated-types';
3
- import type { Payload } from '../addUser/generated-types';
4
- import type { GetAudienceAPIResponse, CreateAudienceAPIResponse } from '../types';
5
- export declare class TikTokAudiences {
6
- request: RequestClient;
7
- constructor(request: RequestClient);
8
- getAudiences(settings: Settings, page_number: number, page_size: number): Promise<ModifiedResponse<GetAudienceAPIResponse>>;
9
- createAudience(settings: Settings, payload: Payload): Promise<ModifiedResponse<CreateAudienceAPIResponse>>;
10
- batchUpdate(elements: {}): Promise<ModifiedResponse>;
11
- }
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TikTokAudiences = void 0;
4
- const constants_1 = require("../constants");
5
- class TikTokAudiences {
6
- constructor(request) {
7
- this.request = request;
8
- }
9
- async getAudiences(settings, page_number, page_size) {
10
- return this.request(`${constants_1.BASE_URL}${constants_1.TIKTOK_API_VERSION}/dmp/custom_audience/list/`, {
11
- method: 'GET',
12
- searchParams: {
13
- advertiser_id: settings.advertiser_id,
14
- page: page_number,
15
- page_size: page_size
16
- }
17
- });
18
- }
19
- async createAudience(settings, payload) {
20
- return this.request(`${constants_1.BASE_URL}${constants_1.TIKTOK_API_VERSION}/segment/audience/`, {
21
- method: 'POST',
22
- json: {
23
- custom_audience_name: payload.custom_audience_name,
24
- advertiser_id: settings.advertiser_id,
25
- id_type: payload.id_type,
26
- action: 'create'
27
- }
28
- });
29
- }
30
- async batchUpdate(elements) {
31
- return this.request(`${constants_1.BASE_URL}${constants_1.TIKTOK_API_VERSION}/segment/mapping/`, {
32
- method: 'POST',
33
- json: elements
34
- });
35
- }
36
- }
37
- exports.TikTokAudiences = TikTokAudiences;
38
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/tiktok-audiences/api/index.ts"],"names":[],"mappings":";;;AAGA,4CAA2D;AAG3D,MAAa,eAAe;IAG1B,YAAY,OAAsB;QAChC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;IAED,KAAK,CAAC,YAAY,CAChB,QAAkB,EAClB,WAAmB,EACnB,SAAiB;QAEjB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,oBAAQ,GAAG,8BAAkB,4BAA4B,EAAE;YAChF,MAAM,EAAE,KAAK;YACb,YAAY,EAAE;gBACZ,aAAa,EAAE,QAAQ,CAAC,aAAa;gBACrC,IAAI,EAAE,WAAW;gBACjB,SAAS,EAAE,SAAS;aACrB;SACF,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,QAAkB,EAAE,OAAgB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,oBAAQ,GAAG,8BAAkB,oBAAoB,EAAE;YACxE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;gBAClD,aAAa,EAAE,QAAQ,CAAC,aAAa;gBACrC,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,MAAM,EAAE,QAAQ;aACjB;SACF,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,QAAY;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,oBAAQ,GAAG,8BAAkB,mBAAmB,EAAE;YACvE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,QAAQ;SACf,CAAC,CAAA;IACJ,CAAC;CACF;AAxCD,0CAwCC"}
@@ -1,2 +0,0 @@
1
- export declare const TIKTOK_API_VERSION = "v1.3";
2
- export declare const BASE_URL = "https://business-api.tiktok.com/open_api/";
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BASE_URL = exports.TIKTOK_API_VERSION = void 0;
4
- exports.TIKTOK_API_VERSION = 'v1.3';
5
- exports.BASE_URL = 'https://business-api.tiktok.com/open_api/';
6
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/destinations/tiktok-audiences/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG,MAAM,CAAA;AAC3B,QAAA,QAAQ,GAAG,2CAA2C,CAAA"}
@@ -1,8 +0,0 @@
1
- import { Audiences } from './types';
2
- import { TikTokAudiences } from './api';
3
- import type { Settings } from './generated-types';
4
- import { Payload } from './addUser/generated-types';
5
- export declare function validate(payloads: Payload[]): void;
6
- export declare function getAllAudiences(TikTokApiClient: TikTokAudiences, settings: Settings): Promise<Audiences[]>;
7
- export declare function getAudienceID(TikTokApiClient: TikTokAudiences, settings: Settings, payload: Payload, audiences: Audiences[]): Promise<string>;
8
- export declare function extractUsers(payloads: Payload[], audienceID: string): {}[];
@@ -1,72 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.extractUsers = exports.getAudienceID = exports.getAllAudiences = exports.validate = void 0;
4
- const actions_core_1 = require("@segment/actions-core");
5
- const crypto_1 = require("crypto");
6
- function validate(payloads) {
7
- if (payloads[0].custom_audience_name !== payloads[0].personas_audience_key) {
8
- throw new actions_core_1.IntegrationError('The value of `custom_audience_name` and `personas_audience_key` must match.', 'INVALID_SETTINGS', 400);
9
- }
10
- }
11
- exports.validate = validate;
12
- async function getAllAudiences(TikTokApiClient, settings) {
13
- let response = await TikTokApiClient.getAudiences(settings, 1, 100);
14
- let audiences = response.data.data.list;
15
- const total_number_audiences = response.data.data.page_info.total_number;
16
- let recieved_audiences = 100;
17
- let page_number = 2;
18
- while (recieved_audiences < total_number_audiences) {
19
- response = await TikTokApiClient.getAudiences(settings, page_number, 100);
20
- audiences = audiences.concat(response.data.data.list);
21
- page_number += 1;
22
- recieved_audiences += 100;
23
- }
24
- return audiences;
25
- }
26
- exports.getAllAudiences = getAllAudiences;
27
- async function getAudienceID(TikTokApiClient, settings, payload, audiences) {
28
- let audienceID;
29
- const audienceExists = audiences.filter(function (audience) {
30
- if (audience.name === payload.custom_audience_name) {
31
- return audience.audience_id;
32
- }
33
- });
34
- if (audienceExists.length > 1) {
35
- throw new actions_core_1.IntegrationError('Multiple audiences found with the same name', 'INVALID_SETTINGS', 400);
36
- }
37
- if (audienceExists.length == 1) {
38
- audienceID = audienceExists[0].audience_id;
39
- }
40
- else {
41
- const response = await TikTokApiClient.createAudience(settings, payload);
42
- audienceID = response.data.data.audience_id;
43
- }
44
- return audienceID;
45
- }
46
- exports.getAudienceID = getAudienceID;
47
- function extractUsers(payloads, audienceID) {
48
- const data = [];
49
- payloads.forEach((payload) => {
50
- if (!payload.email && !payload.google_advertising_id) {
51
- return;
52
- }
53
- if (payload.id_type == 'EMAIL_SHA256' && payload.email) {
54
- payload.email = payload.email.replace(/\+.*@/, '@').replace(/\./g, '').toLowerCase();
55
- data.push({
56
- id_type: 'EMAIL_SHA256',
57
- id: crypto_1.createHash('sha256').update(payload.email).digest('hex'),
58
- audience_ids: [audienceID]
59
- });
60
- }
61
- if (payload.id_type == 'GAID_SHA256' && payload.google_advertising_id) {
62
- data.push({
63
- id_type: 'GAID_SHA256',
64
- id: crypto_1.createHash('sha256').update(payload.google_advertising_id).digest('hex'),
65
- audience_ids: [audienceID]
66
- });
67
- }
68
- });
69
- return data;
70
- }
71
- exports.extractUsers = extractUsers;
72
- //# sourceMappingURL=functions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../src/destinations/tiktok-audiences/functions.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AAExD,mCAAmC;AAKnC,SAAgB,QAAQ,CAAC,QAAmB;IAC1C,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,oBAAoB,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,qBAAqB,EAAE;QAC1E,MAAM,IAAI,+BAAgB,CACxB,6EAA6E,EAC7E,kBAAkB,EAClB,GAAG,CACJ,CAAA;KACF;AACH,CAAC;AARD,4BAQC;AAOM,KAAK,UAAU,eAAe,CAAC,eAAgC,EAAE,QAAkB;IACxF,IAAI,QAAQ,GAAG,MAAM,eAAe,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,EAAE,GAAG,CAAC,CAAA;IACnE,IAAI,SAAS,GAAgB,QAAQ,C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- {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/tiktok-audiences/generated-types.ts"],"names":[],"mappings":""}
@@ -1,37 +0,0 @@
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 addUser_1 = __importDefault(require("./addUser"));
7
- const removeUser_1 = __importDefault(require("./removeUser"));
8
- const destination = {
9
- name: 'TikTok Audiences',
10
- slug: 'actions-tiktok-audiences',
11
- mode: 'cloud',
12
- authentication: {
13
- scheme: 'oauth2',
14
- fields: {
15
- advertiser_id: {
16
- label: 'TikTok Advertiser ID',
17
- description: 'The Advertiser ID where audiences should be synced.',
18
- type: 'string',
19
- required: true
20
- }
21
- }
22
- },
23
- extendRequest({ auth }) {
24
- return {
25
- headers: {
26
- 'Access-Token': `${auth?.accessToken}`,
27
- 'Content-Type': 'application/json'
28
- }
29
- };
30
- },
31
- actions: {
32
- addUser: addUser_1.default,
33
- removeUser: removeUser_1.default
34
- }
35
- };
36
- exports.default = destination;
37
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/tiktok-audiences/index.ts"],"names":[],"mappings":";;;;;AAGA,wDAA+B;AAC/B,8DAAqC;AAErC,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE,0BAA0B;IAChC,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,aAAa,EAAE;gBACb,KAAK,EAAE,sBAAsB;gBAC7B,WAAW,EAAE,qDAAqD;gBAClE,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;KASF;IACD,aAAa,CAAC,EAAE,IAAI,EAAE;QACpB,OAAO;YACL,OAAO,EAAE;gBACP,cAAc,EAAE,GAAG,IAAI,EAAE,WAAW,EAAE;gBACtC,cAAc,EAAE,kBAAkB;aACnC;SACF,CAAA;IACH,CAAC;IAED,OAAO,EAAE;QACP,OAAO,EAAP,iBAAO;QACP,UAAU,EAAV,oBAAU;KACX;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
@@ -1,9 +0,0 @@
1
- export interface Payload {
2
- custom_audience_name?: string;
3
- id_type?: string;
4
- email?: string;
5
- google_advertising_id?: string;
6
- event_name?: string;
7
- enable_batching?: boolean;
8
- personas_audience_key?: string;
9
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/tiktok-audiences/removeUser/generated-types.ts"],"names":[],"mappings":""}
@@ -1,88 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const api_1 = require("../api");
4
- const functions_1 = require("../functions");
5
- const action = {
6
- title: 'Remove Users from Audience',
7
- description: 'Sync contacts from an Engage Audience to a TikTok Audience Segment.',
8
- defaultSubscription: 'event = "Audience Entered" or event = "Audience Exited"',
9
- fields: {
10
- custom_audience_name: {
11
- label: 'Custom Audience Name',
12
- description: 'Custom audience name of audience to be created. Please note that names over 70 characters will be truncated to 67 characters with "..." appended. This field is set only when Segment creates a new audience. Updating this field after Segment has created an audience will not update the audience name in TikTok.',
13
- type: 'string',
14
- default: {
15
- '@path': '$.properties.audience_key'
16
- }
17
- },
18
- id_type: {
19
- label: 'ID Type',
20
- description: 'Encryption type to be used for populating the audience.',
21
- type: 'string',
22
- choices: [
23
- { label: 'Email', value: 'EMAIL_SHA256' },
24
- { label: 'Google Advertising ID', value: 'GAID_SHA256' }
25
- ]
26
- },
27
- email: {
28
- label: 'User Email',
29
- description: "The user's email address to send to LinkedIn.",
30
- type: 'hidden',
31
- default: {
32
- '@path': '$.context.traits.email'
33
- }
34
- },
35
- google_advertising_id: {
36
- label: 'User Google Advertising ID',
37
- description: "The user's Google Advertising ID to send to LinkedIn.",
38
- type: 'hidden',
39
- default: {
40
- '@path': '$.context.device.advertisingId'
41
- }
42
- },
43
- event_name: {
44
- label: 'Event Name',
45
- description: 'The name of the current Segment event.',
46
- type: 'hidden',
47
- default: {
48
- '@path': '$.event'
49
- }
50
- },
51
- enable_batching: {
52
- label: 'Enable Batching',
53
- description: 'Enable batching of requests to the TikTok Audiences.',
54
- type: 'boolean',
55
- default: true
56
- },
57
- personas_audience_key: {
58
- label: 'Segment Engage Audience Key',
59
- description: 'The `audience_key` of the Engage audience you want to sync to TikTok. This value must be a hard-coded string variable, e.g. `personas_test_audience`, in order for batching to work properly.',
60
- type: 'string'
61
- }
62
- },
63
- perform: async (request, { settings, payload }) => {
64
- return processPayload(request, settings, [payload]);
65
- },
66
- performBatch: async (request, { settings, payload }) => {
67
- return processPayload(request, settings, payload);
68
- }
69
- };
70
- async function processPayload(request, settings, payloads) {
71
- functions_1.validate(payloads);
72
- const TikTokApiClient = new api_1.TikTokAudiences(request);
73
- const audiences = await functions_1.getAllAudiences(TikTokApiClient, settings);
74
- const audience_id = await functions_1.getAudienceID(TikTokApiClient, settings, payloads[0], audiences);
75
- const users = functions_1.extractUsers(payloads, audience_id);
76
- let res;
77
- if (users.length > 0) {
78
- const elements = {
79
- advertiser_ids: [settings.advertiser_id],
80
- action: 'delete',
81
- data: users
82
- };
83
- res = await TikTokApiClient.batchUpdate(elements);
84
- }
85
- return res;
86
- }
87
- exports.default = action;
88
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/tiktok-audiences/removeUser/index.ts"],"names":[],"mappings":";;AAEA,gCAAwC;AAGxC,4CAAqF;AAErF,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,4BAA4B;IACnC,WAAW,EAAE,qEAAqE;IAClF,mBAAmB,EAAE,yDAAyD;IAC9E,MAAM,EAAE;QACN,oBAAoB,EAAE;YACpB,KAAK,EAAE,sBAAsB;YAC7B,WAAW,EACT,sTAAsT;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,EAAE,EAAE,EAAE;QACrD,OAAO,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;IACnD,CAAC;CACF,CAAA;AAED,KAAK,UAAU,cAAc,CAAC,OAAsB,EAAE,QAAkB,EAAE,QAAmB;IAC3F,oBAAQ,CAAC,QAAQ,CAAC,CAAA;IAClB,MAAM,eAAe,GAAoB,IAAI,qBAAe,CAAC,OAAO,CAAC,CAAA;IAErE,MAAM,SAAS,GAAG,MAAM,2BAAe,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAA;IAElE,MAAM,WAAW,GAAG,MAAM,yBAAa,CAAC,eAAe,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;IAE1F,MAAM,KAAK,GAAG,wBAAY,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAA;IAEjD,IAAI,GAAG,CAAA;IACP,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;QACpB,MAAM,QAAQ,GAAG;YACf,cAAc,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC;YACxC,MAAM,EAAE,QAAQ;YAChB,IAAI,EAAE,KAAK;SACZ,CAAA;QACD,GAAG,GAAG,MAAM,eAAe,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;KAClD;IAED,OAAO,GAAG,CAAA;AACZ,CAAC;AAED,kBAAe,MAAM,CAAA"}
@@ -1,33 +0,0 @@
1
- export interface APIResponse {
2
- code: number;
3
- message: string;
4
- request_id: string;
5
- }
6
- export interface GetAudienceAPIResponse extends APIResponse {
7
- data: {
8
- page_info: {
9
- page: number;
10
- total_page: number;
11
- total_number: number;
12
- page_size: number;
13
- };
14
- list: [Audiences];
15
- };
16
- }
17
- export interface CreateAudienceAPIResponse extends APIResponse {
18
- data: {
19
- audience_id: string;
20
- };
21
- }
22
- export interface Audiences {
23
- is_expiring: boolean;
24
- cover_num: number;
25
- name: string;
26
- audience_id: string;
27
- audience_type: string;
28
- is_valid: boolean;
29
- create_time: string;
30
- shared: boolean;
31
- expired_time: string;
32
- calculate_type: string;
33
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/destinations/tiktok-audiences/types.ts"],"names":[],"mappings":""}