import type { RequestOptions } from "../base-client";
import type { RequestBuilder } from "../request-builder";
/** Registry catalog — a named collection of registry items. */
export type RegistryCatalog = {
    id: string;
    name: string;
    slug: string;
    scope: "platform" | "application";
    framework: "vue" | "react" | "svelte";
    description?: string;
    homepage?: string;
    application_id?: string;
    inserted_at: string;
    updated_at: string;
};
/** Registry item — a single component definition in a catalog. */
export type RegistryItem = {
    id: string;
    name: string;
    item_type: "component" | "block" | "hook" | "ui" | "page" | "lib" | "theme" | "style" | "base" | "font" | "file" | "item";
    title: string;
    description?: string;
    status: "draft" | "published" | "deprecated";
    min_sdk_version?: string;
    sdk_package: "client" | "admin" | "both" | "none";
    tags: string[];
    active_version_id?: string;
    catalog_id: string;
    inserted_at: string;
    updated_at: string;
};
/** Registry version — immutable snapshot of a registry item. */
export type RegistryVersion = {
    id: string;
    version: string;
    registry_item_json: Record<string, unknown>;
    changelog?: string;
    min_sdk_version?: string;
    checksum: string;
    registry_item_id: string;
    inserted_at: string;
    updated_at: string;
};
/** Attributes for creating a registry item. */
export type CreateRegistryItemAttributes = {
    catalog_id: string;
    name: string;
    item_type: RegistryItem["item_type"];
    title: string;
    description?: string;
    status?: RegistryItem["status"];
    min_sdk_version?: string;
    sdk_package?: RegistryItem["sdk_package"];
    tags?: string[];
};
/** Attributes for updating a registry item. */
export type UpdateRegistryItemAttributes = {
    title?: string;
    description?: string;
    min_sdk_version?: string;
    sdk_package?: RegistryItem["sdk_package"];
    tags?: string[];
    status?: RegistryItem["status"];
    /**
     * Set the active version directly. Prefer `versions.activate()` instead —
     * it performs ownership validation and broadcasts publish events.
     */
    active_version_id?: string;
};
/** Attributes for creating a registry version. */
export type CreateRegistryVersionAttributes = {
    version: string;
    registry_item_json: Record<string, unknown>;
    changelog?: string;
    min_sdk_version?: string;
};
/** Filter options for listing registry items. */
export type ListItemsOptions = {
    catalog_id?: string;
    status?: RegistryItem["status"];
};
/** Filter options for listing catalogs. */
export type ListCatalogsOptions = {
    scope?: RegistryCatalog["scope"];
    framework?: RegistryCatalog["framework"];
};
/**
 * Creates the `registry` namespace for the admin SDK.
 *
 * Provides full platform-level access to registry catalogs, items,
 * and versions for component distribution management.
 *
 * @param rb - The RequestBuilder bound to the authenticated admin client.
 * @returns An object with items and catalogs sub-namespaces.
 *
 * @example
 * ```ts
 * const admin = new GptAdmin({ apiKey: 'sk_srv_...' });
 * const items = await admin.registry.items.list();
 * const catalog = await admin.registry.catalogs.get(catalogId);
 * ```
 */
export declare function createRegistryNamespace(rb: RequestBuilder): {
    items: {
        /**
         * Lists all registry items, optionally filtered.
         *
         * @param filters - Optional filters (catalog_id, status).
         * @param options - Optional request options.
         * @returns Array of RegistryItem objects.
         *
         * @example
         * ```ts
         * const items = await admin.registry.items.list({ catalog_id: '...' });
         * ```
         */
        list: (filters?: ListItemsOptions, options?: RequestOptions) => Promise<RegistryItem[]>;
        /**
         * Fetches a single registry item by ID.
         *
         * @param id - The UUID of the registry item.
         * @param options - Optional request options.
         * @returns The RegistryItem record.
         *
         * @example
         * ```ts
         * const item = await admin.registry.items.get('uuid...');
         * ```
         */
        get: (id: string, options?: RequestOptions) => Promise<RegistryItem>;
        /**
         * Fetches a registry item by its kebab-case name.
         *
         * @param name - The kebab-case name of the item (e.g., "data-table").
         * @param filters - Optional catalog_id filter.
         * @param options - Optional request options.
         * @returns The RegistryItem record.
         *
         * @example
         * ```ts
         * const item = await admin.registry.items.getByName('data-table');
         * ```
         */
        getByName: (name: string, filters?: {
            catalog_id?: string;
        }, options?: RequestOptions) => Promise<RegistryItem>;
        /**
         * Creates a new registry item.
         *
         * @param attributes - The item attributes.
         * @param options - Optional request options.
         * @returns The created RegistryItem.
         *
         * @example
         * ```ts
         * const item = await admin.registry.items.create({
         *   catalog_id: '...',
         *   name: 'my-component',
         *   item_type: 'component',
         *   title: 'My Component',
         * });
         * ```
         */
        create: (attributes: CreateRegistryItemAttributes, options?: RequestOptions) => Promise<RegistryItem>;
        /**
         * Updates a registry item's metadata.
         *
         * @param id - The UUID of the registry item.
         * @param attributes - The attributes to update.
         * @param options - Optional request options.
         * @returns The updated RegistryItem.
         *
         * @example
         * ```ts
         * const updated = await admin.registry.items.update(id, { title: 'New Title' });
         * ```
         */
        update: (id: string, attributes: UpdateRegistryItemAttributes, options?: RequestOptions) => Promise<RegistryItem>;
        /**
         * Deprecates a registry item (sets status to "deprecated").
         * The server never hard-deletes — all items are soft-deprecated.
         *
         * @param id - The UUID of the registry item.
         * @param options - Optional request options.
         * @returns The deprecated RegistryItem.
         *
         * @example
         * ```ts
         * const deprecated = await admin.registry.items.deprecate(id);
         * ```
         */
        deprecate: (id: string, options?: RequestOptions) => Promise<RegistryItem>;
        versions: {
            /**
             * Lists all versions for a registry item.
             *
             * @param itemId - The UUID of the parent registry item.
             * @param options - Optional request options.
             * @returns Array of RegistryVersion objects.
             *
             * @example
             * ```ts
             * const versions = await admin.registry.items.versions.list(itemId);
             * ```
             */
            list: (itemId: string, options?: RequestOptions) => Promise<RegistryVersion[]>;
            /**
             * Fetches a specific version by ID.
             *
             * @param itemId - The UUID of the parent registry item.
             * @param versionId - The UUID of the version.
             * @param options - Optional request options.
             * @returns The RegistryVersion record.
             *
             * @example
             * ```ts
             * const version = await admin.registry.items.versions.get(itemId, versionId);
             * ```
             */
            get: (itemId: string, versionId: string, options?: RequestOptions) => Promise<RegistryVersion>;
            /**
             * Creates a new version for a registry item.
             * Automatically sets the item's active_version_id and
             * transitions draft items to published.
             *
             * @param itemId - The UUID of the parent registry item.
             * @param attributes - Version attributes (version string, JSON payload).
             * @param options - Optional request options.
             * @returns The created RegistryVersion.
             *
             * @example
             * ```ts
             * const version = await admin.registry.items.versions.create(itemId, {
             *   version: '1.0.0',
             *   registry_item_json: { name: 'button', type: 'registry:ui', files: [...] },
             * });
             * ```
             */
            create: (itemId: string, attributes: CreateRegistryVersionAttributes, options?: RequestOptions) => Promise<RegistryVersion>;
            /**
             * Activates an existing version on its parent item.
             * Sets active_version_id and transitions draft items to published.
             *
             * @param itemId - The UUID of the parent registry item.
             * @param versionId - The UUID of the version to activate.
             * @param options - Optional request options.
             * @returns The updated RegistryItem with new active_version_id.
             *
             * @example
             * ```ts
             * const item = await admin.registry.items.versions.activate(itemId, versionId);
             * ```
             */
            activate: (itemId: string, versionId: string, options?: RequestOptions) => Promise<RegistryItem>;
        };
    };
    catalogs: {
        /**
         * Lists all registry catalogs, optionally filtered.
         *
         * @param filters - Optional filters (scope, framework).
         * @param options - Optional request options.
         * @returns Array of RegistryCatalog objects.
         *
         * @example
         * ```ts
         * const catalogs = await admin.registry.catalogs.list({ framework: 'vue' });
         * ```
         */
        list: (filters?: ListCatalogsOptions, options?: RequestOptions) => Promise<RegistryCatalog[]>;
        /**
         * Fetches a single catalog by ID.
         *
         * @param id - The UUID of the catalog.
         * @param options - Optional request options.
         * @returns The RegistryCatalog record.
         *
         * @example
         * ```ts
         * const catalog = await admin.registry.catalogs.get(catalogId);
         * ```
         */
        get: (id: string, options?: RequestOptions) => Promise<RegistryCatalog>;
    };
};
//# sourceMappingURL=registry.d.ts.map