/** * Fireblocks API * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) * * The version of the OpenAPI document: 1.6.2 * Contact: developers@fireblocks.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { Configuration } from '../configuration'; import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import { RequestArgs, BaseAPI } from '../base'; import { ApprovalRequestItem } from '../models'; import { ApproveApprovalRequest } from '../models'; import { DeleteApprovalApiKeyResponse } from '../models'; import { ListApprovalApiKeysResponse } from '../models'; import { ListApprovalsResponse } from '../models'; import { RegisterApprovalApiKeyRequest } from '../models'; import { RegisterApprovalApiKeyResponse } from '../models'; /** * ApprovalsBetaApi - axios parameter creator * @export */ export declare const ApprovalsBetaApiAxiosParamCreator: (configuration?: Configuration) => { /** * Approve a pending approval request as the authenticated API user. The caller signs the request\'s signable data with the private key of a registered approval API key and submits the base64url-encoded signature, optionally with the key ID. The server verifies the signature against the registered public key — using the given key ID, or matching against all of the user\'s registered keys when the key ID is omitted — and advances the approval quorum. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin. * @summary Approve an approval request * @param {ApproveApprovalRequest} approveApprovalRequest * @param {string} requestId The approval request ID. * @param {string} [idempotencyKey] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. * @param {*} [options] Override http request option. * @throws {RequiredError} */ approveApproval: (approveApprovalRequest: ApproveApprovalRequest, requestId: string, idempotencyKey?: string, options?: RawAxiosRequestConfig) => Promise; /** * Register an approval public key for an API user, used to sign approval requests. Up to 2 active keys are supported per API user. Returns the server-generated key ID used for deletion. The `userId` must be the authenticated API user\'s own ID. Registering a key for another user is not supported and is rejected. Registration may require approval. In that case the response carries `ccrIdPendingRegistration`, the key reads as `APPROVAL_API_KEY_STATUS_PENDING_REGISTRATION` and cannot sign until the request is approved. A rejected request removes the key. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin. * @summary Register an approval key * @param {RegisterApprovalApiKeyRequest} registerApprovalApiKeyRequest * @param {string} userId The ID of the API user to register the approval key for. * @param {string} [idempotencyKey] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createApprovalKey: (registerApprovalApiKeyRequest: RegisterApprovalApiKeyRequest, userId: string, idempotencyKey?: string, options?: RawAxiosRequestConfig) => Promise; /** * Delete (revoke) an approval public key for the specified API user. The deletion may require approval: it always does for the API user\'s last key or another user\'s key. In that case the response carries `ccrIdPendingDeletion`, the key reads as `APPROVAL_API_KEY_STATUS_PENDING_DELETION` and stays active until the request is approved. A rejected request leaves the key enabled. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin. * @summary Delete an approval key * @param {string} userId The ID of the API user whose approval key to delete. * @param {string} keyId The ID of the approval key to delete. * @param {string} [idempotencyKey] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteApprovalKey: (userId: string, keyId: string, idempotencyKey?: string, options?: RawAxiosRequestConfig) => Promise; /** * Retrieve full detail for a single approval request by ID, including the payload to sign and, when requested, the request\'s `quorumStatus`. Because this endpoint addresses one request, it accepts `quorumStatusMode=FULL`, which adds the participating approvers and their individual approval state. `userStatus` reflects the authenticated user by default. Pass `userId` to report it for another user instead. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin, Security Auditor. * @summary Get a single approval request * @param {string} requestId The approval request ID. * @param {string} [userId] Report `userStatus` for this user instead of the authenticated user. This selects whose approval state is returned; it does not change which requests can be fetched. Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; other roles are rejected with 403. * @param {GetApprovalByIdQuorumStatusModeEnum} [quorumStatusMode] How much quorum detail to include in `quorumStatus`. `NONE` (the default) returns it as `null`. `SUMMARY` returns the approval thresholds, current counts and status. `FULL` adds `users` and the per-group `members` indexes identifying who may approve and who already has. Any other value is rejected with 400; the parameter is case-sensitive. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getApprovalById: (requestId: string, userId?: string, quorumStatusMode?: GetApprovalByIdQuorumStatusModeEnum, options?: RawAxiosRequestConfig) => Promise; /** * List the approval public keys registered for the specified API user. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin, Security Auditor. * @summary List approval keys * @param {string} userId The ID of the API user whose approval keys to list. * @param {number} [pageSize] Number of results per page. Maximum 15. Defaults to 10. * @param {string} [pageCursor] Cursor returned from the previous response (the `next` field) to fetch the next page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getApprovalKeys: (userId: string, pageSize?: number, pageCursor?: string, options?: RawAxiosRequestConfig) => Promise; /** * Retrieve the pending approval requests the authenticated API user is eligible to act on, including requests the user has already approved that are still pending overall. The response is scoped to the authenticated user by default. Pass `userId` to read another user\'s queue, or `includeAllUsers=true` to read every pending request in the workspace. Both require an Admin, Non-Signing Admin, Security Admin or Security Auditor role and are rejected with 403 otherwise. Set `quorumStatusMode=SUMMARY` to include each request\'s approval thresholds and counts. The per-approver breakdown is available only when fetching a single request — see `GET /approvals/{requestId}`. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin, Security Auditor. * @summary List approval requests * @param {boolean} [includeUserApproved] When true, also include requests the authenticated user has already approved that are still pending overall. Defaults to false (only requests the user has not yet acted on). * @param {string} [userId] Return the pending requests for this user instead of the authenticated user. Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; other roles are rejected with 403. Cannot be combined with `includeAllUsers=true` — sending both is rejected with 400. * @param {boolean} [includeAllUsers] When true, return every pending request in the workspace instead of a single user\'s queue. Defaults to false. Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; other roles are rejected with 403. In this mode `userStatus` is always `USER_STATUS_NOT_APPLICABLE`, because the response is not scoped to one user, and `includeUserApproved` has no effect. Cannot be combined with `userId`. * @param {GetApprovalsQuorumStatusModeEnum} [quorumStatusMode] How much quorum detail to include in each request\'s `quorumStatus`. `NONE` (the default) returns it as `null`. `SUMMARY` returns the approval thresholds, current counts and status. `FULL` is rejected with 400 on this endpoint because the per-approver breakdown requires a single request — use `GET /approvals/{requestId}` for it. Any other value is rejected with 400; the parameter is case-sensitive. * @param {number} [pageSize] Number of results per page. Maximum 30. Defaults to 20. * @param {string} [pageCursor] Cursor returned from the previous response (the `next` field) to fetch the next page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getApprovals: (includeUserApproved?: boolean, userId?: string, includeAllUsers?: boolean, quorumStatusMode?: GetApprovalsQuorumStatusModeEnum, pageSize?: number, pageCursor?: string, options?: RawAxiosRequestConfig) => Promise; /** * Reject a pending approval request as the authenticated API user. No signature is required (unlike approve). The caller must be eligible to act on the request; rejecting finalizes the request as rejected per the approval policy. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin. * @summary Reject an approval request * @param {string} requestId The approval request ID. * @param {string} [idempotencyKey] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. * @param {*} [options] Override http request option. * @throws {RequiredError} */ rejectApproval: (requestId: string, idempotencyKey?: string, options?: RawAxiosRequestConfig) => Promise; }; /** * ApprovalsBetaApi - functional programming interface * @export */ export declare const ApprovalsBetaApiFp: (configuration?: Configuration) => { /** * Approve a pending approval request as the authenticated API user. The caller signs the request\'s signable data with the private key of a registered approval API key and submits the base64url-encoded signature, optionally with the key ID. The server verifies the signature against the registered public key — using the given key ID, or matching against all of the user\'s registered keys when the key ID is omitted — and advances the approval quorum. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin. * @summary Approve an approval request * @param {ApproveApprovalRequest} approveApprovalRequest * @param {string} requestId The approval request ID. * @param {string} [idempotencyKey] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. * @param {*} [options] Override http request option. * @throws {RequiredError} */ approveApproval(approveApprovalRequest: ApproveApprovalRequest, requestId: string, idempotencyKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Register an approval public key for an API user, used to sign approval requests. Up to 2 active keys are supported per API user. Returns the server-generated key ID used for deletion. The `userId` must be the authenticated API user\'s own ID. Registering a key for another user is not supported and is rejected. Registration may require approval. In that case the response carries `ccrIdPendingRegistration`, the key reads as `APPROVAL_API_KEY_STATUS_PENDING_REGISTRATION` and cannot sign until the request is approved. A rejected request removes the key. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin. * @summary Register an approval key * @param {RegisterApprovalApiKeyRequest} registerApprovalApiKeyRequest * @param {string} userId The ID of the API user to register the approval key for. * @param {string} [idempotencyKey] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createApprovalKey(registerApprovalApiKeyRequest: RegisterApprovalApiKeyRequest, userId: string, idempotencyKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Delete (revoke) an approval public key for the specified API user. The deletion may require approval: it always does for the API user\'s last key or another user\'s key. In that case the response carries `ccrIdPendingDeletion`, the key reads as `APPROVAL_API_KEY_STATUS_PENDING_DELETION` and stays active until the request is approved. A rejected request leaves the key enabled. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin. * @summary Delete an approval key * @param {string} userId The ID of the API user whose approval key to delete. * @param {string} keyId The ID of the approval key to delete. * @param {string} [idempotencyKey] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteApprovalKey(userId: string, keyId: string, idempotencyKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Retrieve full detail for a single approval request by ID, including the payload to sign and, when requested, the request\'s `quorumStatus`. Because this endpoint addresses one request, it accepts `quorumStatusMode=FULL`, which adds the participating approvers and their individual approval state. `userStatus` reflects the authenticated user by default. Pass `userId` to report it for another user instead. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin, Security Auditor. * @summary Get a single approval request * @param {string} requestId The approval request ID. * @param {string} [userId] Report `userStatus` for this user instead of the authenticated user. This selects whose approval state is returned; it does not change which requests can be fetched. Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; other roles are rejected with 403. * @param {GetApprovalByIdQuorumStatusModeEnum} [quorumStatusMode] How much quorum detail to include in `quorumStatus`. `NONE` (the default) returns it as `null`. `SUMMARY` returns the approval thresholds, current counts and status. `FULL` adds `users` and the per-group `members` indexes identifying who may approve and who already has. Any other value is rejected with 400; the parameter is case-sensitive. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getApprovalById(requestId: string, userId?: string, quorumStatusMode?: GetApprovalByIdQuorumStatusModeEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * List the approval public keys registered for the specified API user. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin, Security Auditor. * @summary List approval keys * @param {string} userId The ID of the API user whose approval keys to list. * @param {number} [pageSize] Number of results per page. Maximum 15. Defaults to 10. * @param {string} [pageCursor] Cursor returned from the previous response (the `next` field) to fetch the next page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getApprovalKeys(userId: string, pageSize?: number, pageCursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Retrieve the pending approval requests the authenticated API user is eligible to act on, including requests the user has already approved that are still pending overall. The response is scoped to the authenticated user by default. Pass `userId` to read another user\'s queue, or `includeAllUsers=true` to read every pending request in the workspace. Both require an Admin, Non-Signing Admin, Security Admin or Security Auditor role and are rejected with 403 otherwise. Set `quorumStatusMode=SUMMARY` to include each request\'s approval thresholds and counts. The per-approver breakdown is available only when fetching a single request — see `GET /approvals/{requestId}`. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin, Security Auditor. * @summary List approval requests * @param {boolean} [includeUserApproved] When true, also include requests the authenticated user has already approved that are still pending overall. Defaults to false (only requests the user has not yet acted on). * @param {string} [userId] Return the pending requests for this user instead of the authenticated user. Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; other roles are rejected with 403. Cannot be combined with `includeAllUsers=true` — sending both is rejected with 400. * @param {boolean} [includeAllUsers] When true, return every pending request in the workspace instead of a single user\'s queue. Defaults to false. Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; other roles are rejected with 403. In this mode `userStatus` is always `USER_STATUS_NOT_APPLICABLE`, because the response is not scoped to one user, and `includeUserApproved` has no effect. Cannot be combined with `userId`. * @param {GetApprovalsQuorumStatusModeEnum} [quorumStatusMode] How much quorum detail to include in each request\'s `quorumStatus`. `NONE` (the default) returns it as `null`. `SUMMARY` returns the approval thresholds, current counts and status. `FULL` is rejected with 400 on this endpoint because the per-approver breakdown requires a single request — use `GET /approvals/{requestId}` for it. Any other value is rejected with 400; the parameter is case-sensitive. * @param {number} [pageSize] Number of results per page. Maximum 30. Defaults to 20. * @param {string} [pageCursor] Cursor returned from the previous response (the `next` field) to fetch the next page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getApprovals(includeUserApproved?: boolean, userId?: string, includeAllUsers?: boolean, quorumStatusMode?: GetApprovalsQuorumStatusModeEnum, pageSize?: number, pageCursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Reject a pending approval request as the authenticated API user. No signature is required (unlike approve). The caller must be eligible to act on the request; rejecting finalizes the request as rejected per the approval policy. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin. * @summary Reject an approval request * @param {string} requestId The approval request ID. * @param {string} [idempotencyKey] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. * @param {*} [options] Override http request option. * @throws {RequiredError} */ rejectApproval(requestId: string, idempotencyKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; }; /** * ApprovalsBetaApi - factory interface * @export */ export declare const ApprovalsBetaApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Approve a pending approval request as the authenticated API user. The caller signs the request\'s signable data with the private key of a registered approval API key and submits the base64url-encoded signature, optionally with the key ID. The server verifies the signature against the registered public key — using the given key ID, or matching against all of the user\'s registered keys when the key ID is omitted — and advances the approval quorum. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin. * @summary Approve an approval request * @param {ApprovalsBetaApiApproveApprovalRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ approveApproval(requestParameters: ApprovalsBetaApiApproveApprovalRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Register an approval public key for an API user, used to sign approval requests. Up to 2 active keys are supported per API user. Returns the server-generated key ID used for deletion. The `userId` must be the authenticated API user\'s own ID. Registering a key for another user is not supported and is rejected. Registration may require approval. In that case the response carries `ccrIdPendingRegistration`, the key reads as `APPROVAL_API_KEY_STATUS_PENDING_REGISTRATION` and cannot sign until the request is approved. A rejected request removes the key. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin. * @summary Register an approval key * @param {ApprovalsBetaApiCreateApprovalKeyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createApprovalKey(requestParameters: ApprovalsBetaApiCreateApprovalKeyRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Delete (revoke) an approval public key for the specified API user. The deletion may require approval: it always does for the API user\'s last key or another user\'s key. In that case the response carries `ccrIdPendingDeletion`, the key reads as `APPROVAL_API_KEY_STATUS_PENDING_DELETION` and stays active until the request is approved. A rejected request leaves the key enabled. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin. * @summary Delete an approval key * @param {ApprovalsBetaApiDeleteApprovalKeyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteApprovalKey(requestParameters: ApprovalsBetaApiDeleteApprovalKeyRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Retrieve full detail for a single approval request by ID, including the payload to sign and, when requested, the request\'s `quorumStatus`. Because this endpoint addresses one request, it accepts `quorumStatusMode=FULL`, which adds the participating approvers and their individual approval state. `userStatus` reflects the authenticated user by default. Pass `userId` to report it for another user instead. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin, Security Auditor. * @summary Get a single approval request * @param {ApprovalsBetaApiGetApprovalByIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getApprovalById(requestParameters: ApprovalsBetaApiGetApprovalByIdRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * List the approval public keys registered for the specified API user. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin, Security Auditor. * @summary List approval keys * @param {ApprovalsBetaApiGetApprovalKeysRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getApprovalKeys(requestParameters: ApprovalsBetaApiGetApprovalKeysRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Retrieve the pending approval requests the authenticated API user is eligible to act on, including requests the user has already approved that are still pending overall. The response is scoped to the authenticated user by default. Pass `userId` to read another user\'s queue, or `includeAllUsers=true` to read every pending request in the workspace. Both require an Admin, Non-Signing Admin, Security Admin or Security Auditor role and are rejected with 403 otherwise. Set `quorumStatusMode=SUMMARY` to include each request\'s approval thresholds and counts. The per-approver breakdown is available only when fetching a single request — see `GET /approvals/{requestId}`. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin, Security Auditor. * @summary List approval requests * @param {ApprovalsBetaApiGetApprovalsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getApprovals(requestParameters?: ApprovalsBetaApiGetApprovalsRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Reject a pending approval request as the authenticated API user. No signature is required (unlike approve). The caller must be eligible to act on the request; rejecting finalizes the request as rejected per the approval policy. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin. * @summary Reject an approval request * @param {ApprovalsBetaApiRejectApprovalRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ rejectApproval(requestParameters: ApprovalsBetaApiRejectApprovalRequest, options?: RawAxiosRequestConfig): AxiosPromise; }; /** * Request parameters for approveApproval operation in ApprovalsBetaApi. * @export * @interface ApprovalsBetaApiApproveApprovalRequest */ export interface ApprovalsBetaApiApproveApprovalRequest { /** * * @type {ApproveApprovalRequest} * @memberof ApprovalsBetaApiApproveApproval */ readonly approveApprovalRequest: ApproveApprovalRequest; /** * The approval request ID. * @type {string} * @memberof ApprovalsBetaApiApproveApproval */ readonly requestId: string; /** * A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. * @type {string} * @memberof ApprovalsBetaApiApproveApproval */ readonly idempotencyKey?: string; } /** * Request parameters for createApprovalKey operation in ApprovalsBetaApi. * @export * @interface ApprovalsBetaApiCreateApprovalKeyRequest */ export interface ApprovalsBetaApiCreateApprovalKeyRequest { /** * * @type {RegisterApprovalApiKeyRequest} * @memberof ApprovalsBetaApiCreateApprovalKey */ readonly registerApprovalApiKeyRequest: RegisterApprovalApiKeyRequest; /** * The ID of the API user to register the approval key for. * @type {string} * @memberof ApprovalsBetaApiCreateApprovalKey */ readonly userId: string; /** * A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. * @type {string} * @memberof ApprovalsBetaApiCreateApprovalKey */ readonly idempotencyKey?: string; } /** * Request parameters for deleteApprovalKey operation in ApprovalsBetaApi. * @export * @interface ApprovalsBetaApiDeleteApprovalKeyRequest */ export interface ApprovalsBetaApiDeleteApprovalKeyRequest { /** * The ID of the API user whose approval key to delete. * @type {string} * @memberof ApprovalsBetaApiDeleteApprovalKey */ readonly userId: string; /** * The ID of the approval key to delete. * @type {string} * @memberof ApprovalsBetaApiDeleteApprovalKey */ readonly keyId: string; /** * A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. * @type {string} * @memberof ApprovalsBetaApiDeleteApprovalKey */ readonly idempotencyKey?: string; } /** * Request parameters for getApprovalById operation in ApprovalsBetaApi. * @export * @interface ApprovalsBetaApiGetApprovalByIdRequest */ export interface ApprovalsBetaApiGetApprovalByIdRequest { /** * The approval request ID. * @type {string} * @memberof ApprovalsBetaApiGetApprovalById */ readonly requestId: string; /** * Report `userStatus` for this user instead of the authenticated user. This selects whose approval state is returned; it does not change which requests can be fetched. Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; other roles are rejected with 403. * @type {string} * @memberof ApprovalsBetaApiGetApprovalById */ readonly userId?: string; /** * How much quorum detail to include in `quorumStatus`. `NONE` (the default) returns it as `null`. `SUMMARY` returns the approval thresholds, current counts and status. `FULL` adds `users` and the per-group `members` indexes identifying who may approve and who already has. Any other value is rejected with 400; the parameter is case-sensitive. * @type {'NONE' | 'SUMMARY' | 'FULL'} * @memberof ApprovalsBetaApiGetApprovalById */ readonly quorumStatusMode?: GetApprovalByIdQuorumStatusModeEnum; } /** * Request parameters for getApprovalKeys operation in ApprovalsBetaApi. * @export * @interface ApprovalsBetaApiGetApprovalKeysRequest */ export interface ApprovalsBetaApiGetApprovalKeysRequest { /** * The ID of the API user whose approval keys to list. * @type {string} * @memberof ApprovalsBetaApiGetApprovalKeys */ readonly userId: string; /** * Number of results per page. Maximum 15. Defaults to 10. * @type {number} * @memberof ApprovalsBetaApiGetApprovalKeys */ readonly pageSize?: number; /** * Cursor returned from the previous response (the `next` field) to fetch the next page. * @type {string} * @memberof ApprovalsBetaApiGetApprovalKeys */ readonly pageCursor?: string; } /** * Request parameters for getApprovals operation in ApprovalsBetaApi. * @export * @interface ApprovalsBetaApiGetApprovalsRequest */ export interface ApprovalsBetaApiGetApprovalsRequest { /** * When true, also include requests the authenticated user has already approved that are still pending overall. Defaults to false (only requests the user has not yet acted on). * @type {boolean} * @memberof ApprovalsBetaApiGetApprovals */ readonly includeUserApproved?: boolean; /** * Return the pending requests for this user instead of the authenticated user. Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; other roles are rejected with 403. Cannot be combined with `includeAllUsers=true` — sending both is rejected with 400. * @type {string} * @memberof ApprovalsBetaApiGetApprovals */ readonly userId?: string; /** * When true, return every pending request in the workspace instead of a single user\'s queue. Defaults to false. Requires an Admin, Non-Signing Admin, Security Admin or Security Auditor role; other roles are rejected with 403. In this mode `userStatus` is always `USER_STATUS_NOT_APPLICABLE`, because the response is not scoped to one user, and `includeUserApproved` has no effect. Cannot be combined with `userId`. * @type {boolean} * @memberof ApprovalsBetaApiGetApprovals */ readonly includeAllUsers?: boolean; /** * How much quorum detail to include in each request\'s `quorumStatus`. `NONE` (the default) returns it as `null`. `SUMMARY` returns the approval thresholds, current counts and status. `FULL` is rejected with 400 on this endpoint because the per-approver breakdown requires a single request — use `GET /approvals/{requestId}` for it. Any other value is rejected with 400; the parameter is case-sensitive. * @type {'NONE' | 'SUMMARY'} * @memberof ApprovalsBetaApiGetApprovals */ readonly quorumStatusMode?: GetApprovalsQuorumStatusModeEnum; /** * Number of results per page. Maximum 30. Defaults to 20. * @type {number} * @memberof ApprovalsBetaApiGetApprovals */ readonly pageSize?: number; /** * Cursor returned from the previous response (the `next` field) to fetch the next page. * @type {string} * @memberof ApprovalsBetaApiGetApprovals */ readonly pageCursor?: string; } /** * Request parameters for rejectApproval operation in ApprovalsBetaApi. * @export * @interface ApprovalsBetaApiRejectApprovalRequest */ export interface ApprovalsBetaApiRejectApprovalRequest { /** * The approval request ID. * @type {string} * @memberof ApprovalsBetaApiRejectApproval */ readonly requestId: string; /** * A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. * @type {string} * @memberof ApprovalsBetaApiRejectApproval */ readonly idempotencyKey?: string; } /** * ApprovalsBetaApi - object-oriented interface * @export * @class ApprovalsBetaApi * @extends {BaseAPI} */ export declare class ApprovalsBetaApi extends BaseAPI { /** * Approve a pending approval request as the authenticated API user. The caller signs the request\'s signable data with the private key of a registered approval API key and submits the base64url-encoded signature, optionally with the key ID. The server verifies the signature against the registered public key — using the given key ID, or matching against all of the user\'s registered keys when the key ID is omitted — and advances the approval quorum. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin. * @summary Approve an approval request * @param {ApprovalsBetaApiApproveApprovalRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ApprovalsBetaApi */ approveApproval(requestParameters: ApprovalsBetaApiApproveApprovalRequest): Promise>; /** * Register an approval public key for an API user, used to sign approval requests. Up to 2 active keys are supported per API user. Returns the server-generated key ID used for deletion. The `userId` must be the authenticated API user\'s own ID. Registering a key for another user is not supported and is rejected. Registration may require approval. In that case the response carries `ccrIdPendingRegistration`, the key reads as `APPROVAL_API_KEY_STATUS_PENDING_REGISTRATION` and cannot sign until the request is approved. A rejected request removes the key. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin. * @summary Register an approval key * @param {ApprovalsBetaApiCreateApprovalKeyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ApprovalsBetaApi */ createApprovalKey(requestParameters: ApprovalsBetaApiCreateApprovalKeyRequest): Promise>; /** * Delete (revoke) an approval public key for the specified API user. The deletion may require approval: it always does for the API user\'s last key or another user\'s key. In that case the response carries `ccrIdPendingDeletion`, the key reads as `APPROVAL_API_KEY_STATUS_PENDING_DELETION` and stays active until the request is approved. A rejected request leaves the key enabled. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin. * @summary Delete an approval key * @param {ApprovalsBetaApiDeleteApprovalKeyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ApprovalsBetaApi */ deleteApprovalKey(requestParameters: ApprovalsBetaApiDeleteApprovalKeyRequest): Promise>; /** * Retrieve full detail for a single approval request by ID, including the payload to sign and, when requested, the request\'s `quorumStatus`. Because this endpoint addresses one request, it accepts `quorumStatusMode=FULL`, which adds the participating approvers and their individual approval state. `userStatus` reflects the authenticated user by default. Pass `userId` to report it for another user instead. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin, Security Auditor. * @summary Get a single approval request * @param {ApprovalsBetaApiGetApprovalByIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ApprovalsBetaApi */ getApprovalById(requestParameters: ApprovalsBetaApiGetApprovalByIdRequest): Promise>; /** * List the approval public keys registered for the specified API user. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin, Security Auditor. * @summary List approval keys * @param {ApprovalsBetaApiGetApprovalKeysRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ApprovalsBetaApi */ getApprovalKeys(requestParameters: ApprovalsBetaApiGetApprovalKeysRequest): Promise>; /** * Retrieve the pending approval requests the authenticated API user is eligible to act on, including requests the user has already approved that are still pending overall. The response is scoped to the authenticated user by default. Pass `userId` to read another user\'s queue, or `includeAllUsers=true` to read every pending request in the workspace. Both require an Admin, Non-Signing Admin, Security Admin or Security Auditor role and are rejected with 403 otherwise. Set `quorumStatusMode=SUMMARY` to include each request\'s approval thresholds and counts. The per-approver breakdown is available only when fetching a single request — see `GET /approvals/{requestId}`. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin, Security Auditor. * @summary List approval requests * @param {ApprovalsBetaApiGetApprovalsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ApprovalsBetaApi */ getApprovals(requestParameters?: ApprovalsBetaApiGetApprovalsRequest): Promise>; /** * Reject a pending approval request as the authenticated API user. No signature is required (unlike approve). The caller must be eligible to act on the request; rejecting finalizes the request as rejected per the approval policy. Endpoint Permission: Owner, Admin, Non-Signing Admin, Approver, Signer, Security Admin. * @summary Reject an approval request * @param {ApprovalsBetaApiRejectApprovalRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ApprovalsBetaApi */ rejectApproval(requestParameters: ApprovalsBetaApiRejectApprovalRequest): Promise>; } /** * @export */ export declare const GetApprovalByIdQuorumStatusModeEnum: { readonly None: "NONE"; readonly Summary: "SUMMARY"; readonly Full: "FULL"; }; export type GetApprovalByIdQuorumStatusModeEnum = typeof GetApprovalByIdQuorumStatusModeEnum[keyof typeof GetApprovalByIdQuorumStatusModeEnum]; /** * @export */ export declare const GetApprovalsQuorumStatusModeEnum: { readonly None: "NONE"; readonly Summary: "SUMMARY"; }; export type GetApprovalsQuorumStatusModeEnum = typeof GetApprovalsQuorumStatusModeEnum[keyof typeof GetApprovalsQuorumStatusModeEnum];