UNPKG

@piiano/vault-client

Version:

Piiano Vault generated typescript client

252 lines 11.7 kB
import type { AllGenerations } from '../models/AllGenerations'; import type { Config } from '../models/Config'; import type { DeletionCount } from '../models/DeletionCount'; import type { ExportKeyResponse } from '../models/ExportKeyResponse'; import type { Health } from '../models/Health'; import type { KMSStatusResponse } from '../models/KMSStatusResponse'; import type { License } from '../models/License'; import type { LicenseKey } from '../models/LicenseKey'; import type { ProductVersion } from '../models/ProductVersion'; import type { CancelablePromise } from '../core/CancelablePromise'; import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export declare class SystemClient { readonly httpRequest: BaseHttpRequest; constructor(httpRequest: BaseHttpRequest); /** * Get data service health/status * Gets the status of the service. * * The status codes returned follow the IETF standard [Health Check Response Format for HTTP APIs](https://datatracker.ietf.org/doc/html/draft-inadarei-api-health-check-05). For example, `pass` is returned when the service is up. * * The role performing this operation must have the `CapDataReader` 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 Health The request is successful. * @throws ApiError */ dataHealth({ additionalHeaders, }?: { additionalHeaders?: Record<string, string>; }): CancelablePromise<Health>; /** * Get control service health/status * Gets the status of the service. * * The status codes returned follow the IETF standard [Health Check Response Format for HTTP APIs](https://datatracker.ietf.org/doc/html/draft-inadarei-api-health-check-05). For example, `pass` is returned when the service is up. * @returns Health The request is successful. * @throws ApiError */ controlHealth({ additionalHeaders, }?: { additionalHeaders?: Record<string, string>; }): CancelablePromise<Health>; /** * Get cluster information * Get Cluster Information. * * Returns the vault's generation and the generations of all the workers (Vault instances with a [Data component](/architecture/components)). * * Vault instances with only a Control component are not displayed in the response. * * The role that performs this operation must have the `CapClusterInfoReader` 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 AllGenerations The request is successful. * @throws ApiError */ getClusterInfo({ customAudit, additionalHeaders, }?: { /** * Custom audit information to be included in the audit log. */ customAudit?: string; additionalHeaders?: Record<string, string>; }): CancelablePromise<AllGenerations>; /** * Delete objects and tokens * Deletes objects and tokens that have been archived for longer than the retention period and token transaction IDs with no associated tokens. * * :::note * This operation deletes a maximum of 10,000 items. To delete all items, repeat calls until the count of deleted items reaches zero. Using the [prune job](/guides/prune-archived-data#configuring-the-prune-job), rather than calling the API, is recommended. * * For ad-hoc deletion of archived records, use the [Delete objects and tokens](/cli/reference#delete-objects-and-tokens) CLI command, which deletes all relevant items. * ::: * * See [Object life cycle](/data-privacy/object-lifecycle) for more information on how objects and tokens are archived and how deletion is affected by the retention period. * * @returns DeletionCount The request is successful. * @throws ApiError */ garbageCollection({ filter, dryRun, adhocReason, reason, customAudit, reloadCache, additionalHeaders, }?: { /** * Whether to delete objects, tokens, or token transaction IDs with no associated tokens. Options are: * - `objects_only` – delete only objects. * - `tokens_only` – delete only tokens. * - `transaction_ids_only` – delete only token transaction IDs with no associated tokens. * */ filter?: 'objects_only' | 'tokens_only' | 'transaction_ids_only'; /** * Whether to respond with how many objects and tokens are available for deletion, without deleting them. */ dryRun?: boolean; /** * 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; additionalHeaders?: Record<string, string>; }): CancelablePromise<Array<DeletionCount>>; /** * Trigger artificial error * Manually trigger an artificial error for testing purposes. * * The role that performs this operation must have the `CapErrorWriter` 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 void * @throws ApiError */ triggerError({ customAudit, requestBody, additionalHeaders, }?: { /** * Custom audit information to be included in the audit log. */ customAudit?: string; requestBody?: any; additionalHeaders?: Record<string, string>; }): CancelablePromise<void>; /** * Get system configuration * Get the current active system configuration. * * The role that performs this operation must have the `CapInfoReader` 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 Config The request is successful. * @throws ApiError */ getConfiguration({ customAudit, additionalHeaders, }?: { /** * Custom audit information to be included in the audit log. */ customAudit?: string; additionalHeaders?: Record<string, string>; }): CancelablePromise<Config>; /** * Get license * Gets information on the currently used license. * * The role that performs this operation must have the `CapInfoReader` 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 License The request is successful. * @throws ApiError */ getLicense({ customAudit, additionalHeaders, }?: { /** * Custom audit information to be included in the audit log. */ customAudit?: string; additionalHeaders?: Record<string, string>; }): CancelablePromise<License>; /** * Set license * Sets the license key for the Vault. * * :::note * In the hosted version of Vault, Piiano manages and sets the license key. * ::: * @returns any The request is successful. * @throws ApiError */ setLicense({ requestBody, customAudit, additionalHeaders, }: { /** * The license key. */ requestBody: LicenseKey; /** * Custom audit information to be included in the audit log. */ customAudit?: string; additionalHeaders?: Record<string, string>; }): CancelablePromise<any>; /** * Get Vault version * Gets the version of Vault. * @returns ProductVersion The request is successful. * @throws ApiError */ getVaultVersion({ customAudit, additionalHeaders, }?: { /** * Custom audit information to be included in the audit log. */ customAudit?: string; additionalHeaders?: Record<string, string>; }): CancelablePromise<ProductVersion>; /** * Rotate data encryption keys * Rotates all the KMS keys that Vault uses to encrypt properties, tokens, and more. * * :::note * Key rotation not managed in the hosted version of Vault. * ::: * * When the keys are rotated, new data is encrypted with the new key. All old keys are retained, so that content encrypted with previous keys can be decipherable. * * The role that performs this operation must have the `CapKMSWriter` 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 */ rotateKeys({ customAudit, additionalHeaders, }?: { /** * Custom audit information to be included in the audit log. */ customAudit?: string; additionalHeaders?: Record<string, string>; }): CancelablePromise<any>; /** * Get export key * Gets an encrypted copy of the key used to encrypt exported data. * The key is encrypted using the export KMS key defined by the [`PVAULT_KMS_EXPORT_URI` or `PVAULT_KMS_EXPORT_SEED` environment variables](/guides/configure/environment-variables#key-management-service). * When importing data, the key is provided to the Vault and decrypted by the KMS, then used to decrypt the data. * * The role that performs this operation must have the `CapExportKeyReader` 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 ExportKeyResponse The request is successful. * @throws ApiError */ getExportKey({ customAudit, additionalHeaders, }?: { /** * Custom audit information to be included in the audit log. */ customAudit?: string; additionalHeaders?: Record<string, string>; }): CancelablePromise<ExportKeyResponse>; /** * Get KMS status * Gets the status of the configured KMS. * * The role that performs this operation must have the `CapKMSReader` 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 KMSStatusResponse The request is successful. * @throws ApiError */ getKms({ customAudit, additionalHeaders, }?: { /** * Custom audit information to be included in the audit log. */ customAudit?: string; additionalHeaders?: Record<string, string>; }): CancelablePromise<KMSStatusResponse>; } //# sourceMappingURL=SystemClient.d.ts.map