@adtrackify/at-service-common 1.1.7 → 1.1.9
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/dist/index.d.ts +20 -21
- package/dist/index.js +61321 -19
- package/dist/index.js.map +4 -4
- package/jest.config.ts +40 -40
- package/package.json +5 -3
- 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 +126 -113
- package/src/clients/generic/eventbridge-client.ts +53 -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/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: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/dist/index.d.ts
CHANGED
|
@@ -1,36 +1,39 @@
|
|
|
1
|
+
declare module '@adtrackify/at-service-common/__tests__/helpers/subscription-helper.spec' {
|
|
2
|
+
export {};
|
|
3
|
+
|
|
4
|
+
}
|
|
1
5
|
declare module '@adtrackify/at-service-common/clients/generic/dynamodb-client' {
|
|
2
|
-
import AWS from 'aws-sdk';
|
|
3
6
|
export class DynamoDbClient {
|
|
4
|
-
static safeGet: (tableName: string, keyName: string, keyValue: any) => Promise<
|
|
5
|
-
static safePut: (tableName: string, data: any) => Promise<import("aws-sdk/lib
|
|
6
|
-
static safeDelete: (tableName: string, keyName: string, keyValue: any) => Promise<import("aws-sdk/lib
|
|
7
|
+
static safeGet: (tableName: string, keyName: string, keyValue: any) => Promise<Record<string, any> | null>;
|
|
8
|
+
static safePut: (tableName: string, data: any) => Promise<import("@aws-sdk/lib-dynamodb").PutCommandOutput | null>;
|
|
9
|
+
static safeDelete: (tableName: string, keyName: string, keyValue: any) => Promise<import("@aws-sdk/lib-dynamodb").DeleteCommandOutput | null>;
|
|
7
10
|
static safeQueryByGSI: (tableName: string, gsiName: string, keyName: string, keyValue: any) => Promise<any[] | null>;
|
|
8
|
-
static safeBatchGet: (tableName: string, keys: any) => Promise<
|
|
11
|
+
static safeBatchGet: (tableName: string, keys: any) => Promise<Record<string, any>[]>;
|
|
9
12
|
static queryAll: (params: any) => Promise<any[] | null>;
|
|
10
|
-
static batchGet: (params: any) => Promise<import("aws-sdk/lib
|
|
11
|
-
static get: (params: any) => Promise<import("aws-sdk/lib
|
|
12
|
-
static put: (params: any) => Promise<import("aws-sdk/lib
|
|
13
|
-
static query: (params: any) => Promise<import("aws-sdk/lib
|
|
14
|
-
static scan: (params: any) => Promise<import("aws-sdk/lib
|
|
15
|
-
static update: (params: any) => Promise<import("aws-sdk/lib
|
|
16
|
-
static delete: (params: any) => Promise<import("aws-sdk/lib
|
|
13
|
+
static batchGet: (params: any) => Promise<import("@aws-sdk/lib-dynamodb").BatchGetCommandOutput>;
|
|
14
|
+
static get: (params: any) => Promise<import("@aws-sdk/lib-dynamodb").GetCommandOutput>;
|
|
15
|
+
static put: (params: any) => Promise<import("@aws-sdk/lib-dynamodb").PutCommandOutput>;
|
|
16
|
+
static query: (params: any) => Promise<import("@aws-sdk/lib-dynamodb").QueryCommandOutput>;
|
|
17
|
+
static scan: (params: any) => Promise<import("@aws-sdk/lib-dynamodb").ScanCommandOutput>;
|
|
18
|
+
static update: (params: any) => Promise<import("@aws-sdk/lib-dynamodb").UpdateCommandOutput>;
|
|
19
|
+
static delete: (params: any) => Promise<import("@aws-sdk/lib-dynamodb").DeleteCommandOutput>;
|
|
17
20
|
}
|
|
18
21
|
|
|
19
22
|
}
|
|
20
23
|
declare module '@adtrackify/at-service-common/clients/generic/eventbridge-client' {
|
|
21
|
-
import { EventBridge } from 'aws-sdk';
|
|
24
|
+
import { EventBridgeClient as EventBridge } from '@aws-sdk/client-eventbridge';
|
|
22
25
|
export class EventBridgeClient {
|
|
23
26
|
eventBridge: EventBridge;
|
|
24
27
|
EVENT_BUS_NAME: string;
|
|
25
28
|
constructor(eventBusName: string);
|
|
26
|
-
buildAndSendEvent: (eventSource: string, eventType: string, eventData: any) => Promise<import("aws-sdk/
|
|
29
|
+
buildAndSendEvent: (eventSource: string, eventType: string, eventData: any) => Promise<import("@aws-sdk/client-eventbridge").PutEventsCommandOutput>;
|
|
27
30
|
buildEvent: (eventType: string, eventData: any, eventId?: string, eventTime?: string) => {
|
|
28
31
|
eventId: string;
|
|
29
32
|
eventType: string;
|
|
30
33
|
eventTime: string;
|
|
31
34
|
eventData: any;
|
|
32
35
|
};
|
|
33
|
-
putEvent: (source: string, detailType: string, data: any, headers?: any) => Promise<import("aws-sdk/
|
|
36
|
+
putEvent: (source: string, detailType: string, data: any, headers?: any) => Promise<import("@aws-sdk/client-eventbridge").PutEventsCommandOutput>;
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
}
|
|
@@ -657,8 +660,8 @@ declare module '@adtrackify/at-service-common/services/eventbridge-integration-s
|
|
|
657
660
|
eventBridgeClient: EventBridgeClient;
|
|
658
661
|
EVENT_BUS_NAME: string;
|
|
659
662
|
constructor(eventBusName: string);
|
|
660
|
-
sendPostmarkEmailEvent: (eventSource: string, postmarkMessage: Message, postmarkServerToken: string) => Promise<import("aws-sdk/
|
|
661
|
-
sendPostmarkTemplatedEmailEvent: (eventSource: string, postmarkMessage: TemplatedMessage, postmarkServerToken: string) => Promise<import("aws-sdk/
|
|
663
|
+
sendPostmarkEmailEvent: (eventSource: string, postmarkMessage: Message, postmarkServerToken: string) => Promise<import("@aws-sdk/client-eventbridge").PutEventsCommandOutput>;
|
|
664
|
+
sendPostmarkTemplatedEmailEvent: (eventSource: string, postmarkMessage: TemplatedMessage, postmarkServerToken: string) => Promise<import("@aws-sdk/client-eventbridge").PutEventsCommandOutput>;
|
|
662
665
|
}
|
|
663
666
|
|
|
664
667
|
}
|
|
@@ -694,10 +697,6 @@ declare module '@adtrackify/at-service-common/types/internal-events/event-detail
|
|
|
694
697
|
declare module '@adtrackify/at-service-common/types/internal-events/index' {
|
|
695
698
|
export * from '@adtrackify/at-service-common/types/internal-events/event-detail-types';
|
|
696
699
|
|
|
697
|
-
}
|
|
698
|
-
declare module '@adtrackify/at-service-common/__tests__/helpers/subscription-helper.spec' {
|
|
699
|
-
export {};
|
|
700
|
-
|
|
701
700
|
}
|
|
702
701
|
declare module '@adtrackify/at-service-common' {
|
|
703
702
|
import main = require('@adtrackify/at-service-common/src/index');
|