@awarevue/api-types 2.0.102 → 2.0.104
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/api/error.js +2 -2
- package/dist/api/events/door.js +2 -1
- package/dist/api/queries/all.d.ts +5 -0
- package/dist/api/queries/reader.d.ts +15 -0
- package/dist/api/queries/reader.js +9 -1
- package/dist/objects/agent-metadata.js +2 -2
- package/dist/objects/credential.js +2 -2
- package/dist/objects/device/reader.js +2 -2
- package/dist/package.json +1 -1
- package/dist/primitives/credential-type.d.ts +9 -0
- package/dist/primitives/credential-type.js +11 -0
- package/dist/primitives.d.ts +0 -8
- package/dist/primitives.js +1 -8
- package/package.json +1 -1
package/dist/api/error.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
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
|
|
6
|
+
const credential_type_1 = require("../primitives/credential-type");
|
|
7
7
|
// METADATA
|
|
8
8
|
exports.sDuplicateMeta = zod_1.z.object({
|
|
9
9
|
subject: zod_1.z.string(),
|
|
@@ -40,7 +40,7 @@ exports.sTokenInvalidFormatMeta = zod_1.z.object({
|
|
|
40
40
|
});
|
|
41
41
|
exports.sTokenLimitExceededMeta = zod_1.z.object({
|
|
42
42
|
limit: zod_1.z.number(),
|
|
43
|
-
type:
|
|
43
|
+
type: credential_type_1.sCredentialType,
|
|
44
44
|
});
|
|
45
45
|
// ERROR CODES
|
|
46
46
|
var AppErrorCode;
|
package/dist/api/events/door.js
CHANGED
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.doorEventSchemaByKind = exports.sDoorTamperRestoredEvent = exports.sDoorAcuOnlineEvent = exports.sDoorMainsRestoredEvent = exports.sDoorAcuNotRespondingEvent = exports.sDoorMainsFailedEvent = exports.sDoorRelockEvent = exports.sDoorLeftOpenEvent = exports.sDoorTamperEvent = exports.sDoorForceEvent = exports.sDoorClosed = exports.sDoorOpened = exports.sDoorAccessEvent = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const credential_type_1 = require("../../primitives/credential-type");
|
|
5
6
|
const primitives_1 = require("../../primitives");
|
|
6
7
|
// EVENTS
|
|
7
8
|
exports.sDoorAccessEvent = zod_1.z.object({
|
|
8
9
|
kind: zod_1.z.literal('door-access'),
|
|
9
10
|
personId: primitives_1.sPersonId.optional(),
|
|
10
11
|
token: zod_1.z.string().nullable(),
|
|
11
|
-
tokenType:
|
|
12
|
+
tokenType: credential_type_1.sCredentialType.nullable(),
|
|
12
13
|
allowed: zod_1.z.boolean(),
|
|
13
14
|
doorExit: zod_1.z.boolean(),
|
|
14
15
|
description: zod_1.z.string(),
|
|
@@ -15,6 +15,10 @@ export declare const requestSchemasByType: {
|
|
|
15
15
|
type: z.ZodString;
|
|
16
16
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
17
17
|
}, z.core.$strip>;
|
|
18
|
+
readonly "device:verify": z.ZodObject<{
|
|
19
|
+
type: z.ZodString;
|
|
20
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
21
|
+
}, z.core.$strip>;
|
|
18
22
|
readonly "cctv:media-search": z.ZodObject<{
|
|
19
23
|
devices: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodAny>>>;
|
|
20
24
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
@@ -456,6 +460,7 @@ export declare const requestSchemasByType: {
|
|
|
456
460
|
export declare const responseSchemasByType: {
|
|
457
461
|
readonly "device:event-caps": z.ZodArray<z.ZodString>;
|
|
458
462
|
readonly "device:capture": z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
463
|
+
readonly "device:verify": z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
459
464
|
readonly "cctv:media-search": z.ZodArray<z.ZodObject<{
|
|
460
465
|
relevance: z.ZodNumber;
|
|
461
466
|
providerAssignedRef: z.ZodString;
|
|
@@ -1,24 +1,39 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const QUERY_CAPTURE = "device:capture";
|
|
3
|
+
export declare const QUERY_VERIFY = "device:verify";
|
|
3
4
|
export declare const sCaptureQueryArgs: z.ZodObject<{
|
|
4
5
|
type: z.ZodString;
|
|
5
6
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
6
7
|
}, z.core.$strip>;
|
|
8
|
+
export declare const sVerifyQueryArgs: z.ZodObject<{
|
|
9
|
+
type: z.ZodString;
|
|
10
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
11
|
+
}, z.core.$strip>;
|
|
7
12
|
export declare const sCaptureQueryResponse: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
13
|
+
export declare const sVerifyQueryResponse: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
8
14
|
export type CaptureQueryArgs = z.infer<typeof sCaptureQueryArgs>;
|
|
15
|
+
export type VerifyQueryArgs = z.infer<typeof sVerifyQueryArgs>;
|
|
9
16
|
export type CaptureQueryResponse = z.infer<typeof sCaptureQueryResponse>;
|
|
17
|
+
export type VerifyQueryResponse = z.infer<typeof sVerifyQueryResponse>;
|
|
10
18
|
export declare const readerRequestSchemas: {
|
|
11
19
|
readonly "device:capture": z.ZodObject<{
|
|
12
20
|
type: z.ZodString;
|
|
13
21
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
14
22
|
}, z.core.$strip>;
|
|
23
|
+
readonly "device:verify": z.ZodObject<{
|
|
24
|
+
type: z.ZodString;
|
|
25
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
26
|
+
}, z.core.$strip>;
|
|
15
27
|
};
|
|
16
28
|
export declare const readerResponseSchemas: {
|
|
17
29
|
readonly "device:capture": z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
30
|
+
readonly "device:verify": z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
18
31
|
};
|
|
19
32
|
export type ReaderQueryRequestMap = {
|
|
20
33
|
[QUERY_CAPTURE]: CaptureQueryArgs;
|
|
34
|
+
[QUERY_VERIFY]: VerifyQueryArgs;
|
|
21
35
|
};
|
|
22
36
|
export type ReaderQueryResponseMap = {
|
|
23
37
|
[QUERY_CAPTURE]: CaptureQueryResponse;
|
|
38
|
+
[QUERY_VERIFY]: VerifyQueryResponse;
|
|
24
39
|
};
|
|
@@ -1,17 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.readerResponseSchemas = exports.readerRequestSchemas = exports.sCaptureQueryResponse = exports.sCaptureQueryArgs = exports.QUERY_CAPTURE = void 0;
|
|
3
|
+
exports.readerResponseSchemas = exports.readerRequestSchemas = exports.sVerifyQueryResponse = exports.sCaptureQueryResponse = exports.sVerifyQueryArgs = exports.sCaptureQueryArgs = exports.QUERY_VERIFY = exports.QUERY_CAPTURE = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.QUERY_CAPTURE = 'device:capture';
|
|
6
|
+
exports.QUERY_VERIFY = 'device:verify';
|
|
6
7
|
exports.sCaptureQueryArgs = zod_1.z.object({
|
|
7
8
|
type: zod_1.z.string(),
|
|
8
9
|
metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
|
|
9
10
|
});
|
|
11
|
+
exports.sVerifyQueryArgs = zod_1.z.object({
|
|
12
|
+
type: zod_1.z.string(),
|
|
13
|
+
metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
|
|
14
|
+
});
|
|
10
15
|
exports.sCaptureQueryResponse = zod_1.z.record(zod_1.z.string(), zod_1.z.any());
|
|
16
|
+
exports.sVerifyQueryResponse = zod_1.z.record(zod_1.z.string(), zod_1.z.any());
|
|
11
17
|
exports.readerRequestSchemas = {
|
|
12
18
|
[exports.QUERY_CAPTURE]: exports.sCaptureQueryArgs,
|
|
19
|
+
[exports.QUERY_VERIFY]: exports.sVerifyQueryArgs,
|
|
13
20
|
};
|
|
14
21
|
// Dictionary of response schemas by query type
|
|
15
22
|
exports.readerResponseSchemas = {
|
|
16
23
|
[exports.QUERY_CAPTURE]: exports.sCaptureQueryResponse,
|
|
24
|
+
[exports.QUERY_VERIFY]: exports.sVerifyQueryResponse,
|
|
17
25
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.sAccessControlCapabilityReport = exports.sTokenSpecs = exports.sAccessObjectKind = exports.sProviderSpecs = exports.sUiHint = exports.sUiWidgetHint = exports.sUiOrderHint = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const
|
|
5
|
+
const credential_type_1 = require("../primitives/credential-type");
|
|
6
6
|
exports.sUiOrderHint = zod_1.z.object({
|
|
7
7
|
kind: zod_1.z.literal('order'),
|
|
8
8
|
path: zod_1.z.string(),
|
|
@@ -40,7 +40,7 @@ exports.sAccessObjectKind = zod_1.z.enum([
|
|
|
40
40
|
'device',
|
|
41
41
|
]);
|
|
42
42
|
exports.sTokenSpecs = zod_1.z.object({
|
|
43
|
-
type:
|
|
43
|
+
type: credential_type_1.sCredentialType, // etc, those map to a AWARE-standardized set of token types
|
|
44
44
|
regex: zod_1.z.string().optional(),
|
|
45
45
|
formatDescription: zod_1.z.string().optional(),
|
|
46
46
|
maxPerPerson: zod_1.z.number().optional(),
|
|
@@ -5,13 +5,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.sAssignedCredential = exports.sCredentialValue = void 0;
|
|
7
7
|
const zod_1 = __importDefault(require("zod"));
|
|
8
|
-
const
|
|
8
|
+
const credential_type_1 = require("../primitives/credential-type");
|
|
9
9
|
exports.sCredentialValue = zod_1.default.union([
|
|
10
10
|
zod_1.default.string().nonempty(),
|
|
11
11
|
zod_1.default.record(zod_1.default.string(), zod_1.default.unknown()),
|
|
12
12
|
]);
|
|
13
13
|
exports.sAssignedCredential = zod_1.default.object({
|
|
14
|
-
type:
|
|
14
|
+
type: credential_type_1.sCredentialType,
|
|
15
15
|
value: exports.sCredentialValue,
|
|
16
16
|
note: zod_1.default.string().nullable(),
|
|
17
17
|
});
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.sReaderSpecs = exports.READER = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const
|
|
5
|
+
const credential_type_1 = require("../../primitives/credential-type");
|
|
6
6
|
exports.READER = 'reader';
|
|
7
7
|
// SPECS
|
|
8
8
|
exports.sReaderSpecs = zod_1.z.object({
|
|
9
|
-
credentialTypes: zod_1.z.array(
|
|
9
|
+
credentialTypes: zod_1.z.array(credential_type_1.sCredentialType).optional(),
|
|
10
10
|
});
|
package/dist/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "git",
|
|
5
5
|
"url": "git+https://github.com/Linc-Security-Systems/aware-essentials.git"
|
|
6
6
|
},
|
|
7
|
-
"version": "2.0.
|
|
7
|
+
"version": "2.0.104",
|
|
8
8
|
"description": "Common types between backend, agent(s) and frontend(s)",
|
|
9
9
|
"main": "dist/index.js",
|
|
10
10
|
"types": "dist/index.d.ts",
|
package/dist/primitives.d.ts
CHANGED
|
@@ -298,11 +298,3 @@ export declare const sCallDirection: z.ZodEnum<{
|
|
|
298
298
|
incoming: "incoming";
|
|
299
299
|
outgoing: "outgoing";
|
|
300
300
|
}>;
|
|
301
|
-
export declare const sCredentialType: z.ZodEnum<{
|
|
302
|
-
card: "card";
|
|
303
|
-
pin: "pin";
|
|
304
|
-
fingerprint: "fingerprint";
|
|
305
|
-
face: "face";
|
|
306
|
-
retina: "retina";
|
|
307
|
-
}>;
|
|
308
|
-
export type CredentialType = z.infer<typeof sCredentialType>;
|
package/dist/primitives.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* domain-specific types like DeviceId, PresetId, Duration, URL, etc.
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
10
|
+
exports.sCallDirection = exports.sCallState = exports.sCameraPresetInfo = exports.sNotificationSeverity = exports.sStreamId = exports.sDeviceParam = exports.sForeignDeviceId = exports.sAgentDeviceInfo = exports.sFileResponse = exports.sUrl = exports.sDuration = exports.sIoOutputSlotId = exports.sIoInputSlotId = exports.sWorldObjectId = exports.sUserId = exports.sMacroId = exports.sZoneId = exports.sPersonTypeId = exports.sPersonId = exports.sDeviceEvent = exports.sPresetId = exports.sDeviceId = void 0;
|
|
11
11
|
const zod_1 = require("zod");
|
|
12
12
|
const device_1 = require("./objects/device");
|
|
13
13
|
exports.sDeviceId = zod_1.z.string().nonempty();
|
|
@@ -53,10 +53,3 @@ exports.sCallState = zod_1.z.enum([
|
|
|
53
53
|
'terminated',
|
|
54
54
|
]);
|
|
55
55
|
exports.sCallDirection = zod_1.z.enum(['incoming', 'outgoing']);
|
|
56
|
-
exports.sCredentialType = zod_1.z.enum([
|
|
57
|
-
'card',
|
|
58
|
-
'pin',
|
|
59
|
-
'fingerprint',
|
|
60
|
-
'face',
|
|
61
|
-
'retina',
|
|
62
|
-
]);
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "git",
|
|
5
5
|
"url": "git+https://github.com/Linc-Security-Systems/aware-essentials.git"
|
|
6
6
|
},
|
|
7
|
-
"version": "2.0.
|
|
7
|
+
"version": "2.0.104",
|
|
8
8
|
"description": "Common types between backend, agent(s) and frontend(s)",
|
|
9
9
|
"main": "dist/index.js",
|
|
10
10
|
"types": "dist/index.d.ts",
|