@adtrackify/at-service-common 2.0.5 → 2.0.6
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/cjs/__tests__/helpers/subscription-helper.spec.d.ts +1 -1
- package/dist/cjs/__tests__/helpers/subscription-helper.spec.js +52 -52
- package/dist/cjs/__tests__/s3-client/s3-client.spec.d.ts +1 -1
- package/dist/cjs/__tests__/s3-client/s3-client.spec.js +26 -26
- package/dist/cjs/clients/generic/cognito-client.d.ts +19 -19
- package/dist/cjs/clients/generic/cognito-client.js +144 -144
- package/dist/cjs/clients/generic/dynamodb-client.d.ts +15 -15
- package/dist/cjs/clients/generic/dynamodb-client.js +124 -124
- package/dist/cjs/clients/generic/eventbridge-client.d.ts +14 -14
- package/dist/cjs/clients/generic/eventbridge-client.js +49 -49
- package/dist/cjs/clients/generic/http-client.d.ts +30 -30
- package/dist/cjs/clients/generic/http-client.js +35 -35
- package/dist/cjs/clients/generic/index.d.ts +6 -6
- package/dist/cjs/clients/generic/index.js +22 -22
- package/dist/cjs/clients/generic/s3-client.d.ts +14 -14
- package/dist/cjs/clients/generic/s3-client.js +82 -82
- package/dist/cjs/clients/generic/sqs-client.d.ts +14 -14
- package/dist/cjs/clients/generic/sqs-client.js +38 -38
- package/dist/cjs/clients/index.d.ts +3 -3
- package/dist/cjs/clients/index.js +19 -19
- package/dist/cjs/clients/internal-api/accounts-client.d.ts +82 -82
- package/dist/cjs/clients/internal-api/accounts-client.js +82 -82
- package/dist/cjs/clients/internal-api/destinations-client.d.ts +54 -54
- package/dist/cjs/clients/internal-api/destinations-client.js +40 -40
- package/dist/cjs/clients/internal-api/index.d.ts +4 -4
- package/dist/cjs/clients/internal-api/index.js +20 -20
- package/dist/cjs/clients/internal-api/shopify-app-install-client.d.ts +57 -57
- package/dist/cjs/clients/internal-api/shopify-app-install-client.js +49 -49
- package/dist/cjs/clients/internal-api/users-auth-client.d.ts +61 -61
- package/dist/cjs/clients/internal-api/users-auth-client.js +77 -77
- package/dist/cjs/clients/third-party/index.d.ts +1 -1
- package/dist/cjs/clients/third-party/index.js +17 -17
- package/dist/cjs/clients/third-party/shopify-client.d.ts +90 -90
- package/dist/cjs/clients/third-party/shopify-client.js +125 -125
- package/dist/cjs/helpers/index.d.ts +5 -5
- package/dist/cjs/helpers/index.js +21 -21
- package/dist/cjs/helpers/input-validation-helper.d.ts +2 -2
- package/dist/cjs/helpers/input-validation-helper.js +22 -22
- package/dist/cjs/helpers/logging-helper.d.ts +15 -15
- package/dist/cjs/helpers/logging-helper.js +80 -80
- package/dist/cjs/helpers/response-helper.d.ts +36 -36
- package/dist/cjs/helpers/response-helper.js +41 -41
- package/dist/cjs/helpers/shopify-helper.d.ts +9 -9
- package/dist/cjs/helpers/shopify-helper.js +28 -28
- package/dist/cjs/helpers/subscription-helper.d.ts +8 -8
- package/dist/cjs/helpers/subscription-helper.js +229 -229
- package/dist/cjs/index.d.ts +5 -5
- package/dist/cjs/index.js +21 -21
- package/dist/cjs/libs/clickId-parser.d.ts +18 -18
- package/dist/cjs/libs/clickId-parser.js +38 -38
- package/dist/cjs/libs/crypto.d.ts +1 -1
- package/dist/cjs/libs/crypto.js +12 -12
- package/dist/cjs/libs/dates.d.ts +3 -3
- package/dist/cjs/libs/dates.js +16 -16
- package/dist/cjs/libs/http-error.d.ts +21 -21
- package/dist/cjs/libs/http-error.js +59 -59
- package/dist/cjs/libs/http-status-codes.d.ts +58 -58
- package/dist/cjs/libs/http-status-codes.js +62 -62
- package/dist/cjs/libs/index.d.ts +8 -8
- package/dist/cjs/libs/index.js +24 -24
- package/dist/cjs/libs/referrer-parser/index.d.ts +2 -2
- package/dist/cjs/libs/referrer-parser/index.js +18 -18
- package/dist/cjs/libs/referrer-parser/referrer-data.d.ts +9 -9
- package/dist/cjs/libs/referrer-parser/referrer-data.js +4712 -4712
- package/dist/cjs/libs/referrer-parser/referrer-parser-util.d.ts +20 -20
- package/dist/cjs/libs/referrer-parser/referrer-parser-util.js +123 -123
- package/dist/cjs/libs/url.d.ts +1 -1
- package/dist/cjs/libs/url.js +13 -13
- package/dist/cjs/services/eventbridge-integration-service.d.ts +9 -9
- package/dist/cjs/services/eventbridge-integration-service.js +28 -28
- package/dist/cjs/services/index.d.ts +2 -2
- package/dist/cjs/services/index.js +18 -18
- package/dist/cjs/services/ipdata-lookup-service.d.ts +8 -8
- package/dist/cjs/services/ipdata-lookup-service.js +59 -59
- package/dist/cjs/services/log-event-service.d.ts +9 -0
- package/dist/cjs/services/log-event-service.js +49 -0
- package/dist/cjs/services/log-event-service.js.map +1 -0
- package/dist/cjs/types/api-response.d.ts +6 -6
- package/dist/cjs/types/api-response.js +2 -2
- package/dist/cjs/types/index.d.ts +1 -1
- package/dist/cjs/types/index.js +17 -17
- package/dist/cjs/types/internal-events/event-detail-types.d.ts +20 -20
- package/dist/cjs/types/internal-events/event-detail-types.js +27 -27
- package/dist/cjs/types/internal-events/index.d.ts +1 -1
- package/dist/cjs/types/internal-events/index.js +17 -17
- package/dist/esm/__tests__/helpers/subscription-helper.spec.d.ts +1 -1
- package/dist/esm/__tests__/helpers/subscription-helper.spec.js +27 -27
- package/dist/esm/__tests__/s3-client/s3-client.spec.d.ts +1 -1
- package/dist/esm/__tests__/s3-client/s3-client.spec.js +24 -24
- package/dist/esm/clients/generic/cognito-client.d.ts +19 -19
- package/dist/esm/clients/generic/cognito-client.js +139 -139
- package/dist/esm/clients/generic/dynamodb-client.d.ts +15 -15
- package/dist/esm/clients/generic/dynamodb-client.js +120 -120
- package/dist/esm/clients/generic/eventbridge-client.d.ts +14 -14
- package/dist/esm/clients/generic/eventbridge-client.js +45 -45
- package/dist/esm/clients/generic/http-client.d.ts +30 -30
- package/dist/esm/clients/generic/http-client.js +28 -28
- package/dist/esm/clients/generic/index.d.ts +6 -6
- package/dist/esm/clients/generic/index.js +6 -6
- package/dist/esm/clients/generic/s3-client.d.ts +14 -14
- package/dist/esm/clients/generic/s3-client.js +78 -78
- package/dist/esm/clients/generic/sqs-client.d.ts +14 -14
- package/dist/esm/clients/generic/sqs-client.js +34 -34
- package/dist/esm/clients/index.d.ts +3 -3
- package/dist/esm/clients/index.js +3 -3
- package/dist/esm/clients/internal-api/accounts-client.d.ts +82 -82
- package/dist/esm/clients/internal-api/accounts-client.js +78 -78
- package/dist/esm/clients/internal-api/destinations-client.d.ts +54 -54
- package/dist/esm/clients/internal-api/destinations-client.js +36 -36
- package/dist/esm/clients/internal-api/index.d.ts +4 -4
- package/dist/esm/clients/internal-api/index.js +4 -4
- package/dist/esm/clients/internal-api/shopify-app-install-client.d.ts +57 -57
- package/dist/esm/clients/internal-api/shopify-app-install-client.js +42 -42
- package/dist/esm/clients/internal-api/users-auth-client.d.ts +61 -61
- package/dist/esm/clients/internal-api/users-auth-client.js +73 -73
- package/dist/esm/clients/third-party/index.d.ts +1 -1
- package/dist/esm/clients/third-party/index.js +1 -1
- package/dist/esm/clients/third-party/shopify-client.d.ts +90 -90
- package/dist/esm/clients/third-party/shopify-client.js +121 -121
- package/dist/esm/helpers/index.d.ts +5 -5
- package/dist/esm/helpers/index.js +5 -5
- package/dist/esm/helpers/input-validation-helper.d.ts +2 -2
- package/dist/esm/helpers/input-validation-helper.js +18 -18
- package/dist/esm/helpers/logging-helper.d.ts +15 -15
- package/dist/esm/helpers/logging-helper.js +53 -53
- package/dist/esm/helpers/response-helper.d.ts +36 -36
- package/dist/esm/helpers/response-helper.js +35 -35
- package/dist/esm/helpers/shopify-helper.d.ts +9 -9
- package/dist/esm/helpers/shopify-helper.js +23 -23
- package/dist/esm/helpers/subscription-helper.d.ts +8 -8
- package/dist/esm/helpers/subscription-helper.js +224 -224
- package/dist/esm/index.d.ts +5 -5
- package/dist/esm/index.js +5 -5
- package/dist/esm/libs/clickId-parser.d.ts +18 -18
- package/dist/esm/libs/clickId-parser.js +34 -34
- package/dist/esm/libs/crypto.d.ts +1 -1
- package/dist/esm/libs/crypto.js +5 -5
- package/dist/esm/libs/dates.d.ts +3 -3
- package/dist/esm/libs/dates.js +10 -10
- package/dist/esm/libs/http-error.d.ts +21 -21
- package/dist/esm/libs/http-error.js +55 -55
- package/dist/esm/libs/http-status-codes.d.ts +58 -58
- package/dist/esm/libs/http-status-codes.js +59 -59
- package/dist/esm/libs/index.d.ts +8 -8
- package/dist/esm/libs/index.js +8 -8
- package/dist/esm/libs/referrer-parser/index.d.ts +2 -2
- package/dist/esm/libs/referrer-parser/index.js +2 -2
- package/dist/esm/libs/referrer-parser/referrer-data.d.ts +9 -9
- package/dist/esm/libs/referrer-parser/referrer-data.js +4709 -4709
- package/dist/esm/libs/referrer-parser/referrer-parser-util.d.ts +20 -20
- package/dist/esm/libs/referrer-parser/referrer-parser-util.js +116 -116
- package/dist/esm/libs/url.d.ts +1 -1
- package/dist/esm/libs/url.js +9 -9
- package/dist/esm/services/eventbridge-integration-service.d.ts +9 -9
- package/dist/esm/services/eventbridge-integration-service.js +24 -24
- package/dist/esm/services/index.d.ts +2 -2
- package/dist/esm/services/index.js +2 -2
- package/dist/esm/services/ipdata-lookup-service.d.ts +8 -8
- package/dist/esm/services/ipdata-lookup-service.js +55 -55
- package/dist/esm/services/log-event-service.d.ts +9 -0
- package/dist/esm/services/log-event-service.js +45 -0
- package/dist/esm/services/log-event-service.js.map +1 -0
- package/dist/esm/types/api-response.d.ts +6 -6
- package/dist/esm/types/api-response.js +1 -1
- package/dist/esm/types/index.d.ts +1 -1
- package/dist/esm/types/index.js +1 -1
- package/dist/esm/types/internal-events/event-detail-types.d.ts +20 -20
- package/dist/esm/types/internal-events/event-detail-types.js +24 -24
- package/dist/esm/types/internal-events/index.d.ts +1 -1
- package/dist/esm/types/internal-events/index.js +1 -1
- package/package.json +2 -2
|
@@ -1,225 +1,225 @@
|
|
|
1
|
-
import { PLAN_BILLING_FREQUENCY } from '@adtrackify/at-tracking-event-types';
|
|
2
|
-
export const StripeBillingMap = {
|
|
3
|
-
dev2: {
|
|
4
|
-
'free': 'price_1JzjbKK7krGh4037ezNbGJEm',
|
|
5
|
-
'starter_monthly': 'price_1JwzsGK7krGh4037Li0hPpsZ',
|
|
6
|
-
'starter_yearly': 'price_1JwzsGK7krGh4037Li0hPpsZ',
|
|
7
|
-
'scale_monthly': 'price_1JzjcSK7krGh4037yh34LPk3',
|
|
8
|
-
'scale_yearly': 'price_1JzjcSK7krGh4037QiBJYfnD',
|
|
9
|
-
'growth_monthly': 'price_1Jzje1K7krGh4037KErHBp5N',
|
|
10
|
-
'growth_yearly': 'price_1Jzje1K7krGh4037MhCUhTDh'
|
|
11
|
-
},
|
|
12
|
-
qa2: {
|
|
13
|
-
'free': 'price_1JzjbKK7krGh4037ezNbGJEm',
|
|
14
|
-
'starter_monthly': 'price_1JwzsGK7krGh4037Li0hPpsZ',
|
|
15
|
-
'starter_yearly': 'price_1JwzsGK7krGh4037Li0hPpsZ',
|
|
16
|
-
'scale_monthly': 'price_1JzjcSK7krGh4037yh34LPk3',
|
|
17
|
-
'scale_yearly': 'price_1JzjcSK7krGh4037QiBJYfnD',
|
|
18
|
-
'growth_monthly': 'price_1Jzje1K7krGh4037KErHBp5N',
|
|
19
|
-
'growth_yearly': 'price_1Jzje1K7krGh4037MhCUhTDh'
|
|
20
|
-
},
|
|
21
|
-
prod2: {
|
|
22
|
-
'free': 'price_1KAFsIK7krGh4037RsaAYMEl',
|
|
23
|
-
'starter_monthly': 'price_1KAFsMK7krGh4037Lz3P0ksU',
|
|
24
|
-
'starter_yearly': 'price_1KAFsMK7krGh4037Dj1WmSi8',
|
|
25
|
-
'scale_monthly': 'price_1KAFrxK7krGh4037zWCdaTly',
|
|
26
|
-
'scale_yearly': 'price_1KAFrxK7krGh40375fhymyWP',
|
|
27
|
-
'growth_monthly': 'price_1KAFs7K7krGh4037JChjz5Cr',
|
|
28
|
-
'growth_yearly': 'price_1KAFs7K7krGh4037rZElg12s'
|
|
29
|
-
},
|
|
30
|
-
dev: {
|
|
31
|
-
'free': 'price_1JzjbKK7krGh4037ezNbGJEm',
|
|
32
|
-
'starter_monthly': 'price_1JwzsGK7krGh4037Li0hPpsZ',
|
|
33
|
-
'starter_yearly': 'price_1JwzsGK7krGh4037Li0hPpsZ',
|
|
34
|
-
'scale_monthly': 'price_1JzjcSK7krGh4037yh34LPk3',
|
|
35
|
-
'scale_yearly': 'price_1JzjcSK7krGh4037QiBJYfnD',
|
|
36
|
-
'growth_monthly': 'price_1Jzje1K7krGh4037KErHBp5N',
|
|
37
|
-
'growth_yearly': 'price_1Jzje1K7krGh4037MhCUhTDh'
|
|
38
|
-
},
|
|
39
|
-
qa: {
|
|
40
|
-
'free': 'price_1JzjbKK7krGh4037ezNbGJEm',
|
|
41
|
-
'starter_monthly': 'price_1JwzsGK7krGh4037Li0hPpsZ',
|
|
42
|
-
'starter_yearly': 'price_1JwzsGK7krGh4037Li0hPpsZ',
|
|
43
|
-
'scale_monthly': 'price_1JzjcSK7krGh4037yh34LPk3',
|
|
44
|
-
'scale_yearly': 'price_1JzjcSK7krGh4037QiBJYfnD',
|
|
45
|
-
'growth_monthly': 'price_1Jzje1K7krGh4037KErHBp5N',
|
|
46
|
-
'growth_yearly': 'price_1Jzje1K7krGh4037MhCUhTDh'
|
|
47
|
-
},
|
|
48
|
-
prod: {
|
|
49
|
-
'free': 'price_1KAFsIK7krGh4037RsaAYMEl',
|
|
50
|
-
'starter_monthly': 'price_1KAFsMK7krGh4037Lz3P0ksU',
|
|
51
|
-
'starter_yearly': 'price_1KAFsMK7krGh4037Dj1WmSi8',
|
|
52
|
-
'scale_monthly': 'price_1KAFrxK7krGh4037zWCdaTly',
|
|
53
|
-
'scale_yearly': 'price_1KAFrxK7krGh40375fhymyWP',
|
|
54
|
-
'growth_monthly': 'price_1KAFs7K7krGh4037JChjz5Cr',
|
|
55
|
-
'growth_yearly': 'price_1KAFs7K7krGh4037rZElg12s'
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
export const CommonPlanInfo = [
|
|
59
|
-
'Free Server Side Tracking & Conversion API',
|
|
60
|
-
'MultiPixel Support (Multiple facebook, tiktok, etc)',
|
|
61
|
-
'Corrects Facebook Conversion Tracking post IOS14',
|
|
62
|
-
'Increase ROAS & Attribution Data',
|
|
63
|
-
'Enhanced Fingerprinting & Identity Resolution',
|
|
64
|
-
'Unlimited Integrations',
|
|
65
|
-
'Advanced Integrations (Webhooks, Custom JS/HTML, Hubspot)'
|
|
66
|
-
];
|
|
67
|
-
export const SubscriptionPlanSeedItems = {
|
|
68
|
-
items: [{
|
|
69
|
-
id: 1,
|
|
70
|
-
planName: 'free',
|
|
71
|
-
displayName: 'Free',
|
|
72
|
-
sku: 'ADT-001',
|
|
73
|
-
description: 'Free Plan - Monthly',
|
|
74
|
-
price: '0',
|
|
75
|
-
displayPrice: '$0',
|
|
76
|
-
billingFrequency: PLAN_BILLING_FREQUENCY.MONTHLY,
|
|
77
|
-
trialLengthDays: 0,
|
|
78
|
-
trialRequiresCreditCard: false,
|
|
79
|
-
planDesc: [
|
|
80
|
-
...CommonPlanInfo,
|
|
81
|
-
'Free Up to 100 orders/month (10,000 events)*'
|
|
82
|
-
],
|
|
83
|
-
unitPriceText: 'try now - free forever',
|
|
84
|
-
isHighlighted: false,
|
|
85
|
-
isBanner: false
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
id: 2,
|
|
89
|
-
planName: 'starter_monthly',
|
|
90
|
-
displayName: 'Starter',
|
|
91
|
-
sku: 'ADT-002',
|
|
92
|
-
description: 'Starter Plan - Monthly',
|
|
93
|
-
price: '19.99',
|
|
94
|
-
displayPrice: '$19.99',
|
|
95
|
-
billingFrequency: PLAN_BILLING_FREQUENCY.MONTHLY,
|
|
96
|
-
trialLengthDays: 60,
|
|
97
|
-
trialRequiresCreditCard: false,
|
|
98
|
-
planDesc: [
|
|
99
|
-
'60-day Risk Free Trial',
|
|
100
|
-
...CommonPlanInfo,
|
|
101
|
-
'Up to 250 orders/month (25,000 events)*'
|
|
102
|
-
],
|
|
103
|
-
isHighlighted: true,
|
|
104
|
-
isBanner: true,
|
|
105
|
-
bannerColor: 'blue',
|
|
106
|
-
bannerText: 'MOST POPULAR'
|
|
107
|
-
}, {
|
|
108
|
-
id: 3,
|
|
109
|
-
planName: 'starter_yearly',
|
|
110
|
-
displayName: 'Starter',
|
|
111
|
-
sku: 'ADT-003',
|
|
112
|
-
description: 'Starter Plan - Yearly',
|
|
113
|
-
price: '191.90',
|
|
114
|
-
displayPrice: '$15.99',
|
|
115
|
-
billingFrequency: PLAN_BILLING_FREQUENCY.YEARLY,
|
|
116
|
-
trialLengthDays: 30,
|
|
117
|
-
trialRequiresCreditCard: false,
|
|
118
|
-
planDesc: [
|
|
119
|
-
'60-day Risk Free Trial',
|
|
120
|
-
...CommonPlanInfo,
|
|
121
|
-
'Up to 2,000 orders/month (250,000 events)*'
|
|
122
|
-
],
|
|
123
|
-
unitPriceText: 'billed yearly (191.90) - 20% savings',
|
|
124
|
-
isHighlighted: true,
|
|
125
|
-
isBanner: true,
|
|
126
|
-
bannerColor: 'blue',
|
|
127
|
-
bannerText: 'MOST POPULAR'
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
id: 4,
|
|
131
|
-
planName: 'scale_monthly',
|
|
132
|
-
displayName: 'Scale',
|
|
133
|
-
sku: 'ADT-004',
|
|
134
|
-
description: 'Scale Plan - Monthly',
|
|
135
|
-
price: '49.99',
|
|
136
|
-
displayPrice: '$49.99',
|
|
137
|
-
billingFrequency: PLAN_BILLING_FREQUENCY.MONTHLY,
|
|
138
|
-
trialLengthDays: 60,
|
|
139
|
-
trialRequiresCreditCard: false,
|
|
140
|
-
planDesc: [
|
|
141
|
-
'60-day Risk Free Trial',
|
|
142
|
-
...CommonPlanInfo,
|
|
143
|
-
'Up to 750 orders/month (75,000 events)*'
|
|
144
|
-
],
|
|
145
|
-
unitPriceText: '',
|
|
146
|
-
isHighlighted: false,
|
|
147
|
-
isBanner: false
|
|
148
|
-
}, {
|
|
149
|
-
id: 5,
|
|
150
|
-
planName: 'scale_yearly',
|
|
151
|
-
displayName: 'Scale',
|
|
152
|
-
sku: 'ADT-005',
|
|
153
|
-
description: 'Scale Plan - Yearly',
|
|
154
|
-
price: '455.90',
|
|
155
|
-
displayPrice: '$37.99',
|
|
156
|
-
billingFrequency: PLAN_BILLING_FREQUENCY.YEARLY,
|
|
157
|
-
trialLengthDays: 60,
|
|
158
|
-
trialRequiresCreditCard: false,
|
|
159
|
-
planDesc: [
|
|
160
|
-
'60-day Risk Free Trial',
|
|
161
|
-
...CommonPlanInfo,
|
|
162
|
-
'Up to 500 orders/month (50,000 events)*'
|
|
163
|
-
],
|
|
164
|
-
unitPriceText: 'billed yearly ($455.90) - 24% savings',
|
|
165
|
-
isHighlighted: false,
|
|
166
|
-
isBanner: false
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
id: 6,
|
|
170
|
-
planName: 'growth_monthly',
|
|
171
|
-
displayName: 'Growth',
|
|
172
|
-
sku: 'ADT-006',
|
|
173
|
-
description: 'Growth Plan - Monthly',
|
|
174
|
-
price: '99.99',
|
|
175
|
-
displayPrice: '$99.99',
|
|
176
|
-
billingFrequency: PLAN_BILLING_FREQUENCY.MONTHLY,
|
|
177
|
-
trialLengthDays: 60,
|
|
178
|
-
trialRequiresCreditCard: false,
|
|
179
|
-
planDesc: [
|
|
180
|
-
'60-day Risk Free Trial',
|
|
181
|
-
...CommonPlanInfo,
|
|
182
|
-
'Up to 1000 orders/month (100,000 events)*'
|
|
183
|
-
],
|
|
184
|
-
unitPriceText: '',
|
|
185
|
-
isHighlighted: false,
|
|
186
|
-
isBanner: true,
|
|
187
|
-
bannerColor: 'orange',
|
|
188
|
-
bannerText: 'BEST VALUE'
|
|
189
|
-
}, {
|
|
190
|
-
id: 7,
|
|
191
|
-
planName: 'growth_yearly',
|
|
192
|
-
displayName: 'Growth',
|
|
193
|
-
sku: 'ADT-007',
|
|
194
|
-
description: 'Growth Plan - Yearly',
|
|
195
|
-
price: '899.91',
|
|
196
|
-
displayPrice: '$74.99',
|
|
197
|
-
billingFrequency: PLAN_BILLING_FREQUENCY.YEARLY,
|
|
198
|
-
trialLengthDays: 60,
|
|
199
|
-
trialRequiresCreditCard: false,
|
|
200
|
-
planDesc: [
|
|
201
|
-
'60-day Risk Free Trial',
|
|
202
|
-
...CommonPlanInfo,
|
|
203
|
-
'Up to 1000 orders/month (100,000 events)*'
|
|
204
|
-
],
|
|
205
|
-
unitPriceText: 'billed yearly ($899.91) - 25% savings',
|
|
206
|
-
isHighlighted: false,
|
|
207
|
-
isBanner: true,
|
|
208
|
-
bannerColor: 'orange',
|
|
209
|
-
bannerText: 'BEST VALUE'
|
|
210
|
-
},
|
|
211
|
-
]
|
|
212
|
-
};
|
|
213
|
-
export const getPlanDetails = (planId, stage) => {
|
|
214
|
-
const plan = SubscriptionPlanSeedItems.items.filter(x => x.id === planId)[0];
|
|
215
|
-
plan.stripePriceId = StripeBillingMap[stage][plan.planName];
|
|
216
|
-
return plan;
|
|
217
|
-
};
|
|
218
|
-
export const getPlanByStripePriceId = (stripePriceId, stage) => {
|
|
219
|
-
const stripePriceIds = StripeBillingMap[stage];
|
|
220
|
-
const planName = Object.keys(stripePriceIds).find(key => stripePriceIds[key] === stripePriceId);
|
|
221
|
-
const plan = SubscriptionPlanSeedItems.items.filter(x => x.planName === planName)[0];
|
|
222
|
-
plan.stripePriceId = stripePriceId;
|
|
223
|
-
return plan;
|
|
224
|
-
};
|
|
1
|
+
import { PLAN_BILLING_FREQUENCY } from '@adtrackify/at-tracking-event-types';
|
|
2
|
+
export const StripeBillingMap = {
|
|
3
|
+
dev2: {
|
|
4
|
+
'free': 'price_1JzjbKK7krGh4037ezNbGJEm',
|
|
5
|
+
'starter_monthly': 'price_1JwzsGK7krGh4037Li0hPpsZ',
|
|
6
|
+
'starter_yearly': 'price_1JwzsGK7krGh4037Li0hPpsZ',
|
|
7
|
+
'scale_monthly': 'price_1JzjcSK7krGh4037yh34LPk3',
|
|
8
|
+
'scale_yearly': 'price_1JzjcSK7krGh4037QiBJYfnD',
|
|
9
|
+
'growth_monthly': 'price_1Jzje1K7krGh4037KErHBp5N',
|
|
10
|
+
'growth_yearly': 'price_1Jzje1K7krGh4037MhCUhTDh'
|
|
11
|
+
},
|
|
12
|
+
qa2: {
|
|
13
|
+
'free': 'price_1JzjbKK7krGh4037ezNbGJEm',
|
|
14
|
+
'starter_monthly': 'price_1JwzsGK7krGh4037Li0hPpsZ',
|
|
15
|
+
'starter_yearly': 'price_1JwzsGK7krGh4037Li0hPpsZ',
|
|
16
|
+
'scale_monthly': 'price_1JzjcSK7krGh4037yh34LPk3',
|
|
17
|
+
'scale_yearly': 'price_1JzjcSK7krGh4037QiBJYfnD',
|
|
18
|
+
'growth_monthly': 'price_1Jzje1K7krGh4037KErHBp5N',
|
|
19
|
+
'growth_yearly': 'price_1Jzje1K7krGh4037MhCUhTDh'
|
|
20
|
+
},
|
|
21
|
+
prod2: {
|
|
22
|
+
'free': 'price_1KAFsIK7krGh4037RsaAYMEl',
|
|
23
|
+
'starter_monthly': 'price_1KAFsMK7krGh4037Lz3P0ksU',
|
|
24
|
+
'starter_yearly': 'price_1KAFsMK7krGh4037Dj1WmSi8',
|
|
25
|
+
'scale_monthly': 'price_1KAFrxK7krGh4037zWCdaTly',
|
|
26
|
+
'scale_yearly': 'price_1KAFrxK7krGh40375fhymyWP',
|
|
27
|
+
'growth_monthly': 'price_1KAFs7K7krGh4037JChjz5Cr',
|
|
28
|
+
'growth_yearly': 'price_1KAFs7K7krGh4037rZElg12s'
|
|
29
|
+
},
|
|
30
|
+
dev: {
|
|
31
|
+
'free': 'price_1JzjbKK7krGh4037ezNbGJEm',
|
|
32
|
+
'starter_monthly': 'price_1JwzsGK7krGh4037Li0hPpsZ',
|
|
33
|
+
'starter_yearly': 'price_1JwzsGK7krGh4037Li0hPpsZ',
|
|
34
|
+
'scale_monthly': 'price_1JzjcSK7krGh4037yh34LPk3',
|
|
35
|
+
'scale_yearly': 'price_1JzjcSK7krGh4037QiBJYfnD',
|
|
36
|
+
'growth_monthly': 'price_1Jzje1K7krGh4037KErHBp5N',
|
|
37
|
+
'growth_yearly': 'price_1Jzje1K7krGh4037MhCUhTDh'
|
|
38
|
+
},
|
|
39
|
+
qa: {
|
|
40
|
+
'free': 'price_1JzjbKK7krGh4037ezNbGJEm',
|
|
41
|
+
'starter_monthly': 'price_1JwzsGK7krGh4037Li0hPpsZ',
|
|
42
|
+
'starter_yearly': 'price_1JwzsGK7krGh4037Li0hPpsZ',
|
|
43
|
+
'scale_monthly': 'price_1JzjcSK7krGh4037yh34LPk3',
|
|
44
|
+
'scale_yearly': 'price_1JzjcSK7krGh4037QiBJYfnD',
|
|
45
|
+
'growth_monthly': 'price_1Jzje1K7krGh4037KErHBp5N',
|
|
46
|
+
'growth_yearly': 'price_1Jzje1K7krGh4037MhCUhTDh'
|
|
47
|
+
},
|
|
48
|
+
prod: {
|
|
49
|
+
'free': 'price_1KAFsIK7krGh4037RsaAYMEl',
|
|
50
|
+
'starter_monthly': 'price_1KAFsMK7krGh4037Lz3P0ksU',
|
|
51
|
+
'starter_yearly': 'price_1KAFsMK7krGh4037Dj1WmSi8',
|
|
52
|
+
'scale_monthly': 'price_1KAFrxK7krGh4037zWCdaTly',
|
|
53
|
+
'scale_yearly': 'price_1KAFrxK7krGh40375fhymyWP',
|
|
54
|
+
'growth_monthly': 'price_1KAFs7K7krGh4037JChjz5Cr',
|
|
55
|
+
'growth_yearly': 'price_1KAFs7K7krGh4037rZElg12s'
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
export const CommonPlanInfo = [
|
|
59
|
+
'Free Server Side Tracking & Conversion API',
|
|
60
|
+
'MultiPixel Support (Multiple facebook, tiktok, etc)',
|
|
61
|
+
'Corrects Facebook Conversion Tracking post IOS14',
|
|
62
|
+
'Increase ROAS & Attribution Data',
|
|
63
|
+
'Enhanced Fingerprinting & Identity Resolution',
|
|
64
|
+
'Unlimited Integrations',
|
|
65
|
+
'Advanced Integrations (Webhooks, Custom JS/HTML, Hubspot)'
|
|
66
|
+
];
|
|
67
|
+
export const SubscriptionPlanSeedItems = {
|
|
68
|
+
items: [{
|
|
69
|
+
id: 1,
|
|
70
|
+
planName: 'free',
|
|
71
|
+
displayName: 'Free',
|
|
72
|
+
sku: 'ADT-001',
|
|
73
|
+
description: 'Free Plan - Monthly',
|
|
74
|
+
price: '0',
|
|
75
|
+
displayPrice: '$0',
|
|
76
|
+
billingFrequency: PLAN_BILLING_FREQUENCY.MONTHLY,
|
|
77
|
+
trialLengthDays: 0,
|
|
78
|
+
trialRequiresCreditCard: false,
|
|
79
|
+
planDesc: [
|
|
80
|
+
...CommonPlanInfo,
|
|
81
|
+
'Free Up to 100 orders/month (10,000 events)*'
|
|
82
|
+
],
|
|
83
|
+
unitPriceText: 'try now - free forever',
|
|
84
|
+
isHighlighted: false,
|
|
85
|
+
isBanner: false
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: 2,
|
|
89
|
+
planName: 'starter_monthly',
|
|
90
|
+
displayName: 'Starter',
|
|
91
|
+
sku: 'ADT-002',
|
|
92
|
+
description: 'Starter Plan - Monthly',
|
|
93
|
+
price: '19.99',
|
|
94
|
+
displayPrice: '$19.99',
|
|
95
|
+
billingFrequency: PLAN_BILLING_FREQUENCY.MONTHLY,
|
|
96
|
+
trialLengthDays: 60,
|
|
97
|
+
trialRequiresCreditCard: false,
|
|
98
|
+
planDesc: [
|
|
99
|
+
'60-day Risk Free Trial',
|
|
100
|
+
...CommonPlanInfo,
|
|
101
|
+
'Up to 250 orders/month (25,000 events)*'
|
|
102
|
+
],
|
|
103
|
+
isHighlighted: true,
|
|
104
|
+
isBanner: true,
|
|
105
|
+
bannerColor: 'blue',
|
|
106
|
+
bannerText: 'MOST POPULAR'
|
|
107
|
+
}, {
|
|
108
|
+
id: 3,
|
|
109
|
+
planName: 'starter_yearly',
|
|
110
|
+
displayName: 'Starter',
|
|
111
|
+
sku: 'ADT-003',
|
|
112
|
+
description: 'Starter Plan - Yearly',
|
|
113
|
+
price: '191.90',
|
|
114
|
+
displayPrice: '$15.99',
|
|
115
|
+
billingFrequency: PLAN_BILLING_FREQUENCY.YEARLY,
|
|
116
|
+
trialLengthDays: 30,
|
|
117
|
+
trialRequiresCreditCard: false,
|
|
118
|
+
planDesc: [
|
|
119
|
+
'60-day Risk Free Trial',
|
|
120
|
+
...CommonPlanInfo,
|
|
121
|
+
'Up to 2,000 orders/month (250,000 events)*'
|
|
122
|
+
],
|
|
123
|
+
unitPriceText: 'billed yearly (191.90) - 20% savings',
|
|
124
|
+
isHighlighted: true,
|
|
125
|
+
isBanner: true,
|
|
126
|
+
bannerColor: 'blue',
|
|
127
|
+
bannerText: 'MOST POPULAR'
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
id: 4,
|
|
131
|
+
planName: 'scale_monthly',
|
|
132
|
+
displayName: 'Scale',
|
|
133
|
+
sku: 'ADT-004',
|
|
134
|
+
description: 'Scale Plan - Monthly',
|
|
135
|
+
price: '49.99',
|
|
136
|
+
displayPrice: '$49.99',
|
|
137
|
+
billingFrequency: PLAN_BILLING_FREQUENCY.MONTHLY,
|
|
138
|
+
trialLengthDays: 60,
|
|
139
|
+
trialRequiresCreditCard: false,
|
|
140
|
+
planDesc: [
|
|
141
|
+
'60-day Risk Free Trial',
|
|
142
|
+
...CommonPlanInfo,
|
|
143
|
+
'Up to 750 orders/month (75,000 events)*'
|
|
144
|
+
],
|
|
145
|
+
unitPriceText: '',
|
|
146
|
+
isHighlighted: false,
|
|
147
|
+
isBanner: false
|
|
148
|
+
}, {
|
|
149
|
+
id: 5,
|
|
150
|
+
planName: 'scale_yearly',
|
|
151
|
+
displayName: 'Scale',
|
|
152
|
+
sku: 'ADT-005',
|
|
153
|
+
description: 'Scale Plan - Yearly',
|
|
154
|
+
price: '455.90',
|
|
155
|
+
displayPrice: '$37.99',
|
|
156
|
+
billingFrequency: PLAN_BILLING_FREQUENCY.YEARLY,
|
|
157
|
+
trialLengthDays: 60,
|
|
158
|
+
trialRequiresCreditCard: false,
|
|
159
|
+
planDesc: [
|
|
160
|
+
'60-day Risk Free Trial',
|
|
161
|
+
...CommonPlanInfo,
|
|
162
|
+
'Up to 500 orders/month (50,000 events)*'
|
|
163
|
+
],
|
|
164
|
+
unitPriceText: 'billed yearly ($455.90) - 24% savings',
|
|
165
|
+
isHighlighted: false,
|
|
166
|
+
isBanner: false
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
id: 6,
|
|
170
|
+
planName: 'growth_monthly',
|
|
171
|
+
displayName: 'Growth',
|
|
172
|
+
sku: 'ADT-006',
|
|
173
|
+
description: 'Growth Plan - Monthly',
|
|
174
|
+
price: '99.99',
|
|
175
|
+
displayPrice: '$99.99',
|
|
176
|
+
billingFrequency: PLAN_BILLING_FREQUENCY.MONTHLY,
|
|
177
|
+
trialLengthDays: 60,
|
|
178
|
+
trialRequiresCreditCard: false,
|
|
179
|
+
planDesc: [
|
|
180
|
+
'60-day Risk Free Trial',
|
|
181
|
+
...CommonPlanInfo,
|
|
182
|
+
'Up to 1000 orders/month (100,000 events)*'
|
|
183
|
+
],
|
|
184
|
+
unitPriceText: '',
|
|
185
|
+
isHighlighted: false,
|
|
186
|
+
isBanner: true,
|
|
187
|
+
bannerColor: 'orange',
|
|
188
|
+
bannerText: 'BEST VALUE'
|
|
189
|
+
}, {
|
|
190
|
+
id: 7,
|
|
191
|
+
planName: 'growth_yearly',
|
|
192
|
+
displayName: 'Growth',
|
|
193
|
+
sku: 'ADT-007',
|
|
194
|
+
description: 'Growth Plan - Yearly',
|
|
195
|
+
price: '899.91',
|
|
196
|
+
displayPrice: '$74.99',
|
|
197
|
+
billingFrequency: PLAN_BILLING_FREQUENCY.YEARLY,
|
|
198
|
+
trialLengthDays: 60,
|
|
199
|
+
trialRequiresCreditCard: false,
|
|
200
|
+
planDesc: [
|
|
201
|
+
'60-day Risk Free Trial',
|
|
202
|
+
...CommonPlanInfo,
|
|
203
|
+
'Up to 1000 orders/month (100,000 events)*'
|
|
204
|
+
],
|
|
205
|
+
unitPriceText: 'billed yearly ($899.91) - 25% savings',
|
|
206
|
+
isHighlighted: false,
|
|
207
|
+
isBanner: true,
|
|
208
|
+
bannerColor: 'orange',
|
|
209
|
+
bannerText: 'BEST VALUE'
|
|
210
|
+
},
|
|
211
|
+
]
|
|
212
|
+
};
|
|
213
|
+
export const getPlanDetails = (planId, stage) => {
|
|
214
|
+
const plan = SubscriptionPlanSeedItems.items.filter(x => x.id === planId)[0];
|
|
215
|
+
plan.stripePriceId = StripeBillingMap[stage][plan.planName];
|
|
216
|
+
return plan;
|
|
217
|
+
};
|
|
218
|
+
export const getPlanByStripePriceId = (stripePriceId, stage) => {
|
|
219
|
+
const stripePriceIds = StripeBillingMap[stage];
|
|
220
|
+
const planName = Object.keys(stripePriceIds).find(key => stripePriceIds[key] === stripePriceId);
|
|
221
|
+
const plan = SubscriptionPlanSeedItems.items.filter(x => x.planName === planName)[0];
|
|
222
|
+
plan.stripePriceId = stripePriceId;
|
|
223
|
+
return plan;
|
|
224
|
+
};
|
|
225
225
|
//# sourceMappingURL=subscription-helper.js.map
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './clients/index.js';
|
|
2
|
-
export * from './helpers/index.js';
|
|
3
|
-
export * from './libs/index.js';
|
|
4
|
-
export * from './types/index.js';
|
|
5
|
-
export * from './services/index.js';
|
|
1
|
+
export * from './clients/index.js';
|
|
2
|
+
export * from './helpers/index.js';
|
|
3
|
+
export * from './libs/index.js';
|
|
4
|
+
export * from './types/index.js';
|
|
5
|
+
export * from './services/index.js';
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './clients/index.js';
|
|
2
|
-
export * from './helpers/index.js';
|
|
3
|
-
export * from './libs/index.js';
|
|
4
|
-
export * from './types/index.js';
|
|
5
|
-
export * from './services/index.js';
|
|
1
|
+
export * from './clients/index.js';
|
|
2
|
+
export * from './helpers/index.js';
|
|
3
|
+
export * from './libs/index.js';
|
|
4
|
+
export * from './types/index.js';
|
|
5
|
+
export * from './services/index.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export declare const ClickIdDictionary: {
|
|
2
|
-
gclid: string;
|
|
3
|
-
dclid: string;
|
|
4
|
-
gbraid: string;
|
|
5
|
-
wbraid: string;
|
|
6
|
-
fbclid: string;
|
|
7
|
-
ttclid: string;
|
|
8
|
-
twclid: string;
|
|
9
|
-
sccid: string;
|
|
10
|
-
taboola_click_id: string;
|
|
11
|
-
ob_click_id: string;
|
|
12
|
-
microsoftclickid: string;
|
|
13
|
-
};
|
|
14
|
-
export declare const parseClickId: (qsp: URLSearchParams) => {
|
|
15
|
-
mktClickParam: string;
|
|
16
|
-
mktClickId: string | null;
|
|
17
|
-
mktClickNetwork: string;
|
|
18
|
-
} | undefined;
|
|
1
|
+
export declare const ClickIdDictionary: {
|
|
2
|
+
gclid: string;
|
|
3
|
+
dclid: string;
|
|
4
|
+
gbraid: string;
|
|
5
|
+
wbraid: string;
|
|
6
|
+
fbclid: string;
|
|
7
|
+
ttclid: string;
|
|
8
|
+
twclid: string;
|
|
9
|
+
sccid: string;
|
|
10
|
+
taboola_click_id: string;
|
|
11
|
+
ob_click_id: string;
|
|
12
|
+
microsoftclickid: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const parseClickId: (qsp: URLSearchParams) => {
|
|
15
|
+
mktClickParam: string;
|
|
16
|
+
mktClickId: string | null;
|
|
17
|
+
mktClickNetwork: string;
|
|
18
|
+
} | undefined;
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { isEmpty } from '@adtrackify/at-shared-utils';
|
|
2
|
-
import { Logger } from '../helpers';
|
|
3
|
-
export const ClickIdDictionary = {
|
|
4
|
-
'gclid': 'Google',
|
|
5
|
-
'dclid': 'Google',
|
|
6
|
-
'gbraid': 'Google',
|
|
7
|
-
'wbraid': 'Google',
|
|
8
|
-
'fbclid': 'Facebook',
|
|
9
|
-
'ttclid': 'TikTok',
|
|
10
|
-
'twclid': 'Twitter',
|
|
11
|
-
'sccid': 'Snapchat',
|
|
12
|
-
'taboola_click_id': 'Taboola',
|
|
13
|
-
'ob_click_id': 'Outbrain',
|
|
14
|
-
'microsoftclickid': 'Microsoft',
|
|
15
|
-
};
|
|
16
|
-
export const parseClickId = (qsp) => {
|
|
17
|
-
try {
|
|
18
|
-
if (!isEmpty(qsp)) {
|
|
19
|
-
for (const item of Object.entries(ClickIdDictionary)) {
|
|
20
|
-
if (qsp.has(item?.[0])) {
|
|
21
|
-
return {
|
|
22
|
-
mktClickParam: item[0],
|
|
23
|
-
mktClickId: qsp.get(item[0]),
|
|
24
|
-
mktClickNetwork: item[1]
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
catch (error) {
|
|
31
|
-
Logger.warn('Unable to parse click ID', { error });
|
|
32
|
-
return undefined;
|
|
33
|
-
}
|
|
34
|
-
};
|
|
1
|
+
import { isEmpty } from '@adtrackify/at-shared-utils';
|
|
2
|
+
import { Logger } from '../helpers';
|
|
3
|
+
export const ClickIdDictionary = {
|
|
4
|
+
'gclid': 'Google',
|
|
5
|
+
'dclid': 'Google',
|
|
6
|
+
'gbraid': 'Google',
|
|
7
|
+
'wbraid': 'Google',
|
|
8
|
+
'fbclid': 'Facebook',
|
|
9
|
+
'ttclid': 'TikTok',
|
|
10
|
+
'twclid': 'Twitter',
|
|
11
|
+
'sccid': 'Snapchat',
|
|
12
|
+
'taboola_click_id': 'Taboola',
|
|
13
|
+
'ob_click_id': 'Outbrain',
|
|
14
|
+
'microsoftclickid': 'Microsoft',
|
|
15
|
+
};
|
|
16
|
+
export const parseClickId = (qsp) => {
|
|
17
|
+
try {
|
|
18
|
+
if (!isEmpty(qsp)) {
|
|
19
|
+
for (const item of Object.entries(ClickIdDictionary)) {
|
|
20
|
+
if (qsp.has(item?.[0])) {
|
|
21
|
+
return {
|
|
22
|
+
mktClickParam: item[0],
|
|
23
|
+
mktClickId: qsp.get(item[0]),
|
|
24
|
+
mktClickNetwork: item[1]
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
Logger.warn('Unable to parse click ID', { error });
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
35
|
//# sourceMappingURL=clickId-parser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const generatePublicKey: () => string;
|
|
1
|
+
export declare const generatePublicKey: () => string;
|
package/dist/esm/libs/crypto.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import crypto from 'crypto';
|
|
2
|
-
export const generatePublicKey = () => {
|
|
3
|
-
const publicKey = crypto.randomBytes(26);
|
|
4
|
-
return publicKey.toString('utf8');
|
|
5
|
-
};
|
|
1
|
+
import crypto from 'crypto';
|
|
2
|
+
export const generatePublicKey = () => {
|
|
3
|
+
const publicKey = crypto.randomBytes(26);
|
|
4
|
+
return publicKey.toString('utf8');
|
|
5
|
+
};
|
|
6
6
|
//# sourceMappingURL=crypto.js.map
|
package/dist/esm/libs/dates.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const getCurrentTimestamp: () => string;
|
|
2
|
-
export declare const getDateFromTimestamp: (timestamp: string) => string;
|
|
3
|
-
export declare const getCurrentDate: () => string;
|
|
1
|
+
export declare const getCurrentTimestamp: () => string;
|
|
2
|
+
export declare const getDateFromTimestamp: (timestamp: string) => string;
|
|
3
|
+
export declare const getCurrentDate: () => string;
|
package/dist/esm/libs/dates.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { DateTime } from 'luxon';
|
|
2
|
-
export const getCurrentTimestamp = () => {
|
|
3
|
-
return DateTime.utc().toJSDate().toISOString();
|
|
4
|
-
};
|
|
5
|
-
export const getDateFromTimestamp = (timestamp) => {
|
|
6
|
-
return timestamp.split('T')[0];
|
|
7
|
-
};
|
|
8
|
-
export const getCurrentDate = () => {
|
|
9
|
-
return getDateFromTimestamp(getCurrentTimestamp());
|
|
10
|
-
};
|
|
1
|
+
import { DateTime } from 'luxon';
|
|
2
|
+
export const getCurrentTimestamp = () => {
|
|
3
|
+
return DateTime.utc().toJSDate().toISOString();
|
|
4
|
+
};
|
|
5
|
+
export const getDateFromTimestamp = (timestamp) => {
|
|
6
|
+
return timestamp.split('T')[0];
|
|
7
|
+
};
|
|
8
|
+
export const getCurrentDate = () => {
|
|
9
|
+
return getDateFromTimestamp(getCurrentTimestamp());
|
|
10
|
+
};
|
|
11
11
|
//# sourceMappingURL=dates.js.map
|