@readytomog/contracts 1.6.4 → 1.6.6
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/dist/event/payment/create-payment-subscription.d.ts +2 -4
- package/dist/event/payment/failed-payment-subscription.d.ts +2 -3
- package/dist/event/payment/renewed-subscription.d.ts +2 -3
- package/dist/event/payment/stripe-webhook.d.ts +7 -0
- package/dist/event/payment/stripe-webhook.js +9 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BillingPeriod,
|
|
1
|
+
import { BillingPeriod, TransactionStatus } from "./stripe-webhook";
|
|
2
2
|
export interface StripeSessionMetadata {
|
|
3
3
|
transactionId: string;
|
|
4
4
|
planId: string;
|
|
@@ -7,9 +7,7 @@ export interface StripeSessionMetadata {
|
|
|
7
7
|
userId: string;
|
|
8
8
|
}
|
|
9
9
|
export interface CreatePaymentSubscriptionEvent {
|
|
10
|
-
stripeToken: string;
|
|
11
|
-
eventType: EventTypeEnum;
|
|
12
|
-
dataObjectId: string;
|
|
13
10
|
sessionMetadata: StripeSessionMetadata;
|
|
11
|
+
status: TransactionStatus;
|
|
14
12
|
stripeSubscriptionId: string;
|
|
15
13
|
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { BillingReasonEnum,
|
|
1
|
+
import { BillingReasonEnum, TransactionStatus } from "./stripe-webhook";
|
|
2
2
|
export interface StripeEventMetadata {
|
|
3
3
|
transactionId: string;
|
|
4
4
|
planId: string;
|
|
5
5
|
paymentId: string;
|
|
6
6
|
}
|
|
7
7
|
export interface FailedPaymentSubscriptionEvent {
|
|
8
|
-
stripeToken: string;
|
|
9
|
-
eventType: EventTypeEnum;
|
|
10
8
|
billingReason: BillingReasonEnum;
|
|
11
9
|
customerId: string;
|
|
12
10
|
externalId: string;
|
|
11
|
+
status: TransactionStatus;
|
|
13
12
|
metaData: StripeEventMetadata;
|
|
14
13
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { BillingReasonEnum,
|
|
1
|
+
import { BillingReasonEnum, TransactionStatus } from "./stripe-webhook";
|
|
2
2
|
export interface RenewedSubscriptionEvent {
|
|
3
|
-
stripeToken: string;
|
|
4
|
-
eventType: EventTypeEnum;
|
|
5
3
|
billingReason: BillingReasonEnum;
|
|
6
4
|
customerId: string;
|
|
7
5
|
externalId: string;
|
|
6
|
+
status: TransactionStatus;
|
|
8
7
|
}
|
|
@@ -10,3 +10,10 @@ export declare enum BillingPeriod {
|
|
|
10
10
|
monthly = "monthly",
|
|
11
11
|
annualy = "annualy"
|
|
12
12
|
}
|
|
13
|
+
export declare enum TransactionStatus {
|
|
14
|
+
success = "success",
|
|
15
|
+
failed = "failed",
|
|
16
|
+
processing = "processing",
|
|
17
|
+
pending = "pending",
|
|
18
|
+
refunded = "refunded"
|
|
19
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BillingPeriod = exports.BillingReasonEnum = exports.EventTypeEnum = void 0;
|
|
3
|
+
exports.TransactionStatus = exports.BillingPeriod = exports.BillingReasonEnum = exports.EventTypeEnum = void 0;
|
|
4
4
|
var EventTypeEnum;
|
|
5
5
|
(function (EventTypeEnum) {
|
|
6
6
|
EventTypeEnum["SESSION_COMPLETED"] = "checkout.session.completed";
|
|
@@ -16,3 +16,11 @@ var BillingPeriod;
|
|
|
16
16
|
BillingPeriod["monthly"] = "monthly";
|
|
17
17
|
BillingPeriod["annualy"] = "annualy";
|
|
18
18
|
})(BillingPeriod || (exports.BillingPeriod = BillingPeriod = {}));
|
|
19
|
+
var TransactionStatus;
|
|
20
|
+
(function (TransactionStatus) {
|
|
21
|
+
TransactionStatus["success"] = "success";
|
|
22
|
+
TransactionStatus["failed"] = "failed";
|
|
23
|
+
TransactionStatus["processing"] = "processing";
|
|
24
|
+
TransactionStatus["pending"] = "pending";
|
|
25
|
+
TransactionStatus["refunded"] = "refunded";
|
|
26
|
+
})(TransactionStatus || (exports.TransactionStatus = TransactionStatus = {}));
|