@segment/action-destinations 3.296.0-staging-80e58f6b9 → 3.296.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.
- package/dist/destinations/aws-s3/operations.js.map +1 -1
- package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.d.ts +1 -1
- package/dist/destinations/customerio/utils.d.ts +1 -1
- package/dist/destinations/facebook-custom-audiences/generated-types.d.ts +2 -2
- package/dist/destinations/facebook-custom-audiences/index.js +16 -6
- package/dist/destinations/facebook-custom-audiences/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/functions.d.ts +1 -20
- package/dist/destinations/google-enhanced-conversions/functions.js +1 -280
- package/dist/destinations/google-enhanced-conversions/functions.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/generated-types.d.ts +0 -4
- package/dist/destinations/google-enhanced-conversions/index.d.ts +2 -8
- package/dist/destinations/google-enhanced-conversions/index.js +1 -51
- package/dist/destinations/google-enhanced-conversions/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/types.d.ts +0 -51
- package/dist/destinations/tiktok-audiences/api/index.js +1 -0
- package/dist/destinations/tiktok-audiences/api/index.js.map +1 -1
- package/dist/destinations/tiktok-audiences/createAudience/generated-types.d.ts +1 -0
- package/dist/destinations/tiktok-audiences/createAudience/index.js +2 -1
- package/dist/destinations/tiktok-audiences/createAudience/index.js.map +1 -1
- package/dist/destinations/tiktok-audiences/index.js +5 -0
- package/dist/destinations/tiktok-audiences/index.js.map +1 -1
- package/dist/destinations/tiktok-audiences/properties.d.ts +1 -0
- package/dist/destinations/tiktok-audiences/properties.js +13 -1
- package/dist/destinations/tiktok-audiences/properties.js.map +1 -1
- package/package.json +4 -4
- package/dist/destinations/engage/sendgrid/destinationDefinition.d.ts +0 -3
- package/dist/destinations/engage/sendgrid/destinationDefinition.js +0 -70
- package/dist/destinations/engage/sendgrid/destinationDefinition.js.map +0 -1
- package/dist/destinations/engage/sendgrid/generated-types.d.ts +0 -1
- package/dist/destinations/engage/sendgrid/generated-types.js +0 -14
- package/dist/destinations/engage/sendgrid/generated-types.js.map +0 -1
- package/dist/destinations/engage/sendgrid/index.d.ts +0 -2
- package/dist/destinations/engage/sendgrid/index.js +0 -5
- package/dist/destinations/engage/sendgrid/index.js.map +0 -1
- package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.d.ts +0 -4
- package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js +0 -28
- package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js.map +0 -1
- package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.d.ts +0 -1
- package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js +0 -14
- package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js.map +0 -1
- package/dist/destinations/engage/sendgrid/previewApiLookup/index.d.ts +0 -1
- package/dist/destinations/engage/sendgrid/previewApiLookup/index.js +0 -14
- package/dist/destinations/engage/sendgrid/previewApiLookup/index.js.map +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.d.ts +0 -44
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +0 -419
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.d.ts +0 -12
- package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js +0 -3
- package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js.map +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.d.ts +0 -4
- package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js +0 -257
- package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js.map +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/generated-types.d.ts +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js +0 -14
- package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js.map +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/index.d.ts +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/index.js +0 -14
- package/dist/destinations/engage/sendgrid/sendEmail/index.js.map +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.d.ts +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js +0 -23
- package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js.map +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.d.ts +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js +0 -14
- package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js.map +0 -1
- package/dist/destinations/engage/twilio/destinationDefinition.d.ts +0 -3
- package/dist/destinations/engage/twilio/destinationDefinition.js +0 -172
- package/dist/destinations/engage/twilio/destinationDefinition.js.map +0 -1
- package/dist/destinations/engage/twilio/generated-types.d.ts +0 -1
- package/dist/destinations/engage/twilio/generated-types.js +0 -14
- package/dist/destinations/engage/twilio/generated-types.js.map +0 -1
- package/dist/destinations/engage/twilio/index.d.ts +0 -2
- package/dist/destinations/engage/twilio/index.js +0 -5
- package/dist/destinations/engage/twilio/index.js.map +0 -1
- package/dist/destinations/engage/twilio/sendMobilePush/PushSender.d.ts +0 -28
- package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js +0 -151
- package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js.map +0 -1
- package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.d.ts +0 -4
- package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js +0 -250
- package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js.map +0 -1
- package/dist/destinations/engage/twilio/sendMobilePush/generated-types.d.ts +0 -1
- package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js +0 -14
- package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js.map +0 -1
- package/dist/destinations/engage/twilio/sendMobilePush/index.d.ts +0 -1
- package/dist/destinations/engage/twilio/sendMobilePush/index.js +0 -14
- package/dist/destinations/engage/twilio/sendMobilePush/index.js.map +0 -1
- package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.d.ts +0 -9
- package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js +0 -72
- package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js.map +0 -1
- package/dist/destinations/engage/twilio/sendSms/actionDefinition.d.ts +0 -4
- package/dist/destinations/engage/twilio/sendSms/actionDefinition.js +0 -162
- package/dist/destinations/engage/twilio/sendSms/actionDefinition.js.map +0 -1
- package/dist/destinations/engage/twilio/sendSms/generated-types.d.ts +0 -1
- package/dist/destinations/engage/twilio/sendSms/generated-types.js +0 -14
- package/dist/destinations/engage/twilio/sendSms/generated-types.js.map +0 -1
- package/dist/destinations/engage/twilio/sendSms/index.d.ts +0 -1
- package/dist/destinations/engage/twilio/sendSms/index.js +0 -14
- package/dist/destinations/engage/twilio/sendSms/index.js.map +0 -1
- package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.d.ts +0 -9
- package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js +0 -89
- package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js.map +0 -1
- package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.d.ts +0 -4
- package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js +0 -136
- package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js.map +0 -1
- package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.d.ts +0 -1
- package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js +0 -14
- package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js.map +0 -1
- package/dist/destinations/engage/twilio/sendWhatsApp/index.d.ts +0 -1
- package/dist/destinations/engage/twilio/sendWhatsApp/index.js +0 -14
- package/dist/destinations/engage/twilio/sendWhatsApp/index.js.map +0 -1
- package/dist/destinations/engage/twilio/utils/PhoneMessageSender.d.ts +0 -16
- package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js +0 -71
- package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js.map +0 -1
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.d.ts +0 -16
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js +0 -115
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js.map +0 -1
- package/dist/destinations/engage/twilio/utils/index.d.ts +0 -2
- package/dist/destinations/engage/twilio/utils/index.js +0 -15
- package/dist/destinations/engage/twilio/utils/index.js.map +0 -1
- package/dist/destinations/engage/twilio/utils/types.d.ts +0 -23
- package/dist/destinations/engage/twilio/utils/types.js +0 -3
- package/dist/destinations/engage/twilio/utils/types.js.map +0 -1
- package/dist/destinations/engage/utils/AggregateError.d.ts +0 -14
- package/dist/destinations/engage/utils/AggregateError.js +0 -26
- package/dist/destinations/engage/utils/AggregateError.js.map +0 -1
- package/dist/destinations/engage/utils/EngageActionPerformer.d.ts +0 -42
- package/dist/destinations/engage/utils/EngageActionPerformer.js +0 -148
- package/dist/destinations/engage/utils/EngageActionPerformer.js.map +0 -1
- package/dist/destinations/engage/utils/EngageLogger.d.ts +0 -18
- package/dist/destinations/engage/utils/EngageLogger.js +0 -52
- package/dist/destinations/engage/utils/EngageLogger.js.map +0 -1
- package/dist/destinations/engage/utils/EngageStats.d.ts +0 -18
- package/dist/destinations/engage/utils/EngageStats.js +0 -95
- package/dist/destinations/engage/utils/EngageStats.js.map +0 -1
- package/dist/destinations/engage/utils/IntegrationErrorWrapper.d.ts +0 -12
- package/dist/destinations/engage/utils/IntegrationErrorWrapper.js +0 -31
- package/dist/destinations/engage/utils/IntegrationErrorWrapper.js.map +0 -1
- package/dist/destinations/engage/utils/MessageSendPerformer.d.ts +0 -65
- package/dist/destinations/engage/utils/MessageSendPerformer.js +0 -211
- package/dist/destinations/engage/utils/MessageSendPerformer.js.map +0 -1
- package/dist/destinations/engage/utils/Profile.d.ts +0 -6
- package/dist/destinations/engage/utils/Profile.js +0 -3
- package/dist/destinations/engage/utils/Profile.js.map +0 -1
- package/dist/destinations/engage/utils/ResponseError.d.ts +0 -25
- package/dist/destinations/engage/utils/ResponseError.js +0 -22
- package/dist/destinations/engage/utils/ResponseError.js.map +0 -1
- package/dist/destinations/engage/utils/apiLookups.d.ts +0 -22
- package/dist/destinations/engage/utils/apiLookups.js +0 -189
- package/dist/destinations/engage/utils/apiLookups.js.map +0 -1
- package/dist/destinations/engage/utils/getProfileApiEndpoint.d.ts +0 -2
- package/dist/destinations/engage/utils/getProfileApiEndpoint.js +0 -10
- package/dist/destinations/engage/utils/getProfileApiEndpoint.js.map +0 -1
- package/dist/destinations/engage/utils/index.d.ts +0 -9
- package/dist/destinations/engage/utils/index.js +0 -22
- package/dist/destinations/engage/utils/index.js.map +0 -1
- package/dist/destinations/engage/utils/isDestinationActionService.d.ts +0 -1
- package/dist/destinations/engage/utils/isDestinationActionService.js +0 -8
- package/dist/destinations/engage/utils/isDestinationActionService.js.map +0 -1
- package/dist/destinations/engage/utils/isRetryableError.d.ts +0 -2
- package/dist/destinations/engage/utils/isRetryableError.js +0 -33
- package/dist/destinations/engage/utils/isRetryableError.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.d.ts +0 -1
- package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js +0 -3
- package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationDecorator.d.ts +0 -46
- package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js +0 -46
- package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationDuration.d.ts +0 -12
- package/dist/destinations/engage/utils/operationTracking/OperationDuration.js +0 -23
- package/dist/destinations/engage/utils/operationTracking/OperationDuration.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.d.ts +0 -12
- package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js +0 -35
- package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.d.ts +0 -14
- package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js +0 -31
- package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationLogger.d.ts +0 -31
- package/dist/destinations/engage/utils/operationTracking/OperationLogger.js +0 -104
- package/dist/destinations/engage/utils/operationTracking/OperationLogger.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationStats.d.ts +0 -39
- package/dist/destinations/engage/utils/operationTracking/OperationStats.js +0 -130
- package/dist/destinations/engage/utils/operationTracking/OperationStats.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.d.ts +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js +0 -377
- package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationTree.d.ts +0 -23
- package/dist/destinations/engage/utils/operationTracking/OperationTree.js +0 -49
- package/dist/destinations/engage/utils/operationTracking/OperationTree.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/TrackedError.d.ts +0 -6
- package/dist/destinations/engage/utils/operationTracking/TrackedError.js +0 -3
- package/dist/destinations/engage/utils/operationTracking/TrackedError.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/index.d.ts +0 -10
- package/dist/destinations/engage/utils/operationTracking/index.js +0 -23
- package/dist/destinations/engage/utils/operationTracking/index.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.d.ts +0 -21
- package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js +0 -99
- package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js.map +0 -1
- package/dist/destinations/engage/utils/testUtils.d.ts +0 -6
- package/dist/destinations/engage/utils/testUtils.js +0 -26
- package/dist/destinations/engage/utils/testUtils.js.map +0 -1
- package/dist/destinations/engage/utils/track.d.ts +0 -52
- package/dist/destinations/engage/utils/track.js +0 -9
- package/dist/destinations/engage/utils/track.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.d.ts +0 -16
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js +0 -3
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.d.ts +0 -56
- package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js +0 -3
- package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.d.ts +0 -39
- package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js +0 -3
- package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendSms.types.d.ts +0 -27
- package/dist/destinations/engage-messaging-twilio/sendSms.types.js +0 -3
- package/dist/destinations/engage-messaging-twilio/sendSms.types.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.d.ts +0 -25
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js +0 -3
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js.map +0 -1
- package/dist/destinations/facebook-custom-audiences/fbca-operations.d.ts +0 -32
- package/dist/destinations/facebook-custom-audiences/fbca-operations.js +0 -50
- package/dist/destinations/facebook-custom-audiences/fbca-operations.js.map +0 -1
- package/dist/destinations/facebook-custom-audiences/fbca-properties.d.ts +0 -2
- package/dist/destinations/facebook-custom-audiences/fbca-properties.js +0 -10
- package/dist/destinations/facebook-custom-audiences/fbca-properties.js.map +0 -1
- package/dist/destinations/facebook-custom-audiences/sync/generated-types.d.ts +0 -15
- package/dist/destinations/facebook-custom-audiences/sync/generated-types.js +0 -3
- package/dist/destinations/facebook-custom-audiences/sync/generated-types.js.map +0 -1
- package/dist/destinations/facebook-custom-audiences/sync/index.d.ts +0 -5
- package/dist/destinations/facebook-custom-audiences/sync/index.js +0 -139
- package/dist/destinations/facebook-custom-audiences/sync/index.js.map +0 -1
- package/dist/destinations/google-enhanced-conversions/userList/generated-types.d.ts +0 -31
- package/dist/destinations/google-enhanced-conversions/userList/generated-types.js +0 -3
- package/dist/destinations/google-enhanced-conversions/userList/generated-types.js.map +0 -1
- package/dist/destinations/google-enhanced-conversions/userList/index.d.ts +0 -5
- package/dist/destinations/google-enhanced-conversions/userList/index.js +0 -280
- package/dist/destinations/google-enhanced-conversions/userList/index.js.map +0 -1
- package/dist/destinations/mappings-two-test/generated-types.d.ts +0 -3
- package/dist/destinations/mappings-two-test/generated-types.js +0 -3
- package/dist/destinations/mappings-two-test/generated-types.js.map +0 -1
- package/dist/destinations/mappings-two-test/index.d.ts +0 -4
- package/dist/destinations/mappings-two-test/index.js +0 -34
- package/dist/destinations/mappings-two-test/index.js.map +0 -1
- package/dist/destinations/mappings-two-test/inputMethods/generated-types.d.ts +0 -29
- package/dist/destinations/mappings-two-test/inputMethods/generated-types.js +0 -3
- package/dist/destinations/mappings-two-test/inputMethods/generated-types.js.map +0 -1
- package/dist/destinations/mappings-two-test/inputMethods/index.d.ts +0 -5
- package/dist/destinations/mappings-two-test/inputMethods/index.js +0 -200
- package/dist/destinations/mappings-two-test/inputMethods/index.js.map +0 -1
- package/dist/destinations/mappings-two-test/kitchenSink/generated-types.d.ts +0 -53
- package/dist/destinations/mappings-two-test/kitchenSink/generated-types.js +0 -3
- package/dist/destinations/mappings-two-test/kitchenSink/generated-types.js.map +0 -1
- package/dist/destinations/mappings-two-test/kitchenSink/index.d.ts +0 -5
- package/dist/destinations/mappings-two-test/kitchenSink/index.js +0 -289
- package/dist/destinations/mappings-two-test/kitchenSink/index.js.map +0 -1
- package/dist/destinations/mappings-two-test/sendEvent/generated-types.d.ts +0 -17
- package/dist/destinations/mappings-two-test/sendEvent/generated-types.js +0 -3
- package/dist/destinations/mappings-two-test/sendEvent/generated-types.js.map +0 -1
- package/dist/destinations/mappings-two-test/sendEvent/index.d.ts +0 -5
- package/dist/destinations/mappings-two-test/sendEvent/index.js +0 -345
- package/dist/destinations/mappings-two-test/sendEvent/index.js.map +0 -1
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const fbca_operations_1 = __importDefault(require("../fbca-operations"));
|
|
7
|
-
const action = {
|
|
8
|
-
title: 'Sync Audience',
|
|
9
|
-
description: 'Sync data to Facebook Custom Audiences.',
|
|
10
|
-
fields: {},
|
|
11
|
-
hooks: {
|
|
12
|
-
retlOnMappingSave: {
|
|
13
|
-
label: 'Select or create an audience in Facebook',
|
|
14
|
-
description: 'When saving this mapping, Segment will either create a new audience in Facebook or connect to an existing one. To create a new audience, enter the name of the audience. To connect to an existing audience, select the audience ID from the dropdown.',
|
|
15
|
-
inputFields: {
|
|
16
|
-
operation: {
|
|
17
|
-
type: 'string',
|
|
18
|
-
label: 'Create a new custom audience or connect to an existing one?',
|
|
19
|
-
description: 'Choose to either create a new custom audience or use an existing one. If you opt to create a new audience, we will display the required fields for audience creation. If you opt to use an existing audience, a drop-down menu will appear, allowing you to select from all the custom audiences in your ad account.',
|
|
20
|
-
choices: [
|
|
21
|
-
{ label: 'Create New Audience', value: 'create' },
|
|
22
|
-
{ label: 'Connect to Existing Audience', value: 'existing' }
|
|
23
|
-
],
|
|
24
|
-
default: 'create'
|
|
25
|
-
},
|
|
26
|
-
audienceName: {
|
|
27
|
-
type: 'string',
|
|
28
|
-
label: 'Audience Creation Name',
|
|
29
|
-
description: 'The name of the audience in Facebook.',
|
|
30
|
-
default: 'TODO: Model Name by default',
|
|
31
|
-
depends_on: {
|
|
32
|
-
conditions: [
|
|
33
|
-
{
|
|
34
|
-
fieldKey: 'operation',
|
|
35
|
-
operator: 'is',
|
|
36
|
-
value: 'create'
|
|
37
|
-
}
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
existingAudienceId: {
|
|
42
|
-
type: 'string',
|
|
43
|
-
label: 'Existing Audience ID',
|
|
44
|
-
description: 'The ID of the audience in Facebook.',
|
|
45
|
-
depends_on: {
|
|
46
|
-
conditions: [
|
|
47
|
-
{
|
|
48
|
-
fieldKey: 'operation',
|
|
49
|
-
operator: 'is',
|
|
50
|
-
value: 'existing'
|
|
51
|
-
}
|
|
52
|
-
]
|
|
53
|
-
},
|
|
54
|
-
dynamic: async (request, { settings }) => {
|
|
55
|
-
const fbClient = new fbca_operations_1.default(request, settings.retlAdAccountId);
|
|
56
|
-
const { choices, error } = await fbClient.getAllAudiences();
|
|
57
|
-
if (error) {
|
|
58
|
-
return { error, choices: [] };
|
|
59
|
-
}
|
|
60
|
-
return {
|
|
61
|
-
choices
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
outputTypes: {
|
|
67
|
-
audienceName: {
|
|
68
|
-
type: 'string',
|
|
69
|
-
label: 'Audience Name',
|
|
70
|
-
description: 'The name of the audience in Facebook this mapping is connected to.',
|
|
71
|
-
required: true
|
|
72
|
-
},
|
|
73
|
-
audienceId: {
|
|
74
|
-
type: 'string',
|
|
75
|
-
label: 'Audience ID',
|
|
76
|
-
description: 'The ID of the audience in Facebook.',
|
|
77
|
-
required: true
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
performHook: async (request, { settings, hookInputs }) => {
|
|
81
|
-
const fbClient = new fbca_operations_1.default(request, settings.retlAdAccountId);
|
|
82
|
-
if (hookInputs.operation === 'create' && !hookInputs.audienceName) {
|
|
83
|
-
return {
|
|
84
|
-
error: {
|
|
85
|
-
message: 'Missing audience name value',
|
|
86
|
-
code: 'MISSING_REQUIRED_FIELD'
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
if (hookInputs.operation === 'existing' && !hookInputs.existingAudienceId) {
|
|
91
|
-
return {
|
|
92
|
-
error: {
|
|
93
|
-
message: 'Missing audience ID value',
|
|
94
|
-
code: 'MISSING_REQUIRED_FIELD'
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
if (hookInputs.operation === 'existing' && hookInputs.existingAudienceId) {
|
|
99
|
-
const { data, error } = await fbClient.getSingleAudience(hookInputs.existingAudienceId);
|
|
100
|
-
if (error) {
|
|
101
|
-
return {
|
|
102
|
-
error: {
|
|
103
|
-
message: error.error.message,
|
|
104
|
-
code: error.error.type
|
|
105
|
-
}
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
return {
|
|
109
|
-
successMessage: `Connected to audience with ID: ${hookInputs.existingAudienceId}`,
|
|
110
|
-
savedData: {
|
|
111
|
-
audienceId: hookInputs.existingAudienceId,
|
|
112
|
-
audienceName: data?.name
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
if (hookInputs.operation === 'create' && hookInputs.audienceName) {
|
|
117
|
-
const { data } = await fbClient.createAudience(hookInputs.audienceName);
|
|
118
|
-
return {
|
|
119
|
-
successMessage: `Audience created with ID: ${data.id}`,
|
|
120
|
-
savedData: {
|
|
121
|
-
audienceId: data.id,
|
|
122
|
-
audienceName: hookInputs.audienceName
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
return {
|
|
127
|
-
error: {
|
|
128
|
-
message: 'Invalid operation',
|
|
129
|
-
code: 'INVALID_OPERATION'
|
|
130
|
-
}
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
perform: (_request, _data) => {
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
exports.default = action;
|
|
139
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-custom-audiences/sync/index.ts"],"names":[],"mappings":";;;;;AAGA,yEAA+C;AAE/C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,yCAAyC;IACtD,MAAM,EAAE,EAAE;IACV,KAAK,EAAE;QACL,iBAAiB,EAAE;YACjB,KAAK,EAAE,0CAA0C;YACjD,WAAW,EACT,wPAAwP;YAC1P,WAAW,EAAE;gBACX,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,6DAA6D;oBACpE,WAAW,EACT,sTAAsT;oBACxT,OAAO,EAAE;wBACP,EAAE,KAAK,EAAE,qBAAqB,EAAE,KAAK,EAAE,QAAQ,EAAE;wBACjD,EAAE,KAAK,EAAE,8BAA8B,EAAE,KAAK,EAAE,UAAU,EAAE;qBAC7D;oBACD,OAAO,EAAE,QAAQ;iBAClB;gBACD,YAAY,EAAE;oBACZ,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,wBAAwB;oBAC/B,WAAW,EAAE,uCAAuC;oBACpD,OAAO,EAAE,6BAA6B;oBACtC,UAAU,EAAE;wBACV,UAAU,EAAE;4BACV;gCACE,QAAQ,EAAE,WAAW;gCACrB,QAAQ,EAAE,IAAI;gCACd,KAAK,EAAE,QAAQ;6BAChB;yBACF;qBACF;iBACF;gBACD,kBAAkB,EAAE;oBAClB,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,sBAAsB;oBAC7B,WAAW,EAAE,qCAAqC;oBAClD,UAAU,EAAE;wBACV,UAAU,EAAE;4BACV;gCACE,QAAQ,EAAE,WAAW;gCACrB,QAAQ,EAAE,IAAI;gCACd,KAAK,EAAE,UAAU;6BAClB;yBACF;qBACF;oBACD,OAAO,EAAE,KAAK,EA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;
|
|
5
|
-
phone?: string;
|
|
6
|
-
country_code?: string;
|
|
7
|
-
postal_code?: string;
|
|
8
|
-
crm_id?: string;
|
|
9
|
-
mobile_advertising_id?: string;
|
|
10
|
-
ad_user_data_consent_state: string;
|
|
11
|
-
ad_personalization_consent_state: string;
|
|
12
|
-
external_audience_id?: string;
|
|
13
|
-
enable_batching?: boolean;
|
|
14
|
-
batch_size?: number;
|
|
15
|
-
event_name: string;
|
|
16
|
-
}
|
|
17
|
-
export interface HookBundle {
|
|
18
|
-
retlOnMappingSave: {
|
|
19
|
-
inputs?: {
|
|
20
|
-
list_id?: string;
|
|
21
|
-
list_name?: string;
|
|
22
|
-
external_id_type: string;
|
|
23
|
-
app_id?: string;
|
|
24
|
-
};
|
|
25
|
-
outputs?: {
|
|
26
|
-
id?: string;
|
|
27
|
-
name?: string;
|
|
28
|
-
external_id_type?: string;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/google-enhanced-conversions/userList/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,280 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const functions_1 = require("../functions");
|
|
4
|
-
const action = {
|
|
5
|
-
title: 'Customer Match User List',
|
|
6
|
-
description: 'Sync a Segment Engage Audience into a Google Customer Match User List.',
|
|
7
|
-
defaultSubscription: 'event = "Audience Entered" or event = "Audience Exited"',
|
|
8
|
-
syncMode: {
|
|
9
|
-
description: 'Define how the records will be synced from RETL to Google',
|
|
10
|
-
label: 'How to sync records',
|
|
11
|
-
default: 'add',
|
|
12
|
-
choices: [
|
|
13
|
-
{ label: 'Adds users to the connected Google Customer Match User List', value: 'add' },
|
|
14
|
-
{ label: 'Remove users from the connected Google Customer Match User List', value: 'delete' }
|
|
15
|
-
]
|
|
16
|
-
},
|
|
17
|
-
fields: {
|
|
18
|
-
first_name: {
|
|
19
|
-
label: 'First Name',
|
|
20
|
-
description: "The user's first name.",
|
|
21
|
-
type: 'string',
|
|
22
|
-
default: {
|
|
23
|
-
'@if': {
|
|
24
|
-
exists: { '@path': '$.context.traits.firstName' },
|
|
25
|
-
then: { '@path': '$.context.traits.firstName' },
|
|
26
|
-
else: { '@path': '$.properties.firstName' }
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
last_name: {
|
|
31
|
-
label: 'Last Name',
|
|
32
|
-
description: "The user's last name.",
|
|
33
|
-
type: 'string',
|
|
34
|
-
default: {
|
|
35
|
-
'@if': {
|
|
36
|
-
exists: { '@path': '$.context.traits.lastName' },
|
|
37
|
-
then: { '@path': '$.context.traits.lastName' },
|
|
38
|
-
else: { '@path': '$.properties.lastName' }
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
email: {
|
|
43
|
-
label: 'Email',
|
|
44
|
-
description: "The user's email address.",
|
|
45
|
-
type: 'string',
|
|
46
|
-
default: {
|
|
47
|
-
'@if': {
|
|
48
|
-
exists: { '@path': '$.context.traits.email' },
|
|
49
|
-
then: { '@path': '$.context.traits.email' },
|
|
50
|
-
else: { '@path': '$.properties.email' }
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
phone: {
|
|
55
|
-
label: 'Phone',
|
|
56
|
-
description: "The user's phone number.",
|
|
57
|
-
type: 'string',
|
|
58
|
-
default: {
|
|
59
|
-
'@if': {
|
|
60
|
-
exists: { '@path': '$.context.traits.phone' },
|
|
61
|
-
then: { '@path': '$.context.traits.phone' },
|
|
62
|
-
else: { '@path': '$.properties.phone' }
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
country_code: {
|
|
67
|
-
label: 'Country Code',
|
|
68
|
-
description: "The user's country code.",
|
|
69
|
-
type: 'string'
|
|
70
|
-
},
|
|
71
|
-
postal_code: {
|
|
72
|
-
label: 'Postal Code',
|
|
73
|
-
description: "The user's postal code.",
|
|
74
|
-
type: 'string'
|
|
75
|
-
},
|
|
76
|
-
crm_id: {
|
|
77
|
-
label: 'CRM ID',
|
|
78
|
-
description: 'Advertiser-assigned user ID for Customer Match upload.',
|
|
79
|
-
type: 'string'
|
|
80
|
-
},
|
|
81
|
-
mobile_advertising_id: {
|
|
82
|
-
label: 'Mobile Advertising ID',
|
|
83
|
-
description: 'Mobile device ID (advertising ID/IDFA).',
|
|
84
|
-
type: 'string',
|
|
85
|
-
default: {
|
|
86
|
-
'@path': '$.context.device.advertisingId'
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
ad_user_data_consent_state: {
|
|
90
|
-
label: 'Ad User Data Consent State',
|
|
91
|
-
description: 'This represents consent for ad user data.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v15/Consent).',
|
|
92
|
-
type: 'string',
|
|
93
|
-
choices: [
|
|
94
|
-
{ label: 'GRANTED', value: 'GRANTED' },
|
|
95
|
-
{ label: 'DENIED', value: 'DENIED' },
|
|
96
|
-
{ label: 'UNSPECIFIED', value: 'UNSPECIFIED' }
|
|
97
|
-
],
|
|
98
|
-
required: true
|
|
99
|
-
},
|
|
100
|
-
ad_personalization_consent_state: {
|
|
101
|
-
label: 'Ad Personalization Consent State',
|
|
102
|
-
type: 'string',
|
|
103
|
-
description: 'This represents consent for ad personalization. This can only be set for OfflineUserDataJobService and UserDataService.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v15/Consent).',
|
|
104
|
-
choices: [
|
|
105
|
-
{ label: 'GRANTED', value: 'GRANTED' },
|
|
106
|
-
{ label: 'DENIED', value: 'DENIED' },
|
|
107
|
-
{ label: 'UNSPECIFIED', value: 'UNSPECIFIED' }
|
|
108
|
-
],
|
|
109
|
-
required: true
|
|
110
|
-
},
|
|
111
|
-
external_audience_id: {
|
|
112
|
-
label: 'External Audience ID',
|
|
113
|
-
description: 'The ID of the List that users will be synced to.',
|
|
114
|
-
type: 'string',
|
|
115
|
-
default: {
|
|
116
|
-
'@path': '$.context.personas.external_audience_id'
|
|
117
|
-
},
|
|
118
|
-
unsafe_hidden: true
|
|
119
|
-
},
|
|
120
|
-
enable_batching: {
|
|
121
|
-
label: 'Enable Batching',
|
|
122
|
-
description: 'Enable batching for the request.',
|
|
123
|
-
type: 'boolean',
|
|
124
|
-
default: true,
|
|
125
|
-
unsafe_hidden: true
|
|
126
|
-
},
|
|
127
|
-
batch_size: {
|
|
128
|
-
label: 'Batch Size',
|
|
129
|
-
description: 'The number of records to send in each batch.',
|
|
130
|
-
type: 'integer',
|
|
131
|
-
default: 10000,
|
|
132
|
-
unsafe_hidden: true
|
|
133
|
-
},
|
|
134
|
-
event_name: {
|
|
135
|
-
label: 'Event Name',
|
|
136
|
-
description: 'The name of the current Segment event.',
|
|
137
|
-
type: 'string',
|
|
138
|
-
default: {
|
|
139
|
-
'@path': '$.event'
|
|
140
|
-
},
|
|
141
|
-
required: true,
|
|
142
|
-
readOnly: true
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
hooks: {
|
|
146
|
-
retlOnMappingSave: {
|
|
147
|
-
label: 'Connect to a Google Customer Match User List',
|
|
148
|
-
description: 'When saving this mapping, we will create a list in Google using the fields you provide.',
|
|
149
|
-
inputFields: {
|
|
150
|
-
list_id: {
|
|
151
|
-
type: 'string',
|
|
152
|
-
label: 'Existing List ID',
|
|
153
|
-
description: 'The ID of an existing Google list that you would like to sync users to. If you provide this, we will not create a new list.',
|
|
154
|
-
required: false,
|
|
155
|
-
dynamic: async (request, { settings, auth }) => {
|
|
156
|
-
return await functions_1.getListIds(request, settings, auth);
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
list_name: {
|
|
160
|
-
type: 'string',
|
|
161
|
-
label: 'List Name',
|
|
162
|
-
description: 'The name of the Google list that you would like to create.',
|
|
163
|
-
required: false
|
|
164
|
-
},
|
|
165
|
-
external_id_type: {
|
|
166
|
-
type: 'string',
|
|
167
|
-
label: 'External ID Type',
|
|
168
|
-
description: 'Customer match upload key types.',
|
|
169
|
-
required: true,
|
|
170
|
-
default: 'CONTACT_INFO',
|
|
171
|
-
choices: [
|
|
172
|
-
{ label: 'CONTACT INFO', value: 'CONTACT_INFO' },
|
|
173
|
-
{ label: 'CRM ID', value: 'CRM_ID' },
|
|
174
|
-
{ label: 'MOBILE ADVERTISING ID', value: 'MOBILE_ADVERTISING_ID' }
|
|
175
|
-
]
|
|
176
|
-
},
|
|
177
|
-
app_id: {
|
|
178
|
-
label: 'App ID',
|
|
179
|
-
description: 'A string that uniquely identifies a mobile application from which the data was collected. Required if external ID type is mobile advertising ID',
|
|
180
|
-
type: 'string',
|
|
181
|
-
depends_on: {
|
|
182
|
-
match: 'all',
|
|
183
|
-
conditions: [
|
|
184
|
-
{
|
|
185
|
-
fieldKey: 'external_id_type',
|
|
186
|
-
operator: 'is',
|
|
187
|
-
value: 'MOBILE_ADVERTISING_ID'
|
|
188
|
-
}
|
|
189
|
-
]
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
outputTypes: {
|
|
194
|
-
id: {
|
|
195
|
-
type: 'string',
|
|
196
|
-
label: 'ID',
|
|
197
|
-
description: 'The ID of the Google Customer Match User list that users will be synced to.',
|
|
198
|
-
required: false
|
|
199
|
-
},
|
|
200
|
-
name: {
|
|
201
|
-
type: 'string',
|
|
202
|
-
label: 'List Name',
|
|
203
|
-
description: 'The name of the Google Customer Match User list that users will be synced to.',
|
|
204
|
-
required: false
|
|
205
|
-
},
|
|
206
|
-
external_id_type: {
|
|
207
|
-
type: 'string',
|
|
208
|
-
label: 'External ID Type',
|
|
209
|
-
description: 'Customer match upload key types.',
|
|
210
|
-
required: false
|
|
211
|
-
}
|
|
212
|
-
},
|
|
213
|
-
performHook: async (request, { auth, settings, hookInputs, statsContext }) => {
|
|
214
|
-
if (hookInputs.list_id) {
|
|
215
|
-
try {
|
|
216
|
-
const response = await functions_1.getGoogleAudience(request, settings, hookInputs.list_id, {
|
|
217
|
-
refresh_token: auth?.refreshToken
|
|
218
|
-
});
|
|
219
|
-
return {
|
|
220
|
-
successMessage: `Using existing list '${response.results[0].userList.id}' (id: ${hookInputs.list_id})`,
|
|
221
|
-
savedData: {
|
|
222
|
-
id: hookInputs.list_id,
|
|
223
|
-
name: response.results[0].userList.name,
|
|
224
|
-
external_id_type: hookInputs.external_id_type
|
|
225
|
-
}
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
catch (e) {
|
|
229
|
-
const message = e.message || JSON.stringify(e) || 'Failed to get list';
|
|
230
|
-
const code = e.code || 'GET_LIST_FAILURE';
|
|
231
|
-
return {
|
|
232
|
-
error: {
|
|
233
|
-
message,
|
|
234
|
-
code
|
|
235
|
-
}
|
|
236
|
-
};
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
try {
|
|
240
|
-
const input = {
|
|
241
|
-
audienceName: hookInputs.list_name,
|
|
242
|
-
settings: settings,
|
|
243
|
-
audienceSettings: {
|
|
244
|
-
external_id_type: hookInputs.external_id_type,
|
|
245
|
-
app_id: hookInputs.app_id
|
|
246
|
-
}
|
|
247
|
-
};
|
|
248
|
-
const listId = await functions_1.createGoogleAudience(request, input, { refresh_token: auth?.refreshToken }, statsContext);
|
|
249
|
-
return {
|
|
250
|
-
successMessage: `List '${hookInputs.list_name}' (id: ${listId}) created successfully!`,
|
|
251
|
-
savedData: {
|
|
252
|
-
id: listId,
|
|
253
|
-
name: hookInputs.list_name,
|
|
254
|
-
external_id_type: hookInputs.external_id_type
|
|
255
|
-
}
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
catch (e) {
|
|
259
|
-
const message = e.message || JSON.stringify(e) || 'Failed to create list';
|
|
260
|
-
const code = e.code || 'CREATE_LIST_FAILURE';
|
|
261
|
-
return {
|
|
262
|
-
error: {
|
|
263
|
-
message,
|
|
264
|
-
code
|
|
265
|
-
}
|
|
266
|
-
};
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
},
|
|
271
|
-
perform: async (request, { settings, audienceSettings, payload, hookOutputs, statsContext, syncMode }) => {
|
|
272
|
-
hookOutputs?.retlOnMappingSave?.outputs.id;
|
|
273
|
-
return await functions_1.handleUpdate(request, settings, audienceSettings, [payload], hookOutputs?.retlOnMappingSave?.outputs.id, hookOutputs?.retlOnMappingSave?.outputs.external_id_type, syncMode, statsContext);
|
|
274
|
-
},
|
|
275
|
-
performBatch: async (request, { settings, audienceSettings, payload, hookOutputs, statsContext, syncMode }) => {
|
|
276
|
-
return await functions_1.handleUpdate(request, settings, audienceSettings, payload, hookOutputs?.retlOnMappingSave?.outputs.id, hookOutputs?.retlOnMappingSave?.outputs.external_id_type, syncMode, statsContext);
|
|
277
|
-
}
|
|
278
|
-
};
|
|
279
|
-
exports.default = action;
|
|
280
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-enhanced-conversions/userList/index.ts"],"names":[],"mappings":";;AAGA,4CAAgG;AAIhG,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,0BAA0B;IACjC,WAAW,EAAE,wEAAwE;IACrF,mBAAmB,EAAE,yDAAyD;IAC9E,QAAQ,EAAE;QACR,WAAW,EAAE,2DAA2D;QACxE,KAAK,EAAE,qBAAqB;QAC5B,OAAO,EAAE,KAAK;QACd,OAAO,EAAE;YACP,EAAE,KAAK,EAAE,6DAA6D,EAAE,KAAK,EAAE,KAAK,EAAE;YACtF,EAAE,KAAK,EAAE,iEAAiE,EAAE,KAAK,EAAE,QAAQ,EAAE;SAC9F;KACF;IACD,MAAM,EAAE;QACN,UAAU,EAAE;YACV,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,wBAAwB;YACrC,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,KA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C,IAAI,IAAI,qBAAqB,CAAA;oBAClE,OAAO;wBACL,KAAK,EAAE;4BACL,OAAO;4BACP,IAAI;yBACL;qBACF,CAAA;iBACF;YACH,CAAC;SACF;KACF;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,gBAAgB,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,EAAE;QACvG,WAAW,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,CAAA;QAC1C,OAAO,MAAM,wBAAY,CACvB,OAAO,EACP,QAAQ,EACR,gBAAgB,EAChB,CAAC,OAAO,CAAC,EACT,WAAW,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,EAC1C,WAAW,EAAE,iBAAiB,EAAE,OAAO,CAAC,gBAAgB,EACxD,QAAQ,EACR,YAAY,CACb,CAAA;IACH,CAAC;IACD,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,gBAAgB,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC5G,OAAO,MAAM,wBAAY,CACvB,OAAO,EACP,QAAQ,EACR,gBAAgB,EAChB,OAAO,EACP,WAAW,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,EAC1C,WAAW,EAAE,iBAAiB,EAAE,OAAO,CAAC,gBAAgB,EACxD,QAAQ,EACR,YAAY,CACb,CAAA;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/mappings-two-test/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const sendEvent_1 = __importDefault(require("./sendEvent"));
|
|
7
|
-
const kitchenSink_1 = __importDefault(require("./kitchenSink"));
|
|
8
|
-
const inputMethods_1 = __importDefault(require("./inputMethods"));
|
|
9
|
-
const destination = {
|
|
10
|
-
name: 'Mappings Two Test',
|
|
11
|
-
slug: 'actions-mappings-two-test',
|
|
12
|
-
mode: 'cloud',
|
|
13
|
-
authentication: {
|
|
14
|
-
scheme: 'custom',
|
|
15
|
-
fields: {
|
|
16
|
-
apiKey: {
|
|
17
|
-
label: 'API Key',
|
|
18
|
-
description: 'Your Mappings Two Test API Key. This is a Segment production write key that you can find in your Segment settings. All the actions in this destination will send payloads as Segment events to this source.',
|
|
19
|
-
type: 'string',
|
|
20
|
-
required: true
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
testAuthentication: (request, { settings }) => {
|
|
24
|
-
return request(`https://cdn.segment.com/v1/projects/${settings.apiKey}/settings`);
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
actions: {
|
|
28
|
-
sendEvent: sendEvent_1.default,
|
|
29
|
-
kitchenSink: kitchenSink_1.default,
|
|
30
|
-
inputMethods: inputMethods_1.default
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
exports.default = destination;
|
|
34
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/mappings-two-test/index.ts"],"names":[],"mappings":";;;;;AAGA,4DAAmC;AACnC,gEAAuC;AACvC,kEAAyC;AAEzC,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,KAAK,EAAE,SAAS;gBAChB,WAAW,EACT,6MAA6M;gBAC/M,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAC5C,OAAO,OAAO,CAAC,uCAAuC,QAAQ,CAAC,MAAM,WAAW,CAAC,CAAA;QACnF,CAAC;KACF;IAED,OAAO,EAAE;QACP,SAAS,EAAT,mBAAS;QACT,WAAW,EAAX,qBAAW;QACX,YAAY,EAAZ,sBAAY;KACb;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export interface Payload {
|
|
2
|
-
string_field_no_free_form?: string;
|
|
3
|
-
string_field_no_picker?: string;
|
|
4
|
-
dynamic_string_field?: string;
|
|
5
|
-
number_field: number;
|
|
6
|
-
boolean_field?: boolean;
|
|
7
|
-
string_select?: string;
|
|
8
|
-
unstructured_object?: {
|
|
9
|
-
[k: string]: unknown;
|
|
10
|
-
};
|
|
11
|
-
mappable_and_editable_object?: {
|
|
12
|
-
[k: string]: unknown;
|
|
13
|
-
};
|
|
14
|
-
structured_object?: {
|
|
15
|
-
name?: string;
|
|
16
|
-
age?: number;
|
|
17
|
-
is_active?: boolean;
|
|
18
|
-
role?: string;
|
|
19
|
-
};
|
|
20
|
-
structured_object_with_additional_properties?: {
|
|
21
|
-
name?: string;
|
|
22
|
-
age?: number;
|
|
23
|
-
[k: string]: unknown;
|
|
24
|
-
};
|
|
25
|
-
structured_array_of_objects?: {
|
|
26
|
-
name?: string;
|
|
27
|
-
age?: number;
|
|
28
|
-
}[];
|
|
29
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/mappings-two-test/inputMethods/generated-types.ts"],"names":[],"mappings":""}
|