Skip to content

Commit

Permalink
fix: "create" has been replaced with "add" throughout the
Browse files Browse the repository at this point in the history
  • Loading branch information
shivam-pareek committed Oct 7, 2024
1 parent 392e18c commit 79bc869
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/apis/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ export interface UserInviteDeleteParams {
inviteId?: string,
}

export interface WorkspacesCreateParams{
export interface WorkspacesAddParams{
name?: string,
description?: string,
defaults?: Record<string, any>,
users?: string[],
}

export interface WorkspacesCreateResponse extends APIResponseType {
export interface WorkspacesAddResponse extends APIResponseType {
id?: string,
slug?: string,
name?: string,
Expand Down Expand Up @@ -299,7 +299,7 @@ export class Users extends ApiResource {
export class Invites extends ApiResource {


create(
add(
_body: UserInviteParams,
params?: ApiClientInterface,
opts?: RequestOptions
Expand Down Expand Up @@ -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<WorkspacesCreateResponse> {
): APIPromise<WorkspacesAddResponse> {
const body = _body;
if (params) {
this.client.customHeaders = { ...this.client.customHeaders, ...createHeaders({ ...params }) }
}
const response = this.post<WorkspacesCreateResponse>('/admin/workspaces', { body, ...opts });
const response = this.post<WorkspacesAddResponse>('/admin/workspaces', { body, ...opts });
return response;
}
get(
Expand Down

0 comments on commit 79bc869

Please sign in to comment.