@barekey/sdk 0.1.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/LICENSE +28 -0
- package/README.md +21 -0
- package/dist/client.d.ts +41 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +302 -0
- package/dist/errors.d.ts +461 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +343 -0
- package/dist/handle.d.ts +20 -0
- package/dist/handle.d.ts.map +1 -0
- package/dist/handle.js +35 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/internal/cache.d.ts +13 -0
- package/dist/internal/cache.d.ts.map +1 -0
- package/dist/internal/cache.js +24 -0
- package/dist/internal/evaluate.d.ts +7 -0
- package/dist/internal/evaluate.d.ts.map +1 -0
- package/dist/internal/evaluate.js +176 -0
- package/dist/internal/http.d.ts +19 -0
- package/dist/internal/http.d.ts.map +1 -0
- package/dist/internal/http.js +92 -0
- package/dist/internal/node-runtime.d.ts +19 -0
- package/dist/internal/node-runtime.d.ts.map +1 -0
- package/dist/internal/node-runtime.js +422 -0
- package/dist/internal/requirements.d.ts +3 -0
- package/dist/internal/requirements.d.ts.map +1 -0
- package/dist/internal/requirements.js +40 -0
- package/dist/internal/runtime.d.ts +15 -0
- package/dist/internal/runtime.d.ts.map +1 -0
- package/dist/internal/runtime.js +135 -0
- package/dist/internal/ttl.d.ts +4 -0
- package/dist/internal/ttl.d.ts.map +1 -0
- package/dist/internal/ttl.js +30 -0
- package/dist/internal/typegen.d.ts +25 -0
- package/dist/internal/typegen.d.ts.map +1 -0
- package/dist/internal/typegen.js +75 -0
- package/dist/types.d.ts +130 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/generated.d.ts +16 -0
- package/index.d.ts +2 -0
- package/package.json +42 -0
- package/src/client.ts +422 -0
- package/src/errors.ts +420 -0
- package/src/handle.ts +67 -0
- package/src/index.ts +60 -0
- package/src/internal/cache.ts +33 -0
- package/src/internal/evaluate.ts +232 -0
- package/src/internal/http.ts +134 -0
- package/src/internal/node-runtime.ts +581 -0
- package/src/internal/requirements.ts +57 -0
- package/src/internal/runtime.ts +199 -0
- package/src/internal/ttl.ts +41 -0
- package/src/internal/typegen.ts +124 -0
- package/src/types.ts +189 -0
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,461 @@
|
|
|
1
|
+
import type { BarekeyErrorCode, BarekeyTemporalInstant } from "./types.js";
|
|
2
|
+
type BarekeyErrorInit = {
|
|
3
|
+
message?: string;
|
|
4
|
+
requestId?: string | null;
|
|
5
|
+
status?: number | null;
|
|
6
|
+
cause?: unknown;
|
|
7
|
+
};
|
|
8
|
+
export declare function docsUrlForErrorCode(code: BarekeyErrorCode): string;
|
|
9
|
+
export declare function formatBarekeyErrorMessage(code: BarekeyErrorCode, description: string): string;
|
|
10
|
+
export declare class BarekeyError extends Error {
|
|
11
|
+
readonly code: BarekeyErrorCode;
|
|
12
|
+
readonly docsUrl: string;
|
|
13
|
+
readonly requestId: string | null;
|
|
14
|
+
readonly status: number | null;
|
|
15
|
+
readonly cause: unknown;
|
|
16
|
+
constructor(input: {
|
|
17
|
+
code: BarekeyErrorCode;
|
|
18
|
+
name: string;
|
|
19
|
+
message: string;
|
|
20
|
+
requestId?: string | null;
|
|
21
|
+
status?: number | null;
|
|
22
|
+
cause?: unknown;
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
export declare const FsNotAvailableError: {
|
|
26
|
+
new (input?: BarekeyErrorInit): {
|
|
27
|
+
readonly code: BarekeyErrorCode;
|
|
28
|
+
readonly docsUrl: string;
|
|
29
|
+
readonly requestId: string | null;
|
|
30
|
+
readonly status: number | null;
|
|
31
|
+
readonly cause: unknown;
|
|
32
|
+
name: string;
|
|
33
|
+
message: string;
|
|
34
|
+
stack?: string;
|
|
35
|
+
};
|
|
36
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
37
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
38
|
+
stackTraceLimit: number;
|
|
39
|
+
};
|
|
40
|
+
export declare const NoConfigurationProvidedError: {
|
|
41
|
+
new (input?: BarekeyErrorInit): {
|
|
42
|
+
readonly code: BarekeyErrorCode;
|
|
43
|
+
readonly docsUrl: string;
|
|
44
|
+
readonly requestId: string | null;
|
|
45
|
+
readonly status: number | null;
|
|
46
|
+
readonly cause: unknown;
|
|
47
|
+
name: string;
|
|
48
|
+
message: string;
|
|
49
|
+
stack?: string;
|
|
50
|
+
};
|
|
51
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
52
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
53
|
+
stackTraceLimit: number;
|
|
54
|
+
};
|
|
55
|
+
export declare const InvalidConfigurationProvidedError: {
|
|
56
|
+
new (input?: BarekeyErrorInit): {
|
|
57
|
+
readonly code: BarekeyErrorCode;
|
|
58
|
+
readonly docsUrl: string;
|
|
59
|
+
readonly requestId: string | null;
|
|
60
|
+
readonly status: number | null;
|
|
61
|
+
readonly cause: unknown;
|
|
62
|
+
name: string;
|
|
63
|
+
message: string;
|
|
64
|
+
stack?: string;
|
|
65
|
+
};
|
|
66
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
67
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
68
|
+
stackTraceLimit: number;
|
|
69
|
+
};
|
|
70
|
+
export declare const NoCredentialsProvidedError: {
|
|
71
|
+
new (input?: BarekeyErrorInit): {
|
|
72
|
+
readonly code: BarekeyErrorCode;
|
|
73
|
+
readonly docsUrl: string;
|
|
74
|
+
readonly requestId: string | null;
|
|
75
|
+
readonly status: number | null;
|
|
76
|
+
readonly cause: unknown;
|
|
77
|
+
name: string;
|
|
78
|
+
message: string;
|
|
79
|
+
stack?: string;
|
|
80
|
+
};
|
|
81
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
82
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
83
|
+
stackTraceLimit: number;
|
|
84
|
+
};
|
|
85
|
+
export declare const InvalidCredentialsProvidedError: {
|
|
86
|
+
new (input?: BarekeyErrorInit): {
|
|
87
|
+
readonly code: BarekeyErrorCode;
|
|
88
|
+
readonly docsUrl: string;
|
|
89
|
+
readonly requestId: string | null;
|
|
90
|
+
readonly status: number | null;
|
|
91
|
+
readonly cause: unknown;
|
|
92
|
+
name: string;
|
|
93
|
+
message: string;
|
|
94
|
+
stack?: string;
|
|
95
|
+
};
|
|
96
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
97
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
98
|
+
stackTraceLimit: number;
|
|
99
|
+
};
|
|
100
|
+
export declare const InvalidDynamicOptionsError: {
|
|
101
|
+
new (input?: BarekeyErrorInit): {
|
|
102
|
+
readonly code: BarekeyErrorCode;
|
|
103
|
+
readonly docsUrl: string;
|
|
104
|
+
readonly requestId: string | null;
|
|
105
|
+
readonly status: number | null;
|
|
106
|
+
readonly cause: unknown;
|
|
107
|
+
name: string;
|
|
108
|
+
message: string;
|
|
109
|
+
stack?: string;
|
|
110
|
+
};
|
|
111
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
112
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
113
|
+
stackTraceLimit: number;
|
|
114
|
+
};
|
|
115
|
+
export declare const RequirementsValidationFailedError: {
|
|
116
|
+
new (input?: BarekeyErrorInit): {
|
|
117
|
+
readonly code: BarekeyErrorCode;
|
|
118
|
+
readonly docsUrl: string;
|
|
119
|
+
readonly requestId: string | null;
|
|
120
|
+
readonly status: number | null;
|
|
121
|
+
readonly cause: unknown;
|
|
122
|
+
name: string;
|
|
123
|
+
message: string;
|
|
124
|
+
stack?: string;
|
|
125
|
+
};
|
|
126
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
127
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
128
|
+
stackTraceLimit: number;
|
|
129
|
+
};
|
|
130
|
+
export declare const NetworkError: {
|
|
131
|
+
new (input?: BarekeyErrorInit): {
|
|
132
|
+
readonly code: BarekeyErrorCode;
|
|
133
|
+
readonly docsUrl: string;
|
|
134
|
+
readonly requestId: string | null;
|
|
135
|
+
readonly status: number | null;
|
|
136
|
+
readonly cause: unknown;
|
|
137
|
+
name: string;
|
|
138
|
+
message: string;
|
|
139
|
+
stack?: string;
|
|
140
|
+
};
|
|
141
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
142
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
143
|
+
stackTraceLimit: number;
|
|
144
|
+
};
|
|
145
|
+
export declare const CoerceFailedError: {
|
|
146
|
+
new (input?: BarekeyErrorInit): {
|
|
147
|
+
readonly code: BarekeyErrorCode;
|
|
148
|
+
readonly docsUrl: string;
|
|
149
|
+
readonly requestId: string | null;
|
|
150
|
+
readonly status: number | null;
|
|
151
|
+
readonly cause: unknown;
|
|
152
|
+
name: string;
|
|
153
|
+
message: string;
|
|
154
|
+
stack?: string;
|
|
155
|
+
};
|
|
156
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
157
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
158
|
+
stackTraceLimit: number;
|
|
159
|
+
};
|
|
160
|
+
export declare const TemporalNotAvailableError: {
|
|
161
|
+
new (input?: BarekeyErrorInit): {
|
|
162
|
+
readonly code: BarekeyErrorCode;
|
|
163
|
+
readonly docsUrl: string;
|
|
164
|
+
readonly requestId: string | null;
|
|
165
|
+
readonly status: number | null;
|
|
166
|
+
readonly cause: unknown;
|
|
167
|
+
name: string;
|
|
168
|
+
message: string;
|
|
169
|
+
stack?: string;
|
|
170
|
+
};
|
|
171
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
172
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
173
|
+
stackTraceLimit: number;
|
|
174
|
+
};
|
|
175
|
+
export declare const SdkModuleNotFoundError: {
|
|
176
|
+
new (input?: BarekeyErrorInit): {
|
|
177
|
+
readonly code: BarekeyErrorCode;
|
|
178
|
+
readonly docsUrl: string;
|
|
179
|
+
readonly requestId: string | null;
|
|
180
|
+
readonly status: number | null;
|
|
181
|
+
readonly cause: unknown;
|
|
182
|
+
name: string;
|
|
183
|
+
message: string;
|
|
184
|
+
stack?: string;
|
|
185
|
+
};
|
|
186
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
187
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
188
|
+
stackTraceLimit: number;
|
|
189
|
+
};
|
|
190
|
+
export declare const TypegenUnsupportedSdkError: {
|
|
191
|
+
new (input?: BarekeyErrorInit): {
|
|
192
|
+
readonly code: BarekeyErrorCode;
|
|
193
|
+
readonly docsUrl: string;
|
|
194
|
+
readonly requestId: string | null;
|
|
195
|
+
readonly status: number | null;
|
|
196
|
+
readonly cause: unknown;
|
|
197
|
+
name: string;
|
|
198
|
+
message: string;
|
|
199
|
+
stack?: string;
|
|
200
|
+
};
|
|
201
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
202
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
203
|
+
stackTraceLimit: number;
|
|
204
|
+
};
|
|
205
|
+
export declare const TypegenReadFailedError: {
|
|
206
|
+
new (input?: BarekeyErrorInit): {
|
|
207
|
+
readonly code: BarekeyErrorCode;
|
|
208
|
+
readonly docsUrl: string;
|
|
209
|
+
readonly requestId: string | null;
|
|
210
|
+
readonly status: number | null;
|
|
211
|
+
readonly cause: unknown;
|
|
212
|
+
name: string;
|
|
213
|
+
message: string;
|
|
214
|
+
stack?: string;
|
|
215
|
+
};
|
|
216
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
217
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
218
|
+
stackTraceLimit: number;
|
|
219
|
+
};
|
|
220
|
+
export declare const TypegenWriteFailedError: {
|
|
221
|
+
new (input?: BarekeyErrorInit): {
|
|
222
|
+
readonly code: BarekeyErrorCode;
|
|
223
|
+
readonly docsUrl: string;
|
|
224
|
+
readonly requestId: string | null;
|
|
225
|
+
readonly status: number | null;
|
|
226
|
+
readonly cause: unknown;
|
|
227
|
+
name: string;
|
|
228
|
+
message: string;
|
|
229
|
+
stack?: string;
|
|
230
|
+
};
|
|
231
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
232
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
233
|
+
stackTraceLimit: number;
|
|
234
|
+
};
|
|
235
|
+
export declare const UnauthorizedError: {
|
|
236
|
+
new (input?: BarekeyErrorInit): {
|
|
237
|
+
readonly code: BarekeyErrorCode;
|
|
238
|
+
readonly docsUrl: string;
|
|
239
|
+
readonly requestId: string | null;
|
|
240
|
+
readonly status: number | null;
|
|
241
|
+
readonly cause: unknown;
|
|
242
|
+
name: string;
|
|
243
|
+
message: string;
|
|
244
|
+
stack?: string;
|
|
245
|
+
};
|
|
246
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
247
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
248
|
+
stackTraceLimit: number;
|
|
249
|
+
};
|
|
250
|
+
export declare const InvalidOrgScopeError: {
|
|
251
|
+
new (input?: BarekeyErrorInit): {
|
|
252
|
+
readonly code: BarekeyErrorCode;
|
|
253
|
+
readonly docsUrl: string;
|
|
254
|
+
readonly requestId: string | null;
|
|
255
|
+
readonly status: number | null;
|
|
256
|
+
readonly cause: unknown;
|
|
257
|
+
name: string;
|
|
258
|
+
message: string;
|
|
259
|
+
stack?: string;
|
|
260
|
+
};
|
|
261
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
262
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
263
|
+
stackTraceLimit: number;
|
|
264
|
+
};
|
|
265
|
+
export declare const OrgScopeInvalidError: {
|
|
266
|
+
new (input?: BarekeyErrorInit): {
|
|
267
|
+
readonly code: BarekeyErrorCode;
|
|
268
|
+
readonly docsUrl: string;
|
|
269
|
+
readonly requestId: string | null;
|
|
270
|
+
readonly status: number | null;
|
|
271
|
+
readonly cause: unknown;
|
|
272
|
+
name: string;
|
|
273
|
+
message: string;
|
|
274
|
+
stack?: string;
|
|
275
|
+
};
|
|
276
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
277
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
278
|
+
stackTraceLimit: number;
|
|
279
|
+
};
|
|
280
|
+
export declare const InvalidJsonError: {
|
|
281
|
+
new (input?: BarekeyErrorInit): {
|
|
282
|
+
readonly code: BarekeyErrorCode;
|
|
283
|
+
readonly docsUrl: string;
|
|
284
|
+
readonly requestId: string | null;
|
|
285
|
+
readonly status: number | null;
|
|
286
|
+
readonly cause: unknown;
|
|
287
|
+
name: string;
|
|
288
|
+
message: string;
|
|
289
|
+
stack?: string;
|
|
290
|
+
};
|
|
291
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
292
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
293
|
+
stackTraceLimit: number;
|
|
294
|
+
};
|
|
295
|
+
export declare const InvalidRequestError: {
|
|
296
|
+
new (input?: BarekeyErrorInit): {
|
|
297
|
+
readonly code: BarekeyErrorCode;
|
|
298
|
+
readonly docsUrl: string;
|
|
299
|
+
readonly requestId: string | null;
|
|
300
|
+
readonly status: number | null;
|
|
301
|
+
readonly cause: unknown;
|
|
302
|
+
name: string;
|
|
303
|
+
message: string;
|
|
304
|
+
stack?: string;
|
|
305
|
+
};
|
|
306
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
307
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
308
|
+
stackTraceLimit: number;
|
|
309
|
+
};
|
|
310
|
+
export declare const VariableNotFoundError: {
|
|
311
|
+
new (input?: BarekeyErrorInit): {
|
|
312
|
+
readonly code: BarekeyErrorCode;
|
|
313
|
+
readonly docsUrl: string;
|
|
314
|
+
readonly requestId: string | null;
|
|
315
|
+
readonly status: number | null;
|
|
316
|
+
readonly cause: unknown;
|
|
317
|
+
name: string;
|
|
318
|
+
message: string;
|
|
319
|
+
stack?: string;
|
|
320
|
+
};
|
|
321
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
322
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
323
|
+
stackTraceLimit: number;
|
|
324
|
+
};
|
|
325
|
+
export declare const EvaluationFailedError: {
|
|
326
|
+
new (input?: BarekeyErrorInit): {
|
|
327
|
+
readonly code: BarekeyErrorCode;
|
|
328
|
+
readonly docsUrl: string;
|
|
329
|
+
readonly requestId: string | null;
|
|
330
|
+
readonly status: number | null;
|
|
331
|
+
readonly cause: unknown;
|
|
332
|
+
name: string;
|
|
333
|
+
message: string;
|
|
334
|
+
stack?: string;
|
|
335
|
+
};
|
|
336
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
337
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
338
|
+
stackTraceLimit: number;
|
|
339
|
+
};
|
|
340
|
+
export declare const UsageLimitExceededError: {
|
|
341
|
+
new (input?: BarekeyErrorInit): {
|
|
342
|
+
readonly code: BarekeyErrorCode;
|
|
343
|
+
readonly docsUrl: string;
|
|
344
|
+
readonly requestId: string | null;
|
|
345
|
+
readonly status: number | null;
|
|
346
|
+
readonly cause: unknown;
|
|
347
|
+
name: string;
|
|
348
|
+
message: string;
|
|
349
|
+
stack?: string;
|
|
350
|
+
};
|
|
351
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
352
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
353
|
+
stackTraceLimit: number;
|
|
354
|
+
};
|
|
355
|
+
export declare const BillingUnavailableError: {
|
|
356
|
+
new (input?: BarekeyErrorInit): {
|
|
357
|
+
readonly code: BarekeyErrorCode;
|
|
358
|
+
readonly docsUrl: string;
|
|
359
|
+
readonly requestId: string | null;
|
|
360
|
+
readonly status: number | null;
|
|
361
|
+
readonly cause: unknown;
|
|
362
|
+
name: string;
|
|
363
|
+
message: string;
|
|
364
|
+
stack?: string;
|
|
365
|
+
};
|
|
366
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
367
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
368
|
+
stackTraceLimit: number;
|
|
369
|
+
};
|
|
370
|
+
export declare const DeviceCodeNotFoundError: {
|
|
371
|
+
new (input?: BarekeyErrorInit): {
|
|
372
|
+
readonly code: BarekeyErrorCode;
|
|
373
|
+
readonly docsUrl: string;
|
|
374
|
+
readonly requestId: string | null;
|
|
375
|
+
readonly status: number | null;
|
|
376
|
+
readonly cause: unknown;
|
|
377
|
+
name: string;
|
|
378
|
+
message: string;
|
|
379
|
+
stack?: string;
|
|
380
|
+
};
|
|
381
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
382
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
383
|
+
stackTraceLimit: number;
|
|
384
|
+
};
|
|
385
|
+
export declare const DeviceCodeExpiredError: {
|
|
386
|
+
new (input?: BarekeyErrorInit): {
|
|
387
|
+
readonly code: BarekeyErrorCode;
|
|
388
|
+
readonly docsUrl: string;
|
|
389
|
+
readonly requestId: string | null;
|
|
390
|
+
readonly status: number | null;
|
|
391
|
+
readonly cause: unknown;
|
|
392
|
+
name: string;
|
|
393
|
+
message: string;
|
|
394
|
+
stack?: string;
|
|
395
|
+
};
|
|
396
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
397
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
398
|
+
stackTraceLimit: number;
|
|
399
|
+
};
|
|
400
|
+
export declare const UserCodeInvalidError: {
|
|
401
|
+
new (input?: BarekeyErrorInit): {
|
|
402
|
+
readonly code: BarekeyErrorCode;
|
|
403
|
+
readonly docsUrl: string;
|
|
404
|
+
readonly requestId: string | null;
|
|
405
|
+
readonly status: number | null;
|
|
406
|
+
readonly cause: unknown;
|
|
407
|
+
name: string;
|
|
408
|
+
message: string;
|
|
409
|
+
stack?: string;
|
|
410
|
+
};
|
|
411
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
412
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
413
|
+
stackTraceLimit: number;
|
|
414
|
+
};
|
|
415
|
+
export declare const InvalidRefreshTokenError: {
|
|
416
|
+
new (input?: BarekeyErrorInit): {
|
|
417
|
+
readonly code: BarekeyErrorCode;
|
|
418
|
+
readonly docsUrl: string;
|
|
419
|
+
readonly requestId: string | null;
|
|
420
|
+
readonly status: number | null;
|
|
421
|
+
readonly cause: unknown;
|
|
422
|
+
name: string;
|
|
423
|
+
message: string;
|
|
424
|
+
stack?: string;
|
|
425
|
+
};
|
|
426
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
427
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
428
|
+
stackTraceLimit: number;
|
|
429
|
+
};
|
|
430
|
+
export declare const UnknownError: {
|
|
431
|
+
new (input?: BarekeyErrorInit): {
|
|
432
|
+
readonly code: BarekeyErrorCode;
|
|
433
|
+
readonly docsUrl: string;
|
|
434
|
+
readonly requestId: string | null;
|
|
435
|
+
readonly status: number | null;
|
|
436
|
+
readonly cause: unknown;
|
|
437
|
+
name: string;
|
|
438
|
+
message: string;
|
|
439
|
+
stack?: string;
|
|
440
|
+
};
|
|
441
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
442
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
443
|
+
stackTraceLimit: number;
|
|
444
|
+
};
|
|
445
|
+
export declare function isBarekeyErrorCode(value: string): value is BarekeyErrorCode;
|
|
446
|
+
export declare function normalizeErrorCode(value: string): BarekeyErrorCode;
|
|
447
|
+
export declare function createBarekeyErrorFromCode(input: {
|
|
448
|
+
code: string;
|
|
449
|
+
message?: string;
|
|
450
|
+
requestId?: string | null;
|
|
451
|
+
status?: number | null;
|
|
452
|
+
cause?: unknown;
|
|
453
|
+
}): BarekeyError;
|
|
454
|
+
export declare function parseFloatOrThrow(value: string): number;
|
|
455
|
+
export declare function parseBigIntOrThrow(value: string): bigint;
|
|
456
|
+
export declare function parseBooleanOrThrow(value: string): boolean;
|
|
457
|
+
export declare function parseJsonOrThrow<TJson = unknown>(value: string): TJson;
|
|
458
|
+
export declare function parseDateOrThrow(value: string): Date;
|
|
459
|
+
export declare function parseTemporalInstantOrThrow(value: string): BarekeyTemporalInstant;
|
|
460
|
+
export {};
|
|
461
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAK3E,KAAK,gBAAgB,GAAG;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AA2JF,wBAAgB,mBAAmB,CAAC,IAAI,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