UNPKG

@piiano/vault-client

Version:

Piiano Vault generated typescript client

155 lines 6.79 kB
import type { Property } from '../models/Property'; import type { PropertyName } from '../models/PropertyName'; import type { UpdatePropertyRequest } from '../models/UpdatePropertyRequest'; import type { CancelablePromise } from '../core/CancelablePromise'; import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export declare class CollectionPropertiesClient { readonly httpRequest: BaseHttpRequest; constructor(httpRequest: BaseHttpRequest); /** * List collection properties * Lists the properties of a collection. * * The role that performs this operation must have the `CapCollectionsReader` capability. * See [Access control](/data-security/identity-and-access-management#access-control) for more information about how * capabilities control access to operations. * @returns Property The request is successful. * @throws ApiError */ listCollectionProperties({ collection, customAudit, options, additionalHeaders, }: { collection: string; /** * Custom audit information to be included in the audit log. */ customAudit?: string; /** * Options for the operation. Options include: * - `show_builtins` – show built-in properties in the response. * */ options?: Array<'show_builtins'>; additionalHeaders?: Record<string, string>; }): CancelablePromise<Array<Property>>; /** * Add collection property * Adds a property to a collection. * * The property name in the `property` parameter and request body must match. Only nullable properties can be added to the collection when the collection contains objects. * * :::note * The combined length of the collection name and the longest property name can not exceed 40 characters. * ::: * * See the [Add a property](/guides/manage-collections-and-schemas/update-a-collection#add-a-property) in the Update a collection guide for more information on using this operation. * * The role performing this operation must have the `CapCollectionsWriter` capability. * See [Access control](/data-security/identity-and-access-management#access-control) for more information about how * capabilities control access to operations. * @returns Property The request is successful. * @throws ApiError */ addCollectionProperty({ collection, property, requestBody, customAudit, additionalHeaders, }: { collection: string; /** * The name of the property. */ property: PropertyName; /** * Details of the property. */ requestBody: Property; /** * Custom audit information to be included in the audit log. */ customAudit?: string; additionalHeaders?: Record<string, string>; }): CancelablePromise<Property>; /** * Get collection property * Gets a property of a collection. * * See the [Get a property](/guides/manage-collections-and-schemas/update-a-collection#get-a-property) in the Update a collection guide for more information on using this operation. * * The role that performs this operation must have the `CapCollectionsReader` capability. * See [Access control](/data-security/identity-and-access-management#access-control) for more information about how * capabilities control access to operations. * @returns Property The request is successful. * @throws ApiError */ getCollectionProperty({ collection, property, customAudit, additionalHeaders, }: { collection: string; /** * The name of the property. */ property: string; /** * Custom audit information to be included in the audit log. */ customAudit?: string; additionalHeaders?: Record<string, string>; }): CancelablePromise<Property>; /** * Update collection property * Updates the attributes of a collection property. Can update these property attributes: * * `description` * * `is_index` * * `is_substring_index` (only from `true` to `false`) * * `is_nullable` (only from `false` to `true`) * * `is_unique` (only from `true` to `false`) * * :::info * This command may take a while to complete (e.g., when adding an index) and is excluded from Vault's standard call timeout. * ::: * * See the [Update a property](/guides/manage-collections-and-schemas/update-a-collection#update-a-property) in the Update a collection guide for more information on using this operation. * * The role that performs this operation must have the `CapCollectionsWriter` capability. * See [Access control](/data-security/identity-and-access-management#access-control) for more information about how * capabilities control access to operations. * @returns Property The request is successful. * @throws ApiError */ updateCollectionProperty({ collection, property, requestBody, customAudit, additionalHeaders, }: { collection: string; /** * The name of the property. */ property: string; /** * The property details to update. */ requestBody: UpdatePropertyRequest; /** * Custom audit information to be included in the audit log. */ customAudit?: string; additionalHeaders?: Record<string, string>; }): CancelablePromise<Property>; /** * Delete collection property * Deletes a property from a collection. * * Any values stored against the property in objects are also deleted. This operation is irreversible. * * See the [Delete a property](/guides/manage-collections-and-schemas/update-a-collection#delete-a-property) in the Update a collection guide for more information on using this operation. * * The role that performs this operation must have the `CapCollectionsWriter` capability. * See [Access control](/data-security/identity-and-access-management#access-control) for more information about how * capabilities control access to operations. * @returns any The request is successful. * @throws ApiError */ deleteCollectionProperty({ collection, property, customAudit, additionalHeaders, }: { collection: string; /** * The name of the property. */ property: string; /** * Custom audit information to be included in the audit log. */ customAudit?: string; additionalHeaders?: Record<string, string>; }): CancelablePromise<any>; } //# sourceMappingURL=CollectionPropertiesClient.d.ts.map