@synnaxlabs/client 0.30.0 → 0.31.0
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/.turbo/turbo-build.log +6 -6
- package/api/client.api.md +615 -261
- package/dist/access/client.d.ts +2 -7
- package/dist/access/client.d.ts.map +1 -1
- package/dist/access/payload.d.ts +7 -102
- package/dist/access/payload.d.ts.map +1 -1
- package/dist/access/policy/client.d.ts +17 -0
- package/dist/access/policy/client.d.ts.map +1 -0
- package/dist/access/policy/external.d.ts +3 -0
- package/dist/access/policy/external.d.ts.map +1 -0
- package/dist/access/policy/index.d.ts +2 -0
- package/dist/access/policy/index.d.ts.map +1 -0
- package/dist/access/policy/payload.d.ts +163 -0
- package/dist/access/policy/payload.d.ts.map +1 -0
- package/dist/access/policy/policy.spec.d.ts +2 -0
- package/dist/access/policy/policy.spec.d.ts.map +1 -0
- package/dist/access/policy/retriever.d.ts +36 -0
- package/dist/access/policy/retriever.d.ts.map +1 -0
- package/dist/access/policy/writer.d.ts +9 -0
- package/dist/access/policy/writer.d.ts.map +1 -0
- package/dist/auth/auth.d.ts +6 -30
- package/dist/auth/auth.d.ts.map +1 -1
- package/dist/channel/payload.d.ts +17 -17
- package/dist/channel/payload.d.ts.map +1 -1
- package/dist/channel/retriever.d.ts +8 -8
- package/dist/client.cjs +31 -21
- package/dist/client.js +2962 -2233
- package/dist/framer/client.d.ts +4 -1
- package/dist/framer/client.d.ts.map +1 -1
- package/dist/framer/frame.d.ts +27 -80
- package/dist/framer/frame.d.ts.map +1 -1
- package/dist/framer/streamer.d.ts +3 -1
- package/dist/framer/streamer.d.ts.map +1 -1
- package/dist/framer/writer.d.ts +24 -16
- package/dist/framer/writer.d.ts.map +1 -1
- package/dist/hardware/device/client.d.ts +2 -2
- package/dist/hardware/device/payload.d.ts +1 -1
- package/dist/hardware/device/payload.d.ts.map +1 -1
- package/dist/hardware/rack/payload.d.ts +1 -1
- package/dist/hardware/rack/payload.d.ts.map +1 -1
- package/dist/hardware/task/client.d.ts +2 -2
- package/dist/hardware/task/ni/types.d.ts +16 -16
- package/dist/hardware/task/payload.d.ts +13 -13
- package/dist/hardware/task/payload.d.ts.map +1 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/label/payload.d.ts +1 -1
- package/dist/label/payload.d.ts.map +1 -1
- package/dist/label/writer.d.ts +5 -5
- package/dist/ontology/client.d.ts +32 -30
- package/dist/ontology/client.d.ts.map +1 -1
- package/dist/ontology/payload.d.ts +62 -63
- package/dist/ontology/payload.d.ts.map +1 -1
- package/dist/ranger/payload.d.ts +2 -2
- package/dist/ranger/payload.d.ts.map +1 -1
- package/dist/ranger/writer.d.ts +5 -5
- package/dist/user/client.d.ts +13 -3
- package/dist/user/client.d.ts.map +1 -1
- package/dist/user/payload.d.ts +34 -3
- package/dist/user/payload.d.ts.map +1 -1
- package/dist/user/retriever.d.ts +21 -0
- package/dist/user/retriever.d.ts.map +1 -0
- package/dist/user/user.spec.d.ts +2 -0
- package/dist/user/user.spec.d.ts.map +1 -0
- package/dist/user/writer.d.ts +11 -0
- package/dist/user/writer.d.ts.map +1 -0
- package/dist/workspace/lineplot/payload.d.ts +1 -1
- package/dist/workspace/lineplot/payload.d.ts.map +1 -1
- package/dist/workspace/payload.d.ts +1 -1
- package/dist/workspace/payload.d.ts.map +1 -1
- package/dist/workspace/schematic/client.d.ts.map +1 -1
- package/dist/workspace/schematic/payload.d.ts +1 -1
- package/dist/workspace/schematic/payload.d.ts.map +1 -1
- package/examples/node/package-lock.json +963 -134
- package/examples/node/package.json +1 -1
- package/package.json +3 -3
- package/src/access/client.ts +4 -70
- package/src/access/payload.ts +14 -24
- package/src/access/policy/client.ts +65 -0
- package/src/access/policy/external.ts +11 -0
- package/src/access/policy/index.ts +10 -0
- package/src/access/policy/payload.ts +45 -0
- package/src/access/policy/policy.spec.ts +331 -0
- package/src/access/policy/retriever.ts +43 -0
- package/src/access/policy/writer.ts +65 -0
- package/src/auth/auth.ts +32 -10
- package/src/channel/payload.ts +2 -2
- package/src/framer/client.ts +7 -1
- package/src/framer/frame.spec.ts +21 -12
- package/src/framer/frame.ts +9 -24
- package/src/framer/streamer.spec.ts +48 -0
- package/src/framer/streamer.ts +7 -4
- package/src/framer/writer.ts +0 -2
- package/src/hardware/device/payload.ts +2 -2
- package/src/hardware/rack/payload.ts +2 -2
- package/src/hardware/task/payload.ts +2 -2
- package/src/index.ts +16 -13
- package/src/label/payload.ts +2 -2
- package/src/ontology/client.ts +35 -34
- package/src/ontology/payload.ts +28 -35
- package/src/ranger/payload.ts +5 -7
- package/src/setupspecs.ts +2 -2
- package/src/user/client.ts +63 -19
- package/src/user/payload.ts +14 -7
- package/src/user/retriever.ts +41 -0
- package/src/user/user.spec.ts +289 -0
- package/src/user/writer.ts +91 -0
- package/src/workspace/lineplot/payload.ts +2 -2
- package/src/workspace/payload.ts +2 -2
- package/src/workspace/schematic/client.ts +1 -1
- package/src/workspace/schematic/payload.ts +2 -2
- package/src/workspace/workspace.spec.ts +1 -1
- package/dist/access/access.spec.d.ts +0 -2
- package/dist/access/access.spec.d.ts.map +0 -1
- package/src/access/access.spec.ts +0 -276
package/dist/access/client.d.ts
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { UnaryClient } from '@synnaxlabs/freighter';
|
|
2
|
-
import {
|
|
3
|
-
import { IDPayload } from '../ontology/payload';
|
|
2
|
+
import { policy } from './policy';
|
|
4
3
|
export declare class Client {
|
|
5
|
-
|
|
4
|
+
readonly policy: policy.Client;
|
|
6
5
|
constructor(client: UnaryClient);
|
|
7
|
-
create(policies: NewPolicyPayload): Promise<Policy>;
|
|
8
|
-
create(policies: NewPolicyPayload[]): Promise<Policy[]>;
|
|
9
|
-
retrieve(subject: IDPayload): Promise<Policy[]>;
|
|
10
|
-
delete(keys: Key | Key[]): Promise<void>;
|
|
11
6
|
}
|
|
12
7
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/access/client.ts"],"names":[],"mappings":"AASA,OAAO,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/access/client.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,qBAAa,MAAM;IACjB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;gBAEnB,MAAM,EAAE,WAAW;CAGhC"}
|
package/dist/access/payload.d.ts
CHANGED
|
@@ -1,104 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export declare const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
type: z.ZodUnion<[z.ZodLiteral<"label">, z.ZodLiteral<"builtin">, z.ZodLiteral<"cluster">, z.ZodLiteral<"channel">, z.ZodLiteral<"node">, z.ZodLiteral<"group">, z.ZodLiteral<"range">, z.ZodLiteral<"range-alias">, z.ZodLiteral<"user">, z.ZodLiteral<"workspace">, z.ZodLiteral<"schematic">, z.ZodLiteral<"lineplot">, z.ZodLiteral<"rack">, z.ZodLiteral<"device">, z.ZodLiteral<"task">, z.ZodLiteral<"policy">]>;
|
|
10
|
-
key: z.ZodString;
|
|
11
|
-
}, "strip", z.ZodTypeAny, {
|
|
12
|
-
type: "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
13
|
-
key: string;
|
|
14
|
-
}, {
|
|
15
|
-
type: "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
16
|
-
key: string;
|
|
17
|
-
}>, "many">;
|
|
18
|
-
objects: z.ZodArray<z.ZodObject<{
|
|
19
|
-
type: z.ZodUnion<[z.ZodLiteral<"label">, z.ZodLiteral<"builtin">, z.ZodLiteral<"cluster">, z.ZodLiteral<"channel">, z.ZodLiteral<"node">, z.ZodLiteral<"group">, z.ZodLiteral<"range">, z.ZodLiteral<"range-alias">, z.ZodLiteral<"user">, z.ZodLiteral<"workspace">, z.ZodLiteral<"schematic">, z.ZodLiteral<"lineplot">, z.ZodLiteral<"rack">, z.ZodLiteral<"device">, z.ZodLiteral<"task">, z.ZodLiteral<"policy">]>;
|
|
20
|
-
key: z.ZodString;
|
|
21
|
-
}, "strip", z.ZodTypeAny, {
|
|
22
|
-
type: "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
23
|
-
key: string;
|
|
24
|
-
}, {
|
|
25
|
-
type: "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
26
|
-
key: string;
|
|
27
|
-
}>, "many">;
|
|
28
|
-
actions: z.ZodArray<z.ZodString, "many">;
|
|
29
|
-
}, "strip", z.ZodTypeAny, {
|
|
30
|
-
key: string;
|
|
31
|
-
subjects: {
|
|
32
|
-
type: "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
33
|
-
key: string;
|
|
34
|
-
}[];
|
|
35
|
-
objects: {
|
|
36
|
-
type: "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
37
|
-
key: string;
|
|
38
|
-
}[];
|
|
39
|
-
actions: string[];
|
|
40
|
-
}, {
|
|
41
|
-
key: string;
|
|
42
|
-
subjects: {
|
|
43
|
-
type: "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
44
|
-
key: string;
|
|
45
|
-
}[];
|
|
46
|
-
objects: {
|
|
47
|
-
type: "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
48
|
-
key: string;
|
|
49
|
-
}[];
|
|
50
|
-
actions: string[];
|
|
51
|
-
}>;
|
|
52
|
-
export type Policy = z.infer<typeof policyZ>;
|
|
53
|
-
export declare const newPolicyPayloadZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
54
|
-
key: z.ZodString;
|
|
55
|
-
subjects: z.ZodArray<z.ZodObject<{
|
|
56
|
-
type: z.ZodUnion<[z.ZodLiteral<"label">, z.ZodLiteral<"builtin">, z.ZodLiteral<"cluster">, z.ZodLiteral<"channel">, z.ZodLiteral<"node">, z.ZodLiteral<"group">, z.ZodLiteral<"range">, z.ZodLiteral<"range-alias">, z.ZodLiteral<"user">, z.ZodLiteral<"workspace">, z.ZodLiteral<"schematic">, z.ZodLiteral<"lineplot">, z.ZodLiteral<"rack">, z.ZodLiteral<"device">, z.ZodLiteral<"task">, z.ZodLiteral<"policy">]>;
|
|
57
|
-
key: z.ZodString;
|
|
58
|
-
}, "strip", z.ZodTypeAny, {
|
|
59
|
-
type: "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
60
|
-
key: string;
|
|
61
|
-
}, {
|
|
62
|
-
type: "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
63
|
-
key: string;
|
|
64
|
-
}>, "many">;
|
|
65
|
-
objects: z.ZodArray<z.ZodObject<{
|
|
66
|
-
type: z.ZodUnion<[z.ZodLiteral<"label">, z.ZodLiteral<"builtin">, z.ZodLiteral<"cluster">, z.ZodLiteral<"channel">, z.ZodLiteral<"node">, z.ZodLiteral<"group">, z.ZodLiteral<"range">, z.ZodLiteral<"range-alias">, z.ZodLiteral<"user">, z.ZodLiteral<"workspace">, z.ZodLiteral<"schematic">, z.ZodLiteral<"lineplot">, z.ZodLiteral<"rack">, z.ZodLiteral<"device">, z.ZodLiteral<"task">, z.ZodLiteral<"policy">]>;
|
|
67
|
-
key: z.ZodString;
|
|
68
|
-
}, "strip", z.ZodTypeAny, {
|
|
69
|
-
type: "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
70
|
-
key: string;
|
|
71
|
-
}, {
|
|
72
|
-
type: "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
73
|
-
key: string;
|
|
74
|
-
}>, "many">;
|
|
75
|
-
actions: z.ZodArray<z.ZodString, "many">;
|
|
76
|
-
}, {
|
|
77
|
-
key: z.ZodOptional<z.ZodString>;
|
|
78
|
-
}>, "strip", z.ZodTypeAny, {
|
|
79
|
-
subjects: {
|
|
80
|
-
type: "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
81
|
-
key: string;
|
|
82
|
-
}[];
|
|
83
|
-
objects: {
|
|
84
|
-
type: "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
85
|
-
key: string;
|
|
86
|
-
}[];
|
|
87
|
-
actions: string[];
|
|
88
|
-
key?: string | undefined;
|
|
89
|
-
}, {
|
|
90
|
-
subjects: {
|
|
91
|
-
type: "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
92
|
-
key: string;
|
|
93
|
-
}[];
|
|
94
|
-
objects: {
|
|
95
|
-
type: "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
96
|
-
key: string;
|
|
97
|
-
}[];
|
|
98
|
-
actions: string[];
|
|
99
|
-
key?: string | undefined;
|
|
100
|
-
}>;
|
|
101
|
-
export type NewPolicyPayload = z.infer<typeof newPolicyPayloadZ>;
|
|
102
|
-
export declare const PolicyOntologyType: ontology.ResourceType;
|
|
103
|
-
export declare const ontologyID: (key: Key) => ontology.ID;
|
|
2
|
+
export declare const actionZ: z.ZodUnion<[z.ZodLiteral<"all">, z.ZodLiteral<"create">, z.ZodLiteral<"delete">, z.ZodLiteral<"retrieve">, z.ZodLiteral<"update">]>;
|
|
3
|
+
export type Action = z.infer<typeof actionZ>;
|
|
4
|
+
export declare const ALL_ACTION: Action;
|
|
5
|
+
export declare const CREATE_ACTION: Action;
|
|
6
|
+
export declare const DELETE_ACTION: Action;
|
|
7
|
+
export declare const RETRIEVE_ACTION: Action;
|
|
8
|
+
export declare const UPDATE_ACTION: Action;
|
|
104
9
|
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../src/access/payload.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../src/access/payload.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,OAAO,qIAMlB,CAAC;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAC;AAE7C,eAAO,MAAM,UAAU,EAAE,MAAc,CAAC;AACxC,eAAO,MAAM,aAAa,EAAE,MAAiB,CAAC;AAC9C,eAAO,MAAM,aAAa,EAAE,MAAiB,CAAC;AAC9C,eAAO,MAAM,eAAe,EAAE,MAAmB,CAAC;AAClD,eAAO,MAAM,aAAa,EAAE,MAAiB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { UnaryClient } from '@synnaxlabs/freighter';
|
|
2
|
+
import { Key, NewPolicy, Policy } from './payload';
|
|
3
|
+
import { ontology } from '../../ontology';
|
|
4
|
+
export declare class Client {
|
|
5
|
+
private readonly retriever;
|
|
6
|
+
private readonly writer;
|
|
7
|
+
constructor(client: UnaryClient);
|
|
8
|
+
create(policy: NewPolicy): Promise<Policy>;
|
|
9
|
+
create(policies: NewPolicy[]): Promise<Policy[]>;
|
|
10
|
+
retrieve(key: Key): Promise<Policy>;
|
|
11
|
+
retrieve(keys: Key[]): Promise<Policy[]>;
|
|
12
|
+
retrieveFor(subject: ontology.CrudeID): Promise<Policy[]>;
|
|
13
|
+
retrieveFor(subjects: ontology.CrudeID[]): Promise<Policy[]>;
|
|
14
|
+
delete(key: Key): Promise<void>;
|
|
15
|
+
delete(keys: Key[]): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/access/policy/client.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGzD,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,SAAS,EAAE,KAAK,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAGhF,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,qBAAa,MAAM;IACjB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAY;IACtC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;gBAEpB,MAAM,EAAE,WAAW;IAKzB,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC;IAE1C,MAAM,CAAC,QAAQ,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAQhD,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC;IAEnC,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAQxC,WAAW,CAAC,OAAO,EAAE,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAEzD,WAAW,CAAC,QAAQ,EAAE,QAAQ,CAAC,OAAO,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAS5D,MAAM,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAE/B,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAKzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external.d.ts","sourceRoot":"","sources":["../../../src/access/policy/external.ts"],"names":[],"mappings":"AASA,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/access/policy/index.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ontology } from '../../ontology';
|
|
3
|
+
export declare const keyZ: z.ZodString;
|
|
4
|
+
export type Key = z.infer<typeof keyZ>;
|
|
5
|
+
export declare const newPolicyZ: z.ZodObject<{
|
|
6
|
+
key: z.ZodOptional<z.ZodString>;
|
|
7
|
+
subjects: z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodString, {
|
|
8
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
9
|
+
key: string;
|
|
10
|
+
}, string>, z.ZodObject<{
|
|
11
|
+
type: z.ZodUnion<[z.ZodLiteral<"label">, z.ZodLiteral<"allow_all">, z.ZodLiteral<"builtin">, z.ZodLiteral<"cluster">, z.ZodLiteral<"channel">, z.ZodLiteral<"node">, z.ZodLiteral<"group">, z.ZodLiteral<"range">, z.ZodLiteral<"framer">, z.ZodLiteral<"range-alias">, z.ZodLiteral<"user">, z.ZodLiteral<"workspace">, z.ZodLiteral<"schematic">, z.ZodLiteral<"lineplot">, z.ZodLiteral<"rack">, z.ZodLiteral<"device">, z.ZodLiteral<"task">, z.ZodLiteral<"policy">]>;
|
|
12
|
+
key: z.ZodString;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
15
|
+
key: string;
|
|
16
|
+
}, {
|
|
17
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
18
|
+
key: string;
|
|
19
|
+
}>]>, "many">, z.ZodUnion<[z.ZodEffects<z.ZodString, {
|
|
20
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
21
|
+
key: string;
|
|
22
|
+
}, string>, z.ZodObject<{
|
|
23
|
+
type: z.ZodUnion<[z.ZodLiteral<"label">, z.ZodLiteral<"allow_all">, z.ZodLiteral<"builtin">, z.ZodLiteral<"cluster">, z.ZodLiteral<"channel">, z.ZodLiteral<"node">, z.ZodLiteral<"group">, z.ZodLiteral<"range">, z.ZodLiteral<"framer">, z.ZodLiteral<"range-alias">, z.ZodLiteral<"user">, z.ZodLiteral<"workspace">, z.ZodLiteral<"schematic">, z.ZodLiteral<"lineplot">, z.ZodLiteral<"rack">, z.ZodLiteral<"device">, z.ZodLiteral<"task">, z.ZodLiteral<"policy">]>;
|
|
24
|
+
key: z.ZodString;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
27
|
+
key: string;
|
|
28
|
+
}, {
|
|
29
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
30
|
+
key: string;
|
|
31
|
+
}>]>]>;
|
|
32
|
+
objects: z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodString, {
|
|
33
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
34
|
+
key: string;
|
|
35
|
+
}, string>, z.ZodObject<{
|
|
36
|
+
type: z.ZodUnion<[z.ZodLiteral<"label">, z.ZodLiteral<"allow_all">, z.ZodLiteral<"builtin">, z.ZodLiteral<"cluster">, z.ZodLiteral<"channel">, z.ZodLiteral<"node">, z.ZodLiteral<"group">, z.ZodLiteral<"range">, z.ZodLiteral<"framer">, z.ZodLiteral<"range-alias">, z.ZodLiteral<"user">, z.ZodLiteral<"workspace">, z.ZodLiteral<"schematic">, z.ZodLiteral<"lineplot">, z.ZodLiteral<"rack">, z.ZodLiteral<"device">, z.ZodLiteral<"task">, z.ZodLiteral<"policy">]>;
|
|
37
|
+
key: z.ZodString;
|
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
|
39
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
40
|
+
key: string;
|
|
41
|
+
}, {
|
|
42
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
43
|
+
key: string;
|
|
44
|
+
}>]>, "many">, z.ZodUnion<[z.ZodEffects<z.ZodString, {
|
|
45
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
46
|
+
key: string;
|
|
47
|
+
}, string>, z.ZodObject<{
|
|
48
|
+
type: z.ZodUnion<[z.ZodLiteral<"label">, z.ZodLiteral<"allow_all">, z.ZodLiteral<"builtin">, z.ZodLiteral<"cluster">, z.ZodLiteral<"channel">, z.ZodLiteral<"node">, z.ZodLiteral<"group">, z.ZodLiteral<"range">, z.ZodLiteral<"framer">, z.ZodLiteral<"range-alias">, z.ZodLiteral<"user">, z.ZodLiteral<"workspace">, z.ZodLiteral<"schematic">, z.ZodLiteral<"lineplot">, z.ZodLiteral<"rack">, z.ZodLiteral<"device">, z.ZodLiteral<"task">, z.ZodLiteral<"policy">]>;
|
|
49
|
+
key: z.ZodString;
|
|
50
|
+
}, "strip", z.ZodTypeAny, {
|
|
51
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
52
|
+
key: string;
|
|
53
|
+
}, {
|
|
54
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
55
|
+
key: string;
|
|
56
|
+
}>]>]>;
|
|
57
|
+
actions: z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodLiteral<"all">, z.ZodLiteral<"create">, z.ZodLiteral<"delete">, z.ZodLiteral<"retrieve">, z.ZodLiteral<"update">]>, "many">, z.ZodUnion<[z.ZodLiteral<"all">, z.ZodLiteral<"create">, z.ZodLiteral<"delete">, z.ZodLiteral<"retrieve">, z.ZodLiteral<"update">]>]>;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
subjects: {
|
|
60
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
61
|
+
key: string;
|
|
62
|
+
} | {
|
|
63
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
64
|
+
key: string;
|
|
65
|
+
} | ({
|
|
66
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
67
|
+
key: string;
|
|
68
|
+
} | {
|
|
69
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
70
|
+
key: string;
|
|
71
|
+
})[];
|
|
72
|
+
objects: {
|
|
73
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
74
|
+
key: string;
|
|
75
|
+
} | {
|
|
76
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
77
|
+
key: string;
|
|
78
|
+
} | ({
|
|
79
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
80
|
+
key: string;
|
|
81
|
+
} | {
|
|
82
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
83
|
+
key: string;
|
|
84
|
+
})[];
|
|
85
|
+
actions: "all" | "create" | "delete" | "retrieve" | "update" | ("all" | "create" | "delete" | "retrieve" | "update")[];
|
|
86
|
+
key?: string | undefined;
|
|
87
|
+
}, {
|
|
88
|
+
subjects: string | {
|
|
89
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
90
|
+
key: string;
|
|
91
|
+
} | (string | {
|
|
92
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
93
|
+
key: string;
|
|
94
|
+
})[];
|
|
95
|
+
objects: string | {
|
|
96
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
97
|
+
key: string;
|
|
98
|
+
} | (string | {
|
|
99
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
100
|
+
key: string;
|
|
101
|
+
})[];
|
|
102
|
+
actions: "all" | "create" | "delete" | "retrieve" | "update" | ("all" | "create" | "delete" | "retrieve" | "update")[];
|
|
103
|
+
key?: string | undefined;
|
|
104
|
+
}>;
|
|
105
|
+
export type NewPolicy = z.input<typeof newPolicyZ>;
|
|
106
|
+
export declare const policyZ: z.ZodObject<{
|
|
107
|
+
key: z.ZodString;
|
|
108
|
+
subjects: z.ZodUnion<[z.ZodEffects<z.ZodNull, {
|
|
109
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
110
|
+
key: string;
|
|
111
|
+
}[], null>, z.ZodArray<z.ZodObject<{
|
|
112
|
+
type: z.ZodUnion<[z.ZodLiteral<"label">, z.ZodLiteral<"allow_all">, z.ZodLiteral<"builtin">, z.ZodLiteral<"cluster">, z.ZodLiteral<"channel">, z.ZodLiteral<"node">, z.ZodLiteral<"group">, z.ZodLiteral<"range">, z.ZodLiteral<"framer">, z.ZodLiteral<"range-alias">, z.ZodLiteral<"user">, z.ZodLiteral<"workspace">, z.ZodLiteral<"schematic">, z.ZodLiteral<"lineplot">, z.ZodLiteral<"rack">, z.ZodLiteral<"device">, z.ZodLiteral<"task">, z.ZodLiteral<"policy">]>;
|
|
113
|
+
key: z.ZodString;
|
|
114
|
+
}, "strip", z.ZodTypeAny, {
|
|
115
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
116
|
+
key: string;
|
|
117
|
+
}, {
|
|
118
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
119
|
+
key: string;
|
|
120
|
+
}>, "many">]>;
|
|
121
|
+
objects: z.ZodUnion<[z.ZodEffects<z.ZodNull, {
|
|
122
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
123
|
+
key: string;
|
|
124
|
+
}[], null>, z.ZodArray<z.ZodObject<{
|
|
125
|
+
type: z.ZodUnion<[z.ZodLiteral<"label">, z.ZodLiteral<"allow_all">, z.ZodLiteral<"builtin">, z.ZodLiteral<"cluster">, z.ZodLiteral<"channel">, z.ZodLiteral<"node">, z.ZodLiteral<"group">, z.ZodLiteral<"range">, z.ZodLiteral<"framer">, z.ZodLiteral<"range-alias">, z.ZodLiteral<"user">, z.ZodLiteral<"workspace">, z.ZodLiteral<"schematic">, z.ZodLiteral<"lineplot">, z.ZodLiteral<"rack">, z.ZodLiteral<"device">, z.ZodLiteral<"task">, z.ZodLiteral<"policy">]>;
|
|
126
|
+
key: z.ZodString;
|
|
127
|
+
}, "strip", z.ZodTypeAny, {
|
|
128
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
129
|
+
key: string;
|
|
130
|
+
}, {
|
|
131
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
132
|
+
key: string;
|
|
133
|
+
}>, "many">]>;
|
|
134
|
+
actions: z.ZodUnion<[z.ZodEffects<z.ZodNull, ("all" | "create" | "delete" | "retrieve" | "update")[], null>, z.ZodArray<z.ZodUnion<[z.ZodLiteral<"all">, z.ZodLiteral<"create">, z.ZodLiteral<"delete">, z.ZodLiteral<"retrieve">, z.ZodLiteral<"update">]>, "many">]>;
|
|
135
|
+
}, "strip", z.ZodTypeAny, {
|
|
136
|
+
key: string;
|
|
137
|
+
subjects: {
|
|
138
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
139
|
+
key: string;
|
|
140
|
+
}[];
|
|
141
|
+
objects: {
|
|
142
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
143
|
+
key: string;
|
|
144
|
+
}[];
|
|
145
|
+
actions: ("all" | "create" | "delete" | "retrieve" | "update")[];
|
|
146
|
+
}, {
|
|
147
|
+
key: string;
|
|
148
|
+
subjects: {
|
|
149
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
150
|
+
key: string;
|
|
151
|
+
}[] | null;
|
|
152
|
+
objects: {
|
|
153
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
154
|
+
key: string;
|
|
155
|
+
}[] | null;
|
|
156
|
+
actions: ("all" | "create" | "delete" | "retrieve" | "update")[] | null;
|
|
157
|
+
}>;
|
|
158
|
+
export type Policy = z.infer<typeof policyZ>;
|
|
159
|
+
export declare const ONTOLOGY_TYPE: ontology.ResourceType;
|
|
160
|
+
export declare const ontologyID: (key: Key) => ontology.ID;
|
|
161
|
+
export declare const ALLOW_ALL_ONTOLOGY_TYPE: ontology.ResourceType;
|
|
162
|
+
export declare const ALLOW_ALL_ONTOLOGY_ID: ontology.ID;
|
|
163
|
+
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../src/access/policy/payload.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,eAAO,MAAM,IAAI,aAAoB,CAAC;AACtC,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAEvC,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKrB,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEnD,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKlB,CAAC;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAC;AAE7C,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,YAAuB,CAAC;AAE7D,eAAO,MAAM,UAAU,QAAS,GAAG,KAAG,QAAQ,CAAC,EACA,CAAC;AAEhD,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,YAA0B,CAAC;AAE1E,eAAO,MAAM,qBAAqB,aAGhC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policy.spec.d.ts","sourceRoot":"","sources":["../../../src/access/policy/policy.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { UnaryClient } from '@synnaxlabs/freighter';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { Policy } from './payload';
|
|
4
|
+
declare const reqZ: z.ZodObject<{
|
|
5
|
+
keys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
6
|
+
subjects: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
7
|
+
type: z.ZodUnion<[z.ZodLiteral<"label">, z.ZodLiteral<"allow_all">, z.ZodLiteral<"builtin">, z.ZodLiteral<"cluster">, z.ZodLiteral<"channel">, z.ZodLiteral<"node">, z.ZodLiteral<"group">, z.ZodLiteral<"range">, z.ZodLiteral<"framer">, z.ZodLiteral<"range-alias">, z.ZodLiteral<"user">, z.ZodLiteral<"workspace">, z.ZodLiteral<"schematic">, z.ZodLiteral<"lineplot">, z.ZodLiteral<"rack">, z.ZodLiteral<"device">, z.ZodLiteral<"task">, z.ZodLiteral<"policy">]>;
|
|
8
|
+
key: z.ZodString;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
11
|
+
key: string;
|
|
12
|
+
}, {
|
|
13
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
14
|
+
key: string;
|
|
15
|
+
}>, "many">>;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
keys?: string[] | undefined;
|
|
18
|
+
subjects?: {
|
|
19
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
20
|
+
key: string;
|
|
21
|
+
}[] | undefined;
|
|
22
|
+
}, {
|
|
23
|
+
keys?: string[] | undefined;
|
|
24
|
+
subjects?: {
|
|
25
|
+
type: "label" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy";
|
|
26
|
+
key: string;
|
|
27
|
+
}[] | undefined;
|
|
28
|
+
}>;
|
|
29
|
+
type Request = z.infer<typeof reqZ>;
|
|
30
|
+
export declare class Retriever {
|
|
31
|
+
private readonly client;
|
|
32
|
+
constructor(client: UnaryClient);
|
|
33
|
+
retrieve(req: Request): Promise<Policy[]>;
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=retriever.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retriever.d.ts","sourceRoot":"","sources":["../../../src/access/policy/retriever.ts"],"names":[],"mappings":"AASA,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAQ,KAAK,MAAM,EAAW,MAAM,yBAAyB,CAAC;AAIrE,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;EAGR,CAAC;AACH,KAAK,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAKpC,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;gBAEzB,MAAM,EAAE,WAAW;IAIzB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAUhD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UnaryClient } from '@synnaxlabs/freighter';
|
|
2
|
+
import { Key, NewPolicy, Policy } from './payload';
|
|
3
|
+
export declare class Writer {
|
|
4
|
+
private readonly client;
|
|
5
|
+
constructor(client: UnaryClient);
|
|
6
|
+
create(policies: NewPolicy | NewPolicy[]): Promise<Policy[]>;
|
|
7
|
+
delete(keys: Key | Key[]): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=writer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"writer.d.ts","sourceRoot":"","sources":["../../../src/access/policy/writer.ts"],"names":[],"mappings":"AASA,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIvE,OAAO,EACL,KAAK,GAAG,EAER,KAAK,SAAS,EAEd,KAAK,MAAM,EAEZ,MAAM,yBAAyB,CAAC;AAWjC,qBAAa,MAAM;IACjB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;gBAEzB,MAAM,EAAE,WAAW;IAIzB,MAAM,CAAC,QAAQ,EAAE,SAAS,GAAG,SAAS,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAiB5D,MAAM,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAS/C"}
|
package/dist/auth/auth.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Middleware, UnaryClient } from '@synnaxlabs/freighter';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { user } from '../user';
|
|
4
|
-
|
|
4
|
+
declare const insecureCredentialsZ: z.ZodObject<{
|
|
5
5
|
username: z.ZodString;
|
|
6
6
|
password: z.ZodString;
|
|
7
7
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -11,42 +11,18 @@ export declare const insecureCredentialsZ: z.ZodObject<{
|
|
|
11
11
|
username: string;
|
|
12
12
|
password: string;
|
|
13
13
|
}>;
|
|
14
|
-
|
|
15
|
-
export declare const tokenResponseZ: z.ZodObject<{
|
|
16
|
-
token: z.ZodString;
|
|
17
|
-
user: z.ZodObject<{
|
|
18
|
-
key: z.ZodString;
|
|
19
|
-
username: z.ZodString;
|
|
20
|
-
}, "strip", z.ZodTypeAny, {
|
|
21
|
-
key: string;
|
|
22
|
-
username: string;
|
|
23
|
-
}, {
|
|
24
|
-
key: string;
|
|
25
|
-
username: string;
|
|
26
|
-
}>;
|
|
27
|
-
}, "strip", z.ZodTypeAny, {
|
|
28
|
-
user: {
|
|
29
|
-
key: string;
|
|
30
|
-
username: string;
|
|
31
|
-
};
|
|
32
|
-
token: string;
|
|
33
|
-
}, {
|
|
34
|
-
user: {
|
|
35
|
-
key: string;
|
|
36
|
-
username: string;
|
|
37
|
-
};
|
|
38
|
-
token: string;
|
|
39
|
-
}>;
|
|
40
|
-
export type TokenResponse = z.infer<typeof tokenResponseZ>;
|
|
14
|
+
type InsecureCredentials = z.infer<typeof insecureCredentialsZ>;
|
|
41
15
|
export declare class Client {
|
|
42
16
|
token: string | undefined;
|
|
43
17
|
private readonly client;
|
|
44
18
|
private readonly credentials;
|
|
45
|
-
|
|
19
|
+
authenticating: Promise<Error | null> | undefined;
|
|
46
20
|
authenticated: boolean;
|
|
47
|
-
user: user.
|
|
21
|
+
user: user.User | undefined;
|
|
48
22
|
private retryCount;
|
|
49
23
|
constructor(client: UnaryClient, credentials: InsecureCredentials);
|
|
24
|
+
changePassword(newPassword: string): Promise<void>;
|
|
50
25
|
middleware(): Middleware;
|
|
51
26
|
}
|
|
27
|
+
export {};
|
|
52
28
|
//# sourceMappingURL=auth.d.ts.map
|
package/dist/auth/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/auth/auth.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,UAAU,
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/auth/auth.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,UAAU,EAAgB,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,QAAA,MAAM,oBAAoB;;;;;;;;;EAGxB,CAAC;AACH,KAAK,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAoBhE,qBAAa,MAAM;IACjB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;IACrC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAsB;IAClD,cAAc,EAAE,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC;IAClD,aAAa,EAAE,OAAO,CAAC;IACvB,IAAI,EAAE,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC;IAC5B,OAAO,CAAC,UAAU,CAAS;gBAEf,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,mBAAmB;IAO3D,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBxD,UAAU,IAAI,UAAU;CAqCzB"}
|
|
@@ -21,26 +21,26 @@ export declare const payload: z.ZodObject<{
|
|
|
21
21
|
virtual: z.ZodBoolean;
|
|
22
22
|
alias: z.ZodOptional<z.ZodString>;
|
|
23
23
|
}, "strip", z.ZodTypeAny, {
|
|
24
|
-
leaseholder: number;
|
|
25
|
-
virtual: boolean;
|
|
26
|
-
isIndex: boolean;
|
|
27
|
-
internal: boolean;
|
|
28
24
|
name: string;
|
|
29
25
|
key: number;
|
|
30
26
|
rate: Rate;
|
|
31
27
|
dataType: DataType;
|
|
32
|
-
index: number;
|
|
33
|
-
alias?: string | undefined;
|
|
34
|
-
}, {
|
|
35
28
|
leaseholder: number;
|
|
36
|
-
|
|
29
|
+
index: number;
|
|
37
30
|
isIndex: boolean;
|
|
38
31
|
internal: boolean;
|
|
32
|
+
virtual: boolean;
|
|
33
|
+
alias?: string | undefined;
|
|
34
|
+
}, {
|
|
39
35
|
name: string;
|
|
40
36
|
key: number;
|
|
41
37
|
rate: number | Number | Rate;
|
|
42
38
|
dataType: string | DataType;
|
|
39
|
+
leaseholder: number;
|
|
43
40
|
index: number;
|
|
41
|
+
isIndex: boolean;
|
|
42
|
+
internal: boolean;
|
|
43
|
+
virtual: boolean;
|
|
44
44
|
alias?: string | undefined;
|
|
45
45
|
}>;
|
|
46
46
|
export type Payload = z.infer<typeof payload>;
|
|
@@ -64,29 +64,29 @@ export declare const newPayload: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
64
64
|
internal: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
65
65
|
virtual: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
66
66
|
}>, "strip", z.ZodTypeAny, {
|
|
67
|
-
virtual: boolean;
|
|
68
|
-
internal: boolean;
|
|
69
67
|
name: string;
|
|
70
68
|
rate: Rate;
|
|
71
69
|
dataType: DataType;
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
internal: boolean;
|
|
71
|
+
virtual: boolean;
|
|
74
72
|
key?: number | undefined;
|
|
73
|
+
leaseholder?: number | undefined;
|
|
75
74
|
index?: number | undefined;
|
|
75
|
+
isIndex?: boolean | undefined;
|
|
76
76
|
alias?: string | undefined;
|
|
77
77
|
}, {
|
|
78
78
|
name: string;
|
|
79
79
|
dataType: string | DataType;
|
|
80
|
-
leaseholder?: number | undefined;
|
|
81
|
-
virtual?: boolean | undefined;
|
|
82
|
-
isIndex?: boolean | undefined;
|
|
83
|
-
internal?: boolean | undefined;
|
|
84
80
|
key?: number | undefined;
|
|
85
81
|
rate?: number | Number | Rate | undefined;
|
|
82
|
+
leaseholder?: number | undefined;
|
|
86
83
|
index?: number | undefined;
|
|
84
|
+
isIndex?: boolean | undefined;
|
|
85
|
+
internal?: boolean | undefined;
|
|
86
|
+
virtual?: boolean | undefined;
|
|
87
87
|
alias?: string | undefined;
|
|
88
88
|
}>;
|
|
89
89
|
export type NewPayload = z.input<typeof newPayload>;
|
|
90
|
-
export declare const
|
|
90
|
+
export declare const ONTOLOGY_TYPE: ontology.ResourceType;
|
|
91
91
|
export declare const ontologyID: (key: Key) => ontology.ID;
|
|
92
92
|
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../src/channel/payload.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,eAAO,MAAM,IAAI,aAAa,CAAC;AAC/B,MAAM,MAAM,GAAG,GAAG,MAAM,CAAC;AACzB,MAAM,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC;AAC5B,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC;AAC1B,MAAM,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC;AAC7B,MAAM,MAAM,SAAS,GAAG,GAAG,GAAG,IAAI,CAAC;AACnC,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,KAAK,CAAC;AACvC,MAAM,MAAM,MAAM,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AAE/C,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWlB,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAC;AAE9C,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQrB,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../src/channel/payload.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,eAAO,MAAM,IAAI,aAAa,CAAC;AAC/B,MAAM,MAAM,GAAG,GAAG,MAAM,CAAC;AACzB,MAAM,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC;AAC5B,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC;AAC1B,MAAM,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC;AAC7B,MAAM,MAAM,SAAS,GAAG,GAAG,GAAG,IAAI,CAAC;AACnC,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,KAAK,CAAC;AACvC,MAAM,MAAM,MAAM,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AAE/C,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWlB,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAC;AAE9C,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQrB,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,YAAwB,CAAC;AAE9D,eAAO,MAAM,UAAU,QAAS,GAAG,KAAG,QAAQ,CAAC,EACgB,CAAC"}
|
|
@@ -19,29 +19,29 @@ declare const reqZ: z.ZodObject<{
|
|
|
19
19
|
}, "strip", z.ZodTypeAny, {
|
|
20
20
|
keys?: number[] | undefined;
|
|
21
21
|
leaseholder?: number | undefined;
|
|
22
|
-
|
|
22
|
+
isIndex?: boolean | undefined;
|
|
23
|
+
internal?: boolean | undefined;
|
|
24
|
+
virtual?: boolean | undefined;
|
|
23
25
|
search?: string | undefined;
|
|
26
|
+
names?: string[] | undefined;
|
|
24
27
|
rangeKey?: string | undefined;
|
|
25
28
|
limit?: number | undefined;
|
|
26
29
|
offset?: number | undefined;
|
|
27
30
|
dataTypes?: DataType[] | undefined;
|
|
28
31
|
notDataTypes?: DataType[] | undefined;
|
|
29
|
-
virtual?: boolean | undefined;
|
|
30
|
-
isIndex?: boolean | undefined;
|
|
31
|
-
internal?: boolean | undefined;
|
|
32
32
|
}, {
|
|
33
33
|
keys?: number[] | undefined;
|
|
34
34
|
leaseholder?: number | undefined;
|
|
35
|
-
|
|
35
|
+
isIndex?: boolean | undefined;
|
|
36
|
+
internal?: boolean | undefined;
|
|
37
|
+
virtual?: boolean | undefined;
|
|
36
38
|
search?: string | undefined;
|
|
39
|
+
names?: string[] | undefined;
|
|
37
40
|
rangeKey?: string | undefined;
|
|
38
41
|
limit?: number | undefined;
|
|
39
42
|
offset?: number | undefined;
|
|
40
43
|
dataTypes?: (string | DataType)[] | undefined;
|
|
41
44
|
notDataTypes?: (string | DataType)[] | undefined;
|
|
42
|
-
virtual?: boolean | undefined;
|
|
43
|
-
isIndex?: boolean | undefined;
|
|
44
|
-
internal?: boolean | undefined;
|
|
45
45
|
}>;
|
|
46
46
|
type Request = z.input<typeof reqZ>;
|
|
47
47
|
export type RetrieveOptions = Omit<Request, "keys" | "names" | "search">;
|