shred-api-client 1.0.19 → 1.0.20

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.
@@ -33,4 +33,21 @@ type Product = {
33
33
  metadata: any;
34
34
  plans: Plan[];
35
35
  };
36
- export { SubscriptionAPISchema, Product, SubscriptionEndpoints };
36
+ export declare enum SubscriptionType {
37
+ CUSTOMER_SUBSCRIPTION = 0,
38
+ TENANT_SUBSCRIPTION = 1
39
+ }
40
+ type Subscription = {
41
+ id: string;
42
+ status: string;
43
+ startDate?: number;
44
+ daysUntilDue?: number;
45
+ renewAutomatically?: boolean;
46
+ currentPeriodStart?: number;
47
+ currentPeriodEnd?: number;
48
+ paymentMethodId?: string;
49
+ product: Product;
50
+ type?: SubscriptionType;
51
+ plan?: Plan;
52
+ };
53
+ export { SubscriptionAPISchema, Product, Subscription, SubscriptionEndpoints };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SubscriptionEndpoints = void 0;
3
+ exports.SubscriptionEndpoints = exports.SubscriptionType = void 0;
4
4
  const SubscriptionEndpoints = {
5
5
  GetProducts: {
6
6
  uri: "/subscriptions/products/public/list",
@@ -16,3 +16,8 @@ const SubscriptionEndpoints = {
16
16
  },
17
17
  };
18
18
  exports.SubscriptionEndpoints = SubscriptionEndpoints;
19
+ var SubscriptionType;
20
+ (function (SubscriptionType) {
21
+ SubscriptionType[SubscriptionType["CUSTOMER_SUBSCRIPTION"] = 0] = "CUSTOMER_SUBSCRIPTION";
22
+ SubscriptionType[SubscriptionType["TENANT_SUBSCRIPTION"] = 1] = "TENANT_SUBSCRIPTION";
23
+ })(SubscriptionType || (exports.SubscriptionType = SubscriptionType = {}));
@@ -1,4 +1,5 @@
1
- import { Product as TProduct } from "./model/Subscription.schema";
1
+ import { Product as TProduct, Subscription as TSubscription } from "./model/Subscription.schema";
2
2
  export declare namespace Shred {
3
3
  type Product = TProduct;
4
+ type Subscription = TSubscription;
4
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shred-api-client",
3
- "version": "1.0.19",
3
+ "version": "1.0.20",
4
4
  "description": "API Client for Shred",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",