@basis-theory/react-elements 1.14.1 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/types/index.d.ts +23 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basis-theory/react-elements",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"repository": "https://github.com/basis-theory/react-elements",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"tag": "latest"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@basis-theory/web-elements": "1.
|
|
33
|
+
"@basis-theory/web-elements": "1.15.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
package/types/index.d.ts
CHANGED
|
@@ -552,6 +552,29 @@ export interface BasisTheoryInitOptions {
|
|
|
552
552
|
debug?: boolean;
|
|
553
553
|
}
|
|
554
554
|
export const basistheory: (apiKey: string, options?: BasisTheoryInitOptions) => Promise<BasisTheoryElements | undefined>;
|
|
555
|
+
export class BasisTheoryApiError extends Error {
|
|
556
|
+
readonly status: number;
|
|
557
|
+
readonly data?: unknown | undefined;
|
|
558
|
+
constructor(message: string, status: number, data?: unknown | undefined);
|
|
559
|
+
}
|
|
560
|
+
export class BasisTheoryValidationError<Details = Record<string, unknown>> extends Error {
|
|
561
|
+
readonly details: Details;
|
|
562
|
+
/**
|
|
563
|
+
* @deprecated use {@link details}
|
|
564
|
+
*/
|
|
565
|
+
readonly validation?: FieldError[] | undefined;
|
|
566
|
+
constructor(message: string, details: Details,
|
|
567
|
+
/**
|
|
568
|
+
* @deprecated use {@link details}
|
|
569
|
+
*/
|
|
570
|
+
validation?: FieldError[] | undefined);
|
|
571
|
+
}
|
|
572
|
+
export class HttpClientError extends Error {
|
|
573
|
+
readonly status: number;
|
|
574
|
+
readonly data?: unknown;
|
|
575
|
+
readonly headers?: unknown;
|
|
576
|
+
constructor(message: string, status: number, data?: unknown, headers?: unknown);
|
|
577
|
+
}
|
|
555
578
|
declare global {
|
|
556
579
|
interface Window {
|
|
557
580
|
basistheory?: typeof basistheory;
|