@segment/action-destinations 3.264.0 → 3.264.1-startconn-3468.1
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 +9 -0
- package/dist/destinations/amazon-ads/index.d.ts +2 -2
- package/dist/destinations/amazon-ads/index.js +180 -3
- package/dist/destinations/amazon-ads/index.js.map +1 -1
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.d.ts +11 -0
- package/dist/destinations/amazon-ads/syncAudiences/index.js +235 -7
- package/dist/destinations/amazon-ads/syncAudiences/index.js.map +1 -1
- package/dist/destinations/amazon-ads/types.d.ts +25 -0
- package/dist/destinations/amazon-ads/utils.d.ts +25 -0
- package/dist/destinations/amazon-ads/utils.js +8 -0
- package/dist/destinations/amazon-ads/utils.js.map +1 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.d.ts +1 -1
- package/dist/destinations/chartmogul/index.js +1 -1
- package/dist/destinations/chartmogul/index.js.map +1 -1
- package/dist/destinations/dynamic-yield-audiences/constants.d.ts +1 -5
- package/dist/destinations/dynamic-yield-audiences/constants.js +2 -6
- package/dist/destinations/dynamic-yield-audiences/constants.js.map +1 -1
- package/dist/destinations/dynamic-yield-audiences/generated-types.d.ts +2 -4
- package/dist/destinations/dynamic-yield-audiences/helpers.d.ts +3 -2
- package/dist/destinations/dynamic-yield-audiences/helpers.js +7 -21
- package/dist/destinations/dynamic-yield-audiences/helpers.js.map +1 -1
- package/dist/destinations/dynamic-yield-audiences/index.d.ts +3 -3
- package/dist/destinations/dynamic-yield-audiences/index.js +27 -86
- package/dist/destinations/dynamic-yield-audiences/index.js.map +1 -1
- package/dist/destinations/dynamic-yield-audiences/syncAudience/generated-types.d.ts +4 -9
- package/dist/destinations/dynamic-yield-audiences/syncAudience/index.d.ts +3 -3
- package/dist/destinations/dynamic-yield-audiences/syncAudience/index.js +39 -109
- package/dist/destinations/dynamic-yield-audiences/syncAudience/index.js.map +1 -1
- 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/sendgrid/sendEmail/SendEmailPerformer.js +1 -2
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +1 -1
- package/dist/destinations/engage/utils/track.d.ts +17 -17
- package/dist/destinations/gameball/index.js +1 -1
- package/dist/destinations/gameball/index.js.map +1 -1
- package/dist/destinations/hubspot/upsertCustomObjectRecord/index.js +2 -2
- package/dist/destinations/hubspot/upsertCustomObjectRecord/index.js.map +1 -1
- package/dist/destinations/index.js +0 -1
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/kameleoon/group/generated-types.d.ts +0 -1
- package/dist/destinations/kameleoon/group/index.js +0 -9
- package/dist/destinations/kameleoon/group/index.js.map +1 -1
- package/dist/destinations/kameleoon/identify/generated-types.d.ts +0 -1
- package/dist/destinations/kameleoon/identify/index.js +0 -9
- package/dist/destinations/kameleoon/identify/index.js.map +1 -1
- package/dist/destinations/kameleoon/page/generated-types.d.ts +0 -1
- package/dist/destinations/kameleoon/page/index.js +0 -9
- package/dist/destinations/kameleoon/page/index.js.map +1 -1
- package/dist/destinations/klaviyo/functions.d.ts +1 -5
- package/dist/destinations/klaviyo/functions.js +1 -102
- package/dist/destinations/klaviyo/functions.js.map +1 -1
- package/dist/destinations/klaviyo/index.js +1 -7
- package/dist/destinations/klaviyo/index.js.map +1 -1
- package/dist/destinations/klaviyo/orderCompleted/generated-types.d.ts +4 -1
- package/dist/destinations/klaviyo/orderCompleted/index.js +15 -6
- package/dist/destinations/klaviyo/orderCompleted/index.js.map +1 -1
- package/dist/destinations/klaviyo/trackEvent/index.js +0 -1
- package/dist/destinations/klaviyo/trackEvent/index.js.map +1 -1
- package/dist/destinations/klaviyo/types.d.ts +1 -68
- package/dist/destinations/koala/identify/index.js +1 -6
- package/dist/destinations/koala/identify/index.js.map +1 -1
- package/dist/destinations/liveramp-audiences/audienceEnteredS3/index.js +2 -2
- package/dist/destinations/liveramp-audiences/audienceEnteredS3/index.js.map +1 -1
- package/dist/destinations/liveramp-audiences/audienceEnteredSftp/index.js +2 -2
- package/dist/destinations/liveramp-audiences/audienceEnteredSftp/index.js.map +1 -1
- package/dist/destinations/marketo-static-lists/addToList/index.js +3 -17
- package/dist/destinations/marketo-static-lists/addToList/index.js.map +1 -1
- package/dist/destinations/marketo-static-lists/functions.d.ts +8 -0
- package/dist/destinations/marketo-static-lists/functions.js +6 -4
- package/dist/destinations/marketo-static-lists/functions.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/moloco-rmp/common/convert.js +29 -17
- package/dist/destinations/moloco-rmp/common/convert.js.map +1 -1
- package/dist/destinations/responsys/asyncMergePetRecords/generated-types.d.ts +14 -0
- package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js.map +1 -0
- package/dist/destinations/{klaviyo/unsubscribeProfile → responsys/asyncMergePetRecords}/index.d.ts +1 -1
- 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.map +1 -0
- package/dist/destinations/{klaviyo/subscribeProfile → responsys/asyncMergeProfileListMembers}/index.d.ts +1 -1
- package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js +174 -0
- package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js.map +1 -0
- package/dist/destinations/responsys/index.js +2 -6
- package/dist/destinations/responsys/index.js.map +1 -1
- package/dist/destinations/responsys/rsp-operations.d.ts +14 -0
- package/dist/destinations/responsys/rsp-operations.js +33 -0
- package/dist/destinations/responsys/rsp-operations.js.map +1 -0
- package/dist/destinations/responsys/rsp-properties.d.ts +4 -0
- package/dist/destinations/responsys/rsp-properties.js +27 -0
- package/dist/destinations/responsys/rsp-properties.js.map +1 -0
- package/dist/destinations/responsys/sendAudience/generated-types.d.ts +1 -1
- package/dist/destinations/responsys/sendAudience/index.js +4 -14
- package/dist/destinations/responsys/sendAudience/index.js.map +1 -1
- package/dist/destinations/responsys/sendCustomTraits/generated-types.d.ts +1 -1
- package/dist/destinations/responsys/sendCustomTraits/index.js +4 -14
- package/dist/destinations/responsys/sendCustomTraits/index.js.map +1 -1
- package/dist/destinations/responsys/utils.d.ts +2 -2
- package/dist/destinations/responsys/utils.js +5 -21
- package/dist/destinations/responsys/utils.js.map +1 -1
- package/dist/destinations/segment/segment-properties.d.ts +0 -1
- package/dist/destinations/segment/segment-properties.js +1 -8
- package/dist/destinations/segment/segment-properties.js.map +1 -1
- package/dist/destinations/segment/sendGroup/generated-types.d.ts +0 -1
- package/dist/destinations/segment/sendGroup/index.js +0 -2
- package/dist/destinations/segment/sendGroup/index.js.map +1 -1
- package/dist/destinations/segment/sendIdentify/generated-types.d.ts +0 -1
- package/dist/destinations/segment/sendIdentify/index.js +0 -2
- package/dist/destinations/segment/sendIdentify/index.js.map +1 -1
- package/dist/destinations/segment/sendPage/generated-types.d.ts +0 -1
- package/dist/destinations/segment/sendPage/index.js +0 -2
- package/dist/destinations/segment/sendPage/index.js.map +1 -1
- package/dist/destinations/segment/sendScreen/generated-types.d.ts +0 -1
- package/dist/destinations/segment/sendScreen/index.js +0 -2
- package/dist/destinations/segment/sendScreen/index.js.map +1 -1
- package/dist/destinations/segment/sendTrack/generated-types.d.ts +0 -1
- package/dist/destinations/segment/sendTrack/index.js +0 -2
- package/dist/destinations/segment/sendTrack/index.js.map +1 -1
- package/dist/destinations/segment-profiles/segment-properties.d.ts +0 -1
- package/dist/destinations/segment-profiles/segment-properties.js +1 -8
- package/dist/destinations/segment-profiles/segment-properties.js.map +1 -1
- package/dist/destinations/segment-profiles/sendGroup/generated-types.d.ts +0 -1
- package/dist/destinations/segment-profiles/sendGroup/index.js +1 -3
- package/dist/destinations/segment-profiles/sendGroup/index.js.map +1 -1
- package/dist/destinations/segment-profiles/sendIdentify/generated-types.d.ts +0 -1
- package/dist/destinations/segment-profiles/sendIdentify/index.js +1 -3
- package/dist/destinations/segment-profiles/sendIdentify/index.js.map +1 -1
- package/dist/destinations/segment-profiles/sendSubscription/generated-types.d.ts +0 -1
- package/dist/destinations/segment-profiles/sendSubscription/index.js +1 -3
- package/dist/destinations/segment-profiles/sendSubscription/index.js.map +1 -1
- package/dist/destinations/segment-profiles/sendSubscription/subscription-properties.d.ts +0 -1
- package/dist/destinations/segment-profiles/sendSubscription/subscription-properties.js +1 -8
- package/dist/destinations/segment-profiles/sendSubscription/subscription-properties.js.map +1 -1
- package/dist/destinations/segment-profiles/sendTrack/generated-types.d.ts +0 -1
- package/dist/destinations/segment-profiles/sendTrack/index.js +1 -3
- 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/tiktok-conversions/index.js +75 -163
- package/dist/destinations/tiktok-conversions/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-conversions/reportWebEvent/generated-types.d.ts +4 -12
- package/dist/destinations/tiktok-conversions/reportWebEvent/index.d.ts +1 -1
- package/dist/destinations/tiktok-conversions/reportWebEvent/index.js +233 -5
- package/dist/destinations/tiktok-conversions/reportWebEvent/index.js.map +1 -1
- 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/xtremepush/identify/index.js +2 -2
- package/dist/destinations/xtremepush/identify/index.js.map +1 -1
- package/dist/destinations/xtremepush/index.js.map +1 -1
- package/dist/destinations/xtremepush/track/index.js +2 -2
- package/dist/destinations/xtremepush/track/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/destinations/klaviyo/subscribeProfile/generated-types.d.ts +0 -8
- package/dist/destinations/klaviyo/subscribeProfile/generated-types.js.map +0 -1
- package/dist/destinations/klaviyo/subscribeProfile/index.js +0 -137
- package/dist/destinations/klaviyo/subscribeProfile/index.js.map +0 -1
- package/dist/destinations/klaviyo/unsubscribeProfile/generated-types.d.ts +0 -6
- package/dist/destinations/klaviyo/unsubscribeProfile/generated-types.js.map +0 -1
- package/dist/destinations/klaviyo/unsubscribeProfile/index.js +0 -118
- package/dist/destinations/klaviyo/unsubscribeProfile/index.js.map +0 -1
- /package/dist/destinations/{klaviyo/subscribeProfile → responsys/asyncMergePetRecords}/generated-types.js +0 -0
- /package/dist/destinations/{klaviyo/unsubscribeProfile → responsys/asyncMergeProfileListMembers}/generated-types.js +0 -0
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
EMAIL: 'Email',
|
|
6
|
-
SEGMENT_USER_ID: 'Segment User ID',
|
|
7
|
-
SEGMENT_ANONYMOUS_ID: 'Segment Anonymous ID'
|
|
8
|
-
};
|
|
3
|
+
exports.DOMAIN = void 0;
|
|
4
|
+
exports.DOMAIN = 'dy-api';
|
|
9
5
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/destinations/dynamic-yield-audiences/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/destinations/dynamic-yield-audiences/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,MAAM,GAAG,QAAQ,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Settings } from './generated-types';
|
|
1
2
|
export declare function hashAndEncode(property: string): string;
|
|
2
|
-
export declare function
|
|
3
|
-
export declare function
|
|
3
|
+
export declare function getValidationURL(settings: Settings): string;
|
|
4
|
+
export declare function getUpsertURL(settings: Settings): string;
|
|
@@ -1,32 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getUpsertURL = exports.getValidationURL = exports.hashAndEncode = void 0;
|
|
4
4
|
const crypto_1 = require("crypto");
|
|
5
|
+
const constants_1 = require("./constants");
|
|
5
6
|
function hashAndEncode(property) {
|
|
6
7
|
return crypto_1.createHash('sha256').update(property).digest('hex');
|
|
7
8
|
}
|
|
8
9
|
exports.hashAndEncode = hashAndEncode;
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
switch (dataCenter) {
|
|
12
|
-
case 'US':
|
|
13
|
-
domain = 'use1';
|
|
14
|
-
break;
|
|
15
|
-
case 'EU':
|
|
16
|
-
domain = 'euc1';
|
|
17
|
-
break;
|
|
18
|
-
case 'DEV':
|
|
19
|
-
domain = 'dev-use1';
|
|
20
|
-
break;
|
|
21
|
-
}
|
|
22
|
-
return domain;
|
|
10
|
+
function getValidationURL(settings) {
|
|
11
|
+
return settings.fullVerifyURL ?? `https://${constants_1.DOMAIN}.${settings.dataCenter}/audiences/verify/`;
|
|
23
12
|
}
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
exports.getValidationURL = getValidationURL;
|
|
14
|
+
function getUpsertURL(settings) {
|
|
15
|
+
return settings.fullUpsertURL ?? `https://${constants_1.DOMAIN}.${settings.dataCenter}/audiences/upsert/`;
|
|
26
16
|
}
|
|
27
17
|
exports.getUpsertURL = getUpsertURL;
|
|
28
|
-
function getCreateAudienceURL(dataCenter) {
|
|
29
|
-
return `https://cdp-extensions-api.${getDomain(dataCenter)}.dynamicyield.com/cdp/segment/audiences/subscription`;
|
|
30
|
-
}
|
|
31
|
-
exports.getCreateAudienceURL = getCreateAudienceURL;
|
|
32
18
|
//# sourceMappingURL=helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/destinations/dynamic-yield-audiences/helpers.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AAEnC,SAAgB,aAAa,CAAC,QAAgB;IAC5C,OAAO,mBAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAC5D,CAAC;AAFD,sCAEC;AAED,
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/destinations/dynamic-yield-audiences/helpers.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AAEnC,2CAAoC;AAEpC,SAAgB,aAAa,CAAC,QAAgB;IAC5C,OAAO,mBAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAC5D,CAAC;AAFD,sCAEC;AAED,SAAgB,gBAAgB,CAAC,QAAkB;IACjD,OAAO,QAAQ,CAAC,aAAa,IAAI,WAAW,kBAAM,IAAI,QAAQ,CAAC,UAAU,oBAAoB,CAAA;AAC/F,CAAC;AAFD,4CAEC;AAED,SAAgB,YAAY,CAAC,QAAkB;IAC7C,OAAO,QAAQ,CAAC,aAAa,IAAI,WAAW,kBAAM,IAAI,QAAQ,CAAC,UAAU,oBAAoB,CAAA;AAC/F,CAAC;AAFD,oCAEC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { Settings
|
|
3
|
-
declare const destination:
|
|
1
|
+
import type { DestinationDefinition } from '@segment/actions-core';
|
|
2
|
+
import type { Settings } from './generated-types';
|
|
3
|
+
declare const destination: DestinationDefinition<Settings>;
|
|
4
4
|
export default destination;
|
|
@@ -3,44 +3,32 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const actions_core_1 = require("@segment/actions-core");
|
|
7
|
-
const syncAudience_1 = __importDefault(require("./syncAudience"));
|
|
8
6
|
const helpers_1 = require("./helpers");
|
|
9
|
-
const
|
|
10
|
-
const constants_1 = require("./constants");
|
|
7
|
+
const syncAudience_1 = __importDefault(require("./syncAudience"));
|
|
11
8
|
const destination = {
|
|
12
9
|
name: 'Dynamic Yield Audiences',
|
|
13
10
|
slug: 'actions-dynamic-yield-audiences',
|
|
14
11
|
mode: 'cloud',
|
|
15
12
|
description: 'Sync [Segment Audiences](https://segment.com/docs/engage/audiences/) to Dynamic Yield.',
|
|
16
|
-
audienceFields: {
|
|
17
|
-
audience_name: {
|
|
18
|
-
type: 'string',
|
|
19
|
-
label: 'Audience Name',
|
|
20
|
-
required: true,
|
|
21
|
-
description: 'Required: Provide a name for your Audience to be displayed in Dynamic Yield.'
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
13
|
authentication: {
|
|
25
14
|
scheme: 'custom',
|
|
26
15
|
fields: {
|
|
27
16
|
sectionId: {
|
|
28
17
|
label: 'Section ID',
|
|
29
|
-
description: '
|
|
18
|
+
description: '7 digit number ... description to be added',
|
|
30
19
|
type: 'string',
|
|
31
20
|
required: true
|
|
32
21
|
},
|
|
33
22
|
dataCenter: {
|
|
34
23
|
label: 'Data Center',
|
|
35
|
-
description: '
|
|
24
|
+
description: 'description to be added',
|
|
36
25
|
type: 'string',
|
|
37
26
|
required: true,
|
|
38
27
|
choices: [
|
|
39
|
-
{ label: '
|
|
40
|
-
{ label: '
|
|
41
|
-
{ label: 'EU', value: 'EU' }
|
|
28
|
+
{ label: 'US', value: 'eu' },
|
|
29
|
+
{ label: 'EU', value: 'com' }
|
|
42
30
|
],
|
|
43
|
-
default: '
|
|
31
|
+
default: 'US'
|
|
44
32
|
},
|
|
45
33
|
accessKey: {
|
|
46
34
|
label: 'Access Key',
|
|
@@ -48,85 +36,38 @@ const destination = {
|
|
|
48
36
|
type: 'password',
|
|
49
37
|
required: true
|
|
50
38
|
},
|
|
51
|
-
|
|
52
|
-
label: '
|
|
53
|
-
description: '
|
|
39
|
+
fullUpsertURL: {
|
|
40
|
+
label: 'Full Upsert URL',
|
|
41
|
+
description: 'This setting will be removed',
|
|
54
42
|
type: 'string',
|
|
55
|
-
required:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
43
|
+
required: false
|
|
44
|
+
},
|
|
45
|
+
fullVerifyURL: {
|
|
46
|
+
label: 'Full Verify Domain',
|
|
47
|
+
description: 'This setting will be removed',
|
|
48
|
+
type: 'string',
|
|
49
|
+
required: false
|
|
62
50
|
}
|
|
51
|
+
},
|
|
52
|
+
testAuthentication: (request, { settings }) => {
|
|
53
|
+
const URL = helpers_1.getValidationURL(settings);
|
|
54
|
+
return request(URL, {
|
|
55
|
+
method: 'post',
|
|
56
|
+
json: {
|
|
57
|
+
sectionId: settings.sectionId,
|
|
58
|
+
dataCenter: settings.dataCenter
|
|
59
|
+
}
|
|
60
|
+
});
|
|
63
61
|
}
|
|
64
62
|
},
|
|
65
63
|
extendRequest({ settings }) {
|
|
66
|
-
let secret = undefined;
|
|
67
|
-
switch (settings.dataCenter) {
|
|
68
|
-
case 'US':
|
|
69
|
-
secret = process.env.ACTIONS_DYNAMIC_YIELD_AUDIENCES_US_CLIENT_SECRET;
|
|
70
|
-
break;
|
|
71
|
-
case 'EU':
|
|
72
|
-
secret = process.env.ACTIONS_DYNAMIC_YIELD_AUDIENCES_EU_CLIENT_SECRET;
|
|
73
|
-
break;
|
|
74
|
-
case 'DEV':
|
|
75
|
-
secret = process.env.ACTIONS_DYNAMIC_YIELD_AUDIENCES_DEV_CLIENT_SECRET;
|
|
76
|
-
break;
|
|
77
|
-
}
|
|
78
|
-
if (secret === undefined) {
|
|
79
|
-
throw new actions_core_1.IntegrationError('Missing Dynamic Yield Audiences Client Secret', 'MISSING_REQUIRED_FIELD', 400);
|
|
80
|
-
}
|
|
81
64
|
return {
|
|
82
65
|
headers: {
|
|
83
66
|
'Content-Type': 'application/json',
|
|
84
|
-
Authorization:
|
|
67
|
+
Authorization: `${settings.accessKey}`
|
|
85
68
|
}
|
|
86
69
|
};
|
|
87
70
|
},
|
|
88
|
-
audienceConfig: {
|
|
89
|
-
mode: {
|
|
90
|
-
type: 'synced',
|
|
91
|
-
full_audience_sync: false
|
|
92
|
-
},
|
|
93
|
-
async createAudience(request, createAudienceInput) {
|
|
94
|
-
const { settings, audienceName } = createAudienceInput;
|
|
95
|
-
const audienceSettings = createAudienceInput.audienceSettings;
|
|
96
|
-
const { audience_name } = audienceSettings;
|
|
97
|
-
try {
|
|
98
|
-
const response = await request(helpers_1.getCreateAudienceURL(settings.dataCenter), {
|
|
99
|
-
method: 'POST',
|
|
100
|
-
json: {
|
|
101
|
-
type: 'audience_subscription_request',
|
|
102
|
-
id: uuid_1.v4(),
|
|
103
|
-
timestamp_ms: new Date().getTime(),
|
|
104
|
-
account: {
|
|
105
|
-
account_settings: {
|
|
106
|
-
section_id: settings.sectionId,
|
|
107
|
-
api_key: settings.accessKey
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
audience_id: helpers_1.hashAndEncode(audience_name),
|
|
111
|
-
audience_name: audience_name ?? audienceName,
|
|
112
|
-
action: 'add'
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
const responseData = await response.json();
|
|
116
|
-
return {
|
|
117
|
-
externalId: responseData.id
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
catch (e) {
|
|
121
|
-
throw new actions_core_1.IntegrationError('Failed to create Audience in Dynamic Yield', 'DYNAMIC_YIELD_AUDIENCE_CREATION_FAILED', 400);
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
async getAudience(_, getAudienceInput) {
|
|
125
|
-
return {
|
|
126
|
-
externalId: getAudienceInput.externalId
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
71
|
actions: {
|
|
131
72
|
syncAudience: syncAudience_1.default
|
|
132
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/dynamic-yield-audiences/index.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/dynamic-yield-audiences/index.ts"],"names":[],"mappings":";;;;;AAEA,uCAA4C;AAE5C,kEAAyC;AAEzC,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,yBAAyB;IAC/B,IAAI,EAAE,iCAAiC;IACvC,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,wFAAwF;IACrG,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,SAAS,EAAE;gBACT,KAAK,EAAE,YAAY;gBACnB,WAAW,EAAE,4CAA4C;gBACzD,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,UAAU,EAAE;gBACV,KAAK,EAAE,aAAa;gBACpB,WAAW,EAAE,yBAAyB;gBACtC,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;oBAC5B,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;iBAC9B;gBACD,OAAO,EAAE,IAAI;aACd;YACD,SAAS,EAAE;gBACT,KAAK,EAAE,YAAY;gBACnB,WAAW,EAAE,yBAAyB;gBACtC,IAAI,EAAE,UAAU;gBAChB,QAAQ,EAAE,IAAI;aACf;YACD,aAAa,EAAE;gBACb,KAAK,EAAE,iBAAiB;gBACxB,WAAW,EAAE,8BAA8B;gBAC3C,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;aAChB;YACD,aAAa,EAAE;gBACb,KAAK,EAAE,oBAAoB;gBAC3B,WAAW,EAAE,8BAA8B;gBAC3C,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;aAChB;SACF;QACD,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAC5C,MAAM,GAAG,GAAG,0BAAgB,CAAC,QAAQ,CAAC,CAAA;YACtC,OAAO,OAAO,CAAC,GAAG,EAAE;gBAClB,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE;oBACJ,SAAS,EAAE,QAAQ,CAAC,SAAS;oBAC7B,UAAU,EAAE,QAAQ,CAAC,UAAU;iBAChC;aACF,CAAC,CAAA;QACJ,CAAC;KACF;IAED,aAAa,CAAC,EAAE,QAAQ,EAAE;QACxB,OAAO;YACL,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,GAAG,QAAQ,CAAC,SAAS,EAAE;aACvC;SACF,CAAA;IACH,CAAC;IACD,OAAO,EAAE;QACP,YAAY,EAAZ,sBAAY;KACb;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
export interface Payload {
|
|
2
|
-
message_id: string;
|
|
3
|
-
timestamp: string | number;
|
|
4
|
-
audience_id: string;
|
|
5
2
|
segment_audience_key: string;
|
|
6
|
-
|
|
7
|
-
[k: string]: unknown;
|
|
8
|
-
};
|
|
3
|
+
segment_audience_id: string;
|
|
9
4
|
segment_computation_action: string;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
segment_user_id?: string;
|
|
6
|
+
segment_anonymous_id?: string;
|
|
7
|
+
user_email?: string;
|
|
13
8
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ActionDefinition } from '@segment/actions-core';
|
|
2
|
-
import type { Settings
|
|
1
|
+
import type { ActionDefinition } from '@segment/actions-core';
|
|
2
|
+
import type { Settings } from '../generated-types';
|
|
3
3
|
import type { Payload } from './generated-types';
|
|
4
|
-
declare const action: ActionDefinition<Settings, Payload
|
|
4
|
+
declare const action: ActionDefinition<Settings, Payload>;
|
|
5
5
|
export default action;
|
|
@@ -1,43 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const actions_core_1 = require("@segment/actions-core");
|
|
4
3
|
const helpers_1 = require("../helpers");
|
|
5
|
-
const
|
|
4
|
+
const helpers_2 = require("../helpers");
|
|
6
5
|
const action = {
|
|
7
6
|
title: 'Sync Audience',
|
|
8
7
|
description: 'Sync Segment Engage Audiences to Dynamic Yield',
|
|
9
8
|
defaultSubscription: 'type = "identify" or type = "track"',
|
|
10
9
|
fields: {
|
|
11
|
-
message_id: {
|
|
12
|
-
label: 'Message ID',
|
|
13
|
-
description: 'Segment event message ID',
|
|
14
|
-
type: 'string',
|
|
15
|
-
unsafe_hidden: true,
|
|
16
|
-
required: true,
|
|
17
|
-
default: {
|
|
18
|
-
'@path': '$.messageId'
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
timestamp: {
|
|
22
|
-
label: 'Timestamp',
|
|
23
|
-
description: 'Segment event timestamp',
|
|
24
|
-
type: 'datetime',
|
|
25
|
-
unsafe_hidden: true,
|
|
26
|
-
required: true,
|
|
27
|
-
default: {
|
|
28
|
-
'@path': '$.timestamp'
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
audience_id: {
|
|
32
|
-
type: 'string',
|
|
33
|
-
label: 'Audience ID',
|
|
34
|
-
description: 'Unique Audience Identifier returned by the createAudience() function call.',
|
|
35
|
-
required: true,
|
|
36
|
-
unsafe_hidden: true,
|
|
37
|
-
default: {
|
|
38
|
-
'@path': '$.context.personas.computation_id'
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
10
|
segment_audience_key: {
|
|
42
11
|
label: 'Audience Key',
|
|
43
12
|
description: 'Segment Audience key / name',
|
|
@@ -48,18 +17,14 @@ const action = {
|
|
|
48
17
|
'@path': '$.context.personas.computation_key'
|
|
49
18
|
}
|
|
50
19
|
},
|
|
51
|
-
|
|
52
|
-
label: '
|
|
53
|
-
description: '
|
|
54
|
-
type: '
|
|
20
|
+
segment_audience_id: {
|
|
21
|
+
label: 'Audience ID',
|
|
22
|
+
description: 'Segment Audience ID',
|
|
23
|
+
type: 'string',
|
|
55
24
|
unsafe_hidden: true,
|
|
56
25
|
required: true,
|
|
57
26
|
default: {
|
|
58
|
-
'@
|
|
59
|
-
exists: { '@path': '$.traits' },
|
|
60
|
-
then: { '@path': '$.traits' },
|
|
61
|
-
else: { '@path': '$.properties' }
|
|
62
|
-
}
|
|
27
|
+
'@path': '$.context.personas.computation_id'
|
|
63
28
|
}
|
|
64
29
|
},
|
|
65
30
|
segment_computation_action: {
|
|
@@ -73,13 +38,28 @@ const action = {
|
|
|
73
38
|
},
|
|
74
39
|
choices: [{ label: 'audience', value: 'audience' }]
|
|
75
40
|
},
|
|
76
|
-
|
|
77
|
-
label: '
|
|
78
|
-
description:
|
|
41
|
+
segment_user_id: {
|
|
42
|
+
label: 'Segment User ID',
|
|
43
|
+
description: 'The Segment userId value.',
|
|
44
|
+
type: 'string',
|
|
45
|
+
unsafe_hidden: true,
|
|
46
|
+
required: false,
|
|
47
|
+
default: { '@path': '$.userId' }
|
|
48
|
+
},
|
|
49
|
+
segment_anonymous_id: {
|
|
50
|
+
label: 'Segment Anonymous ID',
|
|
51
|
+
description: 'The Segment anonymousId value.',
|
|
79
52
|
type: 'string',
|
|
80
|
-
|
|
53
|
+
unsafe_hidden: true,
|
|
81
54
|
required: false,
|
|
55
|
+
default: { '@path': '$.anonymousId' }
|
|
56
|
+
},
|
|
57
|
+
user_email: {
|
|
58
|
+
label: 'Email address',
|
|
59
|
+
description: "The user's email address",
|
|
60
|
+
type: 'string',
|
|
82
61
|
unsafe_hidden: true,
|
|
62
|
+
required: false,
|
|
83
63
|
default: {
|
|
84
64
|
'@if': {
|
|
85
65
|
exists: { '@path': '$.traits.email' },
|
|
@@ -87,76 +67,26 @@ const action = {
|
|
|
87
67
|
else: { '@path': '$.context.traits.email' }
|
|
88
68
|
}
|
|
89
69
|
}
|
|
90
|
-
},
|
|
91
|
-
anonymousId: {
|
|
92
|
-
label: 'Segment Anonymous Id',
|
|
93
|
-
description: "User's anonymousId",
|
|
94
|
-
type: 'string',
|
|
95
|
-
required: false,
|
|
96
|
-
unsafe_hidden: true,
|
|
97
|
-
default: { '@path': '$.anonymousId' }
|
|
98
|
-
},
|
|
99
|
-
userId: {
|
|
100
|
-
label: 'Segment User Id',
|
|
101
|
-
description: "User's unique User ID",
|
|
102
|
-
type: 'string',
|
|
103
|
-
required: false,
|
|
104
|
-
unsafe_hidden: true,
|
|
105
|
-
default: { '@path': '$.userId' }
|
|
106
70
|
}
|
|
107
71
|
},
|
|
108
72
|
perform: async (request, data) => {
|
|
109
|
-
const
|
|
110
|
-
const
|
|
111
|
-
const
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
primaryIdentifier = payload.email ?? undefined;
|
|
117
|
-
break;
|
|
118
|
-
case constants_1.IDENTIFIER_TYPES.SEGMENT_USER_ID:
|
|
119
|
-
primaryIdentifier = payload.userId ?? undefined;
|
|
120
|
-
break;
|
|
121
|
-
case constants_1.IDENTIFIER_TYPES.SEGMENT_ANONYMOUS_ID:
|
|
122
|
-
primaryIdentifier = payload.anonymousId ?? undefined;
|
|
123
|
-
break;
|
|
124
|
-
}
|
|
125
|
-
if (!primaryIdentifier) {
|
|
126
|
-
throw new actions_core_1.IntegrationError('Primary Identifier not found', 'MISSING_REQUIRED_FIELD', 400);
|
|
127
|
-
}
|
|
128
|
-
const URL = helpers_1.getUpsertURL(settings.dataCenter);
|
|
73
|
+
const d = data;
|
|
74
|
+
const payload = data.payload;
|
|
75
|
+
const settings = data.settings;
|
|
76
|
+
const audienceName = payload.segment_audience_key;
|
|
77
|
+
const audienceID = payload.segment_audience_id;
|
|
78
|
+
const audienceValue = d?.rawData?.properties?.[audienceName] ?? d?.rawData?.traits?.[audienceName];
|
|
79
|
+
const URL = helpers_1.getUpsertURL(settings);
|
|
129
80
|
return request(URL, {
|
|
130
81
|
method: 'post',
|
|
131
82
|
json: {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
accessKey: settings.accessKey
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
user_profiles: [
|
|
143
|
-
{
|
|
144
|
-
user_identities: [
|
|
145
|
-
{
|
|
146
|
-
type: settings.identifier_type,
|
|
147
|
-
encoding: settings.identifier_type === 'email' ? '"sha-256"' : 'raw',
|
|
148
|
-
value: settings.identifier_type === 'email' ? helpers_1.hashAndEncode(primaryIdentifier) : primaryIdentifier
|
|
149
|
-
}
|
|
150
|
-
],
|
|
151
|
-
audiences: [
|
|
152
|
-
{
|
|
153
|
-
audience_id: audience_id,
|
|
154
|
-
audience_name: audienceName,
|
|
155
|
-
action: audienceValue ? 'add' : 'delete'
|
|
156
|
-
}
|
|
157
|
-
]
|
|
158
|
-
}
|
|
159
|
-
]
|
|
83
|
+
audienceValue,
|
|
84
|
+
audienceName,
|
|
85
|
+
audienceID,
|
|
86
|
+
identifier: payload.segment_user_id ?? payload.segment_anonymous_id,
|
|
87
|
+
email: payload.user_email ? helpers_2.hashAndEncode(payload.user_email) : undefined,
|
|
88
|
+
sectionId: settings.sectionId,
|
|
89
|
+
dataCenter: settings.dataCenter
|
|
160
90
|
}
|
|
161
91
|
});
|
|
162
92
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/dynamic-yield-audiences/syncAudience/index.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/dynamic-yield-audiences/syncAudience/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Payload } from './generated-types';
|
|
2
|
+
export interface Data {
|
|
3
|
+
payload: Payload & {
|
|
4
|
+
context?: {
|
|
5
|
+
[k: string]: unknown;
|
|
6
|
+
personas?: {
|
|
7
|
+
computation_key?: string;
|
|
8
|
+
computation_class?: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
rawData?: {
|
|
13
|
+
context?: {
|
|
14
|
+
personas?: {
|
|
15
|
+
computation_key?: string;
|
|
16
|
+
computation_class?: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
properties?: Record<string, boolean>;
|
|
20
|
+
traits?: Record<string, boolean>;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/destinations/dynamic-yield-audiences/syncAudience/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare type AudienceAction = 'ADD' | 'REMOVE';
|
|
2
|
+
export declare enum Priority {
|
|
3
|
+
UserIdThenEmail = "user_id_then_email",
|
|
4
|
+
UserIdThenAnonymousId = "user_id_then_anonymousId",
|
|
5
|
+
UserIdThenEmailThenAnonymousId = "user_id_then_email_then_anonymousId",
|
|
6
|
+
UserIdOnly = "user_id_only",
|
|
7
|
+
EmailOnly = "email_only"
|
|
8
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Priority = void 0;
|
|
4
|
+
var Priority;
|
|
5
|
+
(function (Priority) {
|
|
6
|
+
Priority["UserIdThenEmail"] = "user_id_then_email";
|
|
7
|
+
Priority["UserIdThenAnonymousId"] = "user_id_then_anonymousId";
|
|
8
|
+
Priority["UserIdThenEmailThenAnonymousId"] = "user_id_then_email_then_anonymousId";
|
|
9
|
+
Priority["UserIdOnly"] = "user_id_only";
|
|
10
|
+
Priority["EmailOnly"] = "email_only";
|
|
11
|
+
})(Priority = exports.Priority || (exports.Priority = {}));
|
|
12
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/destinations/dynamic-yield-audiences/types.ts"],"names":[],"mappings":";;;AAEA,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,kDAAsC,CAAA;IACtC,8DAAkD,CAAA;IAClD,kFAAsE,CAAA;IACtE,uCAA2B,CAAA;IAC3B,oCAAwB,CAAA;AAC1B,CAAC,EANW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAMnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Profile.js","sourceRoot":"","sources":["../../../../src/destinations/engage/sendgrid/Profile.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { InputField } from '@segment/actions-core';
|
|
2
|
+
import { RequestClient } from '@segment/actions-core';
|
|
3
|
+
import { Logger, StatsClient, DataFeedCache } from '@segment/actions-core/destination-kit';
|
|
4
|
+
import type { Settings } from '../generated-types';
|
|
5
|
+
import { Profile } from '../Profile';
|
|
6
|
+
export declare type ApiLookupConfig = {
|
|
7
|
+
id?: string | undefined;
|
|
8
|
+
name: string;
|
|
9
|
+
url: string;
|
|
10
|
+
method: string;
|
|
11
|
+
cacheTtl: number;
|
|
12
|
+
body?: string | undefined;
|
|
13
|
+
headers?: object | undefined;
|
|
14
|
+
responseType: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const getRequestId: ({ method, url, body, headers }: ApiLookupConfig) => string;
|
|
17
|
+
export declare const getCachedResponse: ({ responseType }: ApiLookupConfig, requestId: string, dataFeedCache: DataFeedCache, datafeedTags: string[]) => Promise<any>;
|
|
18
|
+
export declare const performApiLookup: (request: RequestClient, apiLookupConfig: ApiLookupConfig, profile: Profile, statsClient: StatsClient | undefined, tags: string[], settings: Settings, logger?: Logger | undefined, dataFeedCache?: DataFeedCache | undefined) => Promise<any>;
|
|
19
|
+
export declare const apiLookupActionFields: Record<string, InputField>;
|
|
20
|
+
export declare const apiLookupLiquidKey = "lookups";
|
|
21
|
+
export declare const FLAGON_NAME_DATA_FEEDS = "is-datafeeds-enabled";
|