@segment/action-destinations 3.267.1-staging-56c8f3280 → 3.267.1-staging-6134ff56b

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.
Files changed (120) hide show
  1. package/dist/destinations/amazon-ads/generated-types.d.ts +2 -2
  2. package/dist/destinations/amazon-ads/index.js +12 -4
  3. package/dist/destinations/amazon-ads/index.js.map +1 -1
  4. package/dist/destinations/dynamic-yield-audiences/syncAudience/types.d.ts +22 -0
  5. package/dist/destinations/dynamic-yield-audiences/syncAudience/types.js.map +1 -0
  6. package/dist/destinations/dynamic-yield-audiences/types.d.ts +8 -0
  7. package/dist/destinations/dynamic-yield-audiences/types.js +12 -0
  8. package/dist/destinations/dynamic-yield-audiences/types.js.map +1 -0
  9. package/dist/destinations/engage/sendgrid/Profile.d.ts +6 -0
  10. package/dist/destinations/{engage-messaging-sendgrid/sendEmail/UnlayerResponse.js → engage/sendgrid/Profile.js} +1 -1
  11. package/dist/destinations/engage/sendgrid/Profile.js.map +1 -0
  12. package/dist/destinations/{engage-messaging-sendgrid/previewApiLookup/apiLookups.d.ts → engage/sendgrid/previewApiLookup/api-lookups.d.ts} +2 -3
  13. package/dist/destinations/{engage-messaging-sendgrid/previewApiLookup/apiLookups.js → engage/sendgrid/previewApiLookup/api-lookups.js} +37 -52
  14. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js.map +1 -0
  15. package/dist/destinations/engage/utils/track.d.ts +10 -10
  16. package/dist/destinations/engage-messaging-sendgrid/index.d.ts +3 -4
  17. package/dist/destinations/engage-messaging-sendgrid/index.js +16 -68
  18. package/dist/destinations/engage-messaging-sendgrid/index.js.map +1 -1
  19. package/dist/destinations/engage-messaging-twilio/index.d.ts +3 -4
  20. package/dist/destinations/engage-messaging-twilio/index.js +15 -169
  21. package/dist/destinations/engage-messaging-twilio/index.js.map +1 -1
  22. package/dist/destinations/mixpanel/utils.d.ts +13 -0
  23. package/dist/destinations/mixpanel/utils.js +117 -0
  24. package/dist/destinations/mixpanel/utils.js.map +1 -0
  25. package/dist/destinations/responsys/asyncMergePetRecords/generated-types.d.ts +14 -0
  26. package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js.map +1 -0
  27. package/dist/destinations/{engage-messaging-sendgrid/previewApiLookup → responsys/asyncMergePetRecords}/index.d.ts +2 -2
  28. package/dist/destinations/responsys/asyncMergePetRecords/index.js +113 -0
  29. package/dist/destinations/responsys/asyncMergePetRecords/index.js.map +1 -0
  30. package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.d.ts +20 -0
  31. package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.js.map +1 -0
  32. package/dist/destinations/{engage-messaging-sendgrid/sendEmail → responsys/asyncMergeProfileListMembers}/index.d.ts +2 -2
  33. package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js +174 -0
  34. package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js.map +1 -0
  35. package/dist/destinations/responsys/rsp-operations.d.ts +14 -0
  36. package/dist/destinations/responsys/rsp-operations.js +33 -0
  37. package/dist/destinations/responsys/rsp-operations.js.map +1 -0
  38. package/dist/destinations/responsys/rsp-properties.d.ts +4 -0
  39. package/dist/destinations/responsys/rsp-properties.js +27 -0
  40. package/dist/destinations/responsys/rsp-properties.js.map +1 -0
  41. package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.d.ts +1 -0
  42. package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.js +381 -0
  43. package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.js.map +1 -0
  44. package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.d.ts +1 -0
  45. package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.js +581 -0
  46. package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.js.map +1 -0
  47. package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.d.ts +4 -0
  48. package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.js +97 -0
  49. package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.js.map +1 -0
  50. package/dist/destinations/snap-conversions-api/snap-capi-properties.d.ts +30 -0
  51. package/dist/destinations/snap-conversions-api/snap-capi-properties.js +316 -0
  52. package/dist/destinations/snap-conversions-api/snap-capi-properties.js.map +1 -0
  53. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.d.ts +3 -0
  54. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js +34 -0
  55. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js.map +1 -0
  56. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.d.ts +3 -0
  57. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js +43 -0
  58. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js.map +1 -0
  59. package/package.json +2 -2
  60. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/apiLookups.js.map +0 -1
  61. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/generated-types.d.ts +0 -16
  62. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/generated-types.js.map +0 -1
  63. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/index.js +0 -29
  64. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/index.js.map +0 -1
  65. package/dist/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.d.ts +0 -43
  66. package/dist/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.js +0 -419
  67. package/dist/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.js.map +0 -1
  68. package/dist/destinations/engage-messaging-sendgrid/sendEmail/UnlayerResponse.d.ts +0 -12
  69. package/dist/destinations/engage-messaging-sendgrid/sendEmail/UnlayerResponse.js.map +0 -1
  70. package/dist/destinations/engage-messaging-sendgrid/sendEmail/generated-types.d.ts +0 -56
  71. package/dist/destinations/engage-messaging-sendgrid/sendEmail/generated-types.js.map +0 -1
  72. package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js +0 -258
  73. package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js.map +0 -1
  74. package/dist/destinations/engage-messaging-sendgrid/sendEmail/insertEmailPreviewText.d.ts +0 -1
  75. package/dist/destinations/engage-messaging-sendgrid/sendEmail/insertEmailPreviewText.js +0 -23
  76. package/dist/destinations/engage-messaging-sendgrid/sendEmail/insertEmailPreviewText.js.map +0 -1
  77. package/dist/destinations/engage-messaging-sendgrid/sendEmail/isRestrictedDomain.d.ts +0 -1
  78. package/dist/destinations/engage-messaging-sendgrid/sendEmail/isRestrictedDomain.js +0 -14
  79. package/dist/destinations/engage-messaging-sendgrid/sendEmail/isRestrictedDomain.js.map +0 -1
  80. package/dist/destinations/engage-messaging-twilio/sendMobilePush/PushSender.d.ts +0 -29
  81. package/dist/destinations/engage-messaging-twilio/sendMobilePush/PushSender.js +0 -169
  82. package/dist/destinations/engage-messaging-twilio/sendMobilePush/PushSender.js.map +0 -1
  83. package/dist/destinations/engage-messaging-twilio/sendMobilePush/generated-types.d.ts +0 -39
  84. package/dist/destinations/engage-messaging-twilio/sendMobilePush/generated-types.js +0 -3
  85. package/dist/destinations/engage-messaging-twilio/sendMobilePush/generated-types.js.map +0 -1
  86. package/dist/destinations/engage-messaging-twilio/sendMobilePush/index.d.ts +0 -5
  87. package/dist/destinations/engage-messaging-twilio/sendMobilePush/index.js +0 -251
  88. package/dist/destinations/engage-messaging-twilio/sendMobilePush/index.js.map +0 -1
  89. package/dist/destinations/engage-messaging-twilio/sendSms/SmsMessageSender.d.ts +0 -9
  90. package/dist/destinations/engage-messaging-twilio/sendSms/SmsMessageSender.js +0 -72
  91. package/dist/destinations/engage-messaging-twilio/sendSms/SmsMessageSender.js.map +0 -1
  92. package/dist/destinations/engage-messaging-twilio/sendSms/generated-types.d.ts +0 -27
  93. package/dist/destinations/engage-messaging-twilio/sendSms/generated-types.js +0 -3
  94. package/dist/destinations/engage-messaging-twilio/sendSms/generated-types.js.map +0 -1
  95. package/dist/destinations/engage-messaging-twilio/sendSms/index.d.ts +0 -5
  96. package/dist/destinations/engage-messaging-twilio/sendSms/index.js +0 -163
  97. package/dist/destinations/engage-messaging-twilio/sendSms/index.js.map +0 -1
  98. package/dist/destinations/engage-messaging-twilio/sendWhatsApp/WhatsAppMessageSender.d.ts +0 -9
  99. package/dist/destinations/engage-messaging-twilio/sendWhatsApp/WhatsAppMessageSender.js +0 -89
  100. package/dist/destinations/engage-messaging-twilio/sendWhatsApp/WhatsAppMessageSender.js.map +0 -1
  101. package/dist/destinations/engage-messaging-twilio/sendWhatsApp/generated-types.d.ts +0 -25
  102. package/dist/destinations/engage-messaging-twilio/sendWhatsApp/generated-types.js +0 -3
  103. package/dist/destinations/engage-messaging-twilio/sendWhatsApp/generated-types.js.map +0 -1
  104. package/dist/destinations/engage-messaging-twilio/sendWhatsApp/index.d.ts +0 -5
  105. package/dist/destinations/engage-messaging-twilio/sendWhatsApp/index.js +0 -137
  106. package/dist/destinations/engage-messaging-twilio/sendWhatsApp/index.js.map +0 -1
  107. package/dist/destinations/engage-messaging-twilio/utils/PhoneMessageSender.d.ts +0 -16
  108. package/dist/destinations/engage-messaging-twilio/utils/PhoneMessageSender.js +0 -71
  109. package/dist/destinations/engage-messaging-twilio/utils/PhoneMessageSender.js.map +0 -1
  110. package/dist/destinations/engage-messaging-twilio/utils/TwilioMessageSender.d.ts +0 -16
  111. package/dist/destinations/engage-messaging-twilio/utils/TwilioMessageSender.js +0 -115
  112. package/dist/destinations/engage-messaging-twilio/utils/TwilioMessageSender.js.map +0 -1
  113. package/dist/destinations/engage-messaging-twilio/utils/index.d.ts +0 -2
  114. package/dist/destinations/engage-messaging-twilio/utils/index.js +0 -15
  115. package/dist/destinations/engage-messaging-twilio/utils/index.js.map +0 -1
  116. package/dist/destinations/engage-messaging-twilio/utils/types.d.ts +0 -23
  117. package/dist/destinations/engage-messaging-twilio/utils/types.js.map +0 -1
  118. /package/dist/destinations/{engage-messaging-twilio/utils → dynamic-yield-audiences/syncAudience}/types.js +0 -0
  119. /package/dist/destinations/{engage-messaging-sendgrid/previewApiLookup → responsys/asyncMergePetRecords}/generated-types.js +0 -0
  120. /package/dist/destinations/{engage-messaging-sendgrid/sendEmail → responsys/asyncMergeProfileListMembers}/generated-types.js +0 -0
@@ -5,8 +5,8 @@ export interface AudienceSettings {
5
5
  description: string;
6
6
  countryCode: string;
7
7
  externalAudienceId: string;
8
- cpmCents?: number;
8
+ cpmCents?: string;
9
9
  currency?: string;
10
- ttl?: number;
10
+ ttl?: string;
11
11
  advertiserId: string;
12
12
  }
@@ -101,7 +101,7 @@ const destination = {
101
101
  },
102
102
  cpmCents: {
103
103
  label: 'CPM Cents',
104
- type: 'number',
104
+ type: 'string',
105
105
  description: `Cost per thousand impressions (CPM) in cents. For example, $1.00 = 100 cents.`
106
106
  },
107
107
  currency: {
@@ -110,7 +110,7 @@ const destination = {
110
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
111
  },
112
112
  ttl: {
113
- type: 'number',
113
+ type: 'string',
114
114
  label: 'Time-to-live',
115
115
  required: false,
116
116
  description: 'Time-to-live in seconds. The amount of time the record is associated with the audience.'
@@ -168,16 +168,24 @@ const destination = {
168
168
  countryCode: country_code
169
169
  };
170
170
  if (ttl) {
171
- payload.metadata.ttl = 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;
172
176
  }
173
177
  if (cpm_cents && currency) {
174
178
  if (!utils_1.CURRENCY.includes(currency)) {
175
179
  throw new actions_core_1.IntegrationError('Invalid Currency Value', 'INVALID_CURRENCY_VALUE', 400);
176
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
+ }
177
185
  payload.metadata.audienceFees = [];
178
186
  payload.metadata?.audienceFees.push({
179
187
  currency,
180
- cpmCents: cpm_cents
188
+ cpmCents: cpmCents
181
189
  });
182
190
  }
183
191
  statsTags?.push(`slug:${destination.slug}`);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/amazon-ads/index.ts"],"names":[],"mappings":";;;;;AACA,wDAAgG;AAGhG,mCAAsE;AAEtE,oEAA2C;AAE3C,MAAM,WAAW,GAA8D;IAC7E,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,EAAE,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,oCAAoC,EAAE;oBAC5E,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,uCAAuC,EAAE;oBACxE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,uCAAuC,EAAE;iBAC3E;gBACD,OAAO,EAAE,oCAAoC;gBAC7C,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;YACxD,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE;gBACtB,MAAM,IAAI,yCAA0B,CAAC,gEAAgE,CAAC,CAAA;aACvG;YAED,IAAI;gBACF,MAAM,OAAO,CAAuB,GAAG,QAAQ,CAA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AC,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"}
@@ -0,0 +1,22 @@
1
+ import { Payload } from './generated-types';
2
+ export interface Data {
3
+ payload: Payload & {
4
+ context?: {
5
+ [k: string]: unknown;
6
+ personas?: {
7
+ computation_key?: string;
8
+ computation_class?: string;
9
+ };
10
+ };
11
+ };
12
+ rawData?: {
13
+ context?: {
14
+ personas?: {
15
+ computation_key?: string;
16
+ computation_class?: string;
17
+ };
18
+ };
19
+ properties?: Record<string, boolean>;
20
+ traits?: Record<string, boolean>;
21
+ };
22
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/destinations/dynamic-yield-audiences/syncAudience/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ export declare type AudienceAction = 'ADD' | 'REMOVE';
2
+ export declare enum Priority {
3
+ UserIdThenEmail = "user_id_then_email",
4
+ UserIdThenAnonymousId = "user_id_then_anonymousId",
5
+ UserIdThenEmailThenAnonymousId = "user_id_then_email_then_anonymousId",
6
+ UserIdOnly = "user_id_only",
7
+ EmailOnly = "email_only"
8
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Priority = void 0;
4
+ var Priority;
5
+ (function (Priority) {
6
+ Priority["UserIdThenEmail"] = "user_id_then_email";
7
+ Priority["UserIdThenAnonymousId"] = "user_id_then_anonymousId";
8
+ Priority["UserIdThenEmailThenAnonymousId"] = "user_id_then_email_then_anonymousId";
9
+ Priority["UserIdOnly"] = "user_id_only";
10
+ Priority["EmailOnly"] = "email_only";
11
+ })(Priority = exports.Priority || (exports.Priority = {}));
12
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/destinations/dynamic-yield-audiences/types.ts"],"names":[],"mappings":";;;AAEA,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,kDAAsC,CAAA;IACtC,8DAAkD,CAAA;IAClD,kFAAsE,CAAA;IACtE,uCAA2B,CAAA;IAC3B,oCAAwB,CAAA;AAC1B,CAAC,EANW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAMnB"}
@@ -0,0 +1,6 @@
1
+ export interface Profile {
2
+ user_id?: string;
3
+ anonymous_id?: string;
4
+ email?: string;
5
+ traits: Record<string, string>;
6
+ }
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=UnlayerResponse.js.map
3
+ //# sourceMappingURL=Profile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Profile.js","sourceRoot":"","sources":["../../../../src/destinations/engage/sendgrid/Profile.ts"],"names":[],"mappings":""}
@@ -2,7 +2,7 @@ import { InputField } from '@segment/actions-core';
2
2
  import { RequestClient } from '@segment/actions-core';
3
3
  import { Logger, StatsClient, DataFeedCache } from '@segment/actions-core/destination-kit';
4
4
  import type { Settings } from '../generated-types';
5
- import { Profile } from '@segment/actions-shared';
5
+ import { Profile } from '../Profile';
6
6
  export declare type ApiLookupConfig = {
7
7
  id?: string | undefined;
8
8
  name: string;
@@ -12,11 +12,10 @@ export declare type ApiLookupConfig = {
12
12
  body?: string | undefined;
13
13
  headers?: object | undefined;
14
14
  responseType: string;
15
- shouldRetryOnRetryableError?: boolean;
16
15
  };
17
16
  export declare const getRequestId: ({ method, url, body, headers }: ApiLookupConfig) => string;
18
17
  export declare const getCachedResponse: ({ responseType }: ApiLookupConfig, requestId: string, dataFeedCache: DataFeedCache, datafeedTags: string[]) => Promise<any>;
19
18
  export declare const performApiLookup: (request: RequestClient, apiLookupConfig: ApiLookupConfig, profile: Profile, statsClient: StatsClient | undefined, tags: string[], settings: Settings, logger?: Logger | undefined, dataFeedCache?: DataFeedCache | undefined) => Promise<any>;
20
19
  export declare const apiLookupActionFields: Record<string, InputField>;
21
- export declare const apiLookupLiquidKey = "datafeeds";
20
+ export declare const apiLookupLiquidKey = "lookups";
22
21
  export declare const FLAGON_NAME_DATA_FEEDS = "is-datafeeds-enabled";
@@ -5,24 +5,25 @@ const crypto_1 = require("crypto");
5
5
  const actions_core_1 = require("@segment/actions-core");
6
6
  const liquidjs_1 = require("liquidjs");
7
7
  const Liquid = new liquidjs_1.Liquid();
8
- const renderLiquidFields = async ({ url, body }, profile, datafeedTags, logDataFeedError) => {
8
+ const maxResponseSizeBytes = 1000000;
9
+ const renderLiquidFields = async ({ id, url, body }, profile, datafeedTags, settings, logger) => {
9
10
  let renderedUrl;
10
11
  let renderedBody;
11
12
  try {
12
13
  renderedUrl = await Liquid.parseAndRender(url, { profile });
13
14
  }
14
15
  catch (error) {
15
- logDataFeedError('URL liquid render failuere', error);
16
- datafeedTags.push('error:true', 'reason:rendering_failure', 'rendering:url');
17
- throw new actions_core_1.IntegrationError('Unable to parse data feed url', 'DATA_FEED_RENDERING_ERROR', 400);
16
+ logger?.error(`TE Messaging: Email datafeed url parse failure - api lookup id: ${id} - ${settings.spaceId} - [${error}]`);
17
+ datafeedTags.push('error:true', `error_message:${error?.message}`, 'reason:rendering_failure', 'rendering:url');
18
+ throw new actions_core_1.IntegrationError('Unable to parse email api lookup url', 'api lookup url parse failure', 400);
18
19
  }
19
20
  try {
20
21
  renderedBody = body ? await Liquid.parseAndRender(body, { profile }) : undefined;
21
22
  }
22
23
  catch (error) {
23
- logDataFeedError('Body liquid render failure', error);
24
- datafeedTags.push('error:true', 'reason:rendering_failure', 'rendering:body');
25
- throw new actions_core_1.IntegrationError('Unable to parse email api lookup body', 'DATA_FEED_RENDERING_ERROR', 400);
24
+ logger?.error(`TE Messaging: Email datafeed body parse failure - api lookup id: ${id} - ${settings.spaceId} - [${error}]`);
25
+ datafeedTags.push('error:true', `error_message:${error?.message}`, 'reason:rendering_failure', 'rendering:body');
26
+ throw new actions_core_1.IntegrationError('Unable to parse email api lookup body', 'api lookup body parse failure', 400);
26
27
  }
27
28
  return {
28
29
  renderedUrl,
@@ -37,7 +38,7 @@ const getRequestId = ({ method, url, body, headers }) => {
37
38
  };
38
39
  exports.getRequestId = getRequestId;
39
40
  const getCachedResponse = async ({ responseType }, requestId, dataFeedCache, datafeedTags) => {
40
- const cachedResponse = await dataFeedCache.getRequestResponse(requestId);
41
+ const cachedResponse = await dataFeedCache?.getRequestResponse(requestId);
41
42
  if (!cachedResponse) {
42
43
  datafeedTags.push('cache_hit:false');
43
44
  return;
@@ -50,26 +51,17 @@ const getCachedResponse = async ({ responseType }, requestId, dataFeedCache, dat
50
51
  };
51
52
  exports.getCachedResponse = getCachedResponse;
52
53
  const performApiLookup = async (request, apiLookupConfig, profile, statsClient, tags, settings, logger, dataFeedCache) => {
53
- const { id, method, headers, cacheTtl, name, shouldRetryOnRetryableError = true } = apiLookupConfig;
54
+ const { id, method, headers, cacheTtl, name } = apiLookupConfig;
54
55
  const datafeedTags = [
55
56
  ...tags,
56
57
  `datafeed_id:${id}`,
57
58
  `datafeed_name:${name}`,
58
59
  `space_id:${settings.spaceId}`,
59
- `cache_ttl_greater_than_0:${cacheTtl > 0}`,
60
- `retry_enabled:${shouldRetryOnRetryableError}`
60
+ `cache_ttl_greater_than_0:${cacheTtl > 0}`
61
61
  ];
62
- const logDataFeedError = (message, error) => {
63
- logger?.error(`TE Messaging: Data feed error - message: ${message} - data feed name: ${name} - data feed id: ${id} - space id: ${settings.spaceId} - raw error: ${error}`);
64
- };
65
62
  try {
66
- const { renderedUrl, renderedBody } = await renderLiquidFields(apiLookupConfig, profile, datafeedTags, logDataFeedError);
63
+ const { renderedUrl, renderedBody } = await renderLiquidFields(apiLookupConfig, profile, datafeedTags, settings, logger);
67
64
  const requestId = exports.getRequestId({ ...apiLookupConfig, url: renderedUrl, body: renderedBody });
68
- if (cacheTtl > 0 && !dataFeedCache) {
69
- logDataFeedError('Data feed cache not available and cache needed');
70
- datafeedTags.push('cache_set:false');
71
- throw new actions_core_1.IntegrationError('Data feed cache not available and cache needed', 'DATA_FEED_CACHE_NOT_AVAILABLE', 400);
72
- }
73
65
  if (cacheTtl > 0 && dataFeedCache) {
74
66
  const cachedResponse = await exports.getCachedResponse(apiLookupConfig, requestId, dataFeedCache, datafeedTags);
75
67
  if (cachedResponse) {
@@ -90,45 +82,43 @@ const performApiLookup = async (request, apiLookupConfig, profile, statsClient,
90
82
  }
91
83
  catch (error) {
92
84
  const respError = error.response;
93
- logDataFeedError('Data feed call failure', error);
94
- datafeedTags.push(`error:true`, `error_status:${respError?.status}`, 'reason:api_call_failure');
95
- if (shouldRetryOnRetryableError) {
96
- throw error;
97
- }
98
- return {};
85
+ logger?.error(`TE Messaging: Email api lookup failure - api lookup id: ${id} - ${settings.spaceId} - [${error}]`);
86
+ datafeedTags.push(`error:true`, `error_message:${error.message}`, `error_status:${respError?.status}`, 'reason:api_call_failure');
87
+ throw error;
99
88
  }
100
- if (cacheTtl > 0 && dataFeedCache) {
101
- const dataString = JSON.stringify(data);
102
- const size = Buffer.byteLength(dataString, 'utf-8');
103
- if (size > dataFeedCache.maxResponseSizeBytes) {
104
- datafeedTags.push('error:true', 'reason:response_size_too_big');
105
- logDataFeedError('Data feed response size too big too cache and caching needed, failing send');
106
- throw new actions_core_1.IntegrationError('Data feed response size too big too cache and caching needed, failing send', 'DATA_FEED_RESPONSE_TOO_BIG', 400);
107
- }
108
- try {
109
- await dataFeedCache.setRequestResponse(requestId, dataString, cacheTtl / 1000);
110
- datafeedTags.push('cache_set:true');
89
+ const dataString = JSON.stringify(data);
90
+ const size = Buffer.byteLength(dataString, 'utf-8');
91
+ datafeedTags.push(`response_size_greater_than_mb:${size > maxResponseSizeBytes}`);
92
+ if (cacheTtl > 0) {
93
+ if (size <= maxResponseSizeBytes) {
94
+ try {
95
+ await dataFeedCache?.setRequestResponse(requestId, dataString, cacheTtl / 1000);
96
+ datafeedTags.push('cache_set:true');
97
+ }
98
+ catch (err) {
99
+ logger?.error(`TE Messaging: Email api lookup cache set failure - api lookup id: ${id} - ${settings.spaceId} - [${err}]`);
100
+ datafeedTags.push('cache_set:false');
101
+ datafeedTags.push('error:true', 'reason:cache_set_failure', `error_message:${err?.message}`);
102
+ throw err;
103
+ }
111
104
  }
112
- catch (error) {
113
- logDataFeedError('Data feed cache set failure', error);
114
- datafeedTags.push('error:true', 'reason:cache_set_failure', 'cache_set:false');
115
- throw error;
105
+ else {
106
+ datafeedTags.push('cache_set:false');
116
107
  }
117
108
  }
118
- datafeedTags.push('error:false');
119
109
  return data;
120
110
  }
121
111
  catch (error) {
122
112
  const isErrorCapturedInTags = datafeedTags.find((str) => str.includes('error:true'));
123
113
  if (!isErrorCapturedInTags) {
124
- datafeedTags.push('error:true', 'reason:unknown');
114
+ datafeedTags.push('error:true', `error_message:${error?.message}`, 'reason:unknown');
125
115
  }
126
116
  tags.push('reason:datafeed_failure');
127
- logDataFeedError('Unexpected data feed error', error);
117
+ logger?.error(`TE Messaging: Email api lookup failure - api lookup id: ${id} - ${settings.spaceId} - [${error}]`);
128
118
  throw error;
129
119
  }
130
120
  finally {
131
- statsClient?.incr('datafeed_execution', 1, datafeedTags);
121
+ statsClient?.incr('datafeed-execution', 1, datafeedTags);
132
122
  }
133
123
  };
134
124
  exports.performApiLookup = performApiLookup;
@@ -177,13 +167,8 @@ exports.apiLookupActionFields = {
177
167
  description: 'The response type of the request. Currently only supporting JSON.',
178
168
  type: 'string',
179
169
  required: true
180
- },
181
- shouldRetryOnRetryableError: {
182
- label: 'Should Retry',
183
- description: 'Whether the message should be retried (if the error code is retryable) when the data feed fails or if it should be sent with empty data instead',
184
- type: 'boolean'
185
170
  }
186
171
  };
187
- exports.apiLookupLiquidKey = 'datafeeds';
172
+ exports.apiLookupLiquidKey = 'lookups';
188
173
  exports.FLAGON_NAME_DATA_FEEDS = 'is-datafeeds-enabled';
189
- //# sourceMappingURL=apiLookups.js.map
174
+ //# sourceMappingURL=api-lookups.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-lookups.js","sourceRoot":"","sources":["../../../../../src/destinations/engage/sendgrid/previewApiLookup/api-lookups.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AACnC,wDAAwD;AAKxD,uCAA6C;AAI7C,MAAM,MAAM,GAAG,IAAI,iBAAQ,EAAE,CAAA;AAE7B,MAAM,oBAAoB,GAAG,OAAO,CAAA;AAcpC,MAAM,kBAAkB,GAAG,KAAK,EAC9B,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAgD,EAC/D,OAAgB,EAChB,YAAsB,EACtB,QAAkB,EAClB,MAA2B,EAC3B,EAAE;IACF,IAAI,WAAmB,CAAA;IACvB,IAAI,YAAgC,CAAA;IACpC,IAAI;QACF,WAAW,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC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AA+B;IAC/D,EAAE,EAAE;QACF,KAAK,EAAE,IAAI;QACX,WAAW,EAAE,6DAA6D;QAC1E,IAAI,EAAE,QAAQ;KACf;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM;QACb,WAAW,EAAE,wDAAwD;QACrE,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;KACf;IACD,GAAG,EAAE;QACH,KAAK,EAAE,KAAK;QACZ,WAAW,EAAE,0BAA0B;QACvC,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;KACf;IACD,MAAM,EAAE;QACN,KAAK,EAAE,gBAAgB;QACvB,WAAW,EAAE,wCAAwC;QACrD,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;KACf;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,WAAW;QAClB,WAAW,EAAE,qBAAqB;QAClC,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,IAAI;KACf;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,uDAAuD;QACpE,IAAI,EAAE,QAAQ;KACf;IACD,OAAO,EAAE;QACP,KAAK,EAAE,iBAAiB;QACxB,WAAW,EAAE,6CAA6C;QAC1D,IAAI,EAAE,QAAQ;KACf;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,eAAe;QACtB,WAAW,EAAE,mEAAmE;QAChF,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;KACf;CACF,CAAA;AAEY,QAAA,kBAAkB,GAAG,SAAS,CAAA;AAE9B,QAAA,sBAAsB,GAAG,sBAAsB,CAAA"}
@@ -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
- } & {
5
3
  onError?: ((ctx: import("./operationTracking").OperationErrorHandlerContext<import("./operationTracking").TryCatchFinallyContext<(this: any, ...args: any[]) => any>>) => void) | undefined;
6
4
  } & {
7
5
  onTry?: ((ctx: import("./operationTracking").TryCatchFinallyContext<(this: any, ...args: any[]) => any>) => void) | undefined;
8
6
  onFinally?: ((ctx: import("./operationTracking").TryCatchFinallyContext<(this: any, ...args: any[]) => any>) => void) | undefined;
9
7
  } & import("./operationTracking").OperationLoggerDecoratorArgs & {
8
+ shouldStats?: ((args: import("./operationTracking").OperationStatsEventArgs) => boolean | void) | undefined;
9
+ } & {
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,14 +15,6 @@ export declare const track: ((decoratorArgs?: ({
15
15
  }) | undefined;
16
16
  } & {
17
17
  _contextType: import("./operationTracking").TryCatchFinallyContext<(this: any, ...args: any[]) => any> & {
18
- tags: string[];
19
- sharedContext: {
20
- tags: string[];
21
- };
22
- decoratorArgs?: {
23
- shouldStats?: ((args: import("./operationTracking").OperationStatsEventArgs) => boolean | void) | undefined;
24
- } | undefined;
25
- } & {
26
18
  decoratorArgs?: {
27
19
  onError?: ((ctx: import("./operationTracking").OperationErrorHandlerContext<import("./operationTracking").TryCatchFinallyContext<(this: any, ...args: any[]) => any>>) => void) | undefined;
28
20
  } | undefined;
@@ -43,6 +35,14 @@ export declare const track: ((decoratorArgs?: ({
43
35
  logMetadata?: Record<string, unknown> | undefined;
44
36
  decoratorArgs?: import("./operationTracking").OperationLoggerDecoratorArgs | undefined;
45
37
  sharedContext: import("./operationTracking").OperationLoggerSharedContext;
38
+ } & {
39
+ tags: string[];
40
+ sharedContext: {
41
+ tags: string[];
42
+ };
43
+ decoratorArgs?: {
44
+ shouldStats?: ((args: import("./operationTracking").OperationStatsEventArgs) => boolean | void) | undefined;
45
+ } | undefined;
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,4 +1,3 @@
1
- import type { DestinationDefinition } from '@segment/actions-core';
2
- import type { Settings } from './generated-types';
3
- export declare const destinationDefinition: DestinationDefinition<Settings>;
4
- export default destinationDefinition;
1
+ import destination from '../engage/sendgrid';
2
+ export default destination;
3
+ export * from '../engage/sendgrid';
@@ -1,71 +1,19 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.destinationDefinition = void 0;
4
- const sendEmail_1 = require("./sendEmail");
5
- const previewApiLookup_1 = require("./previewApiLookup");
6
- exports.destinationDefinition = {
7
- name: 'Engage Messaging SendGrid',
8
- slug: 'actions-personas-messaging-sendgrid',
9
- mode: 'cloud',
10
- description: 'This is an Engage specific action to send an email',
11
- authentication: {
12
- scheme: 'custom',
13
- fields: {
14
- unlayerApiKey: {
15
- label: 'Unlayer API Key',
16
- type: 'password',
17
- description: 'The API key for your Unlayer account'
18
- },
19
- sendGridApiKey: {
20
- label: 'API Key',
21
- type: 'password',
22
- description: 'The Api Key for your SendGrid account',
23
- required: true
24
- },
25
- profileApiEnvironment: {
26
- label: 'Profile API Environment',
27
- description: 'Profile API Environment',
28
- type: 'string',
29
- required: true
30
- },
31
- profileApiAccessToken: {
32
- label: 'Profile API Access Token',
33
- description: 'Profile API Access Token',
34
- type: 'password',
35
- required: true
36
- },
37
- spaceId: {
38
- label: 'Space ID',
39
- description: 'Space ID',
40
- type: 'string',
41
- required: true
42
- },
43
- sourceId: {
44
- label: 'Source ID',
45
- description: 'Source ID',
46
- type: 'string',
47
- required: true
48
- },
49
- region: {
50
- label: 'Region',
51
- description: 'The region where the email is originating from',
52
- type: 'string',
53
- choices: [
54
- { value: 'us-west-2', label: 'US West 2' },
55
- { value: 'eu-west-1', label: 'EU West 1' }
56
- ],
57
- default: 'us-west-2',
58
- required: false
59
- }
60
- },
61
- testAuthentication: (request) => {
62
- return request('https://api.sendgrid.com/v3/mail_settings');
63
- }
64
- },
65
- actions: {
66
- sendEmail: sendEmail_1.actionDefinition,
67
- previewApiLookup: previewApiLookup_1.actionDefinition
68
- }
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ var __importDefault = (this && this.__importDefault) || function (mod) {
13
+ return (mod && mod.__esModule) ? mod : { "default": mod };
69
14
  };
70
- exports.default = exports.destinationDefinition;
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ const sendgrid_1 = __importDefault(require("../engage/sendgrid"));
17
+ exports.default = sendgrid_1.default;
18
+ __exportStar(require("../engage/sendgrid"), exports);
71
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/engage-messaging-sendgrid/index.ts"],"names":[],"mappings":";;;AAEA,2CAA2D;AAC3D,yDAAyE;AAE5D,QAAA,qBAAqB,GAAoC;IACpE,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,qCAAqC;IAC3C,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,oDAAoD;IACjE,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,aAAa,EAAE;gBACb,KAAK,EAAE,iBAAiB;gBACxB,IAAI,EAAE,UAAU;gBAChB,WAAW,EAAE,sCAA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grid/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAOA,kEAA4C;AAC5C,kBAAe,kBAAW,CAAA;AAC1B,qDAAkC"}
@@ -1,4 +1,3 @@
1
- import type { DestinationDefinition } from '@segment/actions-core';
2
- import type { Settings } from './generated-types';
3
- export declare const destinationDefinition: DestinationDefinition<Settings>;
4
- export default destinationDefinition;
1
+ import destination from '../engage/twilio';
2
+ export default destination;
3
+ export * from '../engage/twilio';