@adtrackify/at-service-common 1.0.47 → 1.0.49

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/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@adtrackify/at-service-common",
3
- "version": "1.0.47",
3
+ "version": "1.0.49",
4
4
  "description": "",
5
+ "module": "./dist/index.js",
5
6
  "main": "./dist/index.js",
6
7
  "types": "./dist/index.d.ts",
7
8
  "scripts": {
@@ -25,39 +26,40 @@
25
26
  "type-check": "tsc --noEmit"
26
27
  },
27
28
  "dependencies": {
28
- "@types/axios": "^0.14.0",
29
- "@types/lambda-log": "^2.2.1",
30
- "@types/luxon": "^3.0.1",
31
- "@types/ua-parser-js": "^0.7.36",
32
29
  "axios": "^0.27.2",
33
30
  "axios-retry": "^3.3.1",
34
- "crypto": "^1.0.1",
35
31
  "joi": "^17.6.0",
36
32
  "lambda-log": "^3.1.0",
37
33
  "luxon": "^3.0.3",
38
- "ua-parser-js": "^1.0.2"
34
+ "ua-parser-js": "^1.0.2",
35
+ "uuid": "^9.0.0"
39
36
  },
40
37
  "devDependencies": {
41
- "@adtrackify/at-tracking-event-types": "^1.0.25",
38
+ "@adtrackify/at-tracking-event-types": "^1.0.27",
42
39
  "@babel/cli": "^7.13.16",
43
- "@babel/core": "^7.19.0",
40
+ "@babel/core": "^7.19.1",
44
41
  "@babel/plugin-proposal-optional-chaining": "^7.13.8",
45
- "@babel/plugin-transform-runtime": "^7.10.3",
46
- "@babel/preset-env": "^7.19.0",
42
+ "@babel/plugin-transform-runtime": "^7.19.1",
43
+ "@babel/preset-env": "^7.19.1",
47
44
  "@babel/preset-typescript": "^7.16.7",
48
- "@babel/runtime-corejs3": "^7.19.0",
45
+ "@babel/runtime-corejs3": "^7.19.1",
46
+ "@types/axios": "^0.14.0",
49
47
  "@types/jest": "^27.4.1",
48
+ "@types/lambda-log": "^2.2.1",
49
+ "@types/luxon": "^3.0.1",
50
50
  "@types/node": "^17.0.8",
51
- "@typescript-eslint/eslint-plugin": "^5.36.2",
52
- "@typescript-eslint/parser": "^5.36.2",
53
- "aws-sdk": "^2.1213.0",
51
+ "@types/ua-parser-js": "^0.7.36",
52
+ "@types/uuid": "^8.3.4",
53
+ "@typescript-eslint/eslint-plugin": "^5.37.0",
54
+ "@typescript-eslint/parser": "^5.37.0",
55
+ "aws-sdk": "^2.1216.0",
54
56
  "babel-eslint": "^10.1.0",
55
57
  "babel-jest": "^26.6.3",
56
58
  "babel-polyfill": "^6.26.0",
57
59
  "core-js": "^3.25.1",
58
60
  "cross-env": "^7.0.3",
59
61
  "esbuild": "^0.14.54",
60
- "eslint": "^8.23.0",
62
+ "eslint": "^8.23.1",
61
63
  "eslint-config-standard": "^17.0.0",
62
64
  "eslint-loader": "^4.0.2",
63
65
  "eslint-plugin-babel": "^5.3.1",
@@ -67,10 +69,6 @@
67
69
  "eslint-webpack-plugin": "^3.1.1",
68
70
  "glob": "^8.0.3",
69
71
  "husky": "^6.0.0",
70
- "jest": "^27.5.1",
71
- "jest-cucumber": "3.0.1",
72
- "jest-junit": "13.0.0",
73
- "jest-runner-groups": "2.1.0",
74
72
  "npm-dts": "^1.3.12",
75
73
  "npm-run-all": "^4.1.5",
76
74
  "npm-scripts-info": "^0.3.9",
@@ -1,4 +1,5 @@
1
1
  import * as log from 'lambda-log';
2
+ //const log = require('lambda-log');
2
3
  import { ApiResponse } from '../../types/api-response';
3
4
  import { axiosHttpService } from '../generic/http-client';
4
5
  import { Destination } from '@adtrackify/at-tracking-event-types';
@@ -1,4 +1,4 @@
1
- import * as log from 'lambda-log';
1
+ import log from 'lambda-log';
2
2
  import { ApiResponse } from '../../types/api-response';
3
3
  import { axiosHttpService } from '../generic/http-client';
4
4
  import { ShopifyAppInstall, ShopifyAppSubscriptionStatus } from '@adtrackify/at-tracking-event-types';
@@ -80,13 +80,14 @@ export class ShopifyClient {
80
80
  };
81
81
 
82
82
  static createAppSubscription = async (shop: string, accessToken: string,
83
- planName: string, price: number, returnUrl: string, trialDays: number) => {
83
+ planName: string, price: number, returnUrl: string, trialDays: number, test?: boolean) => {
84
84
  const url = `https://${shop}/admin/api/${this._shopify_api_version}/recurring_application_charges.json`;
85
85
  const recurring_application_charge = {
86
86
  name: planName,
87
87
  price,
88
88
  return_url: returnUrl,
89
- trial_days: trialDays
89
+ trial_days: trialDays,
90
+ test
90
91
  };
91
92
  const res = await this.genericShopifyPost(url, accessToken, { recurring_application_charge });
92
93
  if (res.status >= 400) {
package/tsconfig.json CHANGED
@@ -1,10 +1,8 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "target": "esnext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
3
+ "target": "ES2018" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
4
4
  "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
5
- "lib": [
6
- "ESNext"
7
- ],
5
+
8
6
  "allowJs": true, /* Allow javascript files to be compiled. */
9
7
  "checkJs": false /* Report errors in .js files. */,
10
8
  "outDir": "dist", /* Redirect output to the directory. */