@segment/action-destinations 3.221.0-staging.0 → 3.221.1-080fa7b.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 (138) hide show
  1. package/dist/destinations/ambee/subscribeUserToCampaign/index.js +4 -2
  2. package/dist/destinations/ambee/subscribeUserToCampaign/index.js.map +1 -1
  3. package/dist/destinations/braze-cohorts/syncAudiences/index.js +6 -3
  4. package/dist/destinations/braze-cohorts/syncAudiences/index.js.map +1 -1
  5. package/dist/destinations/cordial/identities-fields.d.ts +1 -1
  6. package/dist/destinations/cordial/identities-fields.js +5 -3
  7. package/dist/destinations/cordial/identities-fields.js.map +1 -1
  8. package/dist/destinations/dynamic-yield-audiences/syncAudience/index.js +10 -5
  9. package/dist/destinations/dynamic-yield-audiences/syncAudience/index.js.map +1 -1
  10. package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js +0 -1
  11. package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js.map +1 -1
  12. package/dist/destinations/google-sheets/postSheet/index.js +2 -1
  13. package/dist/destinations/google-sheets/postSheet/index.js.map +1 -1
  14. package/dist/destinations/hubspot/upsertContact/index.d.ts +1 -1
  15. package/dist/destinations/hubspot/upsertContact/index.js +28 -8
  16. package/dist/destinations/hubspot/upsertContact/index.js.map +1 -1
  17. package/dist/destinations/index.js +2 -2
  18. package/dist/destinations/index.js.map +1 -1
  19. package/dist/destinations/klaviyo/index.js +5 -9
  20. package/dist/destinations/klaviyo/index.js.map +1 -1
  21. package/dist/destinations/klaviyo/upsertProfile/generated-types.d.ts +1 -21
  22. package/dist/destinations/klaviyo/upsertProfile/index.js +5 -150
  23. package/dist/destinations/klaviyo/upsertProfile/index.js.map +1 -1
  24. package/dist/destinations/launchdarkly-audiences/syncAudience/index.js +12 -6
  25. package/dist/destinations/launchdarkly-audiences/syncAudience/index.js.map +1 -1
  26. package/dist/destinations/linkedin-audiences/updateAudience/index.js +8 -4
  27. package/dist/destinations/linkedin-audiences/updateAudience/index.js.map +1 -1
  28. package/dist/destinations/livelike-cloud/trackEvent/index.js +2 -1
  29. package/dist/destinations/livelike-cloud/trackEvent/index.js.map +1 -1
  30. package/dist/destinations/liveramp-audiences/audienceEnteredSFTP.types.d.ts +16 -0
  31. package/dist/destinations/liveramp-audiences/audienceEnteredSFTP.types.js +3 -0
  32. package/dist/destinations/liveramp-audiences/audienceEnteredSFTP.types.js.map +1 -0
  33. package/dist/destinations/loops/createOrUpdateContact/generated-types.d.ts +1 -1
  34. package/dist/destinations/loops/createOrUpdateContact/index.js +2 -2
  35. package/dist/destinations/loops/createOrUpdateContact/index.js.map +1 -1
  36. package/dist/destinations/optimizely-advanced-audience-targeting/syncAudience/index.js +8 -4
  37. package/dist/destinations/optimizely-advanced-audience-targeting/syncAudience/index.js.map +1 -1
  38. package/dist/destinations/optimizely-feature-experimentation-actions/trackEvent/index.js +2 -1
  39. package/dist/destinations/optimizely-feature-experimentation-actions/trackEvent/index.js.map +1 -1
  40. package/dist/destinations/outfunnel/forwardGroupEvent/index.js +10 -5
  41. package/dist/destinations/outfunnel/forwardGroupEvent/index.js.map +1 -1
  42. package/dist/destinations/outfunnel/forwardIdentifyEvent/index.js +8 -4
  43. package/dist/destinations/outfunnel/forwardIdentifyEvent/index.js.map +1 -1
  44. package/dist/destinations/outfunnel/forwardTrackEvent/index.js +8 -4
  45. package/dist/destinations/outfunnel/forwardTrackEvent/index.js.map +1 -1
  46. package/dist/destinations/segment-profiles/segment-properties.d.ts +1 -0
  47. package/dist/destinations/segment-profiles/segment-properties.js +9 -1
  48. package/dist/destinations/segment-profiles/segment-properties.js.map +1 -1
  49. package/dist/destinations/segment-profiles/sendGroup/generated-types.d.ts +1 -0
  50. package/dist/destinations/segment-profiles/sendGroup/index.js +3 -1
  51. package/dist/destinations/segment-profiles/sendGroup/index.js.map +1 -1
  52. package/dist/destinations/segment-profiles/sendIdentify/generated-types.d.ts +1 -0
  53. package/dist/destinations/segment-profiles/sendIdentify/index.js +3 -1
  54. package/dist/destinations/segment-profiles/sendIdentify/index.js.map +1 -1
  55. package/dist/destinations/segment-profiles/sendSubscription/generated-types.d.ts +1 -0
  56. package/dist/destinations/segment-profiles/sendSubscription/index.js +4 -1
  57. package/dist/destinations/segment-profiles/sendSubscription/index.js.map +1 -1
  58. package/dist/destinations/the-trade-desk-crm/functions.js +7 -1
  59. package/dist/destinations/the-trade-desk-crm/functions.js.map +1 -1
  60. package/dist/destinations/the-trade-desk-crm/index.js +1 -1
  61. package/dist/destinations/tiktok-audiences/properties.js +8 -4
  62. package/dist/destinations/tiktok-audiences/properties.js.map +1 -1
  63. package/dist/destinations/trackey/generated-types.d.ts +3 -0
  64. package/dist/destinations/trackey/generated-types.js.map +1 -0
  65. package/dist/destinations/trackey/group.types.d.ts +11 -0
  66. package/dist/destinations/{klaviyo/trackEvent/generated-types.js → trackey/group.types.js} +1 -1
  67. package/dist/destinations/trackey/group.types.js.map +1 -0
  68. package/dist/destinations/trackey/identify.types.d.ts +11 -0
  69. package/dist/destinations/{klaviyo/orderCompleted/generated-types.js → trackey/identify.types.js} +1 -1
  70. package/dist/destinations/trackey/identify.types.js.map +1 -0
  71. package/dist/destinations/trackey/index.d.ts +4 -0
  72. package/dist/destinations/trackey/index.js +206 -0
  73. package/dist/destinations/trackey/index.js.map +1 -0
  74. package/dist/destinations/trackey/track.types.d.ts +12 -0
  75. package/dist/destinations/{klaviyo/removeProfileToList/generated-types.js → trackey/track.types.js} +1 -1
  76. package/dist/destinations/trackey/track.types.js.map +1 -0
  77. package/dist/destinations/twilio-studio/triggerStudioFlow/index.js +6 -3
  78. package/dist/destinations/twilio-studio/triggerStudioFlow/index.js.map +1 -1
  79. package/dist/destinations/yahoo-audiences/generated-types.d.ts +2 -4
  80. package/dist/destinations/yahoo-audiences/index.js +47 -42
  81. package/dist/destinations/yahoo-audiences/index.js.map +1 -1
  82. package/dist/destinations/yahoo-audiences/types.d.ts +6 -0
  83. package/dist/destinations/yahoo-audiences/updateSegment/generated-types.d.ts +4 -5
  84. package/dist/destinations/yahoo-audiences/updateSegment/index.d.ts +2 -2
  85. package/dist/destinations/yahoo-audiences/updateSegment/index.js +66 -65
  86. package/dist/destinations/yahoo-audiences/updateSegment/index.js.map +1 -1
  87. package/dist/destinations/yahoo-audiences/utils-rt.d.ts +3 -3
  88. package/dist/destinations/yahoo-audiences/utils-rt.js +28 -20
  89. package/dist/destinations/yahoo-audiences/utils-rt.js.map +1 -1
  90. package/dist/destinations/yahoo-audiences/utils-tax.d.ts +3 -5
  91. package/dist/destinations/yahoo-audiences/utils-tax.js +28 -17
  92. package/dist/destinations/yahoo-audiences/utils-tax.js.map +1 -1
  93. package/package.json +5 -5
  94. package/dist/destinations/klaviyo/addProfileToList/generated-types.d.ts +0 -4
  95. package/dist/destinations/klaviyo/addProfileToList/generated-types.js.map +0 -1
  96. package/dist/destinations/klaviyo/addProfileToList/index.d.ts +0 -5
  97. package/dist/destinations/klaviyo/addProfileToList/index.js +0 -53
  98. package/dist/destinations/klaviyo/addProfileToList/index.js.map +0 -1
  99. package/dist/destinations/klaviyo/config.d.ts +0 -1
  100. package/dist/destinations/klaviyo/config.js +0 -5
  101. package/dist/destinations/klaviyo/config.js.map +0 -1
  102. package/dist/destinations/klaviyo/functions.d.ts +0 -2
  103. package/dist/destinations/klaviyo/functions.js +0 -35
  104. package/dist/destinations/klaviyo/functions.js.map +0 -1
  105. package/dist/destinations/klaviyo/orderCompleted/generated-types.d.ts +0 -22
  106. package/dist/destinations/klaviyo/orderCompleted/generated-types.js.map +0 -1
  107. package/dist/destinations/klaviyo/orderCompleted/index.d.ts +0 -5
  108. package/dist/destinations/klaviyo/orderCompleted/index.js +0 -152
  109. package/dist/destinations/klaviyo/orderCompleted/index.js.map +0 -1
  110. package/dist/destinations/klaviyo/removeProfileToList/generated-types.d.ts +0 -4
  111. package/dist/destinations/klaviyo/removeProfileToList/generated-types.js.map +0 -1
  112. package/dist/destinations/klaviyo/removeProfileToList/index.d.ts +0 -5
  113. package/dist/destinations/klaviyo/removeProfileToList/index.js +0 -53
  114. package/dist/destinations/klaviyo/removeProfileToList/index.js.map +0 -1
  115. package/dist/destinations/klaviyo/trackEvent/generated-types.d.ts +0 -16
  116. package/dist/destinations/klaviyo/trackEvent/generated-types.js.map +0 -1
  117. package/dist/destinations/klaviyo/trackEvent/index.d.ts +0 -5
  118. package/dist/destinations/klaviyo/trackEvent/index.js +0 -118
  119. package/dist/destinations/klaviyo/trackEvent/index.js.map +0 -1
  120. package/dist/destinations/klaviyo/types.d.ts +0 -69
  121. package/dist/destinations/klaviyo/types.js +0 -8
  122. package/dist/destinations/klaviyo/types.js.map +0 -1
  123. package/dist/destinations/yahoo-audiences/createCustomerNode/generated-types.d.ts +0 -4
  124. package/dist/destinations/yahoo-audiences/createCustomerNode/generated-types.js +0 -3
  125. package/dist/destinations/yahoo-audiences/createCustomerNode/generated-types.js.map +0 -1
  126. package/dist/destinations/yahoo-audiences/createCustomerNode/index.d.ts +0 -5
  127. package/dist/destinations/yahoo-audiences/createCustomerNode/index.js +0 -33
  128. package/dist/destinations/yahoo-audiences/createCustomerNode/index.js.map +0 -1
  129. package/dist/destinations/yahoo-audiences/createSegment/generated-types.d.ts +0 -6
  130. package/dist/destinations/yahoo-audiences/createSegment/generated-types.js +0 -3
  131. package/dist/destinations/yahoo-audiences/createSegment/generated-types.js.map +0 -1
  132. package/dist/destinations/yahoo-audiences/createSegment/index.d.ts +0 -5
  133. package/dist/destinations/yahoo-audiences/createSegment/index.js +0 -45
  134. package/dist/destinations/yahoo-audiences/createSegment/index.js.map +0 -1
  135. package/dist/destinations/yahoo-audiences/utils.d.ts +0 -4
  136. package/dist/destinations/yahoo-audiences/utils.js +0 -30
  137. package/dist/destinations/yahoo-audiences/utils.js.map +0 -1
  138. /package/dist/destinations/{klaviyo/addProfileToList → trackey}/generated-types.js +0 -0
@@ -1,118 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const actions_core_1 = require("@segment/actions-core");
4
- const config_1 = require("../config");
5
- const action = {
6
- title: 'Track Event',
7
- description: 'Track user events and associate it with their profile.',
8
- defaultSubscription: 'type = "track"',
9
- fields: {
10
- profile: {
11
- label: 'Profile',
12
- description: `Properties of the profile that triggered this event.`,
13
- type: 'object',
14
- properties: {
15
- email: {
16
- label: 'Email',
17
- type: 'string',
18
- allowNull: true
19
- },
20
- phone_number: {
21
- label: 'Phone Number',
22
- type: 'string',
23
- allowNull: true
24
- },
25
- other_properties: {
26
- label: 'Other Properties',
27
- type: 'object',
28
- allowNull: true
29
- }
30
- },
31
- required: true
32
- },
33
- metric_name: {
34
- label: 'Metric Name',
35
- description: 'Name of the event. Must be less than 128 characters.',
36
- type: 'string',
37
- default: {
38
- '@path': '$.event'
39
- },
40
- required: true
41
- },
42
- properties: {
43
- description: `Properties of this event.`,
44
- label: 'Properties',
45
- type: 'object',
46
- default: {
47
- '@path': '$.properties'
48
- },
49
- required: true
50
- },
51
- time: {
52
- label: 'Time',
53
- description: `When this event occurred. By default, the time the request was received will be used.
54
- The time is truncated to the second. The time must be after the year 2000 and can only
55
- be up to 1 year in the future.
56
- `,
57
- type: 'datetime',
58
- default: {
59
- '@path': '$.timestamp'
60
- }
61
- },
62
- value: {
63
- label: 'Value',
64
- description: 'A numeric value to associate with this event. For example, the dollar amount of a purchase.',
65
- type: 'number'
66
- },
67
- unique_id: {
68
- label: 'Unique ID',
69
- description: `A unique identifier for an event. If the unique_id is repeated for the same
70
- profile and metric, only the first processed event will be recorded. If this is not
71
- present, this will use the time to the second. Using the default, this limits only one
72
- event per profile per second.
73
- `,
74
- type: 'string',
75
- default: {
76
- '@path': '$.event'
77
- }
78
- }
79
- },
80
- perform: (request, { payload }) => {
81
- const { email, phone_number } = payload.profile;
82
- if (!email && !phone_number) {
83
- throw new actions_core_1.IntegrationError('One of Phone Number or Email is required.', 'Missing required fields', 400);
84
- }
85
- const eventData = {
86
- data: {
87
- type: 'event',
88
- attributes: {
89
- properties: { ...payload.properties },
90
- time: payload.time,
91
- value: payload.value,
92
- metric: {
93
- data: {
94
- type: 'metric',
95
- attributes: {
96
- name: payload.metric_name
97
- }
98
- }
99
- },
100
- profile: {
101
- data: {
102
- type: 'profile',
103
- attributes: {
104
- ...payload.profile
105
- }
106
- }
107
- }
108
- }
109
- }
110
- };
111
- return request(`${config_1.API_URL}/events/`, {
112
- method: 'POST',
113
- json: eventData
114
- });
115
- }
116
- };
117
- exports.default = action;
118
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/klaviyo/trackEvent/index.ts"],"names":[],"mappings":";;AAIA,wDAAwD;AACxD,sCAAmC;AAEnC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,wDAAwD;IACrE,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,OAAO,EAAE;YACP,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,sDAAsD;YACnE,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,KAAK,EAAE;oBACL,KAAK,EAAE,OAAO;oBACd,IAAI,EAAE,QAAQ;oBACd,SAAS,EAAE,IAAI;iBAChB;gBACD,YAAY,EAAE;oBACZ,KAAK,EAAE,cAAc;oBACrB,IAAI,EAAE,QAAQ;oBACd,SAAS,EAAE,IAAI;iBAChB;gBACD,gBAAgB,EAAE;oBAChB,KAAK,EAAE,kBAAkB;oBACzB,IAAI,EAAE,QAAQ;oBACd,SAAS,EAAE,IAAI;iBAChB;aACF;YACD,QAAQ,EAAE,IAAI;SACf;QACD,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,sDAAsD;YACnE,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,SAAS;aACnB;YACD,QAAQ,EAAE,IAAI;SACf;QACD,UAAU,EAAE;YACV,WAAW,EAAE,2BAA2B;YACxC,KAAK,EAA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6BACnB;yBACF;qBACF;iBACF;aACF;SACF,CAAA;QAED,OAAO,OAAO,CAAC,GAAG,gBAAO,UAAU,EAAE;YACnC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,SAAS;SAChB,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -1,69 +0,0 @@
1
- import { HTTPError } from '@segment/actions-core';
2
- export declare class KlaviyoAPIError extends HTTPError {
3
- response: Response & {
4
- data: {
5
- errors: Array<{
6
- id: string;
7
- status: number;
8
- code: string;
9
- title: string;
10
- detail: string;
11
- source: {
12
- pointer: string;
13
- };
14
- meta: {
15
- duplicate_profile_id: string;
16
- };
17
- }>;
18
- };
19
- content: string;
20
- };
21
- }
22
- export interface ProfileData {
23
- data: {
24
- type: string;
25
- id?: string;
26
- attributes: {
27
- email?: string;
28
- external_id?: string;
29
- phone_number?: string;
30
- [key: string]: string | Record<string, unknown> | undefined;
31
- };
32
- };
33
- }
34
- export interface EventData {
35
- data: {
36
- type: string;
37
- attributes: {
38
- properties?: object;
39
- time?: string | number;
40
- value?: number;
41
- metric: {
42
- data: {
43
- type: string;
44
- attributes: {
45
- name?: string;
46
- };
47
- };
48
- };
49
- profile: {
50
- data: {
51
- type: string;
52
- attributes: {
53
- email?: string;
54
- phone_number?: string;
55
- other_properties?: object;
56
- };
57
- };
58
- };
59
- };
60
- };
61
- }
62
- export interface listData {
63
- data: [
64
- {
65
- type: string;
66
- id?: string;
67
- }
68
- ];
69
- }
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.KlaviyoAPIError = void 0;
4
- const actions_core_1 = require("@segment/actions-core");
5
- class KlaviyoAPIError extends actions_core_1.HTTPError {
6
- }
7
- exports.KlaviyoAPIError = KlaviyoAPIError;
8
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/destinations/klaviyo/types.ts"],"names":[],"mappings":";;;AAAA,wDAAiD;AAEjD,MAAa,eAAgB,SAAQ,wBAAS;CAmB7C;AAnBD,0CAmBC"}
@@ -1,4 +0,0 @@
1
- export interface Payload {
2
- engage_space_id: string;
3
- customer_desc?: string;
4
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=generated-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/yahoo-audiences/createCustomerNode/generated-types.ts"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
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;
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const utils_tax_1 = require("../utils-tax");
4
- const utils_tax_2 = require("../utils-tax");
5
- const action = {
6
- title: 'Create top-level CUSTOMER node in Yahoo taxonomy',
7
- defaultSubscription: 'event = "Audience Entered" and event = "Audience Exited"',
8
- description: '',
9
- fields: {
10
- engage_space_id: {
11
- label: 'Engage Space Id',
12
- description: 'Provide Engage Space Id found in Unify > Settings > API Access. This maps to the "Id" and "Name" of the top-level Customer node in Yahoo taxonomy',
13
- type: 'string',
14
- required: true
15
- },
16
- customer_desc: {
17
- label: 'Customer Description',
18
- description: 'Provide a description for the Customer node in Yahoo taxonomy. This must be less then 1000 characters',
19
- type: 'string',
20
- required: false
21
- }
22
- },
23
- perform: async (request, { settings, payload }) => {
24
- const tx_creds = {
25
- tx_client_key: settings.taxonomy_client_key,
26
- tx_client_secret: settings.taxonomy_client_secret
27
- };
28
- const taxonomy_payload = utils_tax_1.gen_customer_taxonomy_payload(settings, payload);
29
- return await utils_tax_2.update_taxonomy('', tx_creds, request, taxonomy_payload);
30
- }
31
- };
32
- exports.default = action;
33
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/yahoo-audiences/createCustomerNode/index.ts"],"names":[],"mappings":";;AAGA,4CAA4D;AAC5D,4CAA8C;AAE9C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,kDAAkD;IACzD,mBAAmB,EAAE,0DAA0D;IAC/E,WAAW,EAAE,EAAE;IACf,MAAM,EAAE;QACN,eAAe,EAAE;YACf,KAAK,EAAE,iBAAiB;YACxB,WAAW,EACT,mJAAmJ;YACrJ,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,aAAa,EAAE;YACb,KAAK,EAAE,sBAAsB;YAC7B,WAAW,EACT,uGAAuG;YACzG,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;SAChB;KACF;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAChD,MAAM,QAAQ,GAAG;YACf,aAAa,EAAE,QAAQ,CAAC,mBAAmB;YAC3C,gBAAgB,EAAE,QAAQ,CAAC,sBAAsB;SAClD,CAAA;QACD,MAAM,gBAAgB,GAAG,yCAA6B,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;QACzE,OAAO,MAAM,2BAAe,CAAC,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAA;IACvE,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -1,6 +0,0 @@
1
- export interface Payload {
2
- segment_audience_key: string;
3
- segment_audience_id: string;
4
- engage_space_id?: string;
5
- customer_desc?: string;
6
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=generated-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/yahoo-audiences/createSegment/generated-types.ts"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
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;
@@ -1,45 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const utils_tax_1 = require("../utils-tax");
4
- const utils_tax_2 = require("../utils-tax");
5
- const action = {
6
- title: 'Create SEGMENT sub-node in Yahoo taxonomy',
7
- description: 'Use this action to generate SEGMENT sub-node within CUSTOMER node in Yahoo taxonomy',
8
- defaultSubscription: 'event = "Audience Entered" and event = "Audience Exited"',
9
- fields: {
10
- segment_audience_key: {
11
- label: 'Audience Key',
12
- description: 'Provide audience key. This maps to the "Name" of the Segment node in Yahoo taxonomy',
13
- type: 'string',
14
- required: true
15
- },
16
- segment_audience_id: {
17
- label: 'Audience Id',
18
- description: 'Provide audience Id (aud_...) from audience URL in Segment Engage. This maps to the "Id" of the Segment node in Yahoo taxonomy',
19
- type: 'string',
20
- required: true
21
- },
22
- engage_space_id: {
23
- label: 'Engage Space Id',
24
- description: 'Provide Engage Space Id found in Unify > Settings > API Access. This maps to the "Id" and "Name" of the top-level Customer node in Yahoo taxonomy and specifies the parent node for your Segment node in Yahoo taxonomy',
25
- type: 'string',
26
- required: false
27
- },
28
- customer_desc: {
29
- label: 'Space Description',
30
- description: 'Provide the description for Segment node in Yahoo taxonomy. This must be less then 1000 characters',
31
- type: 'string',
32
- required: false
33
- }
34
- },
35
- perform: async (request, { payload, settings }) => {
36
- const tx_creds = {
37
- tx_client_key: settings.taxonomy_client_key,
38
- tx_client_secret: settings.taxonomy_client_secret
39
- };
40
- const body_form_data = utils_tax_1.gen_segment_subtaxonomy_payload(payload);
41
- return await utils_tax_2.update_taxonomy(String(payload.engage_space_id), tx_creds, request, body_form_data);
42
- }
43
- };
44
- exports.default = action;
45
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/yahoo-audiences/createSegment/index.ts"],"names":[],"mappings":";;AAIA,4CAA8D;AAC9D,4CAA8C;AAG9C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,2CAA2C;IAClD,WAAW,EAAE,qFAAqF;IAClG,mBAAmB,EAAE,0DAA0D;IAE/E,MAAM,EAAE;QACN,oBAAoB,EAAE;YACpB,KAAK,EAAE,cAAc;YACrB,WAAW,EAAE,qFAAqF;YAClG,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,mBAAmB,EAAE;YACnB,KAAK,EAAE,aAAa;YACpB,WAAW,EACT,gIAAgI;YAClI,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,eAAe,EAAE;YACf,KAAK,EAAE,iBAAiB;YACxB,WAAW,EACT,yNAAyN;YAC3N,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;SAChB;QACD,aAAa,EAAE;YACb,KAAK,EAAE,mBAAmB;YAC1B,WAAW,EAAE,oGAAoG;YACjH,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;SAChB;KACF;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAChD,MAAM,QAAQ,GAAG;YACf,aAAa,EAAE,QAAQ,CAAC,mBAAmB;YAC3C,gBAAgB,EAAE,QAAQ,CAAC,sBAAsB;SAClD,CAAA;QAED,MAAM,cAAc,GAAG,2CAA+B,CAAC,OAAO,CAAC,CAAA;QAC/D,OAAO,MAAM,2BAAe,CAAC,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,CAAC,CAAA;IAClG,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -1,4 +0,0 @@
1
- import { RequestClient } from '@segment/actions-core';
2
- import { CredsObj } from './types';
3
- export declare function gen_random_id(length: number): string;
4
- export declare function update_taxonomy(engage_space_id: string, tx_creds: CredsObj, request: RequestClient, body_form_data: string): Promise<any>;
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.update_taxonomy = exports.gen_random_id = void 0;
4
- const utils_tax_1 = require("./utils-tax");
5
- function gen_random_id(length) {
6
- const pattern = 'abcdefghijklmnopqrstuvwxyz123456789';
7
- const result = [];
8
- for (let i = 0; i < length; i++) {
9
- result.push(pattern[Math.floor(Math.random() * pattern.length)]);
10
- }
11
- return result.join('');
12
- }
13
- exports.gen_random_id = gen_random_id;
14
- async function update_taxonomy(engage_space_id, tx_creds, request, body_form_data) {
15
- const tx_client_secret = tx_creds.tx_client_key;
16
- const tx_client_key = tx_creds.tx_client_secret;
17
- const url = `https://datax.yahooapis.com/v1/taxonomy/append${engage_space_id.length > 0 ? '/' + engage_space_id : ''}`;
18
- const oauth1_auth_string = utils_tax_1.gen_oauth1_signature(tx_client_key, tx_client_secret, 'PUT', url);
19
- const add_segment_node = await request(url, {
20
- method: 'PUT',
21
- body: body_form_data,
22
- headers: {
23
- Authorization: oauth1_auth_string,
24
- 'Content-Type': 'multipart/form-data; boundary=SEGMENT-DATA'
25
- }
26
- });
27
- return await add_segment_node.json();
28
- }
29
- exports.update_taxonomy = update_taxonomy;
30
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/destinations/yahoo-audiences/utils.ts"],"names":[],"mappings":";;;AAEA,2CAAkD;AAQlD,SAAgB,aAAa,CAAC,MAAc;IAC1C,MAAM,OAAO,GAAG,qCAAqC,CAAA;IACrD,MAAM,MAAM,GAAG,EAAE,CAAA;IACjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;QAC/B,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAA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