@adtrackify/at-service-common 1.0.81 → 1.0.82
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 +12 -12
- package/.vscode/settings.json +9 -9
- package/bitbucket-pipelines.yml +20 -20
- package/build.js +21 -21
- package/dist/index.d.ts +5 -4
- package/dist/index.js +49 -68
- package/dist/index.js.map +2 -2
- package/jest.config.ts +40 -40
- package/package.json +1 -1
- package/src/__tests__/helpers/subscription-helper.spec.ts +40 -40
- package/src/clients/generic/axios.d.ts +7 -7
- package/src/clients/generic/dynamodb-client.ts +113 -113
- package/src/clients/generic/eventbridge-client.ts +52 -52
- package/src/clients/internal-api/destinations-client.ts +58 -58
- package/src/clients/internal-api/index.ts +4 -4
- package/src/clients/internal-api/shopify-app-install-client.ts +66 -66
- package/src/clients/internal-api/users-auth-client.ts +111 -111
- package/src/clients/third-party/shopify-client.ts +139 -139
- package/src/helpers/index.ts +5 -5
- package/src/helpers/input-validation-helper.ts +21 -21
- package/src/helpers/shopify-helper.ts +39 -39
- package/src/helpers/subscription-helper.ts +55 -72
- package/src/index.ts +4 -4
- package/src/libs/index.ts +7 -7
- package/src/libs/url.ts +9 -9
- package/src/services/eventbridge-integration-service.ts +44 -44
- package/src/types/internal-events/event-detail-types.ts +9 -9
- package/tsconfig.json +35 -35
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
|
package/.vscode/settings.json
CHANGED
|
@@ -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
|
}
|
package/bitbucket-pipelines.yml
CHANGED
|
@@ -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
|
@@ -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
|
{
|
|
@@ -864,16 +874,11 @@ var SubscriptionPlanSeedItems = {
|
|
|
864
874
|
price: "0",
|
|
865
875
|
displayPrice: "$0",
|
|
866
876
|
billingFrequency: m.MONTHLY,
|
|
867
|
-
trialLengthDays:
|
|
877
|
+
trialLengthDays: 0,
|
|
868
878
|
trialRequiresCreditCard: false,
|
|
869
879
|
planDesc: [
|
|
870
|
-
|
|
871
|
-
"
|
|
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: "
|
|
889
|
-
displayPrice: "$
|
|
893
|
+
price: "49.99",
|
|
894
|
+
displayPrice: "$49.99",
|
|
890
895
|
billingFrequency: m.MONTHLY,
|
|
891
|
-
trialLengthDays:
|
|
896
|
+
trialLengthDays: 60,
|
|
892
897
|
trialRequiresCreditCard: false,
|
|
893
898
|
planDesc: [
|
|
894
|
-
"
|
|
895
|
-
|
|
896
|
-
"
|
|
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: "
|
|
914
|
-
displayPrice: "$
|
|
913
|
+
price: "479.90",
|
|
914
|
+
displayPrice: "$39.99",
|
|
915
915
|
billingFrequency: m.YEARLY,
|
|
916
916
|
trialLengthDays: 30,
|
|
917
917
|
trialRequiresCreditCard: false,
|
|
918
918
|
planDesc: [
|
|
919
|
-
"
|
|
920
|
-
|
|
921
|
-
"
|
|
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 ($
|
|
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: "
|
|
939
|
-
displayPrice: "$
|
|
933
|
+
price: "99.99",
|
|
934
|
+
displayPrice: "$99.99",
|
|
940
935
|
billingFrequency: m.MONTHLY,
|
|
941
|
-
trialLengthDays:
|
|
936
|
+
trialLengthDays: 60,
|
|
942
937
|
trialRequiresCreditCard: false,
|
|
943
938
|
planDesc: [
|
|
944
|
-
"
|
|
945
|
-
|
|
946
|
-
"
|
|
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: "
|
|
966
|
-
displayPrice: "$
|
|
955
|
+
price: "911.99",
|
|
956
|
+
displayPrice: "$75.99",
|
|
967
957
|
billingFrequency: m.YEARLY,
|
|
968
|
-
trialLengthDays:
|
|
958
|
+
trialLengthDays: 60,
|
|
969
959
|
trialRequiresCreditCard: false,
|
|
970
960
|
planDesc: [
|
|
971
|
-
"
|
|
972
|
-
|
|
973
|
-
"
|
|
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 ($
|
|
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: "
|
|
993
|
-
displayPrice: "$
|
|
977
|
+
price: "199.99",
|
|
978
|
+
displayPrice: "$199.99",
|
|
994
979
|
billingFrequency: m.MONTHLY,
|
|
995
|
-
trialLengthDays:
|
|
980
|
+
trialLengthDays: 60,
|
|
996
981
|
trialRequiresCreditCard: false,
|
|
997
982
|
planDesc: [
|
|
998
|
-
"
|
|
999
|
-
|
|
1000
|
-
"
|
|
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: "
|
|
1020
|
-
displayPrice: "$
|
|
999
|
+
price: "1799.91",
|
|
1000
|
+
displayPrice: "$149.99",
|
|
1021
1001
|
billingFrequency: m.YEARLY,
|
|
1022
|
-
trialLengthDays:
|
|
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 ($
|
|
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,
|