@awarevue/api-types 1.0.23 → 1.0.24
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 +15 -1
- package/dist/error.js +5 -2
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/error.d.ts
CHANGED
|
@@ -55,11 +55,19 @@ export declare const sConflictMeta: z.ZodObject<{
|
|
|
55
55
|
blockingId?: string | undefined;
|
|
56
56
|
}>;
|
|
57
57
|
export declare const sVoidMeta: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
|
|
58
|
+
export declare const sAccessRuleConflictMeta: z.ZodObject<{
|
|
59
|
+
deviceSchedules: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
deviceSchedules: Record<string, string[]>;
|
|
62
|
+
}, {
|
|
63
|
+
deviceSchedules: Record<string, string[]>;
|
|
64
|
+
}>;
|
|
58
65
|
export type VoidMeta = z.infer<typeof sVoidMeta>;
|
|
59
66
|
export type DuplicateMeta = z.infer<typeof sDuplicateMeta>;
|
|
60
67
|
export type NotFoundMeta = z.infer<typeof sNotFoundMeta>;
|
|
61
68
|
export type InvalidMeta = z.infer<typeof sInvalidMeta>;
|
|
62
69
|
export type ConflictMeta = z.infer<typeof sConflictMeta>;
|
|
70
|
+
export type AccessRuleConflictMeta = z.infer<typeof sAccessRuleConflictMeta>;
|
|
63
71
|
export declare enum AppErrorCode {
|
|
64
72
|
RESOURCE_ALREADY_EXISTS = "RESOURCE_ALREADY_EXISTS",
|
|
65
73
|
RESOURCE_NOT_FOUND = "RESOURCE_NOT_FOUND",
|
|
@@ -186,7 +194,13 @@ export declare const errorMetadataSchemas: {
|
|
|
186
194
|
field: string;
|
|
187
195
|
subject: string;
|
|
188
196
|
}>;
|
|
189
|
-
readonly ACCESS_RULE_PERMISSION_CONFLICT: z.ZodObject<{
|
|
197
|
+
readonly ACCESS_RULE_PERMISSION_CONFLICT: z.ZodObject<{
|
|
198
|
+
deviceSchedules: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>;
|
|
199
|
+
}, "strip", z.ZodTypeAny, {
|
|
200
|
+
deviceSchedules: Record<string, string[]>;
|
|
201
|
+
}, {
|
|
202
|
+
deviceSchedules: Record<string, string[]>;
|
|
203
|
+
}>;
|
|
190
204
|
readonly ALARM_NOT_FOUND: z.ZodObject<{
|
|
191
205
|
subject: z.ZodString;
|
|
192
206
|
field: z.ZodString;
|
package/dist/error.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.errorMetadataSchemas = exports.AppErrorCode = exports.sVoidMeta = exports.sConflictMeta = exports.sInvalidMeta = exports.sNotFoundMeta = exports.sDuplicateMeta = void 0;
|
|
3
|
+
exports.errorMetadataSchemas = exports.AppErrorCode = 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
6
|
// METADATA
|
|
@@ -26,6 +26,9 @@ exports.sConflictMeta = zod_1.z.object({
|
|
|
26
26
|
value: zod_1.z.string().optional(),
|
|
27
27
|
});
|
|
28
28
|
exports.sVoidMeta = zod_1.z.object({}).strict();
|
|
29
|
+
exports.sAccessRuleConflictMeta = zod_1.z.object({
|
|
30
|
+
deviceSchedules: zod_1.z.record(zod_1.z.string(), zod_1.z.array(zod_1.z.string())),
|
|
31
|
+
});
|
|
29
32
|
// ERROR CODES
|
|
30
33
|
var AppErrorCode;
|
|
31
34
|
(function (AppErrorCode) {
|
|
@@ -103,7 +106,7 @@ exports.errorMetadataSchemas = {
|
|
|
103
106
|
[AppErrorCode.BAD_REFERENCE]: exports.sVoidMeta,
|
|
104
107
|
// access
|
|
105
108
|
[AppErrorCode.ACCESS_RULE_NOT_FOUND]: exports.sNotFoundMeta,
|
|
106
|
-
[AppErrorCode.ACCESS_RULE_PERMISSION_CONFLICT]: exports.
|
|
109
|
+
[AppErrorCode.ACCESS_RULE_PERMISSION_CONFLICT]: exports.sAccessRuleConflictMeta,
|
|
107
110
|
// alarm
|
|
108
111
|
[AppErrorCode.ALARM_NOT_FOUND]: exports.sNotFoundMeta,
|
|
109
112
|
// auth / user
|
package/dist/package.json
CHANGED