@adtrackify/at-tracking-event-types 1.0.27 → 1.0.29

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.
@@ -6,13 +6,27 @@ export interface Subscription {
6
6
  stripeCustomerId?: string;
7
7
  stripeSubscriptionId?: string;
8
8
  stripeCompletedCheckoutSession?: any;
9
- subscriptionPlan?: any;
9
+ shopifyChargeId: string;
10
+ subscriptionPlan?: SubscriptionPlan;
10
11
  status?: SUBSCRIPTION_STATUS;
11
12
  paymentStatus?: PAYMENT_STATUS;
12
13
  paymentGateway?: PAYMENT_GATEWAY;
13
14
  createdAt: string;
14
15
  updatedAt: string;
15
16
  }
17
+ export interface SubscriptionPlan {
18
+ id: number;
19
+ planName: string;
20
+ description: string;
21
+ price: string;
22
+ billingFrequency: PLAN_BILLING_FREQUENCY;
23
+ trialLengthDays?: number;
24
+ trialRequiresCreditCard?: boolean;
25
+ }
26
+ export declare enum PLAN_BILLING_FREQUENCY {
27
+ MONTHLY = "monthly",
28
+ YEARLY = "yearly"
29
+ }
16
30
  export declare enum PAYMENT_STATUS {
17
31
  CURRENT = "current",
18
32
  PAST_DUE = "past_due",
@@ -1,6 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PAYMENT_GATEWAY = exports.SUBSCRIPTION_STATUS = exports.PAYMENT_STATUS = void 0;
3
+ exports.PAYMENT_GATEWAY = exports.SUBSCRIPTION_STATUS = exports.PAYMENT_STATUS = exports.PLAN_BILLING_FREQUENCY = void 0;
4
+ var PLAN_BILLING_FREQUENCY;
5
+ (function (PLAN_BILLING_FREQUENCY) {
6
+ PLAN_BILLING_FREQUENCY["MONTHLY"] = "monthly";
7
+ PLAN_BILLING_FREQUENCY["YEARLY"] = "yearly";
8
+ })(PLAN_BILLING_FREQUENCY = exports.PLAN_BILLING_FREQUENCY || (exports.PLAN_BILLING_FREQUENCY = {}));
4
9
  var PAYMENT_STATUS;
5
10
  (function (PAYMENT_STATUS) {
6
11
  PAYMENT_STATUS["CURRENT"] = "current";
@@ -1 +1 @@
1
- {"version":3,"file":"subscription.js","sourceRoot":"","sources":["../../../src/types/api/subscription.ts"],"names":[],"mappings":";;;AAkBA,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,uCAAqB,CAAA;IACrB,yCAAuB,CAAA;IACvB,mCAAiB,CAAA;AACnB,CAAC,EALW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAKzB;AAED,IAAY,mBAQX;AARD,WAAY,mBAAmB;IAC7B,wCAAiB,CAAA;IACjB,8CAAuB,CAAA;IACvB,4CAAqB,CAAA;IACrB,0CAAmB,CAAA;IACnB,wCAAiB,CAAA;IACjB,0CAAmB,CAAA;IACnB,2CAAoB,CAAA;AACtB,CAAC,EARW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAQ9B;AACD,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,sCAAmB,CAAA;AACrB,CAAC,EAJW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAI1B"}
1
+ {"version":3,"file":"subscription.js","sourceRoot":"","sources":["../../../src/types/api/subscription.ts"],"names":[],"mappings":";;;AA4BA,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAChC,6CAAmB,CAAA;IACnB,2CAAiB,CAAA;AACnB,CAAC,EAHW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAGjC;AAED,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,uCAAqB,CAAA;IACrB,yCAAuB,CAAA;IACvB,mCAAiB,CAAA;AACnB,CAAC,EALW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAKzB;AAED,IAAY,mBAQX;AARD,WAAY,mBAAmB;IAC7B,wCAAiB,CAAA;IACjB,8CAAuB,CAAA;IACvB,4CAAqB,CAAA;IACrB,0CAAmB,CAAA;IACnB,wCAAiB,CAAA;IACjB,0CAAmB,CAAA;IACnB,2CAAoB,CAAA;AACtB,CAAC,EARW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAQ9B;AACD,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,sCAAmB,CAAA;AACrB,CAAC,EAJW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAI1B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adtrackify/at-tracking-event-types",
3
- "version": "1.0.27",
3
+ "version": "1.0.29",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -22,10 +22,11 @@
22
22
  "type-check": "tsc --noEmit",
23
23
  "prepare": "husky install"
24
24
  },
25
- "dependencies": {},
26
- "devDependencies": {
25
+ "dependencies": {
27
26
  "@types/luxon": "^3.0.1",
28
- "@types/ua-parser-js": "^0.7.36",
27
+ "@types/ua-parser-js": "^0.7.36"
28
+ },
29
+ "devDependencies": {
29
30
  "ua-parser-js": "^1.0.2",
30
31
  "@babel/cli": "^7.13.16",
31
32
  "@babel/core": "^7.18.13",
@@ -35,7 +36,6 @@
35
36
  "@babel/preset-typescript": "^7.16.7",
36
37
  "@babel/runtime-corejs3": "^7.13.17",
37
38
  "@faker-js/faker": "^7.5.0",
38
- "@types/jest": "^27.4.1",
39
39
  "@types/node": "^17.0.8",
40
40
  "@typescript-eslint/eslint-plugin": "^5.36.1",
41
41
  "@typescript-eslint/parser": "^5.36.1",
@@ -7,7 +7,8 @@ export interface Subscription {
7
7
  stripeCustomerId?: string,
8
8
  stripeSubscriptionId?: string,
9
9
  stripeCompletedCheckoutSession?: any;
10
- subscriptionPlan?: any,
10
+ shopifyChargeId: string;
11
+ subscriptionPlan?: SubscriptionPlan,
11
12
  status?: SUBSCRIPTION_STATUS,
12
13
  paymentStatus?: PAYMENT_STATUS,
13
14
  paymentGateway?: PAYMENT_GATEWAY,
@@ -15,6 +16,20 @@ export interface Subscription {
15
16
  updatedAt: string,
16
17
 
17
18
  }
19
+ export interface SubscriptionPlan {
20
+ id: number;
21
+ planName: string;
22
+ description: string;
23
+ price: string;
24
+ billingFrequency: PLAN_BILLING_FREQUENCY;
25
+ trialLengthDays?: number;
26
+ trialRequiresCreditCard?: boolean;
27
+ }
28
+
29
+ export enum PLAN_BILLING_FREQUENCY {
30
+ MONTHLY = 'monthly',
31
+ YEARLY = 'yearly'
32
+ }
18
33
 
19
34
  export enum PAYMENT_STATUS {
20
35
  CURRENT = 'current',