@awarevue/api-types 1.0.1 → 1.0.2
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.
|
@@ -192,6 +192,58 @@ export declare const sProviderSpecs: z.ZodObject<{
|
|
|
192
192
|
placeHolder?: string | undefined;
|
|
193
193
|
})[] | undefined;
|
|
194
194
|
}>;
|
|
195
|
+
export declare const sAccessObjectKind: z.ZodEnum<["access-rule", "schedule", "zone", "person", "reader"]>;
|
|
196
|
+
export declare const sTokenSpecs: z.ZodObject<{
|
|
197
|
+
type: z.ZodEnum<["card", "pin", "finger-print", "face"]>;
|
|
198
|
+
regex: z.ZodOptional<z.ZodString>;
|
|
199
|
+
formatDescription: z.ZodOptional<z.ZodString>;
|
|
200
|
+
maxPerPerson: z.ZodOptional<z.ZodNumber>;
|
|
201
|
+
}, "strip", z.ZodTypeAny, {
|
|
202
|
+
type: "card" | "pin" | "finger-print" | "face";
|
|
203
|
+
regex?: string | undefined;
|
|
204
|
+
formatDescription?: string | undefined;
|
|
205
|
+
maxPerPerson?: number | undefined;
|
|
206
|
+
}, {
|
|
207
|
+
type: "card" | "pin" | "finger-print" | "face";
|
|
208
|
+
regex?: string | undefined;
|
|
209
|
+
formatDescription?: string | undefined;
|
|
210
|
+
maxPerPerson?: number | undefined;
|
|
211
|
+
}>;
|
|
212
|
+
export declare const sAccessControlCapabilityReport: z.ZodObject<{
|
|
213
|
+
tokens: z.ZodArray<z.ZodObject<{
|
|
214
|
+
type: z.ZodEnum<["card", "pin", "finger-print", "face"]>;
|
|
215
|
+
regex: z.ZodOptional<z.ZodString>;
|
|
216
|
+
formatDescription: z.ZodOptional<z.ZodString>;
|
|
217
|
+
maxPerPerson: z.ZodOptional<z.ZodNumber>;
|
|
218
|
+
}, "strip", z.ZodTypeAny, {
|
|
219
|
+
type: "card" | "pin" | "finger-print" | "face";
|
|
220
|
+
regex?: string | undefined;
|
|
221
|
+
formatDescription?: string | undefined;
|
|
222
|
+
maxPerPerson?: number | undefined;
|
|
223
|
+
}, {
|
|
224
|
+
type: "card" | "pin" | "finger-print" | "face";
|
|
225
|
+
regex?: string | undefined;
|
|
226
|
+
formatDescription?: string | undefined;
|
|
227
|
+
maxPerPerson?: number | undefined;
|
|
228
|
+
}>, "many">;
|
|
229
|
+
accessbjects: z.ZodArray<z.ZodEnum<["access-rule", "schedule", "zone", "person", "reader"]>, "many">;
|
|
230
|
+
}, "strip", z.ZodTypeAny, {
|
|
231
|
+
tokens: {
|
|
232
|
+
type: "card" | "pin" | "finger-print" | "face";
|
|
233
|
+
regex?: string | undefined;
|
|
234
|
+
formatDescription?: string | undefined;
|
|
235
|
+
maxPerPerson?: number | undefined;
|
|
236
|
+
}[];
|
|
237
|
+
accessbjects: ("person" | "zone" | "reader" | "access-rule" | "schedule")[];
|
|
238
|
+
}, {
|
|
239
|
+
tokens: {
|
|
240
|
+
type: "card" | "pin" | "finger-print" | "face";
|
|
241
|
+
regex?: string | undefined;
|
|
242
|
+
formatDescription?: string | undefined;
|
|
243
|
+
maxPerPerson?: number | undefined;
|
|
244
|
+
}[];
|
|
245
|
+
accessbjects: ("person" | "zone" | "reader" | "access-rule" | "schedule")[];
|
|
246
|
+
}>;
|
|
195
247
|
export declare const sRegisterRq: z.ZodObject<{
|
|
196
248
|
kind: z.ZodLiteral<"register">;
|
|
197
249
|
providers: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -260,6 +312,41 @@ export declare const sRegisterRq: z.ZodObject<{
|
|
|
260
312
|
placeHolder?: string | undefined;
|
|
261
313
|
})[] | undefined;
|
|
262
314
|
}>>;
|
|
315
|
+
accessControlProviders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
316
|
+
tokens: z.ZodArray<z.ZodObject<{
|
|
317
|
+
type: z.ZodEnum<["card", "pin", "finger-print", "face"]>;
|
|
318
|
+
regex: z.ZodOptional<z.ZodString>;
|
|
319
|
+
formatDescription: z.ZodOptional<z.ZodString>;
|
|
320
|
+
maxPerPerson: z.ZodOptional<z.ZodNumber>;
|
|
321
|
+
}, "strip", z.ZodTypeAny, {
|
|
322
|
+
type: "card" | "pin" | "finger-print" | "face";
|
|
323
|
+
regex?: string | undefined;
|
|
324
|
+
formatDescription?: string | undefined;
|
|
325
|
+
maxPerPerson?: number | undefined;
|
|
326
|
+
}, {
|
|
327
|
+
type: "card" | "pin" | "finger-print" | "face";
|
|
328
|
+
regex?: string | undefined;
|
|
329
|
+
formatDescription?: string | undefined;
|
|
330
|
+
maxPerPerson?: number | undefined;
|
|
331
|
+
}>, "many">;
|
|
332
|
+
accessbjects: z.ZodArray<z.ZodEnum<["access-rule", "schedule", "zone", "person", "reader"]>, "many">;
|
|
333
|
+
}, "strip", z.ZodTypeAny, {
|
|
334
|
+
tokens: {
|
|
335
|
+
type: "card" | "pin" | "finger-print" | "face";
|
|
336
|
+
regex?: string | undefined;
|
|
337
|
+
formatDescription?: string | undefined;
|
|
338
|
+
maxPerPerson?: number | undefined;
|
|
339
|
+
}[];
|
|
340
|
+
accessbjects: ("person" | "zone" | "reader" | "access-rule" | "schedule")[];
|
|
341
|
+
}, {
|
|
342
|
+
tokens: {
|
|
343
|
+
type: "card" | "pin" | "finger-print" | "face";
|
|
344
|
+
regex?: string | undefined;
|
|
345
|
+
formatDescription?: string | undefined;
|
|
346
|
+
maxPerPerson?: number | undefined;
|
|
347
|
+
}[];
|
|
348
|
+
accessbjects: ("person" | "zone" | "reader" | "access-rule" | "schedule")[];
|
|
349
|
+
}>>>;
|
|
263
350
|
}, "strip", z.ZodTypeAny, {
|
|
264
351
|
kind: "register";
|
|
265
352
|
providers: Record<string, {
|
|
@@ -278,6 +365,15 @@ export declare const sRegisterRq: z.ZodObject<{
|
|
|
278
365
|
placeHolder?: string | undefined;
|
|
279
366
|
})[] | undefined;
|
|
280
367
|
}>;
|
|
368
|
+
accessControlProviders?: Record<string, {
|
|
369
|
+
tokens: {
|
|
370
|
+
type: "card" | "pin" | "finger-print" | "face";
|
|
371
|
+
regex?: string | undefined;
|
|
372
|
+
formatDescription?: string | undefined;
|
|
373
|
+
maxPerPerson?: number | undefined;
|
|
374
|
+
}[];
|
|
375
|
+
accessbjects: ("person" | "zone" | "reader" | "access-rule" | "schedule")[];
|
|
376
|
+
}> | undefined;
|
|
281
377
|
}, {
|
|
282
378
|
kind: "register";
|
|
283
379
|
providers: Record<string, {
|
|
@@ -296,6 +392,15 @@ export declare const sRegisterRq: z.ZodObject<{
|
|
|
296
392
|
placeHolder?: string | undefined;
|
|
297
393
|
})[] | undefined;
|
|
298
394
|
}>;
|
|
395
|
+
accessControlProviders?: Record<string, {
|
|
396
|
+
tokens: {
|
|
397
|
+
type: "card" | "pin" | "finger-print" | "face";
|
|
398
|
+
regex?: string | undefined;
|
|
399
|
+
formatDescription?: string | undefined;
|
|
400
|
+
maxPerPerson?: number | undefined;
|
|
401
|
+
}[];
|
|
402
|
+
accessbjects: ("person" | "zone" | "reader" | "access-rule" | "schedule")[];
|
|
403
|
+
}> | undefined;
|
|
299
404
|
}>;
|
|
300
405
|
export declare const sRegisterRs: z.ZodIntersection<z.ZodObject<{
|
|
301
406
|
requestId: z.ZodString;
|
|
@@ -925,112 +1030,6 @@ export declare const sGetAvailableDevicesRs: z.ZodIntersection<z.ZodObject<{
|
|
|
925
1030
|
provider: string;
|
|
926
1031
|
})[];
|
|
927
1032
|
}>>;
|
|
928
|
-
export declare const sAccessObjectKind: z.ZodEnum<["access-rule", "schedule", "zone", "person", "reader"]>;
|
|
929
|
-
export declare const sTokenSpecs: z.ZodObject<{
|
|
930
|
-
type: z.ZodEnum<["card", "pin", "finger-print", "face"]>;
|
|
931
|
-
regex: z.ZodOptional<z.ZodString>;
|
|
932
|
-
formatDescription: z.ZodOptional<z.ZodString>;
|
|
933
|
-
maxPerPerson: z.ZodOptional<z.ZodNumber>;
|
|
934
|
-
}, "strip", z.ZodTypeAny, {
|
|
935
|
-
type: "card" | "pin" | "finger-print" | "face";
|
|
936
|
-
regex?: string | undefined;
|
|
937
|
-
formatDescription?: string | undefined;
|
|
938
|
-
maxPerPerson?: number | undefined;
|
|
939
|
-
}, {
|
|
940
|
-
type: "card" | "pin" | "finger-print" | "face";
|
|
941
|
-
regex?: string | undefined;
|
|
942
|
-
formatDescription?: string | undefined;
|
|
943
|
-
maxPerPerson?: number | undefined;
|
|
944
|
-
}>;
|
|
945
|
-
export declare const sCapabilityReport: z.ZodObject<{
|
|
946
|
-
tokens: z.ZodArray<z.ZodObject<{
|
|
947
|
-
type: z.ZodEnum<["card", "pin", "finger-print", "face"]>;
|
|
948
|
-
regex: z.ZodOptional<z.ZodString>;
|
|
949
|
-
formatDescription: z.ZodOptional<z.ZodString>;
|
|
950
|
-
maxPerPerson: z.ZodOptional<z.ZodNumber>;
|
|
951
|
-
}, "strip", z.ZodTypeAny, {
|
|
952
|
-
type: "card" | "pin" | "finger-print" | "face";
|
|
953
|
-
regex?: string | undefined;
|
|
954
|
-
formatDescription?: string | undefined;
|
|
955
|
-
maxPerPerson?: number | undefined;
|
|
956
|
-
}, {
|
|
957
|
-
type: "card" | "pin" | "finger-print" | "face";
|
|
958
|
-
regex?: string | undefined;
|
|
959
|
-
formatDescription?: string | undefined;
|
|
960
|
-
maxPerPerson?: number | undefined;
|
|
961
|
-
}>, "many">;
|
|
962
|
-
accessbjects: z.ZodArray<z.ZodEnum<["access-rule", "schedule", "zone", "person", "reader"]>, "many">;
|
|
963
|
-
}, "strip", z.ZodTypeAny, {
|
|
964
|
-
tokens: {
|
|
965
|
-
type: "card" | "pin" | "finger-print" | "face";
|
|
966
|
-
regex?: string | undefined;
|
|
967
|
-
formatDescription?: string | undefined;
|
|
968
|
-
maxPerPerson?: number | undefined;
|
|
969
|
-
}[];
|
|
970
|
-
accessbjects: ("person" | "zone" | "reader" | "access-rule" | "schedule")[];
|
|
971
|
-
}, {
|
|
972
|
-
tokens: {
|
|
973
|
-
type: "card" | "pin" | "finger-print" | "face";
|
|
974
|
-
regex?: string | undefined;
|
|
975
|
-
formatDescription?: string | undefined;
|
|
976
|
-
maxPerPerson?: number | undefined;
|
|
977
|
-
}[];
|
|
978
|
-
accessbjects: ("person" | "zone" | "reader" | "access-rule" | "schedule")[];
|
|
979
|
-
}>;
|
|
980
|
-
export declare const sRegisterAccessControlAgentRq: z.ZodIntersection<z.ZodObject<{
|
|
981
|
-
kind: z.ZodLiteral<"register-access-control-agent">;
|
|
982
|
-
provider: z.ZodString;
|
|
983
|
-
}, "strip", z.ZodTypeAny, {
|
|
984
|
-
kind: "register-access-control-agent";
|
|
985
|
-
provider: string;
|
|
986
|
-
}, {
|
|
987
|
-
kind: "register-access-control-agent";
|
|
988
|
-
provider: string;
|
|
989
|
-
}>, z.ZodObject<{
|
|
990
|
-
tokens: z.ZodArray<z.ZodObject<{
|
|
991
|
-
type: z.ZodEnum<["card", "pin", "finger-print", "face"]>;
|
|
992
|
-
regex: z.ZodOptional<z.ZodString>;
|
|
993
|
-
formatDescription: z.ZodOptional<z.ZodString>;
|
|
994
|
-
maxPerPerson: z.ZodOptional<z.ZodNumber>;
|
|
995
|
-
}, "strip", z.ZodTypeAny, {
|
|
996
|
-
type: "card" | "pin" | "finger-print" | "face";
|
|
997
|
-
regex?: string | undefined;
|
|
998
|
-
formatDescription?: string | undefined;
|
|
999
|
-
maxPerPerson?: number | undefined;
|
|
1000
|
-
}, {
|
|
1001
|
-
type: "card" | "pin" | "finger-print" | "face";
|
|
1002
|
-
regex?: string | undefined;
|
|
1003
|
-
formatDescription?: string | undefined;
|
|
1004
|
-
maxPerPerson?: number | undefined;
|
|
1005
|
-
}>, "many">;
|
|
1006
|
-
accessbjects: z.ZodArray<z.ZodEnum<["access-rule", "schedule", "zone", "person", "reader"]>, "many">;
|
|
1007
|
-
}, "strip", z.ZodTypeAny, {
|
|
1008
|
-
tokens: {
|
|
1009
|
-
type: "card" | "pin" | "finger-print" | "face";
|
|
1010
|
-
regex?: string | undefined;
|
|
1011
|
-
formatDescription?: string | undefined;
|
|
1012
|
-
maxPerPerson?: number | undefined;
|
|
1013
|
-
}[];
|
|
1014
|
-
accessbjects: ("person" | "zone" | "reader" | "access-rule" | "schedule")[];
|
|
1015
|
-
}, {
|
|
1016
|
-
tokens: {
|
|
1017
|
-
type: "card" | "pin" | "finger-print" | "face";
|
|
1018
|
-
regex?: string | undefined;
|
|
1019
|
-
formatDescription?: string | undefined;
|
|
1020
|
-
maxPerPerson?: number | undefined;
|
|
1021
|
-
}[];
|
|
1022
|
-
accessbjects: ("person" | "zone" | "reader" | "access-rule" | "schedule")[];
|
|
1023
|
-
}>>;
|
|
1024
|
-
export declare const sRegisterAccessControlAgentRs: z.ZodIntersection<z.ZodObject<{
|
|
1025
|
-
requestId: z.ZodString;
|
|
1026
|
-
kind: z.ZodLiteral<"register-access-control-agent-rs">;
|
|
1027
|
-
}, "strip", z.ZodTypeAny, {
|
|
1028
|
-
kind: "register-access-control-agent-rs";
|
|
1029
|
-
requestId: string;
|
|
1030
|
-
}, {
|
|
1031
|
-
kind: "register-access-control-agent-rs";
|
|
1032
|
-
requestId: string;
|
|
1033
|
-
}>, z.ZodObject<{}, z.UnknownKeysParam, z.ZodTypeAny, {}, {}>>;
|
|
1034
1033
|
export declare const sObjectMerge: z.ZodObject<{
|
|
1035
1034
|
kind: z.ZodLiteral<"merge">;
|
|
1036
1035
|
objectId: z.ZodOptional<z.ZodString>;
|
|
@@ -1506,7 +1505,6 @@ export declare const sApplyChange: z.ZodObject<{
|
|
|
1506
1505
|
kind: "relation-merge";
|
|
1507
1506
|
linkExists: boolean;
|
|
1508
1507
|
}>]>, "many">;
|
|
1509
|
-
policyVersion: z.ZodNumber;
|
|
1510
1508
|
}, "strip", z.ZodTypeAny, {
|
|
1511
1509
|
kind: "apply-change";
|
|
1512
1510
|
devices: Record<string, Record<string, unknown>>;
|
|
@@ -1536,7 +1534,6 @@ export declare const sApplyChange: z.ZodObject<{
|
|
|
1536
1534
|
kind: "relation-merge";
|
|
1537
1535
|
linkExists: boolean;
|
|
1538
1536
|
})[];
|
|
1539
|
-
policyVersion: number;
|
|
1540
1537
|
}, {
|
|
1541
1538
|
kind: "apply-change";
|
|
1542
1539
|
devices: Record<string, Record<string, unknown>>;
|
|
@@ -1566,7 +1563,6 @@ export declare const sApplyChange: z.ZodObject<{
|
|
|
1566
1563
|
kind: "relation-merge";
|
|
1567
1564
|
linkExists: boolean;
|
|
1568
1565
|
})[];
|
|
1569
|
-
policyVersion: number;
|
|
1570
1566
|
}>;
|
|
1571
1567
|
export declare const sApplyChangeComplete: z.ZodIntersection<z.ZodObject<{
|
|
1572
1568
|
requestId: z.ZodString;
|
|
@@ -1578,33 +1574,27 @@ export declare const sApplyChangeComplete: z.ZodIntersection<z.ZodObject<{
|
|
|
1578
1574
|
kind: "apply-change-complete";
|
|
1579
1575
|
requestId: string;
|
|
1580
1576
|
}>, z.ZodObject<{
|
|
1581
|
-
|
|
1582
|
-
error: z.ZodOptional<z.ZodString>;
|
|
1577
|
+
requestId: z.ZodString;
|
|
1583
1578
|
refs: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1584
1579
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
1585
1580
|
refs: Record<string, Record<string, string>>;
|
|
1586
|
-
|
|
1587
|
-
error?: string | undefined;
|
|
1581
|
+
requestId: string;
|
|
1588
1582
|
}, {
|
|
1589
1583
|
refs: Record<string, Record<string, string>>;
|
|
1590
|
-
|
|
1591
|
-
error?: string | undefined;
|
|
1584
|
+
requestId: string;
|
|
1592
1585
|
}>>;
|
|
1593
1586
|
export declare const sApplyChangeProgress: z.ZodObject<{
|
|
1594
1587
|
kind: z.ZodLiteral<"apply-change-progress">;
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
completed: z.ZodNumber;
|
|
1588
|
+
requestId: z.ZodString;
|
|
1589
|
+
mutationIndex: z.ZodNumber;
|
|
1598
1590
|
}, "strip", z.ZodTypeAny, {
|
|
1599
|
-
total: number;
|
|
1600
|
-
completed: number;
|
|
1601
1591
|
kind: "apply-change-progress";
|
|
1602
|
-
|
|
1592
|
+
requestId: string;
|
|
1593
|
+
mutationIndex: number;
|
|
1603
1594
|
}, {
|
|
1604
|
-
total: number;
|
|
1605
|
-
completed: number;
|
|
1606
1595
|
kind: "apply-change-progress";
|
|
1607
|
-
|
|
1596
|
+
requestId: string;
|
|
1597
|
+
mutationIndex: number;
|
|
1608
1598
|
}>;
|
|
1609
1599
|
export declare const abortChange: z.ZodObject<{
|
|
1610
1600
|
kind: z.ZodLiteral<"abort-change">;
|
|
@@ -1639,18 +1629,16 @@ export type PushEventRq = z.infer<typeof sPushEventRq>;
|
|
|
1639
1629
|
export type PushEventRs = z.infer<typeof sPushEventRs>;
|
|
1640
1630
|
export type GetAvailableDevicesRq = z.infer<typeof sGetAvailableDevicesRq>;
|
|
1641
1631
|
export type GetAvailableDevicesRs = z.infer<typeof sGetAvailableDevicesRs>;
|
|
1642
|
-
export type RegisterAccessControlAgentRq = z.infer<typeof sRegisterAccessControlAgentRq>;
|
|
1643
|
-
export type RegisterAccessControlAgentRs = z.infer<typeof sRegisterAccessControlAgentRs>;
|
|
1644
1632
|
export type AccessMutation = z.infer<typeof sAccessMutation>;
|
|
1645
|
-
export type
|
|
1646
|
-
export type
|
|
1647
|
-
export type
|
|
1648
|
-
export type
|
|
1649
|
-
export type
|
|
1650
|
-
export type
|
|
1651
|
-
export type
|
|
1652
|
-
export type
|
|
1653
|
-
export type
|
|
1633
|
+
export type AccessValidateChangeRq = z.infer<typeof sValidateChangeRq>;
|
|
1634
|
+
export type AccessValidateChangeRs = z.infer<typeof sValidateChangeRs>;
|
|
1635
|
+
export type AccessChangeIssue = z.infer<typeof sChangeIssue>;
|
|
1636
|
+
export type AccessApplyChange = z.infer<typeof sApplyChange>;
|
|
1637
|
+
export type AccessApplyChangeComplete = z.infer<typeof sApplyChangeComplete>;
|
|
1638
|
+
export type AccessApplyChangeProgress = z.infer<typeof sApplyChangeProgress>;
|
|
1639
|
+
export type AccessAbortChange = z.infer<typeof abortChange>;
|
|
1640
|
+
export type AccessControlCapabilityReport = z.infer<typeof sAccessControlCapabilityReport>;
|
|
1641
|
+
export type AccessTokenSpecs = z.infer<typeof sTokenSpecs>;
|
|
1654
1642
|
export type AccessObjectKind = z.infer<typeof sAccessObjectKind>;
|
|
1655
1643
|
export type UiHint = z.infer<typeof sUiHint>;
|
|
1656
1644
|
export type UiOrderHint = z.infer<typeof sUiOrderHint>;
|
|
@@ -1675,18 +1663,16 @@ export type PayloadByKind = {
|
|
|
1675
1663
|
'event-rs': PushEventRs;
|
|
1676
1664
|
'get-available-devices': GetAvailableDevicesRq;
|
|
1677
1665
|
'get-available-devices-rs': GetAvailableDevicesRs;
|
|
1678
|
-
'
|
|
1679
|
-
'
|
|
1680
|
-
'
|
|
1681
|
-
'
|
|
1682
|
-
'apply-change':
|
|
1683
|
-
'
|
|
1684
|
-
'apply-change-progress': ApplyChangeProgress;
|
|
1685
|
-
'abort-change': AbortChange;
|
|
1666
|
+
'validate-change': AccessValidateChangeRq;
|
|
1667
|
+
'validate-change-rs': AccessValidateChangeRs;
|
|
1668
|
+
'apply-change': AccessApplyChange;
|
|
1669
|
+
'apply-change-complete': AccessApplyChangeComplete;
|
|
1670
|
+
'apply-change-progress': AccessApplyChangeProgress;
|
|
1671
|
+
'abort-change': AccessAbortChange;
|
|
1686
1672
|
'error-rs': ErrorPayload;
|
|
1687
1673
|
};
|
|
1688
|
-
export type FromAgent = ErrorPayload | RegisterRq | Unregister | ValidateProviderConfigRs | StartServiceRs | StopServiceRs | RunCommandRs | PushStateUpdateRq | PushEventRq | GetAvailableDevicesRs |
|
|
1689
|
-
export type FromServer = ErrorPayload | RegisterRs | ValidateProviderConfigRq | StartServiceRq | StopServiceRq | RunCommandRq | PushStateUpdateRs | PushEventRs | GetAvailableDevicesRq |
|
|
1674
|
+
export type FromAgent = ErrorPayload | RegisterRq | Unregister | ValidateProviderConfigRs | StartServiceRs | StopServiceRs | RunCommandRs | PushStateUpdateRq | PushEventRq | GetAvailableDevicesRs | AccessValidateChangeRs | AccessApplyChangeComplete | AccessApplyChangeProgress;
|
|
1675
|
+
export type FromServer = ErrorPayload | RegisterRs | ValidateProviderConfigRq | StartServiceRq | StopServiceRq | RunCommandRq | PushStateUpdateRs | PushEventRs | GetAvailableDevicesRq | AccessValidateChangeRq | AccessApplyChange | AccessAbortChange;
|
|
1690
1676
|
export type AnyPayload = FromAgent | FromServer;
|
|
1691
1677
|
export declare const getAgentMessageIssues: (message: unknown) => string[];
|
|
1692
1678
|
export declare const isMessageFromAgent: (message: unknown) => message is Message<FromAgent>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isMessageFromAgent = exports.getAgentMessageIssues = exports.abortChange = exports.sApplyChangeProgress = exports.sApplyChangeComplete = exports.sApplyChange = exports.sValidateChangeRs = exports.sChangeIssue = exports.sValidateChangeRq = exports.sDeviceMap = exports.sAccessMutation = exports.sRelationMerge = exports.sObjectDelete = exports.sObjectMerge = exports.
|
|
3
|
+
exports.isMessageFromAgent = exports.getAgentMessageIssues = exports.abortChange = exports.sApplyChangeProgress = exports.sApplyChangeComplete = exports.sApplyChange = exports.sValidateChangeRs = exports.sChangeIssue = exports.sValidateChangeRq = exports.sDeviceMap = exports.sAccessMutation = exports.sRelationMerge = exports.sObjectDelete = exports.sObjectMerge = exports.sGetAvailableDevicesRs = exports.sGetAvailableDevicesRq = exports.sPushEventRs = exports.sPushEventRq = exports.sPushStateUpdateRs = exports.sPushStateUpdateRq = exports.sRunCommandRs = exports.sRunCommandRq = exports.sStopServiceRs = exports.sStopServiceRq = exports.sStartServiceRs = exports.sStartServiceRq = exports.sValidateProviderConfigRs = exports.sConfigurationIssue = exports.sValidateProviderConfigRq = exports.sUnregister = exports.sRegisterRs = exports.sRegisterRq = exports.sAccessControlCapabilityReport = exports.sTokenSpecs = exports.sAccessObjectKind = exports.sProviderSpecs = exports.sUiHint = exports.sUiWidgetHint = exports.sUiOrderHint = exports.sErrorPayload = exports.sResponsePayload = exports.sMessageWithPayload = exports.sMessageHeader = void 0;
|
|
4
4
|
const device_1 = require("../device");
|
|
5
5
|
const device_import_1 = require("../device-import");
|
|
6
6
|
const zod_1 = require("zod");
|
|
@@ -53,11 +53,29 @@ exports.sProviderSpecs = zod_1.z.object({
|
|
|
53
53
|
.optional()
|
|
54
54
|
.describe('UI hints for configuration form visuals'),
|
|
55
55
|
});
|
|
56
|
+
exports.sAccessObjectKind = zod_1.z.enum([
|
|
57
|
+
'access-rule',
|
|
58
|
+
'schedule',
|
|
59
|
+
'zone',
|
|
60
|
+
'person',
|
|
61
|
+
'reader',
|
|
62
|
+
]);
|
|
63
|
+
exports.sTokenSpecs = zod_1.z.object({
|
|
64
|
+
type: zod_1.z.enum(['card', 'pin', 'finger-print', 'face']), // etc, those map to a AWARE-standardized set of token types
|
|
65
|
+
regex: zod_1.z.string().optional(),
|
|
66
|
+
formatDescription: zod_1.z.string().optional(),
|
|
67
|
+
maxPerPerson: zod_1.z.number().optional(),
|
|
68
|
+
});
|
|
69
|
+
exports.sAccessControlCapabilityReport = zod_1.z.object({
|
|
70
|
+
tokens: zod_1.z.array(exports.sTokenSpecs),
|
|
71
|
+
accessbjects: zod_1.z.array(exports.sAccessObjectKind),
|
|
72
|
+
});
|
|
56
73
|
exports.sRegisterRq = zod_1.z.object({
|
|
57
74
|
kind: zod_1.z.literal('register'),
|
|
58
75
|
providers: zod_1.z
|
|
59
76
|
.record(exports.sProviderSpecs)
|
|
60
77
|
.describe('Map of providers and their specs, ones that the agent can handle'),
|
|
78
|
+
accessControlProviders: zod_1.z.record(exports.sAccessControlCapabilityReport).optional(),
|
|
61
79
|
});
|
|
62
80
|
exports.sRegisterRs = (0, exports.sResponsePayload)(zod_1.z.literal('register-rs'), zod_1.z.object({}));
|
|
63
81
|
// UNREGISTER
|
|
@@ -154,31 +172,6 @@ exports.sGetAvailableDevicesRq = zod_1.z
|
|
|
154
172
|
})
|
|
155
173
|
.describe('Request to get available devices from a provider via an agent');
|
|
156
174
|
exports.sGetAvailableDevicesRs = (0, exports.sResponsePayload)(zod_1.z.literal('get-available-devices-rs'), device_import_1.sDeviceDiscoveryDto).describe('Response for getting available devices from a provider via an agent');
|
|
157
|
-
// REGISTER ACCESS CONTROL AGENT
|
|
158
|
-
exports.sAccessObjectKind = zod_1.z.enum([
|
|
159
|
-
'access-rule',
|
|
160
|
-
'schedule',
|
|
161
|
-
'zone',
|
|
162
|
-
'person',
|
|
163
|
-
'reader',
|
|
164
|
-
]);
|
|
165
|
-
exports.sTokenSpecs = zod_1.z.object({
|
|
166
|
-
type: zod_1.z.enum(['card', 'pin', 'finger-print', 'face']), // etc, those map to a AWARE-standardized set of token types
|
|
167
|
-
regex: zod_1.z.string().optional(),
|
|
168
|
-
formatDescription: zod_1.z.string().optional(),
|
|
169
|
-
maxPerPerson: zod_1.z.number().optional(),
|
|
170
|
-
});
|
|
171
|
-
exports.sCapabilityReport = zod_1.z.object({
|
|
172
|
-
tokens: zod_1.z.array(exports.sTokenSpecs),
|
|
173
|
-
accessbjects: zod_1.z.array(exports.sAccessObjectKind),
|
|
174
|
-
});
|
|
175
|
-
exports.sRegisterAccessControlAgentRq = zod_1.z
|
|
176
|
-
.object({
|
|
177
|
-
kind: zod_1.z.literal('register-access-control-agent'),
|
|
178
|
-
provider: zod_1.z.string().nonempty(),
|
|
179
|
-
})
|
|
180
|
-
.and(exports.sCapabilityReport);
|
|
181
|
-
exports.sRegisterAccessControlAgentRs = (0, exports.sResponsePayload)(zod_1.z.literal('register-access-control-agent-rs'), zod_1.z.object({})).describe('Response for registering an access control agent');
|
|
182
175
|
// ACCESS SYNC SECTION
|
|
183
176
|
exports.sObjectMerge = zod_1.z
|
|
184
177
|
.object({
|
|
@@ -263,12 +256,11 @@ exports.sApplyChange = zod_1.z
|
|
|
263
256
|
provider: zod_1.z.string().nonempty(),
|
|
264
257
|
devices: exports.sDeviceMap,
|
|
265
258
|
mutations: zod_1.z.array(exports.sAccessMutation),
|
|
266
|
-
policyVersion: zod_1.z.number().describe('Version of the access changes'),
|
|
267
259
|
})
|
|
268
260
|
.describe('Request to apply access changes');
|
|
269
261
|
exports.sApplyChangeComplete = (0, exports.sResponsePayload)(zod_1.z.literal('apply-change-complete'), zod_1.z.object({
|
|
270
|
-
|
|
271
|
-
error:
|
|
262
|
+
requestId: zod_1.z.string().nonempty(),
|
|
263
|
+
//error: z.string().optional().describe('Error message if request failed'),
|
|
272
264
|
refs: zod_1.z
|
|
273
265
|
.record(zod_1.z.record(zod_1.z.string().nonempty()))
|
|
274
266
|
.describe('Map of foreign references to object IDs'),
|
|
@@ -276,9 +268,12 @@ exports.sApplyChangeComplete = (0, exports.sResponsePayload)(zod_1.z.literal('ap
|
|
|
276
268
|
exports.sApplyChangeProgress = zod_1.z
|
|
277
269
|
.object({
|
|
278
270
|
kind: zod_1.z.literal('apply-change-progress'),
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
271
|
+
requestId: zod_1.z.string().nonempty(),
|
|
272
|
+
mutationIndex: zod_1.z
|
|
273
|
+
.number()
|
|
274
|
+
.describe('Index of the finished mutation in the batch'),
|
|
275
|
+
// total: z.number().describe('Progress of the access changes'),
|
|
276
|
+
// completed: z.number().describe('Progress of the access changes'),
|
|
282
277
|
})
|
|
283
278
|
.describe('Progress of the access changes');
|
|
284
279
|
// C. ABORT CHANGES
|
|
@@ -299,7 +294,7 @@ const fromAgentSchemaByKind = {
|
|
|
299
294
|
state: exports.sPushStateUpdateRq,
|
|
300
295
|
event: exports.sPushEventRq,
|
|
301
296
|
'get-available-devices-rs': exports.sGetAvailableDevicesRs,
|
|
302
|
-
'register-access-control-agent':
|
|
297
|
+
//'register-access-control-agent': sRegisterAccessControlAgentRq,
|
|
303
298
|
'validate-change-rs': exports.sValidateChangeRs,
|
|
304
299
|
'apply-change-complete': exports.sApplyChangeComplete,
|
|
305
300
|
'apply-change-progress': exports.sApplyChangeProgress,
|
package/dist/package.json
CHANGED