@segment/action-destinations 3.438.0 → 3.439.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 (121) hide show
  1. package/dist/destinations/criteo-audiences/addUserToAudience/generated-types.d.ts +1 -0
  2. package/dist/destinations/criteo-audiences/addUserToAudience/index.js +7 -0
  3. package/dist/destinations/criteo-audiences/addUserToAudience/index.js.map +1 -1
  4. package/dist/destinations/criteo-audiences/removeUserFromAudience/generated-types.d.ts +1 -0
  5. package/dist/destinations/criteo-audiences/removeUserFromAudience/index.js +7 -0
  6. package/dist/destinations/criteo-audiences/removeUserFromAudience/index.js.map +1 -1
  7. package/dist/destinations/google-enhanced-conversions/functions.d.ts +1 -1
  8. package/dist/destinations/google-enhanced-conversions/functions.js +1 -1
  9. package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.js +2 -2
  10. package/dist/destinations/google-enhanced-conversions/uploadCallConversion2/index.js +2 -2
  11. package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js +2 -2
  12. package/dist/destinations/google-enhanced-conversions/uploadClickConversion2/index.js +2 -2
  13. package/dist/destinations/google-enhanced-conversions/userList/index.js +3 -3
  14. package/dist/destinations/google-enhanced-conversions/userList/index.js.map +1 -1
  15. package/dist/destinations/linkedin-audiences/{api/index.d.ts → api.d.ts} +3 -3
  16. package/dist/destinations/linkedin-audiences/{api/index.js → api.js} +2 -2
  17. package/dist/destinations/linkedin-audiences/api.js.map +1 -0
  18. package/dist/destinations/linkedin-audiences/updateAudience/fields.d.ts +2 -0
  19. package/dist/destinations/linkedin-audiences/updateAudience/fields.js +126 -0
  20. package/dist/destinations/linkedin-audiences/updateAudience/fields.js.map +1 -0
  21. package/dist/destinations/linkedin-audiences/updateAudience/functions.d.ts +5 -0
  22. package/dist/destinations/linkedin-audiences/updateAudience/functions.js +112 -0
  23. package/dist/destinations/linkedin-audiences/updateAudience/functions.js.map +1 -0
  24. package/dist/destinations/linkedin-audiences/updateAudience/index.js +5 -232
  25. package/dist/destinations/linkedin-audiences/updateAudience/index.js.map +1 -1
  26. package/dist/destinations/ms-bing-ads-audiences/index.js +1 -1
  27. package/dist/destinations/ms-bing-ads-audiences/index.js.map +1 -1
  28. package/dist/destinations/ms-bing-ads-audiences/syncAudiences/fields.js +13 -17
  29. package/dist/destinations/ms-bing-ads-audiences/syncAudiences/fields.js.map +1 -1
  30. package/dist/destinations/snap-audiences/constants.d.ts +2 -0
  31. package/dist/destinations/snap-audiences/constants.js +6 -0
  32. package/dist/destinations/snap-audiences/constants.js.map +1 -0
  33. package/dist/destinations/snap-audiences/index.js +24 -40
  34. package/dist/destinations/snap-audiences/index.js.map +1 -1
  35. package/dist/destinations/snap-audiences/syncAudience/constants.d.ts +5 -0
  36. package/dist/destinations/snap-audiences/syncAudience/constants.js +9 -0
  37. package/dist/destinations/snap-audiences/syncAudience/constants.js.map +1 -0
  38. package/dist/destinations/snap-audiences/syncAudience/fields.d.ts +2 -0
  39. package/dist/destinations/snap-audiences/syncAudience/fields.js +90 -0
  40. package/dist/destinations/snap-audiences/syncAudience/fields.js.map +1 -0
  41. package/dist/destinations/snap-audiences/syncAudience/functions.d.ts +5 -0
  42. package/dist/destinations/snap-audiences/syncAudience/functions.js +119 -0
  43. package/dist/destinations/snap-audiences/syncAudience/functions.js.map +1 -0
  44. package/dist/destinations/snap-audiences/syncAudience/generated-types.d.ts +2 -1
  45. package/dist/destinations/snap-audiences/syncAudience/index.js +6 -146
  46. package/dist/destinations/snap-audiences/syncAudience/index.js.map +1 -1
  47. package/dist/destinations/snap-audiences/syncAudience/types.d.ts +18 -0
  48. package/dist/destinations/snap-audiences/syncAudience/types.js.map +1 -0
  49. package/dist/destinations/snap-audiences/types.d.ts +19 -0
  50. package/dist/destinations/snap-audiences/types.js.map +1 -0
  51. package/dist/destinations/stackadapt-audiences/common-constants.d.ts +2 -0
  52. package/dist/destinations/stackadapt-audiences/common-constants.js +6 -0
  53. package/dist/destinations/stackadapt-audiences/common-constants.js.map +1 -0
  54. package/dist/destinations/stackadapt-audiences/common-functions.d.ts +0 -7
  55. package/dist/destinations/stackadapt-audiences/common-functions.js +0 -193
  56. package/dist/destinations/stackadapt-audiences/common-functions.js.map +1 -1
  57. package/dist/destinations/stackadapt-audiences/common-types.d.ts +15 -0
  58. package/dist/destinations/stackadapt-audiences/{forwardProfile/generated-types.js → common-types.js} +1 -1
  59. package/dist/destinations/stackadapt-audiences/common-types.js.map +1 -0
  60. package/dist/destinations/stackadapt-audiences/{constants.js → forwardAudienceEvent/constants.js} +1 -22
  61. package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/constants.js.map +1 -0
  62. package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/fields.d.ts +1 -0
  63. package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/fields.js +184 -1
  64. package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/fields.js.map +1 -1
  65. package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/functions.d.ts +6 -0
  66. package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/functions.js +184 -0
  67. package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/functions.js.map +1 -0
  68. package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/generated-types.d.ts +0 -3
  69. package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/index.js +4 -5
  70. package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/index.js.map +1 -1
  71. package/dist/destinations/stackadapt-audiences/{types.d.ts → forwardAudienceEvent/types.d.ts} +0 -15
  72. package/dist/destinations/{yonoma/sendEvent/generated-types.js → stackadapt-audiences/forwardAudienceEvent/types.js} +1 -1
  73. package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/types.js.map +1 -0
  74. package/dist/destinations/stackadapt-audiences/index.d.ts +1 -1
  75. package/dist/destinations/stackadapt-audiences/index.js +5 -7
  76. package/dist/destinations/stackadapt-audiences/index.js.map +1 -1
  77. package/dist/destinations/yonoma/index.js +0 -2
  78. package/dist/destinations/yonoma/index.js.map +1 -1
  79. package/dist/destinations/yonoma/trackEvent/generated-types.d.ts +24 -3
  80. package/dist/destinations/yonoma/trackEvent/index.js +140 -16
  81. package/dist/destinations/yonoma/trackEvent/index.js.map +1 -1
  82. package/dist/destinations/yonoma/trackEvent/types.d.ts +24 -3
  83. package/dist/destinations/yonoma/trackPageView/generated-types.d.ts +23 -7
  84. package/dist/destinations/yonoma/trackPageView/index.js +133 -50
  85. package/dist/destinations/yonoma/trackPageView/index.js.map +1 -1
  86. package/dist/destinations/yonoma/trackPageView/types.d.ts +22 -4
  87. package/dist/destinations/yonoma/upsertContact/generated-types.d.ts +25 -3
  88. package/dist/destinations/yonoma/upsertContact/index.js +153 -21
  89. package/dist/destinations/yonoma/upsertContact/index.js.map +1 -1
  90. package/dist/destinations/yonoma/upsertContact/types.d.ts +26 -4
  91. package/package.json +2 -2
  92. package/dist/destinations/linkedin-audiences/api/index.js.map +0 -1
  93. package/dist/destinations/snap-audiences/syncAudience/utils.d.ts +0 -8
  94. package/dist/destinations/snap-audiences/syncAudience/utils.js +0 -61
  95. package/dist/destinations/snap-audiences/syncAudience/utils.js.map +0 -1
  96. package/dist/destinations/stackadapt-audiences/common-fields.d.ts +0 -2
  97. package/dist/destinations/stackadapt-audiences/common-fields.js +0 -227
  98. package/dist/destinations/stackadapt-audiences/common-fields.js.map +0 -1
  99. package/dist/destinations/stackadapt-audiences/constants.js.map +0 -1
  100. package/dist/destinations/stackadapt-audiences/forwardProfile/generated-types.d.ts +0 -26
  101. package/dist/destinations/stackadapt-audiences/forwardProfile/generated-types.js.map +0 -1
  102. package/dist/destinations/stackadapt-audiences/forwardProfile/index.d.ts +0 -5
  103. package/dist/destinations/stackadapt-audiences/forwardProfile/index.js +0 -140
  104. package/dist/destinations/stackadapt-audiences/forwardProfile/index.js.map +0 -1
  105. package/dist/destinations/stackadapt-audiences/types.js.map +0 -1
  106. package/dist/destinations/yonoma/sendEvent/constants.d.ts +0 -1
  107. package/dist/destinations/yonoma/sendEvent/constants.js +0 -5
  108. package/dist/destinations/yonoma/sendEvent/constants.js.map +0 -1
  109. package/dist/destinations/yonoma/sendEvent/functions.d.ts +0 -1
  110. package/dist/destinations/yonoma/sendEvent/functions.js +0 -19
  111. package/dist/destinations/yonoma/sendEvent/functions.js.map +0 -1
  112. package/dist/destinations/yonoma/sendEvent/generated-types.d.ts +0 -13
  113. package/dist/destinations/yonoma/sendEvent/generated-types.js.map +0 -1
  114. package/dist/destinations/yonoma/sendEvent/index.d.ts +0 -5
  115. package/dist/destinations/yonoma/sendEvent/index.js +0 -103
  116. package/dist/destinations/yonoma/sendEvent/index.js.map +0 -1
  117. package/dist/destinations/yonoma/sendEvent/types.d.ts +0 -10
  118. package/dist/destinations/yonoma/sendEvent/types.js.map +0 -1
  119. /package/dist/destinations/{stackadapt-audiences → snap-audiences/syncAudience}/types.js +0 -0
  120. /package/dist/destinations/{yonoma/sendEvent → snap-audiences}/types.js +0 -0
  121. /package/dist/destinations/stackadapt-audiences/{constants.d.ts → forwardAudienceEvent/constants.d.ts} +0 -0
@@ -1,26 +0,0 @@
1
- export interface Payload {
2
- standard_traits?: {
3
- first_name?: string;
4
- last_name?: string;
5
- phone?: string;
6
- address?: string;
7
- city?: string;
8
- country?: string;
9
- state?: string;
10
- timezone?: string;
11
- postal_code?: string;
12
- birth_day?: number;
13
- birth_month?: number;
14
- birth_year?: number;
15
- birth_date?: string;
16
- };
17
- custom_traits?: {
18
- [k: string]: unknown;
19
- };
20
- user_id?: string;
21
- event_type: string;
22
- marketing_status: string;
23
- enable_batching: boolean;
24
- previous_id?: string;
25
- email?: string;
26
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/stackadapt-audiences/forwardProfile/generated-types.ts"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- import { ActionDefinition } from '@segment/actions-core';
2
- import { Payload } from './generated-types';
3
- import { Settings } from '../generated-types';
4
- declare const action: ActionDefinition<Settings, Payload>;
5
- export default action;
@@ -1,140 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const common_functions_1 = require("../common-functions");
4
- const common_fields_1 = require("../common-fields");
5
- const action = {
6
- title: 'Forward Profile',
7
- description: 'Forward new or updated user profiles to StackAdapt',
8
- defaultSubscription: 'type = "identify" or type = "alias" or type = "track"',
9
- fields: {
10
- ...common_fields_1.common_fields,
11
- previous_id: {
12
- label: 'Previous ID',
13
- type: 'string',
14
- description: "The user's previous ID, for alias events",
15
- default: {
16
- '@path': '$.previousId'
17
- }
18
- },
19
- email: {
20
- label: 'Email',
21
- description: 'The email address of the user.',
22
- type: 'string',
23
- format: 'email',
24
- required: {
25
- conditions: [{ fieldKey: 'previous_id', operator: 'is', value: undefined }]
26
- },
27
- default: {
28
- '@if': {
29
- exists: { '@path': '$.traits.email' },
30
- then: { '@path': '$.traits.email' },
31
- else: { '@path': '$.context.traits.email' }
32
- }
33
- }
34
- },
35
- standard_traits: {
36
- ...common_fields_1.common_fields.standard_traits,
37
- default: {
38
- first_name: {
39
- '@if': {
40
- exists: { '@path': '$.traits.first_name' },
41
- then: { '@path': '$.traits.first_name' },
42
- else: { '@path': '$.context.traits.first_name' }
43
- }
44
- },
45
- last_name: {
46
- '@if': {
47
- exists: { '@path': '$.traits.last_name' },
48
- then: { '@path': '$.traits.last_name' },
49
- else: { '@path': '$.context.traits.last_name' }
50
- }
51
- },
52
- phone: {
53
- '@if': {
54
- exists: { '@path': '$.traits.phone' },
55
- then: { '@path': '$.traits.phone' },
56
- else: { '@path': '$.context.traits.phone' }
57
- }
58
- },
59
- address: {
60
- '@if': {
61
- exists: { '@path': '$.traits.address.street' },
62
- then: { '@path': '$.traits.address.street' },
63
- else: { '@path': '$.context.traits.address.street' }
64
- }
65
- },
66
- city: {
67
- '@if': {
68
- exists: { '@path': '$.traits.address.city' },
69
- then: { '@path': '$.traits.address.city' },
70
- else: { '@path': '$.context.traits.address.city' }
71
- }
72
- },
73
- country: {
74
- '@if': {
75
- exists: { '@path': '$.traits.address.country' },
76
- then: { '@path': '$.traits.address.country' },
77
- else: { '@path': '$.context.traits.address.country' }
78
- }
79
- },
80
- state: {
81
- '@if': {
82
- exists: { '@path': '$.traits.address.state' },
83
- then: { '@path': '$.traits.address.state' },
84
- else: { '@path': '$.context.traits.address.state' }
85
- }
86
- },
87
- postal_code: {
88
- '@if': {
89
- exists: { '@path': '$.traits.address.postal_code' },
90
- then: { '@path': '$.traits.address.postal_code' },
91
- else: { '@path': '$.context.traits.address.postal_code' }
92
- }
93
- },
94
- timezone: {
95
- '@if': {
96
- exists: { '@path': '$.traits.timezone' },
97
- then: { '@path': '$.traits.timezone' },
98
- else: { '@path': '$.context.traits.timezone' }
99
- }
100
- },
101
- birth_day: {
102
- '@if': {
103
- exists: { '@path': '$.traits.birth_day' },
104
- then: { '@path': '$.traits.birth_day' },
105
- else: { '@path': '$.context.traits.birth_day' }
106
- }
107
- },
108
- birth_month: {
109
- '@if': {
110
- exists: { '@path': '$.traits.birth_month' },
111
- then: { '@path': '$.traits.birth_month' },
112
- else: { '@path': '$.context.traits.birth_month' }
113
- }
114
- },
115
- birth_year: {
116
- '@if': {
117
- exists: { '@path': '$.traits.birth_year' },
118
- then: { '@path': '$.traits.birth_year' },
119
- else: { '@path': '$.context.traits.birth_year' }
120
- }
121
- },
122
- birth_date: {
123
- '@if': {
124
- exists: { '@path': '$.traits.birth_date' },
125
- then: { '@path': '$.traits.birth_date' },
126
- else: { '@path': '$.context.traits.birth_date' }
127
- }
128
- }
129
- }
130
- }
131
- },
132
- perform: async (request, { settings, payload }) => {
133
- return await (0, common_functions_1.send)(request, [payload], settings, false);
134
- },
135
- performBatch: async (request, { settings, payload }) => {
136
- return await (0, common_functions_1.send)(request, payload, settings, false);
137
- }
138
- };
139
- exports.default = action;
140
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/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CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;IACxD,CAAC;IACD,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QACrD,OAAO,MAAM,IAAA,uBAAI,EAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;IACtD,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/destinations/stackadapt-audiences/types.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- export declare const SEND_EVENT_URL = "https://api.yonoma.io/integration/segment/sendevent";
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SEND_EVENT_URL = void 0;
4
- exports.SEND_EVENT_URL = 'https://api.yonoma.io/integration/segment/sendevent';
5
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/destinations/yonoma/sendEvent/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG,qDAAqD,CAAA"}
@@ -1 +0,0 @@
1
- export declare function formatDate(input: string): string;
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.formatDate = formatDate;
4
- const actions_core_1 = require("@segment/actions-core");
5
- function formatDate(input) {
6
- const ymdRegex = /^\d{4}-\d{2}-\d{2}$/;
7
- if (ymdRegex.test(input)) {
8
- return input;
9
- }
10
- const date = new Date(input);
11
- if (isNaN(date.getTime())) {
12
- throw new actions_core_1.PayloadValidationError(`Invalid date string: ${input}`);
13
- }
14
- const year = date.getFullYear();
15
- const month = String(date.getMonth() + 1).padStart(2, '0');
16
- const day = String(date.getDate()).padStart(2, '0');
17
- return `${year}-${month}-${day}`;
18
- }
19
- //# sourceMappingURL=functions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../../src/destinations/yonoma/sendEvent/functions.ts"],"names":[],"mappings":";;AAEA,gCAiBC;AAnBD,wDAA8D;AAE9D,SAAgB,UAAU,CAAC,KAAa;IACtC,MAAM,QAAQ,GAAG,qBAAqB,CAAA;IACtC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK,CAAA;IACd,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAA;IAE5B,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,qCAAsB,CAAC,wBAAwB,KAAK,EAAE,CAAC,CAAA;IACnE,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;IAC/B,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;IAC1D,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;IAEnD,OAAO,GAAG,IAAI,IAAI,KAAK,IAAI,GAAG,EAAE,CAAA;AAClC,CAAC"}
@@ -1,13 +0,0 @@
1
- export interface Payload {
2
- event: string;
3
- identifiers: {
4
- userId?: string;
5
- anonymousId?: string;
6
- email?: string;
7
- };
8
- listId: string;
9
- properties?: {
10
- [k: string]: unknown;
11
- };
12
- timestamp?: string;
13
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/yonoma/sendEvent/generated-types.ts"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- import { 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,103 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const actions_core_1 = require("@segment/actions-core");
4
- const constants_1 = require("./constants");
5
- const action = {
6
- title: 'Send Event',
7
- description: 'Trigger automation based on a contact’s action within your product',
8
- defaultSubscription: 'type = "track"',
9
- fields: {
10
- event: {
11
- label: 'Event Name',
12
- type: 'string',
13
- description: 'The name of the event to track.',
14
- required: true,
15
- default: { '@path': '$.event' }
16
- },
17
- identifiers: {
18
- label: 'Identifiers',
19
- type: 'object',
20
- description: 'Unique identifiers for the contact. At least one of userId or anonymousId is required.',
21
- required: true,
22
- additionalProperties: false,
23
- properties: {
24
- userId: {
25
- label: 'User ID',
26
- type: 'string',
27
- description: 'Unique user identifier from your app.'
28
- },
29
- anonymousId: {
30
- label: 'Anonymous ID',
31
- type: 'string',
32
- description: 'Anonymous identifier from Segment.',
33
- readOnly: false
34
- },
35
- email: {
36
- label: 'Email',
37
- type: 'string',
38
- description: "Contact's email address. Required if userId is not provided."
39
- }
40
- },
41
- default: {
42
- userId: { '@path': '$.userId' },
43
- anonymousId: { '@path': '$.anonymousId' },
44
- email: {
45
- '@if': {
46
- exists: { '@path': '$.context.traits.email' },
47
- then: { '@path': '$.context.traits.email' },
48
- else: { '@path': '$.properties.email' }
49
- }
50
- }
51
- }
52
- },
53
- listId: {
54
- label: 'List ID',
55
- type: 'string',
56
- description: "The Yonoma list to add the contact to.",
57
- required: true,
58
- default: {
59
- '@if': {
60
- exists: { '@path': '$.context.traits.list_id' },
61
- then: { '@path': '$.context.traits.list_id' },
62
- else: { '@path': '$.properties.list_id' }
63
- }
64
- }
65
- },
66
- properties: {
67
- label: 'Event Properties',
68
- type: 'object',
69
- description: 'Additional properties associated with the event.',
70
- required: false,
71
- defaultObjectUI: 'keyvalue',
72
- default: { '@path': '$.properties' }
73
- },
74
- timestamp: {
75
- label: 'Timestamp',
76
- type: 'string',
77
- description: 'The timestamp of the event. Defaults to the current time if not provided.',
78
- format: 'date-time',
79
- default: { '@path': '$.timestamp' }
80
- }
81
- },
82
- perform: async (request, { payload }) => {
83
- const { event, properties, identifiers: { userId, email, } = {}, listId, timestamp } = payload;
84
- if (!userId && !email) {
85
- throw new actions_core_1.PayloadValidationError('At least one identifier (userId or email) is required.');
86
- }
87
- delete properties?.email;
88
- delete properties?.list_id;
89
- const json = {
90
- event,
91
- userId,
92
- listId,
93
- properties,
94
- timestamp
95
- };
96
- return await request(constants_1.SEND_EVENT_URL, {
97
- method: 'POST',
98
- json
99
- });
100
- }
101
- };
102
- exports.default = action;
103
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/yonoma/sendEvent/index.ts"],"names":[],"mappings":";;AAAA,wDAAgF;AAIhF,2CAA4C;AAE5C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,oEAAoE;IACjF,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,KAAK,EAAE;YACL,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,iCAAiC;YAC9C,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;SAChC;QACD,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,wFAAwF;YACrG,QAAQ,EAAE,IAAI;YACd,oBAAoB,EAAE,KAAK;YAC3B,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,KAAK,EAAE,SAAS;oBAChB,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,uCAAuC;iBACrD;gBACD,WAAW,EAAE;oBACX,KAAK,EAAE,cAAc;oBACrB,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,oCAAoC;oBACjD,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QACpC,MAAM,EACJ,KAAK,EACL,UAAU,EACV,WAAW,EAAE,EACX,MAAM,EACN,KAAK,GACN,GAAG,EAAE,EACN,MAAM,EACN,SAAS,EACV,GAAG,OAAO,CAAA;QAEX,IAAG,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;YACrB,MAAM,IAAI,qCAAsB,CAAC,wDAAwD,CAAC,CAAA;QAC5F,CAAC;QAED,OAAO,UAAU,EAAE,KAAK,CAAA;QACxB,OAAO,UAAU,EAAE,OAAO,CAAA;QAE1B,MAAM,IAAI,GAAkB;YAC1B,KAAK;YACL,MAAM;YACN,MAAM;YACN,UAAU;YACV,SAAS;SACV,CAAA;QAED,OAAO,MAAM,OAAO,CAAC,0BAAc,EAAE;YACnC,MAAM,EAAE,MAAM;YACd,IAAI;SACL,CAAC,CAAA;IAEJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -1,10 +0,0 @@
1
- export interface SendEventJSON {
2
- event: string;
3
- userId?: string;
4
- email?: string;
5
- listId: string;
6
- properties?: {
7
- [key: string]: unknown;
8
- };
9
- timestamp?: string | number;
10
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/destinations/yonoma/sendEvent/types.ts"],"names":[],"mappings":""}