{"version":3,"file":"createWriteClient.cjs","names":["WriteClient"],"sources":["../src/createWriteClient.ts"],"sourcesContent":["import type { PrismicDocument } from \"./types/value/document\"\nimport type { WriteClientConfig } from \"./WriteClient\"\nimport { WriteClient } from \"./WriteClient\"\n\n/**\n * Type definitions for the `createWriteClient()` function. May be augmented by third-party\n * libraries.\n */\nexport interface CreateWriteClient {\n\t<TDocuments extends PrismicDocument>(\n\t\t...args: ConstructorParameters<typeof WriteClient>\n\t): WriteClient<TDocuments>\n}\n\n/**\n * Creates a Prismic client that can be used to query and write content to a repository.\n *\n * @remarks\n *   This client works in environments supporting File, Blob, and FormData, including Node.js 20 and\n *   later.\n * @example\n * \t;```ts\n * \tcreateWriteClient(\"qwerty\", { writeToken: \"***\" })\n * \t```\n *\n * @typeParam TDocuments - A union of Prismic document types for the repository.\n * @param repositoryName - The Prismic repository name for the repository.\n * @param options - Configuration that determines how content will be queried from and written to\n *   the Prismic repository.\n * @returns A client that can query and write content to the repository.\n */\nexport const createWriteClient: CreateWriteClient = <TDocuments extends PrismicDocument>(\n\trepositoryName: string,\n\toptions: WriteClientConfig,\n) => new WriteClient<TDocuments>(repositoryName, options)\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA+BA,MAAa,qBACZ,gBACA,YACI,IAAIA,oBAAAA,YAAwB,gBAAgB,QAAQ"}