@segment/action-destinations 3.378.0 → 3.380.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 (65) hide show
  1. package/dist/destinations/algolia-insights/conversionEvents/index.d.ts +2 -1
  2. package/dist/destinations/algolia-insights/conversionEvents/index.js +141 -133
  3. package/dist/destinations/algolia-insights/conversionEvents/index.js.map +1 -1
  4. package/dist/destinations/algolia-insights/index.js +2 -2
  5. package/dist/destinations/algolia-insights/index.js.map +1 -1
  6. package/dist/destinations/algolia-insights/productAddedEvents/index.d.ts +1 -2
  7. package/dist/destinations/algolia-insights/productAddedEvents/index.js +3 -11
  8. package/dist/destinations/algolia-insights/productAddedEvents/index.js.map +1 -1
  9. package/dist/destinations/amazon-eventbridge/functions.js +5 -0
  10. package/dist/destinations/amazon-eventbridge/functions.js.map +1 -1
  11. package/dist/destinations/amazon-eventbridge/send/index.js +2 -1
  12. package/dist/destinations/amazon-eventbridge/send/index.js.map +1 -1
  13. package/dist/destinations/braze-cohorts/syncAudiences/index.js +1 -0
  14. package/dist/destinations/braze-cohorts/syncAudiences/index.js.map +1 -1
  15. package/dist/destinations/criteo-audiences/generated-types.d.ts +1 -0
  16. package/dist/destinations/criteo-audiences/index.js +7 -0
  17. package/dist/destinations/criteo-audiences/index.js.map +1 -1
  18. package/dist/destinations/google-enhanced-conversions/functions.js +1 -1
  19. package/dist/destinations/google-enhanced-conversions/functions.js.map +1 -1
  20. package/dist/destinations/index.js +1 -0
  21. package/dist/destinations/index.js.map +1 -1
  22. package/dist/destinations/klaviyo/functions.js +20 -5
  23. package/dist/destinations/klaviyo/functions.js.map +1 -1
  24. package/dist/destinations/klaviyo/types.d.ts +15 -0
  25. package/dist/destinations/salesforce/sf-operations.js +21 -6
  26. package/dist/destinations/salesforce/sf-operations.js.map +1 -1
  27. package/dist/destinations/salesforce/sf-utils.d.ts +6 -1
  28. package/dist/destinations/salesforce/sf-utils.js +18 -3
  29. package/dist/destinations/salesforce/sf-utils.js.map +1 -1
  30. package/dist/destinations/salesforce-marketing-cloud/contactDataExtensionV2/generated-types.d.ts +59 -0
  31. package/dist/destinations/salesforce-marketing-cloud/contactDataExtensionV2/generated-types.js +3 -0
  32. package/dist/destinations/salesforce-marketing-cloud/contactDataExtensionV2/generated-types.js.map +1 -0
  33. package/dist/destinations/salesforce-marketing-cloud/contactDataExtensionV2/index.d.ts +5 -0
  34. package/dist/destinations/salesforce-marketing-cloud/contactDataExtensionV2/index.js +68 -0
  35. package/dist/destinations/salesforce-marketing-cloud/contactDataExtensionV2/index.js.map +1 -0
  36. package/dist/destinations/salesforce-marketing-cloud/dataExtensionV2/generated-types.d.ts +58 -0
  37. package/dist/destinations/salesforce-marketing-cloud/dataExtensionV2/generated-types.js +3 -0
  38. package/dist/destinations/salesforce-marketing-cloud/dataExtensionV2/generated-types.js.map +1 -0
  39. package/dist/destinations/salesforce-marketing-cloud/dataExtensionV2/index.d.ts +5 -0
  40. package/dist/destinations/salesforce-marketing-cloud/dataExtensionV2/index.js +53 -0
  41. package/dist/destinations/salesforce-marketing-cloud/dataExtensionV2/index.js.map +1 -0
  42. package/dist/destinations/salesforce-marketing-cloud/index.js +5 -1
  43. package/dist/destinations/salesforce-marketing-cloud/index.js.map +1 -1
  44. package/dist/destinations/salesforce-marketing-cloud/sfmc-operations.d.ts +12 -2
  45. package/dist/destinations/salesforce-marketing-cloud/sfmc-operations.js +352 -3
  46. package/dist/destinations/salesforce-marketing-cloud/sfmc-operations.js.map +1 -1
  47. package/dist/destinations/salesforce-marketing-cloud/sfmc-properties.d.ts +2 -0
  48. package/dist/destinations/salesforce-marketing-cloud/sfmc-properties.js +156 -1
  49. package/dist/destinations/salesforce-marketing-cloud/sfmc-properties.js.map +1 -1
  50. package/dist/destinations/twilio-messaging-omnichannel/generated-types.d.ts +4 -0
  51. package/dist/destinations/twilio-messaging-omnichannel/generated-types.js +3 -0
  52. package/dist/destinations/twilio-messaging-omnichannel/generated-types.js.map +1 -0
  53. package/dist/destinations/twilio-messaging-omnichannel/index.d.ts +4 -0
  54. package/dist/destinations/twilio-messaging-omnichannel/index.js +43 -0
  55. package/dist/destinations/twilio-messaging-omnichannel/index.js.map +1 -0
  56. package/dist/destinations/twilio-messaging-omnichannel/sendMessage/fields.d.ts +2 -0
  57. package/dist/destinations/twilio-messaging-omnichannel/sendMessage/fields.js +255 -0
  58. package/dist/destinations/twilio-messaging-omnichannel/sendMessage/fields.js.map +1 -0
  59. package/dist/destinations/twilio-messaging-omnichannel/sendMessage/generated-types.d.ts +42 -0
  60. package/dist/destinations/twilio-messaging-omnichannel/sendMessage/generated-types.js +3 -0
  61. package/dist/destinations/twilio-messaging-omnichannel/sendMessage/generated-types.js.map +1 -0
  62. package/dist/destinations/twilio-messaging-omnichannel/sendMessage/index.d.ts +5 -0
  63. package/dist/destinations/twilio-messaging-omnichannel/sendMessage/index.js +13 -0
  64. package/dist/destinations/twilio-messaging-omnichannel/sendMessage/index.js.map +1 -0
  65. package/package.json +4 -4
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.batch_size = exports.enable_batching = exports.eventData = exports.eventDefinitionKey = exports.values_dataExtensionFields = exports.values_contactFields = exports.keys = exports.id = exports.key = exports.contactKeyAPIEvent = exports.contactKey = void 0;
3
+ exports.dataExtensionHook = exports.batch_size = exports.enable_batching = exports.eventData = exports.eventDefinitionKey = exports.values_dataExtensionFields = exports.values_contactFields = exports.keys = exports.id = exports.key = exports.contactKeyAPIEvent = exports.contactKey = void 0;
4
+ const sfmc_operations_1 = require("./sfmc-operations");
4
5
  exports.contactKey = {
5
6
  label: 'Contact Key',
6
7
  description: 'The unique identifier that you assign to a contact. This will be used to create a contact if one does not already exist with this Contact Key.',
@@ -72,4 +73,158 @@ exports.batch_size = {
72
73
  unsafe_hidden: true,
73
74
  default: 10
74
75
  };
76
+ const CREATE_OPERATION = {
77
+ match: 'all',
78
+ conditions: [{ fieldKey: 'operation', operator: 'is', value: 'create' }]
79
+ };
80
+ const SELECT_OPERATION = {
81
+ match: 'all',
82
+ conditions: [{ fieldKey: 'operation', operator: 'is', value: 'select' }]
83
+ };
84
+ const IS_SENDABLE = {
85
+ match: 'all',
86
+ conditions: [{ fieldKey: 'isSendable', operator: 'is', value: true }]
87
+ };
88
+ exports.dataExtensionHook = {
89
+ label: 'Create or Select Data Extension',
90
+ description: 'Connect to an existing data extension or create a new one in Salesforce Marketing Cloud.',
91
+ inputFields: {
92
+ operation: {
93
+ label: 'Operation',
94
+ description: 'Whether to create a new data extension or select an existing one for data delivery.',
95
+ type: 'string',
96
+ choices: [
97
+ { label: 'Create a new Data Extension', value: 'create' },
98
+ { label: 'Select an existing Data Extension', value: 'select' }
99
+ ],
100
+ required: true
101
+ },
102
+ dataExtensionId: {
103
+ label: 'Data Extension ID',
104
+ description: 'The identifier for the data extension.',
105
+ type: 'string',
106
+ depends_on: SELECT_OPERATION,
107
+ dynamic: async (request, { dynamicFieldContext, settings }) => {
108
+ const query = dynamicFieldContext?.query;
109
+ return await (0, sfmc_operations_1.getDataExtensions)(request, settings.subdomain, settings, query);
110
+ }
111
+ },
112
+ categoryId: {
113
+ label: 'Category ID (Folder ID)',
114
+ description: 'The identifier for the folder that contains the data extension.',
115
+ type: 'string',
116
+ required: CREATE_OPERATION,
117
+ depends_on: CREATE_OPERATION,
118
+ dynamic: async (request, { settings }) => {
119
+ return await (0, sfmc_operations_1.getCategories)(request, settings);
120
+ }
121
+ },
122
+ name: {
123
+ label: 'Data Extension Name',
124
+ description: 'The name of the data extension.',
125
+ type: 'string',
126
+ required: CREATE_OPERATION,
127
+ depends_on: CREATE_OPERATION
128
+ },
129
+ description: {
130
+ label: 'Data Extension Description',
131
+ description: 'The description of the data extension.',
132
+ type: 'string',
133
+ depends_on: CREATE_OPERATION
134
+ },
135
+ isSendable: {
136
+ label: 'Is Sendable',
137
+ type: 'boolean',
138
+ depends_on: CREATE_OPERATION,
139
+ description: 'Indicates whether the custom object can be used to send messages. If the value of this property is true, then the custom object is sendable'
140
+ },
141
+ sendableCustomObjectField: {
142
+ label: 'Sendable Custom Object Field',
143
+ description: 'The field on this data extension which is sendable. This must be a field that is present on this data extension.',
144
+ type: 'string',
145
+ depends_on: IS_SENDABLE,
146
+ required: IS_SENDABLE
147
+ },
148
+ sendableSubscriberField: {
149
+ label: 'Sendable Subscriber Field',
150
+ description: 'The relationship with "Subscribers" for the Sendable Custom Object Field.',
151
+ type: 'string',
152
+ depends_on: IS_SENDABLE,
153
+ required: IS_SENDABLE,
154
+ choices: [
155
+ { label: 'Subscriber Key', value: '_SubscriberKey' },
156
+ { label: 'Subscriber ID', value: '_SubscriberID' }
157
+ ]
158
+ },
159
+ columns: {
160
+ label: 'Data Extension Fields',
161
+ description: 'A list of fields to create in the data extension.',
162
+ type: 'object',
163
+ multiple: true,
164
+ defaultObjectUI: 'arrayeditor',
165
+ additionalProperties: true,
166
+ required: CREATE_OPERATION,
167
+ depends_on: CREATE_OPERATION,
168
+ properties: {
169
+ name: {
170
+ label: 'Field Name',
171
+ description: 'The name of the field.',
172
+ type: 'string',
173
+ required: true
174
+ },
175
+ type: {
176
+ label: 'Field Type',
177
+ description: 'The data type of the field.',
178
+ type: 'string',
179
+ required: true,
180
+ choices: ['Text', 'Number', 'Date', 'Boolean', 'EmailAddress', 'Phone', 'Decimal', 'Locale']
181
+ },
182
+ isNullable: {
183
+ label: 'Is Nullable',
184
+ description: 'Whether the field can be null.',
185
+ type: 'boolean',
186
+ required: true
187
+ },
188
+ isPrimaryKey: {
189
+ label: 'Is Primary Key',
190
+ description: 'Whether the field is a primary key.',
191
+ type: 'boolean',
192
+ required: true
193
+ },
194
+ length: {
195
+ label: 'Field Length',
196
+ description: 'The length of the field. Required for non-boolean fields',
197
+ type: 'integer'
198
+ },
199
+ scale: {
200
+ label: 'Decimal Scale',
201
+ description: 'The scale of the field. Required for Decimal fields',
202
+ type: 'integer'
203
+ },
204
+ description: {
205
+ label: 'Field Description',
206
+ description: 'The description of the field.',
207
+ type: 'string'
208
+ }
209
+ }
210
+ }
211
+ },
212
+ performHook: async (request, { settings, hookInputs }) => {
213
+ return await (0, sfmc_operations_1.selectOrCreateDataExtension)(request, settings.subdomain, hookInputs, settings);
214
+ },
215
+ outputTypes: {
216
+ id: {
217
+ label: 'Data Extension ID',
218
+ description: 'The identifier for the data extension.',
219
+ type: 'string',
220
+ required: true
221
+ },
222
+ name: {
223
+ label: 'Data Extension Name',
224
+ description: 'The name of the data extension.',
225
+ type: 'string',
226
+ required: true
227
+ }
228
+ }
229
+ };
75
230
  //# sourceMappingURL=sfmc-properties.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sfmc-properties.js","sourceRoot":"","sources":["../../../src/destinations/salesforce-marketing-cloud/sfmc-properties.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAe;IACpC,KAAK,EAAE,aAAa;IACpB,WAAW,EACT,gJAAgJ;IAClJ,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;CACjC,CAAA;AAEY,QAAA,kBAAkB,GAAe;IAC5C,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,kEAAkE;IAC/E,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;IAChC,QAAQ,EAAE,IAAI;CACf,CAAA;AAEY,QAAA,GAAG,GAAe;IAC7B,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EACT,mMAAmM;IACrM,IAAI,EAAE,QAAQ;CACf,CAAA;AAEY,QAAA,EAAE,GAAe;IAC5B,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EACT,gLAAgL;IAClL,IAAI,EAAE,QAAQ;CACf,CAAA;AAEY,QAAA,IAAI,GAAe;IAC9B,KAAK,EAAE,6BAA6B;IACpC,WAAW,EACT,sVAAsV;IACxV,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,IAAI;IACd,eAAe,EAAE,eAAe;IAChC,oBAAoB,EAAE,IAAI;CAC3B,CAAA;AAEY,QAAA,oBAAoB,GAAe;IAC9C,KAAK,EAAE,gBAAgB;IACvB,WAAW,EACT,iWAAiW;IACnW,IAAI,EAAE,QAAQ;IACd,eAAe,EAAE,eAAe;IAChC,QAAQ,EAAE,IAAI;CACf,CAAA;AAEY,QAAA,0BAA0B,GAAe;IACpD,KAAK,EAAE,uBAAuB;IAC9B,WAAW,EACT,iXAAiX;IACnX,IAAI,EAAE,QAAQ;IACd,eAAe,EAAE,eAAe;IAChC,QAAQ,EAAE,IAAI;CACf,CAAA;AAEY,QAAA,kBAAkB,GAAe;IAC5C,KAAK,EAAE,sBAAsB;IAC7B,WAAW,EACT,wHAAwH;IAC1H,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,IAAI;CACf,CAAA;AAEY,QAAA,SAAS,GAAe;IACnC,KAAK,EAAE,YAAY;IACnB,WAAW,EACT,6SAA6S;IAC/S,IAAI,EAAE,QAAQ;IACd,eAAe,EAAE,eAAe;CACjC,CAAA;AAEY,QAAA,eAAe,GAAe;IACzC,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EAAE,qEAAqE;IAClF,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,KAAK;CACf,CAAA;AAEY,QAAA,UAAU,GAAe;IACpC,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,qFAAqF;IAClG,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,KAAK;IACf,aAAa,EAAE,IAAI;IAMnB,OAAO,EAAE,EAAE;CACZ,CAAA"}
1
+ {"version":3,"file":"sfmc-properties.js","sourceRoot":"","sources":["../../../src/destinations/salesforce-marketing-cloud/sfmc-properties.ts"],"names":[],"mappings":";;;AAEA,uDAAiG;AAEpF,QAAA,UAAU,GAAe;IACpC,KAAK,EAAE,aAAa;IACpB,WAAW,EACT,gJAAgJ;IAClJ,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;C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ACrB,WAAW,EAAE,0DAA0D;oBACvE,IAAI,EAAE,SAAS;iBAChB;gBACD,KAAK,EAAE;oBACL,KAAK,EAAE,eAAe;oBACtB,WAAW,EAAE,qDAAqD;oBAClE,IAAI,EAAE,SAAS;iBAChB;gBACD,WAAW,EAAE;oBACX,KAAK,EAAE,mBAAmB;oBAC1B,WAAW,EAAE,+BAA+B;oBAC5C,IAAI,EAAE,QAAQ;iBACf;aACF;SACF;KACF;IACD,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE;QACvD,OAAO,MAAM,IAAA,6CAA2B,EAAC,OAAO,EAAE,QAAQ,CAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAA;IAC7F,CAAC;IACD,WAAW,EAAE;QACX,EAAE,EAAE;YACF,KAAK,EAAE,mBAAmB;YAC1B,WAAW,EAAE,wCAAwC;YACrD,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,qBAAqB;YAC5B,WAAW,EAAE,iCAAiC;YAC9C,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;KACF;CACF,CAAA"}
@@ -0,0 +1,4 @@
1
+ export interface Settings {
2
+ username: string;
3
+ password: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/twilio-messaging-omnichannel/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { DestinationDefinition } from '@segment/actions-core';
2
+ import type { Settings } from './generated-types';
3
+ declare const destination: DestinationDefinition<Settings>;
4
+ export default destination;
@@ -0,0 +1,43 @@
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 sendMessage_1 = __importDefault(require("./sendMessage"));
7
+ const destination = {
8
+ name: 'Twilio Messaging Omnichannel',
9
+ slug: 'actions-twilio-messaging-omnichannel',
10
+ mode: 'cloud',
11
+ authentication: {
12
+ scheme: 'basic',
13
+ fields: {
14
+ username: {
15
+ label: 'Twilio Account SID.',
16
+ description: 'Twilio Account SID. This can be found in the [Twilio Console](https://www.twilio.com/docs/usage/api#authenticate-with-http:~:text=token%20in%20the-,Twilio%20Console,-after%20signing%20up).',
17
+ type: 'string',
18
+ required: true
19
+ },
20
+ password: {
21
+ label: 'AUTH Token',
22
+ description: 'AUTH Token. This can be found in the [Twilio Console](https://www.twilio.com/docs/usage/api#authenticate-with-http:~:text=token%20in%20the-,Twilio%20Console,-after%20signing%20up).',
23
+ type: 'password',
24
+ required: true
25
+ }
26
+ },
27
+ testAuthentication: (request) => {
28
+ return request(`https://api.twilio.com/2010-04-01`);
29
+ }
30
+ },
31
+ extendRequest({ settings }) {
32
+ return {
33
+ 'Content-Type': 'application/json',
34
+ username: settings.username,
35
+ password: settings.password
36
+ };
37
+ },
38
+ actions: {
39
+ sendMessage: sendMessage_1.default
40
+ }
41
+ };
42
+ exports.default = destination;
43
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/twilio-messaging-omnichannel/index.ts"],"names":[],"mappings":";;;;;AAGA,gEAAuC;AAEvC,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,8BAA8B;IACpC,IAAI,EAAE,sCAAsC;IAC5C,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,OAAO;QACf,MAAM,EAAE;YACN,QAAQ,EAAE;gBACR,KAAK,EAAE,qBAAqB;gBAC5B,WAAW,EACT,8LAA8L;gBAChM,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,QAAQ,EAAE;gBACR,KAAK,EAAE,YAAY;gBACnB,WAAW,EACT,sLAAsL;gBACxL,IAAI,EAAE,UAAU;gBAChB,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE;YAC9B,OAAO,OAAO,CAAC,mCAAmC,CAAC,CAAA;QACrD,CAAC;KACF;IAED,aAAa,CAAC,EAAE,QAAQ,EAAE;QACxB,OAAO;YACL,cAAc,EAAE,kBAAkB;YAClC,QAAQ,EAAE,QAAQ,CAAC,QAAQ;YAC3B,QAAQ,EAAE,QAAQ,CAAC,QAAQ;SAC5B,CAAA;IACH,CAAC;IAED,OAAO,EAAE;QACP,WAAW,EAAX,qBAAW;KACZ;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { InputField } from '@segment/actions-core';
2
+ export declare const fields: Record<string, InputField>;
@@ -0,0 +1,255 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fields = void 0;
4
+ const DEPENDS_ON_MESSAGE_ADDRESS_SENDER = {
5
+ match: 'all',
6
+ conditions: [
7
+ {
8
+ fieldKey: 'from',
9
+ operator: 'is',
10
+ value: 'MessageAddressSender'
11
+ }
12
+ ]
13
+ };
14
+ const DEPENDS_ON_AGENT_ID_SENDER = {
15
+ match: 'all',
16
+ conditions: [
17
+ {
18
+ fieldKey: 'from',
19
+ operator: 'is',
20
+ value: 'AgentIdSender'
21
+ }
22
+ ]
23
+ };
24
+ const DEPENDS_ON_AGENT_POOL_ID_SENDER = {
25
+ match: 'all',
26
+ conditions: [
27
+ {
28
+ fieldKey: 'from',
29
+ operator: 'is',
30
+ value: 'AgentPoolIdSender'
31
+ }
32
+ ]
33
+ };
34
+ const DEPENDS_ON_MESSAGE_CONTENT_TEXT = {
35
+ match: 'all',
36
+ conditions: [
37
+ {
38
+ fieldKey: 'content_type',
39
+ operator: 'is',
40
+ value: 'MessageContentText'
41
+ }
42
+ ]
43
+ };
44
+ const DEPENDS_ON_MESSAGE_CONTENT_TEMPLATE = {
45
+ match: 'all',
46
+ conditions: [
47
+ {
48
+ fieldKey: 'content_type',
49
+ operator: 'is',
50
+ value: 'MessageContentTemplate'
51
+ }
52
+ ]
53
+ };
54
+ exports.fields = {
55
+ fromObject: {
56
+ type: 'object',
57
+ label: 'From',
58
+ description: 'Defines the fields applicable based on the selected sender type.',
59
+ required: true,
60
+ multiple: true,
61
+ properties: {
62
+ from: {
63
+ type: 'string',
64
+ label: 'From',
65
+ description: 'The type of sender.',
66
+ choices: [
67
+ { label: 'Message Address Sender', value: 'MessageAddressSender' },
68
+ { label: 'Agent ID Sender', value: 'AgentIdSender' },
69
+ { label: 'Agent Pool ID Sender', value: 'AgentPoolIdSender' }
70
+ ]
71
+ },
72
+ address: {
73
+ type: 'string',
74
+ label: 'Address',
75
+ description: 'The identifier within a channel address space for an actor.',
76
+ depends_on: DEPENDS_ON_MESSAGE_ADDRESS_SENDER
77
+ },
78
+ channel: {
79
+ type: 'string',
80
+ label: 'Channel',
81
+ description: 'The channels available for the Message entity.',
82
+ choices: [
83
+ { label: 'Phone', value: 'phone' },
84
+ { label: 'RCS', value: 'rcs' },
85
+ { label: 'WhatsApp', value: 'whatsapp' },
86
+ { label: 'Facebook Messenger', value: 'fbm' }
87
+ ],
88
+ depends_on: DEPENDS_ON_MESSAGE_ADDRESS_SENDER
89
+ },
90
+ agent_id: {
91
+ type: 'string',
92
+ label: 'Agent ID',
93
+ description: 'A reference to an Agent.',
94
+ depends_on: DEPENDS_ON_AGENT_ID_SENDER
95
+ },
96
+ agent_pool_id: {
97
+ type: 'string',
98
+ label: 'Agent Pool ID',
99
+ description: 'A reference to an Agent Pool.',
100
+ depends_on: DEPENDS_ON_AGENT_POOL_ID_SENDER
101
+ }
102
+ }
103
+ },
104
+ to: {
105
+ type: 'object',
106
+ label: 'To',
107
+ description: 'An array of recipient objects to send the message(s) to.',
108
+ required: true,
109
+ multiple: true,
110
+ properties: {
111
+ address: {
112
+ type: 'string',
113
+ label: 'Address',
114
+ description: 'The identifier within a channel address space for an actor (e.g. phone number).',
115
+ required: true
116
+ },
117
+ channel: {
118
+ type: 'string',
119
+ label: 'Channel',
120
+ description: 'The channels available for the Message entity.',
121
+ choices: [
122
+ { label: 'Phone', value: 'phone' },
123
+ { label: 'WhatsApp', value: 'whatsapp' },
124
+ { label: 'Facebook Messenger', value: 'fbm' }
125
+ ],
126
+ required: true
127
+ },
128
+ variables: {
129
+ type: 'object',
130
+ label: 'Variables',
131
+ defaultObjectUI: 'keyvalue:only',
132
+ description: 'To personalize content for each recipient, supply variables here with values to substitute into any Liquid templated content string or pre-stored Content template.'
133
+ }
134
+ }
135
+ },
136
+ content: {
137
+ type: 'object',
138
+ label: 'Content',
139
+ description: 'Defines the fields applicable based on the selected content type.',
140
+ required: true,
141
+ properties: {
142
+ content_type: {
143
+ type: 'string',
144
+ label: 'Content Type',
145
+ description: 'The type of message content.',
146
+ choices: [
147
+ { label: 'Text Content', value: 'MessageContentText' },
148
+ { label: 'Template Content', value: 'MessageContentTemplate' }
149
+ ]
150
+ },
151
+ text: {
152
+ type: 'string',
153
+ label: 'Text',
154
+ description: 'A simple string or templated content.',
155
+ required: true,
156
+ depends_on: DEPENDS_ON_MESSAGE_CONTENT_TEXT
157
+ },
158
+ title: {
159
+ type: 'string',
160
+ label: 'Title',
161
+ description: 'Optional title prepended to the message.',
162
+ depends_on: DEPENDS_ON_MESSAGE_CONTENT_TEXT
163
+ },
164
+ default_variables: {
165
+ type: 'object',
166
+ label: 'Default Variables',
167
+ defaultObjectUI: 'keyvalue:only',
168
+ description: 'Default values for use within the templated content field text and title.',
169
+ depends_on: DEPENDS_ON_MESSAGE_CONTENT_TEXT
170
+ },
171
+ content_id: {
172
+ type: 'string',
173
+ label: 'Content ID',
174
+ description: 'A reference to a Content template.',
175
+ required: true,
176
+ depends_on: DEPENDS_ON_MESSAGE_CONTENT_TEMPLATE
177
+ }
178
+ }
179
+ },
180
+ channels: {
181
+ type: 'string',
182
+ label: 'Channels',
183
+ description: 'A list of eligible channels to constrain Messages to; leave undefined to send across all available channels.'
184
+ },
185
+ schedule: {
186
+ type: 'object',
187
+ label: 'Schedule',
188
+ description: 'A schedule defines when a communication will be sent to a recipient.',
189
+ properties: {
190
+ send_at: {
191
+ type: 'string',
192
+ label: 'Send At',
193
+ description: 'List of expressions defining when the message may be sent.',
194
+ },
195
+ quiet_hours: {
196
+ type: 'string',
197
+ label: 'Quiet Hours',
198
+ description: 'List of expressions defining when the message may NOT be sent.',
199
+ },
200
+ ignore_compliances: {
201
+ type: 'string',
202
+ label: 'Ignore Compliances',
203
+ description: 'List of compliance rules to ignore.',
204
+ choices: [
205
+ { label: 'All', value: 'all' },
206
+ { label: 'France Marketing', value: 'france_marketing' },
207
+ { label: 'EU All', value: 'eu_all' }
208
+ ]
209
+ },
210
+ frequency_cap: {
211
+ type: 'object',
212
+ label: 'Frequency Cap',
213
+ description: `Optimize the send time to prevent exceeding the count of communications sent to the recipient(s) for any time window of length period.`,
214
+ properties: {
215
+ count: {
216
+ type: 'string',
217
+ label: 'Count',
218
+ description: 'The number of communications.',
219
+ },
220
+ period: {
221
+ type: 'string',
222
+ label: 'Period',
223
+ description: 'The duration for calculating the frequency count.',
224
+ default: 'P1D'
225
+ }
226
+ }
227
+ },
228
+ ttl: {
229
+ type: 'string',
230
+ label: 'TTL',
231
+ description: 'Time-to-live for the communication.',
232
+ default: 'P1D'
233
+ }
234
+ }
235
+ },
236
+ use_domain: {
237
+ type: 'object',
238
+ label: 'Use Domain',
239
+ description: 'The Domain to use for wrapping links for click-tracked links and shortened links.',
240
+ properties: {
241
+ domain_name: {
242
+ type: 'string',
243
+ label: 'Domain Name',
244
+ description: 'A fully qualified domain name (FQDN) that you have registered with your DNS provider.'
245
+ }
246
+ }
247
+ },
248
+ tags: {
249
+ type: 'object',
250
+ label: 'Tags',
251
+ description: 'Custom metadata in the form of key-value pairs. Maximum size of a tag key is 128 characters. Maximum size of a tag value is 256 characters. There can be a maximum of 10 key-value pairs.',
252
+ defaultObjectUI: 'keyvalue:only'
253
+ }
254
+ };
255
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../src/destinations/twilio-messaging-omnichannel/sendMessage/fields.ts"],"names":[],"mappings":";;;AAIA,MAAM,iCAAiC,GAAwB;IAC3D,KAAK,EAAE,KAAK;IACZ,UAAU,EAAE;QACR;YACI,QAAQ,EAAE,MAAM;YAChB,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,sBAAsB;SAChC;KACJ;CACJ,CAAA;AAED,MAAM,0BAA0B,GAAwB;IACpD,KAAK,EAAE,KAAK;IACZ,UAAU,EAAE;QACR;YACI,QAAQ,EAAE,MAAM;YAChB,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,eAAe;SACzB;KACJ;CACJ,CAAA;AAED,MAAM,+BAA+B,GAAwB;IACzD,KAAK,EAAE,KAAK;IACZ,UAAU,EAAE;QACR;YACI,QAAQ,EAAE,MAAM;YAChB,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,mBAAmB;SAC7B;KACJ;CACJ,CAAA;AAED,MAAM,+BAA+B,GAAwB;IACzD,KAAK,EAAE,KAAK;IACZ,UAAU,EAAE;QACR;YACI,QAAQ,EAAE,cAAc;YACxB,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,oBAAoB;SAC9B;KACJ;CACJ,CAAA;AAED,MAAM,mCAAmC,GAAwB;IAC7D,KAAK,EAAE,KAAK;IACZ,UAAU,EAAE;QACR;YACI,QAAQ,EAAE,cAAc;YACxB,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,wBAAwB;SAClC;KACJ;CACJ,CAAA;AAGY,QAAA,MAAM,GAA+B;IAC9C,UAAU,EAAE;QACR,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,MAAM;QACb,WAAW,EAAE,kEAAk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gBACX,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,eAAe;gBACtB,WAAW,EAAE,wIAAwI;gBACrJ,UAAU,EAAE;oBACR,KAAK,EAAE;wBACH,IAAI,EAAE,QAAQ;wBACd,KAAK,EAAE,OAAO;wBACd,WAAW,EAAE,+BAA+B;qBAC/C;oBACD,MAAM,EAAE;wBACJ,IAAI,EAAE,QAAQ;wBACd,KAAK,EAAE,QAAQ;wBACf,WAAW,EAAE,mDAAmD;wBAChE,OAAO,EAAE,KAAK;qBACjB;iBACJ;aACJ;YACD,GAAG,EAAE;gBACD,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,KAAK;gBACZ,WAAW,EAAE,qCAAqC;gBAClD,OAAO,EAAE,KAAK;aACjB;SACJ;KACJ;IACD,UAAU,EAAE;QACR,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,mFAAmF;QAChG,UAAU,EAAE;YACR,WAAW,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,aAAa;gBACpB,WAAW,EAAE,uFAAuF;aACvG;SACJ;KACJ;IACD,IAAI,EAAE;QACF,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,MAAM;QACb,WAAW,EAAE,2LAA2L;QACxM,eAAe,EAAE,eAAe;KACnC;CAEJ,CAAA"}
@@ -0,0 +1,42 @@
1
+ export interface Payload {
2
+ fromObject: {
3
+ from?: string;
4
+ address?: string;
5
+ channel?: string;
6
+ agent_id?: string;
7
+ agent_pool_id?: string;
8
+ }[];
9
+ to: {
10
+ address: string;
11
+ channel: string;
12
+ variables?: {
13
+ [k: string]: unknown;
14
+ };
15
+ }[];
16
+ content: {
17
+ content_type?: string;
18
+ text: string;
19
+ title?: string;
20
+ default_variables?: {
21
+ [k: string]: unknown;
22
+ };
23
+ content_id: string;
24
+ };
25
+ channels?: string;
26
+ schedule?: {
27
+ send_at?: string;
28
+ quiet_hours?: string;
29
+ ignore_compliances?: string;
30
+ frequency_cap?: {
31
+ count?: string;
32
+ period?: string;
33
+ };
34
+ ttl?: string;
35
+ };
36
+ use_domain?: {
37
+ domain_name?: string;
38
+ };
39
+ tags?: {
40
+ [k: string]: unknown;
41
+ };
42
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/twilio-messaging-omnichannel/sendMessage/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import type { ActionDefinition } from '@segment/actions-core';
2
+ import type { Settings } from '../generated-types';
3
+ import type { Payload } from './generated-types';
4
+ declare const action: ActionDefinition<Settings, Payload>;
5
+ export default action;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const fields_1 = require("./fields");
4
+ const action = {
5
+ title: 'Send Message',
6
+ description: 'This operation creates and sends out messages to the specified recipients.',
7
+ fields: fields_1.fields,
8
+ perform: () => {
9
+ return "hello";
10
+ }
11
+ };
12
+ exports.default = action;
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/twilio-messaging-omnichannel/sendMessage/index.ts"],"names":[],"mappings":";;AAGA,qCAAiC;AAEjC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,4EAA4E;IACzF,MAAM,EAAN,eAAM;IACN,OAAO,EAAE,GAAG,EAAE;QACZ,OAAO,OAAO,CAAA;IAMhB,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.378.0",
4
+ "version": "3.380.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/segmentio/action-destinations",
@@ -45,8 +45,8 @@
45
45
  "@aws-sdk/client-s3": "^3.600.0",
46
46
  "@bufbuild/protobuf": "^2.2.3",
47
47
  "@segment/a1-notation": "^2.1.4",
48
- "@segment/actions-core": "^3.149.0",
49
- "@segment/actions-shared": "^1.130.0",
48
+ "@segment/actions-core": "^3.150.0",
49
+ "@segment/actions-shared": "^1.131.0",
50
50
  "@types/node": "^22.13.1",
51
51
  "ajv-formats": "^2.1.1",
52
52
  "aws4": "^1.12.0",
@@ -90,5 +90,5 @@
90
90
  "__tests__/__helpers__/"
91
91
  ]
92
92
  },
93
- "gitHead": "998877e182421d018279603fa054adb690af57fe"
93
+ "gitHead": "69fe56184f526f692267668df98a73e16c51f3c0"
94
94
  }