BackstageClient.accounts
BackstageClient.accounts in @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#
| Parameter | Type |
|---|---|
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#
createAccount
delete()#
delete: (id: string, requestOptions?: RequestOptions) => Promise<{
id: string;
success: boolean;
}>;Delete account Delete an account (soft delete)
Parameters#
| Parameter | Type |
|---|---|
id | string |
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#
| Parameter | Type |
|---|---|
id | string |
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#
| Parameter | Type |
|---|---|
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#
| Parameter | Type |
|---|---|
id | string |
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