@segment/action-destinations 3.239.0 → 3.239.3
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/aggregations-io/index.js +7 -17
- package/dist/destinations/aggregations-io/index.js.map +1 -1
- package/dist/destinations/braze/trackEvent/generated-types.d.ts +0 -1
- package/dist/destinations/braze/trackEvent/index.js +0 -8
- package/dist/destinations/braze/trackEvent/index.js.map +1 -1
- package/dist/destinations/braze/trackPurchase/generated-types.d.ts +0 -1
- package/dist/destinations/braze/trackPurchase/index.js +0 -8
- package/dist/destinations/braze/trackPurchase/index.js.map +1 -1
- package/dist/destinations/braze/utils.js +11 -15
- package/dist/destinations/braze/utils.js.map +1 -1
- package/dist/destinations/criteo-audiences/criteo-audiences.js +6 -11
- package/dist/destinations/criteo-audiences/criteo-audiences.js.map +1 -1
- package/dist/destinations/display-video-360/index.js +1 -1
- package/dist/destinations/display-video-360/index.js.map +1 -1
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +1 -3
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +1 -1
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js +1 -1
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js.map +1 -1
- package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js +0 -26
- package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js.map +1 -1
- package/dist/destinations/hubspot/utils.d.ts +0 -10
- package/dist/destinations/index.js +0 -1
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/linkedin-conversions/api/api.test.js +24 -42
- package/dist/destinations/linkedin-conversions/api/api.test.js.map +1 -1
- package/dist/destinations/linkedin-conversions/api/index.js +10 -6
- package/dist/destinations/linkedin-conversions/api/index.js.map +1 -1
- package/dist/destinations/linkedin-conversions/types.d.ts +7 -4
- package/dist/destinations/tiktok-offline-conversions/common_fields.js +179 -20
- package/dist/destinations/tiktok-offline-conversions/common_fields.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions/formatter.d.ts +1 -0
- package/dist/destinations/tiktok-offline-conversions/formatter.js +11 -1
- package/dist/destinations/tiktok-offline-conversions/formatter.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions/index.js +169 -15
- package/dist/destinations/tiktok-offline-conversions/index.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/generated-types.d.ts +33 -0
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/generated-types.js.map +1 -0
- package/dist/destinations/{amazon-ads/syncAudiences → tiktok-offline-conversions/reportOfflineEvent}/index.d.ts +1 -1
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/index.js +16 -0
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/index.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions/trackNonPaymentOfflineConversion/generated-types.d.ts +25 -2
- package/dist/destinations/tiktok-offline-conversions/trackNonPaymentOfflineConversion/index.js +4 -29
- package/dist/destinations/tiktok-offline-conversions/trackNonPaymentOfflineConversion/index.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions/trackPaymentOfflineConversion/generated-types.d.ts +18 -5
- package/dist/destinations/tiktok-offline-conversions/trackPaymentOfflineConversion/index.js +5 -126
- package/dist/destinations/tiktok-offline-conversions/trackPaymentOfflineConversion/index.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions/utils.d.ts +8 -0
- package/dist/destinations/tiktok-offline-conversions/utils.js +67 -0
- package/dist/destinations/tiktok-offline-conversions/utils.js.map +1 -0
- package/package.json +2 -2
- package/dist/destinations/aggregations-io/types.d.ts +0 -8
- package/dist/destinations/aggregations-io/types.js +0 -8
- package/dist/destinations/aggregations-io/types.js.map +0 -1
- package/dist/destinations/amazon-ads/generated-types.d.ts +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 -87
- package/dist/destinations/amazon-ads/index.js.map +0 -1
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.d.ts +0 -2
- 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.js +0 -15
- package/dist/destinations/amazon-ads/syncAudiences/index.js.map +0 -1
- package/dist/destinations/amazon-ads/types.d.ts +0 -22
- package/dist/destinations/amazon-ads/types.js +0 -11
- package/dist/destinations/amazon-ads/types.js.map +0 -1
- /package/dist/destinations/{amazon-ads → tiktok-offline-conversions/reportOfflineEvent}/generated-types.js +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.performOfflineEvent = void 0;
|
|
4
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
5
|
+
const formatter_1 = require("./formatter");
|
|
6
|
+
function performOfflineEvent(request, settings, payload) {
|
|
7
|
+
const phone_numbers = formatter_1.formatPhones(payload.phone_numbers);
|
|
8
|
+
const emails = formatter_1.formatEmails(payload.email_addresses);
|
|
9
|
+
const userIds = formatter_1.formatUserIds(payload.external_ids);
|
|
10
|
+
if (phone_numbers.length < 1 && emails.length < 1 && userIds.length < 1)
|
|
11
|
+
throw new actions_core_1.PayloadValidationError('TikTok Offline Conversions API requires an email address and/or phone number and or a userId');
|
|
12
|
+
const urlTtclid = payload.url
|
|
13
|
+
? (() => {
|
|
14
|
+
try {
|
|
15
|
+
return new URL(payload.url).searchParams.get('ttclid');
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
}
|
|
19
|
+
})()
|
|
20
|
+
: undefined;
|
|
21
|
+
return request('https://business-api.tiktok.com/open_api/v1.3/event/track/', {
|
|
22
|
+
method: 'post',
|
|
23
|
+
json: {
|
|
24
|
+
event_source: 'offline',
|
|
25
|
+
event_source_id: settings.eventSetID,
|
|
26
|
+
partner_name: 'Segment',
|
|
27
|
+
data: [
|
|
28
|
+
{
|
|
29
|
+
event: payload.event,
|
|
30
|
+
event_time: payload.timestamp
|
|
31
|
+
? Math.floor(new Date(payload.timestamp).getTime() / 1000)
|
|
32
|
+
: Math.floor(new Date().getTime() / 1000),
|
|
33
|
+
event_id: payload.event_id ? `${payload.event_id}` : undefined,
|
|
34
|
+
user: {
|
|
35
|
+
ttclid: payload.ttclid ? payload.ttclid : urlTtclid ? urlTtclid : undefined,
|
|
36
|
+
external_id: userIds,
|
|
37
|
+
phone: phone_numbers,
|
|
38
|
+
email: emails,
|
|
39
|
+
lead_id: payload.lead_id ? payload.lead_id : undefined,
|
|
40
|
+
ttp: payload.ttp ? payload.ttp : undefined,
|
|
41
|
+
ip: payload.ip ? payload.ip : undefined,
|
|
42
|
+
user_agent: payload.user_agent ? payload.user_agent : undefined,
|
|
43
|
+
locale: payload.locale ? payload.locale : undefined
|
|
44
|
+
},
|
|
45
|
+
properties: {
|
|
46
|
+
contents: payload.contents ? payload.contents : [],
|
|
47
|
+
content_type: payload.content_type ? payload.content_type : undefined,
|
|
48
|
+
currency: payload.currency ? payload.currency : undefined,
|
|
49
|
+
value: payload.value ? payload.value : undefined,
|
|
50
|
+
query: payload.query ? payload.query : undefined,
|
|
51
|
+
description: payload.description ? payload.description : undefined,
|
|
52
|
+
order_id: payload.order_id ? payload.order_id : undefined,
|
|
53
|
+
shop_id: payload.shop_id ? payload.shop_id : undefined
|
|
54
|
+
},
|
|
55
|
+
page: {
|
|
56
|
+
url: payload.url ? payload.url : undefined,
|
|
57
|
+
referrer: payload.referrer ? payload.referrer : undefined
|
|
58
|
+
},
|
|
59
|
+
limited_data_use: payload.limited_data_use ? payload.limited_data_use : false,
|
|
60
|
+
test_event_code: payload.test_event_code ? payload.test_event_code : undefined
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
exports.performOfflineEvent = performOfflineEvent;
|
|
67
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/destinations/tiktok-offline-conversions/utils.ts"],"names":[],"mappings":";;;AAAA,wDAA6E;AAK7E,2CAAuE;AAOvE,SAAgB,mBAAmB,CAAC,OAAsB,EAAE,QAAkB,EAAE,OAA4B;IAC1G,MAAM,aAAa,GAAG,wBAAY,CAAC,OAAO,CAAC,aAAa,CAAC,CAAA;IACzD,MAAM,MAAM,GAAG,wBAAY,CAAC,OAAO,CAAC,eAAe,CAAC,CAAA;IACpD,MAAM,OAAO,GAAG,yBAAa,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;IAEnD,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;QACrE,MAAM,IAAI,qCAAsB,CAC9B,8FAA8F,CAC/F,CAAA;IAEH,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG;QAC3B,CAAC,CAAC,CAAC,GAAG,EAAE;YACJ,IAAI;gBACF,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;aACvD;YAAC,OAAO,KAAK,EAAE;aAEf;QACH,CAAC,CAAC,EAAE;QACN,CAAC,CAAC,SAAS,CAAA;IAEb,OAAO,OAAO,CAAC,4DAA4D,EAAE;QAC3E,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;YACJ,YAAY,EAAE,SAAS;YACvB,eAAe,EAAE,QAAQ,CAAC,UAAU;YACpC,YAAY,EAAE,SAAS;YACvB,IAAI,EAAE;gBACJ;oBACE,KAAK,EAAE,OAAO,CAAC,KAAK;oBACpB,UAAU,EAAE,OAAO,CAAC,SAAS;wBAC3B,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI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.239.
|
|
4
|
+
"version": "3.239.3",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/segmentio/action-destinations",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"__tests__/__helpers__/"
|
|
86
86
|
]
|
|
87
87
|
},
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "9c04e12c4a0e81f6b68dca0a297fb2c0209d2431"
|
|
89
89
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AggregationsAuthError = void 0;
|
|
4
|
-
const actions_core_1 = require("@segment/actions-core");
|
|
5
|
-
class AggregationsAuthError extends actions_core_1.HTTPError {
|
|
6
|
-
}
|
|
7
|
-
exports.AggregationsAuthError = AggregationsAuthError;
|
|
8
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/destinations/aggregations-io/types.ts"],"names":[],"mappings":";;;AAAA,wDAAiD;AAEjD,MAAa,qBAAsB,SAAQ,wBAAS;CAMnD;AAND,sDAMC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/amazon-ads/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,87 +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 syncAudiences_1 = __importDefault(require("./syncAudiences"));
|
|
8
|
-
const destination = {
|
|
9
|
-
name: 'Amazon Ads',
|
|
10
|
-
slug: 'actions-amazon-ads',
|
|
11
|
-
mode: 'cloud',
|
|
12
|
-
authentication: {
|
|
13
|
-
scheme: 'oauth2',
|
|
14
|
-
fields: {
|
|
15
|
-
region: {
|
|
16
|
-
label: 'Region',
|
|
17
|
-
description: 'Region for API Endpoint, either NA, EU, FE.',
|
|
18
|
-
choices: [
|
|
19
|
-
{ label: 'North America (NA)', value: 'https://advertising-api.amazon.com' },
|
|
20
|
-
{ label: 'Europe (EU)', value: 'https://advertising-api-eu.amazon.com' },
|
|
21
|
-
{ label: 'Far East (FE)', value: 'https://advertising-api-fe.amazon.com' }
|
|
22
|
-
],
|
|
23
|
-
default: 'North America (NA)',
|
|
24
|
-
type: 'string',
|
|
25
|
-
required: true
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
testAuthentication: async (request, { auth }) => {
|
|
29
|
-
if (!auth?.accessToken) {
|
|
30
|
-
throw new actions_core_1.InvalidAuthenticationError('Please authenticate via Oauth before enabling the destination.');
|
|
31
|
-
}
|
|
32
|
-
try {
|
|
33
|
-
await request('https://advertising-api.amazon.com/v2/profiles', {
|
|
34
|
-
method: 'GET'
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
catch (e) {
|
|
38
|
-
const error = e;
|
|
39
|
-
if (error.message === 'Unauthorized') {
|
|
40
|
-
throw new Error('Invalid Amazon Oauth access token. Please reauthenticate to retrieve a valid access token before enabling the destination.');
|
|
41
|
-
}
|
|
42
|
-
throw e;
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
refreshAccessToken: async (request, { auth }) => {
|
|
46
|
-
let res;
|
|
47
|
-
try {
|
|
48
|
-
res = await request('https://api.amazon.com/auth/o2/token', {
|
|
49
|
-
method: 'POST',
|
|
50
|
-
body: new URLSearchParams({
|
|
51
|
-
refresh_token: auth.refreshToken,
|
|
52
|
-
client_id: auth.clientId,
|
|
53
|
-
client_secret: auth.clientSecret,
|
|
54
|
-
grant_type: 'refresh_token'
|
|
55
|
-
})
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
catch (e) {
|
|
59
|
-
const error = e;
|
|
60
|
-
if (error.response?.data?.error === 'invalid_grant') {
|
|
61
|
-
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);
|
|
62
|
-
}
|
|
63
|
-
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);
|
|
64
|
-
}
|
|
65
|
-
return { accessToken: res?.data?.access_token };
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
extendRequest({ auth }) {
|
|
69
|
-
return {
|
|
70
|
-
headers: {
|
|
71
|
-
authorization: `Bearer ${auth?.accessToken}`
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
},
|
|
75
|
-
audienceFields: {},
|
|
76
|
-
audienceConfig: {
|
|
77
|
-
mode: {
|
|
78
|
-
type: 'synced',
|
|
79
|
-
full_audience_sync: false
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
actions: {
|
|
83
|
-
syncAudiences: syncAudiences_1.default
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
exports.default = destination;
|
|
87
|
-
//# 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;AAIhG,oEAA2C;AAG3C,MAAM,WAAW,GAA4C;IAC3D,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,oBAAoB;IAC1B,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,6CAA6C;gBAC1D,OAAO,EAAE;oBACP,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AC1C,IAAI,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,KAAK,KAAK,eAAe,EAAE;oBACnD,MAAM,IAAI,+BAAgB,CACxB,wHAAwH,EACxH,yBAAU,CAAC,qBAAqB,EAChC,GAAG,CACJ,CAAA;iBACF;gBAED,MAAM,IAAI,+BAAgB,CACxB,+CAA+C,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAC5E,yBAAU,CAAC,oBAAoB,EAC/B,GAAG,CACJ,CAAA;aACF;YAED,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE,CAAA;QACjD,CAAC;KACF;IACD,aAAa,CAAC,EAAE,IAAI,EAAE;QACpB,OAAO;YACL,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,IAAI,EAAE,WAAW,EAAE;aAC7C;SACF,CAAA;IACH,CAAC;IAED,cAAc,EAAE,EAAE;IAElB,cAAc,EAAE;QACd,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,kBAAkB,EAAE,KAAK;SAC1B;KAWF;IACD,OAAO,EAAE;QACP,aAAa,EAAb,uBAAa;KACd;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/amazon-ads/syncAudiences/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const action = {
|
|
4
|
-
title: 'Sync Audiences',
|
|
5
|
-
description: 'Sync audiences from Segment to Amazon Ads Audience.',
|
|
6
|
-
fields: {},
|
|
7
|
-
perform: (request, data) => {
|
|
8
|
-
return request('https://example.com', {
|
|
9
|
-
method: 'post',
|
|
10
|
-
json: data.payload
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
exports.default = action;
|
|
15
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/amazon-ads/syncAudiences/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,qDAAqD;IAClE,MAAM,EAAE,EAAE;IACV,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QACzB,OAAO,OAAO,CAAC,qBAAqB,EAAE;YACpC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,OAAO;SACnB,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { HTTPError } from '@segment/actions-core';
|
|
2
|
-
export interface RefreshTokenResponse {
|
|
3
|
-
access_token: string;
|
|
4
|
-
scope: string;
|
|
5
|
-
expires_in: number;
|
|
6
|
-
token_type: string;
|
|
7
|
-
}
|
|
8
|
-
export declare class AmazonTestAuthenticationError extends HTTPError {
|
|
9
|
-
response: Response & {
|
|
10
|
-
data: {
|
|
11
|
-
message: string;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
export declare class AmazonRefreshTokenError extends HTTPError {
|
|
16
|
-
response: Response & {
|
|
17
|
-
data: {
|
|
18
|
-
error: string;
|
|
19
|
-
error_description: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AmazonRefreshTokenError = exports.AmazonTestAuthenticationError = void 0;
|
|
4
|
-
const actions_core_1 = require("@segment/actions-core");
|
|
5
|
-
class AmazonTestAuthenticationError extends actions_core_1.HTTPError {
|
|
6
|
-
}
|
|
7
|
-
exports.AmazonTestAuthenticationError = AmazonTestAuthenticationError;
|
|
8
|
-
class AmazonRefreshTokenError extends actions_core_1.HTTPError {
|
|
9
|
-
}
|
|
10
|
-
exports.AmazonRefreshTokenError = AmazonRefreshTokenError;
|
|
11
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/destinations/amazon-ads/types.ts"],"names":[],"mappings":";;;AAAA,wDAAiD;AAajD,MAAa,6BAA8B,SAAQ,wBAAS;CAM3D;AAND,sEAMC;AAED,MAAa,uBAAwB,SAAQ,wBAAS;CAOrD;AAPD,0DAOC"}
|
|
File without changes
|