@prismicio/client
Version:
The official JavaScript + TypeScript client library for Prismic
23 lines • 733 B
TypeScript
//#region src/getRepositoryEndpoint.d.ts
/**
* Get a repository's Prismic Content API endpoint.
*
* @example
*
* ```ts
* getRepositoryEndpoint("my-repo")
* // => "https://my-repo.cdn.prismic.io/api/v2"
* ```
*
* @typeParam RepositoryName - Name of the Prismic repository.
*
* @param repositoryName - Name of the repository.
*
* @returns The repository's Prismic Content API endpoint.
*
* @throws {@link Error} Thrown if an invalid repository name is provided.
*/
declare const getRepositoryEndpoint: <RepositoryName extends string>(repositoryName: RepositoryName) => `https://${RepositoryName}.cdn.prismic.io/api/v2`;
//#endregion
export { getRepositoryEndpoint };
//# sourceMappingURL=getRepositoryEndpoint.d.ts.map