diff --git a/package.json b/package.json index 5c3b9939..a34baebd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@internxt/sdk", "author": "Internxt ", - "version": "1.6.1", + "version": "1.6.2", "description": "An sdk for interacting with Internxt's services", "repository": { "type": "git", diff --git a/src/drive/payments/index.ts b/src/drive/payments/index.ts index 4a2cd2d2..915e7c80 100644 --- a/src/drive/payments/index.ts +++ b/src/drive/payments/index.ts @@ -187,6 +187,17 @@ export class Payments { return this.client.put('/subscriptions', { price_id: priceId, couponCode: couponCode, userType }, this.headers()); } + public updateWorkspaceMembers(subscriptionId: string, updatedSeats: number) { + return this.client.patch( + '/business/subscription', + { + subscriptionId, + workspaceUpdatedSeats: updatedSeats, + }, + this.headers(), + ); + } + public cancelSubscription(userType?: UserType): Promise { const query = new URLSearchParams(); if (userType) query.set('userType', userType); @@ -201,20 +212,6 @@ export class Payments { return this.client.patch('/billing', { ...payload }, this.headers()); } - public getPaypalSetupIntent({ - priceId, - coupon, - }: { - priceId: string; - coupon?: string; - }): Promise<{ client_secret: string }> { - const query = new URLSearchParams(); - if (priceId !== undefined) query.set('priceId', priceId); - if (coupon !== undefined) query.set('coupon', coupon); - - return this.client.get(`/paypal-setup-intent?${query.toString()}`, this.headers()); - } - /** * Returns the needed headers for the module requests * @private diff --git a/src/drive/payments/types.ts b/src/drive/payments/types.ts index 4ff34d66..a0c4a014 100644 --- a/src/drive/payments/types.ts +++ b/src/drive/payments/types.ts @@ -85,6 +85,10 @@ export type StoragePlan = { amountOfSeats: number; isAppSumo?: boolean; details?: AppSumoDetails; + seats?: { + minimumSeats: number; + maximumSeats: number; + }; }; export interface CreatePaymentSessionPayload {