@awarevue/api-types 1.0.26 → 1.0.27
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/dist/error.d.ts +36 -7
- package/dist/error.js +12 -3
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/error.d.ts
CHANGED
|
@@ -72,6 +72,26 @@ export declare const sZoneAccessRuleConflictMeta: z.ZodObject<{
|
|
|
72
72
|
zoneId: string;
|
|
73
73
|
accessRuleIds: string[];
|
|
74
74
|
}>;
|
|
75
|
+
export declare const sTokenInvalidFormatMeta: z.ZodObject<{
|
|
76
|
+
token: z.ZodString;
|
|
77
|
+
expectedFormat: z.ZodString;
|
|
78
|
+
}, "strip", z.ZodTypeAny, {
|
|
79
|
+
token: string;
|
|
80
|
+
expectedFormat: string;
|
|
81
|
+
}, {
|
|
82
|
+
token: string;
|
|
83
|
+
expectedFormat: string;
|
|
84
|
+
}>;
|
|
85
|
+
export declare const sTokenLimitExceededMeta: z.ZodObject<{
|
|
86
|
+
limit: z.ZodNumber;
|
|
87
|
+
type: z.ZodEnum<["card", "pin", "fingerprint"]>;
|
|
88
|
+
}, "strip", z.ZodTypeAny, {
|
|
89
|
+
type: "card" | "pin" | "fingerprint";
|
|
90
|
+
limit: number;
|
|
91
|
+
}, {
|
|
92
|
+
type: "card" | "pin" | "fingerprint";
|
|
93
|
+
limit: number;
|
|
94
|
+
}>;
|
|
75
95
|
export type VoidMeta = z.infer<typeof sVoidMeta>;
|
|
76
96
|
export type DuplicateMeta = z.infer<typeof sDuplicateMeta>;
|
|
77
97
|
export type NotFoundMeta = z.infer<typeof sNotFoundMeta>;
|
|
@@ -297,16 +317,25 @@ export declare const errorMetadataSchemas: {
|
|
|
297
317
|
}>;
|
|
298
318
|
readonly TOKEN_NOT_SUPPORTED: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
|
|
299
319
|
readonly TOKEN_INVALID_FORMAT: z.ZodObject<{
|
|
300
|
-
|
|
301
|
-
|
|
320
|
+
token: z.ZodString;
|
|
321
|
+
expectedFormat: z.ZodString;
|
|
302
322
|
}, "strip", z.ZodTypeAny, {
|
|
303
|
-
|
|
304
|
-
|
|
323
|
+
token: string;
|
|
324
|
+
expectedFormat: string;
|
|
305
325
|
}, {
|
|
306
|
-
|
|
307
|
-
|
|
326
|
+
token: string;
|
|
327
|
+
expectedFormat: string;
|
|
328
|
+
}>;
|
|
329
|
+
readonly TOKEN_LIMIT_EXCEEDED: z.ZodObject<{
|
|
330
|
+
limit: z.ZodNumber;
|
|
331
|
+
type: z.ZodEnum<["card", "pin", "fingerprint"]>;
|
|
332
|
+
}, "strip", z.ZodTypeAny, {
|
|
333
|
+
type: "card" | "pin" | "fingerprint";
|
|
334
|
+
limit: number;
|
|
335
|
+
}, {
|
|
336
|
+
type: "card" | "pin" | "fingerprint";
|
|
337
|
+
limit: number;
|
|
308
338
|
}>;
|
|
309
|
-
readonly TOKEN_LIMIT_EXCEEDED: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
|
|
310
339
|
readonly TOKEN_IN_USE: z.ZodObject<{
|
|
311
340
|
subject: z.ZodString;
|
|
312
341
|
blockingSubject: z.ZodOptional<z.ZodString>;
|
package/dist/error.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.errorMetadataSchemas = exports.AppErrorCode = exports.sZoneAccessRuleConflictMeta = exports.sAccessRuleConflictMeta = exports.sVoidMeta = exports.sConflictMeta = exports.sInvalidMeta = exports.sNotFoundMeta = exports.sDuplicateMeta = void 0;
|
|
3
|
+
exports.errorMetadataSchemas = exports.AppErrorCode = exports.sTokenLimitExceededMeta = exports.sTokenInvalidFormatMeta = exports.sZoneAccessRuleConflictMeta = exports.sAccessRuleConflictMeta = exports.sVoidMeta = exports.sConflictMeta = exports.sInvalidMeta = exports.sNotFoundMeta = exports.sDuplicateMeta = void 0;
|
|
4
4
|
exports.isErrorResponse = isErrorResponse;
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
|
+
const access_control_1 = require("./access-control");
|
|
6
7
|
// METADATA
|
|
7
8
|
exports.sDuplicateMeta = zod_1.z.object({
|
|
8
9
|
subject: zod_1.z.string(),
|
|
@@ -33,6 +34,14 @@ exports.sZoneAccessRuleConflictMeta = zod_1.z.object({
|
|
|
33
34
|
zoneId: zod_1.z.string(),
|
|
34
35
|
accessRuleIds: zod_1.z.array(zod_1.z.string()),
|
|
35
36
|
});
|
|
37
|
+
exports.sTokenInvalidFormatMeta = zod_1.z.object({
|
|
38
|
+
token: zod_1.z.string(),
|
|
39
|
+
expectedFormat: zod_1.z.string(),
|
|
40
|
+
});
|
|
41
|
+
exports.sTokenLimitExceededMeta = zod_1.z.object({
|
|
42
|
+
limit: zod_1.z.number(),
|
|
43
|
+
type: access_control_1.sCredentialType,
|
|
44
|
+
});
|
|
36
45
|
// ERROR CODES
|
|
37
46
|
var AppErrorCode;
|
|
38
47
|
(function (AppErrorCode) {
|
|
@@ -124,8 +133,8 @@ exports.errorMetadataSchemas = {
|
|
|
124
133
|
[AppErrorCode.PERSON_NOT_FOUND]: exports.sNotFoundMeta,
|
|
125
134
|
[AppErrorCode.PERSON_INVALID_ID]: exports.sInvalidMeta,
|
|
126
135
|
[AppErrorCode.TOKEN_NOT_SUPPORTED]: exports.sVoidMeta,
|
|
127
|
-
[AppErrorCode.TOKEN_INVALID_FORMAT]: exports.
|
|
128
|
-
[AppErrorCode.TOKEN_LIMIT_EXCEEDED]: exports.
|
|
136
|
+
[AppErrorCode.TOKEN_INVALID_FORMAT]: exports.sTokenInvalidFormatMeta,
|
|
137
|
+
[AppErrorCode.TOKEN_LIMIT_EXCEEDED]: exports.sTokenLimitExceededMeta,
|
|
129
138
|
[AppErrorCode.TOKEN_IN_USE]: exports.sConflictMeta,
|
|
130
139
|
// device
|
|
131
140
|
[AppErrorCode.DEVICE_NOT_FOUND]: exports.sNotFoundMeta,
|
package/dist/package.json
CHANGED