@readytomog/contracts 1.6.2 → 1.6.3

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.
@@ -1,15 +1,14 @@
1
- import { BillingReasonEnum, EventTypeEnum } from "./stripe-webhook";
1
+ import { BillingPeriod, EventTypeEnum } from "./stripe-webhook";
2
2
  export interface StripeSessionMetadata {
3
3
  transactionId: string;
4
4
  planId: string;
5
5
  paymentId: string;
6
- billingPeriod: string;
6
+ billingPeriod: BillingPeriod;
7
7
  userId: string;
8
8
  }
9
9
  export interface CreatePaymentSubscriptionEvent {
10
10
  stripeToken: string;
11
11
  eventType: EventTypeEnum;
12
- billingReason: BillingReasonEnum;
13
12
  dataObjectId: string;
14
13
  sessionMetadata: StripeSessionMetadata;
15
14
  stripeSubscriptionId: string;
@@ -6,3 +6,7 @@ export declare enum EventTypeEnum {
6
6
  export declare enum BillingReasonEnum {
7
7
  subscription_cycle = 0
8
8
  }
9
+ export declare enum BillingPeriod {
10
+ monthly = 0,
11
+ annualy = 1
12
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BillingReasonEnum = exports.EventTypeEnum = void 0;
3
+ exports.BillingPeriod = exports.BillingReasonEnum = exports.EventTypeEnum = void 0;
4
4
  var EventTypeEnum;
5
5
  (function (EventTypeEnum) {
6
6
  EventTypeEnum["SESSION_COMPLETED"] = "checkout.session.completed";
@@ -11,3 +11,8 @@ var BillingReasonEnum;
11
11
  (function (BillingReasonEnum) {
12
12
  BillingReasonEnum[BillingReasonEnum["subscription_cycle"] = 0] = "subscription_cycle";
13
13
  })(BillingReasonEnum || (exports.BillingReasonEnum = BillingReasonEnum = {}));
14
+ var BillingPeriod;
15
+ (function (BillingPeriod) {
16
+ BillingPeriod[BillingPeriod["monthly"] = 0] = "monthly";
17
+ BillingPeriod[BillingPeriod["annualy"] = 1] = "annualy";
18
+ })(BillingPeriod || (exports.BillingPeriod = BillingPeriod = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@readytomog/contracts",
3
- "version": "1.6.2",
3
+ "version": "1.6.3",
4
4
  "description": "Protobuf definitions and generated Typescript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",