import { APIResource } from "../../resource.js"; import * as Core from "../../core.js"; import * as BlockTypesAPI from "./block-types.js"; import * as BlockDocumentsAPI from "./block-documents.js"; import * as SlugAPI from "./slug/slug.js"; export declare class BlockTypes extends APIResource { slug: SlugAPI.Slug; blockDocuments: BlockDocumentsAPI.BlockDocuments; /** * Create a new block type */ create(params: BlockTypeCreateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Get a block type by ID. */ retrieve(id: string, params?: BlockTypeRetrieveParams, options?: Core.RequestOptions): Core.APIPromise; retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise; /** * Update a block type. */ update(id: string, params: BlockTypeUpdateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Delete Block Type */ delete(id: string, params?: BlockTypeDeleteParams, options?: Core.RequestOptions): Core.APIPromise; delete(id: string, options?: Core.RequestOptions): Core.APIPromise; /** * Gets all block types. Optionally limit return with limit and offset. */ filter(params?: BlockTypeFilterParams, options?: Core.RequestOptions): Core.APIPromise; filter(options?: Core.RequestOptions): Core.APIPromise; /** * Install System Block Types */ installSystemBlockTypes(params?: BlockTypeInstallSystemBlockTypesParams, options?: Core.RequestOptions): Core.APIPromise; installSystemBlockTypes(options?: Core.RequestOptions): Core.APIPromise; } /** * An ORM representation of a block type */ export interface BlockType { /** * A block type's name */ name: string; /** * A block type's slug */ slug: string; id?: string; /** * A code snippet demonstrating use of the corresponding block */ code_example?: string | null; created?: string | null; /** * A short blurb about the corresponding block's intended use */ description?: string | null; /** * Web URL for the block type's documentation */ documentation_url?: string | null; /** * Protected block types cannot be modified via API. */ is_protected?: boolean; /** * Web URL for the block type's logo */ logo_url?: string | null; updated?: string | null; } export type BlockTypeFilterResponse = Array; export type BlockTypeInstallSystemBlockTypesResponse = unknown; export interface BlockTypeCreateParams { /** * Body param: A block type's name */ name: string; /** * Body param: A block type's slug */ slug: string; /** * Body param: A code snippet demonstrating use of the corresponding block */ code_example?: string | null; /** * Body param: A short blurb about the corresponding block's intended use */ description?: string | null; /** * Body param: Web URL for the block type's documentation */ documentation_url?: string | null; /** * Body param: Web URL for the block type's logo */ logo_url?: string | null; /** * Header param: */ 'x-prefect-api-version'?: string; } export interface BlockTypeRetrieveParams { 'x-prefect-api-version'?: string; } export interface BlockTypeUpdateParams { /** * Body param: */ code_example?: string | null; /** * Body param: */ description?: string | null; /** * Body param: */ documentation_url?: string | null; /** * Body param: */ logo_url?: string | null; /** * Header param: */ 'x-prefect-api-version'?: string; } export interface BlockTypeDeleteParams { 'x-prefect-api-version'?: string; } export interface BlockTypeFilterParams { /** * Body param: Filter BlockSchemas */ block_schemas?: BlockTypeFilterParams.BlockSchemas | null; /** * Body param: Filter BlockTypes */ block_types?: BlockTypeFilterParams.BlockTypes | null; /** * Body param: Defaults to PREFECT_API_DEFAULT_LIMIT if not provided. */ limit?: number; /** * Body param: */ offset?: number; /** * Header param: */ 'x-prefect-api-version'?: string; } export declare namespace BlockTypeFilterParams { /** * 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 BlockTypeInstallSystemBlockTypesParams { 'x-prefect-api-version'?: string; } export declare namespace BlockTypes { export import BlockType = BlockTypesAPI.BlockType; export import BlockTypeFilterResponse = BlockTypesAPI.BlockTypeFilterResponse; export import BlockTypeInstallSystemBlockTypesResponse = BlockTypesAPI.BlockTypeInstallSystemBlockTypesResponse; export import BlockTypeCreateParams = BlockTypesAPI.BlockTypeCreateParams; export import BlockTypeRetrieveParams = BlockTypesAPI.BlockTypeRetrieveParams; export import BlockTypeUpdateParams = BlockTypesAPI.BlockTypeUpdateParams; export import BlockTypeDeleteParams = BlockTypesAPI.BlockTypeDeleteParams; export import BlockTypeFilterParams = BlockTypesAPI.BlockTypeFilterParams; export import BlockTypeInstallSystemBlockTypesParams = BlockTypesAPI.BlockTypeInstallSystemBlockTypesParams; export import Slug = SlugAPI.Slug; export import SlugRetrieveParams = SlugAPI.SlugRetrieveParams; export import BlockDocuments = BlockDocumentsAPI.BlockDocuments; export import BlockDocumentRetrieveParams = BlockDocumentsAPI.BlockDocumentRetrieveParams; } //# sourceMappingURL=block-types.d.ts.map