From 79bc8698ee18da42c5da12b874377e78812321c0 Mon Sep 17 00:00:00 2001 From: shivam-pareek Date: Mon, 7 Oct 2024 11:41:50 +0530 Subject: [PATCH] fix: "create" has been replaced with "add" throughout the --- src/apis/admin.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/apis/admin.ts b/src/apis/admin.ts index 054ee4b..34b62e5 100644 --- a/src/apis/admin.ts +++ b/src/apis/admin.ts @@ -85,14 +85,14 @@ export interface UserInviteDeleteParams { inviteId?: string, } -export interface WorkspacesCreateParams{ +export interface WorkspacesAddParams{ name?: string, description?: string, defaults?: Record, users?: string[], } -export interface WorkspacesCreateResponse extends APIResponseType { +export interface WorkspacesAddResponse extends APIResponseType { id?: string, slug?: string, name?: string, @@ -299,7 +299,7 @@ export class Users extends ApiResource { export class Invites extends ApiResource { - create( + add( _body: UserInviteParams, params?: ApiClientInterface, opts?: RequestOptions @@ -361,16 +361,16 @@ export class Workspaces extends ApiResource { super(client); this.users = new Member(client); } - create( - _body: WorkspacesCreateParams, + add( + _body: WorkspacesAddParams, params?: ApiClientInterface, opts?: RequestOptions - ): APIPromise { + ): APIPromise { const body = _body; if (params) { this.client.customHeaders = { ...this.client.customHeaders, ...createHeaders({ ...params }) } } - const response = this.post('/admin/workspaces', { body, ...opts }); + const response = this.post('/admin/workspaces', { body, ...opts }); return response; } get(