Skip to content
Docs
Reference

BackstageClient.accounts

BackstageClient.accounts in @ticketlayer/backstage.

@ticketlayer/backstage


@ticketlayer/backstage / BackstageClient / accounts

accounts: {
  create: (request: {
     name: string;
     status?: "active" | "inactive";
   }, requestOptions?: RequestOptions) => Promise<{
     createdAt: string;
     id: string;
     isDeleted: boolean;
     name: string;
     organisationId: string;
     status: "active" | "inactive";
     updatedAt: string;
  }>;
  delete: (id: string, requestOptions?: RequestOptions) => Promise<{
     id: string;
     success: boolean;
  }>;
  get: (id: string, requestOptions?: RequestOptions) => Promise<{
     createdAt: string;
     id: string;
     isDeleted: boolean;
     name: string;
     organisationId: string;
     status: "active" | "inactive";
     updatedAt: string;
  }>;
  list: (options?: {
     search?: string;
     status?: "active" | "inactive";
   }, requestOptions?: RequestOptions) => Promise<{
     createdAt: string;
     id: string;
     isDeleted: boolean;
     name: string;
     organisationId: string;
     status: "active" | "inactive";
     updatedAt: string;
  }[]>;
  update: (id: string, request: {
     name?: string;
     status?: "active" | "inactive";
   }, requestOptions?: RequestOptions) => Promise<{
     createdAt: string;
     id: string;
     isDeleted: boolean;
     name: string;
     organisationId: string;
     status: "active" | "inactive";
     updatedAt: string;
  }>;
};

Defined in: client.ts:1782

Accounts methods

create()#

create: (request: {
  name: string;
  status?: "active" | "inactive";
}, requestOptions?: RequestOptions) => Promise<{
  createdAt: string;
  id: string;
  isDeleted: boolean;
  name: string;
  organisationId: string;
  status: "active" | "inactive";
  updatedAt: string;
}>;

Create account Create a new account in the organisation

Parameters#

ParameterType
request{ name: string; status?: "active" | "inactive"; }
request.namestring
request.status?"active" | "inactive"
requestOptions?RequestOptions

Returns#

Promise<{ createdAt: string; id: string; isDeleted: boolean; name: string; organisationId: string; status: "active" | "inactive"; updatedAt: string; }>

Operation Id#

createAccount

delete()#

delete: (id: string, requestOptions?: RequestOptions) => Promise<{
  id: string;
  success: boolean;
}>;

Delete account Delete an account (soft delete)

Parameters#

ParameterType
idstring
requestOptions?RequestOptions

Returns#

Promise<{ id: string; success: boolean; }>

Operation Id#

deleteAccount

get()#

get: (id: string, requestOptions?: RequestOptions) => Promise<{
  createdAt: string;
  id: string;
  isDeleted: boolean;
  name: string;
  organisationId: string;
  status: "active" | "inactive";
  updatedAt: string;
}>;

Get account Get a specific account by ID

Parameters#

ParameterType
idstring
requestOptions?RequestOptions

Returns#

Promise<{ createdAt: string; id: string; isDeleted: boolean; name: string; organisationId: string; status: "active" | "inactive"; updatedAt: string; }>

Operation Id#

getAccount

list()#

list: (options?: {
  search?: string;
  status?: "active" | "inactive";
}, requestOptions?: RequestOptions) => Promise<{
  createdAt: string;
  id: string;
  isDeleted: boolean;
  name: string;
  organisationId: string;
  status: "active" | "inactive";
  updatedAt: string;
}[]>;

List accounts List all accounts for the organisation with optional filtering

Parameters#

ParameterType
options?{ search?: string; status?: "active" | "inactive"; }
options.search?string
options.status?"active" | "inactive"
requestOptions?RequestOptions

Returns#

Promise<{ createdAt: string; id: string; isDeleted: boolean; name: string; organisationId: string; status: "active" | "inactive"; updatedAt: string; }[]>

Operation Id#

listAccounts

update()#

update: (id: string, request: {
  name?: string;
  status?: "active" | "inactive";
}, requestOptions?: RequestOptions) => Promise<{
  createdAt: string;
  id: string;
  isDeleted: boolean;
  name: string;
  organisationId: string;
  status: "active" | "inactive";
  updatedAt: string;
}>;

Update account Update an existing account

Parameters#

ParameterType
idstring
request{ name?: string; status?: "active" | "inactive"; }
request.name?string
request.status?"active" | "inactive"
requestOptions?RequestOptions

Returns#

Promise<{ createdAt: string; id: string; isDeleted: boolean; name: string; organisationId: string; status: "active" | "inactive"; updatedAt: string; }>

Operation Id#

updateAccount