@segment/action-destinations 3.331.9-staging.2 → 3.331.10-staging
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/blackbaud-raisers-edge-nxt/utils/index.d.ts +1 -1
- package/dist/destinations/display-video-360/errors.d.ts +2 -1
- package/dist/destinations/display-video-360/errors.js +6 -1
- package/dist/destinations/display-video-360/errors.js.map +1 -1
- package/dist/destinations/display-video-360/index.js +6 -6
- package/dist/destinations/display-video-360/index.js.map +1 -1
- package/dist/destinations/display-video-360/listManagement.d.ts +9 -0
- package/dist/destinations/display-video-360/listManagement.js +16 -0
- package/dist/destinations/display-video-360/listManagement.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/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/package.json +1 -1
- package/dist/destinations/mixpanel/utils.d.ts +0 -13
- package/dist/destinations/mixpanel/utils.js +0 -117
- package/dist/destinations/mixpanel/utils.js.map +0 -1
|
@@ -9,7 +9,7 @@ export declare const dateStringToFuzzyDate: (dateString: string | number) => fal
|
|
|
9
9
|
y: string;
|
|
10
10
|
};
|
|
11
11
|
export declare const augmentFieldsWithConstituentFields: (fields: Record<string, InputField>) => Record<string, InputField>;
|
|
12
|
-
export declare const splitConstituentPayload: (payload: CreateOrUpdateIndividualConstituentPayload) => (Partial<
|
|
12
|
+
export declare const splitConstituentPayload: (payload: CreateOrUpdateIndividualConstituentPayload) => (Partial<Address> | Partial<OnlinePresence> | Partial<Phone> | Partial<Constituent>)[];
|
|
13
13
|
export declare const buildConstituentPayloadFromPayload: (payload: StringIndexedObject) => Partial<CreateOrUpdateIndividualConstituentPayload>;
|
|
14
14
|
export declare const buildGiftDataFromPayload: (constituentId: string, payload: CreateGiftPayload) => Partial<Gift>;
|
|
15
15
|
export declare const buildConstituentActionDataFromPayload: (constituentId: string, payload: CreateConstituentAction) => Partial<ConstituentAction>;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { IntegrationError, InvalidAuthenticationError } from '@segment/actions-core';
|
|
2
|
-
|
|
2
|
+
import { StatsClient } from '@segment/actions-core/destination-kit';
|
|
3
|
+
export declare const handleRequestError: (error: unknown, statsName: string, statsClient: StatsClient | undefined) => IntegrationError | InvalidAuthenticationError;
|
|
@@ -16,9 +16,10 @@ const isGoogleAPIError = (error) => {
|
|
|
16
16
|
}
|
|
17
17
|
return false;
|
|
18
18
|
};
|
|
19
|
-
const handleRequestError = (error) => {
|
|
19
|
+
const handleRequestError = (error, statsName, statsClient) => {
|
|
20
20
|
if (!isGoogleAPIError(error)) {
|
|
21
21
|
if (!error) {
|
|
22
|
+
statsClient?.incr(`${statsName}.error.UNKNOWN_ERROR`, 1);
|
|
22
23
|
return new actions_core_1.IntegrationError('Unknown error', 'UNKNOWN_ERROR', 500);
|
|
23
24
|
}
|
|
24
25
|
}
|
|
@@ -26,14 +27,18 @@ const handleRequestError = (error) => {
|
|
|
26
27
|
const code = gError.response?.status;
|
|
27
28
|
const message = gError.response?.data?.error?.message;
|
|
28
29
|
if (code === 401) {
|
|
30
|
+
statsClient?.incr(`${statsName}.error.INVALID_AUTHENTICATION`, 1);
|
|
29
31
|
return new actions_core_1.InvalidAuthenticationError(message, actions_core_1.ErrorCodes.INVALID_AUTHENTICATION);
|
|
30
32
|
}
|
|
31
33
|
if (code === 501) {
|
|
34
|
+
statsClient?.incr(`${statsName}.error.INTEGRATION_ERROR`, 1);
|
|
32
35
|
return new actions_core_1.IntegrationError(message, 'INTEGRATION_ERROR', 501);
|
|
33
36
|
}
|
|
34
37
|
if (code === 408 || code === 423 || code === 429 || code >= 500) {
|
|
38
|
+
statsClient?.incr(`${statsName}.error.RETRYABLE_ERROR`, 1);
|
|
35
39
|
return new actions_core_1.IntegrationError(message, 'RETRYABLE_ERROR', code);
|
|
36
40
|
}
|
|
41
|
+
statsClient?.incr(`${statsName}.error.INTEGRATION_ERROR`, 1);
|
|
37
42
|
return new actions_core_1.IntegrationError(message, 'INTEGRATION_ERROR', code);
|
|
38
43
|
};
|
|
39
44
|
exports.handleRequestError = handleRequestError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/destinations/display-video-360/errors.ts"],"names":[],"mappings":";;;AAAA,wDAAgG;
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/destinations/display-video-360/errors.ts"],"names":[],"mappings":";;;AAAA,wDAAgG;AAKhG,MAAM,gBAAgB,GAAG,CAAC,KAAc,EAA2B,EAAE;IACnE,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE;QAC/C,MAAM,CAAC,GAAG,KAAuB,CAAA;QAEjC,OAAO,CACL,OAAO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E;QAChB,WAAW,EAAE,IAAI,CAAC,GAAG,SAAS,0BAA0B,EAAE,CAAC,CAAC,CAAA;QAC5D,OAAO,IAAI,+BAAgB,CAAC,OAAO,EAAE,mBAAmB,EAAE,GAAG,CAAC,CAAA;KAC/D;IAED,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,IAAI,GAAG,EAAE;QAC/D,WAAW,EAAE,IAAI,CAAC,GAAG,SAAS,wBAAwB,EAAE,CAAC,CAAC,CAAA;QAC1D,OAAO,IAAI,+BAAgB,CAAC,OAAO,EAAE,iBAAiB,EAAE,IAAI,CAAC,CAAA;KAC9D;IAED,WAAW,EAAE,IAAI,CAAC,GAAG,SAAS,0BAA0B,EAAE,CAAC,CAAC,CAAA;IAC5D,OAAO,IAAI,+BAAgB,CAAC,OAAO,EAAE,mBAAmB,EAAE,IAAI,CAAC,CAAA;AACjE,CAAC,CAAA;AA7BY,QAAA,kBAAkB,sBA6B9B"}
|
|
@@ -69,6 +69,7 @@ const destination = {
|
|
|
69
69
|
}
|
|
70
70
|
const listTypeMap = { basicUserList: {}, type: 'REMARKETING', membershipStatus: 'OPEN' };
|
|
71
71
|
const partnerCreateAudienceUrl = constants_1.CREATE_AUDIENCE_URL.replace('advertiserID', advertiserId).replace('accountType', accountType);
|
|
72
|
+
const statsName = 'createAudience';
|
|
72
73
|
let response;
|
|
73
74
|
try {
|
|
74
75
|
response = await request(partnerCreateAudienceUrl, {
|
|
@@ -88,14 +89,13 @@ const destination = {
|
|
|
88
89
|
}
|
|
89
90
|
});
|
|
90
91
|
const r = await response?.json();
|
|
91
|
-
statsClient?.incr(
|
|
92
|
+
statsClient?.incr(`${statsName}.success`, 1, statsTags);
|
|
92
93
|
return {
|
|
93
94
|
externalId: r['results'][0]['resourceName']
|
|
94
95
|
};
|
|
95
96
|
}
|
|
96
97
|
catch (error) {
|
|
97
|
-
|
|
98
|
-
throw errors_1.handleRequestError(error);
|
|
98
|
+
throw errors_1.handleRequestError(error, statsName, statsClient);
|
|
99
99
|
}
|
|
100
100
|
},
|
|
101
101
|
async getAudience(request, getAudienceInput) {
|
|
@@ -103,6 +103,7 @@ const destination = {
|
|
|
103
103
|
const { statsClient, tags: statsTags } = statsContext || {};
|
|
104
104
|
const { advertiserId, accountType } = audienceSettings || {};
|
|
105
105
|
statsTags?.push(`slug:${destination.slug}`);
|
|
106
|
+
const statsName = 'getAudience';
|
|
106
107
|
if (!advertiserId) {
|
|
107
108
|
throw new actions_core_1.IntegrationError('Missing required advertiser ID value', 'MISSING_REQUIRED_FIELD', 400);
|
|
108
109
|
}
|
|
@@ -123,14 +124,13 @@ const destination = {
|
|
|
123
124
|
if (externalId !== getAudienceInput.externalId) {
|
|
124
125
|
throw new actions_core_1.IntegrationError("Unable to verify ownership over audience. Segment Audience ID doesn't match Googles Audience ID.", 'INVALID_REQUEST_DATA', 400);
|
|
125
126
|
}
|
|
126
|
-
statsClient?.incr(
|
|
127
|
+
statsClient?.incr(`${statsName}.success`, 1, statsTags);
|
|
127
128
|
return {
|
|
128
129
|
externalId: externalId
|
|
129
130
|
};
|
|
130
131
|
}
|
|
131
132
|
catch (error) {
|
|
132
|
-
|
|
133
|
-
throw errors_1.handleRequestError(error);
|
|
133
|
+
throw errors_1.handleRequestError(error, statsName, statsClient);
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/display-video-360/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAAuF;AAKvF,oEAA2C;AAC3C,8EAAqD;AAErD,2CAA8E;AAC9E,qCAAuC;AACvC,qCAA6C;AAE7C,MAAM,WAAW,GAA8D;IAC7E,IAAI,EAAE,iCAAiC;IACvC,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,OAAO;IACb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM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
exports.buildListTypeMap = void 0;
|
|
4
|
+
const cjs_1 = require("@segment/actions-core/dist/cjs");
|
|
5
|
+
const buildListTypeMap = (listType) => {
|
|
6
|
+
switch (listType) {
|
|
7
|
+
case 'basicUserList':
|
|
8
|
+
return { basicUserList: {}, type: 'REMARKETING', membershipStatus: 'OPEN' };
|
|
9
|
+
case 'customerMatchList':
|
|
10
|
+
return { crmBasedUserList: { uploadKeyType: 'CONTACT_INFO' } };
|
|
11
|
+
default:
|
|
12
|
+
throw new cjs_1.IntegrationError('Invalid list type', 'INVALID_REQUEST_DATA', 400);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
exports.buildListTypeMap = buildListTypeMap;
|
|
16
|
+
//# sourceMappingURL=listManagement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listManagement.js","sourceRoot":"","sources":["../../../src/destinations/display-video-360/listManagement.ts"],"names":[],"mappings":";;;AAAA,wDAAiE;AAI1D,MAAM,gBAAgB,GAAG,CAAC,QAAgB,EAAoB,EAAE;IACrE,QAAQ,QAAQ,EAAE;QAChB,KAAK,eAAe;YAClB,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,EAAE,CAAA;QAC7E,KAAK,mBAAmB;YACtB,OAAO,EAAE,gBAAgB,EAAE,EAAE,aAAa,EAAE,cAAc,EAAE,EAAE,CAAA;QAChE;YACE,MAAM,IAAI,sBAAgB,CAAC,mBAAmB,EAAE,sBAAsB,EAAE,GAAG,CAAC,CAAA;KAC/E;AACH,CAAC,CAAA;AATY,QAAA,gBAAgB,oBAS5B"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
movable_ink_url?: string;
|
|
3
|
+
user_id?: string;
|
|
4
|
+
anonymous_id?: string;
|
|
5
|
+
timestamp: string | number;
|
|
6
|
+
timezone?: string;
|
|
7
|
+
products_required_false?: {
|
|
8
|
+
id: string;
|
|
9
|
+
title?: string;
|
|
10
|
+
price?: number;
|
|
11
|
+
url?: string;
|
|
12
|
+
quantity?: number;
|
|
13
|
+
[k: string]: unknown;
|
|
14
|
+
}[];
|
|
15
|
+
categories: {
|
|
16
|
+
id: string;
|
|
17
|
+
url?: string;
|
|
18
|
+
}[];
|
|
19
|
+
meta?: {
|
|
20
|
+
[k: string]: unknown;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/movable-ink/categoryView/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
7
|
+
const fields_1 = require("../fields");
|
|
8
|
+
const omit_1 = __importDefault(require("lodash/omit"));
|
|
9
|
+
const action = {
|
|
10
|
+
title: 'Category View',
|
|
11
|
+
description: 'Send a "Category View" event to Movable Ink',
|
|
12
|
+
defaultSubscription: 'type = "track" and event = "Category Viewed"',
|
|
13
|
+
fields: {
|
|
14
|
+
movable_ink_url: fields_1.movable_ink_url,
|
|
15
|
+
user_id: fields_1.user_id,
|
|
16
|
+
anonymous_id: fields_1.anonymous_id,
|
|
17
|
+
timestamp: fields_1.timestamp,
|
|
18
|
+
timezone: fields_1.timezone,
|
|
19
|
+
products_required_false: fields_1.products_required_false,
|
|
20
|
+
categories: fields_1.categories,
|
|
21
|
+
meta: fields_1.meta
|
|
22
|
+
},
|
|
23
|
+
perform: (request, { settings, payload }) => {
|
|
24
|
+
const url = payload?.movable_ink_url ?? settings?.movable_ink_url;
|
|
25
|
+
if (!url)
|
|
26
|
+
throw new actions_core_1.IntegrationError('"Movable Ink URL" setting or "Movable Ink URL" field must be populated', 'MISSING_DESTINATION_URL', 400);
|
|
27
|
+
return request(url, {
|
|
28
|
+
method: 'POST',
|
|
29
|
+
json: {
|
|
30
|
+
event_name: 'Category View',
|
|
31
|
+
user_id: payload.user_id,
|
|
32
|
+
anonymous_id: payload.anonymous_id,
|
|
33
|
+
timestamp: payload.timestamp,
|
|
34
|
+
timezone: payload.timezone,
|
|
35
|
+
product: payload.products_required_false,
|
|
36
|
+
categories: payload.categories,
|
|
37
|
+
metadata: { ...omit_1.default(payload.meta, ['products_required_false', 'categories']) }
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
exports.default = action;
|
|
43
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/movable-ink/categoryView/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA0E;AAG1E,sCASkB;AAClB,uDAA8B;AAE9B,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,6CAA6C;IAC1D,mBAAmB,EAAE,8CAA8C;IACnE,MAAM,EAAE;QACN,eAAe,EAAf,wBAAe;QACf,OAAO,EAAP,gBAAO;QACP,YAAY,EAAZ,qBAAY;QACZ,SAAS,EAAT,kBAAS;QACT,QAAQ,EAAR,iBAAQ;QACR,uBAAuB,EAAvB,gCAAuB;QACvB,UAAU,EAAV,mBAAU;QACV,IAAI,EAAJ,aAAI;KACL;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAC1C,MAAM,GAAG,GAAG,OAAO,EAAE,eAAe,IAAI,QAAQ,EAAE,eAAe,CAAA;QACjE,IAAI,CAAC,GAAG;YACN,MAAM,IAAI,+BAAgB,CACxB,wEAAwE,EACxE,yBAAyB,EACzB,GAAG,CACJ,CAAA;QAEH,OAAO,OAAO,CAAC,GAAG,EAAE;YAClB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,UAAU,EAAE,eAAe;gBAC3B,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,YAAY,EAAE,OAAO,CAAC,YAAY;gBAClC,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,QAAQ,EAAE,OAAO,CAAC,QAAQ;gBAC1B,OAAO,EAAE,OAAO,CAAC,uBAAuB;gBACxC,UAAU,EAAE,OAAO,CAAC,UAAU;gBAC9B,QAAQ,EAAE,EAAE,GAAG,cAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,yBAAyB,EAAE,YAAY,CAAC,CAAC,EAAE;aAC/E;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
movable_ink_url?: string;
|
|
3
|
+
user_id?: string;
|
|
4
|
+
anonymous_id?: string;
|
|
5
|
+
timestamp: string | number;
|
|
6
|
+
timezone?: string;
|
|
7
|
+
products: {
|
|
8
|
+
id: string;
|
|
9
|
+
title?: string;
|
|
10
|
+
price?: number;
|
|
11
|
+
url?: string;
|
|
12
|
+
quantity?: number;
|
|
13
|
+
[k: string]: unknown;
|
|
14
|
+
}[];
|
|
15
|
+
order_id: string;
|
|
16
|
+
revenue: number;
|
|
17
|
+
meta?: {
|
|
18
|
+
[k: string]: unknown;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/movable-ink/conversion/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
7
|
+
const fields_1 = require("../fields");
|
|
8
|
+
const omit_1 = __importDefault(require("lodash/omit"));
|
|
9
|
+
const action = {
|
|
10
|
+
title: 'Conversion',
|
|
11
|
+
description: 'Send a Conversion event Movable Ink',
|
|
12
|
+
defaultSubscription: 'type = "track" and event = "Order Completed"',
|
|
13
|
+
fields: {
|
|
14
|
+
movable_ink_url: fields_1.movable_ink_url,
|
|
15
|
+
user_id: fields_1.user_id,
|
|
16
|
+
anonymous_id: fields_1.anonymous_id,
|
|
17
|
+
timestamp: fields_1.timestamp,
|
|
18
|
+
timezone: fields_1.timezone,
|
|
19
|
+
products: fields_1.products,
|
|
20
|
+
order_id: fields_1.order_id,
|
|
21
|
+
revenue: fields_1.revenue,
|
|
22
|
+
meta: fields_1.meta
|
|
23
|
+
},
|
|
24
|
+
perform: (request, { settings, payload }) => {
|
|
25
|
+
const url = payload?.movable_ink_url ?? settings?.movable_ink_url;
|
|
26
|
+
if (!url)
|
|
27
|
+
throw new actions_core_1.IntegrationError('"Movable Ink URL" setting or "Movable Ink URL" field must be populated', 'MISSING_DESTINATION_URL', 400);
|
|
28
|
+
return request(url, {
|
|
29
|
+
method: 'POST',
|
|
30
|
+
json: {
|
|
31
|
+
event_name: 'Conversion',
|
|
32
|
+
user_id: payload.user_id,
|
|
33
|
+
anonymous_id: payload.anonymous_id,
|
|
34
|
+
timestamp: payload.timestamp,
|
|
35
|
+
timezone: payload.timezone,
|
|
36
|
+
products: payload.products,
|
|
37
|
+
order_id: payload.order_id,
|
|
38
|
+
revenue: payload.revenue,
|
|
39
|
+
metadata: { ...omit_1.default(payload.meta, ['products', 'order_id', 'revenue']) }
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
exports.default = action;
|
|
45
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|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AAC,EAAE;aACzE;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { InputField } from '@segment/actions-core/destination-kit/types';
|
|
2
|
+
export declare const movable_ink_url: InputField;
|
|
3
|
+
export declare const timestamp: InputField;
|
|
4
|
+
export declare const timezone: InputField;
|
|
5
|
+
export declare const event_name: InputField;
|
|
6
|
+
export declare const user_id: InputField;
|
|
7
|
+
export declare const anonymous_id: InputField;
|
|
8
|
+
export declare const meta: InputField;
|
|
9
|
+
export declare const query_url: InputField;
|
|
10
|
+
export declare const revenue: InputField;
|
|
11
|
+
export declare const revenue_required_false: InputField;
|
|
12
|
+
export declare const query: InputField;
|
|
13
|
+
export declare const order_id: InputField;
|
|
14
|
+
export declare const order_id_required_false: InputField;
|
|
15
|
+
export declare const product_quantity: InputField;
|
|
16
|
+
export declare const product: InputField;
|
|
17
|
+
export declare const product_with_quantity: InputField;
|
|
18
|
+
export declare const products: InputField;
|
|
19
|
+
export declare const products_required_false: InputField;
|
|
20
|
+
export declare const categories: InputField;
|
|
21
|
+
export declare const categories_required_false: InputField;
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.categories_required_false = exports.categories = exports.products_required_false = exports.products = exports.product_with_quantity = exports.product = exports.product_quantity = exports.order_id_required_false = exports.order_id = exports.query = exports.revenue_required_false = exports.revenue = exports.query_url = exports.meta = exports.anonymous_id = exports.user_id = exports.event_name = exports.timezone = exports.timestamp = exports.movable_ink_url = void 0;
|
|
4
|
+
exports.movable_ink_url = {
|
|
5
|
+
label: 'Movable Ink URL',
|
|
6
|
+
description: 'The Movable Ink URL to send data to. This field overrides the "Movable Ink URL" setting.',
|
|
7
|
+
type: 'string',
|
|
8
|
+
required: false,
|
|
9
|
+
format: 'uri'
|
|
10
|
+
};
|
|
11
|
+
exports.timestamp = {
|
|
12
|
+
label: 'timestamp',
|
|
13
|
+
description: "Timestamp for the event. Must be in ISO 8601 format. For example '2023-09-18T11:45:59.533Z'. Segment will convert to Unix time before sending to Movable Ink.",
|
|
14
|
+
type: 'datetime',
|
|
15
|
+
required: true,
|
|
16
|
+
default: { '@path': '$.timestamp' }
|
|
17
|
+
};
|
|
18
|
+
exports.timezone = {
|
|
19
|
+
label: 'Timezone',
|
|
20
|
+
description: 'The timezone of where the event took place (TZ database name in the IANA Time Zone Database)',
|
|
21
|
+
type: 'string',
|
|
22
|
+
required: false,
|
|
23
|
+
default: {
|
|
24
|
+
'@if': {
|
|
25
|
+
exists: { '@path': '$.context.timezone' },
|
|
26
|
+
then: { '@path': '$.context.timezone' },
|
|
27
|
+
else: { '@path': '$.properties.timezone' }
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
exports.event_name = {
|
|
32
|
+
label: 'Event Name',
|
|
33
|
+
description: 'The name of the event to send',
|
|
34
|
+
type: 'string',
|
|
35
|
+
required: true,
|
|
36
|
+
default: { '@path': '$.event' }
|
|
37
|
+
};
|
|
38
|
+
exports.user_id = {
|
|
39
|
+
label: 'User ID',
|
|
40
|
+
description: 'The unique identifier of the profile that triggered this event.',
|
|
41
|
+
type: 'string',
|
|
42
|
+
required: false,
|
|
43
|
+
default: { '@path': '$.userId' }
|
|
44
|
+
};
|
|
45
|
+
exports.anonymous_id = {
|
|
46
|
+
label: 'Anonymous ID',
|
|
47
|
+
description: 'A unique identifier of the anonymous profile that triggered this event.',
|
|
48
|
+
type: 'string',
|
|
49
|
+
required: false,
|
|
50
|
+
default: { '@path': '$.anonymousId' }
|
|
51
|
+
};
|
|
52
|
+
exports.meta = {
|
|
53
|
+
label: 'Metadata',
|
|
54
|
+
description: 'A map of meta data to provide additional context about the event.',
|
|
55
|
+
type: 'object',
|
|
56
|
+
defaultObjectUI: 'keyvalue',
|
|
57
|
+
additionalProperties: true,
|
|
58
|
+
required: false,
|
|
59
|
+
default: { '@path': '$.properties' }
|
|
60
|
+
};
|
|
61
|
+
exports.query_url = {
|
|
62
|
+
label: 'Query URL',
|
|
63
|
+
description: 'The URL of a query the user searched with',
|
|
64
|
+
type: 'string',
|
|
65
|
+
required: false,
|
|
66
|
+
default: { '@path': '$.properties.url' }
|
|
67
|
+
};
|
|
68
|
+
exports.revenue = {
|
|
69
|
+
label: 'Revenue',
|
|
70
|
+
description: 'The revenue generated by the purchase',
|
|
71
|
+
type: 'number',
|
|
72
|
+
required: true,
|
|
73
|
+
default: { '@path': '$.properties.revenue' }
|
|
74
|
+
};
|
|
75
|
+
exports.revenue_required_false = {
|
|
76
|
+
...exports.revenue,
|
|
77
|
+
required: false
|
|
78
|
+
};
|
|
79
|
+
exports.query = {
|
|
80
|
+
label: 'Query',
|
|
81
|
+
description: 'Query the user searched with',
|
|
82
|
+
type: 'string',
|
|
83
|
+
required: true,
|
|
84
|
+
default: { '@path': '$.properties.query' }
|
|
85
|
+
};
|
|
86
|
+
exports.order_id = {
|
|
87
|
+
label: 'Order ID',
|
|
88
|
+
description: 'Unique ID for the purchase',
|
|
89
|
+
type: 'string',
|
|
90
|
+
required: true,
|
|
91
|
+
default: { '@path': '$.properties.order_id' }
|
|
92
|
+
};
|
|
93
|
+
exports.order_id_required_false = {
|
|
94
|
+
...exports.order_id,
|
|
95
|
+
required: false
|
|
96
|
+
};
|
|
97
|
+
exports.product_quantity = {
|
|
98
|
+
label: 'Product Quantity',
|
|
99
|
+
description: 'The quantity of the product.',
|
|
100
|
+
type: 'integer',
|
|
101
|
+
required: false,
|
|
102
|
+
default: { '@path': '$.properties.quantity' }
|
|
103
|
+
};
|
|
104
|
+
exports.product = {
|
|
105
|
+
label: 'Product Details',
|
|
106
|
+
description: 'Product details to associate with the event',
|
|
107
|
+
type: 'object',
|
|
108
|
+
required: true,
|
|
109
|
+
multiple: false,
|
|
110
|
+
additionalProperties: true,
|
|
111
|
+
properties: {
|
|
112
|
+
id: {
|
|
113
|
+
label: 'Product ID',
|
|
114
|
+
description: 'The unique identifier of the product.',
|
|
115
|
+
type: 'string',
|
|
116
|
+
required: true
|
|
117
|
+
},
|
|
118
|
+
title: {
|
|
119
|
+
label: 'Product title',
|
|
120
|
+
description: 'The title or name of the product.',
|
|
121
|
+
type: 'string',
|
|
122
|
+
required: false
|
|
123
|
+
},
|
|
124
|
+
price: {
|
|
125
|
+
label: 'Product price',
|
|
126
|
+
description: 'The product price.',
|
|
127
|
+
type: 'number',
|
|
128
|
+
required: false
|
|
129
|
+
},
|
|
130
|
+
url: {
|
|
131
|
+
label: 'Product URL',
|
|
132
|
+
description: 'The URL of the product.',
|
|
133
|
+
type: 'string',
|
|
134
|
+
required: false
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
default: {
|
|
138
|
+
id: { '@path': '$.properties.product_id' },
|
|
139
|
+
title: { '@path': '$.properties.name' },
|
|
140
|
+
price: { '@path': '$.properties.price' },
|
|
141
|
+
url: { '@path': '$.properties.url' }
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
exports.product_with_quantity = {
|
|
145
|
+
...exports.product,
|
|
146
|
+
properties: {
|
|
147
|
+
...exports.product.properties,
|
|
148
|
+
quantity: {
|
|
149
|
+
label: 'Quantity',
|
|
150
|
+
description: 'The quantity of the product.',
|
|
151
|
+
type: 'integer',
|
|
152
|
+
required: false
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
default: {
|
|
156
|
+
...exports.product.default,
|
|
157
|
+
quantity: { '@path': '$.quantity' }
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
exports.products = {
|
|
161
|
+
label: 'Products',
|
|
162
|
+
description: 'Product details to associate with the event.',
|
|
163
|
+
type: 'object',
|
|
164
|
+
required: true,
|
|
165
|
+
multiple: true,
|
|
166
|
+
additionalProperties: true,
|
|
167
|
+
properties: {
|
|
168
|
+
id: {
|
|
169
|
+
label: 'Product ID',
|
|
170
|
+
description: 'The unique identifier of the product.',
|
|
171
|
+
type: 'string',
|
|
172
|
+
required: true
|
|
173
|
+
},
|
|
174
|
+
title: {
|
|
175
|
+
label: 'Product title',
|
|
176
|
+
description: 'The title or name of the product.',
|
|
177
|
+
type: 'string',
|
|
178
|
+
required: false
|
|
179
|
+
},
|
|
180
|
+
price: {
|
|
181
|
+
label: 'Product price',
|
|
182
|
+
description: 'The product price.',
|
|
183
|
+
type: 'number',
|
|
184
|
+
required: false
|
|
185
|
+
},
|
|
186
|
+
url: {
|
|
187
|
+
label: 'Product URL',
|
|
188
|
+
description: 'The URL of the product.',
|
|
189
|
+
type: 'string',
|
|
190
|
+
required: false
|
|
191
|
+
},
|
|
192
|
+
quantity: {
|
|
193
|
+
label: 'Product Quantity',
|
|
194
|
+
description: 'The quantity of the product.',
|
|
195
|
+
type: 'integer',
|
|
196
|
+
required: false
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
default: {
|
|
200
|
+
'@arrayPath': [
|
|
201
|
+
'$.properties.products',
|
|
202
|
+
{
|
|
203
|
+
id: { '@path': '$.product_id' },
|
|
204
|
+
title: { '@path': '$.name' },
|
|
205
|
+
price: { '@path': '$.price' },
|
|
206
|
+
url: { '@path': '$.url' },
|
|
207
|
+
quantity: { '@path': '$.quantity' }
|
|
208
|
+
}
|
|
209
|
+
]
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
exports.products_required_false = {
|
|
213
|
+
...exports.products,
|
|
214
|
+
required: false
|
|
215
|
+
};
|
|
216
|
+
exports.categories = {
|
|
217
|
+
label: 'Categories',
|
|
218
|
+
description: 'Product Category details',
|
|
219
|
+
type: 'object',
|
|
220
|
+
multiple: true,
|
|
221
|
+
required: true,
|
|
222
|
+
defaultObjectUI: 'keyvalue',
|
|
223
|
+
additionalProperties: false,
|
|
224
|
+
properties: {
|
|
225
|
+
id: { label: 'Category ID', description: 'The unique identifier of the Category.', type: 'string', required: true },
|
|
226
|
+
url: { label: 'Category URL', description: 'The URL of the Category', type: 'string' }
|
|
227
|
+
},
|
|
228
|
+
default: {
|
|
229
|
+
'@arrayPath': ['$.properties.categories', { id: { '@path': '$.id' }, url: { '@path': '$.url' } }]
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
exports.categories_required_false = {
|
|
233
|
+
...exports.categories,
|
|
234
|
+
required: false
|
|
235
|
+
};
|
|
236
|
+
//# sourceMappingURL=fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../src/destinations/movable-ink/fields.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAe;IACzC,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,0FAA0F;IACvG,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,KAAK;CACd,CAAA;AAEY,QAAA,SAAS,GAAe;IACnC,KAAK,EAAE,WAAW;IAClB,WAAW,EACT,+JAA+J;IACjK,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;CACpC,CAAA;AAEY,QAAA,QAAQ,GAAe;IAClC,KAAK,EAAE,UAAU;IACjB,WAAW,EAAE,8FAA8F;IAC3G,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,KAAK;IACf,OAAO,EAAE;QACP,KAAK,EAAE;YACL,MAAM,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;YACzC,IAAI,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;YACvC,IAAI,EAAE,EAAE,OAAO,EAAE,uBAAuB,EAAE;SAC3C;KACF;CACF,CAAA;AAEY,QAAA,UAAU,GAAe;IACpC,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,+BAA+B;IAC5C,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;CAChC,CAAA;AAEY,QAAA,OAAO,GAAe;IACjC,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ceRoot":"","sources":["../../../../src/destinations/movable-ink/identify/generated-types.ts"],"names":[],"mappings":""}
|