@segment/action-destinations 3.267.1-staging-dcda950e2 → 3.267.1-staging-90672a142
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.
- package/dist/destinations/dynamic-yield-audiences/syncAudience/types.d.ts +22 -0
- package/dist/destinations/dynamic-yield-audiences/syncAudience/types.js.map +1 -0
- package/dist/destinations/dynamic-yield-audiences/types.d.ts +8 -0
- package/dist/destinations/dynamic-yield-audiences/types.js +12 -0
- package/dist/destinations/dynamic-yield-audiences/types.js.map +1 -0
- package/dist/destinations/engage-messaging-sendgrid/index.d.ts +3 -4
- package/dist/destinations/engage-messaging-sendgrid/index.js +16 -68
- package/dist/destinations/engage-messaging-sendgrid/index.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/index.d.ts +3 -4
- package/dist/destinations/engage-messaging-twilio/index.js +15 -169
- package/dist/destinations/engage-messaging-twilio/index.js.map +1 -1
- package/dist/destinations/klaviyo/functions.d.ts +3 -1
- package/dist/destinations/klaviyo/functions.js +22 -1
- package/dist/destinations/klaviyo/functions.js.map +1 -1
- package/dist/destinations/klaviyo/types.d.ts +4 -0
- package/dist/destinations/klaviyo/types.js.map +1 -1
- package/dist/destinations/klaviyo/upsertProfile/generated-types.d.ts +1 -0
- package/dist/destinations/klaviyo/upsertProfile/index.js +15 -15
- package/dist/destinations/klaviyo/upsertProfile/index.js.map +1 -1
- package/dist/destinations/responsys/asyncMergePetRecords/generated-types.d.ts +14 -0
- package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js.map +1 -0
- package/dist/destinations/responsys/asyncMergePetRecords/index.d.ts +5 -0
- package/dist/destinations/responsys/asyncMergePetRecords/index.js +113 -0
- package/dist/destinations/responsys/asyncMergePetRecords/index.js.map +1 -0
- package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.d.ts +20 -0
- package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.js +3 -0
- package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.js.map +1 -0
- package/dist/destinations/responsys/asyncMergeProfileListMembers/index.d.ts +5 -0
- package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js +174 -0
- package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js.map +1 -0
- package/dist/destinations/responsys/rsp-operations.d.ts +14 -0
- package/dist/destinations/responsys/rsp-operations.js +33 -0
- package/dist/destinations/responsys/rsp-operations.js.map +1 -0
- package/dist/destinations/responsys/rsp-properties.d.ts +4 -0
- package/dist/destinations/responsys/rsp-properties.js +27 -0
- package/dist/destinations/responsys/rsp-properties.js.map +1 -0
- package/dist/destinations/responsys-cloud/generated-types.d.ts +20 -0
- package/dist/destinations/responsys-cloud/generated-types.js.map +1 -0
- package/dist/destinations/responsys-cloud/index.d.ts +4 -0
- package/dist/destinations/responsys-cloud/index.js +207 -0
- package/dist/destinations/responsys-cloud/index.js.map +1 -0
- package/dist/destinations/responsys-cloud/sendAudience/generated-types.d.ts +16 -0
- package/dist/destinations/responsys-cloud/sendAudience/generated-types.js.map +1 -0
- package/dist/destinations/{engage-messaging-sendgrid/previewApiLookup → responsys-cloud/sendAudience}/index.d.ts +2 -2
- package/dist/destinations/responsys-cloud/sendAudience/index.js +109 -0
- package/dist/destinations/responsys-cloud/sendAudience/index.js.map +1 -0
- package/dist/destinations/responsys-cloud/sendCustomTraits/generated-types.d.ts +11 -0
- package/dist/destinations/responsys-cloud/sendCustomTraits/generated-types.js.map +1 -0
- package/dist/destinations/{engage-messaging-sendgrid/sendEmail → responsys-cloud/sendCustomTraits}/index.d.ts +2 -2
- package/dist/destinations/responsys-cloud/sendCustomTraits/index.js +72 -0
- package/dist/destinations/responsys-cloud/sendCustomTraits/index.js.map +1 -0
- package/dist/destinations/responsys-cloud/shared_properties.d.ts +3 -0
- package/dist/destinations/responsys-cloud/shared_properties.js +19 -0
- package/dist/destinations/responsys-cloud/shared_properties.js.map +1 -0
- package/dist/destinations/responsys-cloud/types.d.ts +38 -0
- package/dist/destinations/{engage-messaging-sendgrid/sendEmail/UnlayerResponse.js → responsys-cloud/types.js} +1 -1
- package/dist/destinations/responsys-cloud/types.js.map +1 -0
- package/dist/destinations/responsys-cloud/upsertListMember/generated-types.d.ts +14 -0
- package/dist/destinations/responsys-cloud/upsertListMember/generated-types.js.map +1 -0
- package/dist/destinations/responsys-cloud/upsertListMember/index.d.ts +5 -0
- package/dist/destinations/responsys-cloud/upsertListMember/index.js +85 -0
- package/dist/destinations/responsys-cloud/upsertListMember/index.js.map +1 -0
- package/dist/destinations/responsys-cloud/utils.d.ts +20 -0
- package/dist/destinations/responsys-cloud/utils.js +179 -0
- package/dist/destinations/responsys-cloud/utils.js.map +1 -0
- package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.d.ts +1 -0
- package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.js +381 -0
- package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.js.map +1 -0
- package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.d.ts +1 -0
- package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.js +581 -0
- package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.js.map +1 -0
- package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.d.ts +4 -0
- package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.js +97 -0
- package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.js.map +1 -0
- package/dist/destinations/snap-conversions-api/snap-capi-properties.d.ts +30 -0
- package/dist/destinations/snap-conversions-api/snap-capi-properties.js +316 -0
- package/dist/destinations/snap-conversions-api/snap-capi-properties.js.map +1 -0
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.d.ts +3 -0
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js +34 -0
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.d.ts +3 -0
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js +43 -0
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js.map +1 -0
- package/package.json +1 -1
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/apiLookups.d.ts +0 -22
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/apiLookups.js +0 -189
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/apiLookups.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/generated-types.d.ts +0 -16
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/generated-types.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/index.js +0 -29
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/index.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.d.ts +0 -43
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.js +0 -419
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/UnlayerResponse.d.ts +0 -12
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/UnlayerResponse.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/generated-types.d.ts +0 -56
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/generated-types.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js +0 -258
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/insertEmailPreviewText.d.ts +0 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/insertEmailPreviewText.js +0 -23
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/insertEmailPreviewText.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/isRestrictedDomain.d.ts +0 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/isRestrictedDomain.js +0 -14
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/isRestrictedDomain.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/PushSender.d.ts +0 -29
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/PushSender.js +0 -169
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/PushSender.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/generated-types.d.ts +0 -39
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/generated-types.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/index.d.ts +0 -5
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/index.js +0 -251
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/index.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/SmsMessageSender.d.ts +0 -9
- package/dist/destinations/engage-messaging-twilio/sendSms/SmsMessageSender.js +0 -72
- package/dist/destinations/engage-messaging-twilio/sendSms/SmsMessageSender.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/generated-types.d.ts +0 -27
- package/dist/destinations/engage-messaging-twilio/sendSms/generated-types.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/index.d.ts +0 -5
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js +0 -163
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/WhatsAppMessageSender.d.ts +0 -9
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/WhatsAppMessageSender.js +0 -89
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/WhatsAppMessageSender.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/generated-types.d.ts +0 -25
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/generated-types.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/index.d.ts +0 -5
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/index.js +0 -137
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/index.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/utils/PhoneMessageSender.d.ts +0 -16
- package/dist/destinations/engage-messaging-twilio/utils/PhoneMessageSender.js +0 -71
- package/dist/destinations/engage-messaging-twilio/utils/PhoneMessageSender.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/utils/TwilioMessageSender.d.ts +0 -16
- package/dist/destinations/engage-messaging-twilio/utils/TwilioMessageSender.js +0 -115
- package/dist/destinations/engage-messaging-twilio/utils/TwilioMessageSender.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/utils/index.d.ts +0 -2
- package/dist/destinations/engage-messaging-twilio/utils/index.js +0 -15
- package/dist/destinations/engage-messaging-twilio/utils/index.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/utils/types.d.ts +0 -23
- package/dist/destinations/engage-messaging-twilio/utils/types.js.map +0 -1
- /package/dist/destinations/{engage-messaging-twilio/utils → dynamic-yield-audiences/syncAudience}/types.js +0 -0
- /package/dist/destinations/{engage-messaging-twilio/sendWhatsApp → responsys/asyncMergePetRecords}/generated-types.js +0 -0
- /package/dist/destinations/{engage-messaging-sendgrid/previewApiLookup → responsys-cloud}/generated-types.js +0 -0
- /package/dist/destinations/{engage-messaging-sendgrid/sendEmail → responsys-cloud/sendAudience}/generated-types.js +0 -0
- /package/dist/destinations/{engage-messaging-twilio/sendMobilePush → responsys-cloud/sendCustomTraits}/generated-types.js +0 -0
- /package/dist/destinations/{engage-messaging-twilio/sendSms → responsys-cloud/upsertListMember}/generated-types.js +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Payload } from './generated-types';
|
|
2
|
+
export interface Data {
|
|
3
|
+
payload: Payload & {
|
|
4
|
+
context?: {
|
|
5
|
+
[k: string]: unknown;
|
|
6
|
+
personas?: {
|
|
7
|
+
computation_key?: string;
|
|
8
|
+
computation_class?: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
rawData?: {
|
|
13
|
+
context?: {
|
|
14
|
+
personas?: {
|
|
15
|
+
computation_key?: string;
|
|
16
|
+
computation_class?: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
properties?: Record<string, boolean>;
|
|
20
|
+
traits?: Record<string, boolean>;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/destinations/dynamic-yield-audiences/syncAudience/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare type AudienceAction = 'ADD' | 'REMOVE';
|
|
2
|
+
export declare enum Priority {
|
|
3
|
+
UserIdThenEmail = "user_id_then_email",
|
|
4
|
+
UserIdThenAnonymousId = "user_id_then_anonymousId",
|
|
5
|
+
UserIdThenEmailThenAnonymousId = "user_id_then_email_then_anonymousId",
|
|
6
|
+
UserIdOnly = "user_id_only",
|
|
7
|
+
EmailOnly = "email_only"
|
|
8
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Priority = void 0;
|
|
4
|
+
var Priority;
|
|
5
|
+
(function (Priority) {
|
|
6
|
+
Priority["UserIdThenEmail"] = "user_id_then_email";
|
|
7
|
+
Priority["UserIdThenAnonymousId"] = "user_id_then_anonymousId";
|
|
8
|
+
Priority["UserIdThenEmailThenAnonymousId"] = "user_id_then_email_then_anonymousId";
|
|
9
|
+
Priority["UserIdOnly"] = "user_id_only";
|
|
10
|
+
Priority["EmailOnly"] = "email_only";
|
|
11
|
+
})(Priority = exports.Priority || (exports.Priority = {}));
|
|
12
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/destinations/dynamic-yield-audiences/types.ts"],"names":[],"mappings":";;;AAEA,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,kDAAsC,CAAA;IACtC,8DAAkD,CAAA;IAClD,kFAAsE,CAAA;IACtE,uCAA2B,CAAA;IAC3B,oCAAwB,CAAA;AAC1B,CAAC,EANW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAMnB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export default destinationDefinition;
|
|
1
|
+
import destination from '../engage/sendgrid';
|
|
2
|
+
export default destination;
|
|
3
|
+
export * from '../engage/sendgrid';
|
|
@@ -1,71 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
unlayerApiKey: {
|
|
15
|
-
label: 'Unlayer API Key',
|
|
16
|
-
type: 'password',
|
|
17
|
-
description: 'The API key for your Unlayer account'
|
|
18
|
-
},
|
|
19
|
-
sendGridApiKey: {
|
|
20
|
-
label: 'API Key',
|
|
21
|
-
type: 'password',
|
|
22
|
-
description: 'The Api Key for your SendGrid account',
|
|
23
|
-
required: true
|
|
24
|
-
},
|
|
25
|
-
profileApiEnvironment: {
|
|
26
|
-
label: 'Profile API Environment',
|
|
27
|
-
description: 'Profile API Environment',
|
|
28
|
-
type: 'string',
|
|
29
|
-
required: true
|
|
30
|
-
},
|
|
31
|
-
profileApiAccessToken: {
|
|
32
|
-
label: 'Profile API Access Token',
|
|
33
|
-
description: 'Profile API Access Token',
|
|
34
|
-
type: 'password',
|
|
35
|
-
required: true
|
|
36
|
-
},
|
|
37
|
-
spaceId: {
|
|
38
|
-
label: 'Space ID',
|
|
39
|
-
description: 'Space ID',
|
|
40
|
-
type: 'string',
|
|
41
|
-
required: true
|
|
42
|
-
},
|
|
43
|
-
sourceId: {
|
|
44
|
-
label: 'Source ID',
|
|
45
|
-
description: 'Source ID',
|
|
46
|
-
type: 'string',
|
|
47
|
-
required: true
|
|
48
|
-
},
|
|
49
|
-
region: {
|
|
50
|
-
label: 'Region',
|
|
51
|
-
description: 'The region where the email is originating from',
|
|
52
|
-
type: 'string',
|
|
53
|
-
choices: [
|
|
54
|
-
{ value: 'us-west-2', label: 'US West 2' },
|
|
55
|
-
{ value: 'eu-west-1', label: 'EU West 1' }
|
|
56
|
-
],
|
|
57
|
-
default: 'us-west-2',
|
|
58
|
-
required: false
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
testAuthentication: (request) => {
|
|
62
|
-
return request('https://api.sendgrid.com/v3/mail_settings');
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
actions: {
|
|
66
|
-
sendEmail: sendEmail_1.actionDefinition,
|
|
67
|
-
previewApiLookup: previewApiLookup_1.actionDefinition
|
|
68
|
-
}
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
69
14
|
};
|
|
70
|
-
exports
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
const sendgrid_1 = __importDefault(require("../engage/sendgrid"));
|
|
17
|
+
exports.default = sendgrid_1.default;
|
|
18
|
+
__exportStar(require("../engage/sendgrid"), exports);
|
|
71
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/engage-messaging-sendgrid/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/engage-messaging-sendgrid/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAOA,kEAA4C;AAC5C,kBAAe,kBAAW,CAAA;AAC1B,qDAAkC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export default destinationDefinition;
|
|
1
|
+
import destination from '../engage/twilio';
|
|
2
|
+
export default destination;
|
|
3
|
+
export * from '../engage/twilio';
|
|
@@ -1,173 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
const ConnectionOverridesProperties = {
|
|
13
|
-
ct: {
|
|
14
|
-
label: 'Connection timeout',
|
|
15
|
-
description: 'The timeout in milliseconds Twilio will wait to establish its TCP connection to your webserver',
|
|
16
|
-
type: 'number',
|
|
17
|
-
default: 5000,
|
|
18
|
-
choices: getRange(10000)
|
|
19
|
-
},
|
|
20
|
-
rt: {
|
|
21
|
-
label: 'Read timeout',
|
|
22
|
-
description: 'The amount of time in milliseconds after sending your webhook an HTTP request that Twilio will wait for the initial HTTP response packet',
|
|
23
|
-
type: 'number',
|
|
24
|
-
default: 15000,
|
|
25
|
-
choices: getRange(15000)
|
|
26
|
-
},
|
|
27
|
-
tt: {
|
|
28
|
-
label: 'Total timeout',
|
|
29
|
-
description: 'The total time allowed for all timeouts including retries',
|
|
30
|
-
type: 'number',
|
|
31
|
-
default: 15000,
|
|
32
|
-
choices: getRange(15000)
|
|
33
|
-
},
|
|
34
|
-
rc: {
|
|
35
|
-
label: 'Retry count',
|
|
36
|
-
description: 'The number of retry attempts Twilio will make if its connection to your webhook fails',
|
|
37
|
-
type: 'number',
|
|
38
|
-
default: 1,
|
|
39
|
-
choices: getRange(5)
|
|
40
|
-
},
|
|
41
|
-
rp: {
|
|
42
|
-
label: 'Retry policy',
|
|
43
|
-
description: 'The type of failure to retry on',
|
|
44
|
-
type: 'string',
|
|
45
|
-
default: 'ct',
|
|
46
|
-
choices: ['ct', '4xx', '5xx', 'rt', 'all']
|
|
47
|
-
},
|
|
48
|
-
sni: {
|
|
49
|
-
label: 'SNI',
|
|
50
|
-
description: 'The type of failure to retry on',
|
|
51
|
-
type: 'string',
|
|
52
|
-
default: 'unset',
|
|
53
|
-
choices: ['y', 'n', 'unser']
|
|
54
|
-
},
|
|
55
|
-
e: {
|
|
56
|
-
label: 'Edge location',
|
|
57
|
-
description: 'The Twilio edge location where webhooks egress. This can be a list and we rotate through the list as retries happen.',
|
|
58
|
-
type: 'string',
|
|
59
|
-
default: 'ashburn',
|
|
60
|
-
choices: [
|
|
61
|
-
'ashburn',
|
|
62
|
-
'ashburn-ix',
|
|
63
|
-
'dublin',
|
|
64
|
-
'frankfurt',
|
|
65
|
-
'frankfurt-ix',
|
|
66
|
-
'sao-paulo',
|
|
67
|
-
'singapore',
|
|
68
|
-
'sydney',
|
|
69
|
-
'tokyo',
|
|
70
|
-
'umatilla',
|
|
71
|
-
'london-ix',
|
|
72
|
-
'san-jose-ix',
|
|
73
|
-
'singapore-ix'
|
|
74
|
-
]
|
|
75
|
-
}
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
76
11
|
};
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
slug: 'actions-personas-messaging-twilio',
|
|
80
|
-
mode: 'cloud',
|
|
81
|
-
description: 'This is an Engage specific action to send an SMS and Whatsapp messages using Twilio API',
|
|
82
|
-
authentication: {
|
|
83
|
-
scheme: 'custom',
|
|
84
|
-
fields: {
|
|
85
|
-
twilioAccountSID: {
|
|
86
|
-
label: 'Twilio Account SID',
|
|
87
|
-
description: 'Twilio Account SID',
|
|
88
|
-
type: 'string',
|
|
89
|
-
required: true
|
|
90
|
-
},
|
|
91
|
-
twilioApiKeySID: {
|
|
92
|
-
label: 'Twilio API Key SID',
|
|
93
|
-
description: 'Twilio API Key SID',
|
|
94
|
-
type: 'string',
|
|
95
|
-
required: true
|
|
96
|
-
},
|
|
97
|
-
twilioApiKeySecret: {
|
|
98
|
-
label: 'Twilio API Key Secret',
|
|
99
|
-
description: 'Twilio API Key Secret',
|
|
100
|
-
type: 'password',
|
|
101
|
-
required: true
|
|
102
|
-
},
|
|
103
|
-
profileApiEnvironment: {
|
|
104
|
-
label: 'Profile API Environment',
|
|
105
|
-
description: 'Profile API Environment',
|
|
106
|
-
type: 'string',
|
|
107
|
-
required: true
|
|
108
|
-
},
|
|
109
|
-
profileApiAccessToken: {
|
|
110
|
-
label: 'Profile API Access Token',
|
|
111
|
-
description: 'Profile API Access Token',
|
|
112
|
-
type: 'password',
|
|
113
|
-
required: true
|
|
114
|
-
},
|
|
115
|
-
spaceId: {
|
|
116
|
-
label: 'Space ID',
|
|
117
|
-
description: 'Space ID',
|
|
118
|
-
type: 'string',
|
|
119
|
-
required: true
|
|
120
|
-
},
|
|
121
|
-
sourceId: {
|
|
122
|
-
label: 'Source ID',
|
|
123
|
-
description: 'Source ID',
|
|
124
|
-
type: 'string',
|
|
125
|
-
required: true
|
|
126
|
-
},
|
|
127
|
-
webhookUrl: {
|
|
128
|
-
label: 'Webhook URL',
|
|
129
|
-
description: 'Webhook URL that will receive all events for the sent message',
|
|
130
|
-
type: 'string',
|
|
131
|
-
format: 'uri',
|
|
132
|
-
required: false
|
|
133
|
-
},
|
|
134
|
-
twilioHostname: {
|
|
135
|
-
label: 'Twilio host name',
|
|
136
|
-
description: 'Overrides the default Twilio host name used mainly for testing without having to send real messages.',
|
|
137
|
-
type: 'string',
|
|
138
|
-
default: 'api.twilio.com',
|
|
139
|
-
required: false
|
|
140
|
-
},
|
|
141
|
-
connectionOverrides: {
|
|
142
|
-
label: 'Connection Overrides',
|
|
143
|
-
description: 'Connection overrides are configuration supported by twilio webhook services. Must be passed as fragments on the callback url',
|
|
144
|
-
type: 'string',
|
|
145
|
-
required: false,
|
|
146
|
-
default: 'rp=all&rc=5',
|
|
147
|
-
properties: ConnectionOverridesProperties
|
|
148
|
-
},
|
|
149
|
-
region: {
|
|
150
|
-
label: 'Region',
|
|
151
|
-
description: 'The region where the message is originating from',
|
|
152
|
-
type: 'string',
|
|
153
|
-
choices: [
|
|
154
|
-
{ value: 'us-west-2', label: 'US West 2' },
|
|
155
|
-
{ value: 'eu-west-1', label: 'EU West 1' }
|
|
156
|
-
],
|
|
157
|
-
default: 'us-west-2',
|
|
158
|
-
required: false
|
|
159
|
-
}
|
|
160
|
-
},
|
|
161
|
-
testAuthentication: (request, options) => {
|
|
162
|
-
const hostName = options.settings.twilioHostname ?? 'api.twilio.com';
|
|
163
|
-
return request(`https://${hostName}/2010-04-01`);
|
|
164
|
-
}
|
|
165
|
-
},
|
|
166
|
-
actions: {
|
|
167
|
-
sendSms: sendSms_1.actionDefinition,
|
|
168
|
-
sendWhatsApp: sendWhatsApp_1.actionDefinition,
|
|
169
|
-
sendMobilePush: sendMobilePush_1.actionDefinition
|
|
170
|
-
}
|
|
12
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
171
14
|
};
|
|
172
|
-
exports
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
const twilio_1 = __importDefault(require("../engage/twilio"));
|
|
17
|
+
exports.default = twilio_1.default;
|
|
18
|
+
__exportStar(require("../engage/twilio"), exports);
|
|
173
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/engage-messaging-twilio/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/engage-messaging-twilio/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAQA,8DAA0C;AAC1C,kBAAe,gBAAW,CAAA;AAC1B,mDAAgC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RequestClient, DynamicFieldResponse } from '@segment/actions-core';
|
|
2
2
|
import { Settings } from './generated-types';
|
|
3
|
-
import { ImportJobPayload, SubscribeProfile, SubscribeEventData, UnsubscribeProfile, UnsubscribeEventData } from './types';
|
|
3
|
+
import { ImportJobPayload, SubscribeProfile, SubscribeEventData, UnsubscribeProfile, UnsubscribeEventData, GroupedProfiles } from './types';
|
|
4
4
|
import { Payload } from './upsertProfile/generated-types';
|
|
5
5
|
export declare function getListIdDynamicData(request: RequestClient): Promise<DynamicFieldResponse>;
|
|
6
6
|
export declare function addProfileToList(request: RequestClient, id: string, list_id: string | undefined): Promise<import("@segment/actions-core").ModifiedResponse<unknown>>;
|
|
@@ -37,3 +37,5 @@ export declare function createList(request: RequestClient, settings: Settings, l
|
|
|
37
37
|
name: any;
|
|
38
38
|
};
|
|
39
39
|
}>;
|
|
40
|
+
export declare function groupByListId(profiles: Payload[]): GroupedProfiles;
|
|
41
|
+
export declare function processProfilesByGroup(request: RequestClient, groupedProfiles: GroupedProfiles): Promise<import("@segment/actions-core").ModifiedResponse<unknown>[]>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createList = exports.getList = exports.formatUnsubscribeProfile = exports.formatUnsubscribeRequestBody = exports.formatSubscribeRequestBody = exports.formatSubscribeProfile = exports.getProfiles = exports.sendImportJobRequest = exports.createImportJobPayload = exports.buildHeaders = exports.createProfile = exports.removeProfileFromList = exports.addProfileToList = exports.getListIdDynamicData = void 0;
|
|
3
|
+
exports.processProfilesByGroup = exports.groupByListId = exports.createList = exports.getList = exports.formatUnsubscribeProfile = exports.formatUnsubscribeRequestBody = exports.formatSubscribeRequestBody = exports.formatSubscribeProfile = exports.getProfiles = exports.sendImportJobRequest = exports.createImportJobPayload = exports.buildHeaders = exports.createProfile = exports.removeProfileFromList = exports.addProfileToList = exports.getListIdDynamicData = void 0;
|
|
4
4
|
const actions_core_1 = require("@segment/actions-core");
|
|
5
5
|
const config_1 = require("./config");
|
|
6
6
|
async function getListIdDynamicData(request) {
|
|
@@ -296,4 +296,25 @@ async function createList(request, settings, listName) {
|
|
|
296
296
|
};
|
|
297
297
|
}
|
|
298
298
|
exports.createList = createList;
|
|
299
|
+
function groupByListId(profiles) {
|
|
300
|
+
const grouped = {};
|
|
301
|
+
for (const profile of profiles) {
|
|
302
|
+
const listId = profile.override_list_id || profile.list_id;
|
|
303
|
+
if (!grouped[listId]) {
|
|
304
|
+
grouped[listId] = [];
|
|
305
|
+
}
|
|
306
|
+
grouped[listId].push(profile);
|
|
307
|
+
}
|
|
308
|
+
return grouped;
|
|
309
|
+
}
|
|
310
|
+
exports.groupByListId = groupByListId;
|
|
311
|
+
async function processProfilesByGroup(request, groupedProfiles) {
|
|
312
|
+
const importResponses = await Promise.all(Object.keys(groupedProfiles).map(async (listId) => {
|
|
313
|
+
const profiles = groupedProfiles[listId];
|
|
314
|
+
const importJobPayload = exports.createImportJobPayload(profiles, listId);
|
|
315
|
+
return await exports.sendImportJobRequest(request, importJobPayload);
|
|
316
|
+
}));
|
|
317
|
+
return importResponses;
|
|
318
|
+
}
|
|
319
|
+
exports.processProfilesByGroup = processProfilesByGroup;
|
|
299
320
|
//# sourceMappingURL=functions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../src/destinations/klaviyo/functions.ts"],"names":[],"mappings":";;;AAAA,wDAM8B;AAC9B,qCAAiD;
|
|
1
|
+
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../src/destinations/klaviyo/functions.ts"],"names":[],"mappings":";;;AAAA,wDAM8B;AAC9B,qCAAiD;AAkB1C,KAAK,UAAU,oBAAoB,CAAC,OAAsB;IAC/D,IAAI;QACF,MAAM,MAAM,GAAmB,MAAM,OAAO,CAAC,GAAG,gBAAO,SAAS,EAAE;YAChE,MAAM,EAAE,KAAK;SACd,CAAC,CAAA;QACF,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAkD,EAAE,EAAE;YACzG,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAA;QACxD,CAAC,CAAC,CAAA;QACF,OAAO;YACL,OAAO;SACR,CAAA;KACF;IAAC,OAAO,GAAG,EAAE;QACZ,OAAO;YACL,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,EAAE;YACZ,KAAK,EAAE;gBACL,OAAO,EAAG,GAAgB,CAAC,OAAO,IAAI,eAAe;gBACrD,IAAI,EAAG,GAAgB,CAAC,MAAM,GAAG,EAAE,IAAI,eAAe;aACvD;SACF,CAAA;KACF;AACH,CAAC;AArBD,oDAqBC;AAEM,KAAK,UAAU,gBAAgB,CAAC,OAAsB,EAAE,EAAU,EAAE,OAA2B;IACpG,MAAM,QAAQ,GAAa;QACzB,I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IAAI,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;QAChD,MAAM,QAAQ,GAAG,eAAe,CAAC,MAAM,CAAC,CAAA;QACxC,MAAM,gBAAgB,GAAG,8BAAsB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;QACjE,OAAO,MAAM,4BAAoB,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAA;IAC9D,CAAC,CAAC,CACH,CAAA;IACD,OAAO,eAAe,CAAA;AACxB,CAAC;AATD,wDASC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { HTTPError } from '@segment/actions-core';
|
|
2
|
+
import { Payload } from './upsertProfile/generated-types';
|
|
2
3
|
export declare class KlaviyoAPIError extends HTTPError {
|
|
3
4
|
response: Response & {
|
|
4
5
|
data: {
|
|
@@ -193,3 +194,6 @@ export interface UnsubscribeEventData {
|
|
|
193
194
|
};
|
|
194
195
|
};
|
|
195
196
|
}
|
|
197
|
+
export interface GroupedProfiles {
|
|
198
|
+
[listId: string]: Payload[];
|
|
199
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/destinations/klaviyo/types.ts"],"names":[],"mappings":";;;AAAA,wDAAiD;
|
|
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"}
|
|
@@ -132,7 +132,14 @@ const action = {
|
|
|
132
132
|
default: '',
|
|
133
133
|
unsafe_hidden: true
|
|
134
134
|
},
|
|
135
|
-
batch_size: { ...properties_1.batch_size }
|
|
135
|
+
batch_size: { ...properties_1.batch_size },
|
|
136
|
+
override_list_id: {
|
|
137
|
+
unsafe_hidden: true,
|
|
138
|
+
label: 'List ID Override',
|
|
139
|
+
description: 'Klaviyo list ID to override the default list ID when provided in an event payload. Added to support backward compatibility with klaviyo(classic) and facilitate a seamless migration.',
|
|
140
|
+
type: 'string',
|
|
141
|
+
default: { '@path': '$.integrations.Klaviyo.listId' }
|
|
142
|
+
}
|
|
136
143
|
},
|
|
137
144
|
hooks: {
|
|
138
145
|
retlOnMappingSave: {
|
|
@@ -206,9 +213,9 @@ const action = {
|
|
|
206
213
|
return functions_1.getListIdDynamicData(request);
|
|
207
214
|
}
|
|
208
215
|
},
|
|
209
|
-
perform: async (request, { payload
|
|
210
|
-
const { email, external_id, phone_number, enable_batching, batch_size, ...otherAttributes } = payload;
|
|
211
|
-
const list_id =
|
|
216
|
+
perform: async (request, { payload }) => {
|
|
217
|
+
const { email, external_id, phone_number, enable_batching, batch_size, list_id: otherListId, override_list_id, ...otherAttributes } = payload;
|
|
218
|
+
const list_id = override_list_id || otherListId;
|
|
212
219
|
if (!email && !phone_number && !external_id) {
|
|
213
220
|
throw new actions_core_1.PayloadValidationError('One of External ID, Phone Number and Email is required.');
|
|
214
221
|
}
|
|
@@ -255,22 +262,15 @@ const action = {
|
|
|
255
262
|
throw error;
|
|
256
263
|
}
|
|
257
264
|
},
|
|
258
|
-
performBatch: async (request, { payload
|
|
265
|
+
performBatch: async (request, { payload }) => {
|
|
259
266
|
payload = payload.filter((profile) => profile.email || profile.external_id || profile.phone_number);
|
|
260
|
-
|
|
261
|
-
if (!profile.list_id && hookOutputs?.retlOnMappingSave.outputs.id) {
|
|
262
|
-
return { ...profile, list_id: hookOutputs?.retlOnMappingSave.outputs.idd };
|
|
263
|
-
}
|
|
264
|
-
return profile;
|
|
265
|
-
});
|
|
266
|
-
const profilesWithList = payload.filter((profile) => profile.list_id);
|
|
267
|
+
const profilesWithList = payload.filter((profile) => profile.list_id || profile.override_list_id);
|
|
267
268
|
const profilesWithoutList = payload.filter((profile) => !profile.list_id);
|
|
268
269
|
let importResponseWithList;
|
|
269
270
|
let importResponseWithoutList;
|
|
270
271
|
if (profilesWithList.length > 0) {
|
|
271
|
-
const
|
|
272
|
-
|
|
273
|
-
importResponseWithList = await functions_1.sendImportJobRequest(request, importJobPayload);
|
|
272
|
+
const groupedByListId = functions_1.groupByListId(profilesWithList);
|
|
273
|
+
importResponseWithList = await functions_1.processProfilesByGroup(request, groupedByListId);
|
|
274
274
|
}
|
|
275
275
|
if (profilesWithoutList.length > 0) {
|
|
276
276
|
const importJobPayload = functions_1.createImportJobPayload(profilesWithoutList);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/klaviyo/upsertProfile/index.ts"],"names":[],"mappings":";;AAIA,sCAAmC;AACnC,wDAA8D;AAE9D,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/klaviyo/upsertProfile/index.ts"],"names":[],"mappings":";;AAIA,sCAAmC;AACnC,wDAA8D;AAE9D,4CASqB;AACrB,8CAA0C;AAE1C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,sBAAsB;IACnC,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;YACd,WAAW,EAAE,kFAAkF;YAC/F,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,OAAO;YACf,OAAO,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;SACvC;QACD,eAAe,EAAE;YACf,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,uBAAuB;YAC9B,WAAW,EAAE,0DAA0D;SACxE;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,cAAc;YACrB,WAAW,EAAE,mKAAmK;YAChL,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,wBAAwB,EAAE;SAC/C;QACD,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,+JAA+J;YAC5K,IAAI,EAAE,QAAQ;SACf;QACD,UAAU,EAAE;YACV,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G,MAAM,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAAA;QACjG,MAAM,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;QAEzE,IAAI,sBAAsB,CAAA;QAC1B,IAAI,yBAAyB,CAAA;QAE7B,IAAI,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE;YAE/B,MAAM,eAAe,GAAG,yBAAa,CAAC,gBAAgB,CAAC,CAAA;YACvD,sBAAsB,GAAG,MAAM,kCAAsB,CAAC,OAAO,EAAE,eAAe,CAAC,CAAA;SAChF;QAED,IAAI,mBAAmB,CAAC,MAAM,GAAG,CAAC,EAAE;YAClC,MAAM,gBAAgB,GAAG,kCAAsB,CAAC,mBAAmB,CAAC,CAAA;YACpE,yBAAyB,GAAG,MAAM,gCAAoB,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAA;SAClF;QAED,OAAO;YACL,QAAQ,EAAE,sBAAsB;YAChC,WAAW,EAAE,yBAAyB;SACvC,CAAA;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
profileListName: string;
|
|
3
|
+
profileExtensionTable: string;
|
|
4
|
+
userData: {
|
|
5
|
+
[k: string]: unknown;
|
|
6
|
+
};
|
|
7
|
+
mapTemplateName?: string;
|
|
8
|
+
insertOnNoMatch?: boolean;
|
|
9
|
+
matchColumnName1?: string;
|
|
10
|
+
matchColumnName2?: string;
|
|
11
|
+
updateOnMatch: string;
|
|
12
|
+
enable_batching?: boolean;
|
|
13
|
+
batch_size?: number;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/responsys/asyncMergePetRecords/generated-types.ts"],"names":[],"mappings":""}
|