@segment/action-destinations 3.276.0 → 3.278.0-staging-9c7763f66
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/amazon-ads/generated-types.d.ts +12 -0
- package/dist/destinations/amazon-ads/generated-types.js +3 -0
- package/dist/destinations/amazon-ads/generated-types.js.map +1 -0
- package/dist/destinations/amazon-ads/index.d.ts +4 -0
- package/dist/destinations/amazon-ads/index.js +237 -0
- package/dist/destinations/amazon-ads/index.js.map +1 -0
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.d.ts +15 -0
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.js +3 -0
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.js.map +1 -0
- package/dist/destinations/amazon-ads/syncAudiences/index.d.ts +5 -0
- package/dist/destinations/amazon-ads/syncAudiences/index.js +182 -0
- package/dist/destinations/amazon-ads/syncAudiences/index.js.map +1 -0
- package/dist/destinations/amazon-ads/types.d.ts +47 -0
- package/dist/destinations/amazon-ads/types.js +11 -0
- package/dist/destinations/amazon-ads/types.js.map +1 -0
- package/dist/destinations/amazon-ads/utils.d.ts +37 -0
- package/dist/destinations/amazon-ads/utils.js +25 -0
- package/dist/destinations/amazon-ads/utils.js.map +1 -0
- package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.d.ts +1 -0
- package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.js +184 -0
- package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.js.map +1 -0
- package/dist/destinations/contentstack/constants.d.ts +3 -0
- package/dist/destinations/contentstack/constants.js +7 -0
- package/dist/destinations/contentstack/constants.js.map +1 -0
- package/dist/destinations/dynamic-yield-audiences/syncAudience/types.d.ts +22 -0
- package/dist/destinations/dynamic-yield-audiences/syncAudience/types.js +3 -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/sendgrid/Profile.d.ts +6 -0
- package/dist/destinations/engage/sendgrid/Profile.js +3 -0
- package/dist/destinations/engage/sendgrid/Profile.js.map +1 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.d.ts +21 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js +174 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js.map +1 -0
- package/dist/destinations/engage/utils/track.d.ts +9 -9
- package/dist/destinations/google-analytics-4/addPaymentInfo/generated-types.d.ts +1 -0
- package/dist/destinations/google-analytics-4/addToCart/generated-types.d.ts +1 -0
- package/dist/destinations/google-analytics-4/addToWishlist/generated-types.d.ts +1 -0
- package/dist/destinations/google-analytics-4/beginCheckout/generated-types.d.ts +1 -0
- package/dist/destinations/google-analytics-4/ga4-properties.js +1 -0
- package/dist/destinations/google-analytics-4/ga4-properties.js.map +1 -1
- package/dist/destinations/google-analytics-4/purchase/generated-types.d.ts +1 -0
- package/dist/destinations/google-analytics-4/refund/generated-types.d.ts +1 -0
- package/dist/destinations/google-analytics-4/removeFromCart/generated-types.d.ts +1 -0
- package/dist/destinations/google-analytics-4/selectItem/generated-types.d.ts +1 -0
- package/dist/destinations/google-analytics-4/selectPromotion/generated-types.d.ts +1 -0
- package/dist/destinations/google-analytics-4/viewCart/generated-types.d.ts +1 -0
- package/dist/destinations/google-analytics-4/viewItem/generated-types.d.ts +1 -0
- package/dist/destinations/google-analytics-4/viewItemList/generated-types.d.ts +1 -0
- package/dist/destinations/google-analytics-4/viewPromotion/generated-types.d.ts +1 -0
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js +2 -1
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js.map +1 -1
- package/dist/destinations/google-sheets/postSheet/generated-types.d.ts +1 -0
- package/dist/destinations/google-sheets/postSheet/index.js +13 -5
- package/dist/destinations/google-sheets/postSheet/index.js.map +1 -1
- package/dist/destinations/google-sheets-dev/postSheet.types.d.ts +1 -0
- package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js +1 -1
- package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js.map +1 -1
- package/dist/destinations/klaviyo/functions.d.ts +15 -0
- package/dist/destinations/klaviyo/functions.js +53 -1
- package/dist/destinations/klaviyo/functions.js.map +1 -1
- package/dist/destinations/klaviyo/properties.js +1 -1
- package/dist/destinations/klaviyo/removeProfileToList/generated-types.d.ts +4 -0
- package/dist/destinations/klaviyo/removeProfileToList/generated-types.js +3 -0
- package/dist/destinations/klaviyo/removeProfileToList/generated-types.js.map +1 -0
- package/dist/destinations/klaviyo/removeProfileToList/index.d.ts +5 -0
- package/dist/destinations/klaviyo/removeProfileToList/index.js +43 -0
- package/dist/destinations/klaviyo/removeProfileToList/index.js.map +1 -0
- package/dist/destinations/klaviyo/upsertProfile/generated-types.d.ts +12 -0
- package/dist/destinations/klaviyo/upsertProfile/index.js +75 -4
- package/dist/destinations/klaviyo/upsertProfile/index.js.map +1 -1
- package/dist/destinations/mixpanel/utils.d.ts +13 -0
- package/dist/destinations/mixpanel/utils.js +117 -0
- package/dist/destinations/mixpanel/utils.js.map +1 -0
- package/dist/destinations/movable-ink/categoryView/generated-types.d.ts +22 -0
- package/dist/destinations/movable-ink/categoryView/generated-types.js +3 -0
- package/dist/destinations/movable-ink/categoryView/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/categoryView/index.d.ts +5 -0
- package/dist/destinations/movable-ink/categoryView/index.js +43 -0
- package/dist/destinations/movable-ink/categoryView/index.js.map +1 -0
- package/dist/destinations/movable-ink/conversion/generated-types.d.ts +20 -0
- package/dist/destinations/movable-ink/conversion/generated-types.js +3 -0
- package/dist/destinations/movable-ink/conversion/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/conversion/index.d.ts +5 -0
- package/dist/destinations/movable-ink/conversion/index.js +45 -0
- package/dist/destinations/movable-ink/conversion/index.js.map +1 -0
- package/dist/destinations/movable-ink/fields.d.ts +21 -0
- package/dist/destinations/movable-ink/fields.js +236 -0
- package/dist/destinations/movable-ink/fields.js.map +1 -0
- package/dist/destinations/movable-ink/identify/generated-types.d.ts +7 -0
- package/dist/destinations/movable-ink/identify/generated-types.js +3 -0
- package/dist/destinations/movable-ink/identify/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/identify/index.d.ts +5 -0
- package/dist/destinations/movable-ink/identify/index.js +32 -0
- package/dist/destinations/movable-ink/identify/index.js.map +1 -0
- package/dist/destinations/movable-ink/productAdded/generated-types.d.ts +22 -0
- package/dist/destinations/movable-ink/productAdded/generated-types.js +3 -0
- package/dist/destinations/movable-ink/productAdded/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/productAdded/index.d.ts +5 -0
- package/dist/destinations/movable-ink/productAdded/index.js +43 -0
- package/dist/destinations/movable-ink/productAdded/index.js.map +1 -0
- package/dist/destinations/movable-ink/productViewed/generated-types.d.ts +21 -0
- package/dist/destinations/movable-ink/productViewed/generated-types.js +3 -0
- package/dist/destinations/movable-ink/productViewed/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/productViewed/index.d.ts +5 -0
- package/dist/destinations/movable-ink/productViewed/index.js +43 -0
- package/dist/destinations/movable-ink/productViewed/index.js.map +1 -0
- package/dist/destinations/movable-ink/search/generated-types.d.ts +12 -0
- package/dist/destinations/movable-ink/search/generated-types.js +3 -0
- package/dist/destinations/movable-ink/search/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/search/index.d.ts +5 -0
- package/dist/destinations/movable-ink/search/index.js +43 -0
- package/dist/destinations/movable-ink/search/index.js.map +1 -0
- package/dist/destinations/movable-ink/sendCustomEvent/generated-types.d.ts +25 -0
- package/dist/destinations/movable-ink/sendCustomEvent/generated-types.js +3 -0
- package/dist/destinations/movable-ink/sendCustomEvent/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/sendCustomEvent/index.d.ts +5 -0
- package/dist/destinations/movable-ink/sendCustomEvent/index.js +48 -0
- package/dist/destinations/movable-ink/sendCustomEvent/index.js.map +1 -0
- package/dist/destinations/responsys/asyncMergePetRecords/generated-types.d.ts +14 -0
- package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js +3 -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/segment/index.js +5 -1
- package/dist/destinations/segment/index.js.map +1 -1
- package/dist/destinations/segment/properties.d.ts +4 -0
- package/dist/destinations/segment/properties.js +14 -1
- package/dist/destinations/segment/properties.js.map +1 -1
- package/dist/destinations/segment/segment-properties.d.ts +4 -0
- package/dist/destinations/segment/segment-properties.js +24 -1
- package/dist/destinations/segment/segment-properties.js.map +1 -1
- package/dist/destinations/segment/sendGroup/generated-types.d.ts +3 -0
- package/dist/destinations/segment/sendGroup/index.js +4 -1
- package/dist/destinations/segment/sendGroup/index.js.map +1 -1
- package/dist/destinations/segment/sendIdentify/generated-types.d.ts +3 -0
- package/dist/destinations/segment/sendIdentify/index.js +4 -1
- package/dist/destinations/segment/sendIdentify/index.js.map +1 -1
- package/dist/destinations/segment/sendPage/generated-types.d.ts +3 -0
- package/dist/destinations/segment/sendPage/index.js +4 -1
- package/dist/destinations/segment/sendPage/index.js.map +1 -1
- package/dist/destinations/segment/sendScreen/generated-types.d.ts +3 -0
- package/dist/destinations/segment/sendScreen/index.js +4 -1
- package/dist/destinations/segment/sendScreen/index.js.map +1 -1
- package/dist/destinations/segment/sendTrack/generated-types.d.ts +3 -0
- package/dist/destinations/segment/sendTrack/index.js +4 -1
- package/dist/destinations/segment/sendTrack/index.js.map +1 -1
- package/dist/destinations/segment-profiles/segment-properties.d.ts +4 -0
- package/dist/destinations/segment-profiles/segment-properties.js +24 -1
- package/dist/destinations/segment-profiles/segment-properties.js.map +1 -1
- package/dist/destinations/segment-profiles/sendGroup/generated-types.d.ts +3 -0
- package/dist/destinations/segment-profiles/sendGroup/index.js +7 -2
- package/dist/destinations/segment-profiles/sendGroup/index.js.map +1 -1
- package/dist/destinations/segment-profiles/sendIdentify/generated-types.d.ts +3 -0
- package/dist/destinations/segment-profiles/sendIdentify/index.js +7 -2
- package/dist/destinations/segment-profiles/sendIdentify/index.js.map +1 -1
- package/dist/destinations/segment-profiles/sendSubscription/generated-types.d.ts +3 -0
- package/dist/destinations/segment-profiles/sendSubscription/index.js +5 -2
- package/dist/destinations/segment-profiles/sendSubscription/index.js.map +1 -1
- package/dist/destinations/segment-profiles/sendSubscription/subscription-properties.d.ts +1 -0
- package/dist/destinations/segment-profiles/sendSubscription/subscription-properties.js +8 -1
- package/dist/destinations/segment-profiles/sendSubscription/subscription-properties.js.map +1 -1
- package/dist/destinations/segment-profiles/sendTrack/generated-types.d.ts +3 -0
- package/dist/destinations/segment-profiles/sendTrack/index.js +6 -1
- package/dist/destinations/segment-profiles/sendTrack/index.js.map +1 -1
- 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/taboola-actions/syncAudience/client.js.map +1 -1
- package/dist/destinations/taboola-actions/syncAudience/index.js.map +1 -1
- 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/dist/destinations/trackey/group.types.d.ts +11 -0
- package/dist/destinations/trackey/group.types.js +3 -0
- package/dist/destinations/trackey/group.types.js.map +1 -0
- package/dist/destinations/trackey/identify.types.d.ts +11 -0
- package/dist/destinations/trackey/identify.types.js +3 -0
- package/dist/destinations/trackey/identify.types.js.map +1 -0
- package/dist/destinations/trackey/track.types.d.ts +12 -0
- package/dist/destinations/trackey/track.types.js +3 -0
- package/dist/destinations/trackey/track.types.js.map +1 -0
- package/dist/lib/test-data.js +11 -1
- package/dist/lib/test-data.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const rsp_properties_1 = require("../rsp-properties");
|
|
4
|
+
const rsp_operations_1 = require("../rsp-operations");
|
|
5
|
+
const action = {
|
|
6
|
+
title: 'Async Merge Profile List Members',
|
|
7
|
+
description: 'Asynchronous Merge Profile List Members API',
|
|
8
|
+
fields: {
|
|
9
|
+
profileListName: {
|
|
10
|
+
label: 'List Name',
|
|
11
|
+
description: "Name of the profile extension table's parent profile list.",
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true
|
|
14
|
+
},
|
|
15
|
+
userData: rsp_properties_1.userData,
|
|
16
|
+
mapTemplateName: {
|
|
17
|
+
label: 'Map Template Name',
|
|
18
|
+
description: 'The Map Template in Responsys that can be used to map Field Names of the Profile List to Column Names.',
|
|
19
|
+
type: 'string',
|
|
20
|
+
default: ''
|
|
21
|
+
},
|
|
22
|
+
defaultPermissionStatus: {
|
|
23
|
+
label: 'Default Permission Status',
|
|
24
|
+
description: 'This value must be specified as either OPTIN or OPTOUT and would be applied to all of the records contained in the API call. If this value is not explicitly specified, then it is set to OPTOUT.',
|
|
25
|
+
type: 'string',
|
|
26
|
+
choices: [
|
|
27
|
+
{ label: 'Opt In', value: 'OPTIN' },
|
|
28
|
+
{ label: 'Opt Out', value: 'OPTOUT' }
|
|
29
|
+
],
|
|
30
|
+
default: 'OPTOUT'
|
|
31
|
+
},
|
|
32
|
+
htmlValue: {
|
|
33
|
+
label: 'Preferred Email Format',
|
|
34
|
+
description: "Value of incoming preferred email format data. For example, 'H' may represent a preference for HTML formatted email.",
|
|
35
|
+
type: 'string'
|
|
36
|
+
},
|
|
37
|
+
insertOnNoMatch: {
|
|
38
|
+
label: 'Insert On No Match',
|
|
39
|
+
description: 'Indicates what should be done for records where a match is not found.',
|
|
40
|
+
type: 'boolean',
|
|
41
|
+
default: true
|
|
42
|
+
},
|
|
43
|
+
matchColumnName1: {
|
|
44
|
+
label: 'First Column Match',
|
|
45
|
+
description: 'First match column for determining whether an insert or update should occur.',
|
|
46
|
+
type: 'string',
|
|
47
|
+
choices: [
|
|
48
|
+
{ label: 'RIID_', value: 'RIID_' },
|
|
49
|
+
{ label: 'CUSTOMER_ID_', value: 'CUSTOMER_ID_' },
|
|
50
|
+
{ label: 'EMAIL_ADDRESS_', value: 'EMAIL_ADDRESS_' },
|
|
51
|
+
{ label: 'MOBILE_NUMBER_', value: 'MOBILE_NUMBER_' },
|
|
52
|
+
{ label: 'EMAIL_MD5_HASH_', value: 'EMAIL_MD5_HASH_' },
|
|
53
|
+
{ label: 'EMAIL_SHA256_HASH_', value: 'EMAIL_SHA256_HASH_' }
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
matchColumnName2: {
|
|
57
|
+
label: 'Second Column Match',
|
|
58
|
+
description: 'Second match column for determining whether an insert or update should occur.',
|
|
59
|
+
type: 'string',
|
|
60
|
+
choices: [
|
|
61
|
+
{ label: 'RIID_', value: 'RIID_' },
|
|
62
|
+
{ label: 'CUSTOMER_ID_', value: 'CUSTOMER_ID_' },
|
|
63
|
+
{ label: 'EMAIL_ADDRESS_', value: 'EMAIL_ADDRESS_' },
|
|
64
|
+
{ label: 'MOBILE_NUMBER_', value: 'MOBILE_NUMBER_' },
|
|
65
|
+
{ label: 'EMAIL_MD5_HASH_', value: 'EMAIL_MD5_HASH_' },
|
|
66
|
+
{ label: 'EMAIL_SHA256_HASH_', value: 'EMAIL_SHA256_HASH_' }
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
matchOperator: {
|
|
70
|
+
label: 'Match Operator',
|
|
71
|
+
description: 'Operator to join match column names.',
|
|
72
|
+
type: 'string',
|
|
73
|
+
choices: [
|
|
74
|
+
{ label: 'None', value: 'NONE' },
|
|
75
|
+
{ label: 'And', value: 'AND' }
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
optinValue: {
|
|
79
|
+
label: 'Optin Value',
|
|
80
|
+
description: "Value of incoming opt-in status data that represents an opt-in status. For example, 'I' may represent an opt-in status.",
|
|
81
|
+
type: 'string'
|
|
82
|
+
},
|
|
83
|
+
optoutValue: {
|
|
84
|
+
label: 'Optout Value',
|
|
85
|
+
description: "Value of incoming opt-out status data that represents an optout status. For example, '0' may represent an opt-out status.",
|
|
86
|
+
type: 'string'
|
|
87
|
+
},
|
|
88
|
+
rejectRecordIfChannelEmpty: {
|
|
89
|
+
label: 'Reject Record If Channel Empty',
|
|
90
|
+
description: "String containing comma-separated channel codes that if specified will result in record rejection when the channel address field is null. Channel codes are 'E' (Email), 'M' (Mobile), 'P' (Postal Code). For example 'E,M' would indicate that a record that has a null for Email or Mobile Number value should be rejected. This parameter can also be set to null or to an empty string, which will cause the validation to not be performed for any channel, except if the matchColumnName1 parameter is set to EMAIL_ADDRESS_ or MOBILE_NUMBER_. When matchColumnName1 is set to EMAIL_ADDRESS_ or MOBILE_NUMBER_, then the null or empty string setting is effectively ignored for that channel.",
|
|
91
|
+
type: 'string'
|
|
92
|
+
},
|
|
93
|
+
textValue: {
|
|
94
|
+
label: 'Text Value',
|
|
95
|
+
description: "Value of incoming preferred email format data. For example, 'T' may represent a preference for Text formatted email.",
|
|
96
|
+
type: 'string'
|
|
97
|
+
},
|
|
98
|
+
updateOnMatch: {
|
|
99
|
+
label: 'Update On Match',
|
|
100
|
+
description: 'Controls how the existing record should be updated.',
|
|
101
|
+
type: 'string',
|
|
102
|
+
required: true,
|
|
103
|
+
choices: [
|
|
104
|
+
{ label: 'Replace All', value: 'REPLACE_ALL' },
|
|
105
|
+
{ label: 'No Update', value: 'NO_UPDATE' }
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
enable_batching: rsp_properties_1.enable_batching,
|
|
109
|
+
batch_size: rsp_properties_1.batch_size
|
|
110
|
+
},
|
|
111
|
+
perform: async (request, { settings, payload, auth }) => {
|
|
112
|
+
if (payload && payload.profileListName) {
|
|
113
|
+
const { profileListName, defaultPermissionStatus, htmlValue, insertOnNoMatch, matchColumnName1, matchColumnName2, matchOperator, optinValue, optoutValue, rejectRecordIfChannelEmpty, textValue, updateOnMatch, userData, mapTemplateName } = payload;
|
|
114
|
+
const baseUrl = (settings.baseUrl?.startsWith('https://') ? settings.baseUrl : `https://${settings.baseUrl}`)?.replace(/\/$/, '');
|
|
115
|
+
const endpoint = `${baseUrl}/rest/asyncApi/v1.3/lists/${profileListName}/members`;
|
|
116
|
+
const recordData = rsp_operations_1.buildRecordData(userData, mapTemplateName ?? '');
|
|
117
|
+
const requestBody = {
|
|
118
|
+
recordData: recordData,
|
|
119
|
+
mergeRule: {
|
|
120
|
+
defaultPermissionStatus,
|
|
121
|
+
htmlValue,
|
|
122
|
+
insertOnNoMatch,
|
|
123
|
+
matchColumnName1,
|
|
124
|
+
matchColumnName2,
|
|
125
|
+
matchOperator,
|
|
126
|
+
optinValue,
|
|
127
|
+
optoutValue,
|
|
128
|
+
rejectRecordIfChannelEmpty,
|
|
129
|
+
textValue,
|
|
130
|
+
updateOnMatch
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
const token = auth?.accessToken ?? '';
|
|
134
|
+
const response = request(endpoint, {
|
|
135
|
+
method: 'POST',
|
|
136
|
+
headers: {
|
|
137
|
+
Authorization: token,
|
|
138
|
+
'Content-Type': 'application/json'
|
|
139
|
+
},
|
|
140
|
+
body: JSON.stringify(requestBody)
|
|
141
|
+
});
|
|
142
|
+
return response;
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
performBatch: async (request, { settings, payload }) => {
|
|
146
|
+
const { profileListName, defaultPermissionStatus, htmlValue, insertOnNoMatch, matchColumnName1, matchColumnName2, matchOperator, optinValue, optoutValue, rejectRecordIfChannelEmpty, textValue, updateOnMatch, mapTemplateName } = payload[0];
|
|
147
|
+
const payloadData = payload.map((obj) => obj.userData);
|
|
148
|
+
const recordData = rsp_operations_1.buildRecordData(payloadData, mapTemplateName ?? '');
|
|
149
|
+
const requestBody = {
|
|
150
|
+
recordData: recordData,
|
|
151
|
+
mergeRule: {
|
|
152
|
+
defaultPermissionStatus,
|
|
153
|
+
htmlValue,
|
|
154
|
+
insertOnNoMatch,
|
|
155
|
+
matchColumnName1,
|
|
156
|
+
matchColumnName2,
|
|
157
|
+
matchOperator,
|
|
158
|
+
optinValue,
|
|
159
|
+
optoutValue,
|
|
160
|
+
rejectRecordIfChannelEmpty,
|
|
161
|
+
textValue,
|
|
162
|
+
updateOnMatch
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
const baseUrl = (settings.baseUrl?.startsWith('https://') ? settings.baseUrl : `https://${settings.baseUrl}`)?.replace(/\/$/, '');
|
|
166
|
+
const endpoint = `${baseUrl}/rest/asyncApi/v1.3/lists/${profileListName}/members`;
|
|
167
|
+
return await request(endpoint, {
|
|
168
|
+
method: 'POST',
|
|
169
|
+
body: JSON.stringify(requestBody)
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
exports.default = action;
|
|
174
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/responsys/asyncMergeProfileListMembers/index.ts"],"names":[],"mappings":";;AAGA,sDAAyE;AAGzE,sDAAmD;AAEnD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,kCAAkC;IACzC,WAAW,EAAE,6CAA6C;IAC1D,MAAM,EAAE;QACN,eAAe,EAAE;YACf,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,4DAA4D;YACzE,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,QAAQ,EAAE,yBAAQ;QAClB,eAAe,EAAE;YACf,KAAK,EAAE,mBAAmB;YAC1B,WAAW,EACT,wGAAwG;YAC1G,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE;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,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Payload } from './asyncMergePetRecords/generated-types';
|
|
2
|
+
import { DynamicData, RecordData } from './types';
|
|
3
|
+
export declare const buildRecordData: (userData: DynamicData, mapTemplateName: string) => {
|
|
4
|
+
records: unknown[][];
|
|
5
|
+
fieldNames: string[];
|
|
6
|
+
mapTemplateName: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const buildRequestBodyPET: (payload: Payload, recordData: RecordData) => {
|
|
9
|
+
recordData: RecordData;
|
|
10
|
+
insertOnNoMatch: boolean | undefined;
|
|
11
|
+
updateOnMatch: string;
|
|
12
|
+
matchColumnName1: string;
|
|
13
|
+
matchColumnName2: string;
|
|
14
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildRequestBodyPET = exports.buildRecordData = void 0;
|
|
4
|
+
const buildRecordData = (userData, mapTemplateName) => {
|
|
5
|
+
if (Array.isArray(userData)) {
|
|
6
|
+
const keysFromFirstObject = Object.keys(userData[0]);
|
|
7
|
+
return {
|
|
8
|
+
records: userData.map((record) => Object.values(record)),
|
|
9
|
+
fieldNames: keysFromFirstObject,
|
|
10
|
+
mapTemplateName: mapTemplateName || ''
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
const keysFromFirstObject = Object.keys(userData);
|
|
14
|
+
return {
|
|
15
|
+
records: [Object.values(userData)],
|
|
16
|
+
fieldNames: keysFromFirstObject,
|
|
17
|
+
mapTemplateName: mapTemplateName || ''
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
exports.buildRecordData = buildRecordData;
|
|
21
|
+
const buildRequestBodyPET = (payload, recordData) => {
|
|
22
|
+
const matchColumnName1 = payload.matchColumnName1 ? String(payload.matchColumnName1) : '';
|
|
23
|
+
const matchColumnName2 = payload.matchColumnName2 ? String(payload.matchColumnName2) : '';
|
|
24
|
+
return {
|
|
25
|
+
recordData: recordData,
|
|
26
|
+
insertOnNoMatch: payload.insertOnNoMatch,
|
|
27
|
+
updateOnMatch: payload.updateOnMatch,
|
|
28
|
+
matchColumnName1: matchColumnName1.replace(/_+$/, ''),
|
|
29
|
+
matchColumnName2: matchColumnName2.replace(/_+$/, '')
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
exports.buildRequestBodyPET = buildRequestBodyPET;
|
|
33
|
+
//# sourceMappingURL=rsp-operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rsp-operations.js","sourceRoot":"","sources":["../../../src/destinations/responsys/rsp-operations.ts"],"names":[],"mappings":";;;AAGO,MAAM,eAAe,GAAG,CAAC,QAAqB,EAAE,eAAuB,EAAE,EAAE;IAEhF,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;QAC3B,MAAM,mBAAmB,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;QACpD,OAAO;YACL,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACxD,UAAU,EAAE,mBAAmB;YAC/B,eAAe,EAAE,eAAe,IAAI,EAAE;SACvC,CAAA;KACF;IACD,MAAM,mBAAmB,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IACjD,OAAO;QACL,OAAO,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAClC,UAAU,EAAE,mBAAmB;QAC/B,eAAe,EAAE,eAAe,IAAI,EAAE;KACvC,CAAA;AACH,CAAC,CAAA;AAhBY,QAAA,eAAe,mBAgB3B;AAUM,MAAM,mBAAmB,GAAG,CAAC,OAAgB,EAAE,UAAsB,EAAkB,EAAE;IAC9F,MAAM,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IACzF,MAAM,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IACzF,OAAO;QACL,UAAU,EAAE,UAAU;QACtB,eAAe,EAAE,OAAO,CAAC,eAAe;QACxC,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,gBAAgB,EAAE,gBAAgB,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;QACrD,gBAAgB,EAAE,gBAAgB,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;KACtD,CAAA;AACH,CAAC,CAAA;AAVY,QAAA,mBAAmB,uBAU/B"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.batch_size = exports.enable_batching = exports.userData = void 0;
|
|
4
|
+
exports.userData = {
|
|
5
|
+
label: 'Recepient Data',
|
|
6
|
+
description: 'Record data that represents Field Names and corresponding values for the recipient.',
|
|
7
|
+
type: 'object',
|
|
8
|
+
defaultObjectUI: 'keyvalue:only',
|
|
9
|
+
required: true,
|
|
10
|
+
default: { '@path': '$.' }
|
|
11
|
+
};
|
|
12
|
+
exports.enable_batching = {
|
|
13
|
+
label: 'Use Responsys Async API',
|
|
14
|
+
description: 'Once enabled, Segment will collect events into batches of 200 before sending to Responsys.',
|
|
15
|
+
type: 'boolean',
|
|
16
|
+
default: true,
|
|
17
|
+
unsafe_hidden: true
|
|
18
|
+
};
|
|
19
|
+
exports.batch_size = {
|
|
20
|
+
label: 'Batch Size',
|
|
21
|
+
description: 'Maximum number of events to include in each batch. Actual batch sizes may be lower.',
|
|
22
|
+
type: 'number',
|
|
23
|
+
required: false,
|
|
24
|
+
unsafe_hidden: true,
|
|
25
|
+
default: 200
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=rsp-properties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rsp-properties.js","sourceRoot":"","sources":["../../../src/destinations/responsys/rsp-properties.ts"],"names":[],"mappings":";;;AAGa,QAAA,QAAQ,GAAe;IAClC,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,qFAAqF;IAClG,IAAI,EAAE,QAAQ;IACd,eAAe,EAAE,eAAe;IAChC,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;CAC3B,CAAA;AAEY,QAAA,eAAe,GAAe;IACzC,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,4FAA4F;IACzG,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,IAAI;IACb,aAAa,EAAE,IAAI;CACpB,CAAA;AAEY,QAAA,UAAU,GAAe;IACpC,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,qFAAqF;IAClG,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,KAAK;IACf,aAAa,EAAE,IAAI;IACnB,OAAO,EAAE,GAAG;CACb,CAAA"}
|
|
@@ -25,8 +25,12 @@ const destination = {
|
|
|
25
25
|
},
|
|
26
26
|
testAuthentication: async (request, { settings }) => {
|
|
27
27
|
const { source_write_key } = settings;
|
|
28
|
+
const ENV = process.env['NODE_ENV'] || properties_1.DEFAULT_SEGMENT_ENVIRONMENT;
|
|
28
29
|
const AWS_REGION = process.env['AWS_REGION'] || properties_1.DEFAULT_SEGMENT_ENDPOINT;
|
|
29
|
-
|
|
30
|
+
if (ENV == 'production') {
|
|
31
|
+
return request(`${properties_1.SEGMENT_ENDPOINTS[AWS_REGION].url}/projects/${source_write_key}/settings`);
|
|
32
|
+
}
|
|
33
|
+
return request(`${properties_1.STAGE_ENDPOINTS[AWS_REGION].cdn}/projects/${source_write_key}/settings`);
|
|
30
34
|
}
|
|
31
35
|
},
|
|
32
36
|
extendRequest({ settings }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/segment/index.ts"],"names":[],"mappings":";;;;;AAGA,kEAAyC;AACzC,4DAAmC;AACnC,8DAAqC;AACrC,0DAAiC;AACjC,4DAAmC;AAEnC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/segment/index.ts"],"names":[],"mappings":";;;;;AAGA,kEAAyC;AACzC,4DAAmC;AACnC,8DAAqC;AACrC,0DAAiC;AACjC,4DAAmC;AAEnC,6CAAwH;AAExH,MAAM,WAAW,GAAoC;IAEnD,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,gBAAgB,EAAE;gBAChB,KAAK,EAAE,kBAAkB;gBACzB,WAAW,EAAE,wCAAwC;gBACrD,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAClD,MAAM,EAAE,gBAAgB,EAAE,GAAG,QAAQ,CAAA;YACrC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,wCAA2B,CAAA;YAClE,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,qCAAwB,CAAA;YACxE,IAAI,GAAG,IAAI,YAAY,EAAE;gBACvB,OAAO,OAAO,CAAC,GAAG,8BAAiB,CAAC,UAAU,CAAC,CAAC,GAAG,aAAa,gBAAgB,WAAW,CAAC,CAAA;aAC7F;YACD,OAAO,OAAO,CAAC,GAAG,4BAAe,CAAC,UAAU,CAAC,CAAC,GAAG,aAAa,gBAAgB,WAAW,CAAC,CAAA;QAC5F,CAAC;KACF;IACD,aAAa,CAAC,EAAE,QAAQ,EAAE;QACxB,OAAO;YACL,OAAO,EAAE;gBACP,aAAa,EAAE,SAAS,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;aAC1F;SACF,CAAA;IACH,CAAC;IACD,OAAO,EAAE;QACP,YAAY,EAAZ,sBAAY;QACZ,SAAS,EAAT,mBAAS;QACT,UAAU,EAAV,oBAAU;QACV,QAAQ,EAAR,kBAAQ;QACR,SAAS,EAAT,mBAAS;KACV;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -6,5 +6,9 @@ interface SegmentEndpoint {
|
|
|
6
6
|
export declare const SEGMENT_ENDPOINTS: {
|
|
7
7
|
[key: string]: SegmentEndpoint;
|
|
8
8
|
};
|
|
9
|
+
export declare const STAGE_ENDPOINTS: {
|
|
10
|
+
[key: string]: SegmentEndpoint;
|
|
11
|
+
};
|
|
9
12
|
export declare const DEFAULT_SEGMENT_ENDPOINT = "us-west-2";
|
|
13
|
+
export declare const DEFAULT_SEGMENT_ENVIRONMENT = "production";
|
|
10
14
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEFAULT_SEGMENT_ENDPOINT = exports.SEGMENT_ENDPOINTS = void 0;
|
|
3
|
+
exports.DEFAULT_SEGMENT_ENVIRONMENT = exports.DEFAULT_SEGMENT_ENDPOINT = exports.STAGE_ENDPOINTS = exports.SEGMENT_ENDPOINTS = void 0;
|
|
4
4
|
exports.SEGMENT_ENDPOINTS = {
|
|
5
5
|
'us-west-2': {
|
|
6
6
|
label: 'North America',
|
|
@@ -13,5 +13,18 @@ exports.SEGMENT_ENDPOINTS = {
|
|
|
13
13
|
cdn: 'https://cdn.segment.com/v1'
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
|
+
exports.STAGE_ENDPOINTS = {
|
|
17
|
+
'us-west-2': {
|
|
18
|
+
label: 'North America',
|
|
19
|
+
url: 'https://api.segment.build/v1',
|
|
20
|
+
cdn: 'https://cdn.segment.build/v1'
|
|
21
|
+
},
|
|
22
|
+
'eu-west-1': {
|
|
23
|
+
label: 'Europe',
|
|
24
|
+
url: 'https://events.eu1.segmentapis.build/v1',
|
|
25
|
+
cdn: 'https://cdn.segment.build/v1'
|
|
26
|
+
}
|
|
27
|
+
};
|
|
16
28
|
exports.DEFAULT_SEGMENT_ENDPOINT = 'us-west-2';
|
|
29
|
+
exports.DEFAULT_SEGMENT_ENVIRONMENT = 'production';
|
|
17
30
|
//# sourceMappingURL=properties.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"properties.js","sourceRoot":"","sources":["../../../src/destinations/segment/properties.ts"],"names":[],"mappings":";;;AAMa,QAAA,iBAAiB,GAAuC;IACnE,WAAW,EAAE;QACX,KAAK,EAAE,eAAe;QACtB,GAAG,EAAE,2BAA2B;QAChC,GAAG,EAAE,4BAA4B;KAClC;IACD,WAAW,EAAE;QACX,KAAK,EAAE,QAAQ;QACf,GAAG,EAAE,uCAAuC;QAC5C,GAAG,EAAE,4BAA4B;KAClC;CACF,CAAA;AAEY,QAAA,wBAAwB,GAAG,WAAW,CAAA"}
|
|
1
|
+
{"version":3,"file":"properties.js","sourceRoot":"","sources":["../../../src/destinations/segment/properties.ts"],"names":[],"mappings":";;;AAMa,QAAA,iBAAiB,GAAuC;IACnE,WAAW,EAAE;QACX,KAAK,EAAE,eAAe;QACtB,GAAG,EAAE,2BAA2B;QAChC,GAAG,EAAE,4BAA4B;KAClC;IACD,WAAW,EAAE;QACX,KAAK,EAAE,QAAQ;QACf,GAAG,EAAE,uCAAuC;QAC5C,GAAG,EAAE,4BAA4B;KAClC;CACF,CAAA;AAEY,QAAA,eAAe,GAAuC;IACjE,WAAW,EAAE;QACX,KAAK,EAAE,eAAe;QACtB,GAAG,EAAE,8BAA8B;QACnC,GAAG,EAAE,8BAA8B;KACpC;IACD,WAAW,EAAE;QACX,KAAK,EAAE,QAAQ;QACf,GAAG,EAAE,yCAAyC;QAC9C,GAAG,EAAE,8BAA8B;KACpC;CACF,CAAA;AAEY,QAAA,wBAAwB,GAAG,WAAW,CAAA;AACtC,QAAA,2BAA2B,GAAG,YAAY,CAAA"}
|
|
@@ -23,3 +23,7 @@ export declare const properties: InputField;
|
|
|
23
23
|
export declare const traits: InputField;
|
|
24
24
|
export declare const enable_batching: InputField;
|
|
25
25
|
export declare const message_id: InputField;
|
|
26
|
+
export declare const consent: InputField;
|
|
27
|
+
export declare const validateConsentObject: (obj: {
|
|
28
|
+
[k: string]: unknown;
|
|
29
|
+
} | undefined) => boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.message_id = exports.enable_batching = exports.traits = exports.properties = exports.group_id = exports.timezone = exports.user_agent = exports.screen = exports.page = exports.operating_system = exports.network = exports.location = exports.locale = exports.ip_address = exports.device = exports.campaign_parameters = exports.application = exports.page_category = exports.event_name = exports.screen_name = exports.page_name = exports.timestamp = exports.anonymous_id = exports.user_id = void 0;
|
|
3
|
+
exports.validateConsentObject = exports.consent = exports.message_id = exports.enable_batching = exports.traits = exports.properties = exports.group_id = exports.timezone = exports.user_agent = exports.screen = exports.page = exports.operating_system = exports.network = exports.location = exports.locale = exports.ip_address = exports.device = exports.campaign_parameters = exports.application = exports.page_category = exports.event_name = exports.screen_name = exports.page_name = exports.timestamp = exports.anonymous_id = exports.user_id = void 0;
|
|
4
4
|
exports.user_id = {
|
|
5
5
|
label: 'User ID',
|
|
6
6
|
description: 'Unique identifier for the user in your database. A userId or an anonymousId is required.',
|
|
@@ -334,4 +334,27 @@ exports.message_id = {
|
|
|
334
334
|
default: { '@path': '$.messageId' },
|
|
335
335
|
unsafe_hidden: true
|
|
336
336
|
};
|
|
337
|
+
exports.consent = {
|
|
338
|
+
label: 'Consent',
|
|
339
|
+
description: 'Segment event consent category preferences.',
|
|
340
|
+
type: 'object',
|
|
341
|
+
default: { '@path': '$.context.consent' },
|
|
342
|
+
unsafe_hidden: true
|
|
343
|
+
};
|
|
344
|
+
function isCategoryPreferences(obj) {
|
|
345
|
+
if (typeof obj !== 'object' || obj === null) {
|
|
346
|
+
return false;
|
|
347
|
+
}
|
|
348
|
+
return Object.values(obj).every((value) => typeof value === 'boolean');
|
|
349
|
+
}
|
|
350
|
+
const validateConsentObject = (obj) => {
|
|
351
|
+
if (obj == undefined) {
|
|
352
|
+
return true;
|
|
353
|
+
}
|
|
354
|
+
if (typeof obj !== 'object' || obj === null) {
|
|
355
|
+
throw false;
|
|
356
|
+
}
|
|
357
|
+
return 'categoryPreferences' in obj && isCategoryPreferences(obj['categoryPreferences']);
|
|
358
|
+
};
|
|
359
|
+
exports.validateConsentObject = validateConsentObject;
|
|
337
360
|
//# sourceMappingURL=segment-properties.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segment-properties.js","sourceRoot":"","sources":["../../../src/destinations/segment/segment-properties.ts"],"names":[],"mappings":";;;AAEa,QAAA,OAAO,GAAe;IACjC,KAAK,EAAE,SAAS;IAChB,WAAW,EAAE,0FAA0F;IACvG,IAAI,EAAE,QAAQ;CACf,CAAA;AAEY,QAAA,YAAY,GAAe;IACtC,KAAK,EAAE,cAAc;IACrB,WAAW,EACT,kJAAkJ;IACpJ,IAAI,EAAE,QAAQ;CACf,CAAA;AAEY,QAAA,SAAS,GAAe;IACnC,KAAK,EAAE,WAAW;IAClB,WAAW,EACT,0HAA0H;IAC5H,IAAI,EAAE,QAAQ;CACf,CAAA;AAEY,QAAA,SAAS,GAAe;IACnC,KAAK,EAAE,WAAW;IAClB,WAAW,EAAE,mCAAmC;IAChD,IAAI,EAAE,QAAQ;CACf,CAAA;AAEY,QAAA,WAAW,GAAe;IACrC,KAAK,E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AAE,QAAQ;YACf,WAAW,EAAE,sBAAsB;YACnC,IAAI,EAAE,QAAQ;SACf;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,oBAAoB;YACjC,IAAI,EAAE,QAAQ;SACf;QACD,OAAO,EAAE;YACP,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,uBAAuB;YACpC,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAA;
|
|
1
|
+
{"version":3,"file":"segment-properties.js","sourceRoot":"","sources":["../../../src/destinations/segment/segment-properties.ts"],"names":[],"mappings":";;;AAEa,QAAA,OAAO,GAAe;IACjC,KAAK,EAAE,SAAS;IAChB,WAAW,EAAE,0FAA0F;IACvG,IAAI,EAAE,QAAQ;CACf,CAAA;AAEY,QAAA,YAAY,GAAe;IACtC,KAAK,EAAE,cAAc;IACrB,WAAW,EACT,kJAAkJ;IACpJ,IAAI,EAAE,QAAQ;CACf,CAAA;AAEY,QAAA,SAAS,GAAe;IACnC,KAAK,EAAE,WAAW;IAClB,WAAW,EACT,0HAA0H;IAC5H,IAAI,EAAE,QAAQ;CACf,CAAA;AAEY,QAAA,SAAS,GAAe;IACnC,KAAK,EAAE,WAAW;IAClB,WAAW,EAAE,mCAAmC;IAChD,IAAI,EAAE,QAAQ;CACf,CAAA;AAEY,QAAA,WAAW,GAAe;IACrC,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,qCAAqC;IAClD,IAAI,EAAE,QAAQ;CACf,CAAA;AAEY,QAAA,UAAU,GAAe;IACpC,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,+CAA+C;IAC5D,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,IAAI;CACf,CAAA;AAEY,QAAA,aAAa,GAAe;IACvC,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,uCAAuC;IACpD,IAAI,EAAE,QAAQ;CACf,CAAA;AAEY,QAAA,WAAW,GAAe;IACrC,KAAK,EAAE,aAAa;IACpB,WAAW,EA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GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,EAAE;QAC3C,OAAO,KAAK,CAAA;KACb;IAED,OAAO,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,SAAS,CAAC,CAAA;AACxE,CAAC;AACM,MAAM,qBAAqB,GAAG,CAAC,GAAyC,EAAW,EAAE;IAC1F,IAAI,GAAG,IAAI,SAAS,EAAE;QACpB,OAAO,IAAI,CAAA;KACZ;IAED,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,EAAE;QAC3C,MAAM,KAAK,CAAA;KACZ;IAED,OAAO,qBAAqB,IAAI,GAAG,IAAI,qBAAqB,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC,CAAA;AAC1F,CAAC,CAAA;AAVY,QAAA,qBAAqB,yBAUjC"}
|
|
@@ -25,7 +25,8 @@ const action = {
|
|
|
25
25
|
timezone: segment_properties_1.timezone,
|
|
26
26
|
traits: segment_properties_1.traits,
|
|
27
27
|
message_id: segment_properties_1.message_id,
|
|
28
|
-
enable_batching: segment_properties_1.enable_batching
|
|
28
|
+
enable_batching: segment_properties_1.enable_batching,
|
|
29
|
+
consent: segment_properties_1.consent
|
|
29
30
|
},
|
|
30
31
|
perform: (_request, { payload, statsContext }) => {
|
|
31
32
|
if (!payload.anonymous_id && !payload.user_id) {
|
|
@@ -47,6 +48,7 @@ const action = {
|
|
|
47
48
|
}
|
|
48
49
|
};
|
|
49
50
|
function convertPayload(data) {
|
|
51
|
+
const isValidateConsentObject = segment_properties_1.validateConsentObject(data.consent);
|
|
50
52
|
return {
|
|
51
53
|
userId: data?.user_id,
|
|
52
54
|
anonymousId: data?.anonymous_id,
|
|
@@ -56,6 +58,7 @@ function convertPayload(data) {
|
|
|
56
58
|
context: {
|
|
57
59
|
app: data?.application,
|
|
58
60
|
campaign: data?.campaign_parameters,
|
|
61
|
+
consent: isValidateConsentObject ? { ...data?.consent } : {},
|
|
59
62
|
device: data?.device,
|
|
60
63
|
ip: data?.ip_address,
|
|
61
64
|
locale: data?.locale,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendGroup/index.ts"],"names":[],"mappings":";;AAGA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendGroup/index.ts"],"names":[],"mappings":";;AAGA,8DAsB8B;AAC9B,sCAAkE;AAElE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,wGAAwG;IACrH,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,OAAO,EAAP,4BAAO;QACP,YAAY,EAAZ,iCAAY;QACZ,QAAQ,EAAE,EAAE,GAAG,6BAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QACzC,SAAS,EAAT,8BAAS;QACT,WAAW,EAAX,gCAAW;QACX,mBAAmB,EAAnB,wCAAmB;QACnB,MAAM,EAAN,2BAAM;QACN,UAAU,EAAV,+BAAU;QACV,MAAM,EAAN,2BAAM;QACN,QAAQ,EAAR,6BAAQ;QACR,OAAO,EAAP,4BAAO;QACP,gBAAgB,EAAhB,qCAAgB;QAChB,IAAI,EAAJ,yBAAI;QACJ,MAAM,EAAN,2BAAM;QACN,UAAU,EAAV,+BAAU;QACV,QAAQ,EAAR,6BAAQ;QACR,MAAM,EAAN,2BAAM;QACN,UAAU,EAAV,+BAAU;QACV,eAAe,EAAf,oCAAe;QACf,OAAO,EAAP,4BAAO;KACR;IACD,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE;QAC/C,IAAI,CAAC,OAAO,CAAC,YAAY,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YAC7C,MAAM,+CAAsC,CAAA;SAC7C;QAED,MAAM,YAAY,GAAW,cA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AC,CAAC,EAAE;YAC5D,MAAM,EAAE,IAAI,EAAE,MAAM;YACpB,EAAE,EAAE,IAAI,EAAE,UAAU;YACpB,MAAM,EAAE,IAAI,EAAE,MAAM;YACpB,QAAQ,EAAE,IAAI,EAAE,QAAQ;YACxB,OAAO,EAAE,IAAI,EAAE,OAAO;YACtB,EAAE,EAAE,IAAI,EAAE,gBAAgB;YAC1B,IAAI,EAAE,IAAI,EAAE,IAAI;YAChB,MAAM,EAAE,IAAI,EAAE,MAAM;YACpB,SAAS,EAAE,IAAI,EAAE,UAAU;YAC3B,QAAQ,EAAE,IAAI,EAAE,QAAQ;SACzB;QACD,MAAM,EAAE;YACN,GAAG,IAAI,EAAE,MAAM;SAChB;QACD,IAAI,EAAE,OAAO;KACd,CAAA;AACH,CAAC;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -25,7 +25,8 @@ const action = {
|
|
|
25
25
|
group_id: segment_properties_1.group_id,
|
|
26
26
|
traits: segment_properties_1.traits,
|
|
27
27
|
message_id: segment_properties_1.message_id,
|
|
28
|
-
enable_batching: segment_properties_1.enable_batching
|
|
28
|
+
enable_batching: segment_properties_1.enable_batching,
|
|
29
|
+
consent: segment_properties_1.consent
|
|
29
30
|
},
|
|
30
31
|
perform: (_request, { payload, statsContext }) => {
|
|
31
32
|
if (!payload.anonymous_id && !payload.user_id) {
|
|
@@ -47,6 +48,7 @@ const action = {
|
|
|
47
48
|
}
|
|
48
49
|
};
|
|
49
50
|
function convertPayload(data) {
|
|
51
|
+
const isValidConsentObject = segment_properties_1.validateConsentObject(data?.consent);
|
|
50
52
|
return {
|
|
51
53
|
userId: data?.user_id,
|
|
52
54
|
anonymousId: data?.anonymous_id,
|
|
@@ -55,6 +57,7 @@ function convertPayload(data) {
|
|
|
55
57
|
context: {
|
|
56
58
|
app: data?.application,
|
|
57
59
|
campaign: data?.campaign_parameters,
|
|
60
|
+
consent: isValidConsentObject ? { ...data?.consent } : {},
|
|
58
61
|
device: data?.device,
|
|
59
62
|
ip: data?.ip_address,
|
|
60
63
|
locale: data?.locale,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendIdentify/index.ts"],"names":[],"mappings":";;AAGA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendIdentify/index.ts"],"names":[],"mappings":";;AAGA,8DAsB8B;AAC9B,sCAAkE;AAElE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EACT,gIAAgI;IAClI,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,OAAO,EAAP,4BAAO;QACP,YAAY,EAAZ,iCAAY;QACZ,SAAS,EAAT,8BAAS;QACT,WAAW,EAAX,gCAAW;QACX,mBAAmB,EAAnB,wCAAmB;QACnB,MAAM,EAAN,2BAAM;QACN,UAAU,EAAV,+BAAU;QACV,MAAM,EAAN,2BAAM;QACN,QAAQ,EAAR,6BAAQ;QACR,OAAO,EAAP,4BAAO;QACP,gBAAgB,EAAhB,qCAAgB;QAChB,IAAI,EAAJ,yBAAI;QACJ,MAAM,EAAN,2BAAM;QACN,UAAU,EAAV,+BAAU;QACV,QAAQ,EAAR,6BAAQ;QACR,QAAQ,EAAR,6BAAQ;QACR,MAAM,EAAN,2BAAM;QACN,UAAU,EAAV,+BAAU;QACV,eAAe,EAAf,oCAAe;QACf,OAAO,EAAP,4BAAO;KACR;IACD,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE;QAC/C,IAAI,CAAC,OAAO,CAAC,YAAY,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YAC7C,MAAM,+CAAsC,CAAA;SAC7C;QAED,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,CAAC,CAAA;QAC/C,YAAY,EAAE,WAAW,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC,EAAE,CAAC,GAAG,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IAAI,EAAE,QAAQ;YACxB,OAAO,EAAE,IAAI,EAAE,OAAO;YACtB,EAAE,EAAE,IAAI,EAAE,gBAAgB;YAC1B,IAAI,EAAE,IAAI,EAAE,IAAI;YAChB,MAAM,EAAE,IAAI,EAAE,MAAM;YACpB,SAAS,EAAE,IAAI,EAAE,UAAU;YAC3B,QAAQ,EAAE,IAAI,EAAE,QAAQ;YACxB,OAAO,EAAE,IAAI,EAAE,QAAQ;SACxB;QACD,MAAM,EAAE;YACN,GAAG,IAAI,EAAE,MAAM;SAChB;QACD,IAAI,EAAE,UAAU;KACjB,CAAA;AACH,CAAC;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -27,7 +27,8 @@ const action = {
|
|
|
27
27
|
group_id: segment_properties_1.group_id,
|
|
28
28
|
properties: segment_properties_1.properties,
|
|
29
29
|
message_id: segment_properties_1.message_id,
|
|
30
|
-
enable_batching: segment_properties_1.enable_batching
|
|
30
|
+
enable_batching: segment_properties_1.enable_batching,
|
|
31
|
+
consent: segment_properties_1.consent
|
|
31
32
|
},
|
|
32
33
|
perform: (_request, { payload, statsContext }) => {
|
|
33
34
|
if (!payload.anonymous_id && !payload.user_id) {
|
|
@@ -49,6 +50,7 @@ const action = {
|
|
|
49
50
|
}
|
|
50
51
|
};
|
|
51
52
|
function convertPayload(data) {
|
|
53
|
+
const isValidConsentObject = segment_properties_1.validateConsentObject(data?.consent);
|
|
52
54
|
return {
|
|
53
55
|
userId: data?.user_id,
|
|
54
56
|
anonymousId: data?.anonymous_id,
|
|
@@ -58,6 +60,7 @@ function convertPayload(data) {
|
|
|
58
60
|
context: {
|
|
59
61
|
app: data?.application,
|
|
60
62
|
campaign: data?.campaign_parameters,
|
|
63
|
+
consent: isValidConsentObject ? { ...data?.consent } : {},
|
|
61
64
|
device: data?.device,
|
|
62
65
|
ip: data?.ip_address,
|
|
63
66
|
locale: data?.locale,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendPage/index.ts"],"names":[],"mappings":";;AAGA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendPage/index.ts"],"names":[],"mappings":";;AAGA,8DAwB8B;AAC9B,sCAAkE;AAElE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,WAAW;IAClB,WAAW,EAAE,uFAAuF;IACpG,mBAAmB,EAAE,eAAe;IACpC,MAAM,EAAE;QACN,OAAO,EAAP,4BAAO;QACP,YAAY,EAAZ,iCAAY;QACZ,SAAS,EAAT,8BAAS;QACT,SAAS,EAAT,8BAAS;QACT,aAAa,EAAb,kCAAa;QACb,WAAW,EAAX,gCAAW;QACX,mBAAmB,EAAnB,wCAAmB;QACnB,MAAM,EAAN,2BAAM;QACN,UAAU,EAAV,+BAAU;QACV,MAAM,EAAN,2BAAM;QACN,QAAQ,EAAR,6BAAQ;QACR,OAAO,EAAP,4BAAO;QACP,gBAAgB,EAAhB,qCAAgB;QAChB,IAAI,EAAJ,yBAAI;QACJ,MAAM,EAAN,2BAAM;QACN,UAAU,EAAV,+BAAU;QACV,QAAQ,EAAR,6BAAQ;QACR,QAAQ,EAAR,6BAAQ;QACR,UAAU,EAAV,+BAAU;QACV,UAAU,EAAV,+BAAU;QACV,eAAe,EAAf,oCAAe;QACf,OAAO,EAAP,4BAAO;KACR;IACD,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE;QAC/C,IAAI,CAAC,OAAO,CAAC,YAAY,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YAC7C,MAAM,+CAAsC,CAAA;SAC7C;QAED,MAAM,WAAW,GAAW,cAAc,CAAC,OAAO,CAAC,CAAA;QAEnD,YAAY,EAAE,WAAW,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAA;QAC9F,OAAO,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AAO,EAAE,IAAI,EAAE,OAAO;YACtB,EAAE,EAAE,IAAI,EAAE,gBAAgB;YAC1B,IAAI,EAAE,IAAI,EAAE,IAAI;YAChB,MAAM,EAAE,IAAI,EAAE,MAAM;YACpB,SAAS,EAAE,IAAI,EAAE,UAAU;YAC3B,QAAQ,EAAE,IAAI,EAAE,QAAQ;YACxB,OAAO,EAAE,IAAI,EAAE,QAAQ;SACxB;QACD,UAAU,EAAE;YACV,IAAI,EAAE,IAAI,EAAE,SAAS;YACrB,QAAQ,EAAE,IAAI,EAAE,aAAa;YAC7B,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;YACtB,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ;YAC9B,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM;YAC1B,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK;YACxB,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG;YACpB,GAAG,IAAI,EAAE,UAAU;SACpB;QACD,IAAI,EAAE,MAAM;KACb,CAAA;AACH,CAAC;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -26,7 +26,8 @@ const action = {
|
|
|
26
26
|
group_id: segment_properties_1.group_id,
|
|
27
27
|
properties: segment_properties_1.properties,
|
|
28
28
|
message_id: segment_properties_1.message_id,
|
|
29
|
-
enable_batching: segment_properties_1.enable_batching
|
|
29
|
+
enable_batching: segment_properties_1.enable_batching,
|
|
30
|
+
consent: segment_properties_1.consent
|
|
30
31
|
},
|
|
31
32
|
perform: (_request, { payload, statsContext }) => {
|
|
32
33
|
if (!payload.anonymous_id && !payload.user_id) {
|
|
@@ -48,6 +49,7 @@ const action = {
|
|
|
48
49
|
}
|
|
49
50
|
};
|
|
50
51
|
function convertPayload(data) {
|
|
52
|
+
const isValidConsentObject = segment_properties_1.validateConsentObject(data?.consent);
|
|
51
53
|
return {
|
|
52
54
|
userId: data?.user_id,
|
|
53
55
|
anonymousId: data?.anonymous_id,
|
|
@@ -57,6 +59,7 @@ function convertPayload(data) {
|
|
|
57
59
|
context: {
|
|
58
60
|
app: data?.application,
|
|
59
61
|
campaign: data?.campaign_parameters,
|
|
62
|
+
consent: isValidConsentObject ? { ...data?.consent } : {},
|
|
60
63
|
device: data?.device,
|
|
61
64
|
ip: data?.ip_address,
|
|
62
65
|
locale: data?.locale,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendScreen/index.ts"],"names":[],"mappings":";;AAGA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendScreen/index.ts"],"names":[],"mappings":";;AAGA,8DAuB8B;AAC9B,sCAAkE;AAElE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,8FAA8F;IAC3G,mBAAmB,EAAE,iBAAiB;IACtC,MAAM,EAAE;QACN,OAAO,EAAP,4BAAO;QACP,YAAY,EAAZ,iCAAY;QACZ,SAAS,EAAT,8BAAS;QACT,WAAW,EAAX,gCAAW;QACX,WAAW,EAAX,gCAAW;QACX,mBAAmB,EAAnB,wCAAmB;QACnB,MAAM,EAAN,2BAAM;QACN,UAAU,EAAV,+BAAU;QACV,MAAM,EAAN,2BAAM;QACN,QAAQ,EAAR,6BAAQ;QACR,OAAO,EAAP,4BAAO;QACP,gBAAgB,EAAhB,qCAAgB;QAChB,IAAI,EAAJ,yBAAI;QACJ,MAAM,EAAN,2BAAM;QACN,UAAU,EAAV,+BAAU;QACV,QAAQ,EAAR,6BAAQ;QACR,QAAQ,EAAR,6BAAQ;QACR,UAAU,EAAV,+BAAU;QACV,UAAU,EAAV,+BAAU;QACV,eAAe,EAAf,oCAAe;QACf,OAAO,EAAP,4BAAO;KACR;IACD,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE;QAC/C,IAAI,CAAC,OAAO,CAAC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