@segment/action-destinations 3.287.0 → 3.288.0-staging-437f9f88e
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/index.js +1 -0
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/klaviyo/orderCompleted/generated-types.d.ts +0 -9
- package/dist/destinations/klaviyo/orderCompleted/index.js +64 -166
- package/dist/destinations/klaviyo/orderCompleted/index.js.map +1 -1
- package/dist/destinations/klaviyo/trackEvent/index.js +1 -1
- package/dist/destinations/klaviyo/trackEvent/index.js.map +1 -1
- package/dist/destinations/mappings-two-test/generated-types.d.ts +3 -0
- package/dist/destinations/{engage-messaging-sendgrid/sendEmail.types.js → mappings-two-test/generated-types.js} +1 -1
- package/dist/destinations/mappings-two-test/generated-types.js.map +1 -0
- package/dist/destinations/{engage/sendgrid/destinationDefinition.d.ts → mappings-two-test/index.d.ts} +2 -1
- package/dist/destinations/mappings-two-test/index.js +32 -0
- package/dist/destinations/mappings-two-test/index.js.map +1 -0
- package/dist/destinations/mappings-two-test/kitchenSink/generated-types.d.ts +42 -0
- package/dist/destinations/{engage/twilio/utils/types.js → mappings-two-test/kitchenSink/generated-types.js} +1 -1
- package/dist/destinations/mappings-two-test/kitchenSink/generated-types.js.map +1 -0
- package/dist/destinations/{engage/twilio/sendWhatsApp/actionDefinition.d.ts → mappings-two-test/kitchenSink/index.d.ts} +2 -1
- package/dist/destinations/mappings-two-test/kitchenSink/index.js +246 -0
- package/dist/destinations/mappings-two-test/kitchenSink/index.js.map +1 -0
- package/dist/destinations/mappings-two-test/sendEvent/generated-types.d.ts +6 -0
- package/dist/destinations/{engage/sendgrid/sendEmail/UnlayerResponse.js → mappings-two-test/sendEvent/generated-types.js} +1 -1
- package/dist/destinations/mappings-two-test/sendEvent/generated-types.js.map +1 -0
- package/dist/destinations/{engage/twilio/sendSms/actionDefinition.d.ts → mappings-two-test/sendEvent/index.d.ts} +2 -1
- package/dist/destinations/mappings-two-test/sendEvent/index.js +110 -0
- package/dist/destinations/mappings-two-test/sendEvent/index.js.map +1 -0
- package/package.json +4 -4
- 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.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.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.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.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.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/mixpanel/incrementProperties/__test__/__snapshots__/snapshot.test.js.snap +0 -18
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const action = {
|
|
4
|
+
title: 'Kitchen Sink',
|
|
5
|
+
description: 'Action with all possible field types',
|
|
6
|
+
platform: 'cloud',
|
|
7
|
+
syncMode: {
|
|
8
|
+
description: 'Define how the records from your destination will be synced to mappings 2 test destination',
|
|
9
|
+
label: 'How to sync records',
|
|
10
|
+
default: 'add',
|
|
11
|
+
choices: [
|
|
12
|
+
{ label: 'Adds record to mappings 2 test destination', value: 'add' },
|
|
13
|
+
{ label: 'Updates record in mappings 2 test destination', value: 'update' }
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
fields: {
|
|
17
|
+
string_field: {
|
|
18
|
+
label: 'String Field',
|
|
19
|
+
description: 'A test string field',
|
|
20
|
+
type: 'string',
|
|
21
|
+
format: 'email'
|
|
22
|
+
},
|
|
23
|
+
dynamic_string_field: {
|
|
24
|
+
label: 'Dynamic String Field',
|
|
25
|
+
description: 'A test dynamic string field',
|
|
26
|
+
type: 'string',
|
|
27
|
+
dynamic: true,
|
|
28
|
+
multiple: true
|
|
29
|
+
},
|
|
30
|
+
number_field: {
|
|
31
|
+
label: 'Number Field',
|
|
32
|
+
description: 'A test number field',
|
|
33
|
+
type: 'number',
|
|
34
|
+
required: true
|
|
35
|
+
},
|
|
36
|
+
boolean_field: {
|
|
37
|
+
label: 'Boolean Field',
|
|
38
|
+
description: 'A test boolean field',
|
|
39
|
+
type: 'boolean'
|
|
40
|
+
},
|
|
41
|
+
string_select: {
|
|
42
|
+
label: 'Select field',
|
|
43
|
+
description: 'A test select field to pick a single string value',
|
|
44
|
+
type: 'string',
|
|
45
|
+
choices: [
|
|
46
|
+
{ label: 'Option 1', value: 'option1' },
|
|
47
|
+
{ label: 'Option 2', value: 'option2' }
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
select_number: {
|
|
51
|
+
label: 'Select Number',
|
|
52
|
+
description: 'A test select field to pick a single number value',
|
|
53
|
+
type: 'number',
|
|
54
|
+
choices: [
|
|
55
|
+
{ label: 'Number 1', value: 1 },
|
|
56
|
+
{ label: 'Number 2', value: 2 }
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
array_field: {
|
|
60
|
+
label: 'Array of string field (Unsupported)',
|
|
61
|
+
description: 'A test array of string field',
|
|
62
|
+
type: 'string',
|
|
63
|
+
multiple: true
|
|
64
|
+
},
|
|
65
|
+
date_time_field: {
|
|
66
|
+
label: 'Date time field',
|
|
67
|
+
description: 'A test date time field',
|
|
68
|
+
type: 'datetime'
|
|
69
|
+
},
|
|
70
|
+
integer_field: {
|
|
71
|
+
label: 'Integer field',
|
|
72
|
+
description: 'A test integer field',
|
|
73
|
+
type: 'integer'
|
|
74
|
+
},
|
|
75
|
+
password_field: {
|
|
76
|
+
label: 'Password field',
|
|
77
|
+
description: 'A test password field',
|
|
78
|
+
type: 'password'
|
|
79
|
+
},
|
|
80
|
+
text_field: {
|
|
81
|
+
label: 'Text field',
|
|
82
|
+
description: 'A Text Field',
|
|
83
|
+
type: 'text'
|
|
84
|
+
},
|
|
85
|
+
unstructured_object: {
|
|
86
|
+
label: 'Unstructured Object',
|
|
87
|
+
description: 'A test unstructured object',
|
|
88
|
+
type: 'object',
|
|
89
|
+
defaultObjectUI: 'keyvalue:only'
|
|
90
|
+
},
|
|
91
|
+
mappable_object: {
|
|
92
|
+
label: 'Unstructured Object that is only mappable',
|
|
93
|
+
description: 'A test unstructured object',
|
|
94
|
+
type: 'object',
|
|
95
|
+
defaultObjectUI: 'object:only'
|
|
96
|
+
},
|
|
97
|
+
mappable_and_editable_object: {
|
|
98
|
+
label: 'Unstructured Object that is both mappable and editable',
|
|
99
|
+
description: 'A test unstructured object that is both mappable and editable',
|
|
100
|
+
type: 'object'
|
|
101
|
+
},
|
|
102
|
+
structured_object: {
|
|
103
|
+
label: 'Structured Object',
|
|
104
|
+
description: 'A test structured object',
|
|
105
|
+
type: 'object',
|
|
106
|
+
properties: {
|
|
107
|
+
name: {
|
|
108
|
+
label: 'Name',
|
|
109
|
+
description: 'A test string field',
|
|
110
|
+
type: 'string'
|
|
111
|
+
},
|
|
112
|
+
age: {
|
|
113
|
+
label: 'Age',
|
|
114
|
+
description: 'A test number field',
|
|
115
|
+
type: 'number'
|
|
116
|
+
},
|
|
117
|
+
is_active: {
|
|
118
|
+
label: 'Is Active',
|
|
119
|
+
description: 'A test boolean field',
|
|
120
|
+
type: 'boolean'
|
|
121
|
+
},
|
|
122
|
+
role: {
|
|
123
|
+
label: 'Role',
|
|
124
|
+
description: 'A test select field to pick a single string value',
|
|
125
|
+
type: 'string',
|
|
126
|
+
choices: [
|
|
127
|
+
{ label: 'Admin', value: 'admin' },
|
|
128
|
+
{ label: 'User', value: 'user' }
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
structured_object_with_additional_properties: {
|
|
134
|
+
label: 'Structured Object with Additional Properties',
|
|
135
|
+
description: 'A test structured object with additional properties',
|
|
136
|
+
type: 'object',
|
|
137
|
+
additionalProperties: true,
|
|
138
|
+
properties: {
|
|
139
|
+
name: {
|
|
140
|
+
label: 'Name',
|
|
141
|
+
description: 'A test string field',
|
|
142
|
+
type: 'string'
|
|
143
|
+
},
|
|
144
|
+
age: {
|
|
145
|
+
label: 'Age',
|
|
146
|
+
description: 'A test number field',
|
|
147
|
+
type: 'number'
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
structured_array_of_objects: {
|
|
152
|
+
label: 'Structured Array of Objects',
|
|
153
|
+
description: 'A test structured array of objects',
|
|
154
|
+
type: 'object',
|
|
155
|
+
multiple: true,
|
|
156
|
+
properties: {
|
|
157
|
+
name: {
|
|
158
|
+
label: 'Name',
|
|
159
|
+
description: 'A test string field',
|
|
160
|
+
type: 'string'
|
|
161
|
+
},
|
|
162
|
+
age: {
|
|
163
|
+
label: 'Age',
|
|
164
|
+
description: 'A test number field',
|
|
165
|
+
type: 'number'
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
structured_array_of_objects_with_additional_props: {
|
|
170
|
+
label: 'Structured Array of Objects with Additional Properties',
|
|
171
|
+
description: 'A test structured array of objects with additional properties',
|
|
172
|
+
type: 'object',
|
|
173
|
+
multiple: true,
|
|
174
|
+
additionalProperties: true,
|
|
175
|
+
properties: {
|
|
176
|
+
name: {
|
|
177
|
+
label: 'Name',
|
|
178
|
+
description: 'A test string field',
|
|
179
|
+
type: 'string'
|
|
180
|
+
},
|
|
181
|
+
age: {
|
|
182
|
+
label: 'Age',
|
|
183
|
+
description: 'A test number field',
|
|
184
|
+
type: 'number'
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
dynamicFields: {
|
|
190
|
+
dynamic_string_field: async () => {
|
|
191
|
+
return Promise.resolve({
|
|
192
|
+
choices: [
|
|
193
|
+
{
|
|
194
|
+
label: 'Cat 🐱',
|
|
195
|
+
value: 'cat',
|
|
196
|
+
type: 'string',
|
|
197
|
+
description: 'A small, independent, and playful pet known for its agility and affectionate purring.'
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
label: 'Dog 🐶',
|
|
201
|
+
value: 'dog',
|
|
202
|
+
type: 'string',
|
|
203
|
+
description: "A loyal and friendly pet, great for companionship and known as man's best friend."
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
label: 'Elephant 🐘',
|
|
207
|
+
value: 'elephant',
|
|
208
|
+
type: 'string',
|
|
209
|
+
description: 'A large and intelligent animal with a trunk, known for its memory and social structure.'
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
label: 'Dolphin 🐬',
|
|
213
|
+
value: 'dolphin',
|
|
214
|
+
type: 'string',
|
|
215
|
+
description: 'A highly intelligent and social marine mammal known for its playful behavior and acrobatics.'
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
label: 'Tiger 🐅',
|
|
219
|
+
value: 'tiger',
|
|
220
|
+
type: 'string',
|
|
221
|
+
description: 'A majestic and powerful big cat, known for its striking orange coat with black stripes.'
|
|
222
|
+
}
|
|
223
|
+
],
|
|
224
|
+
nextPage: ''
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
perform: (request, { payload, settings, syncMode }) => {
|
|
229
|
+
const api_key = settings.apiKey;
|
|
230
|
+
return request('https://api.segment.io/v1/t', {
|
|
231
|
+
method: 'POST',
|
|
232
|
+
json: {
|
|
233
|
+
userId: 'test-user',
|
|
234
|
+
type: 'track',
|
|
235
|
+
event: 'test-event',
|
|
236
|
+
writeKey: api_key,
|
|
237
|
+
properties: {
|
|
238
|
+
...payload,
|
|
239
|
+
syncMode
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
exports.default = action;
|
|
246
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/mappings-two-test/kitchenSink/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,sCAAsC;IACnD,QAAQ,EAAE,OAAO;IACjB,QAAQ,EAAE;QACR,WAAW,EAAE,4FAA4F;QACzG,KAAK,EAAE,qBAAqB;QAC5B,OAAO,EAAE,KAAK;QACd,OAAO,EAAE;YACP,EAAE,KAAK,EAAE,4CAA4C,EAAE,KAAK,EAAE,KAAK,EAAE;YACrE,EAAE,KAAK,EAAE,+CAA+C,EAAE,KAAK,EAAE,QAAQ,EAAE;SAC5E;KACF;IACD,MAAM,EAAE;QACN,YAAY,EAAE;YACZ,KAAK,EAAE,cAAc;YACrB,WAAW,EAAE,qBAAqB;YAClC,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,OAAO;SAChB;QACD,oBAAoB,EAAE;YACpB,KAAK,EAAE,sBAAsB;YAC7B,WAAW,EAAE,6BAA6B;YAC1C,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;SACf;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,cAAc;YACrB,WAAW,EAAE,qBAAqB;YAClC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,aAAa,EAAE;YACb,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ACnB,KAAK,EAAE,SAAS;wBAChB,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,8FAA8F;qBAC5G;oBACD;wBACE,KAAK,EAAE,UAAU;wBACjB,KAAK,EAAE,OAAO;wBACd,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,yFAAyF;qBACvG;iBACF;gBACD,QAAQ,EAAE,EAAE;aACb,CAAC,CAAA;QACJ,CAAC;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE;QACpD,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAA;QAC/B,OAAO,OAAO,CAAC,6BAA6B,EAAE;YAC5C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,MAAM,EAAE,WAAW;gBACnB,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,YAAY;gBACnB,QAAQ,EAAE,OAAO;gBACjB,UAAU,EAAE;oBACV,GAAG,OAAO;oBACV,QAAQ;iBACT;aACF;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/mappings-two-test/sendEvent/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ActionDefinition } from '@segment/actions-core';
|
|
2
2
|
import type { Settings } from '../generated-types';
|
|
3
3
|
import type { Payload } from './generated-types';
|
|
4
|
-
|
|
4
|
+
declare const action: ActionDefinition<Settings, Payload>;
|
|
5
|
+
export default action;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const action = {
|
|
4
|
+
title: 'Send Event',
|
|
5
|
+
description: 'Test Segment Action',
|
|
6
|
+
platform: 'cloud',
|
|
7
|
+
syncMode: {
|
|
8
|
+
description: 'Define how the records from your destination will be synced to mappings 2 test destination',
|
|
9
|
+
label: 'How to sync records',
|
|
10
|
+
default: 'add',
|
|
11
|
+
choices: [
|
|
12
|
+
{ label: 'Adds record to mappings 2 test destination', value: 'add' },
|
|
13
|
+
{ label: 'Updates record in mappings 2 test destination', value: 'update' }
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
fields: {
|
|
17
|
+
test_field: {
|
|
18
|
+
label: 'Test Field',
|
|
19
|
+
description: 'A test string field',
|
|
20
|
+
type: 'string'
|
|
21
|
+
},
|
|
22
|
+
dynamic_object: {
|
|
23
|
+
label: 'Dynamic Object',
|
|
24
|
+
description: 'A dynamic object',
|
|
25
|
+
type: 'object',
|
|
26
|
+
required: true,
|
|
27
|
+
defaultObjectUI: 'keyvalue:only',
|
|
28
|
+
dynamic: true
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
dynamicFields: {
|
|
32
|
+
dynamic_object: {
|
|
33
|
+
__keys__: async () => {
|
|
34
|
+
return Promise.resolve({
|
|
35
|
+
choices: [
|
|
36
|
+
{
|
|
37
|
+
label: 'Apple 🍎',
|
|
38
|
+
value: 'apple',
|
|
39
|
+
type: 'string',
|
|
40
|
+
description: 'A crisp and juicy red fruit, perfect for snacking or making pies.'
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
label: 'Banana 🍌',
|
|
44
|
+
value: 'banana',
|
|
45
|
+
type: 'string',
|
|
46
|
+
description: 'A sweet and soft yellow fruit, ideal for a quick energy boost.'
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
label: 'Cherry 🍒',
|
|
50
|
+
value: 'cherry',
|
|
51
|
+
type: 'string',
|
|
52
|
+
description: 'A small and tart red fruit, great for desserts and snacking.'
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
label: 'Grapes 🍇',
|
|
56
|
+
value: 'grapes',
|
|
57
|
+
type: 'string',
|
|
58
|
+
description: 'Juicy and sweet clusters of small, round fruits, perfect for snacking or making wine.'
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
label: 'Orange 🍊',
|
|
62
|
+
value: 'orange',
|
|
63
|
+
type: 'string',
|
|
64
|
+
description: 'A tangy and refreshing orange fruit, great for juicing or eating fresh.'
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
nextPage: ''
|
|
68
|
+
});
|
|
69
|
+
},
|
|
70
|
+
__values__: async (_, { dynamicFieldContext }) => {
|
|
71
|
+
const selectedKey = dynamicFieldContext?.selectedKey || 'unknwon';
|
|
72
|
+
return Promise.resolve({
|
|
73
|
+
choices: [
|
|
74
|
+
{
|
|
75
|
+
label: `${selectedKey} juice`,
|
|
76
|
+
value: `${selectedKey}_juice`
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
label: `${selectedKey} cake`,
|
|
80
|
+
value: `${selectedKey}_cake`
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
label: `${selectedKey} smoothie`,
|
|
84
|
+
value: `${selectedKey}_smoothie`
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
nextPage: ''
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
perform: (request, { payload, settings, syncMode }) => {
|
|
93
|
+
const api_key = settings.apiKey;
|
|
94
|
+
return request('https://api.segment.io/v1/t', {
|
|
95
|
+
method: 'POST',
|
|
96
|
+
json: {
|
|
97
|
+
userId: 'test-user',
|
|
98
|
+
type: 'track',
|
|
99
|
+
event: 'test-event',
|
|
100
|
+
writeKey: api_key,
|
|
101
|
+
properties: {
|
|
102
|
+
...payload,
|
|
103
|
+
syncMode
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
exports.default = action;
|
|
110
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","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|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@segment/action-destinations",
|
|
3
3
|
"description": "Destination Actions engine and definitions.",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.288.0-staging-437f9f88e",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/segmentio/action-destinations",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"@bufbuild/protobuf": "^1.4.2",
|
|
44
44
|
"@bufbuild/protoc-gen-es": "^1.4.2",
|
|
45
45
|
"@segment/a1-notation": "^2.1.4",
|
|
46
|
-
"@segment/actions-core": "
|
|
47
|
-
"@segment/actions-shared": "
|
|
46
|
+
"@segment/actions-core": "3.121.0-staging-437f9f88e",
|
|
47
|
+
"@segment/actions-shared": "1.102.0-staging-437f9f88e",
|
|
48
48
|
"@types/node": "^18.11.15",
|
|
49
49
|
"ajv-formats": "^2.1.1",
|
|
50
50
|
"aws4": "^1.12.0",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"__tests__/__helpers__/"
|
|
87
87
|
]
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "9c04e12c4a0e81f6b68dca0a297fb2c0209d2431"
|
|
90
90
|
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.destinationDefinition = void 0;
|
|
4
|
-
const sendEmail_1 = require("./sendEmail");
|
|
5
|
-
const previewApiLookup_1 = require("./previewApiLookup");
|
|
6
|
-
exports.destinationDefinition = {
|
|
7
|
-
name: 'Engage Messaging SendGrid',
|
|
8
|
-
slug: 'actions-personas-messaging-sendgrid',
|
|
9
|
-
mode: 'cloud',
|
|
10
|
-
description: 'This is an Engage specific action to send an email',
|
|
11
|
-
authentication: {
|
|
12
|
-
scheme: 'custom',
|
|
13
|
-
fields: {
|
|
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
|
-
}
|
|
69
|
-
};
|
|
70
|
-
//# sourceMappingURL=destinationDefinition.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"destinationDefinition.js","sourceRoot":"","sources":["../../../../src/destinations/engage/sendgrid/destinationDefinition.ts"],"names":[],"mappings":";;;AAEA,2CAA2D;AAC3D,yDAAyE;AAE5D,QAAA,qBAAqB,GAAoC;IACpE,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,qCAAqC;IAC3C,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,oDAAoD;IACjE,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,aAAa,EAAE;gBACb,KAAK,EAAE,iBAAiB;gBACxB,IAAI,EAAE,UAAU;gBAChB,WAAW,EAAE,sCAAsC;aACpD;YACD,cAAc,EAAE;gBACd,KAAK,EAAE,SAAS;gBAChB,IAAI,EAAE,UAAU;gBAChB,WAAW,EAAE,uCAAuC;gBACpD,QAAQ,EAAE,IAAI;aACf;YACD,qBAAqB,EAAE;gBACrB,KAAK,EAAE,yBAAyB;gBAChC,WAAW,EAAE,yBAAyB;gBACtC,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,qBAAqB,EAAE;gBACrB,KAAK,EAAE,0BAA0B;gBACjC,WAAW,EAAE,0BAA0B;gBACvC,IAAI,EAAE,UAAU;gBAChB,QAAQ,EAAE,IAAI;aACf;YACD,OAAO,EAAE;gBACP,KAAK,EAAE,UAAU;gBACjB,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,QAAQ,EAAE;gBACR,KAAK,EAAE,WAAW;gBAClB,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,MAAM,EAAE;gBACN,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,gDAAgD;gBAC7D,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE;oBAC1C,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE;iBAC3C;gBACD,OAAO,EAAE,WAAW;gBACpB,QAAQ,EAAE,KAAK;aAChB;SACF;QACD,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE;YAC9B,OAAO,OAAO,CAAC,2CAA2C,CAAC,CAAA;QAC7D,CAAC;KACF;IACD,OAAO,EAAE;QACP,SAAS,EAAT,4BAAS;QACT,gBAAgB,EAAhB,mCAAgB;KACjB;CACF,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../../engage-messaging-sendgrid/generated-types';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("../../engage-messaging-sendgrid/generated-types"), exports);
|
|
14
|
-
//# sourceMappingURL=generated-types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/engage/sendgrid/generated-types.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kFAA+D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/engage/sendgrid/index.ts"],"names":[],"mappings":";;AAAA,mEAA+D;AAC/D,kBAAe,6CAAqB,CAAA"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.actionDefinition = void 0;
|
|
4
|
-
const apiLookups_1 = require("../../utils/apiLookups");
|
|
5
|
-
exports.actionDefinition = {
|
|
6
|
-
title: 'Perform a single API lookup',
|
|
7
|
-
description: 'Perform a single API lookup and return the response',
|
|
8
|
-
fields: {
|
|
9
|
-
...apiLookups_1.apiLookupActionFields,
|
|
10
|
-
traits: {
|
|
11
|
-
label: 'Traits',
|
|
12
|
-
description: "A user profile's traits",
|
|
13
|
-
type: 'object',
|
|
14
|
-
required: false
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
perform: async (request, { settings, payload, statsContext, logger }) => {
|
|
18
|
-
const statsClient = statsContext?.statsClient;
|
|
19
|
-
const tags = statsContext?.tags ?? [];
|
|
20
|
-
const { traits = {}, ...apiLookupConfig } = payload;
|
|
21
|
-
const profile = { traits: traits };
|
|
22
|
-
const data = await apiLookups_1.performApiLookup(request, apiLookupConfig, profile, statsClient, tags, settings, logger);
|
|
23
|
-
return {
|
|
24
|
-
data
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=actionDefinition.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"actionDefinition.js","sourceRoot":"","sources":["../../../../../src/destinations/engage/sendgrid/previewApiLookup/actionDefinition.ts"],"names":[],"mappings":";;;AAGA,uDAAgF;AAGnE,QAAA,gBAAgB,GAAwC;IACnE,KAAK,EAAE,6BAA6B;IACpC,WAAW,EAAE,qDAAqD;IAClE,MAAM,EAAE;QACN,GAAG,kCAAqB;QACxB,MAAM,EAAE;YACN,KAAK,EAAE,QAAQ;YACf,WAAW,EAAE,yBAAyB;YACtC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;SAChB;KACF;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,EAAE;QACtE,MAAM,WAAW,GAAG,YAAY,EAAE,WAAW,CAAA;QAC7C,MAAM,IAAI,GAAG,YAAY,EAAE,IAAI,IAAI,EAAE,CAAA;QACrC,MAAM,EAAE,MAAM,GAAG,EAAE,EAAE,GAAG,eAAe,EAAE,GAAG,OAAO,CAAA;QACnD,MAAM,OAAO,GAAY,EAAE,MAAM,EAAE,MAAgC,EAAE,CAAA;QACrE,MAAM,IAAI,GAAG,MAAM,6BAAgB,CAAC,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAA;QAC3G,OAAO;YACL,IAAI;SACL,CAAA;IACH,CAAC;CACF,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../../../engage-messaging-sendgrid/previewApiLookup.types';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("../../../engage-messaging-sendgrid/previewApiLookup.types"), exports);
|
|
14
|
-
//# sourceMappingURL=generated-types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../../src/destinations/engage/sendgrid/previewApiLookup/generated-types.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4FAAyE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './actionDefinition';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./actionDefinition"), exports);
|
|
14
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/destinations/engage/sendgrid/previewApiLookup/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAkC"}
|