@awarevue/api-types 2.0.77 → 2.0.79
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.
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { DeviceDto } from './any-device';
|
|
3
|
-
import { DeviceRelationDto } from './device-relation';
|
|
4
3
|
export declare const sImportedDevice: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
|
|
5
4
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
6
5
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -806,6 +805,41 @@ export declare const sDeviceDiscoveryDto: z.ZodObject<{
|
|
|
806
805
|
provider: string;
|
|
807
806
|
})[];
|
|
808
807
|
}>;
|
|
808
|
+
export declare const sRelationDeltaDto: z.ZodObject<{
|
|
809
|
+
relation: z.ZodObject<{
|
|
810
|
+
leftId: z.ZodString;
|
|
811
|
+
rightId: z.ZodString;
|
|
812
|
+
kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
|
|
813
|
+
}, "strip", z.ZodUnknown, z.objectOutputType<{
|
|
814
|
+
leftId: z.ZodString;
|
|
815
|
+
rightId: z.ZodString;
|
|
816
|
+
kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
|
|
817
|
+
}, z.ZodUnknown, "strip">, z.objectInputType<{
|
|
818
|
+
leftId: z.ZodString;
|
|
819
|
+
rightId: z.ZodString;
|
|
820
|
+
kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
|
|
821
|
+
}, z.ZodUnknown, "strip">>;
|
|
822
|
+
action: z.ZodEnum<["added", "updated", "removed"]>;
|
|
823
|
+
}, "strip", z.ZodTypeAny, {
|
|
824
|
+
relation: {
|
|
825
|
+
kind: "attachedTo" | "parent" | "child" | "holds" | "isHeldBy" | "observes" | "isObservedBy" | "sendsInputTo" | "receivesInputFrom" | "sendsOutputTo" | "receivesOutputFrom" | "unlocks" | "isUnlockedBy" | "controls" | "isControlledBy" | "records" | "isRecordedBy" | "reads" | "isReadBy";
|
|
826
|
+
leftId: string;
|
|
827
|
+
rightId: string;
|
|
828
|
+
} & {
|
|
829
|
+
[k: string]: unknown;
|
|
830
|
+
};
|
|
831
|
+
action: "added" | "updated" | "removed";
|
|
832
|
+
}, {
|
|
833
|
+
relation: {
|
|
834
|
+
kind: "attachedTo" | "parent" | "child" | "holds" | "isHeldBy" | "observes" | "isObservedBy" | "sendsInputTo" | "receivesInputFrom" | "sendsOutputTo" | "receivesOutputFrom" | "unlocks" | "isUnlockedBy" | "controls" | "isControlledBy" | "records" | "isRecordedBy" | "reads" | "isReadBy";
|
|
835
|
+
leftId: string;
|
|
836
|
+
rightId: string;
|
|
837
|
+
} & {
|
|
838
|
+
[k: string]: unknown;
|
|
839
|
+
};
|
|
840
|
+
action: "added" | "updated" | "removed";
|
|
841
|
+
}>;
|
|
842
|
+
export type RelationDeltaDto = z.infer<typeof sRelationDeltaDto>;
|
|
809
843
|
export declare const sDeviceGetChangesDto: z.ZodObject<{
|
|
810
844
|
added: z.ZodArray<z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
|
|
811
845
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -1483,18 +1517,39 @@ export declare const sDeviceGetChangesDto: z.ZodObject<{
|
|
|
1483
1517
|
};
|
|
1484
1518
|
}>>, "many">;
|
|
1485
1519
|
relations: z.ZodArray<z.ZodObject<{
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1520
|
+
relation: z.ZodObject<{
|
|
1521
|
+
leftId: z.ZodString;
|
|
1522
|
+
rightId: z.ZodString;
|
|
1523
|
+
kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
|
|
1524
|
+
}, "strip", z.ZodUnknown, z.objectOutputType<{
|
|
1525
|
+
leftId: z.ZodString;
|
|
1526
|
+
rightId: z.ZodString;
|
|
1527
|
+
kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
|
|
1528
|
+
}, z.ZodUnknown, "strip">, z.objectInputType<{
|
|
1529
|
+
leftId: z.ZodString;
|
|
1530
|
+
rightId: z.ZodString;
|
|
1531
|
+
kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
|
|
1532
|
+
}, z.ZodUnknown, "strip">>;
|
|
1533
|
+
action: z.ZodEnum<["added", "updated", "removed"]>;
|
|
1534
|
+
}, "strip", z.ZodTypeAny, {
|
|
1535
|
+
relation: {
|
|
1536
|
+
kind: "attachedTo" | "parent" | "child" | "holds" | "isHeldBy" | "observes" | "isObservedBy" | "sendsInputTo" | "receivesInputFrom" | "sendsOutputTo" | "receivesOutputFrom" | "unlocks" | "isUnlockedBy" | "controls" | "isControlledBy" | "records" | "isRecordedBy" | "reads" | "isReadBy";
|
|
1537
|
+
leftId: string;
|
|
1538
|
+
rightId: string;
|
|
1539
|
+
} & {
|
|
1540
|
+
[k: string]: unknown;
|
|
1541
|
+
};
|
|
1542
|
+
action: "added" | "updated" | "removed";
|
|
1543
|
+
}, {
|
|
1544
|
+
relation: {
|
|
1545
|
+
kind: "attachedTo" | "parent" | "child" | "holds" | "isHeldBy" | "observes" | "isObservedBy" | "sendsInputTo" | "receivesInputFrom" | "sendsOutputTo" | "receivesOutputFrom" | "unlocks" | "isUnlockedBy" | "controls" | "isControlledBy" | "records" | "isRecordedBy" | "reads" | "isReadBy";
|
|
1546
|
+
leftId: string;
|
|
1547
|
+
rightId: string;
|
|
1548
|
+
} & {
|
|
1549
|
+
[k: string]: unknown;
|
|
1550
|
+
};
|
|
1551
|
+
action: "added" | "updated" | "removed";
|
|
1552
|
+
}>, "many">;
|
|
1498
1553
|
duplicates: z.ZodArray<z.ZodObject<{
|
|
1499
1554
|
name: z.ZodString;
|
|
1500
1555
|
refs: z.ZodArray<z.ZodString, "many">;
|
|
@@ -1506,11 +1561,16 @@ export declare const sDeviceGetChangesDto: z.ZodObject<{
|
|
|
1506
1561
|
refs: string[];
|
|
1507
1562
|
}>, "many">;
|
|
1508
1563
|
}, "strip", z.ZodTypeAny, {
|
|
1509
|
-
relations:
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1564
|
+
relations: {
|
|
1565
|
+
relation: {
|
|
1566
|
+
kind: "attachedTo" | "parent" | "child" | "holds" | "isHeldBy" | "observes" | "isObservedBy" | "sendsInputTo" | "receivesInputFrom" | "sendsOutputTo" | "receivesOutputFrom" | "unlocks" | "isUnlockedBy" | "controls" | "isControlledBy" | "records" | "isRecordedBy" | "reads" | "isReadBy";
|
|
1567
|
+
leftId: string;
|
|
1568
|
+
rightId: string;
|
|
1569
|
+
} & {
|
|
1570
|
+
[k: string]: unknown;
|
|
1571
|
+
};
|
|
1572
|
+
action: "added" | "updated" | "removed";
|
|
1573
|
+
}[];
|
|
1514
1574
|
added: ({
|
|
1515
1575
|
tags?: string[] | undefined;
|
|
1516
1576
|
} & {
|
|
@@ -1715,11 +1775,16 @@ export declare const sDeviceGetChangesDto: z.ZodObject<{
|
|
|
1715
1775
|
refs: string[];
|
|
1716
1776
|
}[];
|
|
1717
1777
|
}, {
|
|
1718
|
-
relations:
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1778
|
+
relations: {
|
|
1779
|
+
relation: {
|
|
1780
|
+
kind: "attachedTo" | "parent" | "child" | "holds" | "isHeldBy" | "observes" | "isObservedBy" | "sendsInputTo" | "receivesInputFrom" | "sendsOutputTo" | "receivesOutputFrom" | "unlocks" | "isUnlockedBy" | "controls" | "isControlledBy" | "records" | "isRecordedBy" | "reads" | "isReadBy";
|
|
1781
|
+
leftId: string;
|
|
1782
|
+
rightId: string;
|
|
1783
|
+
} & {
|
|
1784
|
+
[k: string]: unknown;
|
|
1785
|
+
};
|
|
1786
|
+
action: "added" | "updated" | "removed";
|
|
1787
|
+
}[];
|
|
1723
1788
|
added: ({
|
|
1724
1789
|
tags?: string[] | undefined;
|
|
1725
1790
|
} & {
|
|
@@ -1934,7 +1999,7 @@ export type DeviceGetChangesDto = {
|
|
|
1934
1999
|
foreignRef: string;
|
|
1935
2000
|
} & Partial<ImportedDevice>)[];
|
|
1936
2001
|
removed: DeviceDto[];
|
|
1937
|
-
relations:
|
|
2002
|
+
relations: RelationDeltaDto[];
|
|
1938
2003
|
duplicates: DuplicateDevice[];
|
|
1939
2004
|
};
|
|
1940
2005
|
export type DeviceDiscoveryDto = z.infer<typeof sDeviceDiscoveryDto>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sDeviceGetChangesDto = exports.sDeviceDiscoveryDto = exports.sDuplicateDevice = exports.sImportedDevice = void 0;
|
|
3
|
+
exports.sDeviceGetChangesDto = exports.sRelationDeltaDto = exports.sDeviceDiscoveryDto = exports.sDuplicateDevice = exports.sImportedDevice = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const any_device_1 = require("./any-device");
|
|
6
6
|
const device_relation_1 = require("./device-relation");
|
|
@@ -18,6 +18,10 @@ exports.sDeviceDiscoveryDto = zod_1.z.object({
|
|
|
18
18
|
devices: zod_1.z.array(exports.sImportedDevice),
|
|
19
19
|
relations: zod_1.z.array(device_relation_1.sDeviceRelationDto.and(zod_1.z.object({ provider: zod_1.z.string() }))),
|
|
20
20
|
});
|
|
21
|
+
exports.sRelationDeltaDto = zod_1.z.object({
|
|
22
|
+
relation: device_relation_1.sDeviceRelationDto,
|
|
23
|
+
action: zod_1.z.enum(['added', 'updated', 'removed']),
|
|
24
|
+
});
|
|
21
25
|
exports.sDeviceGetChangesDto = zod_1.z.object({
|
|
22
26
|
added: zod_1.z.array(exports.sImportedDevice),
|
|
23
27
|
updated: zod_1.z.array(zod_1.z
|
|
@@ -28,6 +32,6 @@ exports.sDeviceGetChangesDto = zod_1.z.object({
|
|
|
28
32
|
})
|
|
29
33
|
.catchall(zod_1.z.unknown())),
|
|
30
34
|
removed: zod_1.z.array(any_device_1.sDeviceDto),
|
|
31
|
-
relations: zod_1.z.array(
|
|
35
|
+
relations: zod_1.z.array(exports.sRelationDeltaDto),
|
|
32
36
|
duplicates: zod_1.z.array(exports.sDuplicateDevice),
|
|
33
37
|
});
|
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.79",
|
|
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/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.79",
|
|
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",
|