import { type Collection, type CollectionPayload, type XScalarEnvironment } from '@scalar/oas-utils/entities/spec'; import type { Workspace } from '@scalar/oas-utils/entities/workspace'; import type { StoreContext } from '../store/store-context'; /** Initiate the workspace collections */ export declare function createStoreCollections(useLocalStorage: boolean): { collections: Record[]; 'x-scalar-icon': string; uid: string & import("zod").$brand<"collection">; securitySchemes: string[]; selectedSecuritySchemeUids: ((string & import("zod").$brand<"securityScheme">) | (string & import("zod").$brand<"securityScheme">)[])[]; servers: (string & import("zod").$brand<"server">)[]; requests: (string & import("zod").$brand<"operation">)[]; tags: (string & import("zod").$brand<"tag">)[]; children: ((string & import("zod").$brand<"operation">) | (string & import("zod").$brand<"tag">))[]; watchMode: boolean; useCollectionSecurity: boolean; watchModeStatus: "IDLE" | "WATCHING" | "ERROR"; jsonSchemaDialect?: string | undefined; externalDocs?: { url: string; description?: string | undefined; } | undefined; components?: Record | undefined; webhooks?: Record | undefined; 'x-scalar-active-environment'?: string | undefined; 'x-scalar-environments'?: Record; description?: string | undefined; color?: string | undefined; }> | undefined; 'x-scalar-secrets'?: Record | undefined; selectedServerUid?: (string & import("zod").$brand<"server">) | undefined; documentUrl?: string | undefined; integration?: string | null | undefined; }>; collectionMutators: { add: (item: { type: "collection"; openapi: string; info: { title: string; version: string; summary?: string | undefined; description?: string | undefined; termsOfService?: string | undefined; contact?: { name?: string | undefined; url?: string | undefined; email?: string | undefined; } | undefined; license?: { name?: string | null | undefined; identifier?: string | undefined; url?: string | undefined; } | undefined; 'x-scalar-sdk-installation'?: { lang: string; source?: string | undefined; description?: string | undefined; }[] | undefined; }; security: Record[]; 'x-scalar-icon': string; uid: string & import("zod").$brand<"collection">; securitySchemes: string[]; selectedSecuritySchemeUids: ((string & import("zod").$brand<"securityScheme">) | (string & import("zod").$brand<"securityScheme">)[])[]; servers: (string & import("zod").$brand<"server">)[]; requests: (string & import("zod").$brand<"operation">)[]; tags: (string & import("zod").$brand<"tag">)[]; children: ((string & import("zod").$brand<"operation">) | (string & import("zod").$brand<"tag">))[]; watchMode: boolean; useCollectionSecurity: boolean; watchModeStatus: "IDLE" | "WATCHING" | "ERROR"; jsonSchemaDialect?: string | undefined; externalDocs?: { url: string; description?: string | undefined; } | undefined; components?: Record | undefined; webhooks?: Record | undefined; 'x-scalar-active-environment'?: string | undefined; 'x-scalar-environments'?: Record; description?: string | undefined; color?: string | undefined; }> | undefined; 'x-scalar-secrets'?: Record | undefined; selectedServerUid?: (string & import("zod").$brand<"server">) | undefined; documentUrl?: string | undefined; integration?: string | null | undefined; }) => void; delete: (uid: (string & import("zod").$brand<"collection">) | null | undefined) => void; set: (item: { type: "collection"; openapi: string; info: { title: string; version: string; summary?: string | undefined; description?: string | undefined; termsOfService?: string | undefined; contact?: { name?: string | undefined; url?: string | undefined; email?: string | undefined; } | undefined; license?: { name?: string | null | undefined; identifier?: string | undefined; url?: string | undefined; } | undefined; 'x-scalar-sdk-installation'?: { lang: string; source?: string | undefined; description?: string | undefined; }[] | undefined; }; security: Record[]; 'x-scalar-icon': string; uid: string & import("zod").$brand<"collection">; securitySchemes: string[]; selectedSecuritySchemeUids: ((string & import("zod").$brand<"securityScheme">) | (string & import("zod").$brand<"securityScheme">)[])[]; servers: (string & import("zod").$brand<"server">)[]; requests: (string & import("zod").$brand<"operation">)[]; tags: (string & import("zod").$brand<"tag">)[]; children: ((string & import("zod").$brand<"operation">) | (string & import("zod").$brand<"tag">))[]; watchMode: boolean; useCollectionSecurity: boolean; watchModeStatus: "IDLE" | "WATCHING" | "ERROR"; jsonSchemaDialect?: string | undefined; externalDocs?: { url: string; description?: string | undefined; } | undefined; components?: Record | undefined; webhooks?: Record | undefined; 'x-scalar-active-environment'?: string | undefined; 'x-scalar-environments'?: Record; description?: string | undefined; color?: string | undefined; }> | undefined; 'x-scalar-secrets'?: Record | undefined; selectedServerUid?: (string & import("zod").$brand<"server">) | undefined; documentUrl?: string | undefined; integration?: string | null | undefined; }) => void; edit:

(uid: (string & import("zod").$brand<"collection">) | null | undefined, path: P, value: P extends "servers" | "externalDocs" | "security" | "tags" | "type" | "uid" | "selectedServerUid" | "selectedSecuritySchemeUids" | "securitySchemes" | "openapi" | "jsonSchemaDialect" | "info" | "components" | "webhooks" | "x-scalar-icon" | "x-scalar-active-environment" | "x-scalar-environments" | "x-scalar-secrets" | "requests" | "children" | "documentUrl" | "watchMode" | "integration" | "useCollectionSecurity" | "watchModeStatus" ? { type: "collection"; openapi: string; info: { title: string; version: string; summary?: string | undefined; description?: string | undefined; termsOfService?: string | undefined; contact?: { name?: string | undefined; url?: string | undefined; email?: string | undefined; } | undefined; license?: { name?: string | null | undefined; identifier?: string | undefined; url?: string | undefined; } | undefined; 'x-scalar-sdk-installation'?: { lang: string; source?: string | undefined; description?: string | undefined; }[] | undefined; }; security: Record[]; 'x-scalar-icon': string; uid: string & import("zod").$brand<"collection">; securitySchemes: string[]; selectedSecuritySchemeUids: ((string & import("zod").$brand<"securityScheme">) | (string & import("zod").$brand<"securityScheme">)[])[]; servers: (string & import("zod").$brand<"server">)[]; requests: (string & import("zod").$brand<"operation">)[]; tags: (string & import("zod").$brand<"tag">)[]; children: ((string & import("zod").$brand<"operation">) | (string & import("zod").$brand<"tag">))[]; watchMode: boolean; useCollectionSecurity: boolean; watchModeStatus: "IDLE" | "WATCHING" | "ERROR"; jsonSchemaDialect?: string | undefined; externalDocs?: { url: string; description?: string | undefined; } | undefined; components?: Record | undefined; webhooks?: Record | undefined; 'x-scalar-active-environment'?: string | undefined; 'x-scalar-environments'?: Record; description?: string | undefined; color?: string | undefined; }> | undefined; 'x-scalar-secrets'?: Record | undefined; selectedServerUid?: (string & import("zod").$brand<"server">) | undefined; documentUrl?: string | undefined; integration?: string | null | undefined; }[P] : P extends `${infer K}.${infer R}` ? K extends "servers" | "externalDocs" | "security" | "tags" | "type" | "uid" | "selectedServerUid" | "selectedSecuritySchemeUids" | "securitySchemes" | "openapi" | "jsonSchemaDialect" | "info" | "components" | "webhooks" | "x-scalar-icon" | "x-scalar-active-environment" | "x-scalar-environments" | "x-scalar-secrets" | "requests" | "children" | "documentUrl" | "watchMode" | "integration" | "useCollectionSecurity" | "watchModeStatus" ? R extends import("@scalar/object-utils/nested").Path<{ type: "collection"; openapi: string; info: { title: string; version: string; summary?: string | undefined; description?: string | undefined; termsOfService?: string | undefined; contact?: { name?: string | undefined; url?: string | undefined; email?: string | undefined; } | undefined; license?: { name?: string | null | undefined; identifier?: string | undefined; url?: string | undefined; } | undefined; 'x-scalar-sdk-installation'?: { lang: string; source?: string | undefined; description?: string | undefined; }[] | undefined; }; security: Record[]; 'x-scalar-icon': string; uid: string & import("zod").$brand<"collection">; securitySchemes: string[]; selectedSecuritySchemeUids: ((string & import("zod").$brand<"securityScheme">) | (string & import("zod").$brand<"securityScheme">)[])[]; servers: (string & import("zod").$brand<"server">)[]; requests: (string & import("zod").$brand<"operation">)[]; tags: (string & import("zod").$brand<"tag">)[]; children: ((string & import("zod").$brand<"operation">) | (string & import("zod").$brand<"tag">))[]; watchMode: boolean; useCollectionSecurity: boolean; watchModeStatus: "IDLE" | "WATCHING" | "ERROR"; jsonSchemaDialect?: string | undefined; externalDocs?: { url: string; description?: string | undefined; } | undefined; components?: Record | undefined; webhooks?: Record | undefined; 'x-scalar-active-environment'?: string | undefined; 'x-scalar-environments'?: Record; description?: string | undefined; color?: string | undefined; }> | undefined; 'x-scalar-secrets'?: Record | undefined; selectedServerUid?: (string & import("zod").$brand<"server">) | undefined; documentUrl?: string | undefined; integration?: string | null | undefined; }[K]> ? import("@scalar/object-utils/nested").PathValue<{ type: "collection"; openapi: string; info: { title: string; version: string; summary?: string | undefined; description?: string | undefined; termsOfService?: string | undefined; contact?: { name?: string | undefined; url?: string | undefined; email?: string | undefined; } | undefined; license?: { name?: string | null | undefined; identifier?: string | undefined; url?: string | undefined; } | undefined; 'x-scalar-sdk-installation'?: { lang: string; source?: string | undefined; description?: string | undefined; }[] | undefined; }; security: Record[]; 'x-scalar-icon': string; uid: string & import("zod").$brand<"collection">; securitySchemes: string[]; selectedSecuritySchemeUids: ((string & import("zod").$brand<"securityScheme">) | (string & import("zod").$brand<"securityScheme">)[])[]; servers: (string & import("zod").$brand<"server">)[]; requests: (string & import("zod").$brand<"operation">)[]; tags: (string & import("zod").$brand<"tag">)[]; children: ((string & import("zod").$brand<"operation">) | (string & import("zod").$brand<"tag">))[]; watchMode: boolean; useCollectionSecurity: boolean; watchModeStatus: "IDLE" | "WATCHING" | "ERROR"; jsonSchemaDialect?: string | undefined; externalDocs?: { url: string; description?: string | undefined; } | undefined; components?: Record | undefined; webhooks?: Record | undefined; 'x-scalar-active-environment'?: string | undefined; 'x-scalar-environments'?: Record; description?: string | undefined; color?: string | undefined; }> | undefined; 'x-scalar-secrets'?: Record | undefined; selectedServerUid?: (string & import("zod").$brand<"server">) | undefined; documentUrl?: string | undefined; integration?: string | null | undefined; }[K], R> : never : K extends `${number}` ? never : never : P extends `${number}` ? never : never) => void; untrackedEdit:

(uid: string & import("zod").$brand<"collection">, path: P, value: P extends "servers" | "externalDocs" | "security" | "tags" | "type" | "uid" | "selectedServerUid" | "selectedSecuritySchemeUids" | "securitySchemes" | "openapi" | "jsonSchemaDialect" | "info" | "components" | "webhooks" | "x-scalar-icon" | "x-scalar-active-environment" | "x-scalar-environments" | "x-scalar-secrets" | "requests" | "children" | "documentUrl" | "watchMode" | "integration" | "useCollectionSecurity" | "watchModeStatus" ? { type: "collection"; openapi: string; info: { title: string; version: string; summary?: string | undefined; description?: string | undefined; termsOfService?: string | undefined; contact?: { name?: string | undefined; url?: string | undefined; email?: string | undefined; } | undefined; license?: { name?: string | null | undefined; identifier?: string | undefined; url?: string | undefined; } | undefined; 'x-scalar-sdk-installation'?: { lang: string; source?: string | undefined; description?: string | undefined; }[] | undefined; }; security: Record[]; 'x-scalar-icon': string; uid: string & import("zod").$brand<"collection">; securitySchemes: string[]; selectedSecuritySchemeUids: ((string & import("zod").$brand<"securityScheme">) | (string & import("zod").$brand<"securityScheme">)[])[]; servers: (string & import("zod").$brand<"server">)[]; requests: (string & import("zod").$brand<"operation">)[]; tags: (string & import("zod").$brand<"tag">)[]; children: ((string & import("zod").$brand<"operation">) | (string & import("zod").$brand<"tag">))[]; watchMode: boolean; useCollectionSecurity: boolean; watchModeStatus: "IDLE" | "WATCHING" | "ERROR"; jsonSchemaDialect?: string | undefined; externalDocs?: { url: string; description?: string | undefined; } | undefined; components?: Record | undefined; webhooks?: Record | undefined; 'x-scalar-active-environment'?: string | undefined; 'x-scalar-environments'?: Record; description?: string | undefined; color?: string | undefined; }> | undefined; 'x-scalar-secrets'?: Record | undefined; selectedServerUid?: (string & import("zod").$brand<"server">) | undefined; documentUrl?: string | undefined; integration?: string | null | undefined; }[P] : P extends `${infer K}.${infer R}` ? K extends "servers" | "externalDocs" | "security" | "tags" | "type" | "uid" | "selectedServerUid" | "selectedSecuritySchemeUids" | "securitySchemes" | "openapi" | "jsonSchemaDialect" | "info" | "components" | "webhooks" | "x-scalar-icon" | "x-scalar-active-environment" | "x-scalar-environments" | "x-scalar-secrets" | "requests" | "children" | "documentUrl" | "watchMode" | "integration" | "useCollectionSecurity" | "watchModeStatus" ? R extends import("@scalar/object-utils/nested").Path<{ type: "collection"; openapi: string; info: { title: string; version: string; summary?: string | undefined; description?: string | undefined; termsOfService?: string | undefined; contact?: { name?: string | undefined; url?: string | undefined; email?: string | undefined; } | undefined; license?: { name?: string | null | undefined; identifier?: string | undefined; url?: string | undefined; } | undefined; 'x-scalar-sdk-installation'?: { lang: string; source?: string | undefined; description?: string | undefined; }[] | undefined; }; security: Record[]; 'x-scalar-icon': string; uid: string & import("zod").$brand<"collection">; securitySchemes: string[]; selectedSecuritySchemeUids: ((string & import("zod").$brand<"securityScheme">) | (string & import("zod").$brand<"securityScheme">)[])[]; servers: (string & import("zod").$brand<"server">)[]; requests: (string & import("zod").$brand<"operation">)[]; tags: (string & import("zod").$brand<"tag">)[]; children: ((string & import("zod").$brand<"operation">) | (string & import("zod").$brand<"tag">))[]; watchMode: boolean; useCollectionSecurity: boolean; watchModeStatus: "IDLE" | "WATCHING" | "ERROR"; jsonSchemaDialect?: string | undefined; externalDocs?: { url: string; description?: string | undefined; } | undefined; components?: Record | undefined; webhooks?: Record | undefined; 'x-scalar-active-environment'?: string | undefined; 'x-scalar-environments'?: Record; description?: string | undefined; color?: string | undefined; }> | undefined; 'x-scalar-secrets'?: Record | undefined; selectedServerUid?: (string & import("zod").$brand<"server">) | undefined; documentUrl?: string | undefined; integration?: string | null | undefined; }[K]> ? import("@scalar/object-utils/nested").PathValue<{ type: "collection"; openapi: string; info: { title: string; version: string; summary?: string | undefined; description?: string | undefined; termsOfService?: string | undefined; contact?: { name?: string | undefined; url?: string | undefined; email?: string | undefined; } | undefined; license?: { name?: string | null | undefined; identifier?: string | undefined; url?: string | undefined; } | undefined; 'x-scalar-sdk-installation'?: { lang: string; source?: string | undefined; description?: string | undefined; }[] | undefined; }; security: Record[]; 'x-scalar-icon': string; uid: string & import("zod").$brand<"collection">; securitySchemes: string[]; selectedSecuritySchemeUids: ((string & import("zod").$brand<"securityScheme">) | (string & import("zod").$brand<"securityScheme">)[])[]; servers: (string & import("zod").$brand<"server">)[]; requests: (string & import("zod").$brand<"operation">)[]; tags: (string & import("zod").$brand<"tag">)[]; children: ((string & import("zod").$brand<"operation">) | (string & import("zod").$brand<"tag">))[]; watchMode: boolean; useCollectionSecurity: boolean; watchModeStatus: "IDLE" | "WATCHING" | "ERROR"; jsonSchemaDialect?: string | undefined; externalDocs?: { url: string; description?: string | undefined; } | undefined; components?: Record | undefined; webhooks?: Record | undefined; 'x-scalar-active-environment'?: string | undefined; 'x-scalar-environments'?: Record; description?: string | undefined; color?: string | undefined; }> | undefined; 'x-scalar-secrets'?: Record | undefined; selectedServerUid?: (string & import("zod").$brand<"server">) | undefined; documentUrl?: string | undefined; integration?: string | null | undefined; }[K], R> : never : K extends `${number}` ? never : never : P extends `${number}` ? never : never) => void; undo: (uid: string & import("zod").$brand<"collection">) => void; redo: (uid: string & import("zod").$brand<"collection">) => void; reset: () => void; }; }; /** Extended mutators and data for collections that required workspace access */ export declare function extendedCollectionDataFactory({ requests, requestMutators, requestExamples, requestExampleMutators, workspaces, workspaceMutators, collections, collectionMutators, tagMutators, serverMutators, }: StoreContext): { addCollection: (payload: CollectionPayload, workspaceUid: Workspace["uid"]) => { type: "collection"; openapi: string; info: { title: string; version: string; summary?: string | undefined; description?: string | undefined; termsOfService?: string | undefined; contact?: { name?: string | undefined; url?: string | undefined; email?: string | undefined; } | undefined; license?: { name?: string | null | undefined; identifier?: string | undefined; url?: string | undefined; } | undefined; 'x-scalar-sdk-installation'?: { lang: string; source?: string | undefined; description?: string | undefined; }[] | undefined; }; security: Record[]; 'x-scalar-icon': string; uid: string & import("zod").$brand<"collection">; securitySchemes: string[]; selectedSecuritySchemeUids: ((string & import("zod").$brand<"securityScheme">) | (string & import("zod").$brand<"securityScheme">)[])[]; servers: (string & import("zod").$brand<"server">)[]; requests: (string & import("zod").$brand<"operation">)[]; tags: (string & import("zod").$brand<"tag">)[]; children: ((string & import("zod").$brand<"operation">) | (string & import("zod").$brand<"tag">))[]; watchMode: boolean; useCollectionSecurity: boolean; watchModeStatus: "IDLE" | "WATCHING" | "ERROR"; jsonSchemaDialect?: string | undefined; externalDocs?: { url: string; description?: string | undefined; } | undefined; components?: Record | undefined; webhooks?: Record | undefined; 'x-scalar-active-environment'?: string | undefined; 'x-scalar-environments'?: Record; description?: string | undefined; color?: string | undefined; }> | undefined; 'x-scalar-secrets'?: Record | undefined; selectedServerUid?: (string & import("zod").$brand<"server">) | undefined; documentUrl?: string | undefined; integration?: string | null | undefined; }; deleteCollection: (collection: Collection, workspace: Workspace) => void; addCollectionEnvironment: (environmentName: string, environment: XScalarEnvironment, collectionUid: Collection["uid"]) => void; removeCollectionEnvironment: (environmentName: string, collectionUid: Collection["uid"]) => void; }; //# sourceMappingURL=collections.d.ts.map