import { APIResource } from "../resource.js"; import * as Core from "../core.js"; import * as BlockDocumentsAPI from "./block-documents.js"; import * as Shared from "./shared.js"; export declare class BlockDocuments extends APIResource { /** * Create a new block document. */ create(params: BlockDocumentCreateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Read Block Document By Id */ retrieve(id: string, params?: BlockDocumentRetrieveParams, options?: Core.RequestOptions): Core.APIPromise; retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise; /** * Update Block Document Data */ update(id: string, params: BlockDocumentUpdateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Delete Block Document */ delete(id: string, params?: BlockDocumentDeleteParams, options?: Core.RequestOptions): Core.APIPromise; delete(id: string, options?: Core.RequestOptions): Core.APIPromise; /** * Count block documents. */ count(params?: BlockDocumentCountParams, options?: Core.RequestOptions): Core.APIPromise; count(options?: Core.RequestOptions): Core.APIPromise; /** * Query for block documents. */ filter(params?: BlockDocumentFilterParams, options?: Core.RequestOptions): Core.APIPromise; filter(options?: Core.RequestOptions): Core.APIPromise; } export type BlockDocumentCountResponse = number; export type BlockDocumentFilterResponse = Array; export interface BlockDocumentCreateParams { /** * Body param: A block schema ID */ block_schema_id: string; /** * Body param: A block type ID */ block_type_id: string; /** * Body param: The block document's data */ data?: unknown; /** * Body param: Whether the block is anonymous (anonymous blocks are usually created * by Prefect automatically) */ is_anonymous?: boolean; /** * Body param: The block document's name. Not required for anonymous block * documents. */ name?: string | null; /** * Header param: */ 'x-prefect-api-version'?: string; } export interface BlockDocumentRetrieveParams { /** * Query param: Whether to include sensitive values in the block document. */ include_secrets?: boolean; /** * Header param: */ 'x-prefect-api-version'?: string; } export interface BlockDocumentUpdateParams { /** * Body param: A block schema ID */ block_schema_id?: string | null; /** * Body param: The block document's data */ data?: unknown; /** * Body param: */ merge_existing_data?: boolean; /** * Header param: */ 'x-prefect-api-version'?: string; } export interface BlockDocumentDeleteParams { 'x-prefect-api-version'?: string; } export interface BlockDocumentCountParams { /** * Body param: Filter BlockDocuments. Only BlockDocuments matching all criteria * will be returned */ block_documents?: BlockDocumentCountParams.BlockDocuments | null; /** * Body param: Filter BlockSchemas */ block_schemas?: BlockDocumentCountParams.BlockSchemas | null; /** * Body param: Filter BlockTypes */ block_types?: BlockDocumentCountParams.BlockTypes | null; /** * Header param: */ 'x-prefect-api-version'?: string; } export declare namespace BlockDocumentCountParams { /** * Filter BlockDocuments. Only BlockDocuments matching all criteria will be * returned */ interface BlockDocuments { /** * Filter by `BlockDocument.id`. */ id?: BlockDocuments.ID | null; /** * Filter by `BlockDocument.block_type_id`. */ block_type_id?: BlockDocuments.BlockTypeID | null; /** * Filter by `BlockDocument.is_anonymous`. */ is_anonymous?: BlockDocuments.IsAnonymous | null; /** * Filter by `BlockDocument.name`. */ name?: BlockDocuments.Name | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; } namespace BlockDocuments { /** * Filter by `BlockDocument.id`. */ interface ID { /** * A list of block ids to include */ any_?: Array | null; } /** * Filter by `BlockDocument.block_type_id`. */ interface BlockTypeID { /** * A list of block type ids to include */ any_?: Array | null; } /** * Filter by `BlockDocument.is_anonymous`. */ interface IsAnonymous { /** * Filter block documents for only those that are or are not anonymous. */ eq_?: boolean | null; } /** * Filter by `BlockDocument.name`. */ interface Name { /** * A list of block names to include */ any_?: Array | null; /** * A string to match block names against. This can include SQL wildcard characters * like `%` and `_`. */ like_?: string | null; } } /** * Filter BlockSchemas */ interface BlockSchemas { /** * Filter by BlockSchema.id */ id?: BlockSchemas.ID | null; /** * Filter by `BlockSchema.capabilities` */ block_capabilities?: BlockSchemas.BlockCapabilities | null; /** * Filter by `BlockSchema.block_type_id`. */ block_type_id?: BlockSchemas.BlockTypeID | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; /** * Filter by `BlockSchema.capabilities` */ version?: BlockSchemas.Version | null; } namespace BlockSchemas { /** * Filter by BlockSchema.id */ interface ID { /** * A list of IDs to include */ any_?: Array | null; } /** * Filter by `BlockSchema.capabilities` */ interface BlockCapabilities { /** * A list of block capabilities. Block entities will be returned only if an * associated block schema has a superset of the defined capabilities. */ all_?: Array | null; } /** * Filter by `BlockSchema.block_type_id`. */ interface BlockTypeID { /** * A list of block type ids to include */ any_?: Array | null; } /** * Filter by `BlockSchema.capabilities` */ interface Version { /** * A list of block schema versions. */ any_?: Array | null; } } /** * Filter BlockTypes */ interface BlockTypes { /** * Filter by `BlockType.name` */ name?: BlockTypes.Name | null; /** * Filter by `BlockType.slug` */ slug?: BlockTypes.Slug | null; } namespace BlockTypes { /** * Filter by `BlockType.name` */ interface Name { /** * A case-insensitive partial match. For example, passing 'marvin' will match * 'marvin', 'sad-Marvin', and 'marvin-robot'. */ like_?: string | null; } /** * Filter by `BlockType.slug` */ interface Slug { /** * A list of slugs to match */ any_?: Array | null; } } } export interface BlockDocumentFilterParams { /** * Body param: Filter BlockDocuments. Only BlockDocuments matching all criteria * will be returned */ block_documents?: BlockDocumentFilterParams.BlockDocuments | null; /** * Body param: Filter BlockSchemas */ block_schemas?: BlockDocumentFilterParams.BlockSchemas | null; /** * Body param: Filter BlockTypes */ block_types?: BlockDocumentFilterParams.BlockTypes | null; /** * Body param: Whether to include sensitive values in the block document. */ include_secrets?: boolean; /** * Body param: Defaults to PREFECT_API_DEFAULT_LIMIT if not provided. */ limit?: number; /** * Body param: */ offset?: number; /** * Body param: Defines block document sorting options. */ sort?: 'NAME_DESC' | 'NAME_ASC' | 'BLOCK_TYPE_AND_NAME_ASC' | null; /** * Header param: */ 'x-prefect-api-version'?: string; } export declare namespace BlockDocumentFilterParams { /** * Filter BlockDocuments. Only BlockDocuments matching all criteria will be * returned */ interface BlockDocuments { /** * Filter by `BlockDocument.id`. */ id?: BlockDocuments.ID | null; /** * Filter by `BlockDocument.block_type_id`. */ block_type_id?: BlockDocuments.BlockTypeID | null; /** * Filter by `BlockDocument.is_anonymous`. */ is_anonymous?: BlockDocuments.IsAnonymous | null; /** * Filter by `BlockDocument.name`. */ name?: BlockDocuments.Name | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; } namespace BlockDocuments { /** * Filter by `BlockDocument.id`. */ interface ID { /** * A list of block ids to include */ any_?: Array | null; } /** * Filter by `BlockDocument.block_type_id`. */ interface BlockTypeID { /** * A list of block type ids to include */ any_?: Array | null; } /** * Filter by `BlockDocument.is_anonymous`. */ interface IsAnonymous { /** * Filter block documents for only those that are or are not anonymous. */ eq_?: boolean | null; } /** * Filter by `BlockDocument.name`. */ interface Name { /** * A list of block names to include */ any_?: Array | null; /** * A string to match block names against. This can include SQL wildcard characters * like `%` and `_`. */ like_?: string | null; } } /** * Filter BlockSchemas */ interface BlockSchemas { /** * Filter by BlockSchema.id */ id?: BlockSchemas.ID | null; /** * Filter by `BlockSchema.capabilities` */ block_capabilities?: BlockSchemas.BlockCapabilities | null; /** * Filter by `BlockSchema.block_type_id`. */ block_type_id?: BlockSchemas.BlockTypeID | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; /** * Filter by `BlockSchema.capabilities` */ version?: BlockSchemas.Version | null; } namespace BlockSchemas { /** * Filter by BlockSchema.id */ interface ID { /** * A list of IDs to include */ any_?: Array | null; } /** * Filter by `BlockSchema.capabilities` */ interface BlockCapabilities { /** * A list of block capabilities. Block entities will be returned only if an * associated block schema has a superset of the defined capabilities. */ all_?: Array | null; } /** * Filter by `BlockSchema.block_type_id`. */ interface BlockTypeID { /** * A list of block type ids to include */ any_?: Array | null; } /** * Filter by `BlockSchema.capabilities` */ interface Version { /** * A list of block schema versions. */ any_?: Array | null; } } /** * Filter BlockTypes */ interface BlockTypes { /** * Filter by `BlockType.name` */ name?: BlockTypes.Name | null; /** * Filter by `BlockType.slug` */ slug?: BlockTypes.Slug | null; } namespace BlockTypes { /** * Filter by `BlockType.name` */ interface Name { /** * A case-insensitive partial match. For example, passing 'marvin' will match * 'marvin', 'sad-Marvin', and 'marvin-robot'. */ like_?: string | null; } /** * Filter by `BlockType.slug` */ interface Slug { /** * A list of slugs to match */ any_?: Array | null; } } } export declare namespace BlockDocuments { export import BlockDocumentCountResponse = BlockDocumentsAPI.BlockDocumentCountResponse; export import BlockDocumentFilterResponse = BlockDocumentsAPI.BlockDocumentFilterResponse; export import BlockDocumentCreateParams = BlockDocumentsAPI.BlockDocumentCreateParams; export import BlockDocumentRetrieveParams = BlockDocumentsAPI.BlockDocumentRetrieveParams; export import BlockDocumentUpdateParams = BlockDocumentsAPI.BlockDocumentUpdateParams; export import BlockDocumentDeleteParams = BlockDocumentsAPI.BlockDocumentDeleteParams; export import BlockDocumentCountParams = BlockDocumentsAPI.BlockDocumentCountParams; export import BlockDocumentFilterParams = BlockDocumentsAPI.BlockDocumentFilterParams; } //# sourceMappingURL=block-documents.d.ts.map