@adtrackify/at-service-common 1.1.13 → 1.1.16
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 +7 -7
- package/dist/index.js +6 -10
- package/dist/index.js.map +2 -2
- package/jest.config.ts +40 -40
- package/package.json +2 -2
- 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 +2 -2
- package/src/clients/generic/s3-client.ts +5 -9
- 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,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/dynamodb-client' {
|
|
6
2
|
export class DynamoDbClient {
|
|
7
3
|
static safeGet: (tableName: string, keyName: string, keyValue: any) => Promise<Record<string, any> | null>;
|
|
@@ -77,11 +73,11 @@ declare module '@adtrackify/at-service-common/clients/generic/index' {
|
|
|
77
73
|
|
|
78
74
|
}
|
|
79
75
|
declare module '@adtrackify/at-service-common/clients/generic/s3-client' {
|
|
80
|
-
import { S3 } from '@aws-sdk/client-s3';
|
|
76
|
+
import { ObjectCannedACL, S3 } from '@aws-sdk/client-s3';
|
|
81
77
|
export class S3Client {
|
|
82
78
|
s3: S3;
|
|
83
|
-
constructor(
|
|
84
|
-
uploadJson(path: string, bucket: string, jsonData: any): Promise<unknown>;
|
|
79
|
+
constructor(region?: string);
|
|
80
|
+
uploadJson(path: string, bucket: string, jsonData: any, ACL?: ObjectCannedACL | string): Promise<unknown>;
|
|
85
81
|
}
|
|
86
82
|
|
|
87
83
|
}
|
|
@@ -707,6 +703,10 @@ declare module '@adtrackify/at-service-common/types/internal-events/event-detail
|
|
|
707
703
|
declare module '@adtrackify/at-service-common/types/internal-events/index' {
|
|
708
704
|
export * from '@adtrackify/at-service-common/types/internal-events/event-detail-types';
|
|
709
705
|
|
|
706
|
+
}
|
|
707
|
+
declare module '@adtrackify/at-service-common/__tests__/helpers/subscription-helper.spec' {
|
|
708
|
+
export {};
|
|
709
|
+
|
|
710
710
|
}
|
|
711
711
|
declare module '@adtrackify/at-service-common' {
|
|
712
712
|
import main = require('@adtrackify/at-service-common/src/index');
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import * as log from "lambda-log";
|
|
|
12
12
|
var marshallOptions = {
|
|
13
13
|
convertEmptyValues: false,
|
|
14
14
|
removeUndefinedValues: false,
|
|
15
|
-
convertClassInstanceToMap:
|
|
15
|
+
convertClassInstanceToMap: true
|
|
16
16
|
};
|
|
17
17
|
var unmarshallOptions = {
|
|
18
18
|
wrapNumbers: false
|
|
@@ -222,21 +222,17 @@ var axiosHttpService = (config = {}) => {
|
|
|
222
222
|
};
|
|
223
223
|
|
|
224
224
|
// src/clients/generic/s3-client.ts
|
|
225
|
-
import { S3 } from "@aws-sdk/client-s3";
|
|
225
|
+
import { ObjectCannedACL, S3 } from "@aws-sdk/client-s3";
|
|
226
226
|
import * as log3 from "lambda-log";
|
|
227
227
|
var S3Client = class {
|
|
228
228
|
s3;
|
|
229
|
-
constructor(
|
|
230
|
-
this.s3 = new S3({
|
|
231
|
-
credentials: {
|
|
232
|
-
accessKeyId,
|
|
233
|
-
secretAccessKey
|
|
234
|
-
}
|
|
235
|
-
});
|
|
229
|
+
constructor(region = "us-west-2") {
|
|
230
|
+
this.s3 = new S3({ region });
|
|
236
231
|
}
|
|
237
|
-
async uploadJson(path, bucket, jsonData) {
|
|
232
|
+
async uploadJson(path, bucket, jsonData, ACL = ObjectCannedACL.private) {
|
|
238
233
|
try {
|
|
239
234
|
const res = await this.s3.putObject({
|
|
235
|
+
ACL,
|
|
240
236
|
Bucket: bucket,
|
|
241
237
|
ContentType: "application/json; charset=utf-8",
|
|
242
238
|
Body: JSON.stringify(jsonData),
|