{"version":3,"file":"createClient.cjs","names":["Client"],"sources":["../src/createClient.ts"],"sourcesContent":["import type { ClientConfig } from \"./Client\"\nimport { Client } from \"./Client\"\nimport type { PrismicDocument } from \"./types/value/document\"\n\n/** Type definitions for the `createClient()` function. May be augmented by third-party libraries. */\nexport interface CreateClient {\n\t<TDocuments extends PrismicDocument>(\n\t\t...args: ConstructorParameters<typeof Client>\n\t): Client<TDocuments>\n}\n\n/**\n * Creates a Prismic client that can be used to query content from a repository.\n *\n * @example\n * \t;```ts\n * \t// With a repository name\n * \tcreateClient(\"my-repo\")\n *\n * \t// With a full Prismic Content API endpoint\n * \tcreateClient(\"https://my-repo.cdn.prismic.io/api/v2\")\n * \t```\n *\n * @typeParam TDocuments - A union of Prismic page and custom types for the\n * repository.\n * @param repositoryNameOrEndpoint - The Prismic repository name or full Content API endpoint for\n *   the repository.\n * @param options - Configuration that determines how content will be queried from the Prismic\n *   repository.\n * @returns A client that can query content from the repository.\n * @see https://prismic.io/docs/technical-reference/prismicio-client/v7\n */\nexport const createClient: CreateClient = <TDocuments extends PrismicDocument>(\n\trepositoryNameOrEndpoint: string,\n\toptions?: ClientConfig,\n) => new Client<TDocuments>(repositoryNameOrEndpoint, options)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAgCA,MAAa,gBACZ,0BACA,YACI,IAAIA,eAAAA,OAAmB,0BAA0B,QAAQ"}