@segment/action-destinations 3.269.0-staging-5188e479a → 3.269.0-staging-c0a68fb0b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/destinations/amazon-ads/utils.d.ts +6 -0
- package/dist/destinations/amazon-ads/utils.js +11 -4
- package/dist/destinations/amazon-ads/utils.js.map +1 -1
- package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.d.ts +1 -1
- package/dist/destinations/customerio/test-helper.d.ts +1 -1
- package/dist/destinations/customerio/utils.d.ts +1 -1
- package/dist/destinations/engage/utils/EngageActionPerformer.d.ts +1 -1
- package/dist/destinations/engage/utils/track.d.ts +17 -17
- package/dist/destinations/segment/sendTrack/index.js +3 -1
- package/dist/destinations/segment/sendTrack/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/destinations/amazon-ads/generated-types.d.ts +0 -12
- package/dist/destinations/amazon-ads/generated-types.js +0 -3
- package/dist/destinations/amazon-ads/generated-types.js.map +0 -1
- package/dist/destinations/amazon-ads/index.d.ts +0 -4
- package/dist/destinations/amazon-ads/index.js +0 -253
- package/dist/destinations/amazon-ads/index.js.map +0 -1
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.d.ts +0 -15
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.js +0 -3
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.js.map +0 -1
- package/dist/destinations/amazon-ads/syncAudiences/index.d.ts +0 -5
- package/dist/destinations/amazon-ads/syncAudiences/index.js +0 -209
- package/dist/destinations/amazon-ads/syncAudiences/index.js.map +0 -1
- package/dist/destinations/amazon-ads/types.d.ts +0 -47
- package/dist/destinations/amazon-ads/types.js +0 -11
- package/dist/destinations/amazon-ads/types.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/apiLookups.d.ts +0 -22
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/apiLookups.js +0 -189
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/apiLookups.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/generated-types.d.ts +0 -16
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/generated-types.js +0 -3
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/generated-types.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/index.d.ts +0 -5
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/index.js +0 -29
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/index.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.d.ts +0 -43
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.js +0 -419
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/UnlayerResponse.d.ts +0 -12
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/UnlayerResponse.js +0 -3
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/UnlayerResponse.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/generated-types.d.ts +0 -56
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/generated-types.js +0 -3
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/generated-types.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.d.ts +0 -5
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js +0 -258
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/insertEmailPreviewText.d.ts +0 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/insertEmailPreviewText.js +0 -23
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/insertEmailPreviewText.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/isRestrictedDomain.d.ts +0 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/isRestrictedDomain.js +0 -14
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/isRestrictedDomain.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/PushSender.d.ts +0 -29
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/PushSender.js +0 -169
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/PushSender.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/generated-types.d.ts +0 -39
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/generated-types.js +0 -3
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/generated-types.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/index.d.ts +0 -5
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/index.js +0 -251
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/index.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/SmsMessageSender.d.ts +0 -9
- package/dist/destinations/engage-messaging-twilio/sendSms/SmsMessageSender.js +0 -72
- package/dist/destinations/engage-messaging-twilio/sendSms/SmsMessageSender.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/generated-types.d.ts +0 -27
- package/dist/destinations/engage-messaging-twilio/sendSms/generated-types.js +0 -3
- package/dist/destinations/engage-messaging-twilio/sendSms/generated-types.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/index.d.ts +0 -5
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js +0 -163
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/WhatsAppMessageSender.d.ts +0 -9
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/WhatsAppMessageSender.js +0 -89
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/WhatsAppMessageSender.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/generated-types.d.ts +0 -25
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/generated-types.js +0 -3
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/generated-types.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/index.d.ts +0 -5
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/index.js +0 -137
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/index.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/utils/PhoneMessageSender.d.ts +0 -16
- package/dist/destinations/engage-messaging-twilio/utils/PhoneMessageSender.js +0 -71
- package/dist/destinations/engage-messaging-twilio/utils/PhoneMessageSender.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/utils/TwilioMessageSender.d.ts +0 -16
- package/dist/destinations/engage-messaging-twilio/utils/TwilioMessageSender.js +0 -115
- package/dist/destinations/engage-messaging-twilio/utils/TwilioMessageSender.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/utils/index.d.ts +0 -2
- package/dist/destinations/engage-messaging-twilio/utils/index.js +0 -15
- package/dist/destinations/engage-messaging-twilio/utils/index.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/utils/types.d.ts +0 -23
- package/dist/destinations/engage-messaging-twilio/utils/types.js +0 -3
- package/dist/destinations/engage-messaging-twilio/utils/types.js.map +0 -1
|
@@ -23,9 +23,15 @@ export interface AudiencePayload {
|
|
|
23
23
|
}[];
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
+
export interface RecordsResponseType {
|
|
27
|
+
jobRequestId: string;
|
|
28
|
+
}
|
|
26
29
|
export declare const AUTHORIZATION_URL: any;
|
|
27
30
|
export declare const CONSTANTS: {
|
|
28
31
|
CREATE: string;
|
|
29
32
|
DELETE: string;
|
|
30
33
|
};
|
|
31
34
|
export declare const CURRENCY: string[];
|
|
35
|
+
export declare const REGEX_AUDIENCEID: RegExp;
|
|
36
|
+
export declare const REGEX_ADVERTISERID: RegExp;
|
|
37
|
+
export declare function extractNumberAndSubstituteWithStringValue(responseString: string, regex: any, substituteWith: string): any;
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CURRENCY = exports.CONSTANTS = exports.AUTHORIZATION_URL = exports.AmazonAdsError = void 0;
|
|
3
|
+
exports.extractNumberAndSubstituteWithStringValue = exports.REGEX_ADVERTISERID = exports.REGEX_AUDIENCEID = exports.CURRENCY = exports.CONSTANTS = exports.AUTHORIZATION_URL = exports.AmazonAdsError = void 0;
|
|
4
4
|
const actions_core_1 = require("@segment/actions-core");
|
|
5
5
|
class AmazonAdsError extends actions_core_1.HTTPError {
|
|
6
6
|
}
|
|
7
7
|
exports.AmazonAdsError = AmazonAdsError;
|
|
8
8
|
exports.AUTHORIZATION_URL = {
|
|
9
|
-
'https://advertising-api.amazon.com': 'https://api.amazon.com
|
|
10
|
-
'https://advertising-api-eu.amazon.com': 'https://api.amazon.co.uk
|
|
11
|
-
'https://advertising-api-fe.amazon.com': 'https://api.amazon.co.jp
|
|
9
|
+
'https://advertising-api.amazon.com': 'https://api.amazon.com',
|
|
10
|
+
'https://advertising-api-eu.amazon.com': 'https://api.amazon.co.uk',
|
|
11
|
+
'https://advertising-api-fe.amazon.com': 'https://api.amazon.co.jp'
|
|
12
12
|
};
|
|
13
13
|
exports.CONSTANTS = {
|
|
14
14
|
CREATE: 'CREATE',
|
|
15
15
|
DELETE: 'DELETE'
|
|
16
16
|
};
|
|
17
17
|
exports.CURRENCY = ['USD', 'CAD', 'JPY', 'GBP', 'EUR', 'SAR', 'AUD', 'AED', 'CNY', 'MXN', 'INR', 'SEK', 'TRY'];
|
|
18
|
+
exports.REGEX_AUDIENCEID = /"audienceId":(\d+)/;
|
|
19
|
+
exports.REGEX_ADVERTISERID = /"advertiserId":"(\d+)"/;
|
|
20
|
+
function extractNumberAndSubstituteWithStringValue(responseString, regex, substituteWith) {
|
|
21
|
+
const resString = responseString.replace(regex, substituteWith);
|
|
22
|
+
return JSON.parse(resString);
|
|
23
|
+
}
|
|
24
|
+
exports.extractNumberAndSubstituteWithStringValue = extractNumberAndSubstituteWithStringValue;
|
|
18
25
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/destinations/amazon-ads/utils.ts"],"names":[],"mappings":";;;AAAA,wDAAiD;AAEjD,MAAa,cAAe,SAAQ,wBAAS;CAO5C;AAPD,wCAOC;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/destinations/amazon-ads/utils.ts"],"names":[],"mappings":";;;AAAA,wDAAiD;AAEjD,MAAa,cAAe,SAAQ,wBAAS;CAO5C;AAPD,wCAOC;AAsBY,QAAA,iBAAiB,GAAQ;IACpC,oCAAoC,EAAE,wBAAwB;IAC9D,uCAAuC,EAAE,0BAA0B;IACnE,uCAAuC,EAAE,0BAA0B;CACpE,CAAA;AACY,QAAA,SAAS,GAAG;IACvB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;CACjB,CAAA;AACY,QAAA,QAAQ,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAA;AAEtG,QAAA,gBAAgB,GAAG,oBAAoB,CAAA;AACvC,QAAA,kBAAkB,GAAG,wBAAwB,CAAA;AAE1D,SAAgB,yCAAyC,CAAC,cAAsB,EAAE,KAAU,EAAE,cAAsB;IAClH,MAAM,SAAS,GAAG,cAAc,CAAC,OAAO,CAAC,KAAK,EAAE,cAAc,CAAC,CAAA;IAC/D,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;AAC9B,CAAC;AAHD,8FAGC"}
|
|
@@ -9,7 +9,7 @@ export declare const dateStringToFuzzyDate: (dateString: string | number) => fal
|
|
|
9
9
|
y: string;
|
|
10
10
|
};
|
|
11
11
|
export declare const augmentFieldsWithConstituentFields: (fields: Record<string, InputField>) => Record<string, InputField>;
|
|
12
|
-
export declare const splitConstituentPayload: (payload: CreateOrUpdateIndividualConstituentPayload) => (Partial<
|
|
12
|
+
export declare const splitConstituentPayload: (payload: CreateOrUpdateIndividualConstituentPayload) => (Partial<Phone> | Partial<Constituent> | Partial<Address> | Partial<OnlinePresence>)[];
|
|
13
13
|
export declare const buildConstituentPayloadFromPayload: (payload: StringIndexedObject) => Partial<CreateOrUpdateIndividualConstituentPayload>;
|
|
14
14
|
export declare const buildGiftDataFromPayload: (constituentId: string, payload: CreateGiftPayload) => Partial<Gift>;
|
|
15
15
|
export declare const buildConstituentActionDataFromPayload: (constituentId: string, payload: CreateConstituentAction) => Partial<ConstituentAction>;
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
import nock from 'nock';
|
|
3
3
|
import { AccountRegion } from './utils';
|
|
4
4
|
export declare const nockTrackInternalEndpoint: (region: AccountRegion) => nock.Scope;
|
|
5
|
-
export declare function getDefaultMappings(action: string): import("lodash").Dictionary<import("@segment/actions-core/
|
|
5
|
+
export declare function getDefaultMappings(action: string): import("lodash").Dictionary<import("@segment/actions-core/destination-kittypes").FieldValue | undefined>;
|
|
6
6
|
export declare function testRunner(fn: Function): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const trackApiEndpoint: ({ accountRegion }: {
|
|
2
2
|
accountRegion?: string | undefined;
|
|
3
|
-
}) => "https://track
|
|
3
|
+
}) => "https://track.customer.io" | "https://track-eu.customer.io";
|
|
4
4
|
export declare enum AccountRegion {
|
|
5
5
|
US = "US \uD83C\uDDFA\uD83C\uDDF8",
|
|
6
6
|
EU = "EU \uD83C\uDDEA\uD83C\uDDFA"
|
|
@@ -12,7 +12,7 @@ export declare abstract class EngageActionPerformer<TSettings = any, TPayload =
|
|
|
12
12
|
readonly executeInput: ExecuteInput<TSettings, TPayload>;
|
|
13
13
|
readonly logger: EngageLogger;
|
|
14
14
|
readonly statsClient: EngageStats;
|
|
15
|
-
readonly dataFeedCache: import("@segment/actions-core/
|
|
15
|
+
readonly dataFeedCache: import("@segment/actions-core/destination-kit").DataFeedCache | undefined;
|
|
16
16
|
readonly currentOperation: OperationContext | undefined;
|
|
17
17
|
readonly payload: TPayload;
|
|
18
18
|
readonly settings: TSettings;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ContextFromDecorator } from './operationTracking';
|
|
2
2
|
export declare const track: ((decoratorArgs?: ({
|
|
3
|
+
shouldStats?: ((args: import("./operationTracking").OperationStatsEventArgs) => boolean | void) | undefined;
|
|
4
|
+
} & {
|
|
3
5
|
onError?: ((ctx: import("./operationTracking").OperationErrorHandlerContext<import("./operationTracking").TryCatchFinallyContext<(this: any, ...args: any[]) => any>>) => void) | undefined;
|
|
4
|
-
} &
|
|
6
|
+
} & {
|
|
5
7
|
onTry?: ((ctx: import("./operationTracking").TryCatchFinallyContext<(this: any, ...args: any[]) => any>) => void) | undefined;
|
|
6
8
|
onFinally?: ((ctx: import("./operationTracking").TryCatchFinallyContext<(this: any, ...args: any[]) => any>) => void) | undefined;
|
|
7
|
-
} & {
|
|
8
|
-
shouldStats?: ((args: import("./operationTracking").OperationStatsEventArgs) => boolean | void) | undefined;
|
|
9
|
-
} & {
|
|
9
|
+
} & import("./operationTracking").OperationLoggerDecoratorArgs & {
|
|
10
10
|
wrapIntegrationError?: ((ctx: import("./operationTracking").TryCatchFinallyContext<(this: any, ...args: any[]) => any>) => import("@segment/actions-core/*").IntegrationError | [message: string, code: string, status: number]) | undefined;
|
|
11
11
|
}) | undefined) => import("./operationTracking").GenericMethodDecorator<(this: any, ...args: any[]) => any>) & {
|
|
12
12
|
getCurrentOperation(classInstance: any): (import("./operationTracking").TryCatchFinallyContext<(this: any, ...args: any[]) => any> & {
|
|
@@ -15,8 +15,13 @@ export declare const track: ((decoratorArgs?: ({
|
|
|
15
15
|
}) | undefined;
|
|
16
16
|
} & {
|
|
17
17
|
_contextType: import("./operationTracking").TryCatchFinallyContext<(this: any, ...args: any[]) => any> & {
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
tags: string[];
|
|
19
|
+
sharedContext: {
|
|
20
|
+
tags: string[];
|
|
21
|
+
};
|
|
22
|
+
decoratorArgs?: {
|
|
23
|
+
shouldStats?: ((args: import("./operationTracking").OperationStatsEventArgs) => boolean | void) | undefined;
|
|
24
|
+
} | undefined;
|
|
20
25
|
} & {
|
|
21
26
|
decoratorArgs?: {
|
|
22
27
|
onError?: ((ctx: import("./operationTracking").OperationErrorHandlerContext<import("./operationTracking").TryCatchFinallyContext<(this: any, ...args: any[]) => any>>) => void) | undefined;
|
|
@@ -25,10 +30,8 @@ export declare const track: ((decoratorArgs?: ({
|
|
|
25
30
|
parent?: (import("./operationTracking").TryCatchFinallyContext<(this: any, ...args: any[]) => any> & any) | undefined;
|
|
26
31
|
sharedContext: {};
|
|
27
32
|
} & {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
decoratorArgs?: import("./operationTracking").OperationLoggerDecoratorArgs | undefined;
|
|
31
|
-
sharedContext: import("./operationTracking").OperationLoggerSharedContext;
|
|
33
|
+
start?: number | undefined;
|
|
34
|
+
duration?: number | undefined;
|
|
32
35
|
} & {
|
|
33
36
|
onFinally: (() => void)[];
|
|
34
37
|
decoratorArgs?: {
|
|
@@ -36,13 +39,10 @@ export declare const track: ((decoratorArgs?: ({
|
|
|
36
39
|
onFinally?: ((ctx: import("./operationTracking").TryCatchFinallyContext<(this: any, ...args: any[]) => any>) => void) | undefined;
|
|
37
40
|
} | undefined;
|
|
38
41
|
} & {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
decoratorArgs?: {
|
|
44
|
-
shouldStats?: ((args: import("./operationTracking").OperationStatsEventArgs) => boolean | void) | undefined;
|
|
45
|
-
} | undefined;
|
|
42
|
+
logs: string[];
|
|
43
|
+
logMetadata?: Record<string, unknown> | undefined;
|
|
44
|
+
decoratorArgs?: import("./operationTracking").OperationLoggerDecoratorArgs | undefined;
|
|
45
|
+
sharedContext: import("./operationTracking").OperationLoggerSharedContext;
|
|
46
46
|
} & {
|
|
47
47
|
decoratorArgs?: {
|
|
48
48
|
wrapIntegrationError?: ((ctx: import("./operationTracking").TryCatchFinallyContext<(this: any, ...args: any[]) => any>) => import("@segment/actions-core/*").IntegrationError | [message: string, code: string, status: number]) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendTrack/index.ts"],"names":[],"mappings":";;AAGA,8DAuB8B;AAC9B,sCAAkE;AAElE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,iGAAiG;IAC9G,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,OAAO,EAAP,4BAAO;QACP,YAAY,EAAZ,iCAAY;QACZ,SAAS,EAAT,8BAAS;QACT,UAAU,EAAV,+BAAU;QACV,WAAW,EAAX,gCAAW;QACX,mBAAmB,EAAnB,wCAAmB;QACnB,MAAM,EAAN,2BAAM;QACN,UAAU,EAAV,+BAAU;QACV,MAAM,EAAN,2BAAM;QACN,QAAQ,EAAR,6BAAQ;QACR,OAAO,EAAP,4BAAO;QACP,gBAAgB,EAAhB,qCAAgB;QAChB,IAAI,EAAJ,yBAAI;QACJ,MAAM,EAAN,2BAAM;QACN,UAAU,EAAV,+BAAU;QACV,QAAQ,EAAR,6BAAQ;QACR,QAAQ,EAAR,6BAAQ;QACR,UAAU,EAAV,+BAAU;QACV,MAAM,EAAN,2BAAM;QACN,UAAU,EAAV,+BAAU;QACV,eAAe,EAAf,oCAAe;QACf,OAAO,EAAP,4BAAO;KACR;IACD,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE;QAC/C,IAAI,CAAC,OAAO,CAAC,YAAY,IAAI,CAAC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YAChB,MAAM,EAAE,IAAI,EAAE,MAAM;YACpB,SAAS,EAAE,IAAI,EAAE,UAAU;YAC3B,QAAQ,EAAE,IAAI,EAAE,QAAQ;YACxB,OAAO,EAAE,IAAI,EAAE,QAAQ;SACxB;QACD,UAAU,EAAE;YACV,GAAG,IAAI,EAAE,UAAU;SACpB;QACD,IAAI,EAAE,OAAO;KACd,CAAA;AACH,CAAC;AAED,kBAAe,MAAM,CAAA"}
|
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.269.0-staging-
|
|
4
|
+
"version": "3.269.0-staging-c0a68fb0b",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/segmentio/action-destinations",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@bufbuild/protobuf": "^1.4.2",
|
|
44
44
|
"@bufbuild/protoc-gen-es": "^1.4.2",
|
|
45
45
|
"@segment/a1-notation": "^2.1.4",
|
|
46
|
-
"@segment/actions-core": "3.111.0-staging-
|
|
46
|
+
"@segment/actions-core": "3.111.0-staging-c0a68fb0b",
|
|
47
47
|
"@segment/actions-shared": "^1.93.0",
|
|
48
48
|
"@types/node": "^18.11.15",
|
|
49
49
|
"ajv-formats": "^2.1.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/amazon-ads/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,253 +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 utils_1 = require("./utils");
|
|
8
|
-
const syncAudiences_1 = __importDefault(require("./syncAudiences"));
|
|
9
|
-
const destination = {
|
|
10
|
-
name: 'Amazon Ads',
|
|
11
|
-
slug: 'actions-amazon-ads',
|
|
12
|
-
mode: 'cloud',
|
|
13
|
-
authentication: {
|
|
14
|
-
scheme: 'oauth2',
|
|
15
|
-
fields: {
|
|
16
|
-
region: {
|
|
17
|
-
label: 'Region',
|
|
18
|
-
description: 'Region for API Endpoint, either NA, EU, FE.',
|
|
19
|
-
choices: [
|
|
20
|
-
{ label: 'North America (NA)', value: 'https://advertising-api.amazon.com' },
|
|
21
|
-
{ label: 'Europe (EU)', value: 'https://advertising-api-eu.amazon.com' },
|
|
22
|
-
{ label: 'Far East (FE)', value: 'https://advertising-api-fe.amazon.com' }
|
|
23
|
-
],
|
|
24
|
-
default: 'https://advertising-api.amazon.com',
|
|
25
|
-
type: 'string',
|
|
26
|
-
required: true
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
testAuthentication: async (request, { auth, settings }) => {
|
|
30
|
-
if (!auth?.accessToken) {
|
|
31
|
-
throw new actions_core_1.InvalidAuthenticationError('Please authenticate via Oauth before enabling the destination.');
|
|
32
|
-
}
|
|
33
|
-
try {
|
|
34
|
-
await request(`${settings.region}/v2/profiles`, {
|
|
35
|
-
method: 'GET'
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
catch (e) {
|
|
39
|
-
const error = e;
|
|
40
|
-
if (error.message === 'Unauthorized') {
|
|
41
|
-
throw new Error('Invalid Amazon Oauth access token. Please reauthenticate to retrieve a valid access token before enabling the destination.');
|
|
42
|
-
}
|
|
43
|
-
throw e;
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
refreshAccessToken: async (request, { auth, settings }) => {
|
|
47
|
-
const endpoint = utils_1.AUTHORIZATION_URL[`${settings.region}`];
|
|
48
|
-
let res;
|
|
49
|
-
console.log(settings.region, auth, endpoint);
|
|
50
|
-
try {
|
|
51
|
-
res = await request('https://api.amazon.com/auth/o2/token', {
|
|
52
|
-
method: 'POST',
|
|
53
|
-
headers: {
|
|
54
|
-
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
|
|
55
|
-
},
|
|
56
|
-
body: new URLSearchParams({
|
|
57
|
-
refresh_token: auth.refreshToken,
|
|
58
|
-
client_id: auth.clientId,
|
|
59
|
-
client_secret: auth.clientSecret,
|
|
60
|
-
grant_type: 'refresh_token'
|
|
61
|
-
})
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
catch (e) {
|
|
65
|
-
console.log(e);
|
|
66
|
-
const error = e;
|
|
67
|
-
if (error.response?.data?.error === 'invalid_grant') {
|
|
68
|
-
throw new actions_core_1.IntegrationError(`Invalid Authentication: Your refresh token is invalid or expired. Please re-authenticate to fetch a new refresh token.`, actions_core_1.ErrorCodes.REFRESH_TOKEN_EXPIRED, 401);
|
|
69
|
-
}
|
|
70
|
-
throw new actions_core_1.IntegrationError(`Failed to fetch a new access token. Reason: ${error.response?.data?.error}`, actions_core_1.ErrorCodes.OAUTH_REFRESH_FAILED, 401);
|
|
71
|
-
}
|
|
72
|
-
return { accessToken: res?.data?.access_token };
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
extendRequest({ auth }) {
|
|
76
|
-
return {
|
|
77
|
-
headers: {
|
|
78
|
-
authorization: `Bearer ${auth?.accessToken}`,
|
|
79
|
-
'Amazon-Advertising-API-ClientID': process.env.ACTIONS_AMAZON_ADS_CLIENT_ID || ''
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
},
|
|
83
|
-
audienceFields: {
|
|
84
|
-
description: {
|
|
85
|
-
type: 'string',
|
|
86
|
-
label: 'Description',
|
|
87
|
-
required: true,
|
|
88
|
-
description: 'The audience description. Must be an alphanumeric, non-null string between 0 to 1000 characters in length.'
|
|
89
|
-
},
|
|
90
|
-
countryCode: {
|
|
91
|
-
type: 'string',
|
|
92
|
-
label: 'Country Code',
|
|
93
|
-
required: true,
|
|
94
|
-
description: 'A String value representing ISO 3166-1 alpha-2 country code for the members in this audience.'
|
|
95
|
-
},
|
|
96
|
-
externalAudienceId: {
|
|
97
|
-
type: 'string',
|
|
98
|
-
label: 'External Audience Id',
|
|
99
|
-
required: true,
|
|
100
|
-
description: 'The user-defined audience identifier.'
|
|
101
|
-
},
|
|
102
|
-
cpmCents: {
|
|
103
|
-
label: 'CPM Cents',
|
|
104
|
-
type: 'string',
|
|
105
|
-
description: `Cost per thousand impressions (CPM) in cents. For example, $1.00 = 100 cents.`
|
|
106
|
-
},
|
|
107
|
-
currency: {
|
|
108
|
-
label: 'Currency',
|
|
109
|
-
type: 'string',
|
|
110
|
-
description: `The price paid. Base units depend on the currency. As an example, USD should be reported as Dollars.Cents, whereas JPY should be reported as a whole number of Yen. All provided values will be rounded to two digits with toFixed(2).Refer [Aamzon Ads Documentation](https://advertising.amazon.com/API/docs/en-us/amc-advertiser-audience#tag/Audience-Metadata/operation/CreateAudienceMetadataV2) to view supported Currency`
|
|
111
|
-
},
|
|
112
|
-
ttl: {
|
|
113
|
-
type: 'string',
|
|
114
|
-
label: 'Time-to-live',
|
|
115
|
-
required: false,
|
|
116
|
-
description: 'Time-to-live in seconds. The amount of time the record is associated with the audience.'
|
|
117
|
-
},
|
|
118
|
-
advertiserId: {
|
|
119
|
-
label: 'Advertiser ID',
|
|
120
|
-
description: 'Advertiser Id',
|
|
121
|
-
type: 'string',
|
|
122
|
-
required: true
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
audienceConfig: {
|
|
126
|
-
mode: {
|
|
127
|
-
type: 'synced',
|
|
128
|
-
full_audience_sync: false
|
|
129
|
-
},
|
|
130
|
-
async createAudience(request, createAudienceInput) {
|
|
131
|
-
const { audienceName, statsContext, audienceSettings } = createAudienceInput;
|
|
132
|
-
const { statsClient, tags: statsTags } = statsContext || {};
|
|
133
|
-
const statsName = 'createAmazonAudience';
|
|
134
|
-
statsTags?.push(`slug:${destination.slug}`);
|
|
135
|
-
statsClient?.incr(`${statsName}.intialise`, 1, statsTags);
|
|
136
|
-
const endpoint = createAudienceInput.settings.region;
|
|
137
|
-
const description = audienceSettings?.description;
|
|
138
|
-
const advertiser_id = audienceSettings?.advertiserId;
|
|
139
|
-
const external_audience_id = audienceSettings?.externalAudienceId;
|
|
140
|
-
const country_code = audienceSettings?.countryCode;
|
|
141
|
-
const ttl = audienceSettings?.ttl;
|
|
142
|
-
const currency = audienceSettings?.currency;
|
|
143
|
-
const cpm_cents = audienceSettings?.cpmCents;
|
|
144
|
-
if (!advertiser_id) {
|
|
145
|
-
throw new actions_core_1.IntegrationError('Missing advertiserId Value', 'MISSING_REQUIRED_FIELD', 400);
|
|
146
|
-
}
|
|
147
|
-
if (!description) {
|
|
148
|
-
throw new actions_core_1.IntegrationError('Missing description Value', 'MISSING_REQUIRED_FIELD', 400);
|
|
149
|
-
}
|
|
150
|
-
if (!external_audience_id) {
|
|
151
|
-
throw new actions_core_1.IntegrationError('Missing externalAudienceId Value', 'MISSING_REQUIRED_FIELD', 400);
|
|
152
|
-
}
|
|
153
|
-
if (!audienceName) {
|
|
154
|
-
throw new actions_core_1.IntegrationError('Missing audienceName Value', 'MISSING_REQUIRED_FIELD', 400);
|
|
155
|
-
}
|
|
156
|
-
if (!country_code) {
|
|
157
|
-
throw new actions_core_1.IntegrationError('Missing countryCode Value', 'MISSING_REQUIRED_FIELD', 400);
|
|
158
|
-
}
|
|
159
|
-
const payload = {
|
|
160
|
-
name: audienceName,
|
|
161
|
-
description: description,
|
|
162
|
-
targetResource: {
|
|
163
|
-
advertiserId: advertiser_id
|
|
164
|
-
},
|
|
165
|
-
metadata: {
|
|
166
|
-
externalAudienceId: external_audience_id
|
|
167
|
-
},
|
|
168
|
-
countryCode: country_code
|
|
169
|
-
};
|
|
170
|
-
if (ttl) {
|
|
171
|
-
const timeToLive = Number(ttl);
|
|
172
|
-
if (!timeToLive) {
|
|
173
|
-
throw new actions_core_1.IntegrationError('TTL:-String can not be converted to Number', 'INVALID_TTL_VALUE', 400);
|
|
174
|
-
}
|
|
175
|
-
payload.metadata.ttl = timeToLive;
|
|
176
|
-
}
|
|
177
|
-
if (cpm_cents && currency) {
|
|
178
|
-
if (!utils_1.CURRENCY.includes(currency)) {
|
|
179
|
-
throw new actions_core_1.IntegrationError('Invalid Currency Value', 'INVALID_CURRENCY_VALUE', 400);
|
|
180
|
-
}
|
|
181
|
-
const cpmCents = Number(cpm_cents);
|
|
182
|
-
if (!cpmCents) {
|
|
183
|
-
throw new actions_core_1.IntegrationError('CPM_CENTS:-String can not be converted to Number', 'INVALID_CPMCENTS_VALUE', 400);
|
|
184
|
-
}
|
|
185
|
-
payload.metadata.audienceFees = [];
|
|
186
|
-
payload.metadata?.audienceFees.push({
|
|
187
|
-
currency,
|
|
188
|
-
cpmCents: cpmCents
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
statsTags?.push(`slug:${destination.slug}`);
|
|
192
|
-
statsClient?.incr(`${statsName}.call`, 1, statsTags);
|
|
193
|
-
try {
|
|
194
|
-
let payloadString = JSON.stringify(payload);
|
|
195
|
-
const regex = /"advertiserId":"(\d+)"/;
|
|
196
|
-
payloadString = payloadString.replace(regex, '"advertiserId":$1');
|
|
197
|
-
const response = await request(`${endpoint}/amc/audiences/metadata`, {
|
|
198
|
-
method: 'POST',
|
|
199
|
-
body: payloadString,
|
|
200
|
-
headers: {
|
|
201
|
-
'Content-Type': 'application/vnd.amcaudiences.v1+json'
|
|
202
|
-
}
|
|
203
|
-
});
|
|
204
|
-
const res = await response.text();
|
|
205
|
-
const resString = res.replace(/"audienceId":(\d+)/, '"audienceId":"$1"');
|
|
206
|
-
const externalId = JSON.parse(resString)['audienceId'];
|
|
207
|
-
statsClient?.incr(`${statsName}.success`, 1, statsTags);
|
|
208
|
-
return {
|
|
209
|
-
externalId
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
catch (e) {
|
|
213
|
-
statsTags?.push(`error:${e}`);
|
|
214
|
-
statsClient?.incr(`${statsName}.error`, 1, statsTags);
|
|
215
|
-
throw e;
|
|
216
|
-
}
|
|
217
|
-
},
|
|
218
|
-
async getAudience(request, getAudienceInput) {
|
|
219
|
-
const { statsContext } = getAudienceInput;
|
|
220
|
-
const audience_id = getAudienceInput.externalId;
|
|
221
|
-
const endpoint = getAudienceInput.settings.region;
|
|
222
|
-
const { statsClient, tags: statsTags } = statsContext || {};
|
|
223
|
-
const statsName = 'getAudience';
|
|
224
|
-
statsTags?.push(`slug:${destination.slug}`);
|
|
225
|
-
statsClient?.incr(`${statsName}.call`, 1, statsTags);
|
|
226
|
-
if (!audience_id) {
|
|
227
|
-
throw new actions_core_1.IntegrationError('Missing audienceId value', 'MISSING_REQUIRED_FIELD', 400);
|
|
228
|
-
}
|
|
229
|
-
try {
|
|
230
|
-
const response = await request(`${endpoint}/amc/audiences/metadata/${audience_id}`, {
|
|
231
|
-
method: 'GET'
|
|
232
|
-
});
|
|
233
|
-
const res = await response.text();
|
|
234
|
-
const resString = res.replace(/"audienceId":(\d+)/, '"audienceId":"$1"');
|
|
235
|
-
const externalId = JSON.parse(resString)['audienceId'];
|
|
236
|
-
statsClient?.incr(`${statsName}.success`, 1, statsTags);
|
|
237
|
-
return {
|
|
238
|
-
externalId
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
catch (e) {
|
|
242
|
-
statsTags?.push(`error:${e}`);
|
|
243
|
-
statsClient?.incr(`${statsName}.error`, 1, statsTags);
|
|
244
|
-
throw e;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
},
|
|
248
|
-
actions: {
|
|
249
|
-
syncAudiences: syncAudiences_1.default
|
|
250
|
-
}
|
|
251
|
-
};
|
|
252
|
-
exports.default = destination;
|
|
253
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/amazon-ads/index.ts"],"names":[],"mappings":";;;;;AACA,wDAAgG;AAGhG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AAO,EAAE,CAAC,EAAE,SAAS,CAAC,CAAA;YAEpD,IAAI,CAAC,WAAW,EAAE;gBAChB,MAAM,IAAI,+BAAgB,CAAC,0BAA0B,EAAE,wBAAwB,EAAE,GAAG,CAAC,CAAA;aACtF;YACD,IAAI;gBACF,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,GAAG,QAAQ,2BAA2B,WAAW,EAAE,EAAE;oBAClF,MAAM,EAAE,KAAK;iBACd,CAAC,CAAA;gBACF,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;gBAEjC,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,oBAAoB,EAAE,mBAAmB,CAAC,CAAA;gBACxE,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,CAAA;gBACtD,WAAW,EAAE,IAAI,CAAC,GAAG,SAAS,UAAU,EAAE,CAAC,EAAE,SAAS,CAAC,CAAA;gBACvD,OAAO;oBACL,UAAU;iBACX,CAAA;aACF;YAAC,OAAO,CAAC,EAAE;gBACV,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;gBAC7B,WAAW,EAAE,IAAI,CAAC,GAAG,SAAS,QAAQ,EAAE,CAAC,EAAE,SAAS,CAAC,CAAA;gBACrD,MAAM,CAAC,CAAA;aACR;QACH,CAAC;KACF;IACD,OAAO,EAAE;QACP,aAAa,EAAb,uBAAa;KACd;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface Payload {
|
|
2
|
-
event_name?: string;
|
|
3
|
-
externalUserId: string;
|
|
4
|
-
email?: string;
|
|
5
|
-
firstName?: string;
|
|
6
|
-
lastName?: string;
|
|
7
|
-
phone?: string;
|
|
8
|
-
postal?: string;
|
|
9
|
-
state?: string;
|
|
10
|
-
city?: string;
|
|
11
|
-
address?: string;
|
|
12
|
-
audienceId: string;
|
|
13
|
-
enable_batching: boolean;
|
|
14
|
-
batch_size?: number;
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/amazon-ads/syncAudiences/generated-types.ts"],"names":[],"mappings":""}
|