@adtrackify/at-service-common 1.1.16 → 1.1.18
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 +1 -1
- package/dist/index.d.ts +27 -7
- package/dist/index.js +215 -70
- package/dist/index.js.map +4 -4
- package/jest.config.ts +40 -40
- package/package.json +3 -2
- package/src/__tests__/helpers/subscription-helper.spec.ts +40 -40
- package/src/clients/generic/axios.d.ts +7 -7
- package/src/clients/generic/cognito-client.ts +153 -0
- package/src/clients/generic/index.ts +1 -0
- package/src/clients/generic/s3-client.ts +9 -5
- 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/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/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/.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:
|
|
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: sleavely/node-awscli:18.x
|
|
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
|
@@ -18,5 +18,5 @@ build({
|
|
|
18
18
|
format: 'esm',
|
|
19
19
|
platform: 'node',
|
|
20
20
|
sourcemap: 'linked',
|
|
21
|
-
external: [...Object.keys(dependencies), '@aws-sdk/client-dynamodb', '@aws-sdk/client-eventbridge', '@aws-sdk/lib-dynamodb', '@aws-sdk/client-s3', "@faker-js/faker"]
|
|
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
22
|
})
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
declare module '@adtrackify/at-service-common/__tests__/helpers/subscription-helper.spec' {
|
|
2
|
+
export {};
|
|
3
|
+
|
|
4
|
+
}
|
|
5
|
+
declare module '@adtrackify/at-service-common/clients/generic/cognito-client' {
|
|
6
|
+
export function dictToAwsAttributes(input: any): {
|
|
7
|
+
Name: string;
|
|
8
|
+
Value: any;
|
|
9
|
+
}[];
|
|
10
|
+
export class CognitoClient {
|
|
11
|
+
static setCredentials: (userPoolId: string, userPoolNoSecretClientId: string) => void;
|
|
12
|
+
static signupUser: (data: any) => Promise<import("@aws-sdk/client-cognito-identity-provider").SignUpCommandOutput>;
|
|
13
|
+
static forgotPassword: (email: string) => Promise<import("@aws-sdk/client-cognito-identity-provider").ForgotPasswordCommandOutput>;
|
|
14
|
+
static adminEmailVerify: (email: string) => Promise<void>;
|
|
15
|
+
static forceValidateEmail: (email: string) => Promise<void>;
|
|
16
|
+
static adminConfirmUser: (data: any) => Promise<import("@aws-sdk/client-cognito-identity-provider").AdminConfirmSignUpCommandOutput>;
|
|
17
|
+
static confirmUser: (data: any) => Promise<import("@aws-sdk/client-cognito-identity-provider").ConfirmSignUpCommandOutput>;
|
|
18
|
+
static resendCode: (email: string) => Promise<void>;
|
|
19
|
+
static adminDeleteUser: (userId: string) => Promise<boolean>;
|
|
20
|
+
static getUserByEmail: (email: string) => Promise<any>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
}
|
|
1
24
|
declare module '@adtrackify/at-service-common/clients/generic/dynamodb-client' {
|
|
2
25
|
export class DynamoDbClient {
|
|
3
26
|
static safeGet: (tableName: string, keyName: string, keyValue: any) => Promise<Record<string, any> | null>;
|
|
@@ -70,14 +93,15 @@ declare module '@adtrackify/at-service-common/clients/generic/index' {
|
|
|
70
93
|
export * from '@adtrackify/at-service-common/clients/generic/eventbridge-client';
|
|
71
94
|
export * from '@adtrackify/at-service-common/clients/generic/http-client';
|
|
72
95
|
export * from '@adtrackify/at-service-common/clients/generic/s3-client';
|
|
96
|
+
export * from '@adtrackify/at-service-common/clients/generic/cognito-client';
|
|
73
97
|
|
|
74
98
|
}
|
|
75
99
|
declare module '@adtrackify/at-service-common/clients/generic/s3-client' {
|
|
76
|
-
import {
|
|
100
|
+
import { S3 } from '@aws-sdk/client-s3';
|
|
77
101
|
export class S3Client {
|
|
78
102
|
s3: S3;
|
|
79
|
-
constructor(
|
|
80
|
-
uploadJson(path: string, bucket: string, jsonData: any
|
|
103
|
+
constructor(accessKeyId: string, secretAccessKey: string);
|
|
104
|
+
uploadJson(path: string, bucket: string, jsonData: any): Promise<unknown>;
|
|
81
105
|
}
|
|
82
106
|
|
|
83
107
|
}
|
|
@@ -703,10 +727,6 @@ declare module '@adtrackify/at-service-common/types/internal-events/event-detail
|
|
|
703
727
|
declare module '@adtrackify/at-service-common/types/internal-events/index' {
|
|
704
728
|
export * from '@adtrackify/at-service-common/types/internal-events/event-detail-types';
|
|
705
729
|
|
|
706
|
-
}
|
|
707
|
-
declare module '@adtrackify/at-service-common/__tests__/helpers/subscription-helper.spec' {
|
|
708
|
-
export {};
|
|
709
|
-
|
|
710
730
|
}
|
|
711
731
|
declare module '@adtrackify/at-service-common' {
|
|
712
732
|
import main = require('@adtrackify/at-service-common/src/index');
|