@prismicio/client
Version:
The official JavaScript + TypeScript client library for Prismic
24 lines (23 loc) • 971 B
JavaScript
const require_WriteClient = require("./WriteClient.cjs");
//#region src/createWriteClient.ts
/**
* Creates a Prismic client that can be used to query and write content to a repository.
*
* @remarks
* This client works in environments supporting File, Blob, and FormData, including Node.js 20 and
* later.
* @example
* ;```ts
* createWriteClient("qwerty", { writeToken: "***" })
* ```
*
* @typeParam TDocuments - A union of Prismic document types for the repository.
* @param repositoryName - The Prismic repository name for the repository.
* @param options - Configuration that determines how content will be queried from and written to
* the Prismic repository.
* @returns A client that can query and write content to the repository.
*/
const createWriteClient = (repositoryName, options) => new require_WriteClient.WriteClient(repositoryName, options);
//#endregion
exports.createWriteClient = createWriteClient;
//# sourceMappingURL=createWriteClient.cjs.map