UNPKG

@piiano/vault-client

Version:

Piiano Vault generated typescript client

172 lines 7.85 kB
import type { Action } from '../models/Action'; import type { ActionInput } from '../models/ActionInput'; import type { ActionResult } from '../models/ActionResult'; import type { HTTPCallActionInput } from '../models/HTTPCallActionInput'; import type { HTTPCallActionResult } from '../models/HTTPCallActionResult'; import type { CancelablePromise } from '../core/CancelablePromise'; import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export declare class ActionsClient { readonly httpRequest: BaseHttpRequest; constructor(httpRequest: BaseHttpRequest); /** * List all actions * Lists built-in and custom actions. * * The role performing this operation must have: * * - The `CapActionReader` capability. * - At least one allowing policy and no denying policies for the `read` operation for all actions. * * See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. * * @returns Action The request is successful. * @throws ApiError */ listActions({ customAudit, additionalHeaders, }?: { /** * Custom audit information to be included in the audit log. */ customAudit?: string; additionalHeaders?: Record<string, string>; }): CancelablePromise<Array<Action>>; /** * Add action * Adds an action. * * The role performing this operation must have the `CapActionWriter` capability. * See [Access control](/data-security/identity-and-access-management#access-control) for more information about how capabilities are used to control access to operations. * @returns Action The request is successful. * @throws ApiError */ addAction({ customAudit, requestBody, additionalHeaders, }?: { /** * Custom audit information to be included in the audit log. */ customAudit?: string; requestBody?: Action; additionalHeaders?: Record<string, string>; }): CancelablePromise<Action>; /** * Get action * Gets an action. * * The role performing this operation must have: * * - The `CapActionReader` capability. * - At least one allowing policy and no denying policies for the `read` operation for the action provided in the call. * * See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. * * @returns Action The request is successful. * @throws ApiError */ getActionByName({ action, customAudit, additionalHeaders, }: { action: string; /** * Custom audit information to be included in the audit log. */ customAudit?: string; additionalHeaders?: Record<string, string>; }): CancelablePromise<Action>; /** * Delete action * Deletes an action. * * You cannot delete a built-in action. * * The role performing this operation must have the `CapActionWriter` capability. * See [Access control](/data-security/identity-and-access-management#access-control) for more information about how capabilities are used to control access to operations. * @returns any The request is successful. * @throws ApiError */ deleteAction({ action, customAudit, additionalHeaders, }: { action: string; /** * Custom audit information to be included in the audit log. */ customAudit?: string; additionalHeaders?: Record<string, string>; }): CancelablePromise<any>; /** * Invoke HTTP call action * Invokes the built-in `http_call` action. * * The `http_call` action enables Vault to issue an HTTP call using a template that includes references to sensitive data. * * Read more about [using the `http_call` action](/guides/use-third-party-services/about-http-call-action). * * The role performing this operation must have: * * - The `CapActionInvoker` capability. * - At least one allowing policy and no denying policies for the `invoke` operation for the action provided in the call. * * See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. * * @returns HTTPCallActionResult The request is successful. * @throws ApiError */ invokeHttpCallAction({ adhocReason, reason, customAudit, reloadCache, requestBody, additionalHeaders, }?: { /** * An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. */ adhocReason?: string; /** * Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. */ reason?: 'AppFunctionality' | 'Analytics' | 'Notifications' | 'Marketing' | 'ThirdPartyMarketing' | 'FraudPreventionSecurityAndCompliance' | 'AccountManagement' | 'Maintenance' | 'DataSubjectRequest' | 'Other'; /** * Custom audit information to be included in the audit log. */ customAudit?: string; /** * Reloads the cache before the action. */ reloadCache?: boolean; /** * The request specification. See [http_call request body](/guides/reference/http-call-request) for more details. */ requestBody?: HTTPCallActionInput; additionalHeaders?: Record<string, string>; }): CancelablePromise<HTTPCallActionResult>; /** * Invoke action * Invokes an action. * * The body of the request is passed to the action function parameters, and the result of the action function is returned in the response. * * The role performing this operation must have: * * - The `CapActionInvoker` capability. * - At least one allowing policy and no denying policies for the `invoke` operation for the action provided in the call. * * See [identity and access management](/data-security/identity-and-access-management) for more information about how capabilities are used to control access to operations and policies are used to control access to data. * * @returns ActionResult The request is successful. * @throws ApiError */ invokeAction({ action, adhocReason, reason, customAudit, reloadCache, requestBody, additionalHeaders, }: { action: string; /** * An ad-hoc reason for accessing the Vault data. Required when `reason` is set to `Other`. */ adhocReason?: string; /** * Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false. */ reason?: 'AppFunctionality' | 'Analytics' | 'Notifications' | 'Marketing' | 'ThirdPartyMarketing' | 'FraudPreventionSecurityAndCompliance' | 'AccountManagement' | 'Maintenance' | 'DataSubjectRequest' | 'Other'; /** * Custom audit information to be included in the audit log. */ customAudit?: string; /** * Reloads the cache before the action. */ reloadCache?: boolean; /** * Details of the action to execute. */ requestBody?: ActionInput; additionalHeaders?: Record<string, string>; }): CancelablePromise<ActionResult>; } //# sourceMappingURL=ActionsClient.d.ts.map