@adtrackify/at-service-common 1.1.19 → 1.1.20
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/.eslintignore +3 -0
- package/.vscode/settings.json +9 -9
- package/build.js +27 -10
- package/dist/index.d.ts +41 -41
- package/dist/index.esm.js +1335 -0
- package/dist/index.esm.js.map +7 -0
- package/dist/index.js +249 -122
- package/dist/index.js.map +4 -4
- package/jest.config.ts +40 -40
- package/package.json +27 -27
- package/src/__tests__/helpers/subscription-helper.spec.ts +1 -1
- package/src/clients/generic/axios.d.ts +7 -7
- package/src/clients/generic/eventbridge-client.ts +1 -1
- package/src/clients/generic/http-client.ts +2 -3
- package/src/clients/generic/index.ts +5 -5
- package/src/clients/index.ts +3 -3
- package/src/clients/internal-api/accounts-client.ts +2 -2
- package/src/clients/internal-api/destinations-client.ts +2 -2
- package/src/clients/internal-api/index.ts +4 -4
- package/src/clients/internal-api/shopify-app-install-client.ts +4 -4
- package/src/clients/internal-api/users-auth-client.ts +4 -3
- package/src/clients/third-party/index.ts +1 -1
- package/src/clients/third-party/shopify-client.ts +1 -1
- package/src/helpers/index.ts +5 -5
- package/src/helpers/input-validation-helper.ts +1 -1
- package/src/helpers/shopify-helper.ts +2 -2
- package/src/index.ts +5 -5
- package/src/libs/index.ts +6 -6
- package/src/libs/url.ts +9 -9
- package/src/services/eventbridge-integration-service.ts +1 -1
- package/src/services/index.ts +1 -1
- package/src/types/index.ts +1 -1
- package/src/types/internal-events/event-detail-types.ts +9 -9
- package/src/types/internal-events/index.ts +1 -1
- package/tsconfig.json +2 -3
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/.eslintignore
ADDED
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/build.js
CHANGED
|
@@ -1,22 +1,39 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
// @ts-ignore
|
|
3
3
|
/* eslint-disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import { build } from 'esbuild'
|
|
6
|
+
import npmdts from 'npm-dts'
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
+
import { readFile } from 'fs/promises';
|
|
9
|
+
const json = JSON.parse(
|
|
10
|
+
await readFile(
|
|
11
|
+
new URL('./package.json', import.meta.url)
|
|
12
|
+
)
|
|
13
|
+
);
|
|
8
14
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
15
|
+
console.log(json.dependencies);
|
|
16
|
+
build({
|
|
17
|
+
entryPoints: ['./src/index.ts'],
|
|
18
|
+
outfile: 'dist/index.js',
|
|
19
|
+
bundle: true,
|
|
20
|
+
platform: 'node',
|
|
21
|
+
sourcemap: 'linked',
|
|
22
|
+
external: [...Object.keys(json.dependencies), '@aws-sdk/client-dynamodb', '@aws-sdk/client-eventbridge', '@aws-sdk/lib-dynamodb', '@aws-sdk/client-s3', '@aws-sdk/client-cognito-identity-provider', "@faker-js/faker"]
|
|
23
|
+
})
|
|
13
24
|
|
|
14
25
|
build({
|
|
15
26
|
entryPoints: ['./src/index.ts'],
|
|
16
|
-
|
|
27
|
+
outfile: 'dist/index.esm.js',
|
|
17
28
|
bundle: true,
|
|
18
29
|
format: 'esm',
|
|
19
30
|
platform: 'node',
|
|
20
31
|
sourcemap: 'linked',
|
|
21
|
-
external: [...Object.keys(dependencies), '@aws-sdk/client-dynamodb', '@aws-sdk/client-eventbridge', '@aws-sdk/lib-dynamodb', '@aws-sdk/client-s3', '@aws-sdk/client-cognito-identity-provider', "@faker-js/faker"]
|
|
22
|
-
})
|
|
32
|
+
external: [...Object.keys(json.dependencies), '@aws-sdk/client-dynamodb', '@aws-sdk/client-eventbridge', '@aws-sdk/lib-dynamodb', '@aws-sdk/client-s3', '@aws-sdk/client-cognito-identity-provider', "@faker-js/faker"]
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
new npmdts.Generator({
|
|
37
|
+
entry: 'src/index.ts',
|
|
38
|
+
output: 'dist/index.d.ts',
|
|
39
|
+
}).generate()
|
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/cognito-client' {
|
|
6
2
|
export function dictToAwsAttributes(input: any): {
|
|
7
3
|
Name: string;
|
|
@@ -92,11 +88,11 @@ declare module '@adtrackify/at-service-common/clients/generic/http-client' {
|
|
|
92
88
|
|
|
93
89
|
}
|
|
94
90
|
declare module '@adtrackify/at-service-common/clients/generic/index' {
|
|
95
|
-
export * from '@adtrackify/at-service-common/clients/generic/dynamodb-client';
|
|
96
|
-
export * from '@adtrackify/at-service-common/clients/generic/eventbridge-client';
|
|
97
|
-
export * from '@adtrackify/at-service-common/clients/generic/http-client';
|
|
98
|
-
export * from '@adtrackify/at-service-common/clients/generic/s3-client';
|
|
99
|
-
export * from '@adtrackify/at-service-common/clients/generic/cognito-client';
|
|
91
|
+
export * from '@adtrackify/at-service-common/clients/generic/dynamodb-client.js/index';
|
|
92
|
+
export * from '@adtrackify/at-service-common/clients/generic/eventbridge-client.js/index';
|
|
93
|
+
export * from '@adtrackify/at-service-common/clients/generic/http-client.js/index';
|
|
94
|
+
export * from '@adtrackify/at-service-common/clients/generic/s3-client.js/index';
|
|
95
|
+
export * from '@adtrackify/at-service-common/clients/generic/cognito-client.js/index';
|
|
100
96
|
|
|
101
97
|
}
|
|
102
98
|
declare module '@adtrackify/at-service-common/clients/generic/s3-client' {
|
|
@@ -109,13 +105,13 @@ declare module '@adtrackify/at-service-common/clients/generic/s3-client' {
|
|
|
109
105
|
|
|
110
106
|
}
|
|
111
107
|
declare module '@adtrackify/at-service-common/clients/index' {
|
|
112
|
-
export * from '@adtrackify/at-service-common/clients/generic/index';
|
|
113
|
-
export * from '@adtrackify/at-service-common/clients/internal-api/index';
|
|
114
|
-
export * from '@adtrackify/at-service-common/clients/third-party/index';
|
|
108
|
+
export * from '@adtrackify/at-service-common/clients/generic/index.js/index';
|
|
109
|
+
export * from '@adtrackify/at-service-common/clients/internal-api/index.js/index';
|
|
110
|
+
export * from '@adtrackify/at-service-common/clients/third-party/index.js/index';
|
|
115
111
|
|
|
116
112
|
}
|
|
117
113
|
declare module '@adtrackify/at-service-common/clients/internal-api/accounts-client' {
|
|
118
|
-
import { ApiResponse } from '@adtrackify/at-service-common/types/api-response';
|
|
114
|
+
import { ApiResponse } from '@adtrackify/at-service-common/types/api-response.js/index';
|
|
119
115
|
import { Account, ACCOUNT_STATUS, Destination } from '@adtrackify/at-tracking-event-types';
|
|
120
116
|
export interface AccountResponseData {
|
|
121
117
|
account: Account;
|
|
@@ -200,7 +196,7 @@ declare module '@adtrackify/at-service-common/clients/internal-api/accounts-clie
|
|
|
200
196
|
|
|
201
197
|
}
|
|
202
198
|
declare module '@adtrackify/at-service-common/clients/internal-api/destinations-client' {
|
|
203
|
-
import { ApiResponse } from '@adtrackify/at-service-common/types/api-response';
|
|
199
|
+
import { ApiResponse } from '@adtrackify/at-service-common/types/api-response.js/index';
|
|
204
200
|
import { Destination } from '@adtrackify/at-tracking-event-types';
|
|
205
201
|
export interface GetDestinationsResponseData {
|
|
206
202
|
destinations: Destination[];
|
|
@@ -257,14 +253,14 @@ declare module '@adtrackify/at-service-common/clients/internal-api/destinations-
|
|
|
257
253
|
|
|
258
254
|
}
|
|
259
255
|
declare module '@adtrackify/at-service-common/clients/internal-api/index' {
|
|
260
|
-
export * from '@adtrackify/at-service-common/clients/internal-api/destinations-client';
|
|
261
|
-
export * from '@adtrackify/at-service-common/clients/internal-api/accounts-client';
|
|
262
|
-
export * from '@adtrackify/at-service-common/clients/internal-api/users-auth-client';
|
|
263
|
-
export * from '@adtrackify/at-service-common/clients/internal-api/shopify-app-install-client';
|
|
256
|
+
export * from '@adtrackify/at-service-common/clients/internal-api/destinations-client.js/index';
|
|
257
|
+
export * from '@adtrackify/at-service-common/clients/internal-api/accounts-client.js/index';
|
|
258
|
+
export * from '@adtrackify/at-service-common/clients/internal-api/users-auth-client.js/index';
|
|
259
|
+
export * from '@adtrackify/at-service-common/clients/internal-api/shopify-app-install-client.js/index';
|
|
264
260
|
|
|
265
261
|
}
|
|
266
262
|
declare module '@adtrackify/at-service-common/clients/internal-api/shopify-app-install-client' {
|
|
267
|
-
import { ApiResponse } from '@adtrackify/at-service-common/types/api-response';
|
|
263
|
+
import { ApiResponse } from '@adtrackify/at-service-common/types/api-response.js/index';
|
|
268
264
|
import { ShopifyAppInstall, ShopifyAppSubscriptionStatus } from '@adtrackify/at-tracking-event-types';
|
|
269
265
|
export interface ShopifyAppInstallResponseData {
|
|
270
266
|
shopifyAppInstall: ShopifyAppInstall;
|
|
@@ -325,7 +321,7 @@ declare module '@adtrackify/at-service-common/clients/internal-api/shopify-app-i
|
|
|
325
321
|
}
|
|
326
322
|
declare module '@adtrackify/at-service-common/clients/internal-api/users-auth-client' {
|
|
327
323
|
import { User } from '@adtrackify/at-tracking-event-types';
|
|
328
|
-
import { ApiResponse } from '@adtrackify/at-service-common/types/api-response';
|
|
324
|
+
import { ApiResponse } from '@adtrackify/at-service-common/types/api-response.js/index';
|
|
329
325
|
export interface UserResponseData {
|
|
330
326
|
user: User;
|
|
331
327
|
[key: string]: any;
|
|
@@ -388,7 +384,7 @@ declare module '@adtrackify/at-service-common/clients/internal-api/users-auth-cl
|
|
|
388
384
|
|
|
389
385
|
}
|
|
390
386
|
declare module '@adtrackify/at-service-common/clients/third-party/index' {
|
|
391
|
-
export * from '@adtrackify/at-service-common/clients/third-party/shopify-client';
|
|
387
|
+
export * from '@adtrackify/at-service-common/clients/third-party/shopify-client.js/index';
|
|
392
388
|
|
|
393
389
|
}
|
|
394
390
|
declare module '@adtrackify/at-service-common/clients/third-party/shopify-client' {
|
|
@@ -485,11 +481,11 @@ declare module '@adtrackify/at-service-common/clients/third-party/shopify-client
|
|
|
485
481
|
|
|
486
482
|
}
|
|
487
483
|
declare module '@adtrackify/at-service-common/helpers/index' {
|
|
488
|
-
export * from '@adtrackify/at-service-common/helpers/input-validation-helper';
|
|
489
|
-
export * from '@adtrackify/at-service-common/helpers/logging-helper';
|
|
490
|
-
export * from '@adtrackify/at-service-common/helpers/response-helper';
|
|
491
|
-
export * from '@adtrackify/at-service-common/helpers/shopify-helper';
|
|
492
|
-
export * from '@adtrackify/at-service-common/helpers/subscription-helper';
|
|
484
|
+
export * from '@adtrackify/at-service-common/helpers/input-validation-helper.js/index';
|
|
485
|
+
export * from '@adtrackify/at-service-common/helpers/logging-helper.js/index';
|
|
486
|
+
export * from '@adtrackify/at-service-common/helpers/response-helper.js/index';
|
|
487
|
+
export * from '@adtrackify/at-service-common/helpers/shopify-helper.js/index';
|
|
488
|
+
export * from '@adtrackify/at-service-common/helpers/subscription-helper.js/index';
|
|
493
489
|
|
|
494
490
|
}
|
|
495
491
|
declare module '@adtrackify/at-service-common/helpers/input-validation-helper' {
|
|
@@ -564,11 +560,11 @@ declare module '@adtrackify/at-service-common/helpers/subscription-helper' {
|
|
|
564
560
|
|
|
565
561
|
}
|
|
566
562
|
declare module '@adtrackify/at-service-common/index' {
|
|
567
|
-
export * from '@adtrackify/at-service-common/clients/index';
|
|
568
|
-
export * from '@adtrackify/at-service-common/helpers/index';
|
|
569
|
-
export * from '@adtrackify/at-service-common/libs/index';
|
|
570
|
-
export * from '@adtrackify/at-service-common/types/index';
|
|
571
|
-
export * from '@adtrackify/at-service-common/services/index';
|
|
563
|
+
export * from '@adtrackify/at-service-common/clients/index.js/index';
|
|
564
|
+
export * from '@adtrackify/at-service-common/helpers/index.js/index';
|
|
565
|
+
export * from '@adtrackify/at-service-common/libs/index.js/index';
|
|
566
|
+
export * from '@adtrackify/at-service-common/types/index.js/index';
|
|
567
|
+
export * from '@adtrackify/at-service-common/services/index.js/index';
|
|
572
568
|
|
|
573
569
|
}
|
|
574
570
|
declare module '@adtrackify/at-service-common/libs/crypto' {
|
|
@@ -667,12 +663,12 @@ declare module '@adtrackify/at-service-common/libs/http-status-codes' {
|
|
|
667
663
|
|
|
668
664
|
}
|
|
669
665
|
declare module '@adtrackify/at-service-common/libs/index' {
|
|
670
|
-
export * from '@adtrackify/at-service-common/helpers/shopify-helper';
|
|
671
|
-
export * from '@adtrackify/at-service-common/libs/crypto';
|
|
672
|
-
export * from '@adtrackify/at-service-common/libs/dates';
|
|
673
|
-
export * from '@adtrackify/at-service-common/libs/http-error';
|
|
674
|
-
export * from '@adtrackify/at-service-common/libs/http-status-codes';
|
|
675
|
-
export * from '@adtrackify/at-service-common/libs/url';
|
|
666
|
+
export * from '@adtrackify/at-service-common/helpers/shopify-helper.js/index';
|
|
667
|
+
export * from '@adtrackify/at-service-common/libs/crypto.js/index';
|
|
668
|
+
export * from '@adtrackify/at-service-common/libs/dates.js/index';
|
|
669
|
+
export * from '@adtrackify/at-service-common/libs/http-error.js/index';
|
|
670
|
+
export * from '@adtrackify/at-service-common/libs/http-status-codes.js/index';
|
|
671
|
+
export * from '@adtrackify/at-service-common/libs/url.js/index';
|
|
676
672
|
|
|
677
673
|
}
|
|
678
674
|
declare module '@adtrackify/at-service-common/libs/url' {
|
|
@@ -680,7 +676,7 @@ declare module '@adtrackify/at-service-common/libs/url' {
|
|
|
680
676
|
|
|
681
677
|
}
|
|
682
678
|
declare module '@adtrackify/at-service-common/services/eventbridge-integration-service' {
|
|
683
|
-
import { EventBridgeClient } from '@adtrackify/at-service-common/clients/index';
|
|
679
|
+
import { EventBridgeClient } from '@adtrackify/at-service-common/clients/generic/eventbridge-client.js/index';
|
|
684
680
|
import { Message, TemplatedMessage } from 'postmark';
|
|
685
681
|
export const enum PostmarkRequestType {
|
|
686
682
|
SINGLE_EMAIL = "single_email",
|
|
@@ -699,7 +695,7 @@ declare module '@adtrackify/at-service-common/services/eventbridge-integration-s
|
|
|
699
695
|
|
|
700
696
|
}
|
|
701
697
|
declare module '@adtrackify/at-service-common/services/index' {
|
|
702
|
-
export * from '@adtrackify/at-service-common/services/eventbridge-integration-service';
|
|
698
|
+
export * from '@adtrackify/at-service-common/services/eventbridge-integration-service.js/index';
|
|
703
699
|
|
|
704
700
|
}
|
|
705
701
|
declare module '@adtrackify/at-service-common/types/api-response' {
|
|
@@ -712,7 +708,7 @@ declare module '@adtrackify/at-service-common/types/api-response' {
|
|
|
712
708
|
|
|
713
709
|
}
|
|
714
710
|
declare module '@adtrackify/at-service-common/types/index' {
|
|
715
|
-
export * from '@adtrackify/at-service-common/types/internal-events/index';
|
|
711
|
+
export * from '@adtrackify/at-service-common/types/internal-events/index.js/index';
|
|
716
712
|
|
|
717
713
|
}
|
|
718
714
|
declare module '@adtrackify/at-service-common/types/internal-events/event-detail-types' {
|
|
@@ -728,7 +724,11 @@ declare module '@adtrackify/at-service-common/types/internal-events/event-detail
|
|
|
728
724
|
|
|
729
725
|
}
|
|
730
726
|
declare module '@adtrackify/at-service-common/types/internal-events/index' {
|
|
731
|
-
export * from '@adtrackify/at-service-common/types/internal-events/event-detail-types';
|
|
727
|
+
export * from '@adtrackify/at-service-common/types/internal-events/event-detail-types.js/index';
|
|
728
|
+
|
|
729
|
+
}
|
|
730
|
+
declare module '@adtrackify/at-service-common/__tests__/helpers/subscription-helper.spec' {
|
|
731
|
+
export {};
|
|
732
732
|
|
|
733
733
|
}
|
|
734
734
|
declare module '@adtrackify/at-service-common' {
|