@adtrackify/at-service-common 1.0.70 → 1.0.72

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,3 +1,7 @@
1
+ declare module '@adtrackify/at-service-common/__tests__/helpers/subscription-helper.spec' {
2
+ export {};
3
+
4
+ }
1
5
  declare module '@adtrackify/at-service-common/clients/generic/dynamodb-client' {
2
6
  import AWS from 'aws-sdk';
3
7
  export class DynamoDbClient {
@@ -682,10 +686,6 @@ declare module '@adtrackify/at-service-common/types/internal-events/event-detail
682
686
  declare module '@adtrackify/at-service-common/types/internal-events/index' {
683
687
  export * from '@adtrackify/at-service-common/types/internal-events/event-detail-types';
684
688
 
685
- }
686
- declare module '@adtrackify/at-service-common/__tests__/helpers/subscription-helper.spec' {
687
- export {};
688
-
689
689
  }
690
690
  declare module '@adtrackify/at-service-common' {
691
691
  import main = require('@adtrackify/at-service-common/src/index');
package/dist/index.js CHANGED
@@ -797,15 +797,16 @@ var buildResponse = (statusCode, body = {}) => {
797
797
  };
798
798
 
799
799
  // node_modules/@adtrackify/at-tracking-event-types/dist/index.js
800
- var o = ((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))(o || {});
801
- var a = ((r) => (r.PENDING = "pending", r.ACTIVE = "active", r.INACTIVE = "inactive", r))(a || {});
802
- var g = ((n) => (n.FACEBOOK = "facebook", n.TIKTOK = "tiktok", n.GOOGLE_ADS = "googleAds", n.GOOGLE_ANALYTICS_4 = "googleAnalytics4", n))(g || {});
803
- var c = ((i) => (i.STARTED = "started", i.COMPLETED = "completed", i.UNINSTALLED = "uninstalled", i.FAILED = "failed", i.NONE = "none", i))(c || {});
804
- var d = ((e) => (e.ACTIVE = "active", e.CANCELLED = "cancelled", e.DECLINED = "declined", e.EXPIRED = "expired", e.FROZEN = "frozen", e.PENDING = "pending", e.NOT_SUBMITTED = "na", e))(d || {});
805
- var p = ((s) => (s.MONTHLY = "monthly", s.YEARLY = "yearly", s))(p || {});
806
- var m = ((n) => (n.CURRENT = "current", n.PAST_DUE = "past_due", n.CANCELLED = "cancelled", n.FAILED = "failed", n))(m || {});
807
- 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 || {});
808
- var u = ((r) => (r.STRIPE = "stripe", r.PAYPAL = "paypal", r.SHOPIFY = "shopify", r))(u || {});
800
+ var o = ((e) => (e.ADD_PAYMENT_INFO = "add_payment_info", e.ADD_SHIPPING_INFO = "add_shipping_info", e.ADD_TO_CART = "add_to_cart", e.ADD_TO_WISHLIST = "add_to_wishlist", e.INITIATE_CHECKOUT = "initiate_checkout", e.LEAD = "lead", e.LOGIN = "login", e.PAGE_VIEW = "page_view", e.PURCHASE = "purchase", e.REFUND = "refund", e.SEARCH = "search", e.SIGN_UP = "sign_up", e.VIEW_CART = "view_cart", e.VIEW_CONTENT = "view_content", e.SELECT_SHIPPING_METHOD = "select_shipping_method", e.VIRTUALIZED_VIEWED_PAYMENT_FORM = "virtualized_viewd_payment_form", e))(o || {});
801
+ var a = ((n) => (n.PENDING = "pending", n.ACTIVE = "active", n.INACTIVE = "inactive", n))(a || {});
802
+ var g = ((n) => (n.HEADER = "header", n.FOOTER = "footer", n.BODY = "body", n))(g || {});
803
+ var c = ((t) => (t.FACEBOOK = "facebook", t.TIKTOK = "tiktok", t.GOOGLE_ADS = "googleAds", t.GOOGLE_ANALYTICS_4 = "googleAnalytics4", t.HUBSPOT = "hubspot", t.WEBHOOK = "webhook", t.CUSTOM_HTML = "customHTML", t))(c || {});
804
+ var d = ((r) => (r.STARTED = "started", r.COMPLETED = "completed", r.UNINSTALLED = "uninstalled", r.FAILED = "failed", r.NONE = "none", r))(d || {});
805
+ var p = ((t) => (t.ACTIVE = "active", t.CANCELLED = "cancelled", t.DECLINED = "declined", t.EXPIRED = "expired", t.FROZEN = "frozen", t.PENDING = "pending", t.NOT_SUBMITTED = "na", t))(p || {});
806
+ var l = ((s) => (s.MONTHLY = "monthly", s.YEARLY = "yearly", s))(l || {});
807
+ var m = ((i) => (i.CURRENT = "current", i.PAST_DUE = "past_due", i.CANCELLED = "cancelled", i.FAILED = "failed", i))(m || {});
808
+ var u = ((t) => (t.ACTIVE = "active", t.CANCELLED = "cancelled", t.DECLINED = "declined", t.EXPIRED = "expired", t.FROZEN = "frozen", t.PENDING = "pending", t.NOT_SUBMITTED = "na", t))(u || {});
809
+ var f = ((n) => (n.STRIPE = "stripe", n.PAYPAL = "paypal", n.SHOPIFY = "shopify", n))(f || {});
809
810
 
810
811
  // src/helpers/subscription-helper.ts
811
812
  var StripeBillingMap = {
@@ -842,11 +843,12 @@ var SubscriptionPlanSeedItems = {
842
843
  {
843
844
  id: 1,
844
845
  planName: "free",
846
+ displayName: "Free",
845
847
  sku: "ADT-001",
846
848
  description: "Free Plan - Monthly",
847
849
  price: "0",
848
850
  displayPrice: "$0",
849
- billingFrequency: p.MONTHLY,
851
+ billingFrequency: l.MONTHLY,
850
852
  trialLengthDays: 30,
851
853
  trialRequiresCreditCard: false,
852
854
  planDesc: [
@@ -865,11 +867,12 @@ var SubscriptionPlanSeedItems = {
865
867
  {
866
868
  id: 2,
867
869
  planName: "starter_monthly",
870
+ displayName: "Starter",
868
871
  sku: "ADT-002",
869
872
  description: "Starter Plan - Monthly",
870
873
  price: "9.99",
871
874
  displayPrice: "$9.99",
872
- billingFrequency: p.MONTHLY,
875
+ billingFrequency: l.MONTHLY,
873
876
  trialLengthDays: 30,
874
877
  trialRequiresCreditCard: false,
875
878
  planDesc: [
@@ -889,11 +892,12 @@ var SubscriptionPlanSeedItems = {
889
892
  {
890
893
  id: 3,
891
894
  planName: "starter_yearly",
895
+ displayName: "Starter",
892
896
  sku: "ADT-003",
893
897
  description: "Starter Plan - Yearly",
894
898
  price: "96.00",
895
899
  displayPrice: "$8",
896
- billingFrequency: p.YEARLY,
900
+ billingFrequency: l.YEARLY,
897
901
  trialLengthDays: 30,
898
902
  trialRequiresCreditCard: false,
899
903
  planDesc: [
@@ -913,11 +917,12 @@ var SubscriptionPlanSeedItems = {
913
917
  {
914
918
  id: 4,
915
919
  planName: "scale_monthly",
920
+ displayName: "Scale",
916
921
  sku: "ADT-004",
917
922
  description: "Scale Plan - Monthly",
918
923
  price: "59.99",
919
924
  displayPrice: "$59.99",
920
- billingFrequency: p.MONTHLY,
925
+ billingFrequency: l.MONTHLY,
921
926
  trialLengthDays: 30,
922
927
  trialRequiresCreditCard: false,
923
928
  planDesc: [
@@ -939,11 +944,12 @@ var SubscriptionPlanSeedItems = {
939
944
  {
940
945
  id: 5,
941
946
  planName: "scale_yearly",
947
+ displayName: "Scale",
942
948
  sku: "ADT-005",
943
949
  description: "Scale Plan - Yearly",
944
950
  price: "540.00",
945
951
  displayPrice: "$45",
946
- billingFrequency: p.YEARLY,
952
+ billingFrequency: l.YEARLY,
947
953
  trialLengthDays: 30,
948
954
  trialRequiresCreditCard: false,
949
955
  planDesc: [
@@ -965,11 +971,12 @@ var SubscriptionPlanSeedItems = {
965
971
  {
966
972
  id: 6,
967
973
  planName: "growth_monthly",
974
+ displayName: "Growth",
968
975
  sku: "ADT-006",
969
976
  description: "Growth Plan - Monthly",
970
977
  price: "159.99",
971
978
  displayPrice: "$159.99",
972
- billingFrequency: p.MONTHLY,
979
+ billingFrequency: l.MONTHLY,
973
980
  trialLengthDays: 30,
974
981
  trialRequiresCreditCard: false,
975
982
  planDesc: [
@@ -991,11 +998,12 @@ var SubscriptionPlanSeedItems = {
991
998
  {
992
999
  id: 7,
993
1000
  planName: "growth_yearly",
1001
+ displayName: "Growth",
994
1002
  sku: "ADT-007",
995
1003
  description: "Growth Plan - Yearly",
996
1004
  price: "1344.00",
997
1005
  displayPrice: "$112",
998
- billingFrequency: p.YEARLY,
1006
+ billingFrequency: l.YEARLY,
999
1007
  trialLengthDays: 30,
1000
1008
  trialRequiresCreditCard: false,
1001
1009
  planDesc: [