@adtrackify/at-service-common 1.1.18 → 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 +57 -54
- package/dist/index.esm.js +1335 -0
- package/dist/index.esm.js.map +7 -0
- package/dist/index.js +357 -234
- 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/cognito-client.ts +37 -36
- 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/generic/s3-client.ts +5 -9
- 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,23 +1,22 @@
|
|
|
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;
|
|
8
4
|
Value: any;
|
|
9
5
|
}[];
|
|
10
6
|
export class CognitoClient {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
cognitoClient: any;
|
|
8
|
+
USER_POOL_ID: string;
|
|
9
|
+
USER_POOL_NO_SECRET_CLIENT_ID: string;
|
|
10
|
+
constructor(userPoolId: string, userPoolNoSecretClientId: string);
|
|
11
|
+
signupUser: (data: any) => Promise<any>;
|
|
12
|
+
forgotPassword: (email: string) => Promise<any>;
|
|
13
|
+
adminEmailVerify: (email: string) => Promise<void>;
|
|
14
|
+
forceValidateEmail: (email: string) => Promise<void>;
|
|
15
|
+
adminConfirmUser: (data: any) => Promise<any>;
|
|
16
|
+
confirmUser: (data: any) => Promise<any>;
|
|
17
|
+
resendCode: (email: string) => Promise<void>;
|
|
18
|
+
adminDeleteUser: (userId: string) => Promise<boolean>;
|
|
19
|
+
getUserByEmail: (email: string) => Promise<any>;
|
|
21
20
|
}
|
|
22
21
|
|
|
23
22
|
}
|
|
@@ -89,30 +88,30 @@ declare module '@adtrackify/at-service-common/clients/generic/http-client' {
|
|
|
89
88
|
|
|
90
89
|
}
|
|
91
90
|
declare module '@adtrackify/at-service-common/clients/generic/index' {
|
|
92
|
-
export * from '@adtrackify/at-service-common/clients/generic/dynamodb-client';
|
|
93
|
-
export * from '@adtrackify/at-service-common/clients/generic/eventbridge-client';
|
|
94
|
-
export * from '@adtrackify/at-service-common/clients/generic/http-client';
|
|
95
|
-
export * from '@adtrackify/at-service-common/clients/generic/s3-client';
|
|
96
|
-
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';
|
|
97
96
|
|
|
98
97
|
}
|
|
99
98
|
declare module '@adtrackify/at-service-common/clients/generic/s3-client' {
|
|
100
|
-
import { S3 } from '@aws-sdk/client-s3';
|
|
99
|
+
import { ObjectCannedACL, S3 } from '@aws-sdk/client-s3';
|
|
101
100
|
export class S3Client {
|
|
102
101
|
s3: S3;
|
|
103
|
-
constructor(
|
|
104
|
-
uploadJson(path: string, bucket: string, jsonData: any): Promise<unknown>;
|
|
102
|
+
constructor(region?: string);
|
|
103
|
+
uploadJson(path: string, bucket: string, jsonData: any, ACL?: ObjectCannedACL | string): Promise<unknown>;
|
|
105
104
|
}
|
|
106
105
|
|
|
107
106
|
}
|
|
108
107
|
declare module '@adtrackify/at-service-common/clients/index' {
|
|
109
|
-
export * from '@adtrackify/at-service-common/clients/generic/index';
|
|
110
|
-
export * from '@adtrackify/at-service-common/clients/internal-api/index';
|
|
111
|
-
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';
|
|
112
111
|
|
|
113
112
|
}
|
|
114
113
|
declare module '@adtrackify/at-service-common/clients/internal-api/accounts-client' {
|
|
115
|
-
import { ApiResponse } from '@adtrackify/at-service-common/types/api-response';
|
|
114
|
+
import { ApiResponse } from '@adtrackify/at-service-common/types/api-response.js/index';
|
|
116
115
|
import { Account, ACCOUNT_STATUS, Destination } from '@adtrackify/at-tracking-event-types';
|
|
117
116
|
export interface AccountResponseData {
|
|
118
117
|
account: Account;
|
|
@@ -197,7 +196,7 @@ declare module '@adtrackify/at-service-common/clients/internal-api/accounts-clie
|
|
|
197
196
|
|
|
198
197
|
}
|
|
199
198
|
declare module '@adtrackify/at-service-common/clients/internal-api/destinations-client' {
|
|
200
|
-
import { ApiResponse } from '@adtrackify/at-service-common/types/api-response';
|
|
199
|
+
import { ApiResponse } from '@adtrackify/at-service-common/types/api-response.js/index';
|
|
201
200
|
import { Destination } from '@adtrackify/at-tracking-event-types';
|
|
202
201
|
export interface GetDestinationsResponseData {
|
|
203
202
|
destinations: Destination[];
|
|
@@ -254,14 +253,14 @@ declare module '@adtrackify/at-service-common/clients/internal-api/destinations-
|
|
|
254
253
|
|
|
255
254
|
}
|
|
256
255
|
declare module '@adtrackify/at-service-common/clients/internal-api/index' {
|
|
257
|
-
export * from '@adtrackify/at-service-common/clients/internal-api/destinations-client';
|
|
258
|
-
export * from '@adtrackify/at-service-common/clients/internal-api/accounts-client';
|
|
259
|
-
export * from '@adtrackify/at-service-common/clients/internal-api/users-auth-client';
|
|
260
|
-
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';
|
|
261
260
|
|
|
262
261
|
}
|
|
263
262
|
declare module '@adtrackify/at-service-common/clients/internal-api/shopify-app-install-client' {
|
|
264
|
-
import { ApiResponse } from '@adtrackify/at-service-common/types/api-response';
|
|
263
|
+
import { ApiResponse } from '@adtrackify/at-service-common/types/api-response.js/index';
|
|
265
264
|
import { ShopifyAppInstall, ShopifyAppSubscriptionStatus } from '@adtrackify/at-tracking-event-types';
|
|
266
265
|
export interface ShopifyAppInstallResponseData {
|
|
267
266
|
shopifyAppInstall: ShopifyAppInstall;
|
|
@@ -322,7 +321,7 @@ declare module '@adtrackify/at-service-common/clients/internal-api/shopify-app-i
|
|
|
322
321
|
}
|
|
323
322
|
declare module '@adtrackify/at-service-common/clients/internal-api/users-auth-client' {
|
|
324
323
|
import { User } from '@adtrackify/at-tracking-event-types';
|
|
325
|
-
import { ApiResponse } from '@adtrackify/at-service-common/types/api-response';
|
|
324
|
+
import { ApiResponse } from '@adtrackify/at-service-common/types/api-response.js/index';
|
|
326
325
|
export interface UserResponseData {
|
|
327
326
|
user: User;
|
|
328
327
|
[key: string]: any;
|
|
@@ -385,7 +384,7 @@ declare module '@adtrackify/at-service-common/clients/internal-api/users-auth-cl
|
|
|
385
384
|
|
|
386
385
|
}
|
|
387
386
|
declare module '@adtrackify/at-service-common/clients/third-party/index' {
|
|
388
|
-
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';
|
|
389
388
|
|
|
390
389
|
}
|
|
391
390
|
declare module '@adtrackify/at-service-common/clients/third-party/shopify-client' {
|
|
@@ -482,11 +481,11 @@ declare module '@adtrackify/at-service-common/clients/third-party/shopify-client
|
|
|
482
481
|
|
|
483
482
|
}
|
|
484
483
|
declare module '@adtrackify/at-service-common/helpers/index' {
|
|
485
|
-
export * from '@adtrackify/at-service-common/helpers/input-validation-helper';
|
|
486
|
-
export * from '@adtrackify/at-service-common/helpers/logging-helper';
|
|
487
|
-
export * from '@adtrackify/at-service-common/helpers/response-helper';
|
|
488
|
-
export * from '@adtrackify/at-service-common/helpers/shopify-helper';
|
|
489
|
-
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';
|
|
490
489
|
|
|
491
490
|
}
|
|
492
491
|
declare module '@adtrackify/at-service-common/helpers/input-validation-helper' {
|
|
@@ -561,11 +560,11 @@ declare module '@adtrackify/at-service-common/helpers/subscription-helper' {
|
|
|
561
560
|
|
|
562
561
|
}
|
|
563
562
|
declare module '@adtrackify/at-service-common/index' {
|
|
564
|
-
export * from '@adtrackify/at-service-common/clients/index';
|
|
565
|
-
export * from '@adtrackify/at-service-common/helpers/index';
|
|
566
|
-
export * from '@adtrackify/at-service-common/libs/index';
|
|
567
|
-
export * from '@adtrackify/at-service-common/types/index';
|
|
568
|
-
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';
|
|
569
568
|
|
|
570
569
|
}
|
|
571
570
|
declare module '@adtrackify/at-service-common/libs/crypto' {
|
|
@@ -664,12 +663,12 @@ declare module '@adtrackify/at-service-common/libs/http-status-codes' {
|
|
|
664
663
|
|
|
665
664
|
}
|
|
666
665
|
declare module '@adtrackify/at-service-common/libs/index' {
|
|
667
|
-
export * from '@adtrackify/at-service-common/helpers/shopify-helper';
|
|
668
|
-
export * from '@adtrackify/at-service-common/libs/crypto';
|
|
669
|
-
export * from '@adtrackify/at-service-common/libs/dates';
|
|
670
|
-
export * from '@adtrackify/at-service-common/libs/http-error';
|
|
671
|
-
export * from '@adtrackify/at-service-common/libs/http-status-codes';
|
|
672
|
-
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';
|
|
673
672
|
|
|
674
673
|
}
|
|
675
674
|
declare module '@adtrackify/at-service-common/libs/url' {
|
|
@@ -677,7 +676,7 @@ declare module '@adtrackify/at-service-common/libs/url' {
|
|
|
677
676
|
|
|
678
677
|
}
|
|
679
678
|
declare module '@adtrackify/at-service-common/services/eventbridge-integration-service' {
|
|
680
|
-
import { EventBridgeClient } from '@adtrackify/at-service-common/clients/index';
|
|
679
|
+
import { EventBridgeClient } from '@adtrackify/at-service-common/clients/generic/eventbridge-client.js/index';
|
|
681
680
|
import { Message, TemplatedMessage } from 'postmark';
|
|
682
681
|
export const enum PostmarkRequestType {
|
|
683
682
|
SINGLE_EMAIL = "single_email",
|
|
@@ -696,7 +695,7 @@ declare module '@adtrackify/at-service-common/services/eventbridge-integration-s
|
|
|
696
695
|
|
|
697
696
|
}
|
|
698
697
|
declare module '@adtrackify/at-service-common/services/index' {
|
|
699
|
-
export * from '@adtrackify/at-service-common/services/eventbridge-integration-service';
|
|
698
|
+
export * from '@adtrackify/at-service-common/services/eventbridge-integration-service.js/index';
|
|
700
699
|
|
|
701
700
|
}
|
|
702
701
|
declare module '@adtrackify/at-service-common/types/api-response' {
|
|
@@ -709,7 +708,7 @@ declare module '@adtrackify/at-service-common/types/api-response' {
|
|
|
709
708
|
|
|
710
709
|
}
|
|
711
710
|
declare module '@adtrackify/at-service-common/types/index' {
|
|
712
|
-
export * from '@adtrackify/at-service-common/types/internal-events/index';
|
|
711
|
+
export * from '@adtrackify/at-service-common/types/internal-events/index.js/index';
|
|
713
712
|
|
|
714
713
|
}
|
|
715
714
|
declare module '@adtrackify/at-service-common/types/internal-events/event-detail-types' {
|
|
@@ -725,7 +724,11 @@ declare module '@adtrackify/at-service-common/types/internal-events/event-detail
|
|
|
725
724
|
|
|
726
725
|
}
|
|
727
726
|
declare module '@adtrackify/at-service-common/types/internal-events/index' {
|
|
728
|
-
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 {};
|
|
729
732
|
|
|
730
733
|
}
|
|
731
734
|
declare module '@adtrackify/at-service-common' {
|