@prismicio/custom-types-client
Advanced tools
Comparing version 2.0.0-alpha.0 to 2.0.0-alpha.1
@@ -7,3 +7,3 @@ var __defProp = Object.defineProperty; | ||
}; | ||
import { MissingFetchError, NotFoundError, ConflictError, BulkUpdateHasExistingDocumentsError, ForbiddenError, UnauthorizedError, InvalidPayloadError, PrismicError } from "./errors.js"; | ||
import { MissingFetchError, NotFoundError, ConflictError, BulkUpdateHasExistingDocumentsError, ForbiddenError, UnauthorizedError, InvalidPayloadError, InvalidAPIResponse } from "./errors.js"; | ||
import { BulkUpdateTransaction } from "./bulkUpdate.js"; | ||
@@ -357,3 +357,5 @@ const DEFAULT_CUSTOM_TYPES_API_ENDPOINT = "https://customtypes.prismic.io"; | ||
} | ||
throw new PrismicError("An invalid API response was returned", { url }); | ||
throw new InvalidAPIResponse("An invalid API response was returned", { | ||
url | ||
}); | ||
} | ||
@@ -360,0 +362,0 @@ } |
@@ -63,2 +63,7 @@ /** | ||
/** | ||
* Represents an error when the Prismic Custom Types API response is invalid. | ||
*/ | ||
export declare class InvalidAPIResponse extends PrismicError { | ||
} | ||
/** | ||
* Represents an error when making an unauthorized Prismic Custom Types API | ||
@@ -65,0 +70,0 @@ * request. |
@@ -30,2 +30,4 @@ var __defProp = Object.defineProperty; | ||
} | ||
class InvalidAPIResponse extends PrismicError { | ||
} | ||
class UnauthorizedError extends PrismicError { | ||
@@ -49,2 +51,3 @@ } | ||
ForbiddenError, | ||
InvalidAPIResponse, | ||
InvalidPayloadError, | ||
@@ -51,0 +54,0 @@ MissingFetchError, |
@@ -5,3 +5,3 @@ export { createClient, CustomTypesClient } from "./client"; | ||
export type { BulkUpdateOperation, BulkUpdateTransactionModels, } from "./bulkUpdate"; | ||
export { PrismicError, ConflictError, ForbiddenError, UnauthorizedError, InvalidPayloadError, MissingFetchError, NotFoundError, } from "./errors"; | ||
export { BulkUpdateHasExistingDocumentsError, ConflictError, ForbiddenError, InvalidAPIResponse, InvalidPayloadError, MissingFetchError, NotFoundError, PrismicError, UnauthorizedError, } from "./errors"; | ||
export type { FetchLike, ResponseLike, RequestInitLike } from "./types"; |
import { CustomTypesClient, createClient } from "./client.js"; | ||
import { BulkUpdateOperationType, BulkUpdateTransaction, createBulkUpdateTransaction } from "./bulkUpdate.js"; | ||
import { ConflictError, ForbiddenError, InvalidPayloadError, MissingFetchError, NotFoundError, PrismicError, UnauthorizedError } from "./errors.js"; | ||
import { BulkUpdateHasExistingDocumentsError, ConflictError, ForbiddenError, InvalidAPIResponse, InvalidPayloadError, MissingFetchError, NotFoundError, PrismicError, UnauthorizedError } from "./errors.js"; | ||
export { | ||
BulkUpdateHasExistingDocumentsError, | ||
BulkUpdateOperationType, | ||
@@ -10,2 +11,3 @@ BulkUpdateTransaction, | ||
ForbiddenError, | ||
InvalidAPIResponse, | ||
InvalidPayloadError, | ||
@@ -12,0 +14,0 @@ MissingFetchError, |
{ | ||
"name": "@prismicio/custom-types-client", | ||
"version": "2.0.0-alpha.0", | ||
"version": "2.0.0-alpha.1", | ||
"description": "JavaScript client to interact with the Prismic Custom Types API", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -9,6 +9,6 @@ import type * as prismic from "@prismicio/client"; | ||
ForbiddenError, | ||
InvalidAPIResponse, | ||
InvalidPayloadError, | ||
MissingFetchError, | ||
NotFoundError, | ||
PrismicError, | ||
UnauthorizedError, | ||
@@ -612,4 +612,6 @@ } from "./errors"; | ||
throw new PrismicError("An invalid API response was returned", { url }); | ||
throw new InvalidAPIResponse("An invalid API response was returned", { | ||
url, | ||
}); | ||
} | ||
} |
@@ -76,2 +76,7 @@ /** | ||
/** | ||
* Represents an error when the Prismic Custom Types API response is invalid. | ||
*/ | ||
export class InvalidAPIResponse extends PrismicError {} | ||
/** | ||
* Represents an error when making an unauthorized Prismic Custom Types API | ||
@@ -78,0 +83,0 @@ * request. |
@@ -18,11 +18,13 @@ export { createClient, CustomTypesClient } from "./client"; | ||
export { | ||
PrismicError, | ||
BulkUpdateHasExistingDocumentsError, | ||
ConflictError, | ||
ForbiddenError, | ||
UnauthorizedError, | ||
InvalidAPIResponse, | ||
InvalidPayloadError, | ||
MissingFetchError, | ||
NotFoundError, | ||
PrismicError, | ||
UnauthorizedError, | ||
} from "./errors"; | ||
export type { FetchLike, ResponseLike, RequestInitLike } from "./types"; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
177365
2491
0