@adtrackify/at-service-common 1.0.81 → 1.1.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/.editorconfig CHANGED
@@ -1,12 +1,12 @@
1
- root = true
2
-
3
- [*]
4
- end_of_line = lf
5
- charset = utf-8
6
- trim_trailing_whitespace = true
7
- insert_final_newline = false
8
- indent_style = space
9
- indent_size = 2
10
-
11
- [*.{diff,md}]
12
- trim_trailing_whitespace = false
1
+ root = true
2
+
3
+ [*]
4
+ end_of_line = lf
5
+ charset = utf-8
6
+ trim_trailing_whitespace = true
7
+ insert_final_newline = false
8
+ indent_style = space
9
+ indent_size = 2
10
+
11
+ [*.{diff,md}]
12
+ trim_trailing_whitespace = false
@@ -1,10 +1,10 @@
1
- { "eslint.validate": [
2
- "javascript",
3
- "javascriptreact",
4
- "typescript",
5
- "typescriptreact"
6
- ],
7
- "editor.codeActionsOnSave": {
8
- "source.fixAll.eslint": true,
9
- },
1
+ { "eslint.validate": [
2
+ "javascript",
3
+ "javascriptreact",
4
+ "typescript",
5
+ "typescriptreact"
6
+ ],
7
+ "editor.codeActionsOnSave": {
8
+ "source.fixAll.eslint": true,
9
+ },
10
10
  }
@@ -1,20 +1,20 @@
1
- image: node:16.18.0
2
-
3
- pipelines:
4
- default:
5
- - step:
6
- caches:
7
- - node
8
- script:
9
- - printf "//`node -p \"require('url').parse(process.env.NPM_REGISTRY_URL || 'https://registry.npmjs.org').host\"`/:_authToken=${NPM_TOKEN}\nregistry=${NPM_REGISTRY_URL:-https://registry.npmjs.org}\n" >> ~/.npmrc
10
- - npm install
11
- - npm run build:dev
12
- branches:
13
- master:
14
- - step:
15
- deployment: prod
16
- caches:
17
- - node
18
- script:
19
- - printf "//`node -p \"require('url').parse(process.env.NPM_REGISTRY_URL || 'https://registry.npmjs.org').host\"`/:_authToken=${NPM_TOKEN}\nregistry=${NPM_REGISTRY_URL:-https://registry.npmjs.org}\n" >> ~/.npmrc
20
- - npm run push
1
+ image: node:16.18.0
2
+
3
+ pipelines:
4
+ default:
5
+ - step:
6
+ caches:
7
+ - node
8
+ script:
9
+ - printf "//`node -p \"require('url').parse(process.env.NPM_REGISTRY_URL || 'https://registry.npmjs.org').host\"`/:_authToken=${NPM_TOKEN}\nregistry=${NPM_REGISTRY_URL:-https://registry.npmjs.org}\n" >> ~/.npmrc
10
+ - npm install
11
+ - npm run build:dev
12
+ branches:
13
+ master:
14
+ - step:
15
+ deployment: prod
16
+ caches:
17
+ - node
18
+ script:
19
+ - printf "//`node -p \"require('url').parse(process.env.NPM_REGISTRY_URL || 'https://registry.npmjs.org').host\"`/:_authToken=${NPM_TOKEN}\nregistry=${NPM_REGISTRY_URL:-https://registry.npmjs.org}\n" >> ~/.npmrc
20
+ - npm run push
package/build.js CHANGED
@@ -1,22 +1,22 @@
1
- // @ts-nocheck
2
- // @ts-ignore
3
- /* eslint-disable */
4
-
5
- const { build } = require('esbuild')
6
- const { dependencies } = require('./package.json')
7
- const { Generator } = require('npm-dts')
8
-
9
- new Generator({
10
- entry: 'src/index.ts',
11
- output: 'dist/index.d.ts',
12
- }).generate()
13
-
14
- build({
15
- entryPoints: ['./src/index.ts'],
16
- outdir: 'dist',
17
- bundle: true,
18
- format: 'esm',
19
- platform: 'node',
20
- sourcemap: 'linked',
21
- external: [...Object.keys(dependencies), 'aws-sdk', "@faker-js/faker"]
1
+ // @ts-nocheck
2
+ // @ts-ignore
3
+ /* eslint-disable */
4
+
5
+ const { build } = require('esbuild')
6
+ const { dependencies } = require('./package.json')
7
+ const { Generator } = require('npm-dts')
8
+
9
+ new Generator({
10
+ entry: 'src/index.ts',
11
+ output: 'dist/index.d.ts',
12
+ }).generate()
13
+
14
+ build({
15
+ entryPoints: ['./src/index.ts'],
16
+ outdir: 'dist',
17
+ bundle: true,
18
+ format: 'esm',
19
+ platform: 'node',
20
+ sourcemap: 'linked',
21
+ external: [...Object.keys(dependencies), 'aws-sdk', "@faker-js/faker"]
22
22
  })
package/dist/index.d.ts CHANGED
@@ -1,7 +1,3 @@
1
- declare module '@adtrackify/at-service-common/__tests__/helpers/subscription-helper.spec' {
2
- export {};
3
-
4
- }
5
1
  declare module '@adtrackify/at-service-common/clients/generic/dynamodb-client' {
6
2
  import AWS from 'aws-sdk';
7
3
  export class DynamoDbClient {
@@ -519,6 +515,7 @@ declare module '@adtrackify/at-service-common/helpers/shopify-helper' {
519
515
  declare module '@adtrackify/at-service-common/helpers/subscription-helper' {
520
516
  import { SubscriptionPlan } from '@adtrackify/at-tracking-event-types';
521
517
  export const StripeBillingMap: any;
518
+ export const CommonPlanInfo: string[];
522
519
  export const SubscriptionPlanSeedItems: {
523
520
  items: SubscriptionPlan[];
524
521
  };
@@ -693,6 +690,10 @@ declare module '@adtrackify/at-service-common/types/internal-events/event-detail
693
690
  declare module '@adtrackify/at-service-common/types/internal-events/index' {
694
691
  export * from '@adtrackify/at-service-common/types/internal-events/event-detail-types';
695
692
 
693
+ }
694
+ declare module '@adtrackify/at-service-common/__tests__/helpers/subscription-helper.spec' {
695
+ export {};
696
+
696
697
  }
697
698
  declare module '@adtrackify/at-service-common' {
698
699
  import main = require('@adtrackify/at-service-common/src/index');
package/dist/index.js CHANGED
@@ -812,16 +812,16 @@ var buildResponse = (statusCode, body = {}) => {
812
812
  };
813
813
 
814
814
  // node_modules/@adtrackify/at-tracking-event-types/dist/index.js
815
- var a = ((t) => (t.ADD_PAYMENT_INFO = "add_payment_info", t.ADD_SHIPPING_INFO = "add_shipping_info", t.ADD_TO_CART = "add_to_cart", t.ADD_TO_WISHLIST = "add_to_wishlist", t.INITIATE_CHECKOUT = "initiate_checkout", t.LEAD = "lead", t.LOGIN = "login", t.PAGE_VIEW = "page_view", t.PURCHASE = "purchase", t.REFUND = "refund", t.SEARCH = "search", t.SIGN_UP = "sign_up", t.VIEW_CART = "view_cart", t.VIEW_CONTENT = "view_content", t.SELECT_SHIPPING_METHOD = "select_shipping_method", t.VIRTUALIZED_VIEWED_PAYMENT_FORM = "virtualized_viewd_payment_form", t))(a || {});
816
- var g = ((n) => (n.PENDING = "pending", n.ACTIVE = "active", n.INACTIVE = "inactive", n))(g || {});
817
- var c = ((i) => (i.FACEBOOK = "facebook", i.TIKTOK = "tiktok", i.GOOGLE_ADS = "googleAds", i.GOOGLE_ANALYTICS_4 = "googleAnalytics4", i.HUBSPOT = "hubspot", i.WEBHOOK = "webhook", i.CUSTOM_HTML = "customHTML", i.CUSTOM_JS = "customJS", i.SNAPCHAT = "snapchat", i.TWITTER = "twitter", i.REDDIT = "reddit", i))(c || {});
818
- var p = ((n) => (n.HEADER = "header", n.FOOTER = "footer", n.BODY = "body", n))(p || {});
819
- var d = ((r) => (r.STARTED = "started", r.COMPLETED = "completed", r.UNINSTALLED = "uninstalled", r.FAILED = "failed", r.NONE = "none", r))(d || {});
820
- var l = ((e) => (e.ACTIVE = "active", e.CANCELLED = "cancelled", e.DECLINED = "declined", e.EXPIRED = "expired", e.FROZEN = "frozen", e.PENDING = "pending", e.NOT_SUBMITTED = "na", e))(l || {});
821
- var m = ((s) => (s.MONTHLY = "monthly", s.YEARLY = "yearly", s))(m || {});
822
- var f = ((o) => (o.CURRENT = "current", o.PAST_DUE = "past_due", o.CANCELLED = "cancelled", o.FAILED = "failed", o))(f || {});
823
- var u = ((e) => (e.ACTIVE = "active", e.CANCELLED = "cancelled", e.DECLINED = "declined", e.EXPIRED = "expired", e.FROZEN = "frozen", e.PENDING = "pending", e.NOT_SUBMITTED = "na", e))(u || {});
824
- var x = ((n) => (n.STRIPE = "stripe", n.PAYPAL = "paypal", n.SHOPIFY = "shopify", n))(x || {});
815
+ var a = ((e) => (e.PENDING = "pending", e.ACTIVE = "active", e.INACTIVE = "inactive", e))(a || {});
816
+ var g = ((i) => (i.FACEBOOK = "facebook", i.TIKTOK = "tiktok", i.GOOGLE_ADS = "googleAds", i.GOOGLE_ANALYTICS_4 = "googleAnalytics4", i.HUBSPOT = "hubspot", i.WEBHOOK = "webhook", i.CUSTOM_HTML = "customHTML", i.CUSTOM_JS = "customJS", i.SNAPCHAT = "snapchat", i.TWITTER = "twitter", i.REDDIT = "reddit", i))(g || {});
817
+ var c = ((e) => (e.HEADER = "header", e.FOOTER = "footer", e.BODY = "body", e))(c || {});
818
+ var p = ((r) => (r.STARTED = "started", r.COMPLETED = "completed", r.UNINSTALLED = "uninstalled", r.FAILED = "failed", r.NONE = "none", r))(p || {});
819
+ var d = ((n) => (n.ACTIVE = "active", n.CANCELLED = "cancelled", n.DECLINED = "declined", n.EXPIRED = "expired", n.FROZEN = "frozen", n.PENDING = "pending", n.NOT_SUBMITTED = "na", n))(d || {});
820
+ var f = ((s) => (s.MONTHLY = "monthly", s.YEARLY = "yearly", s))(f || {});
821
+ var l = ((o) => (o.CURRENT = "current", o.PAST_DUE = "past_due", o.CANCELLED = "cancelled", o.FAILED = "failed", o))(l || {});
822
+ var u = ((n) => (n.ACTIVE = "active", n.CANCELLED = "cancelled", n.DECLINED = "declined", n.EXPIRED = "expired", n.FROZEN = "frozen", n.PENDING = "pending", n.NOT_SUBMITTED = "na", n))(u || {});
823
+ var m = ((e) => (e.STRIPE = "stripe", e.PAYPAL = "paypal", e.SHOPIFY = "shopify", e))(m || {});
824
+ var x = ((t) => (t.ADD_PAYMENT_INFO = "add_payment_info", t.ADD_SHIPPING_INFO = "add_shipping_info", t.ADD_TO_CART = "add_to_cart", t.ADD_TO_WISHLIST = "add_to_wishlist", t.INITIATE_CHECKOUT = "initiate_checkout", t.LEAD = "lead", t.LOGIN = "login", t.PAGE_VIEW = "page_view", t.PURCHASE = "purchase", t.REFUND = "refund", t.SEARCH = "search", t.SIGN_UP = "sign_up", t.VIEW_CART = "view_cart", t.VIEW_CONTENT = "view_content", t.SELECT_SHIPPING_METHOD = "select_shipping_method", t.VIRTUALIZED_VIEWED_PAYMENT_FORM = "virtualized_viewd_payment_form", t))(x || {});
825
825
 
826
826
  // src/helpers/subscription-helper.ts
827
827
  var StripeBillingMap = {
@@ -853,6 +853,16 @@ var StripeBillingMap = {
853
853
  "growth_yearly": "price_1KAFs7K7krGh4037rZElg12s"
854
854
  }
855
855
  };
856
+ var CommonPlanInfo = [
857
+ "Fixes IOS14.5 ad-tracking",
858
+ "Increase ROAS & Attribution Data",
859
+ "Enhanced Fingerprinting & Identity Resolution",
860
+ "Unlimited Pixel Integrations",
861
+ "Server Side Tracking & Conversion API",
862
+ "Unlimited Facebook Conversion API",
863
+ "MultiPixel Support (Multiple facebook, tiktok, etc)",
864
+ "Advanced Integrations (Webhooks, Custom JS/HTML, Hubspot)"
865
+ ];
856
866
  var SubscriptionPlanSeedItems = {
857
867
  items: [
858
868
  {
@@ -863,17 +873,12 @@ var SubscriptionPlanSeedItems = {
863
873
  description: "Free Plan - Monthly",
864
874
  price: "0",
865
875
  displayPrice: "$0",
866
- billingFrequency: m.MONTHLY,
867
- trialLengthDays: 30,
876
+ billingFrequency: f.MONTHLY,
877
+ trialLengthDays: 0,
868
878
  trialRequiresCreditCard: false,
869
879
  planDesc: [
870
- "Fixes IOS14.5 tracking",
871
- "Multi Pixel Support",
872
- "Enhanced Tracking / Attribution",
873
- "Unlimited Facebook Conversion API",
874
- "Unlimited Integrations",
875
- "Easy no code setup",
876
- "1,000 tracking events/mo"
880
+ ...CommonPlanInfo,
881
+ "2,500 tracking events/mo"
877
882
  ],
878
883
  unitPriceText: "try now - free forever",
879
884
  isHighlighted: false,
@@ -885,20 +890,15 @@ var SubscriptionPlanSeedItems = {
885
890
  displayName: "Starter",
886
891
  sku: "ADT-002",
887
892
  description: "Starter Plan - Monthly",
888
- price: "9.99",
889
- displayPrice: "$9.99",
890
- billingFrequency: m.MONTHLY,
891
- trialLengthDays: 30,
893
+ price: "49.99",
894
+ displayPrice: "$49.99",
895
+ billingFrequency: f.MONTHLY,
896
+ trialLengthDays: 60,
892
897
  trialRequiresCreditCard: false,
893
898
  planDesc: [
894
- "30-day Risk Free Trial",
895
- "Fixes IOS14.5 tracking",
896
- "Multi Pixel Support",
897
- "Enhanced Tracking / Attribution",
898
- "Unlimited Facebook Conversion API",
899
- "Unlimited Integrations",
900
- "Easy no code setup",
901
- "2,500 tracking events/mo"
899
+ "60-day Risk Free Trial",
900
+ ...CommonPlanInfo,
901
+ "50,000 tracking events/mo"
902
902
  ],
903
903
  unitPriceText: "",
904
904
  isHighlighted: false,
@@ -910,22 +910,17 @@ var SubscriptionPlanSeedItems = {
910
910
  displayName: "Starter",
911
911
  sku: "ADT-003",
912
912
  description: "Starter Plan - Yearly",
913
- price: "96.00",
914
- displayPrice: "$8",
915
- billingFrequency: m.YEARLY,
913
+ price: "479.90",
914
+ displayPrice: "$39.99",
915
+ billingFrequency: f.YEARLY,
916
916
  trialLengthDays: 30,
917
917
  trialRequiresCreditCard: false,
918
918
  planDesc: [
919
- "30-day Risk Free Trial",
920
- "Fixes IOS14.5 tracking",
921
- "Multi Pixel Support",
922
- "Enhanced Tracking / Attribution",
923
- "Unlimited Facebook Conversion API",
924
- "Unlimited Integrations",
925
- "Easy no code setup",
926
- "2,500 tracking events/mo"
919
+ "60-day Risk Free Trial",
920
+ ...CommonPlanInfo,
921
+ "50,000 tracking events/mo"
927
922
  ],
928
- unitPriceText: "billed yearly ($96) - 20% savings",
923
+ unitPriceText: "billed yearly ($479.90) - 20% savings",
929
924
  isHighlighted: false,
930
925
  isBanner: false
931
926
  },
@@ -935,20 +930,15 @@ var SubscriptionPlanSeedItems = {
935
930
  displayName: "Scale",
936
931
  sku: "ADT-004",
937
932
  description: "Scale Plan - Monthly",
938
- price: "59.99",
939
- displayPrice: "$59.99",
940
- billingFrequency: m.MONTHLY,
941
- trialLengthDays: 30,
933
+ price: "99.99",
934
+ displayPrice: "$99.99",
935
+ billingFrequency: f.MONTHLY,
936
+ trialLengthDays: 60,
942
937
  trialRequiresCreditCard: false,
943
938
  planDesc: [
944
- "30-day Risk Free Trial",
945
- "Fixes IOS14.5 tracking",
946
- "Multi Pixel Support",
947
- "Enhanced Tracking / Attribution",
948
- "Unlimited Facebook Conversion API",
949
- "Unlimited Integrations",
950
- "Easy no code setup",
951
- "25,000 tracking events/mo"
939
+ "60-day Risk Free Trial",
940
+ ...CommonPlanInfo,
941
+ "100,000 tracking events/mo"
952
942
  ],
953
943
  unitPriceText: "billed yearly ($96) - 20% savings",
954
944
  isHighlighted: true,
@@ -962,22 +952,17 @@ var SubscriptionPlanSeedItems = {
962
952
  displayName: "Scale",
963
953
  sku: "ADT-005",
964
954
  description: "Scale Plan - Yearly",
965
- price: "540.00",
966
- displayPrice: "$45",
967
- billingFrequency: m.YEARLY,
968
- trialLengthDays: 30,
955
+ price: "911.99",
956
+ displayPrice: "$75.99",
957
+ billingFrequency: f.YEARLY,
958
+ trialLengthDays: 60,
969
959
  trialRequiresCreditCard: false,
970
960
  planDesc: [
971
- "30-day Risk Free Trial",
972
- "Fixes IOS14.5 tracking",
973
- "Multi Pixel Support",
974
- "Enhanced Tracking / Attribution",
975
- "Unlimited Facebook Conversion API",
976
- "Unlimited Integrations",
977
- "Easy no code setup",
978
- "25,000 tracking events/mo"
961
+ "60-day Risk Free Trial",
962
+ ...CommonPlanInfo,
963
+ "100,000 tracking events/mo"
979
964
  ],
980
- unitPriceText: "billed yearly ($540) - 25% savings",
965
+ unitPriceText: "billed yearly ($911.99) - 24% savings",
981
966
  isHighlighted: true,
982
967
  isBanner: true,
983
968
  bannerColor: "blue",
@@ -989,20 +974,15 @@ var SubscriptionPlanSeedItems = {
989
974
  displayName: "Growth",
990
975
  sku: "ADT-006",
991
976
  description: "Growth Plan - Monthly",
992
- price: "159.99",
993
- displayPrice: "$159.99",
994
- billingFrequency: m.MONTHLY,
995
- trialLengthDays: 30,
977
+ price: "199.99",
978
+ displayPrice: "$199.99",
979
+ billingFrequency: f.MONTHLY,
980
+ trialLengthDays: 60,
996
981
  trialRequiresCreditCard: false,
997
982
  planDesc: [
998
- "30-day Risk Free Trial",
999
- "Fixes IOS14.5 tracking",
1000
- "Multi Pixel Support",
1001
- "Enhanced Tracking / Attribution",
1002
- "Unlimited Facebook Conversion API",
1003
- "Unlimited Integrations",
1004
- "Easy no code setup",
1005
- "100,000 tracking events/mo"
983
+ "60-day Risk Free Trial",
984
+ ...CommonPlanInfo,
985
+ "250,000 tracking events/mo"
1006
986
  ],
1007
987
  unitPriceText: "billed yearly ($540) - 25% savings",
1008
988
  isHighlighted: false,
@@ -1016,10 +996,10 @@ var SubscriptionPlanSeedItems = {
1016
996
  displayName: "Growth",
1017
997
  sku: "ADT-007",
1018
998
  description: "Growth Plan - Yearly",
1019
- price: "1344.00",
1020
- displayPrice: "$112",
1021
- billingFrequency: m.YEARLY,
1022
- trialLengthDays: 30,
999
+ price: "1799.91",
1000
+ displayPrice: "$149.99",
1001
+ billingFrequency: f.YEARLY,
1002
+ trialLengthDays: 60,
1023
1003
  trialRequiresCreditCard: false,
1024
1004
  planDesc: [
1025
1005
  "30-day Risk Free Trial",
@@ -1031,7 +1011,7 @@ var SubscriptionPlanSeedItems = {
1031
1011
  "Easy no code setup",
1032
1012
  "100,000 tracking events/mo"
1033
1013
  ],
1034
- unitPriceText: "billed yearly ($1344) - 30% savings",
1014
+ unitPriceText: "billed yearly ($1799.91) - 25% savings",
1035
1015
  isHighlighted: false,
1036
1016
  isBanner: true,
1037
1017
  bannerColor: "orange",
@@ -1110,6 +1090,7 @@ export {
1110
1090
  ADTRACKIFY_EVENT_SOURCES,
1111
1091
  ADTRACKIFY_EVENT_TYPES,
1112
1092
  AccountsClient,
1093
+ CommonPlanInfo,
1113
1094
  DestinationsClient,
1114
1095
  DynamoDbClient,
1115
1096
  EventBridgeClient,