@segment/action-destinations 3.162.1-staging.64 → 3.164.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/engage-messaging-twilio/index.js +1 -3
- package/dist/destinations/engage-messaging-twilio/index.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.js +1 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/index.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/whatsapp-sender.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/utils/message-sender.js +16 -18
- package/dist/destinations/engage-messaging-twilio/utils/message-sender.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/addToCart/index.js +46 -2
- package/dist/destinations/facebook-conversions-api/addToCart/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/index.js +1 -1
- package/dist/destinations/facebook-conversions-api/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/functions.d.ts +1 -1
- package/dist/destinations/google-enhanced-conversions/functions.js +2 -3
- package/dist/destinations/google-enhanced-conversions/functions.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js +2 -2
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js +5 -5
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js.map +1 -1
- package/dist/destinations/google-sheets-dev/index.js +3 -10
- package/dist/destinations/google-sheets-dev/index.js.map +1 -1
- package/dist/destinations/index.js +2 -0
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/liveramp-audiences/audienceEntered/generated-types.d.ts +9 -0
- package/dist/destinations/liveramp-audiences/audienceEntered/generated-types.js.map +1 -0
- package/dist/destinations/liveramp-audiences/audienceEntered/index.js +54 -0
- package/dist/destinations/liveramp-audiences/audienceEntered/index.js.map +1 -0
- package/dist/destinations/liveramp-audiences/audienceEntered/operations.d.ts +6 -0
- package/dist/destinations/liveramp-audiences/audienceEntered/operations.js +42 -0
- package/dist/destinations/liveramp-audiences/audienceEntered/operations.js.map +1 -0
- package/dist/destinations/liveramp-audiences/generated-types.d.ts +10 -0
- package/dist/destinations/{engage-messaging-twilio/utils/types.js → liveramp-audiences/generated-types.js} +1 -1
- package/dist/destinations/liveramp-audiences/generated-types.js.map +1 -0
- package/dist/destinations/liveramp-audiences/index.d.ts +4 -0
- package/dist/destinations/liveramp-audiences/index.js +69 -0
- package/dist/destinations/liveramp-audiences/index.js.map +1 -0
- package/dist/destinations/liveramp-audiences/s3.d.ts +5 -0
- package/dist/destinations/liveramp-audiences/s3.js +37 -0
- package/dist/destinations/liveramp-audiences/s3.js.map +1 -0
- package/dist/destinations/revx/generated-types.d.ts +3 -0
- package/dist/destinations/revx/generated-types.js +3 -0
- package/dist/destinations/revx/generated-types.js.map +1 -0
- package/dist/destinations/revx/index.d.ts +4 -0
- package/dist/destinations/revx/index.js +36 -0
- package/dist/destinations/revx/index.js.map +1 -0
- package/dist/destinations/revx/sendRevxPing/generated-types.d.ts +41 -0
- package/dist/destinations/revx/sendRevxPing/generated-types.js +3 -0
- package/dist/destinations/revx/sendRevxPing/generated-types.js.map +1 -0
- package/dist/destinations/revx/sendRevxPing/index.d.ts +5 -0
- package/dist/destinations/revx/sendRevxPing/index.js +268 -0
- package/dist/destinations/revx/sendRevxPing/index.js.map +1 -0
- package/dist/destinations/segment-profiles/generated-types.d.ts +0 -1
- package/dist/destinations/segment-profiles/helperFunctions.d.ts +0 -7
- package/dist/destinations/segment-profiles/helperFunctions.js +1 -45
- package/dist/destinations/segment-profiles/helperFunctions.js.map +1 -1
- package/dist/destinations/segment-profiles/index.js +0 -14
- package/dist/destinations/segment-profiles/index.js.map +1 -1
- package/dist/destinations/segment-profiles/properties.js +10 -1
- package/dist/destinations/segment-profiles/properties.js.map +1 -1
- package/dist/destinations/segment-profiles/sendGroup/index.js +0 -8
- package/dist/destinations/segment-profiles/sendGroup/index.js.map +1 -1
- package/dist/destinations/segment-profiles/sendIdentify/index.js +0 -8
- package/dist/destinations/segment-profiles/sendIdentify/index.js.map +1 -1
- package/dist/destinations/usermaven/common-definitions.js +1 -1
- 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 +9 -1
- package/dist/destinations/usermaven/index.js.map +1 -1
- package/dist/destinations/usermaven/page/generated-types.d.ts +31 -0
- package/dist/destinations/usermaven/page/generated-types.js +3 -0
- package/dist/destinations/usermaven/page/generated-types.js.map +1 -0
- package/dist/destinations/usermaven/page/index.d.ts +5 -0
- package/dist/destinations/usermaven/page/index.js +58 -0
- package/dist/destinations/usermaven/page/index.js.map +1 -0
- package/dist/destinations/usermaven/request-params.js +12 -8
- package/dist/destinations/usermaven/request-params.js.map +1 -1
- package/dist/destinations/usermaven/track/generated-types.d.ts +1 -1
- package/dist/lib/AWS/s3.d.ts +4 -0
- package/dist/lib/AWS/s3.js +21 -0
- package/dist/lib/AWS/s3.js.map +1 -0
- package/package.json +5 -4
- package/dist/destinations/engage-messaging-twilio/sendPush/generated-types.d.ts +0 -20
- package/dist/destinations/engage-messaging-twilio/sendPush/generated-types.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendPush/index.js +0 -125
- package/dist/destinations/engage-messaging-twilio/sendPush/index.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendPush/push-sender.d.ts +0 -17
- package/dist/destinations/engage-messaging-twilio/sendPush/push-sender.js +0 -147
- package/dist/destinations/engage-messaging-twilio/sendPush/push-sender.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/utils/content.d.ts +0 -2
- package/dist/destinations/engage-messaging-twilio/utils/content.js +0 -15
- package/dist/destinations/engage-messaging-twilio/utils/content.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/utils/types.d.ts +0 -10
- package/dist/destinations/engage-messaging-twilio/utils/types.js.map +0 -1
- /package/dist/destinations/{engage-messaging-twilio/sendPush → liveramp-audiences/audienceEntered}/generated-types.js +0 -0
- /package/dist/destinations/{engage-messaging-twilio/sendPush → liveramp-audiences/audienceEntered}/index.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/liveramp-audiences/audienceEntered/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const operations_1 = require("./operations");
|
|
4
|
+
const action = {
|
|
5
|
+
title: 'Audience Entered',
|
|
6
|
+
description: 'Uploads audience membership data to a file for LiveRamp ingestion.',
|
|
7
|
+
defaultSubscription: 'event = "Audience Entered"',
|
|
8
|
+
fields: {
|
|
9
|
+
audience_key: {
|
|
10
|
+
label: 'Audience Key',
|
|
11
|
+
description: 'Identifies the user within the entered audience.',
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true,
|
|
14
|
+
default: { '@path': '$.userId' }
|
|
15
|
+
},
|
|
16
|
+
identifier_data: {
|
|
17
|
+
label: 'Identifier Data',
|
|
18
|
+
description: `Additional data pertaining to the user.`,
|
|
19
|
+
type: 'object',
|
|
20
|
+
required: false,
|
|
21
|
+
defaultObjectUI: 'keyvalue:only',
|
|
22
|
+
default: { '@path': '$.context.traits' }
|
|
23
|
+
},
|
|
24
|
+
delimiter: {
|
|
25
|
+
label: 'Delimeter',
|
|
26
|
+
description: `Character used to separate tokens in the resulting file.`,
|
|
27
|
+
type: 'string',
|
|
28
|
+
required: true,
|
|
29
|
+
default: ','
|
|
30
|
+
},
|
|
31
|
+
audience_name: {
|
|
32
|
+
label: 'Audience name',
|
|
33
|
+
description: `Name of the audience the user has entered.`,
|
|
34
|
+
type: 'string',
|
|
35
|
+
required: true,
|
|
36
|
+
default: { '@path': '$.properties.audience_key' }
|
|
37
|
+
},
|
|
38
|
+
received_at: {
|
|
39
|
+
label: 'Received At',
|
|
40
|
+
description: `Datetime at which the event was received. Used to disambiguate the resulting file.`,
|
|
41
|
+
type: 'datetime',
|
|
42
|
+
required: true,
|
|
43
|
+
default: { '@path': '$.receivedAt' }
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
perform: async (request, { settings, payload }) => {
|
|
47
|
+
return operations_1.processData(request, settings, [payload]);
|
|
48
|
+
},
|
|
49
|
+
performBatch: (request, { settings, payload }) => {
|
|
50
|
+
return operations_1.processData(request, settings, payload);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
exports.default = action;
|
|
54
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/liveramp-audiences/audienceEntered/index.ts"],"names":[],"mappings":";;AAGA,6CAA0C;AAE1C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,oEAAoE;IACjF,mBAAmB,EAAE,4BAA4B;IACjD,MAAM,EAAE;QACN,YAAY,EAAE;YACZ,KAAK,EAAE,cAAc;YACrB,WAAW,EAAE,kDAAkD;YAC/D,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;SACjC;QACD,eAAe,EAAE;YACf,KAAK,EAAE,iBAAiB;YACxB,WAAW,EAAE,yCAAyC;YACtD,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,eAAe,EAAE,eAAe;YAChC,OAAO,EAAE,EAAE,OAAO,EAAE,kBAAkB,EAAE;SACzC;QACD,SAAS,EAAE;YACT,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,0DAA0D;YACvE,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,GAAG;SACb;QACD,aAAa,EAAE;YACb,KAAK,EAAE,eAAe;YACtB,WAAW,EAAE,4CAA4C;YACzD,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,2BAA2B,EAAE;SAClD;QACD,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,oFAAoF;YACjG,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;SACrC;KACF;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAChD,OAAO,wBAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAA;IAClD,CAAC;IACD,YAAY,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAC/C,OAAO,wBAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;IAChD,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { RequestClient } from '@segment/actions-core';
|
|
2
|
+
import type { Settings } from '../generated-types';
|
|
3
|
+
import type { Payload } from './generated-types';
|
|
4
|
+
declare function processData(request: RequestClient, settings: Settings, payloads: Payload[]): Promise<import("@segment/actions-core").ModifiedResponse<unknown> | undefined>;
|
|
5
|
+
declare function enquoteIdentifier(identifier: string): string;
|
|
6
|
+
export { processData, enquoteIdentifier };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.enquoteIdentifier = exports.processData = void 0;
|
|
4
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
5
|
+
const s3_1 = require("../s3");
|
|
6
|
+
async function processData(request, settings, payloads) {
|
|
7
|
+
if (settings.upload_mode == 'S3') {
|
|
8
|
+
s3_1.validateS3(settings);
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
throw new actions_core_1.PayloadValidationError(`Unrecognized upload mode: ${settings.upload_mode}`);
|
|
12
|
+
}
|
|
13
|
+
const rows = [];
|
|
14
|
+
const headers = ['audience_key'];
|
|
15
|
+
if (payloads[0].identifier_data) {
|
|
16
|
+
for (const identifier of Object.getOwnPropertyNames(payloads[0].identifier_data)) {
|
|
17
|
+
headers.push(identifier);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
rows.push(headers.join(payloads[0].delimiter));
|
|
21
|
+
for (const payload of payloads) {
|
|
22
|
+
const row = [];
|
|
23
|
+
row.push(payload.audience_key);
|
|
24
|
+
if (payload.identifier_data) {
|
|
25
|
+
for (const identifier of Object.getOwnPropertyNames(payload.identifier_data)) {
|
|
26
|
+
row.push(payload.identifier_data[identifier]);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
rows.push(row.map(enquoteIdentifier).join(payload.delimiter));
|
|
30
|
+
}
|
|
31
|
+
const filename = `${payloads[0].audience_name}_PII_${payloads[0].received_at}.csv`;
|
|
32
|
+
const fileContent = rows.join('\n');
|
|
33
|
+
if (settings.upload_mode == 'S3') {
|
|
34
|
+
return await s3_1.uploadS3(settings, filename, fileContent, request);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.processData = processData;
|
|
38
|
+
function enquoteIdentifier(identifier) {
|
|
39
|
+
return `"${identifier.replace(/"/g, '""')}"`;
|
|
40
|
+
}
|
|
41
|
+
exports.enquoteIdentifier = enquoteIdentifier;
|
|
42
|
+
//# sourceMappingURL=operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/destinations/liveramp-audiences/audienceEntered/operations.ts"],"names":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CAAC,CAAC,CAAC,aAAa,QAAQ,QAAQ,CAAC,CAAC,CAAC,CAAC,WAAW,MAAM,CAAA;IAClF,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAEnC,IAAI,QAAQ,CAAC,WAAW,IAAI,IAAI,EAAE;QAChC,OAAO,MAAM,aAAQ,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,CAAC,CAAA;KAChE;AACH,CAAC;AAcQ,kCAAW;AAJpB,SAAS,iBAAiB,CAAC,UAAkB;IAC3C,OAAO,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAA;AAC9C,CAAC;AAEqB,8CAAiB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/liveramp-audiences/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,69 @@
|
|
|
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 audienceEntered_1 = __importDefault(require("./audienceEntered"));
|
|
7
|
+
const destination = {
|
|
8
|
+
name: 'Liveramp Audiences',
|
|
9
|
+
slug: 'actions-liveramp-audiences',
|
|
10
|
+
mode: 'cloud',
|
|
11
|
+
authentication: {
|
|
12
|
+
scheme: 'custom',
|
|
13
|
+
fields: {
|
|
14
|
+
upload_mode: {
|
|
15
|
+
label: 'Upload Mode',
|
|
16
|
+
description: 'Choose delivery route for the files',
|
|
17
|
+
type: 'string',
|
|
18
|
+
required: true,
|
|
19
|
+
default: 'S3',
|
|
20
|
+
choices: [
|
|
21
|
+
{ value: 'S3', label: 'S3' },
|
|
22
|
+
{ value: 'SFTP', label: 'SFTP' }
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
s3_aws_access_key: {
|
|
26
|
+
label: 'AWS Access Key ID (S3 only)',
|
|
27
|
+
description: 'IAM user credentials with write permissions to the S3 bucket.',
|
|
28
|
+
type: 'string'
|
|
29
|
+
},
|
|
30
|
+
s3_aws_secret_key: {
|
|
31
|
+
label: 'AWS Secret Access Key (S3 only)',
|
|
32
|
+
description: 'IAM user credentials with write permissions to the S3 bucket.',
|
|
33
|
+
type: 'password'
|
|
34
|
+
},
|
|
35
|
+
s3_aws_bucket_name: {
|
|
36
|
+
label: 'AWS Bucket Name (S3 only)',
|
|
37
|
+
description: 'Name of the S3 bucket where the files will be uploaded to.',
|
|
38
|
+
type: 'string'
|
|
39
|
+
},
|
|
40
|
+
s3_aws_region: {
|
|
41
|
+
label: 'AWS Region (S3 only)',
|
|
42
|
+
description: 'Region where the S3 bucket is hosted.',
|
|
43
|
+
type: 'string'
|
|
44
|
+
},
|
|
45
|
+
sftp_username: {
|
|
46
|
+
label: 'Username (SFTP only)',
|
|
47
|
+
description: 'User credentials for establishing an SFTP connection with LiveRamp.',
|
|
48
|
+
type: 'string'
|
|
49
|
+
},
|
|
50
|
+
sftp_password: {
|
|
51
|
+
label: 'Password (SFTP only)',
|
|
52
|
+
description: 'User credentials for establishing an SFTP connection with LiveRamp.',
|
|
53
|
+
type: 'password'
|
|
54
|
+
},
|
|
55
|
+
sftp_folder_path: {
|
|
56
|
+
label: 'Folder Path (SFTP only)',
|
|
57
|
+
description: 'Path within the SFTP server to upload the files to.',
|
|
58
|
+
type: 'string'
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
testAuthentication: (_) => {
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
actions: {
|
|
65
|
+
audienceEntered: audienceEntered_1.default
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
exports.default = destination;
|
|
69
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.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EAAE,qDAAqD;gBAClE,IAAI,EAAE,QAAQ;aACf;SACF;QACD,kBAAkB,EAAE,CAAC,CAAC,EAAE,EAAE;QAK1B,CAAC;KACF;IACD,OAAO,EAAE;QACP,eAAe,EAAf,yBAAe;KAChB;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ModifiedResponse, RequestOptions } from '@segment/actions-core';
|
|
2
|
+
import type { Settings } from './generated-types';
|
|
3
|
+
declare function validateS3(settings: Settings): void;
|
|
4
|
+
declare function uploadS3(settings: Settings, filename: string, fileContent: string, request: <Data = unknown>(url: string, options?: RequestOptions) => Promise<ModifiedResponse<Data>>): Promise<ModifiedResponse<unknown>>;
|
|
5
|
+
export { validateS3, uploadS3 };
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
exports.uploadS3 = exports.validateS3 = void 0;
|
|
7
|
+
const s3_1 = __importDefault(require("../../lib/AWS/s3"));
|
|
8
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
9
|
+
function validateS3(settings) {
|
|
10
|
+
if (!settings.s3_aws_access_key) {
|
|
11
|
+
throw new actions_core_1.InvalidAuthenticationError('Selected S3 upload mode, but missing AWS Access Key');
|
|
12
|
+
}
|
|
13
|
+
if (!settings.s3_aws_secret_key) {
|
|
14
|
+
throw new actions_core_1.InvalidAuthenticationError('Selected S3 upload mode, but missing AWS Secret Key');
|
|
15
|
+
}
|
|
16
|
+
if (!settings.s3_aws_bucket_name) {
|
|
17
|
+
throw new actions_core_1.InvalidAuthenticationError('Selected S3 upload mode, but missing AWS S3 bucket name');
|
|
18
|
+
}
|
|
19
|
+
if (!settings.s3_aws_region) {
|
|
20
|
+
throw new actions_core_1.InvalidAuthenticationError('Selected S3 upload mode, but missing AWS Region');
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.validateS3 = validateS3;
|
|
24
|
+
async function uploadS3(settings, filename, fileContent, request) {
|
|
25
|
+
const method = 'PUT';
|
|
26
|
+
const opts = await s3_1.default(settings.s3_aws_bucket_name, settings.s3_aws_region, filename, method, fileContent, settings.s3_aws_access_key, settings.s3_aws_secret_key);
|
|
27
|
+
if (!opts.headers || !opts.method || !opts.host || !opts.path) {
|
|
28
|
+
throw new actions_core_1.InvalidAuthenticationError('Unable to generate signature header for AWS S3 request.');
|
|
29
|
+
}
|
|
30
|
+
return await request(`https://${opts.host}/${opts.path}`, {
|
|
31
|
+
headers: opts.headers,
|
|
32
|
+
method,
|
|
33
|
+
body: opts.body
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
exports.uploadS3 = uploadS3;
|
|
37
|
+
//# sourceMappingURL=s3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"s3.js","sourceRoot":"","sources":["../../../src/destinations/liveramp-audiences/s3.ts"],"names":[],"mappings":";;;;;;AAAA,0DAAuD;AACvD,wDAAoG;AAGpG,SAAS,UAAU,CAAC,QAAkB;IACpC,IAAI,CAAC,QAAQ,CAAC,iBAAiB,EAAE;QAC/B,MAAM,IAAI,yCAA0B,CAAC,qDAAqD,CAAC,CAAA;KAC5F;IAED,IAAI,CAAC,QAAQ,CAAC,iBAAiB,EAAE;QAC/B,MAAM,IAAI,yCAA0B,CAAC,qDAAqD,CAAC,CAAA;KAC5F;IAED,IAAI,CAAC,QAAQ,CAAC,kBAAkB,EAAE;QAChC,MAAM,IAAI,yCAA0B,CAAC,yDAAyD,CAAC,CAAA;KAChG;IAED,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE;QAC3B,MAAM,IAAI,yCAA0B,CAAC,iDAAiD,CAAC,CAAA;KACxF;AACH,CAAC;AA6BQ,gCAAU;AA3BnB,KAAK,UAAU,QAAQ,CACrB,QAAkB,EAClB,QAAgB,EAChB,WAAmB,EACnB,OAAmG;IAEnG,MAAM,MAAM,GAAG,KAAK,CAAA;IACpB,MAAM,IAAI,GAAG,MAAM,YAAwB,CACzC,QAAQ,CAAC,kBAA4B,EACrC,QAAQ,CAAC,aAAuB,EAChC,QAAQ,EACR,MAAM,EACN,WAAW,EACX,QAAQ,CAAC,iBAA2B,EACpC,QAAQ,CAAC,iBAA2B,CACrC,CAAA;IACD,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;QAC7D,MAAM,IAAI,yCAA0B,CAAC,yDAAyD,CAAC,CAAA;KAChG;IAED,OAAO,MAAM,OAAO,CAAC,WAAW,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE;QACxD,OAAO,EAAE,IAAI,CAAC,OAAiC;QAC/C,MAAM;QACN,IAAI,EAAE,IAAI,CAAC,IAAI;KAChB,CAAC,CAAA;AACJ,CAAC;AAEoB,4BAAQ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/revx/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,36 @@
|
|
|
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 sendRevxPing_1 = __importDefault(require("./sendRevxPing"));
|
|
8
|
+
const destination = {
|
|
9
|
+
name: 'RevX Cloud (Actions)',
|
|
10
|
+
slug: 'actions-revx',
|
|
11
|
+
mode: 'cloud',
|
|
12
|
+
authentication: {
|
|
13
|
+
scheme: 'custom',
|
|
14
|
+
fields: {
|
|
15
|
+
client_id: {
|
|
16
|
+
label: 'Revx Client ID',
|
|
17
|
+
description: 'Revx specific client id. This can be found by contacting the RevX support team',
|
|
18
|
+
type: 'string',
|
|
19
|
+
required: true
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
presets: [
|
|
24
|
+
{
|
|
25
|
+
name: 'Send Revx Ping',
|
|
26
|
+
subscribe: 'type = "track" or type ="screen"',
|
|
27
|
+
partnerAction: 'sendRevxPing',
|
|
28
|
+
mapping: actions_core_1.defaultValues(sendRevxPing_1.default.fields)
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
actions: {
|
|
32
|
+
sendRevxPing: sendRevxPing_1.default
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
exports.default = destination;
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/revx/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA4E;AAG5E,kEAAyC;AAEzC,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE,OAAO;IACb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,SAAS,EAAE;gBACT,KAAK,EAAE,gBAAgB;gBACvB,WAAW,EAAE,gFAAgF;gBAC7F,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;KACF;IACD,OAAO,EAAE;QACP;YACE,IAAI,EAAE,gBAAgB;YACtB,SAAS,EAAE,kCAAkC;YAC7C,aAAa,EAAE,cAAc;YAC7B,OAAO,EAAE,4BAAa,CAAC,sBAAY,CAAC,MAAM,CAAC;SAC5C;KACF;IACD,OAAO,EAAE;QACP,YAAY,EAAZ,sBAAY;KACb;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
os: string;
|
|
3
|
+
advertising_id?: string;
|
|
4
|
+
event_name?: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
idfv?: string;
|
|
7
|
+
time?: string | number;
|
|
8
|
+
event_properties?: {
|
|
9
|
+
[k: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
user_properties?: {
|
|
12
|
+
[k: string]: unknown;
|
|
13
|
+
};
|
|
14
|
+
app_version?: string;
|
|
15
|
+
os_name?: string;
|
|
16
|
+
os_version?: string;
|
|
17
|
+
device_brand?: string;
|
|
18
|
+
device_manufacturer?: string;
|
|
19
|
+
device_model?: string;
|
|
20
|
+
carrier?: string;
|
|
21
|
+
country?: string;
|
|
22
|
+
region?: string;
|
|
23
|
+
city?: string;
|
|
24
|
+
dma?: string;
|
|
25
|
+
language?: string;
|
|
26
|
+
product?: {
|
|
27
|
+
price?: number;
|
|
28
|
+
quantity?: number;
|
|
29
|
+
productId?: string;
|
|
30
|
+
[k: string]: unknown;
|
|
31
|
+
};
|
|
32
|
+
products?: {
|
|
33
|
+
price?: number;
|
|
34
|
+
quantity?: number;
|
|
35
|
+
productId?: string;
|
|
36
|
+
[k: string]: unknown;
|
|
37
|
+
}[];
|
|
38
|
+
location_lat?: number;
|
|
39
|
+
location_lng?: number;
|
|
40
|
+
ip?: string;
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/revx/sendRevxPing/generated-types.ts"],"names":[],"mappings":""}
|