ApiKeyOperations
Class API key operations.
Properties
| Name | Type | Description |
|---|---|---|
send | Send | - |
Members
constructor
(send: Send) => ApiKeyOperations
Parameters
| Name | Type | Description |
|---|---|---|
send | Send | - |
create
(request: { name: string; products: object; role: "ADMIN" | "EDITOR" | "ACCOUNTANT" }) => Promise
Creates an API key. The response carries the secret value.
Parameters
| Name | Type | Description |
|---|---|---|
request | { name: string; products: object; role: "ADMIN" | "EDITOR" | "ACCOUNTANT" } | - |
delete
(apiKeyId: string) => Promise
Deletes an API key.
Parameters
| Name | Type | Description |
|---|---|---|
apiKeyId | string | - |
get
(apiKeyId: string) => Promise
Gets one API key.
Parameters
| Name | Type | Description |
|---|---|---|
apiKeyId | string | - |
list
(filters?: { last_key: string; limit: number; search: string; sort: string }) => Promise
Lists one page of API keys; pass the returned lastKey as last_key for the next page.
Parameters
| Name | Type | Description |
|---|---|---|
filters? | { last_key: string; limit: number; search: string; sort: string } | - |
listAll
(filters?: Omit) => AsyncGenerator
Iterates over every API key, page by page.
Parameters
| Name | Type | Description |
|---|---|---|
filters? | Omit | - |
rotate
(apiKeyId: string) => Promise
Rotates an API key: issues a new secret value and invalidates the old one.
Parameters
| Name | Type | Description |
|---|---|---|
apiKeyId | string | - |
update
(apiKeyId: string, request: { name: string; products: object; role: "ADMIN" | "EDITOR" | "ACCOUNTANT" }) => Promise
Updates an API key's name, role or product settings.
Parameters
| Name | Type | Description |
|---|---|---|
apiKeyId | string | - |
request | { name: string; products: object; role: "ADMIN" | "EDITOR" | "ACCOUNTANT" } | - |
Source: carmen-cloud/index.ts:230