@segment/action-destinations 3.227.4-staging.0 → 3.227.4-staging.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/klaviyo/generated-types.d.ts +0 -4
- package/dist/destinations/klaviyo/index.d.ts +2 -2
- package/dist/destinations/klaviyo/index.js +3 -20
- package/dist/destinations/klaviyo/index.js.map +1 -1
- package/dist/destinations/yahoo-audiences/createCustomerNode/generated-types.d.ts +4 -0
- package/dist/destinations/yahoo-audiences/createCustomerNode/generated-types.js.map +1 -0
- package/dist/destinations/{movable-ink/conversion → yahoo-audiences/createCustomerNode}/index.d.ts +1 -1
- package/dist/destinations/yahoo-audiences/createCustomerNode/index.js +26 -0
- package/dist/destinations/yahoo-audiences/createCustomerNode/index.js.map +1 -0
- package/dist/destinations/yahoo-audiences/createSegment/generated-types.d.ts +6 -0
- package/dist/destinations/yahoo-audiences/createSegment/generated-types.js.map +1 -0
- package/dist/destinations/{movable-ink/identify → yahoo-audiences/createSegment}/index.d.ts +1 -1
- package/dist/destinations/yahoo-audiences/createSegment/index.js +38 -0
- package/dist/destinations/yahoo-audiences/createSegment/index.js.map +1 -0
- package/dist/destinations/yahoo-audiences/utils.d.ts +4 -0
- package/dist/destinations/yahoo-audiences/utils.js +30 -0
- package/dist/destinations/yahoo-audiences/utils.js.map +1 -0
- package/package.json +1 -1
- package/dist/destinations/movable-ink/categoryView/generated-types.d.ts +0 -22
- package/dist/destinations/movable-ink/categoryView/generated-types.js.map +0 -1
- package/dist/destinations/movable-ink/categoryView/index.d.ts +0 -5
- package/dist/destinations/movable-ink/categoryView/index.js +0 -43
- package/dist/destinations/movable-ink/categoryView/index.js.map +0 -1
- package/dist/destinations/movable-ink/conversion/generated-types.d.ts +0 -20
- package/dist/destinations/movable-ink/conversion/generated-types.js.map +0 -1
- package/dist/destinations/movable-ink/conversion/index.js +0 -45
- package/dist/destinations/movable-ink/conversion/index.js.map +0 -1
- package/dist/destinations/movable-ink/fields.d.ts +0 -21
- package/dist/destinations/movable-ink/fields.js +0 -236
- package/dist/destinations/movable-ink/fields.js.map +0 -1
- package/dist/destinations/movable-ink/identify/generated-types.d.ts +0 -7
- package/dist/destinations/movable-ink/identify/generated-types.js +0 -3
- package/dist/destinations/movable-ink/identify/generated-types.js.map +0 -1
- package/dist/destinations/movable-ink/identify/index.js +0 -32
- package/dist/destinations/movable-ink/identify/index.js.map +0 -1
- package/dist/destinations/movable-ink/productAdded/generated-types.d.ts +0 -22
- package/dist/destinations/movable-ink/productAdded/generated-types.js +0 -3
- package/dist/destinations/movable-ink/productAdded/generated-types.js.map +0 -1
- package/dist/destinations/movable-ink/productAdded/index.d.ts +0 -5
- package/dist/destinations/movable-ink/productAdded/index.js +0 -43
- package/dist/destinations/movable-ink/productAdded/index.js.map +0 -1
- package/dist/destinations/movable-ink/productViewed/generated-types.d.ts +0 -21
- package/dist/destinations/movable-ink/productViewed/generated-types.js +0 -3
- package/dist/destinations/movable-ink/productViewed/generated-types.js.map +0 -1
- package/dist/destinations/movable-ink/productViewed/index.d.ts +0 -5
- package/dist/destinations/movable-ink/productViewed/index.js +0 -43
- package/dist/destinations/movable-ink/productViewed/index.js.map +0 -1
- package/dist/destinations/movable-ink/search/generated-types.d.ts +0 -12
- package/dist/destinations/movable-ink/search/generated-types.js +0 -3
- package/dist/destinations/movable-ink/search/generated-types.js.map +0 -1
- package/dist/destinations/movable-ink/search/index.d.ts +0 -5
- package/dist/destinations/movable-ink/search/index.js +0 -43
- package/dist/destinations/movable-ink/search/index.js.map +0 -1
- package/dist/destinations/movable-ink/sendCustomEvent/generated-types.d.ts +0 -25
- package/dist/destinations/movable-ink/sendCustomEvent/generated-types.js +0 -3
- package/dist/destinations/movable-ink/sendCustomEvent/generated-types.js.map +0 -1
- package/dist/destinations/movable-ink/sendCustomEvent/index.d.ts +0 -5
- package/dist/destinations/movable-ink/sendCustomEvent/index.js +0 -48
- package/dist/destinations/movable-ink/sendCustomEvent/index.js.map +0 -1
- /package/dist/destinations/{movable-ink/categoryView → yahoo-audiences/createCustomerNode}/generated-types.js +0 -0
- /package/dist/destinations/{movable-ink/conversion → yahoo-audiences/createSegment}/generated-types.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { AudienceDestinationDefinition } from '@segment/actions-core';
|
|
2
|
-
import type { Settings
|
|
3
|
-
declare const destination: AudienceDestinationDefinition<Settings
|
|
2
|
+
import type { Settings } from './generated-types';
|
|
3
|
+
declare const destination: AudienceDestinationDefinition<Settings>;
|
|
4
4
|
export default destination;
|
|
@@ -57,20 +57,7 @@ const destination = {
|
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
59
|
},
|
|
60
|
-
audienceFields: {
|
|
61
|
-
list_name: {
|
|
62
|
-
type: 'string',
|
|
63
|
-
label: 'A List Name is required by the destination',
|
|
64
|
-
description: 'A List Name is required by the destination',
|
|
65
|
-
required: true
|
|
66
|
-
},
|
|
67
|
-
api_key: {
|
|
68
|
-
type: 'string',
|
|
69
|
-
label: 'A Api Key is required by the destination',
|
|
70
|
-
description: 'A Api Key is required by the destination',
|
|
71
|
-
required: true
|
|
72
|
-
}
|
|
73
|
-
},
|
|
60
|
+
audienceFields: {},
|
|
74
61
|
audienceConfig: {
|
|
75
62
|
mode: {
|
|
76
63
|
type: 'synced',
|
|
@@ -78,17 +65,13 @@ const destination = {
|
|
|
78
65
|
},
|
|
79
66
|
async createAudience(request, createAudienceInput) {
|
|
80
67
|
const audienceName = createAudienceInput.audienceName;
|
|
81
|
-
const
|
|
82
|
-
const apiKey = createAudienceInput.audienceSettings?.api_key;
|
|
68
|
+
const apiKey = createAudienceInput.settings?.api_key;
|
|
83
69
|
if (!audienceName) {
|
|
84
70
|
throw new actions_core_1.IntegrationError('Missing audience name value', 'MISSING_REQUIRED_FIELD', 400);
|
|
85
71
|
}
|
|
86
72
|
if (!apiKey) {
|
|
87
73
|
throw new actions_core_1.IntegrationError('Missing Api Key value', 'MISSING_REQUIRED_FIELD', 400);
|
|
88
74
|
}
|
|
89
|
-
if (!listName) {
|
|
90
|
-
throw new actions_core_1.IntegrationError('Missing List Name value', 'MISSING_REQUIRED_FIELD', 400);
|
|
91
|
-
}
|
|
92
75
|
const response = await request(`${config_1.API_URL}/lists`, {
|
|
93
76
|
method: 'POST',
|
|
94
77
|
headers: {
|
|
@@ -98,7 +81,7 @@ const destination = {
|
|
|
98
81
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
99
82
|
},
|
|
100
83
|
json: {
|
|
101
|
-
data: { type: 'list', attributes: { name:
|
|
84
|
+
data: { type: 'list', attributes: { name: audienceName } }
|
|
102
85
|
}
|
|
103
86
|
});
|
|
104
87
|
const r = await response.json();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/klaviyo/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAAuF;AAGvF,qCAAiD;AACjD,oEAA2C;AAC3C,0EAAiD;AACjD,gFAAuD;AACvD,8DAAqC;AACrC,sEAA6C;AAE7C,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/klaviyo/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAAuF;AAGvF,qCAAiD;AACjD,oEAA2C;AAC3C,0EAAiD;AACjD,gFAAuD;AACvD,8DAAqC;AACrC,sEAA6C;AAE7C,MAAM,WAAW,GAA4C;IAC3D,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,wGAAwG;gBACrH,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE;YAC9B,OAAO,OAAO,CAAC,GAAG,g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M,IAAI,+BAAgB,CACxB,kGAAkG,EAClG,sBAAsB,EACtB,GAAG,CACJ,CAAA;aACF;YAED,OAAO;gBACL,UAAU;aACX,CAAA;QACH,CAAC;KACF;IACD,OAAO,EAAE;QACP,aAAa,EAAb,uBAAa;QACb,gBAAgB,EAAhB,0BAAgB;QAChB,mBAAmB,EAAnB,6BAAmB;QACnB,UAAU,EAAV,oBAAU;QACV,cAAc,EAAd,wBAAc;KACf;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/yahoo-audiences/createCustomerNode/generated-types.ts"],"names":[],"mappings":""}
|
package/dist/destinations/{movable-ink/conversion → yahoo-audiences/createCustomerNode}/index.d.ts
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionDefinition } from '@segment/actions-core';
|
|
1
|
+
import type { ActionDefinition } from '@segment/actions-core';
|
|
2
2
|
import type { Settings } from '../generated-types';
|
|
3
3
|
import type { Payload } from './generated-types';
|
|
4
4
|
declare const action: ActionDefinition<Settings, Payload>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const action = {
|
|
4
|
+
title: 'Create top-level CUSTOMER node in Yahoo taxonomy',
|
|
5
|
+
defaultSubscription: 'event = "Audience Entered" and event = "Audience Exited"',
|
|
6
|
+
description: '',
|
|
7
|
+
fields: {
|
|
8
|
+
engage_space_id: {
|
|
9
|
+
label: 'Engage Space Id',
|
|
10
|
+
description: 'Provide Engage Space Id found in Unify > Settings > API Access. This maps to the "Id" and "Name" of the top-level Customer node in Yahoo taxonomy',
|
|
11
|
+
type: 'string',
|
|
12
|
+
required: true
|
|
13
|
+
},
|
|
14
|
+
customer_desc: {
|
|
15
|
+
label: 'Customer Description',
|
|
16
|
+
description: 'Provide a description for the Customer node in Yahoo taxonomy. This must be less then 1000 characters',
|
|
17
|
+
type: 'string',
|
|
18
|
+
required: false
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
perform: () => {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
exports.default = action;
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/yahoo-audiences/createCustomerNode/index.ts"],"names":[],"mappings":";;AAMA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,kDAAkD;IACzD,mBAAmB,EAAE,0DAA0D;IAC/E,WAAW,EAAE,EAAE;IACf,MAAM,EAAE;QACN,eAAe,EAAE;YACf,KAAK,EAAE,iBAAiB;YACxB,WAAW,EACT,mJAAmJ;YACrJ,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,aAAa,EAAE;YACb,KAAK,EAAE,sBAAsB;YAC7B,WAAW,EACT,uGAAuG;YACzG,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;SAChB;KACF;IASD,OAAO,EAAE,GAAG,EAAE;QACZ,OAAM;IACR,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/yahoo-audiences/createSegment/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionDefinition } from '@segment/actions-core';
|
|
1
|
+
import type { ActionDefinition } from '@segment/actions-core';
|
|
2
2
|
import type { Settings } from '../generated-types';
|
|
3
3
|
import type { Payload } from './generated-types';
|
|
4
4
|
declare const action: ActionDefinition<Settings, Payload>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const action = {
|
|
4
|
+
title: 'Create SEGMENT sub-node in Yahoo taxonomy',
|
|
5
|
+
description: 'Use this action to generate SEGMENT sub-node within CUSTOMER node in Yahoo taxonomy',
|
|
6
|
+
defaultSubscription: 'event = "Audience Entered" and event = "Audience Exited"',
|
|
7
|
+
fields: {
|
|
8
|
+
segment_audience_key: {
|
|
9
|
+
label: 'Audience Key',
|
|
10
|
+
description: 'Provide audience key. This maps to the "Name" of the Segment node in Yahoo taxonomy',
|
|
11
|
+
type: 'string',
|
|
12
|
+
required: true
|
|
13
|
+
},
|
|
14
|
+
segment_audience_id: {
|
|
15
|
+
label: 'Audience Id',
|
|
16
|
+
description: 'Provide audience Id (aud_...) from audience URL in Segment Engage. This maps to the "Id" of the Segment node in Yahoo taxonomy',
|
|
17
|
+
type: 'string',
|
|
18
|
+
required: true
|
|
19
|
+
},
|
|
20
|
+
engage_space_id: {
|
|
21
|
+
label: 'Engage Space Id',
|
|
22
|
+
description: 'Provide Engage Space Id found in Unify > Settings > API Access. This maps to the "Id" and "Name" of the top-level Customer node in Yahoo taxonomy and specifies the parent node for your Segment node in Yahoo taxonomy',
|
|
23
|
+
type: 'string',
|
|
24
|
+
required: false
|
|
25
|
+
},
|
|
26
|
+
customer_desc: {
|
|
27
|
+
label: 'Space Description',
|
|
28
|
+
description: 'Provide the description for Segment node in Yahoo taxonomy. This must be less then 1000 characters',
|
|
29
|
+
type: 'string',
|
|
30
|
+
required: false
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
perform: () => {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
exports.default = action;
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/yahoo-audiences/createSegment/index.ts"],"names":[],"mappings":";;AAQA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,2CAA2C;IAClD,WAAW,EAAE,qFAAqF;IAClG,mBAAmB,EAAE,0DAA0D;IAE/E,MAAM,EAAE;QACN,oBAAoB,EAAE;YACpB,KAAK,EAAE,cAAc;YACrB,WAAW,EAAE,qFAAqF;YAClG,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,mBAAmB,EAAE;YACnB,KAAK,EAAE,aAAa;YACpB,WAAW,EACT,gIAAgI;YAClI,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,eAAe,EAAE;YACf,KAAK,EAAE,iBAAiB;YACxB,WAAW,EACT,yNAAyN;YAC3N,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;SAChB;QACD,aAAa,EAAE;YACb,KAAK,EAAE,mBAAmB;YAC1B,WAAW,EAAE,oGAAoG;YACjH,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;SAChB;KACF;IAUD,OAAO,EAAE,GAAG,EAAE;QACZ,OAAM;IACR,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { RequestClient } from '@segment/actions-core';
|
|
2
|
+
import { CredsObj } from './types';
|
|
3
|
+
export declare function gen_random_id(length: number): string;
|
|
4
|
+
export declare function update_taxonomy(engage_space_id: string, tx_creds: CredsObj, request: RequestClient, body_form_data: string): Promise<any>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.update_taxonomy = exports.gen_random_id = void 0;
|
|
4
|
+
const utils_tax_1 = require("./utils-tax");
|
|
5
|
+
function gen_random_id(length) {
|
|
6
|
+
const pattern = 'abcdefghijklmnopqrstuvwxyz123456789';
|
|
7
|
+
const result = [];
|
|
8
|
+
for (let i = 0; i < length; i++) {
|
|
9
|
+
result.push(pattern[Math.floor(Math.random() * pattern.length)]);
|
|
10
|
+
}
|
|
11
|
+
return result.join('');
|
|
12
|
+
}
|
|
13
|
+
exports.gen_random_id = gen_random_id;
|
|
14
|
+
async function update_taxonomy(engage_space_id, tx_creds, request, body_form_data) {
|
|
15
|
+
const tx_client_secret = tx_creds.tx_client_key;
|
|
16
|
+
const tx_client_key = tx_creds.tx_client_secret;
|
|
17
|
+
const url = `https://datax.yahooapis.com/v1/taxonomy/append${engage_space_id.length > 0 ? '/' + engage_space_id : ''}`;
|
|
18
|
+
const oauth1_auth_string = utils_tax_1.gen_oauth1_signature(tx_client_key, tx_client_secret, 'PUT', url);
|
|
19
|
+
const add_segment_node = await request(url, {
|
|
20
|
+
method: 'PUT',
|
|
21
|
+
body: body_form_data,
|
|
22
|
+
headers: {
|
|
23
|
+
Authorization: oauth1_auth_string,
|
|
24
|
+
'Content-Type': 'multipart/form-data; boundary=SEGMENT-DATA'
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
return await add_segment_node.json();
|
|
28
|
+
}
|
|
29
|
+
exports.update_taxonomy = update_taxonomy;
|
|
30
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/destinations/yahoo-audiences/utils.ts"],"names":[],"mappings":";;;AAEA,2CAAkD;AAQlD,SAAgB,aAAa,CAAC,MAAc;IAC1C,MAAM,OAAO,GAAG,qCAAqC,CAAA;IACrD,MAAM,MAAM,GAAG,EAAE,CAAA;IACjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;QAC/B,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;KACjE;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxB,CAAC;AAPD,sCAOC;AAEM,KAAK,UAAU,eAAe,CACnC,eAAuB,EACvB,QAAkB,EAClB,OAAsB,EACtB,cAAsB;IAEtB,MAAM,gBAAgB,GAAG,QAAQ,CAAC,aAAa,CAAA;IAC/C,MAAM,aAAa,GAAG,QAAQ,CAAC,gBAAgB,CAAA;IAC/C,MAAM,GAAG,GAAG,iDAAiD,eAAe,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE,CAAA;IACtH,MAAM,kBAAkB,GAAG,gCAAoB,CAAC,aAAa,EAAE,gBAAgB,EAAE,KAAK,EAAE,GAAG,CAAC,CAAA;IAE5F,MAAM,gBAAgB,GAAG,MAAM,OAAO,CAAC,GAAG,EAAE;QAC1C,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,cAAc;QACpB,OAAO,EAAE;YACP,aAAa,EAAE,kBAAkB;YACjC,cAAc,EAAE,4CAA4C;SAC7D;KACF,CAAC,CAAA;IAEF,OAAO,MAAM,gBAAgB,CAAC,IAAI,EAAE,CAAA;AACtC,CAAC;AArBD,0CAqBC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@segment/action-destinations",
|
|
3
3
|
"description": "Destination Actions engine and definitions.",
|
|
4
|
-
"version": "3.227.4-staging.
|
|
4
|
+
"version": "3.227.4-staging.1",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/segmentio/action-destinations",
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/movable-ink/categoryView/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const 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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,20 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/movable-ink/conversion/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const 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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/movable-ink/conversion/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA0E;AAG1E,sCAUkB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-
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;
|
|
@@ -1,236 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,KAAK,EAAE,SAAS;IAChB,WAAW,EAAE,iEAAiE;IAC9E,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,KAAK;IACf,OAAO,EAAE,EAAE,O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EAAE,OAAO,EAAE,cAAc,EAAE;gBAC/B,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;gBAC5B,KAAK,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;gBAC7B,GAAG,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;gBACzB,QAAQ,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE;aACpC;SACF;KACF;CACF,CAAA;AAEY,QAAA,uBAAuB,GAAe;IACjD,GAAG,gBAAQ;IACX,QAAQ,EAAE,KAAK;CAChB,CAAA;AAEY,QAAA,UAAU,GAAe;IACpC,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,0BAA0B;IACvC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,eAAe,EAAE,UAAU;IAC3B,oBAAoB,EAAE,KAAK;IAC3B,UAAU,EAAE;QACV,EAAE,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,wCAAwC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QACnH,GAAG,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,yBAAyB,EAAE,IAAI,EAAE,QAAQ,EAAE;KACvF;IACD,OAAO,EAAE;QACP,YAAY,EAAE,CAAC,yBAAyB,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC;KAClG;CACF,CAAA;AAEY,QAAA,yBAAyB,GAAe;IACnD,GAAG,kBAAU;IACb,QAAQ,EAAE,KAAK;CAChB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/movable-ink/identify/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const actions_core_1 = require("@segment/actions-core");
|
|
4
|
-
const fields_1 = require("../fields");
|
|
5
|
-
const action = {
|
|
6
|
-
title: 'Identify',
|
|
7
|
-
description: 'Send an Identify event to Movable Ink, to assocate a userId with an anonymousId',
|
|
8
|
-
defaultSubscription: 'type = "identify"',
|
|
9
|
-
fields: {
|
|
10
|
-
movable_ink_url: fields_1.movable_ink_url,
|
|
11
|
-
user_id: fields_1.user_id,
|
|
12
|
-
anonymous_id: fields_1.anonymous_id,
|
|
13
|
-
timestamp: fields_1.timestamp,
|
|
14
|
-
timezone: fields_1.timezone
|
|
15
|
-
},
|
|
16
|
-
perform: (request, { settings, payload }) => {
|
|
17
|
-
const url = payload?.movable_ink_url ?? settings?.movable_ink_url;
|
|
18
|
-
if (!url)
|
|
19
|
-
throw new actions_core_1.IntegrationError('"Movable Ink URL" setting or "Movable Ink URL" field must be populated', 'MISSING_DESTINATION_URL', 400);
|
|
20
|
-
return request(url, {
|
|
21
|
-
method: 'POST',
|
|
22
|
-
json: {
|
|
23
|
-
user_id: payload.user_id,
|
|
24
|
-
anonymous_id: payload.anonymous_id,
|
|
25
|
-
timestamp: payload.timestamp,
|
|
26
|
-
timezone: payload.timezone
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
exports.default = action;
|
|
32
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/movable-ink/identify/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAG1E,sCAAuF;AAEvF,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,UAAU;IACjB,WAAW,EAAE,iFAAiF;IAC9F,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,eAAe,EAAf,wBAAe;QACf,OAAO,EAAP,gBAAO;QACP,YAAY,EAAZ,qBAAY;QACZ,SAAS,EAAT,kBAAS;QACT,QAAQ,EAAR,iBAAQ;KACT;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,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,YAAY,EAAE,OAAO,CAAC,YAAY;gBAClC,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,QAAQ,EAAE,OAAO,CAAC,QAAQ;aAC3B;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|
-
product_with_quantity: {
|
|
8
|
-
id: string;
|
|
9
|
-
title?: string;
|
|
10
|
-
price?: number;
|
|
11
|
-
url?: string;
|
|
12
|
-
quantity?: number;
|
|
13
|
-
[k: string]: unknown;
|
|
14
|
-
};
|
|
15
|
-
categories_required_false?: {
|
|
16
|
-
id: string;
|
|
17
|
-
url?: string;
|
|
18
|
-
}[];
|
|
19
|
-
meta?: {
|
|
20
|
-
[k: string]: unknown;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/movable-ink/productAdded/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const 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: 'Product Added',
|
|
11
|
-
description: 'Send a "Cart Add" event to Movable Ink',
|
|
12
|
-
defaultSubscription: 'type = "track" and event = "Product Added"',
|
|
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
|
-
product_with_quantity: fields_1.product_with_quantity,
|
|
20
|
-
categories_required_false: fields_1.categories_required_false,
|
|
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: 'Cart Add',
|
|
31
|
-
user_id: payload.user_id,
|
|
32
|
-
anonymous_id: payload.anonymous_id,
|
|
33
|
-
timestamp: payload.timestamp,
|
|
34
|
-
timezone: payload.timezone,
|
|
35
|
-
product: payload.product_with_quantity,
|
|
36
|
-
categories: payload.categories_required_false,
|
|
37
|
-
metadata: { ...omit_1.default(payload.meta, ['product', 'categories']) }
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
exports.default = action;
|
|
43
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/movable-ink/productAdded/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA0E;AAG1E,sCASkB;AAClB,uDAA8B;AAE9B,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,wCAAwC;IACrD,mBAAmB,EAAE,4CAA4C;IACjE,MAAM,EAAE;QACN,eAAe,EAAf,wBAAe;QACf,OAAO,EAAP,gBAAO;QACP,YAAY,EAAZ,qBAAY;QACZ,SAAS,EAAT,kBAAS;QACT,QAAQ,EAAR,iBAAQ;QACR,qBAAqB,EAArB,8BAAqB;QACrB,yBAAyB,EAAzB,kCAAyB;QACzB,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,UAAU;gBACtB,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,qBAAqB;gBACtC,UAAU,EAAE,OAAO,CAAC,yBAAyB;gBAC7C,QAAQ,EAAE,EAAE,GAAG,cAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,EAAE;aAC/D;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,21 +0,0 @@
|
|
|
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
|
-
product: {
|
|
8
|
-
id: string;
|
|
9
|
-
title?: string;
|
|
10
|
-
price?: number;
|
|
11
|
-
url?: string;
|
|
12
|
-
[k: string]: unknown;
|
|
13
|
-
};
|
|
14
|
-
categories_required_false?: {
|
|
15
|
-
id: string;
|
|
16
|
-
url?: string;
|
|
17
|
-
}[];
|
|
18
|
-
meta?: {
|
|
19
|
-
[k: string]: unknown;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/movable-ink/productViewed/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const 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: 'Product Viewed',
|
|
11
|
-
description: 'Send a "Product Viewed" event to Movable Ink',
|
|
12
|
-
defaultSubscription: 'type = "track" and event = "Product 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
|
-
product: fields_1.product,
|
|
20
|
-
categories_required_false: fields_1.categories_required_false,
|
|
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: 'Product Viewed',
|
|
31
|
-
user_id: payload.user_id,
|
|
32
|
-
anonymous_id: payload.anonymous_id,
|
|
33
|
-
timestamp: payload.timestamp,
|
|
34
|
-
timezone: payload.timezone,
|
|
35
|
-
product: payload.product,
|
|
36
|
-
categories: payload.categories_required_false,
|
|
37
|
-
metadata: { ...omit_1.default(payload.meta, ['product', 'categories']) }
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
exports.default = action;
|
|
43
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/movable-ink/productViewed/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA0E;AAG1E,sCASkB;AAClB,uDAA8B;AAE9B,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,8CAA8C;IAC3D,mBAAmB,EAAE,6CAA6C;IAClE,MAAM,EAAE;QACN,eAAe,EAAf,wBAAe;QACf,OAAO,EAAP,gBAAO;QACP,YAAY,EAAZ,qBAAY;QACZ,SAAS,EAAT,kBAAS;QACT,QAAQ,EAAR,iBAAQ;QACR,OAAO,EAAP,gBAAO;QACP,yBAAyB,EAAzB,kCAAyB;QACzB,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,gBAAgB;gBAC5B,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,OAAO;gBACxB,UAAU,EAAE,OAAO,CAAC,yBAAyB;gBAC7C,QAAQ,EAAE,EAAE,GAAG,cAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,EAAE;aAC/D;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/movable-ink/search/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const 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: 'Search',
|
|
11
|
-
description: 'Send a "Search" event to Movable Ink',
|
|
12
|
-
defaultSubscription: 'type = "track" and event = "Products Searched"',
|
|
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
|
-
query: fields_1.query,
|
|
20
|
-
query_url: fields_1.query_url,
|
|
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: 'Search',
|
|
31
|
-
user_id: payload.user_id,
|
|
32
|
-
anonymous_id: payload.anonymous_id,
|
|
33
|
-
timestamp: payload.timestamp,
|
|
34
|
-
timezone: payload.timezone,
|
|
35
|
-
query: payload.query,
|
|
36
|
-
url: payload.query_url,
|
|
37
|
-
metadata: { ...omit_1.default(payload.meta, ['query', 'url']) }
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
exports.default = action;
|
|
43
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/movable-ink/search/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA0E;AAG1E,sCAA+G;AAC/G,uDAA8B;AAE9B,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,sCAAsC;IACnD,mBAAmB,EAAE,gDAAgD;IACrE,MAAM,EAAE;QACN,eAAe,EAAf,wBAAe;QACf,OAAO,EAAP,gBAAO;QACP,YAAY,EAAZ,qBAAY;QACZ,SAAS,EAAT,kBAAS;QACT,QAAQ,EAAR,iBAAQ;QACR,KAAK,EAAL,cAAK;QACL,SAAS,EAAT,kBAAS;QACT,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,QAAQ;gBACpB,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,YAAY,EAAE,OAAO,CAAC,YAAY;gBAClC,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,QAAQ,EAAE,OAAO,CAAC,QAAQ;gBAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,GAAG,EAAE,OAAO,CAAC,SAAS;gBACtB,QAAQ,EAAE,EAAE,GAAG,cAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,EAAE;aACtD;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export interface Payload {
|
|
2
|
-
movable_ink_url?: string;
|
|
3
|
-
event_name: string;
|
|
4
|
-
user_id?: string;
|
|
5
|
-
anonymous_id?: string;
|
|
6
|
-
timestamp: string | number;
|
|
7
|
-
timezone?: string;
|
|
8
|
-
products_required_false?: {
|
|
9
|
-
id: string;
|
|
10
|
-
title?: string;
|
|
11
|
-
price?: number;
|
|
12
|
-
url?: string;
|
|
13
|
-
quantity?: number;
|
|
14
|
-
[k: string]: unknown;
|
|
15
|
-
}[];
|
|
16
|
-
categories_required_false?: {
|
|
17
|
-
id: string;
|
|
18
|
-
url?: string;
|
|
19
|
-
}[];
|
|
20
|
-
order_id_required_false?: string;
|
|
21
|
-
revenue_required_false?: number;
|
|
22
|
-
meta?: {
|
|
23
|
-
[k: string]: unknown;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/movable-ink/sendCustomEvent/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const 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: 'Send Custom Event',
|
|
11
|
-
description: 'Send a Custom Segment event to Movable Ink',
|
|
12
|
-
defaultSubscription: 'type = "track"',
|
|
13
|
-
fields: {
|
|
14
|
-
movable_ink_url: fields_1.movable_ink_url,
|
|
15
|
-
event_name: fields_1.event_name,
|
|
16
|
-
user_id: fields_1.user_id,
|
|
17
|
-
anonymous_id: fields_1.anonymous_id,
|
|
18
|
-
timestamp: fields_1.timestamp,
|
|
19
|
-
timezone: fields_1.timezone,
|
|
20
|
-
products_required_false: fields_1.products_required_false,
|
|
21
|
-
categories_required_false: fields_1.categories_required_false,
|
|
22
|
-
order_id_required_false: fields_1.order_id_required_false,
|
|
23
|
-
revenue_required_false: fields_1.revenue_required_false,
|
|
24
|
-
meta: fields_1.meta
|
|
25
|
-
},
|
|
26
|
-
perform: (request, { settings, payload }) => {
|
|
27
|
-
const url = payload?.movable_ink_url ?? settings?.movable_ink_url;
|
|
28
|
-
if (!url)
|
|
29
|
-
throw new actions_core_1.IntegrationError('"Movable Ink URL" setting or "Movable Ink URL" field must be populated', 'MISSING_DESTINATION_URL', 400);
|
|
30
|
-
return request(url, {
|
|
31
|
-
method: 'POST',
|
|
32
|
-
json: {
|
|
33
|
-
event_name: payload.event_name,
|
|
34
|
-
user_id: payload.user_id,
|
|
35
|
-
anonymous_id: payload.anonymous_id,
|
|
36
|
-
timestamp: payload.timestamp,
|
|
37
|
-
timezone: payload.timezone,
|
|
38
|
-
products: payload.products_required_false,
|
|
39
|
-
categories: payload.categories_required_false,
|
|
40
|
-
order_id: payload.order_id_required_false,
|
|
41
|
-
revenue: payload.revenue_required_false,
|
|
42
|
-
metadata: { ...omit_1.default(payload.meta, ['products', 'categories', 'order_id', 'revenue']) }
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
exports.default = action;
|
|
48
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/movable-ink/sendCustomEvent/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA0E;AAG1E,sCAYkB;AAClB,uDAA8B;AAE9B,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EAAE,4CAA4C;IACzD,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,eAAe,EAAf,wBAAe;QACf,UAAU,EAAV,mBAAU;QACV,OAAO,EAAP,gBAAO;QACP,YAAY,EAAZ,qBAAY;QACZ,SAAS,EAAT,kBAAS;QACT,QAAQ,EAAR,iBAAQ;QACR,uBAAuB,EAAvB,gCAAuB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