@parra/parra-js-sdk 0.2.33 → 0.2.34

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.
@@ -34,6 +34,22 @@ export interface UnitPrice {
34
34
  amount: number;
35
35
  interval?: Interval;
36
36
  }
37
+ export interface Plan {
38
+ id: string;
39
+ created_at: string;
40
+ updated_at: string;
41
+ deleted_at?: string | null;
42
+ }
43
+ export interface Subscription {
44
+ id: string;
45
+ created_at: string;
46
+ updated_at: string;
47
+ deleted_at?: string | null;
48
+ }
49
+ export interface TenantPlansResponse {
50
+ plans?: Array<Plan>;
51
+ subscriptions?: Array<Subscription>;
52
+ }
37
53
  export interface CreateTenantRequestBody {
38
54
  name: string;
39
55
  is_test: boolean;
@@ -329,6 +345,7 @@ declare class ParraAPI {
329
345
  });
330
346
  createCustomer: (body?: CreateCustomerRequestBody | undefined) => Promise<Customer>;
331
347
  createCheckoutSession: (body?: CreateCheckoutSessionRequestBody | undefined) => Promise<CheckoutSession>;
348
+ getPlansForTenantById: (tenant_id: string) => Promise<TenantPlansResponse>;
332
349
  getTenantById: (tenant_id: string) => Promise<Tenant>;
333
350
  createTenantForUserById: (user_id: string, body?: CreateTenantRequestBody | undefined) => Promise<Tenant>;
334
351
  getTenantsForUserById: (user_id: string) => Promise<TenantListResponse>;
package/dist/ParraAPI.js CHANGED
@@ -53,6 +53,11 @@ var ParraAPI = /** @class */ (function () {
53
53
  },
54
54
  });
55
55
  };
56
+ this.getPlansForTenantById = function (tenant_id) {
57
+ return _this.http.execute(_this.options.baseUrl + "/v1/tenants/" + tenant_id + "/plans", {
58
+ method: "post",
59
+ });
60
+ };
56
61
  this.getTenantById = function (tenant_id) {
57
62
  return _this.http.execute(_this.options.baseUrl + "/v1/tenants/" + tenant_id, {
58
63
  method: "get",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.2.33",
3
+ "version": "0.2.34",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",