@adtrackify/at-tracking-event-types 1.0.25 → 1.0.28
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.
|
@@ -5,11 +5,43 @@ export interface Subscription {
|
|
|
5
5
|
shopifyDomain?: string;
|
|
6
6
|
stripeCustomerId?: string;
|
|
7
7
|
stripeSubscriptionId?: string;
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
stripeCompletedCheckoutSession?: any;
|
|
9
|
+
shopifyChargeId: string;
|
|
10
|
+
subscriptionPlan?: any;
|
|
11
|
+
status?: SUBSCRIPTION_STATUS;
|
|
12
|
+
paymentStatus?: PAYMENT_STATUS;
|
|
13
|
+
paymentGateway?: PAYMENT_GATEWAY;
|
|
10
14
|
createdAt: string;
|
|
11
15
|
updatedAt: string;
|
|
12
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
|
+
}
|
|
30
|
+
export declare enum PAYMENT_STATUS {
|
|
31
|
+
CURRENT = "current",
|
|
32
|
+
PAST_DUE = "past_due",
|
|
33
|
+
CANCELLED = "cancelled",
|
|
34
|
+
FAILED = "failed"
|
|
35
|
+
}
|
|
36
|
+
export declare enum SUBSCRIPTION_STATUS {
|
|
37
|
+
ACTIVE = "active",
|
|
38
|
+
CANCELLED = "cancelled",
|
|
39
|
+
DECLINED = "declined",
|
|
40
|
+
EXPIRED = "expired",
|
|
41
|
+
FROZEN = "frozen",
|
|
42
|
+
PENDING = "pending",
|
|
43
|
+
NOT_SUBMITTED = "na"
|
|
44
|
+
}
|
|
13
45
|
export declare enum PAYMENT_GATEWAY {
|
|
14
46
|
STRIPE = "stripe",
|
|
15
47
|
PAYPAL = "paypal",
|
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PAYMENT_GATEWAY = 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 = {}));
|
|
9
|
+
var PAYMENT_STATUS;
|
|
10
|
+
(function (PAYMENT_STATUS) {
|
|
11
|
+
PAYMENT_STATUS["CURRENT"] = "current";
|
|
12
|
+
PAYMENT_STATUS["PAST_DUE"] = "past_due";
|
|
13
|
+
PAYMENT_STATUS["CANCELLED"] = "cancelled";
|
|
14
|
+
PAYMENT_STATUS["FAILED"] = "failed";
|
|
15
|
+
})(PAYMENT_STATUS = exports.PAYMENT_STATUS || (exports.PAYMENT_STATUS = {}));
|
|
16
|
+
var SUBSCRIPTION_STATUS;
|
|
17
|
+
(function (SUBSCRIPTION_STATUS) {
|
|
18
|
+
SUBSCRIPTION_STATUS["ACTIVE"] = "active";
|
|
19
|
+
SUBSCRIPTION_STATUS["CANCELLED"] = "cancelled";
|
|
20
|
+
SUBSCRIPTION_STATUS["DECLINED"] = "declined";
|
|
21
|
+
SUBSCRIPTION_STATUS["EXPIRED"] = "expired";
|
|
22
|
+
SUBSCRIPTION_STATUS["FROZEN"] = "frozen";
|
|
23
|
+
SUBSCRIPTION_STATUS["PENDING"] = "pending";
|
|
24
|
+
SUBSCRIPTION_STATUS["NOT_SUBMITTED"] = "na";
|
|
25
|
+
})(SUBSCRIPTION_STATUS = exports.SUBSCRIPTION_STATUS || (exports.SUBSCRIPTION_STATUS = {}));
|
|
4
26
|
var PAYMENT_GATEWAY;
|
|
5
27
|
(function (PAYMENT_GATEWAY) {
|
|
6
28
|
PAYMENT_GATEWAY["STRIPE"] = "stripe";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription.js","sourceRoot":"","sources":["../../../src/types/api/subscription.ts"],"names":[],"mappings":";;;
|
|
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.
|
|
3
|
+
"version": "1.0.28",
|
|
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",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
export interface Subscription {
|
|
2
3
|
id: string,
|
|
3
4
|
accountId?: string,
|
|
@@ -5,13 +6,47 @@ export interface Subscription {
|
|
|
5
6
|
shopifyDomain?: string,
|
|
6
7
|
stripeCustomerId?: string,
|
|
7
8
|
stripeSubscriptionId?: string,
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
stripeCompletedCheckoutSession?: any;
|
|
10
|
+
shopifyChargeId: string;
|
|
11
|
+
subscriptionPlan?: any,
|
|
12
|
+
status?: SUBSCRIPTION_STATUS,
|
|
13
|
+
paymentStatus?: PAYMENT_STATUS,
|
|
14
|
+
paymentGateway?: PAYMENT_GATEWAY,
|
|
10
15
|
createdAt: string,
|
|
11
16
|
updatedAt: string,
|
|
12
17
|
|
|
13
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
|
+
}
|
|
14
33
|
|
|
34
|
+
export enum PAYMENT_STATUS {
|
|
35
|
+
CURRENT = 'current',
|
|
36
|
+
PAST_DUE = 'past_due',
|
|
37
|
+
CANCELLED = 'cancelled',
|
|
38
|
+
FAILED = 'failed'
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export enum SUBSCRIPTION_STATUS {
|
|
42
|
+
ACTIVE = 'active', // approved and billed to shop
|
|
43
|
+
CANCELLED = 'cancelled', // cancelled, uninstalled or cancellation
|
|
44
|
+
DECLINED = 'declined', // subscription declined by merchant
|
|
45
|
+
EXPIRED = 'expired', //wasn't approved within two days of being created
|
|
46
|
+
FROZEN = 'frozen', //on hold due to not payment
|
|
47
|
+
PENDING = 'pending', // pending approval
|
|
48
|
+
NOT_SUBMITTED = 'na' // billing has not yet been attempted
|
|
49
|
+
}
|
|
15
50
|
export enum PAYMENT_GATEWAY {
|
|
16
51
|
STRIPE = 'stripe',
|
|
17
52
|
PAYPAL = 'paypal',
|