@segment/action-destinations 3.168.0 → 3.170.0
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/acoustic/Utility/eventprocessing.js +18 -18
- package/dist/destinations/acoustic/Utility/eventprocessing.js.map +1 -1
- package/dist/destinations/airship/customEvents/generated-types.d.ts +9 -0
- package/dist/destinations/airship/customEvents/generated-types.js +3 -0
- package/dist/destinations/airship/customEvents/generated-types.js.map +1 -0
- package/dist/destinations/airship/customEvents/index.d.ts +5 -0
- package/dist/destinations/airship/customEvents/index.js +59 -0
- package/dist/destinations/airship/customEvents/index.js.map +1 -0
- package/dist/destinations/airship/generated-types.d.ts +5 -0
- package/dist/destinations/airship/generated-types.js +3 -0
- package/dist/destinations/airship/generated-types.js.map +1 -0
- package/dist/destinations/airship/index.d.ts +4 -0
- package/dist/destinations/airship/index.js +97 -0
- package/dist/destinations/airship/index.js.map +1 -0
- package/dist/destinations/airship/manageTags/generated-types.d.ts +7 -0
- package/dist/destinations/airship/manageTags/generated-types.js +3 -0
- package/dist/destinations/airship/manageTags/generated-types.js.map +1 -0
- package/dist/destinations/airship/manageTags/index.d.ts +5 -0
- package/dist/destinations/airship/manageTags/index.js +38 -0
- package/dist/destinations/airship/manageTags/index.js.map +1 -0
- package/dist/destinations/airship/setAttributes/generated-types.d.ts +30 -0
- package/dist/destinations/airship/setAttributes/generated-types.js +3 -0
- package/dist/destinations/airship/setAttributes/generated-types.js.map +1 -0
- package/dist/destinations/airship/setAttributes/index.d.ts +5 -0
- package/dist/destinations/airship/setAttributes/index.js +182 -0
- package/dist/destinations/airship/setAttributes/index.js.map +1 -0
- package/dist/destinations/airship/utilities.d.ts +28 -0
- package/dist/destinations/airship/utilities.js +146 -0
- package/dist/destinations/airship/utilities.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/addToCart/generated-types.d.ts +21 -0
- package/dist/destinations/facebook-conversions-api/addToCart/index.js +3 -0
- package/dist/destinations/facebook-conversions-api/addToCart/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/custom/generated-types.d.ts +21 -0
- package/dist/destinations/facebook-conversions-api/custom/index.js +3 -0
- package/dist/destinations/facebook-conversions-api/custom/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/fb-capi-app-data.d.ts +10 -0
- package/dist/destinations/facebook-conversions-api/fb-capi-app-data.js +179 -0
- package/dist/destinations/facebook-conversions-api/fb-capi-app-data.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/index.js +1 -1
- package/dist/destinations/facebook-conversions-api/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/initiateCheckout/generated-types.d.ts +21 -0
- package/dist/destinations/facebook-conversions-api/initiateCheckout/index.js +3 -0
- package/dist/destinations/facebook-conversions-api/initiateCheckout/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/pageView/generated-types.d.ts +21 -0
- package/dist/destinations/facebook-conversions-api/pageView/index.js +3 -0
- package/dist/destinations/facebook-conversions-api/pageView/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/purchase/generated-types.d.ts +21 -0
- package/dist/destinations/facebook-conversions-api/purchase/index.js +3 -0
- package/dist/destinations/facebook-conversions-api/purchase/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/search/generated-types.d.ts +21 -0
- package/dist/destinations/facebook-conversions-api/search/index.js +3 -0
- package/dist/destinations/facebook-conversions-api/search/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/viewContent/generated-types.d.ts +21 -0
- package/dist/destinations/facebook-conversions-api/viewContent/index.js +3 -0
- package/dist/destinations/facebook-conversions-api/viewContent/index.js.map +1 -1
- package/dist/destinations/fullstory/index.js +1 -1
- package/dist/destinations/fullstory/index.js.map +1 -1
- package/dist/destinations/heap/identifyUser/index.js +0 -3
- package/dist/destinations/heap/identifyUser/index.js.map +1 -1
- package/dist/destinations/heap/trackEvent/index.js +0 -3
- package/dist/destinations/heap/trackEvent/index.js.map +1 -1
- package/dist/destinations/index.js +2 -0
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/livelike-cloud/trackEvent/index.js +0 -3
- package/dist/destinations/livelike-cloud/trackEvent/index.js.map +1 -1
- package/dist/destinations/noop/generated-types.d.ts +2 -0
- package/dist/destinations/noop/generated-types.js +3 -0
- package/dist/destinations/noop/generated-types.js.map +1 -0
- package/dist/destinations/noop/index.d.ts +4 -0
- package/dist/destinations/noop/index.js +27 -0
- package/dist/destinations/noop/index.js.map +1 -0
- package/dist/destinations/noop/noop/generated-types.d.ts +3 -0
- package/dist/destinations/noop/noop/generated-types.js +3 -0
- package/dist/destinations/noop/noop/generated-types.js.map +1 -0
- package/dist/destinations/noop/noop/index.d.ts +5 -0
- package/dist/destinations/noop/noop/index.js +19 -0
- package/dist/destinations/noop/noop/index.js.map +1 -0
- package/dist/destinations/usermaven/common-definitions.js +1 -1
- package/dist/destinations/usermaven/common-definitions.js.map +1 -1
- package/dist/destinations/usermaven/generated-types.d.ts +1 -0
- package/dist/destinations/usermaven/group/generated-types.d.ts +1 -1
- package/dist/destinations/usermaven/identify/generated-types.d.ts +1 -1
- package/dist/destinations/usermaven/index.js +10 -1
- package/dist/destinations/usermaven/index.js.map +1 -1
- package/dist/destinations/usermaven/page/generated-types.d.ts +1 -1
- package/dist/destinations/usermaven/request-params.js +4 -3
- package/dist/destinations/usermaven/request-params.js.map +1 -1
- package/dist/destinations/usermaven/track/generated-types.d.ts +1 -1
- package/package.json +4 -4
|
@@ -32,24 +32,6 @@ function addUpdateEvents(payload, email, limit) {
|
|
|
32
32
|
let xmlRows = '';
|
|
33
33
|
const eventSource = get_1.default(payload, 'type', 'Null') + ' Event';
|
|
34
34
|
const timestamp = get_1.default(payload, 'timestamp', 'Null');
|
|
35
|
-
if (get_1.default(payload, 'context.personas.computation_class', 'Null') === 'audience') {
|
|
36
|
-
const ak = get_1.default(payload, 'context.personas.computation_key', 'Null');
|
|
37
|
-
const av = `properties.${ak}`;
|
|
38
|
-
const audiStatus = get_1.default(payload, av, 'Null');
|
|
39
|
-
if (audiStatus)
|
|
40
|
-
eventValue = 'Audience Entered';
|
|
41
|
-
if (!audiStatus)
|
|
42
|
-
eventValue = 'Audience Exited';
|
|
43
|
-
eventName = ak;
|
|
44
|
-
xmlRows += `
|
|
45
|
-
<ROW>
|
|
46
|
-
<COLUMN name="EMAIL"> <![CDATA[${email}]]></COLUMN>
|
|
47
|
-
<COLUMN name="EventSource"> <![CDATA[${eventSource}]]></COLUMN>
|
|
48
|
-
<COLUMN name="EventName"> <![CDATA[${eventName}]]></COLUMN>
|
|
49
|
-
<COLUMN name="EventValue"> <![CDATA[${eventValue}]]></COLUMN>
|
|
50
|
-
<COLUMN name="Event Timestamp"> <![CDATA[${timestamp}]]></COLUMN>
|
|
51
|
-
</ROW>`;
|
|
52
|
-
}
|
|
53
35
|
let propertiesTraitsKV = {};
|
|
54
36
|
if (payload.traits)
|
|
55
37
|
propertiesTraitsKV = {
|
|
@@ -70,6 +52,24 @@ function addUpdateEvents(payload, email, limit) {
|
|
|
70
52
|
throw new actions_core_1.IntegrationError('Properties Exceed Max. Use Mapping to limit the number of Attributes (Properties, Traits) present and thereby reduce the Campaign Relational Table Rows consumed.', 'EXCEEDS_MAX_PROPERTIES_MAX', 400);
|
|
71
53
|
return;
|
|
72
54
|
}
|
|
55
|
+
if (get_1.default(payload, 'context.personas.computation_class', 'Null') === 'audience') {
|
|
56
|
+
const ak = get_1.default(payload, 'context.personas.computation_key', 'Null');
|
|
57
|
+
const av = `properties.${ak}`;
|
|
58
|
+
const audiStatus = get_1.default(payload, av, 'Null');
|
|
59
|
+
if (audiStatus)
|
|
60
|
+
eventValue = 'Audience Entered';
|
|
61
|
+
if (!audiStatus)
|
|
62
|
+
eventValue = 'Audience Exited';
|
|
63
|
+
eventName = ak;
|
|
64
|
+
xmlRows += `
|
|
65
|
+
<ROW>
|
|
66
|
+
<COLUMN name="EMAIL"> <![CDATA[${email}]]></COLUMN>
|
|
67
|
+
<COLUMN name="EventSource"> <![CDATA[${eventSource}]]></COLUMN>
|
|
68
|
+
<COLUMN name="EventName"> <![CDATA[${eventName}]]></COLUMN>
|
|
69
|
+
<COLUMN name="EventValue"> <![CDATA[${eventValue}]]></COLUMN>
|
|
70
|
+
<COLUMN name="Event Timestamp"> <![CDATA[${timestamp}]]></COLUMN>
|
|
71
|
+
</ROW>`;
|
|
72
|
+
}
|
|
73
73
|
for (const e in propertiesTraitsKV) {
|
|
74
74
|
const eventName = e;
|
|
75
75
|
const eventValue = propertiesTraitsKV[e];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventprocessing.js","sourceRoot":"","sources":["../../../../src/destinations/acoustic/Utility/eventprocessing.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAwD;AAExD,qDAA4B;AAG5B,+DAAwD;AAGxD,SAAgB,aAAa,CAAC,OAAkC,EAAE,SAAiB;IACjF,MAAM,YAAY,GAA8B,EAAE,CAAA;IAElD,IAAI,SAAS,GAAG,EAAE;QAChB,MAAM,IAAI,+BAAgB,CACxB,0GAA0G,EAC1G,wBAAwB,EACxB,GAAG,CACJ,CAAA;IAEH,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;QACtC,IAAI,OAAO,OAAO,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE;YACpC,SAAS,EAAE,CAAA;YACX,MAAM,MAAM,GAA8B,aAAa,CACrD,OAAO,CAAC,GAAG,CAAoC,EAC/C,SAAS,CACV,CAAA;YACD,KAAK,MAAM,SAAS,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;gBAC3C,YAAY,CAAC,GAAG,GAAG,IAAI,SAAS,EAAE,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC,CAAA;aACxD;SACF;aAAM;YACL,YAAY,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;SACjC;KACF;IACD,OAAO,YAAY,CAAA;AACrB,CAAC;AAzBD,sCAyBC;AAED,SAAgB,eAAe,CAAC,OAAgB,EAAE,KAAa,EAAE,KAAa;IAC5E,IAAI,SAAS,GAAG,EAAE,CAAA;IAClB,IAAI,UAAU,GAAG,EAAE,CAAA;IACnB,IAAI,OAAO,GAAG,EAAE,CAAA;IAGhB,MAAM,WAAW,GAAG,aAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,QAAQ,CAAA;IAI3D,MAAM,SAAS,GAAG,aAAG,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"eventprocessing.js","sourceRoot":"","sources":["../../../../src/destinations/acoustic/Utility/eventprocessing.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAwD;AAExD,qDAA4B;AAG5B,+DAAwD;AAGxD,SAAgB,aAAa,CAAC,OAAkC,EAAE,SAAiB;IACjF,MAAM,YAAY,GAA8B,EAAE,CAAA;IAElD,IAAI,SAAS,GAAG,EAAE;QAChB,MAAM,IAAI,+BAAgB,CACxB,0GAA0G,EAC1G,wBAAwB,EACxB,GAAG,CACJ,CAAA;IAEH,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;QACtC,IAAI,OAAO,OAAO,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE;YACpC,SAAS,EAAE,CAAA;YACX,MAAM,MAAM,GAA8B,aAAa,CACrD,OAAO,CAAC,GAAG,CAAoC,EAC/C,SAAS,CACV,CAAA;YACD,KAAK,MAAM,SAAS,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;gBAC3C,YAAY,CAAC,GAAG,GAAG,IAAI,SAAS,EAAE,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC,CAAA;aACxD;SACF;aAAM;YACL,YAAY,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;SACjC;KACF;IACD,OAAO,YAAY,CAAA;AACrB,CAAC;AAzB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generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/airship/customEvents/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utilities_1 = require("../utilities");
|
|
4
|
+
const action = {
|
|
5
|
+
title: 'Custom Events',
|
|
6
|
+
description: 'Set Custom Events on Users',
|
|
7
|
+
defaultSubscription: 'type = "track"',
|
|
8
|
+
fields: {
|
|
9
|
+
named_user_id: {
|
|
10
|
+
label: 'Airship Named User ID',
|
|
11
|
+
description: 'The identifier assigned in Airship as the Named User',
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true,
|
|
14
|
+
default: {
|
|
15
|
+
'@path': '$.userId'
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
name: {
|
|
19
|
+
label: 'Name',
|
|
20
|
+
description: 'Event Name',
|
|
21
|
+
type: 'string',
|
|
22
|
+
required: true,
|
|
23
|
+
default: {
|
|
24
|
+
'@path': '$.event'
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
occurred: {
|
|
28
|
+
label: 'Occurred',
|
|
29
|
+
description: 'When the event occurred.',
|
|
30
|
+
type: 'datetime',
|
|
31
|
+
required: true,
|
|
32
|
+
default: {
|
|
33
|
+
'@path': '$.timestamp'
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
properties: {
|
|
37
|
+
label: 'Event Properties',
|
|
38
|
+
description: 'Properties of the event',
|
|
39
|
+
type: 'object',
|
|
40
|
+
default: {
|
|
41
|
+
'@path': '$.properties'
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
enable_batching: {
|
|
45
|
+
type: 'boolean',
|
|
46
|
+
label: 'Batch Data to Airship',
|
|
47
|
+
description: 'If true, Segment will batch events before sending to Airship. Limit 100 events per request.',
|
|
48
|
+
default: false
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
perform: (request, { settings, payload }) => {
|
|
52
|
+
return utilities_1.setCustomEvent(request, settings, payload);
|
|
53
|
+
},
|
|
54
|
+
performBatch: (request, { settings, payload }) => {
|
|
55
|
+
return utilities_1.setBatchCustomEvent(request, settings, payload);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
exports.default = action;
|
|
59
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/airship/customEvents/index.ts"],"names":[],"mappings":";;AAGA,4CAAkE;AAElE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,4BAA4B;IACzC,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,aAAa,EAAE;YACb,KAAK,EAAE,uBAAuB;YAC9B,WAAW,EAAE,sDAAsD;YACnE,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,YAAY;YACzB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,SAAS;aACnB;SACF;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,UAAU;YACjB,WAAW,EAAE,0BAA0B;YACvC,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,aAAa;aACvB;SACF;QACD,UAAU,EAAE;YACV,KAAK,EAAE,kBAAkB;YACzB,WAAW,EAAE,yBAAyB;YACtC,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,cAAc;aACxB;SACF;QACD,eAAe,EAAE;YACf,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,uBAAuB;YAC9B,WAAW,EAAE,6FAA6F;YAC1G,OAAO,EAAE,KAAK;SACf;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAC1C,OAAO,0BAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;IACnD,CAAC;IACD,YAAY,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAC/C,OAAO,+BAAmB,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;IACxD,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/airship/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,97 @@
|
|
|
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 customEvents_1 = __importDefault(require("./customEvents"));
|
|
8
|
+
const setAttributes_1 = __importDefault(require("./setAttributes"));
|
|
9
|
+
const manageTags_1 = __importDefault(require("./manageTags"));
|
|
10
|
+
const utilities_1 = require("./utilities");
|
|
11
|
+
const destination = {
|
|
12
|
+
name: 'Airship (Actions)',
|
|
13
|
+
slug: 'actions-airship',
|
|
14
|
+
mode: 'cloud',
|
|
15
|
+
description: 'Send events from Segment to Airship for message triggering, audience targeting, personalization, and analytics.',
|
|
16
|
+
authentication: {
|
|
17
|
+
scheme: 'custom',
|
|
18
|
+
fields: {
|
|
19
|
+
access_token: {
|
|
20
|
+
label: 'Access Token',
|
|
21
|
+
description: 'Create in the Airship Go dashboard in Settings->Partner Integrations->Segment',
|
|
22
|
+
type: 'password',
|
|
23
|
+
required: true
|
|
24
|
+
},
|
|
25
|
+
app_key: {
|
|
26
|
+
label: 'App Key',
|
|
27
|
+
description: 'The App Key identifies the Airship Project to which API requests are made.',
|
|
28
|
+
type: 'string',
|
|
29
|
+
required: true
|
|
30
|
+
},
|
|
31
|
+
endpoint: {
|
|
32
|
+
label: 'Data Center',
|
|
33
|
+
description: 'US or EU',
|
|
34
|
+
type: 'string',
|
|
35
|
+
choices: [
|
|
36
|
+
{ label: 'US', value: 'US' },
|
|
37
|
+
{ label: 'EU', value: 'EU' }
|
|
38
|
+
],
|
|
39
|
+
default: 'US',
|
|
40
|
+
required: true
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
testAuthentication: (request, { settings }) => {
|
|
44
|
+
const endpoint = utilities_1.map_endpoint(settings.endpoint);
|
|
45
|
+
return request(`${endpoint}/api/custom-events/`, {
|
|
46
|
+
method: 'post',
|
|
47
|
+
json: {
|
|
48
|
+
body: {
|
|
49
|
+
name: 'test_segment_auth'
|
|
50
|
+
},
|
|
51
|
+
user: {
|
|
52
|
+
named_user_id: '549ce761-56c9-4899-9026-816d0c3bffd1'
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
presets: [
|
|
59
|
+
{
|
|
60
|
+
name: 'Custom Events',
|
|
61
|
+
subscribe: 'type = "track"',
|
|
62
|
+
partnerAction: 'customEvents',
|
|
63
|
+
mapping: actions_core_1.defaultValues(customEvents_1.default.fields)
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'Set Attributes',
|
|
67
|
+
subscribe: 'type = "identify"',
|
|
68
|
+
partnerAction: 'setAttributes',
|
|
69
|
+
mapping: actions_core_1.defaultValues(setAttributes_1.default.fields)
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
onDelete: async (request, { settings, payload }) => {
|
|
73
|
+
return request(`${settings.endpoint}/api/named_users/uninstall`, {
|
|
74
|
+
method: 'post',
|
|
75
|
+
json: {
|
|
76
|
+
named_user_id: [payload.userId]
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
},
|
|
80
|
+
extendRequest({ settings }) {
|
|
81
|
+
return {
|
|
82
|
+
headers: {
|
|
83
|
+
Authorization: `Bearer ${settings.access_token}`,
|
|
84
|
+
'X-UA-Appkey': `${settings.app_key}`,
|
|
85
|
+
Accept: 'application/vnd.urbanairship+json; version=3',
|
|
86
|
+
'Content-Type': 'application/json'
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
},
|
|
90
|
+
actions: {
|
|
91
|
+
customEvents: customEvents_1.default,
|
|
92
|
+
setAttributes: setAttributes_1.default,
|
|
93
|
+
manageTags: manageTags_1.default
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
exports.default = destination;
|
|
97
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/airship/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA4E;AAG5E,kEAAyC;AAEzC,oEAA2C;AAE3C,8DAAqC;AAErC,2CAA0C;AAE1C,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE,OAAO;IACb,WAAW,EACT,iHAAiH;IACnH,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,YAAY,EAAE;gBACZ,KAAK,EAAE,cAAc;gBACrB,WAAW,EAAE,+EAA+E;gBAC5F,IAAI,EAAE,UAAU;gBAEhB,QAAQ,EAAE,IAAI;aACf;YACD,OAAO,EAAE;gBACP,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,4EAA4E;gBACzF,IAAI,EAAE,QAAQ;gBAEd,QAAQ,EAAE,IAAI;aACf;YACD,QAAQ,EAAE;gBACR,KAAK,EAAE,aAAa;gBACpB,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,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OAAO;YACL,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,QAAQ,CAAC,YAAY,EAAE;gBAChD,aAAa,EAAE,GAAG,QAAQ,CAAC,OAAO,EAAE;gBACpC,MAAM,EAAE,8CAA8C;gBACtD,cAAc,EAAE,kBAAkB;aACnC;SACF,CAAA;IACH,CAAC;IACD,OAAO,EAAE;QACP,YAAY,EAAZ,sBAAY;QACZ,aAAa,EAAb,uBAAa;QACb,UAAU,EAAV,oBAAU;KACX;CACF,CAAA;AACD,kBAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/airship/manageTags/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utilities_1 = require("../utilities");
|
|
4
|
+
const action = {
|
|
5
|
+
title: 'Manage Tags',
|
|
6
|
+
description: 'Associate tags with users in your audience for segmentation and automation',
|
|
7
|
+
fields: {
|
|
8
|
+
named_user_id: {
|
|
9
|
+
label: 'Airship Named User ID',
|
|
10
|
+
description: 'The identifier assigned in Airship as the Named User',
|
|
11
|
+
type: 'string',
|
|
12
|
+
required: true,
|
|
13
|
+
default: {
|
|
14
|
+
'@path': '$.userId'
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
tags: {
|
|
18
|
+
label: 'Tag Name',
|
|
19
|
+
description: 'Tag name to add or remove. Values for each tag should be boolean only. A true value creates a tag, a false value removes a tag. Non-boolean values will be ignored.',
|
|
20
|
+
type: 'object',
|
|
21
|
+
default: {
|
|
22
|
+
'@path': '$.traits.airship_tags'
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
tag_group: {
|
|
26
|
+
label: 'Tag Group',
|
|
27
|
+
description: 'The Tag Group to sync your tags to. This defaults to`segment-integration` but can be overridden with this field. Note: the Tag Group used must be valid and exist in Airship.',
|
|
28
|
+
type: 'string',
|
|
29
|
+
required: true,
|
|
30
|
+
default: 'segment-integration'
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
perform: (request, { settings, payload }) => {
|
|
34
|
+
return utilities_1.manageTags(request, settings, payload);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
exports.default = action;
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/airship/manageTags/index.ts"],"names":[],"mappings":";;AAGA,4CAAyC;AAEzC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,4EAA4E;IACzF,MAAM,EAAE;QACN,aAAa,EAAE;YACb,KAAK,EAAE,uBAAuB;YAC9B,WAAW,EAAE,sDAAsD;YACnE,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,UAAU;YACjB,WAAW,EACT,qKAAqK;YACvK,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,uBAAuB;aACjC;SACF;QACD,SAAS,EAAE;YACT,KAAK,EAAE,WAAW;YAClB,WAAW,EACT,+KAA+K;YACjL,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,qBAAqB;SAC/B;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAC1C,OAAO,sBAAU,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;IAC/C,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
named_user_id: string;
|
|
3
|
+
occurred: string | number;
|
|
4
|
+
attributes?: {
|
|
5
|
+
title?: string;
|
|
6
|
+
first_name?: string;
|
|
7
|
+
last_name?: string;
|
|
8
|
+
full_name?: string;
|
|
9
|
+
gender?: string;
|
|
10
|
+
zipcode?: number;
|
|
11
|
+
city?: string;
|
|
12
|
+
region?: string;
|
|
13
|
+
country?: string;
|
|
14
|
+
birthdate?: string | number;
|
|
15
|
+
age?: number;
|
|
16
|
+
mobile_phone?: number;
|
|
17
|
+
home_phone?: number;
|
|
18
|
+
work_phone?: number;
|
|
19
|
+
loyalty_tier?: string;
|
|
20
|
+
company?: string;
|
|
21
|
+
username?: string;
|
|
22
|
+
account_creation?: string | number;
|
|
23
|
+
email?: string;
|
|
24
|
+
altitude?: number;
|
|
25
|
+
latitude?: number;
|
|
26
|
+
longitude?: number;
|
|
27
|
+
advertising_id?: string;
|
|
28
|
+
[k: string]: unknown;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/airship/setAttributes/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utilities_1 = require("../utilities");
|
|
4
|
+
const action = {
|
|
5
|
+
title: 'Set Attributes',
|
|
6
|
+
defaultSubscription: 'type = "identify"',
|
|
7
|
+
description: 'Set user attributes in Airship with data from Segment. Some common user attributes are predefined in the attributes field, however note that all must be created in Airship before use. More information here: https://docs.airship.com/guides/messaging/user-guide/audience/segmentation/attributes/project/#adding-attributes',
|
|
8
|
+
fields: {
|
|
9
|
+
named_user_id: {
|
|
10
|
+
label: 'Airship Named User ID',
|
|
11
|
+
description: 'The identifier assigned in Airship as the Named User',
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true,
|
|
14
|
+
default: {
|
|
15
|
+
'@path': '$.userId'
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
occurred: {
|
|
19
|
+
label: 'Occurred',
|
|
20
|
+
description: 'When the Trait was set',
|
|
21
|
+
type: 'datetime',
|
|
22
|
+
required: true,
|
|
23
|
+
default: {
|
|
24
|
+
'@path': '$.timestamp'
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
attributes: {
|
|
28
|
+
label: 'Attributes',
|
|
29
|
+
description: 'User Attributes. Attributes should exist in Airship in order to be set, including the predifined ones defaulted here.',
|
|
30
|
+
type: 'object',
|
|
31
|
+
additionalProperties: true,
|
|
32
|
+
defaultObjectUI: 'keyvalue',
|
|
33
|
+
properties: {
|
|
34
|
+
title: {
|
|
35
|
+
label: 'Title',
|
|
36
|
+
type: 'string',
|
|
37
|
+
description: 'Title (Mr, Mrs, Professor, ...'
|
|
38
|
+
},
|
|
39
|
+
first_name: {
|
|
40
|
+
label: 'First Name',
|
|
41
|
+
type: 'string',
|
|
42
|
+
description: "The user's first name."
|
|
43
|
+
},
|
|
44
|
+
last_name: {
|
|
45
|
+
label: 'Last Name',
|
|
46
|
+
type: 'string',
|
|
47
|
+
description: "The user's last name."
|
|
48
|
+
},
|
|
49
|
+
full_name: {
|
|
50
|
+
label: 'Full Name',
|
|
51
|
+
type: 'string',
|
|
52
|
+
description: "The user's full name."
|
|
53
|
+
},
|
|
54
|
+
gender: {
|
|
55
|
+
label: 'Gender',
|
|
56
|
+
type: 'string',
|
|
57
|
+
description: "The user's gender."
|
|
58
|
+
},
|
|
59
|
+
zipcode: {
|
|
60
|
+
label: 'Zipcode',
|
|
61
|
+
type: 'integer',
|
|
62
|
+
description: "The user's zipcode."
|
|
63
|
+
},
|
|
64
|
+
city: {
|
|
65
|
+
label: 'City',
|
|
66
|
+
type: 'string',
|
|
67
|
+
description: "The user's city."
|
|
68
|
+
},
|
|
69
|
+
region: {
|
|
70
|
+
label: 'Region',
|
|
71
|
+
type: 'string',
|
|
72
|
+
description: "The user's region."
|
|
73
|
+
},
|
|
74
|
+
country: {
|
|
75
|
+
label: 'Country',
|
|
76
|
+
type: 'string',
|
|
77
|
+
description: "The user's country."
|
|
78
|
+
},
|
|
79
|
+
birthdate: {
|
|
80
|
+
label: 'Birthdate',
|
|
81
|
+
type: 'datetime',
|
|
82
|
+
description: "The user's birthdate."
|
|
83
|
+
},
|
|
84
|
+
age: {
|
|
85
|
+
label: 'Age',
|
|
86
|
+
type: 'integer',
|
|
87
|
+
description: "The user's age in years."
|
|
88
|
+
},
|
|
89
|
+
mobile_phone: {
|
|
90
|
+
label: 'Mobile Phone Number',
|
|
91
|
+
type: 'integer',
|
|
92
|
+
description: "The user's mobile phone number."
|
|
93
|
+
},
|
|
94
|
+
home_phone: {
|
|
95
|
+
label: 'Home Phone Number',
|
|
96
|
+
type: 'integer',
|
|
97
|
+
description: "The user's home phone number."
|
|
98
|
+
},
|
|
99
|
+
work_phone: {
|
|
100
|
+
label: 'Work Phone Number',
|
|
101
|
+
type: 'integer',
|
|
102
|
+
description: "The user's work phone number."
|
|
103
|
+
},
|
|
104
|
+
loyalty_tier: {
|
|
105
|
+
label: 'Loyalty Tier',
|
|
106
|
+
type: 'string',
|
|
107
|
+
description: "The user's loyalty tier."
|
|
108
|
+
},
|
|
109
|
+
company: {
|
|
110
|
+
label: 'Company Name',
|
|
111
|
+
type: 'string',
|
|
112
|
+
description: "The user's company name."
|
|
113
|
+
},
|
|
114
|
+
username: {
|
|
115
|
+
label: 'Username',
|
|
116
|
+
type: 'string',
|
|
117
|
+
description: "The user's username."
|
|
118
|
+
},
|
|
119
|
+
account_creation: {
|
|
120
|
+
label: 'Account Creation Date',
|
|
121
|
+
type: 'datetime',
|
|
122
|
+
description: "The user's account creation date."
|
|
123
|
+
},
|
|
124
|
+
email: {
|
|
125
|
+
label: 'Email Address',
|
|
126
|
+
type: 'string',
|
|
127
|
+
description: "The user's email address."
|
|
128
|
+
},
|
|
129
|
+
altitude: {
|
|
130
|
+
label: 'Altitude',
|
|
131
|
+
type: 'integer',
|
|
132
|
+
description: "The user's altitude."
|
|
133
|
+
},
|
|
134
|
+
latitude: {
|
|
135
|
+
label: 'Latitude',
|
|
136
|
+
type: 'number',
|
|
137
|
+
description: "The user's latitude."
|
|
138
|
+
},
|
|
139
|
+
longitude: {
|
|
140
|
+
label: 'Longitude',
|
|
141
|
+
type: 'number',
|
|
142
|
+
description: "The user's longitude."
|
|
143
|
+
},
|
|
144
|
+
advertising_id: {
|
|
145
|
+
label: 'Advertising ID (IDFA/AAID)',
|
|
146
|
+
type: 'string',
|
|
147
|
+
description: "The user's advertising ID."
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
default: {
|
|
151
|
+
title: { '@path': '$.traits.title' },
|
|
152
|
+
first_name: { '@path': '$.traits.first_name' },
|
|
153
|
+
last_name: { '@path': '$.traits.last_name' },
|
|
154
|
+
full_name: { '@path': '$.traits.full_name' },
|
|
155
|
+
gender: { '@path': '$.traits.gender' },
|
|
156
|
+
zipcode: { '@path': '$.traits.address.postalCode' },
|
|
157
|
+
city: { '@path': '$.traits.address.city' },
|
|
158
|
+
region: { '@path': '$.traits.address.region' },
|
|
159
|
+
country: { '@path': '$.traits.address.country' },
|
|
160
|
+
birthdate: { '@path': '$.traits.birthday' },
|
|
161
|
+
age: { '@path': '$.traits.age' },
|
|
162
|
+
mobile_phone: { '@path': '$.traits.phone' },
|
|
163
|
+
home_phone: { '@path': '$.traits.home_phone' },
|
|
164
|
+
work_phone: { '@path': '$.traits.work_phone' },
|
|
165
|
+
loyalty_tier: { '@path': '$.traits.loyalty_tier' },
|
|
166
|
+
company: { '@path': '$.traits.company_name' },
|
|
167
|
+
username: { '@path': '$.traits.username' },
|
|
168
|
+
account_creation: { '@path': '$.traits.account_creation' },
|
|
169
|
+
email: { '@path': '$.traits.email' },
|
|
170
|
+
altitude: { '@path': '$.traits.altitude' },
|
|
171
|
+
latitude: { '@path': '$.traits.latitude' },
|
|
172
|
+
longitude: { '@path': '$.traits.longitude' },
|
|
173
|
+
advertising_id: { '@path': '$.context.device.advertisingId' }
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
perform: (request, { settings, payload }) => {
|
|
178
|
+
return utilities_1.setAttribute(request, settings, payload);
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
exports.default = action;
|
|
182
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/airship/setAttributes/index.ts"],"names":[],"mappings":";;AAGA,4CAA2C;AAE3C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,gBAAgB;IACvB,mBAAmB,EAAE,mBAAmB;IACxC,WAAW,EACT,iUAAiU;IACnU,MAAM,EAAE;QACN,aAAa,EAAE;YACb,KAAK,EAAE,uBAAuB;YAC9B,WAAW,EAAE,sDAAsD;YACnE,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,UAAU;YACjB,WAAW,EAAE,wBAAwB;YACrC,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,aAAa;aACvB;SACF;QACD,UAAU,EAAE;YACV,KAAK,EAAE,YAAY;YACnB,WAAW,EACT,uHAAuH;YACzH,IAAI,EAAE,QAAQ;YACd,oBAAoB,EAAE,IAAI;YAC1B,eAAe,EAAE,UAAU;YAC3B,UAAU,EAAE;gBACV,KAAK,EAAE;oBACL,KAAK,EAAE,OAAO;oBACd,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,gCAAgC;iBAC9C;gBACD,UAAU,EAAE;oBACV,KAAK,EAAE,YAAY;oBACnB,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,wBAAwB;iBACtC;gBACD,SAAS,EAAE;oBACT,KAAK,EAAE,WAAW;oBAClB,IAAI,EAA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E,EAAE,OAAO,EAAE,uBAAuB,EAAE;gBAC1C,MAAM,EAAE,EAAE,OAAO,EAAE,yBAAyB,EAAE;gBAC9C,OAAO,EAAE,EAAE,OAAO,EAAE,0BAA0B,EAAE;gBAChD,SAAS,EAAE,EAAE,OAAO,EAAE,mBAAmB,EAAE;gBAC3C,GAAG,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;gBAChC,YAAY,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;gBAC3C,UAAU,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE;gBAC9C,UAAU,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE;gBAC9C,YAAY,EAAE,EAAE,OAAO,EAAE,uBAAuB,EAAE;gBAClD,OAAO,EAAE,EAAE,OAAO,EAAE,uBAAuB,EAAE;gBAC7C,QAAQ,EAAE,EAAE,OAAO,EAAE,mBAAmB,EAAE;gBAC1C,gBAAgB,EAAE,EAAE,OAAO,EAAE,2BAA2B,EAAE;gBAC1D,KAAK,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;gBACpC,QAAQ,EAAE,EAAE,OAAO,EAAE,mBAAmB,EAAE;gBAC1C,QAAQ,EAAE,EAAE,OAAO,EAAE,mBAAmB,EAAE;gBAC1C,SAAS,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;gBAC5C,cAAc,EAAE,EAAE,OAAO,EAAE,gCAAgC,EAAE;aAC9D;SACF;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAC1C,OAAO,wBAAY,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;IACjD,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { RequestClient } from '@segment/actions-core';
|
|
2
|
+
import type { Settings } from './generated-types';
|
|
3
|
+
import { Payload as CustomEventsPayload } from './customEvents/generated-types';
|
|
4
|
+
import { Payload as AttributesPayload } from './setAttributes/generated-types';
|
|
5
|
+
import { Payload as TagsPayload } from './manageTags/generated-types';
|
|
6
|
+
export declare function setCustomEvent(request: RequestClient, settings: Settings, payload: CustomEventsPayload): Promise<import("@segment/actions-core").ModifiedResponse<unknown>>;
|
|
7
|
+
export declare function setBatchCustomEvent(request: RequestClient, settings: Settings, payloads: CustomEventsPayload[]): Promise<import("@segment/actions-core").ModifiedResponse<unknown>>;
|
|
8
|
+
export declare function setAttribute(request: RequestClient, settings: Settings, payload: AttributesPayload): Promise<import("@segment/actions-core").ModifiedResponse<unknown>>;
|
|
9
|
+
export declare function manageTags(request: RequestClient, settings: Settings, payload: TagsPayload): Promise<import("@segment/actions-core").ModifiedResponse<unknown>>;
|
|
10
|
+
export declare function map_endpoint(region: string): "https://go.airship.eu" | "https://go.urbanairship.com";
|
|
11
|
+
declare function _build_custom_event_object(payload: CustomEventsPayload): object;
|
|
12
|
+
declare function _build_attributes_object(payload: AttributesPayload): object;
|
|
13
|
+
declare function _build_attribute(attribute_key: string, attribute_value: any, occurred: string | number): {
|
|
14
|
+
action: string;
|
|
15
|
+
key: string;
|
|
16
|
+
value?: string | number | boolean | undefined;
|
|
17
|
+
timestamp: string | boolean;
|
|
18
|
+
};
|
|
19
|
+
declare function _build_tags_object(payload: TagsPayload): object;
|
|
20
|
+
declare function validate_timestamp(timestamp: string | number | Date): string | false;
|
|
21
|
+
export declare const _private: {
|
|
22
|
+
_build_custom_event_object: typeof _build_custom_event_object;
|
|
23
|
+
_build_attributes_object: typeof _build_attributes_object;
|
|
24
|
+
_build_attribute: typeof _build_attribute;
|
|
25
|
+
_build_tags_object: typeof _build_tags_object;
|
|
26
|
+
validate_timestamp: typeof validate_timestamp;
|
|
27
|
+
};
|
|
28
|
+
export {};
|