aegis-platform-sdk 0.1.0 → 1.3.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/CHANGELOG.md +127 -11
- package/README.md +144 -105
- package/dist/cli.js +3830 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.cjs +3989 -63
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2286 -110
- package/dist/index.d.ts +2286 -110
- package/dist/index.js +3906 -62
- package/dist/index.js.map +1 -1
- package/package.json +58 -53
- package/skills/aegis-sdk/SKILL.md +140 -88
package/dist/index.js
CHANGED
|
@@ -20,10 +20,27 @@ var NotFoundError = class extends AegisAPIError {
|
|
|
20
20
|
|
|
21
21
|
// src/transport.ts
|
|
22
22
|
function buildUrl(baseUrl, path, params) {
|
|
23
|
-
const
|
|
23
|
+
const raw = baseUrl.replace(/\/+$/, "") + path;
|
|
24
|
+
let url;
|
|
25
|
+
if (/^[a-z][a-z0-9+.-]*:\/\//i.test(raw)) {
|
|
26
|
+
url = new URL(raw);
|
|
27
|
+
} else {
|
|
28
|
+
const origin = globalThis.location?.origin;
|
|
29
|
+
if (!origin) {
|
|
30
|
+
throw new Error(
|
|
31
|
+
`relative baseUrl "${baseUrl}" requires a browser origin \u2014 use an absolute URL in Node`
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
url = new URL(raw, origin);
|
|
35
|
+
}
|
|
24
36
|
if (params) {
|
|
25
37
|
for (const [key, value] of Object.entries(params)) {
|
|
26
|
-
if (value
|
|
38
|
+
if (value === void 0 || value === null) continue;
|
|
39
|
+
if (Array.isArray(value)) {
|
|
40
|
+
for (const item of value) url.searchParams.append(key, String(item));
|
|
41
|
+
} else {
|
|
42
|
+
url.searchParams.set(key, String(value));
|
|
43
|
+
}
|
|
27
44
|
}
|
|
28
45
|
}
|
|
29
46
|
return url.toString();
|
|
@@ -49,19 +66,96 @@ async function handleResponse(res) {
|
|
|
49
66
|
throw new AegisAPIError(res.status, detail || text, payload);
|
|
50
67
|
}
|
|
51
68
|
|
|
69
|
+
// src/sse.ts
|
|
70
|
+
async function* parseSseStream(stream) {
|
|
71
|
+
const reader = stream.getReader();
|
|
72
|
+
const decoder = new TextDecoder();
|
|
73
|
+
let buffer = "";
|
|
74
|
+
let event = "";
|
|
75
|
+
let data = [];
|
|
76
|
+
let id;
|
|
77
|
+
let retry;
|
|
78
|
+
const flush = () => {
|
|
79
|
+
if (data.length === 0) {
|
|
80
|
+
event = "";
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
const ev = { event: event || "message", data: data.join("\n") };
|
|
84
|
+
if (id !== void 0) ev.id = id;
|
|
85
|
+
if (retry !== void 0) ev.retry = retry;
|
|
86
|
+
event = "";
|
|
87
|
+
data = [];
|
|
88
|
+
return ev;
|
|
89
|
+
};
|
|
90
|
+
const handleLine = (line) => {
|
|
91
|
+
if (line === "") return flush();
|
|
92
|
+
if (line.startsWith(":")) return null;
|
|
93
|
+
const colon = line.indexOf(":");
|
|
94
|
+
const field = colon === -1 ? line : line.slice(0, colon);
|
|
95
|
+
let value = colon === -1 ? "" : line.slice(colon + 1);
|
|
96
|
+
if (value.startsWith(" ")) value = value.slice(1);
|
|
97
|
+
switch (field) {
|
|
98
|
+
case "event":
|
|
99
|
+
event = value;
|
|
100
|
+
break;
|
|
101
|
+
case "data":
|
|
102
|
+
data.push(value);
|
|
103
|
+
break;
|
|
104
|
+
case "id":
|
|
105
|
+
id = value;
|
|
106
|
+
break;
|
|
107
|
+
case "retry": {
|
|
108
|
+
const n = Number(value);
|
|
109
|
+
if (Number.isFinite(n)) retry = n;
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return null;
|
|
114
|
+
};
|
|
115
|
+
try {
|
|
116
|
+
for (; ; ) {
|
|
117
|
+
const { done, value } = await reader.read();
|
|
118
|
+
if (done) break;
|
|
119
|
+
buffer += decoder.decode(value, { stream: true });
|
|
120
|
+
let newline;
|
|
121
|
+
while ((newline = buffer.search(/\r\n|\n|\r/)) !== -1) {
|
|
122
|
+
const line = buffer.slice(0, newline);
|
|
123
|
+
buffer = buffer.slice(newline + (buffer[newline] === "\r" && buffer[newline + 1] === "\n" ? 2 : 1));
|
|
124
|
+
const ev = handleLine(line);
|
|
125
|
+
if (ev) yield ev;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
if (buffer) handleLine(buffer);
|
|
129
|
+
const tail = flush();
|
|
130
|
+
if (tail) yield tail;
|
|
131
|
+
} finally {
|
|
132
|
+
reader.releaseLock();
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
52
136
|
// src/resources/auth.ts
|
|
53
137
|
var AuthResource = class {
|
|
54
|
-
constructor(t,
|
|
138
|
+
constructor(t, attach) {
|
|
55
139
|
this.t = t;
|
|
56
|
-
this.
|
|
140
|
+
this.attach = attach;
|
|
57
141
|
}
|
|
58
142
|
t;
|
|
59
|
-
|
|
143
|
+
attach;
|
|
60
144
|
async login(username, password, opts = {}) {
|
|
61
145
|
const body = { username, password };
|
|
62
146
|
if (opts.totpCode) body.totp_code = opts.totpCode;
|
|
63
147
|
const pair = await this.t.request("POST", "/auth/login", { json: body });
|
|
64
|
-
if (opts.attach !== false) this.
|
|
148
|
+
if (opts.attach !== false) this.attach(pair);
|
|
149
|
+
return pair;
|
|
150
|
+
}
|
|
151
|
+
/** Rotate a refresh token explicitly (`POST /auth/refresh`). The client
|
|
152
|
+
* already does this transparently on 401 — call this only for manual
|
|
153
|
+
* flows. Attaches the new pair unless `attach: false`. */
|
|
154
|
+
async refresh(refreshToken, opts = {}) {
|
|
155
|
+
const pair = await this.t.request("POST", "/auth/refresh", {
|
|
156
|
+
json: { refresh_token: refreshToken }
|
|
157
|
+
});
|
|
158
|
+
if (opts.attach !== false) this.attach(pair);
|
|
65
159
|
return pair;
|
|
66
160
|
}
|
|
67
161
|
me() {
|
|
@@ -617,72 +711,3822 @@ var DatasetsResource = class {
|
|
|
617
711
|
}
|
|
618
712
|
};
|
|
619
713
|
|
|
620
|
-
// src/
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
}
|
|
625
|
-
var AegisClient = class {
|
|
626
|
-
baseUrl;
|
|
627
|
-
_token;
|
|
628
|
-
timeoutMs;
|
|
629
|
-
_fetch;
|
|
630
|
-
auth;
|
|
631
|
-
iam;
|
|
632
|
-
osdk;
|
|
633
|
-
operator;
|
|
634
|
-
ontology;
|
|
635
|
-
aip;
|
|
636
|
-
functions;
|
|
637
|
-
codeRepositories;
|
|
638
|
-
datasets;
|
|
639
|
-
constructor(options = {}) {
|
|
640
|
-
const baseUrl = options.baseUrl ?? envVar("AEGIS_API_URL") ?? "http://localhost:8002";
|
|
641
|
-
this.baseUrl = baseUrl.replace(/\/+$/, "");
|
|
642
|
-
this._token = options.token ?? envVar("AEGIS_TOKEN") ?? null;
|
|
643
|
-
this.timeoutMs = options.timeoutMs ?? 15e3;
|
|
644
|
-
this._fetch = options.fetch ?? globalThis.fetch.bind(globalThis);
|
|
645
|
-
this.auth = new AuthResource(this, (t) => this.setToken(t));
|
|
646
|
-
this.iam = new IamResource(this);
|
|
647
|
-
this.osdk = new OsdkResource(this);
|
|
648
|
-
this.operator = new OperatorResource(this);
|
|
649
|
-
this.ontology = new OntologyResource(this);
|
|
650
|
-
this.aip = new AipResource(this);
|
|
651
|
-
this.functions = new FunctionsResource(this);
|
|
652
|
-
this.codeRepositories = new CodeRepositoriesResource(this);
|
|
653
|
-
this.datasets = new DatasetsResource(this);
|
|
714
|
+
// src/resources/reading.ts
|
|
715
|
+
var GeoResource = class {
|
|
716
|
+
constructor(t) {
|
|
717
|
+
this.t = t;
|
|
654
718
|
}
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
this.
|
|
719
|
+
t;
|
|
720
|
+
nodes(opts = {}) {
|
|
721
|
+
return this.t.request("GET", "/api/v1/geo/nodes", { params: opts });
|
|
658
722
|
}
|
|
659
|
-
|
|
660
|
-
return this.
|
|
723
|
+
nodeTypes() {
|
|
724
|
+
return this.t.request("GET", "/api/v1/geo/node-types");
|
|
661
725
|
}
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
726
|
+
sources() {
|
|
727
|
+
return this.t.request("GET", "/api/v1/geo/sources");
|
|
728
|
+
}
|
|
729
|
+
edges(nodeIds, relationTypes) {
|
|
730
|
+
return this.t.request("GET", "/api/v1/geo/edges", {
|
|
731
|
+
params: { node_ids: nodeIds.join(","), relation_types: relationTypes?.join(",") }
|
|
732
|
+
});
|
|
733
|
+
}
|
|
734
|
+
/** Catalog of keyless reference layers (IBGE limits, CNES health, …). */
|
|
735
|
+
referenceLayers() {
|
|
736
|
+
return this.t.request("GET", "/api/v1/geo/reference-layers");
|
|
737
|
+
}
|
|
738
|
+
/** GeoJSON of one reference layer (resilient keyless proxy). */
|
|
739
|
+
referenceLayer(layerId, opts = {}) {
|
|
740
|
+
return this.t.request("GET", `/api/v1/geo/reference-layers/${encodeURIComponent(layerId)}`, {
|
|
741
|
+
params: opts
|
|
742
|
+
});
|
|
743
|
+
}
|
|
744
|
+
zones() {
|
|
745
|
+
return this.t.request("GET", "/api/v1/geo/zones");
|
|
746
|
+
}
|
|
747
|
+
importZones(features, opts = {}) {
|
|
748
|
+
return this.t.request("POST", "/api/v1/geo/zones/import", { json: { features, ...opts } });
|
|
749
|
+
}
|
|
750
|
+
deleteZone(zoneId) {
|
|
751
|
+
return this.t.request("DELETE", `/api/v1/geo/zones/${zoneId}`);
|
|
752
|
+
}
|
|
753
|
+
// ── Reference Layer Builder (the AEGIS "My Maps") ──────────────────────
|
|
754
|
+
//
|
|
755
|
+
// Each layer is one editable dataset + one DAG board + one dedicated
|
|
756
|
+
// node_type. Publishing runs the board; the materialized nodes show up on
|
|
757
|
+
// their own under the map's "Reference layers" tab.
|
|
758
|
+
// Read: `security.geo.view`; write: `security.geo.camada.manage`.
|
|
759
|
+
/** Builder layers of the tenant, grouped by "map" (the project). */
|
|
760
|
+
layers() {
|
|
761
|
+
return this.t.request("GET", "/api/v1/geo/layers");
|
|
762
|
+
}
|
|
763
|
+
/** Creates a layer (empty inline dataset + published board). The
|
|
764
|
+
* `node_type` derives from the name and is IMMUTABLE. */
|
|
765
|
+
createLayer(input) {
|
|
766
|
+
return this.t.request("POST", "/api/v1/geo/layers", { json: input });
|
|
767
|
+
}
|
|
768
|
+
layerFeatures(boardId) {
|
|
769
|
+
return this.t.request("GET", `/api/v1/geo/layers/${boardId}/features`);
|
|
770
|
+
}
|
|
771
|
+
/** Saves the drawing as a versioned SNAPSHOT. `geometry` is GeoJSON
|
|
772
|
+
* `[lng,lat]`; `geo_style` travels PER FEATURE (colour/alpha/extrusion). */
|
|
773
|
+
saveLayerFeatures(boardId, rows) {
|
|
774
|
+
return this.t.request("PUT", `/api/v1/geo/layers/${boardId}/features`, {
|
|
775
|
+
json: { rows }
|
|
776
|
+
});
|
|
777
|
+
}
|
|
778
|
+
/** Runs the board and RECONCILES — a feature deleted in the builder leaves
|
|
779
|
+
* the map (the engine is upsert-only). */
|
|
780
|
+
publishLayer(boardId) {
|
|
781
|
+
return this.t.request("POST", `/api/v1/geo/layers/${boardId}/publish`);
|
|
782
|
+
}
|
|
783
|
+
/** Renames / regroups. Never changes the `node_type`; `mapa: ""` ungroups. */
|
|
784
|
+
patchLayer(boardId, changes) {
|
|
785
|
+
return this.t.request("PATCH", `/api/v1/geo/layers/${boardId}`, { json: changes });
|
|
786
|
+
}
|
|
787
|
+
/** Deletes the whole layer: materialized nodes + dataset + board. */
|
|
788
|
+
deleteLayer(boardId) {
|
|
789
|
+
return this.t.request("DELETE", `/api/v1/geo/layers/${boardId}`);
|
|
790
|
+
}
|
|
791
|
+
};
|
|
792
|
+
var MapTemplatesResource = class {
|
|
793
|
+
constructor(t) {
|
|
794
|
+
this.t = t;
|
|
795
|
+
}
|
|
796
|
+
t;
|
|
797
|
+
async list() {
|
|
798
|
+
const payload = await this.t.request("GET", "/platform/v22/map-templates");
|
|
799
|
+
return payload.items ?? [];
|
|
800
|
+
}
|
|
801
|
+
get(templateId) {
|
|
802
|
+
return this.t.request("GET", `/platform/v22/map-templates/${templateId}`);
|
|
803
|
+
}
|
|
804
|
+
create(name, spec, description = "") {
|
|
805
|
+
return this.t.request("POST", "/platform/v22/map-templates", {
|
|
806
|
+
json: { name, spec, description }
|
|
807
|
+
});
|
|
808
|
+
}
|
|
809
|
+
instantiate(templateId, variables) {
|
|
810
|
+
return this.t.request("POST", `/platform/v22/map-templates/${templateId}/instantiate`, {
|
|
811
|
+
json: { variables: variables ?? {} }
|
|
812
|
+
});
|
|
813
|
+
}
|
|
814
|
+
/** Returns the raw SVG markup (non-JSON body). */
|
|
815
|
+
exportSvg(templateId) {
|
|
816
|
+
return this.t.request("GET", `/platform/v22/map-templates/${templateId}/export.svg`);
|
|
817
|
+
}
|
|
818
|
+
};
|
|
819
|
+
var MediaResource = class {
|
|
820
|
+
constructor(t) {
|
|
821
|
+
this.t = t;
|
|
822
|
+
}
|
|
823
|
+
t;
|
|
824
|
+
listSets() {
|
|
825
|
+
return this.t.request("GET", "/platform/v23/media/sets");
|
|
826
|
+
}
|
|
827
|
+
createSet(input) {
|
|
828
|
+
return this.t.request("POST", "/platform/v23/media/sets", { json: input });
|
|
829
|
+
}
|
|
830
|
+
deleteSet(setId) {
|
|
831
|
+
return this.t.request("DELETE", `/platform/v23/media/sets/${setId}`);
|
|
832
|
+
}
|
|
833
|
+
listItems(setId) {
|
|
834
|
+
return this.t.request("GET", `/platform/v23/media/sets/${setId}/items`);
|
|
835
|
+
}
|
|
836
|
+
/** Metadata only — no file bytes are uploaded (pass a pre-supplied `uri`). */
|
|
837
|
+
addItem(setId, input) {
|
|
838
|
+
return this.t.request("POST", `/platform/v23/media/sets/${setId}/items`, { json: input });
|
|
839
|
+
}
|
|
840
|
+
};
|
|
841
|
+
var DocsResource = class {
|
|
842
|
+
constructor(t) {
|
|
843
|
+
this.t = t;
|
|
844
|
+
}
|
|
845
|
+
t;
|
|
846
|
+
tree() {
|
|
847
|
+
return this.t.request("GET", "/docs/tree");
|
|
848
|
+
}
|
|
849
|
+
read(path) {
|
|
850
|
+
return this.t.request("GET", "/docs/content", { params: { path } });
|
|
851
|
+
}
|
|
852
|
+
};
|
|
853
|
+
var PagesResource = class {
|
|
854
|
+
constructor(t) {
|
|
855
|
+
this.t = t;
|
|
856
|
+
}
|
|
857
|
+
t;
|
|
858
|
+
list(opts = {}) {
|
|
859
|
+
return this.t.request("GET", "/platform/v23/pages", { params: opts });
|
|
860
|
+
}
|
|
861
|
+
get(slug) {
|
|
862
|
+
return this.t.request("GET", `/platform/v23/pages/${slug}`);
|
|
863
|
+
}
|
|
864
|
+
getConfig(slug) {
|
|
865
|
+
return this.t.request("GET", `/platform/v23/pages/${slug}/config`);
|
|
866
|
+
}
|
|
867
|
+
create(input) {
|
|
868
|
+
return this.t.request("POST", "/platform/v23/pages", { json: input });
|
|
869
|
+
}
|
|
870
|
+
update(slug, patch) {
|
|
871
|
+
return this.t.request("PATCH", `/platform/v23/pages/${slug}`, { json: patch });
|
|
872
|
+
}
|
|
873
|
+
/** Soft delete — page moves to status=archived. */
|
|
874
|
+
delete(slug) {
|
|
875
|
+
return this.t.request("DELETE", `/platform/v23/pages/${slug}`);
|
|
876
|
+
}
|
|
877
|
+
duplicate(slug) {
|
|
878
|
+
return this.t.request("POST", `/platform/v23/pages/${slug}/duplicate`);
|
|
879
|
+
}
|
|
880
|
+
putConfig(slug, config) {
|
|
881
|
+
return this.t.request("PUT", `/platform/v23/pages/${slug}/config`, { json: { config } });
|
|
882
|
+
}
|
|
883
|
+
publish(slug) {
|
|
884
|
+
return this.t.request("POST", `/platform/v23/pages/${slug}/publish`);
|
|
885
|
+
}
|
|
886
|
+
};
|
|
887
|
+
var DossierResource = class {
|
|
888
|
+
constructor(t) {
|
|
889
|
+
this.t = t;
|
|
890
|
+
}
|
|
891
|
+
t;
|
|
892
|
+
startGeneric(nodeId, purpose) {
|
|
893
|
+
return this.t.request("POST", `/ontology/nodes/${nodeId}/dossier`, {
|
|
894
|
+
json: purpose ? { purpose } : {}
|
|
895
|
+
});
|
|
896
|
+
}
|
|
897
|
+
/** Requires `anchor_node_id` or `node_ids`. */
|
|
898
|
+
startComposite(input) {
|
|
899
|
+
if (!input.anchor_node_id && !input.node_ids?.length) {
|
|
900
|
+
throw new Error("startComposite requires anchor_node_id or node_ids");
|
|
676
901
|
}
|
|
677
|
-
|
|
678
|
-
|
|
902
|
+
return this.t.request("POST", "/ontology/dossier/composite", { json: input });
|
|
903
|
+
}
|
|
904
|
+
/** Poll until `status === "done"`; `result` is then populated. */
|
|
905
|
+
get(taskId) {
|
|
906
|
+
return this.t.request("GET", `/ontology/dossier/${taskId}`);
|
|
907
|
+
}
|
|
908
|
+
};
|
|
909
|
+
var TimeSeriesResource = class {
|
|
910
|
+
constructor(t) {
|
|
911
|
+
this.t = t;
|
|
912
|
+
}
|
|
913
|
+
t;
|
|
914
|
+
list() {
|
|
915
|
+
return this.t.request("GET", "/platform/v23/timeseries");
|
|
916
|
+
}
|
|
917
|
+
create(input) {
|
|
918
|
+
return this.t.request("POST", "/platform/v23/timeseries", { json: input });
|
|
919
|
+
}
|
|
920
|
+
delete(chartId) {
|
|
921
|
+
return this.t.request("DELETE", `/platform/v23/timeseries/${chartId}`);
|
|
922
|
+
}
|
|
923
|
+
render(chartId) {
|
|
924
|
+
return this.t.request("POST", `/platform/v23/timeseries/${chartId}/render`);
|
|
925
|
+
}
|
|
926
|
+
};
|
|
927
|
+
|
|
928
|
+
// src/resources/publicGuest.ts
|
|
929
|
+
var PublicGuestResource = class {
|
|
930
|
+
constructor(t) {
|
|
931
|
+
this.t = t;
|
|
932
|
+
}
|
|
933
|
+
t;
|
|
934
|
+
base(token) {
|
|
935
|
+
return `/public/v1/guest/${encodeURIComponent(token)}`;
|
|
936
|
+
}
|
|
937
|
+
/** Menu/resumo do token: label, subject, status, geo, ações permitidas. */
|
|
938
|
+
menu(token) {
|
|
939
|
+
return this.t.request("GET", this.base(token));
|
|
940
|
+
}
|
|
941
|
+
/** Reporta uma posição GPS; o backend avalia cerca/rota/destino. */
|
|
942
|
+
fix(token, body) {
|
|
943
|
+
return this.t.request("POST", `${this.base(token)}/fix`, { json: body });
|
|
944
|
+
}
|
|
945
|
+
/** Invoca uma ação permitida do token (ex.: abrir portão). */
|
|
946
|
+
invoke(token, actionId, input = {}) {
|
|
947
|
+
return this.t.request(
|
|
948
|
+
"POST",
|
|
949
|
+
`${this.base(token)}/actions/${encodeURIComponent(actionId)}`,
|
|
950
|
+
{ json: { input } }
|
|
951
|
+
);
|
|
952
|
+
}
|
|
953
|
+
/**
|
|
954
|
+
* Onda 2 — última posição do VISITANTE amarrado a um token de MORADOR
|
|
955
|
+
* (`geo.live_ref`). Sem push: a SPA do morador faz polling desta rota. O
|
|
956
|
+
* morador só vê ESSA visita (least-privilege). Retorna `{available, lat,
|
|
957
|
+
* lng, ts, inside_fence, arrived, deviated, distance_to_target_m,
|
|
958
|
+
* visit_status}`; `available:false` enquanto o visitante não mandou fix.
|
|
959
|
+
*/
|
|
960
|
+
position(token) {
|
|
961
|
+
return this.t.request("GET", `${this.base(token)}/position`);
|
|
962
|
+
}
|
|
963
|
+
/** Documento vinculado ao token (se `geo.document_id`). */
|
|
964
|
+
document(token) {
|
|
965
|
+
return this.t.request("GET", `${this.base(token)}/document`);
|
|
966
|
+
}
|
|
967
|
+
/** Consulta um object-set embutido no documento do token. */
|
|
968
|
+
queryObjectSet(token, body) {
|
|
969
|
+
return this.t.request(
|
|
970
|
+
"POST",
|
|
971
|
+
`${this.base(token)}/document/object-sets/query`,
|
|
972
|
+
{ json: body }
|
|
973
|
+
);
|
|
974
|
+
}
|
|
975
|
+
/** Um nó da ontologia referenciado pelo documento (mascarado por ABAC). */
|
|
976
|
+
documentNode(token, nodeId) {
|
|
977
|
+
return this.t.request("GET", `${this.base(token)}/document/node`, {
|
|
978
|
+
params: { node_id: nodeId }
|
|
979
|
+
});
|
|
980
|
+
}
|
|
981
|
+
/** Descritor da Page vinculada ao token (`geo.page_slug`). */
|
|
982
|
+
page(token, slug) {
|
|
983
|
+
return this.t.request("GET", `${this.base(token)}/pages/${encodeURIComponent(slug)}`);
|
|
984
|
+
}
|
|
985
|
+
/** Avalia as variáveis da Page (com overrides só de variáveis estáticas). */
|
|
986
|
+
evaluatePage(token, slug, overrides = {}) {
|
|
987
|
+
return this.t.request(
|
|
988
|
+
"POST",
|
|
989
|
+
`${this.base(token)}/pages/${encodeURIComponent(slug)}/evaluate`,
|
|
990
|
+
{ json: { overrides } }
|
|
991
|
+
);
|
|
992
|
+
}
|
|
993
|
+
/**
|
|
994
|
+
* URL absoluta de um objeto de mídia do documento (bytes servidos com
|
|
995
|
+
* `Cache-Control: private`). Retorna string p/ `<img src>`/`<a href>` —
|
|
996
|
+
* NÃO faz request (o transporte é JSON-cêntrico). A `key` deve começar
|
|
997
|
+
* com `notepad/{doc_id}/` (validado no backend).
|
|
998
|
+
*/
|
|
999
|
+
mediaUrl(token, key) {
|
|
1000
|
+
return buildUrl(this.t.baseUrl, `${this.base(token)}/media`, { key });
|
|
1001
|
+
}
|
|
1002
|
+
};
|
|
1003
|
+
|
|
1004
|
+
// src/resources/operational.ts
|
|
1005
|
+
var AlertFeedsResource = class {
|
|
1006
|
+
constructor(t) {
|
|
1007
|
+
this.t = t;
|
|
1008
|
+
}
|
|
1009
|
+
t;
|
|
1010
|
+
list() {
|
|
1011
|
+
return this.t.request("GET", "/alerts/feeds");
|
|
1012
|
+
}
|
|
1013
|
+
create(name, filters, cadenceSeconds = 300) {
|
|
1014
|
+
return this.t.request("POST", "/alerts/feeds", {
|
|
1015
|
+
json: { name, filters, cadence_seconds: cadenceSeconds }
|
|
1016
|
+
});
|
|
1017
|
+
}
|
|
1018
|
+
delete(feedId) {
|
|
1019
|
+
return this.t.request("DELETE", `/alerts/feeds/${feedId}`);
|
|
1020
|
+
}
|
|
1021
|
+
alerts() {
|
|
1022
|
+
return this.t.request("GET", "/alerts/feeds/alerts");
|
|
1023
|
+
}
|
|
1024
|
+
acknowledge(alertId) {
|
|
1025
|
+
return this.t.request("POST", `/alerts/feeds/${alertId}/acknowledge`);
|
|
1026
|
+
}
|
|
1027
|
+
};
|
|
1028
|
+
var AlertWatchesResource = class {
|
|
1029
|
+
constructor(t) {
|
|
1030
|
+
this.t = t;
|
|
1031
|
+
}
|
|
1032
|
+
t;
|
|
1033
|
+
list() {
|
|
1034
|
+
return this.t.request("GET", "/alerts/watches");
|
|
1035
|
+
}
|
|
1036
|
+
create(objectId) {
|
|
1037
|
+
return this.t.request("POST", "/alerts/watches", { json: { object_id: objectId } });
|
|
1038
|
+
}
|
|
1039
|
+
delete(watchId) {
|
|
1040
|
+
return this.t.request("DELETE", `/alerts/watches/${watchId}`);
|
|
1041
|
+
}
|
|
1042
|
+
alerts() {
|
|
1043
|
+
return this.t.request("GET", "/alerts/watches/alerts");
|
|
1044
|
+
}
|
|
1045
|
+
acknowledge(alertId) {
|
|
1046
|
+
return this.t.request("POST", `/alerts/watches/${alertId}/acknowledge`);
|
|
1047
|
+
}
|
|
1048
|
+
};
|
|
1049
|
+
var AlertGeofencesResource = class {
|
|
1050
|
+
constructor(t) {
|
|
1051
|
+
this.t = t;
|
|
1052
|
+
}
|
|
1053
|
+
t;
|
|
1054
|
+
list() {
|
|
1055
|
+
return this.t.request("GET", "/alerts/geofences");
|
|
1056
|
+
}
|
|
1057
|
+
/** `coordinates` is shape-dependent: polygon `[[lon,lat],…]`, circle
|
|
1058
|
+
* `{center, radius_meters}`, corridor/route `{waypoints, width_meters}`. */
|
|
1059
|
+
create(input) {
|
|
1060
|
+
return this.t.request("POST", "/alerts/geofences", { json: input });
|
|
1061
|
+
}
|
|
1062
|
+
update(geofenceId, patch) {
|
|
1063
|
+
return this.t.request("PATCH", `/alerts/geofences/${geofenceId}`, { json: patch });
|
|
1064
|
+
}
|
|
1065
|
+
delete(geofenceId) {
|
|
1066
|
+
return this.t.request("DELETE", `/alerts/geofences/${geofenceId}`);
|
|
1067
|
+
}
|
|
1068
|
+
alerts() {
|
|
1069
|
+
return this.t.request("GET", "/alerts/geofences/alerts");
|
|
1070
|
+
}
|
|
1071
|
+
acknowledge(alertId) {
|
|
1072
|
+
return this.t.request("POST", `/alerts/geofences/${alertId}/acknowledge`);
|
|
1073
|
+
}
|
|
1074
|
+
};
|
|
1075
|
+
var AlertSharesResource = class {
|
|
1076
|
+
constructor(t) {
|
|
1077
|
+
this.t = t;
|
|
1078
|
+
}
|
|
1079
|
+
t;
|
|
1080
|
+
list() {
|
|
1081
|
+
return this.t.request("GET", "/alerts/shares");
|
|
1082
|
+
}
|
|
1083
|
+
acknowledge(alertId) {
|
|
1084
|
+
return this.t.request("POST", `/alerts/shares/${alertId}/ack`);
|
|
1085
|
+
}
|
|
1086
|
+
};
|
|
1087
|
+
var AlertRoutesResource = class {
|
|
1088
|
+
constructor(t) {
|
|
1089
|
+
this.t = t;
|
|
1090
|
+
}
|
|
1091
|
+
t;
|
|
1092
|
+
list() {
|
|
1093
|
+
return this.t.request("GET", "/alerts/routes");
|
|
1094
|
+
}
|
|
1095
|
+
create(input) {
|
|
1096
|
+
return this.t.request("POST", "/alerts/routes", { json: input });
|
|
1097
|
+
}
|
|
1098
|
+
update(routeId, patch) {
|
|
1099
|
+
return this.t.request("PATCH", `/alerts/routes/${routeId}`, { json: patch });
|
|
1100
|
+
}
|
|
1101
|
+
delete(routeId) {
|
|
1102
|
+
return this.t.request("DELETE", `/alerts/routes/${routeId}`);
|
|
1103
|
+
}
|
|
1104
|
+
silence(routeId, minutes) {
|
|
1105
|
+
return this.t.request("POST", `/alerts/routes/${routeId}/silence`, { json: { minutes } });
|
|
1106
|
+
}
|
|
1107
|
+
unsilence(routeId) {
|
|
1108
|
+
return this.silence(routeId, 0);
|
|
1109
|
+
}
|
|
1110
|
+
silenceState(routeId) {
|
|
1111
|
+
return this.t.request("GET", `/alerts/routes/${routeId}/silence`);
|
|
1112
|
+
}
|
|
1113
|
+
async kinds() {
|
|
1114
|
+
const payload = await this.t.request("GET", "/alerts/routes/kinds");
|
|
1115
|
+
return payload.kinds ?? [];
|
|
1116
|
+
}
|
|
1117
|
+
};
|
|
1118
|
+
var AlertInboxResource = class {
|
|
1119
|
+
constructor(t) {
|
|
1120
|
+
this.t = t;
|
|
1121
|
+
}
|
|
1122
|
+
t;
|
|
1123
|
+
list(opts = {}) {
|
|
1124
|
+
return this.t.request("GET", "/alerts/inbox", {
|
|
1125
|
+
params: {
|
|
1126
|
+
kinds: opts.kinds?.join(","),
|
|
1127
|
+
severities: opts.severities?.join(","),
|
|
1128
|
+
status: opts.status,
|
|
1129
|
+
limit: opts.limit,
|
|
1130
|
+
offset: opts.offset
|
|
1131
|
+
}
|
|
1132
|
+
});
|
|
1133
|
+
}
|
|
1134
|
+
async countPending() {
|
|
1135
|
+
const payload = await this.t.request("GET", "/alerts/count_pending");
|
|
1136
|
+
return payload.count ?? 0;
|
|
1137
|
+
}
|
|
1138
|
+
acknowledge(alertId) {
|
|
1139
|
+
return this.t.request("POST", `/alerts/${alertId}/acknowledge`);
|
|
1140
|
+
}
|
|
1141
|
+
};
|
|
1142
|
+
var AlertsResource = class {
|
|
1143
|
+
constructor(t) {
|
|
1144
|
+
this.t = t;
|
|
1145
|
+
this.feeds = new AlertFeedsResource(t);
|
|
1146
|
+
this.watches = new AlertWatchesResource(t);
|
|
1147
|
+
this.geofences = new AlertGeofencesResource(t);
|
|
1148
|
+
this.shares = new AlertSharesResource(t);
|
|
1149
|
+
this.routes = new AlertRoutesResource(t);
|
|
1150
|
+
this.inbox = new AlertInboxResource(t);
|
|
1151
|
+
}
|
|
1152
|
+
t;
|
|
1153
|
+
feeds;
|
|
1154
|
+
watches;
|
|
1155
|
+
geofences;
|
|
1156
|
+
shares;
|
|
1157
|
+
routes;
|
|
1158
|
+
inbox;
|
|
1159
|
+
escalate(alertId) {
|
|
1160
|
+
return this.t.request("POST", `/alerts/escalate/${alertId}`);
|
|
1161
|
+
}
|
|
1162
|
+
channels() {
|
|
1163
|
+
return this.t.request("GET", "/alerts/channels");
|
|
1164
|
+
}
|
|
1165
|
+
/**
|
|
1166
|
+
* `PUT /alerts/channels/{ref}` — point a delivery channel at its
|
|
1167
|
+
* destination.
|
|
1168
|
+
*
|
|
1169
|
+
* Exists so this is a GESTURE: before it, sending alerts to the team's
|
|
1170
|
+
* Discord (or any webhook) meant editing the tenant's JSONB in the
|
|
1171
|
+
* database. Audited as `alert_channel.configured`.
|
|
1172
|
+
*
|
|
1173
|
+
* `ref` is the channel name (`"discord"`) or a named ref
|
|
1174
|
+
* (`"discord-plantao"`, then pass `channel: "discord"`). Fields are open
|
|
1175
|
+
* because the vocabulary belongs to the CHANNEL, not the core.
|
|
1176
|
+
*
|
|
1177
|
+
* The response returns the config MASKED — a webhook URL is the
|
|
1178
|
+
* credential, and reads never hand it back whole.
|
|
1179
|
+
* Perm: `alerts.routes.manage`.
|
|
1180
|
+
*/
|
|
1181
|
+
setChannel(ref, config) {
|
|
1182
|
+
return this.t.request("PUT", `/alerts/channels/${encodeURIComponent(ref)}`, {
|
|
1183
|
+
json: config
|
|
1184
|
+
});
|
|
1185
|
+
}
|
|
1186
|
+
/** `DELETE /alerts/channels/{ref}` — audited as `alert_channel.removed`. */
|
|
1187
|
+
deleteChannel(ref) {
|
|
1188
|
+
return this.t.request("DELETE", `/alerts/channels/${encodeURIComponent(ref)}`);
|
|
679
1189
|
}
|
|
680
1190
|
};
|
|
1191
|
+
var AlarmsResource = class {
|
|
1192
|
+
constructor(t) {
|
|
1193
|
+
this.t = t;
|
|
1194
|
+
}
|
|
1195
|
+
t;
|
|
1196
|
+
list() {
|
|
1197
|
+
return this.t.request("GET", "/platform/v26/alarms");
|
|
1198
|
+
}
|
|
1199
|
+
/** `node_id` XOR `node_type`; operator ∈ gt|gte|lt|lte|eq|ne. */
|
|
1200
|
+
create(input) {
|
|
1201
|
+
return this.t.request("POST", "/platform/v26/alarms", { json: input });
|
|
1202
|
+
}
|
|
1203
|
+
update(ruleId, patch) {
|
|
1204
|
+
return this.t.request("PUT", `/platform/v26/alarms/${encodeURIComponent(ruleId)}`, {
|
|
1205
|
+
json: patch
|
|
1206
|
+
});
|
|
1207
|
+
}
|
|
1208
|
+
delete(ruleId) {
|
|
1209
|
+
return this.t.request("DELETE", `/platform/v26/alarms/${encodeURIComponent(ruleId)}`);
|
|
1210
|
+
}
|
|
1211
|
+
events(opts = {}) {
|
|
1212
|
+
return this.t.request("GET", "/platform/v26/alarms/events", { params: opts });
|
|
1213
|
+
}
|
|
1214
|
+
};
|
|
1215
|
+
var EventsResource = class {
|
|
1216
|
+
constructor(t) {
|
|
1217
|
+
this.t = t;
|
|
1218
|
+
}
|
|
1219
|
+
t;
|
|
1220
|
+
pipelineStatus() {
|
|
1221
|
+
return this.t.request("GET", "/api/v1/events/pipeline/status");
|
|
1222
|
+
}
|
|
1223
|
+
dlqList(limit = 50) {
|
|
1224
|
+
return this.t.request("GET", "/api/v1/events/pipeline/dlq", { params: { limit } });
|
|
1225
|
+
}
|
|
1226
|
+
/** Exactly one of `ids` / `all` is required. */
|
|
1227
|
+
dlqRetry(opts) {
|
|
1228
|
+
assertIdsXorAll(opts);
|
|
1229
|
+
return this.t.request("POST", "/api/v1/events/pipeline/dlq/retry", { json: opts });
|
|
1230
|
+
}
|
|
1231
|
+
/** Exactly one of `ids` / `all` is required. */
|
|
1232
|
+
dlqPurge(opts) {
|
|
1233
|
+
assertIdsXorAll(opts);
|
|
1234
|
+
return this.t.request("POST", "/api/v1/events/pipeline/dlq/purge", { json: opts });
|
|
1235
|
+
}
|
|
1236
|
+
};
|
|
1237
|
+
function assertIdsXorAll(opts) {
|
|
1238
|
+
const hasIds = !!opts.ids?.length;
|
|
1239
|
+
if (hasIds === !!opts.all) throw new Error("pass exactly one of ids or all");
|
|
1240
|
+
}
|
|
1241
|
+
var ConnectorsResource = class {
|
|
1242
|
+
constructor(t) {
|
|
1243
|
+
this.t = t;
|
|
1244
|
+
}
|
|
1245
|
+
t;
|
|
1246
|
+
list() {
|
|
1247
|
+
return this.t.request("GET", "/governance/agents");
|
|
1248
|
+
}
|
|
1249
|
+
patch(agentId, patch) {
|
|
1250
|
+
const body = Object.fromEntries(Object.entries(patch).filter(([, v]) => v !== void 0));
|
|
1251
|
+
if (Object.keys(body).length === 0) throw new Error("empty patch");
|
|
1252
|
+
return this.t.request("PATCH", `/governance/agents/${agentId}`, { json: body });
|
|
1253
|
+
}
|
|
1254
|
+
/** status ∈ inactive|active|running|degraded|failed */
|
|
1255
|
+
setStatus(agentId, status) {
|
|
1256
|
+
return this.patch(agentId, { status });
|
|
1257
|
+
}
|
|
1258
|
+
bindings(agentId) {
|
|
1259
|
+
return this.t.request("GET", `/governance/agents/${agentId}/skills`);
|
|
1260
|
+
}
|
|
1261
|
+
/** Two calls: creates the worker agent, then binds the `connector.http` skill. */
|
|
1262
|
+
async register(input) {
|
|
1263
|
+
const agent = await this.t.request("POST", "/governance/agents", {
|
|
1264
|
+
json: {
|
|
1265
|
+
slug: input.slug,
|
|
1266
|
+
display_name: input.display_name,
|
|
1267
|
+
kind: "worker",
|
|
1268
|
+
config: input.cron_preset ? { cron_preset: input.cron_preset } : {}
|
|
1269
|
+
}
|
|
1270
|
+
});
|
|
1271
|
+
await this.t.request("POST", `/governance/agents/${agent.id}/skills`, {
|
|
1272
|
+
json: {
|
|
1273
|
+
skill_key: "connector.http",
|
|
1274
|
+
config: {
|
|
1275
|
+
base_url: input.base_url,
|
|
1276
|
+
path: input.path ?? "",
|
|
1277
|
+
node_type: input.node_type,
|
|
1278
|
+
id_field: input.id_field,
|
|
1279
|
+
name_field: input.name_field ?? "",
|
|
1280
|
+
records_path: input.records_path ?? "",
|
|
1281
|
+
auth: input.auth,
|
|
1282
|
+
pagination: input.pagination
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
});
|
|
1286
|
+
return agent;
|
|
1287
|
+
}
|
|
1288
|
+
test(agentId) {
|
|
1289
|
+
return this.t.request("POST", `/governance/agents/${agentId}/skills/connector.http/test`);
|
|
1290
|
+
}
|
|
1291
|
+
run(agentId) {
|
|
1292
|
+
return this.t.request("POST", `/governance/agents/${agentId}/run`, {
|
|
1293
|
+
json: { skill_key: "connector.http" }
|
|
1294
|
+
});
|
|
1295
|
+
}
|
|
1296
|
+
/**
|
|
1297
|
+
* Start/renew QR pairing for a skill with the `pairing` capability (WhatsApp
|
|
1298
|
+
* station). Pass `{ refresh: true }` to force a fresh code.
|
|
1299
|
+
*/
|
|
1300
|
+
pairingStart(agentId, skillKey, opts = {}) {
|
|
1301
|
+
const { target, ...json } = opts;
|
|
1302
|
+
return this.t.request("POST", `/governance/agents/${agentId}/skills/${skillKey}/pairing`, {
|
|
1303
|
+
json,
|
|
1304
|
+
params: target ? { target } : void 0
|
|
1305
|
+
});
|
|
1306
|
+
}
|
|
1307
|
+
/** Read-only poll of the pairing state (no side effects). `target` aims a pool number. */
|
|
1308
|
+
pairingPoll(agentId, skillKey, opts = {}) {
|
|
1309
|
+
return this.t.request("GET", `/governance/agents/${agentId}/skills/${skillKey}/pairing`, {
|
|
1310
|
+
params: opts.target ? { target: opts.target } : void 0
|
|
1311
|
+
});
|
|
1312
|
+
}
|
|
1313
|
+
/**
|
|
1314
|
+
* Add / correct / remove a sub-unit administered by a connector that
|
|
1315
|
+
* declares the `inventory` capability — e.g. one number of a WhatsApp
|
|
1316
|
+
* number-station.
|
|
1317
|
+
*
|
|
1318
|
+
* Reading is NOT here: the inventory already reaches callers through the
|
|
1319
|
+
* snapshot the tick publishes on the device mirror (`GET /api/v1/edge/nodes`
|
|
1320
|
+
* → `nodes[].pool`). A second read path would drift between ticks.
|
|
1321
|
+
*/
|
|
1322
|
+
applyInventory(agentId, skillKey, op, item) {
|
|
1323
|
+
return this.t.request(
|
|
1324
|
+
"POST",
|
|
1325
|
+
`/governance/agents/${agentId}/skills/${skillKey}/inventory`,
|
|
1326
|
+
{ json: { op, item } }
|
|
1327
|
+
);
|
|
1328
|
+
}
|
|
1329
|
+
schedulerTick() {
|
|
1330
|
+
return this.t.request("POST", "/governance/agents/scheduler/tick");
|
|
1331
|
+
}
|
|
1332
|
+
/** source ∈ native|clawhub. Rows carry an additive `capabilities` field. */
|
|
1333
|
+
skillCatalog(source) {
|
|
1334
|
+
return this.t.request("GET", "/governance/agents/skills", { params: { source } });
|
|
1335
|
+
}
|
|
1336
|
+
installOpenclaw(slug) {
|
|
1337
|
+
return this.t.request("POST", "/governance/agents/skills/openclaw/install", {
|
|
1338
|
+
json: { slug: slug.replace(/^openclaw:/, "") }
|
|
1339
|
+
});
|
|
1340
|
+
}
|
|
1341
|
+
refreshOpenclaw() {
|
|
1342
|
+
return this.t.request("POST", "/governance/agents/skills/openclaw/refresh");
|
|
1343
|
+
}
|
|
1344
|
+
};
|
|
1345
|
+
var PipelinesResource = class {
|
|
1346
|
+
constructor(t) {
|
|
1347
|
+
this.t = t;
|
|
1348
|
+
}
|
|
1349
|
+
t;
|
|
1350
|
+
list() {
|
|
1351
|
+
return this.t.request("GET", "/platform/v22/pipelines");
|
|
1352
|
+
}
|
|
1353
|
+
transformPreview(sampleRows, steps) {
|
|
1354
|
+
return this.t.request("POST", "/platform/v23/pipeline/transform/preview", {
|
|
1355
|
+
json: { sample_rows: sampleRows, steps }
|
|
1356
|
+
});
|
|
1357
|
+
}
|
|
1358
|
+
dryRun(boardId) {
|
|
1359
|
+
return this.t.request("POST", `/platform/v23/pipeline/${boardId}/dry-run`);
|
|
1360
|
+
}
|
|
1361
|
+
syncPreview(format, opts = {}) {
|
|
1362
|
+
const body = { format };
|
|
1363
|
+
for (const [k, v] of Object.entries(opts)) if (v !== void 0) body[k] = v;
|
|
1364
|
+
return this.t.request("POST", "/platform/v23/pipeline/sync/preview", { json: body });
|
|
1365
|
+
}
|
|
1366
|
+
create(input) {
|
|
1367
|
+
return this.t.request("POST", "/platform/v22/pipelines", { json: input });
|
|
1368
|
+
}
|
|
1369
|
+
update(pipelineId, patch) {
|
|
1370
|
+
return this.t.request("PUT", `/platform/v22/pipelines/${pipelineId}`, { json: patch });
|
|
1371
|
+
}
|
|
1372
|
+
setSchedule(pipelineId, preset) {
|
|
1373
|
+
return this.update(pipelineId, { schedule_preset: preset || "" });
|
|
1374
|
+
}
|
|
1375
|
+
build(pipelineId, opts = {}) {
|
|
1376
|
+
return this.t.request("POST", `/platform/v22/pipelines/${pipelineId}/build`, {
|
|
1377
|
+
params: {
|
|
1378
|
+
incremental: String(opts.incremental ?? false),
|
|
1379
|
+
branch: opts.branch ?? "main"
|
|
1380
|
+
}
|
|
1381
|
+
});
|
|
1382
|
+
}
|
|
1383
|
+
runs(pipelineId, limit = 50) {
|
|
1384
|
+
return this.t.request("GET", `/platform/v22/pipelines/${pipelineId}/runs`, {
|
|
1385
|
+
params: { limit }
|
|
1386
|
+
});
|
|
1387
|
+
}
|
|
1388
|
+
};
|
|
1389
|
+
var ChatChannelsResource = class {
|
|
1390
|
+
constructor(t) {
|
|
1391
|
+
this.t = t;
|
|
1392
|
+
}
|
|
1393
|
+
t;
|
|
1394
|
+
list() {
|
|
1395
|
+
return this.t.request("GET", "/chat/channels");
|
|
1396
|
+
}
|
|
1397
|
+
get(channelId) {
|
|
1398
|
+
return this.t.request("GET", `/chat/channels/${channelId}`);
|
|
1399
|
+
}
|
|
1400
|
+
create(input) {
|
|
1401
|
+
const body = Object.fromEntries(Object.entries(input).filter(([, v]) => v !== void 0));
|
|
1402
|
+
return this.t.request("POST", "/chat/channels", { json: body });
|
|
1403
|
+
}
|
|
1404
|
+
patch(channelId, payload) {
|
|
1405
|
+
return this.t.request("PATCH", `/chat/channels/${channelId}`, { json: payload });
|
|
1406
|
+
}
|
|
1407
|
+
delete(channelId) {
|
|
1408
|
+
return this.t.request("DELETE", `/chat/channels/${channelId}`);
|
|
1409
|
+
}
|
|
1410
|
+
};
|
|
1411
|
+
var ChatMessagesResource = class {
|
|
1412
|
+
constructor(t) {
|
|
1413
|
+
this.t = t;
|
|
1414
|
+
}
|
|
1415
|
+
t;
|
|
1416
|
+
list(channelId, opts = {}) {
|
|
1417
|
+
return this.t.request("GET", `/chat/channels/${channelId}/messages`, { params: opts });
|
|
1418
|
+
}
|
|
1419
|
+
send(channelId, body, opts = {}) {
|
|
1420
|
+
return this.t.request("POST", `/chat/channels/${channelId}/messages`, {
|
|
1421
|
+
json: { body, classification: opts.classification ?? "U", embeds: opts.embeds }
|
|
1422
|
+
});
|
|
1423
|
+
}
|
|
1424
|
+
};
|
|
1425
|
+
var ChatResource = class {
|
|
1426
|
+
channels;
|
|
1427
|
+
messages;
|
|
1428
|
+
constructor(t) {
|
|
1429
|
+
this.channels = new ChatChannelsResource(t);
|
|
1430
|
+
this.messages = new ChatMessagesResource(t);
|
|
1431
|
+
}
|
|
1432
|
+
};
|
|
1433
|
+
var NotepadResource = class {
|
|
1434
|
+
constructor(t) {
|
|
1435
|
+
this.t = t;
|
|
1436
|
+
}
|
|
1437
|
+
t;
|
|
1438
|
+
list() {
|
|
1439
|
+
return this.t.request("GET", "/platform/v23/notepad");
|
|
1440
|
+
}
|
|
1441
|
+
get(docId) {
|
|
1442
|
+
return this.t.request("GET", `/platform/v23/notepad/${encodeURIComponent(docId)}`);
|
|
1443
|
+
}
|
|
1444
|
+
create(input) {
|
|
1445
|
+
return this.t.request("POST", "/platform/v23/notepad", { json: input });
|
|
1446
|
+
}
|
|
1447
|
+
/** Mirrors Python: all keys are sent (null = unchanged server-side). */
|
|
1448
|
+
update(docId, patch) {
|
|
1449
|
+
return this.t.request("PUT", `/platform/v23/notepad/${encodeURIComponent(docId)}`, {
|
|
1450
|
+
json: {
|
|
1451
|
+
title: patch.title ?? null,
|
|
1452
|
+
body_md: patch.body_md ?? null,
|
|
1453
|
+
markings: patch.markings ?? null,
|
|
1454
|
+
pinned: patch.pinned ?? null
|
|
1455
|
+
}
|
|
1456
|
+
});
|
|
1457
|
+
}
|
|
1458
|
+
delete(docId) {
|
|
1459
|
+
return this.t.request("DELETE", `/platform/v23/notepad/${encodeURIComponent(docId)}`);
|
|
1460
|
+
}
|
|
1461
|
+
};
|
|
1462
|
+
|
|
1463
|
+
// src/resources/governance.ts
|
|
1464
|
+
var LineageResource = class {
|
|
1465
|
+
constructor(t) {
|
|
1466
|
+
this.t = t;
|
|
1467
|
+
}
|
|
1468
|
+
t;
|
|
1469
|
+
graph(opts = {}) {
|
|
1470
|
+
return this.t.request("GET", "/platform/v23/lineage-graph", { params: opts });
|
|
1471
|
+
}
|
|
1472
|
+
events(opts = {}) {
|
|
1473
|
+
return this.t.request("GET", "/lineage/events", { params: opts });
|
|
1474
|
+
}
|
|
1475
|
+
};
|
|
1476
|
+
var AccessAuditResource = class {
|
|
1477
|
+
constructor(t) {
|
|
1478
|
+
this.t = t;
|
|
1479
|
+
}
|
|
1480
|
+
t;
|
|
1481
|
+
list(opts = {}) {
|
|
1482
|
+
return this.t.request("GET", "/governance/access-audit", { params: opts });
|
|
1483
|
+
}
|
|
1484
|
+
};
|
|
1485
|
+
var MarkingCategoriesResource = class {
|
|
1486
|
+
constructor(t) {
|
|
1487
|
+
this.t = t;
|
|
1488
|
+
}
|
|
1489
|
+
t;
|
|
1490
|
+
list(opts = {}) {
|
|
1491
|
+
return this.t.request("GET", "/markings/categories", { params: opts });
|
|
1492
|
+
}
|
|
1493
|
+
create(input) {
|
|
1494
|
+
return this.t.request("POST", "/markings/categories", { json: input });
|
|
1495
|
+
}
|
|
1496
|
+
};
|
|
1497
|
+
var MarkingsResource = class {
|
|
1498
|
+
constructor(t) {
|
|
1499
|
+
this.t = t;
|
|
1500
|
+
this.categories = new MarkingCategoriesResource(t);
|
|
1501
|
+
}
|
|
1502
|
+
t;
|
|
1503
|
+
categories;
|
|
1504
|
+
list(opts = {}) {
|
|
1505
|
+
return this.t.request("GET", "/markings", { params: opts });
|
|
1506
|
+
}
|
|
1507
|
+
get(markingId) {
|
|
1508
|
+
return this.t.request("GET", `/markings/${markingId}`);
|
|
1509
|
+
}
|
|
1510
|
+
create(input) {
|
|
1511
|
+
return this.t.request("POST", "/markings", { json: input });
|
|
1512
|
+
}
|
|
1513
|
+
update(markingId, patch) {
|
|
1514
|
+
return this.t.request("PATCH", `/markings/${markingId}`, { json: patch });
|
|
1515
|
+
}
|
|
1516
|
+
listEligibility(markingId) {
|
|
1517
|
+
return this.t.request("GET", `/markings/${markingId}/eligibility`);
|
|
1518
|
+
}
|
|
1519
|
+
grantEligibility(markingId, userId, canApply = false) {
|
|
1520
|
+
return this.t.request("POST", `/markings/${markingId}/eligibility`, {
|
|
1521
|
+
json: { user_id: userId, can_apply: canApply }
|
|
1522
|
+
});
|
|
1523
|
+
}
|
|
1524
|
+
revokeEligibility(markingId, userId) {
|
|
1525
|
+
return this.t.request("DELETE", `/markings/${markingId}/eligibility/${userId}`);
|
|
1526
|
+
}
|
|
1527
|
+
};
|
|
1528
|
+
var ResourceMarkingsResource = class {
|
|
1529
|
+
constructor(t) {
|
|
1530
|
+
this.t = t;
|
|
1531
|
+
}
|
|
1532
|
+
t;
|
|
1533
|
+
list(resourceKind, resourceId) {
|
|
1534
|
+
return this.t.request("GET", `/resources/${resourceKind}/${resourceId}/markings`);
|
|
1535
|
+
}
|
|
1536
|
+
apply(resourceKind, resourceId, markingId) {
|
|
1537
|
+
return this.t.request("POST", `/resources/${resourceKind}/${resourceId}/markings`, {
|
|
1538
|
+
json: { marking_id: markingId }
|
|
1539
|
+
});
|
|
1540
|
+
}
|
|
1541
|
+
remove(resourceKind, resourceId, markingId) {
|
|
1542
|
+
return this.t.request(
|
|
1543
|
+
"DELETE",
|
|
1544
|
+
`/resources/${resourceKind}/${resourceId}/markings/${markingId}`
|
|
1545
|
+
);
|
|
1546
|
+
}
|
|
1547
|
+
};
|
|
1548
|
+
var PropertyMarkingsResource = class {
|
|
1549
|
+
constructor(t) {
|
|
1550
|
+
this.t = t;
|
|
1551
|
+
}
|
|
1552
|
+
t;
|
|
1553
|
+
listForNode(nodeId) {
|
|
1554
|
+
return this.t.request("GET", `/ontology/nodes/${nodeId}/property-markings`);
|
|
1555
|
+
}
|
|
1556
|
+
listOne(nodeId, propertyKey) {
|
|
1557
|
+
return this.t.request("GET", `/ontology/nodes/${nodeId}/properties/${propertyKey}/markings`);
|
|
1558
|
+
}
|
|
1559
|
+
apply(nodeId, propertyKey, markingId) {
|
|
1560
|
+
return this.t.request("POST", `/ontology/nodes/${nodeId}/properties/${propertyKey}/markings`, {
|
|
1561
|
+
json: { marking_id: markingId }
|
|
1562
|
+
});
|
|
1563
|
+
}
|
|
1564
|
+
remove(nodeId, propertyKey, markingId) {
|
|
1565
|
+
return this.t.request(
|
|
1566
|
+
"DELETE",
|
|
1567
|
+
`/ontology/nodes/${nodeId}/properties/${propertyKey}/markings/${markingId}`
|
|
1568
|
+
);
|
|
1569
|
+
}
|
|
1570
|
+
};
|
|
1571
|
+
var RowPoliciesResource = class {
|
|
1572
|
+
constructor(t) {
|
|
1573
|
+
this.t = t;
|
|
1574
|
+
}
|
|
1575
|
+
t;
|
|
1576
|
+
list() {
|
|
1577
|
+
return this.t.request("GET", "/platform/v26/row-policies");
|
|
1578
|
+
}
|
|
1579
|
+
create(input) {
|
|
1580
|
+
return this.t.request("POST", "/platform/v26/row-policies", { json: input });
|
|
1581
|
+
}
|
|
1582
|
+
delete(policyId) {
|
|
1583
|
+
return this.t.request("DELETE", `/platform/v26/row-policies/${encodeURIComponent(policyId)}`);
|
|
1584
|
+
}
|
|
1585
|
+
};
|
|
1586
|
+
var ErasureResource = class {
|
|
1587
|
+
constructor(t) {
|
|
1588
|
+
this.t = t;
|
|
1589
|
+
}
|
|
1590
|
+
t;
|
|
1591
|
+
/** Dry-run: shows the match radius without mutating anything. */
|
|
1592
|
+
preview(selector) {
|
|
1593
|
+
return this.t.request("POST", "/governance/erasure/preview", { json: selector });
|
|
1594
|
+
}
|
|
1595
|
+
/** Requires `confirm: true`; pass `expected_count` to guard the radius (422 on mismatch). */
|
|
1596
|
+
forget(selector, opts = {}) {
|
|
1597
|
+
return this.t.request("POST", "/governance/erasure/forget", { json: { ...selector, ...opts } });
|
|
1598
|
+
}
|
|
1599
|
+
};
|
|
1600
|
+
var RetentionResource = class {
|
|
1601
|
+
constructor(t) {
|
|
1602
|
+
this.t = t;
|
|
1603
|
+
}
|
|
1604
|
+
t;
|
|
1605
|
+
list() {
|
|
1606
|
+
return this.t.request("GET", "/governance/retention");
|
|
1607
|
+
}
|
|
1608
|
+
set(target, retentionDays, active = true) {
|
|
1609
|
+
return this.t.request("PUT", "/governance/retention", {
|
|
1610
|
+
json: { target, retention_days: retentionDays, active }
|
|
1611
|
+
});
|
|
1612
|
+
}
|
|
1613
|
+
delete(target) {
|
|
1614
|
+
return this.t.request("DELETE", `/governance/retention/${encodeURIComponent(target)}`);
|
|
1615
|
+
}
|
|
1616
|
+
run(target) {
|
|
1617
|
+
return this.t.request("POST", `/governance/retention/${encodeURIComponent(target)}/run`);
|
|
1618
|
+
}
|
|
1619
|
+
};
|
|
1620
|
+
var GuestTokensResource = class {
|
|
1621
|
+
constructor(t) {
|
|
1622
|
+
this.t = t;
|
|
1623
|
+
}
|
|
1624
|
+
t;
|
|
1625
|
+
list() {
|
|
1626
|
+
return this.t.request("GET", "/platform/v23/guest-tokens");
|
|
1627
|
+
}
|
|
1628
|
+
/** Plaintext token appears once in the response — treat as a secret. */
|
|
1629
|
+
issue(input) {
|
|
1630
|
+
return this.t.request("POST", "/platform/v23/guest-tokens", { json: input });
|
|
1631
|
+
}
|
|
1632
|
+
revoke(tokenId) {
|
|
1633
|
+
return this.t.request("POST", `/platform/v23/guest-tokens/${tokenId}/revoke`);
|
|
1634
|
+
}
|
|
1635
|
+
};
|
|
1636
|
+
|
|
1637
|
+
// src/resources/platform.ts
|
|
1638
|
+
var WorkshopBriefingsResource = class {
|
|
1639
|
+
constructor(t) {
|
|
1640
|
+
this.t = t;
|
|
1641
|
+
}
|
|
1642
|
+
t;
|
|
1643
|
+
list() {
|
|
1644
|
+
return this.t.request("GET", "/workshop/apps", { params: { kind: "briefing" } });
|
|
1645
|
+
}
|
|
1646
|
+
get(briefingId) {
|
|
1647
|
+
return this.t.request("GET", `/workshop/apps/${briefingId}`);
|
|
1648
|
+
}
|
|
1649
|
+
create(name) {
|
|
1650
|
+
return this.t.request("POST", "/workshop/apps", { json: { name, kind: "briefing" } });
|
|
1651
|
+
}
|
|
1652
|
+
patch(briefingId, payload) {
|
|
1653
|
+
return this.t.request("PATCH", `/workshop/apps/${briefingId}`, { json: payload });
|
|
1654
|
+
}
|
|
1655
|
+
broadcast(briefingId) {
|
|
1656
|
+
return this.t.request("POST", `/workshop/briefings/${briefingId}/broadcast`);
|
|
1657
|
+
}
|
|
1658
|
+
};
|
|
1659
|
+
var WorkshopDossiersResource = class {
|
|
1660
|
+
constructor(t) {
|
|
1661
|
+
this.t = t;
|
|
1662
|
+
}
|
|
1663
|
+
t;
|
|
1664
|
+
list() {
|
|
1665
|
+
return this.t.request("GET", "/workshop/dossiers");
|
|
1666
|
+
}
|
|
1667
|
+
get(dossierId) {
|
|
1668
|
+
return this.t.request("GET", `/workshop/dossiers/${dossierId}`);
|
|
1669
|
+
}
|
|
1670
|
+
create(title) {
|
|
1671
|
+
return this.t.request("POST", "/workshop/dossiers", { json: { title } });
|
|
1672
|
+
}
|
|
1673
|
+
patch(dossierId, body) {
|
|
1674
|
+
return this.t.request("PATCH", `/workshop/dossiers/${dossierId}`, { json: body });
|
|
1675
|
+
}
|
|
1676
|
+
delete(dossierId) {
|
|
1677
|
+
return this.t.request("DELETE", `/workshop/dossiers/${dossierId}`);
|
|
1678
|
+
}
|
|
1679
|
+
addEmbed(dossierId, kind, sourceRef, nodeId) {
|
|
1680
|
+
return this.t.request("POST", `/workshop/dossiers/${dossierId}/embeds`, {
|
|
1681
|
+
json: { embed_kind: kind, source_ref: sourceRef, node_id: nodeId }
|
|
1682
|
+
});
|
|
1683
|
+
}
|
|
1684
|
+
embeds(dossierId) {
|
|
1685
|
+
return this.t.request("GET", `/workshop/dossiers/${dossierId}/embeds`);
|
|
1686
|
+
}
|
|
1687
|
+
};
|
|
1688
|
+
var WorkshopCovsResource = class {
|
|
1689
|
+
constructor(t) {
|
|
1690
|
+
this.t = t;
|
|
1691
|
+
}
|
|
1692
|
+
t;
|
|
1693
|
+
list(objectType) {
|
|
1694
|
+
return this.t.request("GET", "/workshop/covs", { params: { object_type: objectType } });
|
|
1695
|
+
}
|
|
1696
|
+
get(covId) {
|
|
1697
|
+
return this.t.request("GET", `/workshop/covs/${covId}`);
|
|
1698
|
+
}
|
|
1699
|
+
/** Full-object upsert. */
|
|
1700
|
+
save(cov) {
|
|
1701
|
+
return this.t.request("POST", "/workshop/covs", { json: cov });
|
|
1702
|
+
}
|
|
1703
|
+
delete(covId) {
|
|
1704
|
+
return this.t.request("DELETE", `/workshop/covs/${covId}`);
|
|
1705
|
+
}
|
|
1706
|
+
setTeamDefault(covId) {
|
|
1707
|
+
return this.t.request("POST", `/workshop/covs/${covId}/set-team-default`);
|
|
1708
|
+
}
|
|
1709
|
+
};
|
|
1710
|
+
var WorkshopResource = class {
|
|
1711
|
+
constructor(t) {
|
|
1712
|
+
this.t = t;
|
|
1713
|
+
this.briefings = new WorkshopBriefingsResource(t);
|
|
1714
|
+
this.dossiers = new WorkshopDossiersResource(t);
|
|
1715
|
+
this.covs = new WorkshopCovsResource(t);
|
|
1716
|
+
}
|
|
1717
|
+
t;
|
|
1718
|
+
briefings;
|
|
1719
|
+
dossiers;
|
|
1720
|
+
covs;
|
|
1721
|
+
widgetCatalog(proposableOnly = false) {
|
|
1722
|
+
return this.t.request("GET", "/workshop/widget-catalog", {
|
|
1723
|
+
params: proposableOnly ? { proposable_only: "true" } : {}
|
|
1724
|
+
});
|
|
1725
|
+
}
|
|
1726
|
+
};
|
|
1727
|
+
var ComputeProvidersResource = class {
|
|
1728
|
+
constructor(t) {
|
|
1729
|
+
this.t = t;
|
|
1730
|
+
}
|
|
1731
|
+
t;
|
|
1732
|
+
catalog() {
|
|
1733
|
+
return this.t.request("GET", "/compute/providers/catalog");
|
|
1734
|
+
}
|
|
1735
|
+
list() {
|
|
1736
|
+
return this.t.request("GET", "/compute/providers");
|
|
1737
|
+
}
|
|
1738
|
+
/** `api_key` is write-only — never returned by the API. */
|
|
1739
|
+
create(input) {
|
|
1740
|
+
return this.t.request("POST", "/compute/providers", { json: input });
|
|
1741
|
+
}
|
|
1742
|
+
update(providerId, patch) {
|
|
1743
|
+
const body = Object.fromEntries(Object.entries(patch).filter(([, v]) => v !== void 0));
|
|
1744
|
+
return this.t.request("PUT", `/compute/providers/${providerId}`, { json: body });
|
|
1745
|
+
}
|
|
1746
|
+
delete(providerId) {
|
|
1747
|
+
return this.t.request("DELETE", `/compute/providers/${providerId}`);
|
|
1748
|
+
}
|
|
1749
|
+
test(providerId) {
|
|
1750
|
+
return this.t.request("POST", `/compute/providers/${providerId}/test`);
|
|
1751
|
+
}
|
|
1752
|
+
};
|
|
1753
|
+
var ComputeReleasesResource = class {
|
|
1754
|
+
constructor(t) {
|
|
1755
|
+
this.t = t;
|
|
1756
|
+
}
|
|
1757
|
+
t;
|
|
1758
|
+
list(name) {
|
|
1759
|
+
return this.t.request("GET", "/compute/releases", { params: { name } });
|
|
1760
|
+
}
|
|
1761
|
+
publish(input) {
|
|
1762
|
+
return this.t.request("POST", "/compute/releases", { json: input });
|
|
1763
|
+
}
|
|
1764
|
+
/** 409 if `eval_score` is below the gate. */
|
|
1765
|
+
promote(name, version, minEvalScore = 0.8) {
|
|
1766
|
+
return this.t.request("POST", "/compute/releases/promote", {
|
|
1767
|
+
json: { name, version, min_eval_score: minEvalScore }
|
|
1768
|
+
});
|
|
1769
|
+
}
|
|
1770
|
+
deploy(providerId, name, channel = "production", extra = {}) {
|
|
1771
|
+
return this.t.request("POST", `/compute/providers/${providerId}/releases/deploy`, {
|
|
1772
|
+
json: { name, channel, ...extra }
|
|
1773
|
+
});
|
|
1774
|
+
}
|
|
1775
|
+
};
|
|
1776
|
+
var ComputeControlResource = class {
|
|
1777
|
+
constructor(t, providerId) {
|
|
1778
|
+
this.t = t;
|
|
1779
|
+
this.base = `/compute/providers/${providerId}`;
|
|
1780
|
+
}
|
|
1781
|
+
t;
|
|
1782
|
+
base;
|
|
1783
|
+
listTemplates() {
|
|
1784
|
+
return this.t.request("GET", `${this.base}/templates`);
|
|
1785
|
+
}
|
|
1786
|
+
saveTemplate(name, imageName, extra = {}) {
|
|
1787
|
+
return this.t.request("POST", `${this.base}/templates`, {
|
|
1788
|
+
json: { name, image_name: imageName, ...extra }
|
|
1789
|
+
});
|
|
1790
|
+
}
|
|
1791
|
+
deleteTemplate(templateId) {
|
|
1792
|
+
return this.t.request("DELETE", `${this.base}/templates/${templateId}`);
|
|
1793
|
+
}
|
|
1794
|
+
listEndpoints() {
|
|
1795
|
+
return this.t.request("GET", `${this.base}/endpoints`);
|
|
1796
|
+
}
|
|
1797
|
+
createEndpoint(templateId, name, extra = {}) {
|
|
1798
|
+
return this.t.request("POST", `${this.base}/endpoints`, {
|
|
1799
|
+
json: { template_id: templateId, name, ...extra }
|
|
1800
|
+
});
|
|
1801
|
+
}
|
|
1802
|
+
updateEndpoint(endpointId, patch) {
|
|
1803
|
+
return this.t.request("PATCH", `${this.base}/endpoints/${endpointId}`, {
|
|
1804
|
+
json: { patch }
|
|
1805
|
+
});
|
|
1806
|
+
}
|
|
1807
|
+
deleteEndpoint(endpointId) {
|
|
1808
|
+
return this.t.request("DELETE", `${this.base}/endpoints/${endpointId}`);
|
|
1809
|
+
}
|
|
1810
|
+
endpointHealth(endpointId) {
|
|
1811
|
+
return this.t.request("GET", `${this.base}/endpoints/${endpointId}/health`);
|
|
1812
|
+
}
|
|
1813
|
+
/** `sync: true` long-polls server-side up to `timeout_s` — pass a matching
|
|
1814
|
+
* `signal` (or raise the client `timeoutMs`) for long jobs. */
|
|
1815
|
+
submitJob(endpointId, input, opts = {}) {
|
|
1816
|
+
return this.t.request("POST", `${this.base}/endpoints/${endpointId}/jobs`, {
|
|
1817
|
+
json: { input, sync: opts.sync ?? false, webhook: opts.webhook, timeout_s: opts.timeout_s }
|
|
1818
|
+
});
|
|
1819
|
+
}
|
|
1820
|
+
jobStatus(endpointId, jobId) {
|
|
1821
|
+
return this.t.request("GET", `${this.base}/endpoints/${endpointId}/jobs/${jobId}`);
|
|
1822
|
+
}
|
|
1823
|
+
cancelJob(endpointId, jobId) {
|
|
1824
|
+
return this.t.request("POST", `${this.base}/endpoints/${endpointId}/jobs/${jobId}/cancel`);
|
|
1825
|
+
}
|
|
1826
|
+
listPods() {
|
|
1827
|
+
return this.t.request("GET", `${this.base}/pods`);
|
|
1828
|
+
}
|
|
1829
|
+
createPod(name, imageName, extra = {}) {
|
|
1830
|
+
return this.t.request("POST", `${this.base}/pods`, {
|
|
1831
|
+
json: { name, image_name: imageName, ...extra }
|
|
1832
|
+
});
|
|
1833
|
+
}
|
|
1834
|
+
stopPod(podId) {
|
|
1835
|
+
return this.t.request("POST", `${this.base}/pods/${podId}/stop`);
|
|
1836
|
+
}
|
|
1837
|
+
terminatePod(podId) {
|
|
1838
|
+
return this.t.request("DELETE", `${this.base}/pods/${podId}`);
|
|
1839
|
+
}
|
|
1840
|
+
};
|
|
1841
|
+
var ComputeResource = class {
|
|
1842
|
+
constructor(t) {
|
|
1843
|
+
this.t = t;
|
|
1844
|
+
this.providers = new ComputeProvidersResource(t);
|
|
1845
|
+
this.releases = new ComputeReleasesResource(t);
|
|
1846
|
+
}
|
|
1847
|
+
t;
|
|
1848
|
+
providers;
|
|
1849
|
+
releases;
|
|
1850
|
+
selectModel(objective, opts = {}) {
|
|
1851
|
+
return this.t.request("POST", "/compute/vision/select-model", {
|
|
1852
|
+
json: { objective, ...opts }
|
|
1853
|
+
});
|
|
1854
|
+
}
|
|
1855
|
+
generateSpec(objective, opts = {}) {
|
|
1856
|
+
return this.t.request("POST", "/compute/spec/generate", {
|
|
1857
|
+
json: { objective, base_image: opts.base_image ?? "python:3.11-slim", ...opts }
|
|
1858
|
+
});
|
|
1859
|
+
}
|
|
1860
|
+
visionCount(imageUrl, instruction, opts = {}) {
|
|
1861
|
+
return this.t.request("POST", "/compute/vision/count", {
|
|
1862
|
+
json: { image_url: imageUrl, instruction, ...opts }
|
|
1863
|
+
});
|
|
1864
|
+
}
|
|
1865
|
+
/** Factory (no HTTP) — control plane scoped to one provider. */
|
|
1866
|
+
control(providerId) {
|
|
1867
|
+
return new ComputeControlResource(this.t, providerId);
|
|
1868
|
+
}
|
|
1869
|
+
};
|
|
1870
|
+
var InferenceResource = class {
|
|
1871
|
+
constructor(t) {
|
|
1872
|
+
this.t = t;
|
|
1873
|
+
}
|
|
1874
|
+
t;
|
|
1875
|
+
complete(prompt, opts = {}) {
|
|
1876
|
+
return this.t.request("POST", "/inference/complete", {
|
|
1877
|
+
json: {
|
|
1878
|
+
prompt,
|
|
1879
|
+
provider: opts.provider ?? "groq",
|
|
1880
|
+
model: opts.model ?? "llama-3.3-70b-versatile",
|
|
1881
|
+
system_prompt: opts.system_prompt,
|
|
1882
|
+
temperature: opts.temperature ?? 0,
|
|
1883
|
+
max_tokens: opts.max_tokens ?? 4096
|
|
1884
|
+
}
|
|
1885
|
+
});
|
|
1886
|
+
}
|
|
1887
|
+
chat(messages, opts = {}) {
|
|
1888
|
+
const body = {
|
|
1889
|
+
messages,
|
|
1890
|
+
provider: opts.provider ?? "groq",
|
|
1891
|
+
model: opts.model ?? "llama-3.3-70b-versatile",
|
|
1892
|
+
temperature: opts.temperature ?? 0,
|
|
1893
|
+
max_tokens: opts.max_tokens ?? 4096
|
|
1894
|
+
};
|
|
1895
|
+
if (opts.rag_sources) {
|
|
1896
|
+
body.rag_sources = opts.rag_sources;
|
|
1897
|
+
body.rag_limit = opts.rag_limit ?? 5;
|
|
1898
|
+
}
|
|
1899
|
+
return this.t.request("POST", "/inference/chat", { json: body });
|
|
1900
|
+
}
|
|
1901
|
+
models() {
|
|
1902
|
+
return this.t.request("GET", "/inference/models");
|
|
1903
|
+
}
|
|
1904
|
+
collections() {
|
|
1905
|
+
return this.t.request("GET", "/inference/collections");
|
|
1906
|
+
}
|
|
1907
|
+
async chatWithRag(query, opts = {}) {
|
|
1908
|
+
const payload = await this.t.request("POST", "/mcp/tools/call", {
|
|
1909
|
+
json: {
|
|
1910
|
+
name: "chat_with_rag",
|
|
1911
|
+
arguments: {
|
|
1912
|
+
query,
|
|
1913
|
+
sources: opts.sources ?? ["all"],
|
|
1914
|
+
limit: opts.limit ?? 6,
|
|
1915
|
+
provider: opts.provider ?? "groq",
|
|
1916
|
+
model: opts.model ?? "llama-3.3-70b-versatile",
|
|
1917
|
+
temperature: opts.temperature ?? 0.2,
|
|
1918
|
+
max_tokens: opts.max_tokens ?? 512,
|
|
1919
|
+
system: opts.system
|
|
1920
|
+
}
|
|
1921
|
+
}
|
|
1922
|
+
});
|
|
1923
|
+
return payload.result ?? payload;
|
|
1924
|
+
}
|
|
1925
|
+
auditTrail(opts = {}) {
|
|
1926
|
+
return this.t.request("GET", "/inference/audit-trail", {
|
|
1927
|
+
params: { limit: opts.limit ?? 50, provider: opts.provider }
|
|
1928
|
+
});
|
|
1929
|
+
}
|
|
1930
|
+
};
|
|
1931
|
+
var CodegenResource = class {
|
|
1932
|
+
constructor(t) {
|
|
1933
|
+
this.t = t;
|
|
1934
|
+
}
|
|
1935
|
+
t;
|
|
1936
|
+
/** kind ∈ transform|script */
|
|
1937
|
+
generate(objective, kind = "transform", context) {
|
|
1938
|
+
return this.t.request("POST", "/codegen/generate", { json: { objective, kind, context } });
|
|
1939
|
+
}
|
|
1940
|
+
};
|
|
1941
|
+
var CorrelationResource = class {
|
|
1942
|
+
constructor(t) {
|
|
1943
|
+
this.t = t;
|
|
1944
|
+
}
|
|
1945
|
+
t;
|
|
1946
|
+
quickLinks(value, kind) {
|
|
1947
|
+
return this.t.request("POST", "/correlation/quick-links", { json: { value, kind } });
|
|
1948
|
+
}
|
|
1949
|
+
startChain(value, opts = {}) {
|
|
1950
|
+
return this.t.request("POST", "/correlation/chain", { json: { value, ...opts } });
|
|
1951
|
+
}
|
|
1952
|
+
/** Poll until `status === "done"`. */
|
|
1953
|
+
getChain(taskId) {
|
|
1954
|
+
return this.t.request("GET", `/correlation/chain/${taskId}`);
|
|
1955
|
+
}
|
|
1956
|
+
/** Opt-in: materializes the chain graph into the ontology. */
|
|
1957
|
+
saveChain(taskId, nodeIds) {
|
|
1958
|
+
return this.t.request("POST", `/correlation/chain/${taskId}/save`, {
|
|
1959
|
+
json: nodeIds ? { node_ids: nodeIds } : {}
|
|
1960
|
+
});
|
|
1961
|
+
}
|
|
1962
|
+
};
|
|
1963
|
+
var SituationalResource = class {
|
|
1964
|
+
constructor(t) {
|
|
1965
|
+
this.t = t;
|
|
1966
|
+
}
|
|
1967
|
+
t;
|
|
1968
|
+
nearby(nodeId, opts = {}) {
|
|
1969
|
+
return this.t.request("GET", "/api/v1/situational/nearby", {
|
|
1970
|
+
params: { node_id: nodeId, ...opts, kinds: opts.kinds?.join(",") }
|
|
1971
|
+
});
|
|
1972
|
+
}
|
|
1973
|
+
correlations(nodeId) {
|
|
1974
|
+
return this.t.request("GET", "/api/v1/situational/correlations", {
|
|
1975
|
+
params: { node_id: nodeId }
|
|
1976
|
+
});
|
|
1977
|
+
}
|
|
1978
|
+
correlate(anchorNodeId, opts = {}) {
|
|
1979
|
+
return this.t.request("POST", "/api/v1/situational/correlations", {
|
|
1980
|
+
json: { anchor_node_id: anchorNodeId, ...opts }
|
|
1981
|
+
});
|
|
1982
|
+
}
|
|
1983
|
+
/** Reversible — removes the correlation edge. */
|
|
1984
|
+
cut(edgeId) {
|
|
1985
|
+
return this.t.request("DELETE", `/api/v1/situational/correlations/${edgeId}`);
|
|
1986
|
+
}
|
|
1987
|
+
};
|
|
1988
|
+
var MergeResource = class {
|
|
1989
|
+
constructor(t) {
|
|
1990
|
+
this.t = t;
|
|
1991
|
+
}
|
|
1992
|
+
t;
|
|
1993
|
+
suggestTarget(nodeType, canonical) {
|
|
1994
|
+
return this.t.request("POST", "/ontology/merge/suggest-target", {
|
|
1995
|
+
json: { node_type: nodeType, canonical }
|
|
1996
|
+
});
|
|
1997
|
+
}
|
|
1998
|
+
/** Pass `result_payload` (raw) OR `properties` (ready). */
|
|
1999
|
+
preview(target, opts = {}) {
|
|
2000
|
+
return this.t.request("POST", "/ontology/merge/preview", { json: { target, ...opts } });
|
|
2001
|
+
}
|
|
2002
|
+
/** `field_resolutions`: `{field: "keep"|"replace"|"append"}`;
|
|
2003
|
+
* `link`: `{target_object_id, relation_type, metadata?}`. */
|
|
2004
|
+
apply(target, opts = {}) {
|
|
2005
|
+
return this.t.request("POST", "/ontology/merge/apply", { json: { target, ...opts } });
|
|
2006
|
+
}
|
|
2007
|
+
};
|
|
2008
|
+
|
|
2009
|
+
// src/resources/domain.ts
|
|
2010
|
+
var AtlasLayersResource = class {
|
|
2011
|
+
constructor(t) {
|
|
2012
|
+
this.t = t;
|
|
2013
|
+
}
|
|
2014
|
+
t;
|
|
2015
|
+
list() {
|
|
2016
|
+
return this.t.request("GET", "/atlas/layers");
|
|
2017
|
+
}
|
|
2018
|
+
create(name, kind, extra = {}) {
|
|
2019
|
+
const body = { name, kind };
|
|
2020
|
+
for (const [k, v] of Object.entries(extra)) if (v !== void 0 && v !== null) body[k] = v;
|
|
2021
|
+
return this.t.request("POST", "/atlas/layers", { json: body });
|
|
2022
|
+
}
|
|
2023
|
+
delete(layerId) {
|
|
2024
|
+
return this.t.request("DELETE", `/atlas/layers/${layerId}`);
|
|
2025
|
+
}
|
|
2026
|
+
/** KML content travels inside the JSON body (not multipart) — same as Python. */
|
|
2027
|
+
importKml(layerId, kmlText) {
|
|
2028
|
+
return this.t.request("POST", `/atlas/layers/${layerId}/import`, {
|
|
2029
|
+
json: { _kml_bytes_b64: kmlText }
|
|
2030
|
+
});
|
|
2031
|
+
}
|
|
2032
|
+
};
|
|
2033
|
+
var AtlasEvaluationResource = class {
|
|
2034
|
+
constructor(t) {
|
|
2035
|
+
this.t = t;
|
|
2036
|
+
}
|
|
2037
|
+
t;
|
|
2038
|
+
status() {
|
|
2039
|
+
return this.t.request("GET", "/atlas/evaluation/status");
|
|
2040
|
+
}
|
|
2041
|
+
runOnce() {
|
|
2042
|
+
return this.t.request("POST", "/atlas/evaluation/run-once");
|
|
2043
|
+
}
|
|
2044
|
+
};
|
|
2045
|
+
var AtlasResource = class {
|
|
2046
|
+
layers;
|
|
2047
|
+
evaluation;
|
|
2048
|
+
constructor(t) {
|
|
2049
|
+
this.layers = new AtlasLayersResource(t);
|
|
2050
|
+
this.evaluation = new AtlasEvaluationResource(t);
|
|
2051
|
+
}
|
|
2052
|
+
};
|
|
2053
|
+
var BriefingResource = class {
|
|
2054
|
+
constructor(t) {
|
|
2055
|
+
this.t = t;
|
|
2056
|
+
}
|
|
2057
|
+
t;
|
|
2058
|
+
get(slug) {
|
|
2059
|
+
return this.t.request("GET", `/campaign/home-briefing/${slug}`);
|
|
2060
|
+
}
|
|
2061
|
+
refresh(slug) {
|
|
2062
|
+
return this.t.request("POST", `/campaign/home-briefing/${slug}/refresh`);
|
|
2063
|
+
}
|
|
2064
|
+
crisisPlan(slug) {
|
|
2065
|
+
return this.t.request("POST", `/campaign/home-briefing/${slug}/crisis-plan`);
|
|
2066
|
+
}
|
|
2067
|
+
};
|
|
2068
|
+
var CctvBookmarksResource = class {
|
|
2069
|
+
constructor(t) {
|
|
2070
|
+
this.t = t;
|
|
2071
|
+
}
|
|
2072
|
+
t;
|
|
2073
|
+
create(streamId, input) {
|
|
2074
|
+
return this.t.request("POST", `/api/v1/cctv/streams/${streamId}/bookmarks`, { json: input });
|
|
2075
|
+
}
|
|
2076
|
+
list(streamId, opts = {}) {
|
|
2077
|
+
return this.t.request("GET", `/api/v1/cctv/streams/${streamId}/bookmarks`, { params: opts });
|
|
2078
|
+
}
|
|
2079
|
+
delete(bookmarkId) {
|
|
2080
|
+
return this.t.request("DELETE", `/api/v1/cctv/bookmarks/${bookmarkId}`);
|
|
2081
|
+
}
|
|
2082
|
+
};
|
|
2083
|
+
var CctvGcpsResource = class {
|
|
2084
|
+
constructor(t) {
|
|
2085
|
+
this.t = t;
|
|
2086
|
+
}
|
|
2087
|
+
t;
|
|
2088
|
+
put(streamId, gcps) {
|
|
2089
|
+
return this.t.request("PUT", `/api/v1/cctv/streams/${streamId}/gcps`, { json: { gcps } });
|
|
2090
|
+
}
|
|
2091
|
+
get(streamId) {
|
|
2092
|
+
return this.t.request("GET", `/api/v1/cctv/streams/${streamId}/gcps`);
|
|
2093
|
+
}
|
|
2094
|
+
delete(streamId) {
|
|
2095
|
+
return this.t.request("DELETE", `/api/v1/cctv/streams/${streamId}/gcps`);
|
|
2096
|
+
}
|
|
2097
|
+
};
|
|
2098
|
+
var CctvHotlistResource = class {
|
|
2099
|
+
constructor(t) {
|
|
2100
|
+
this.t = t;
|
|
2101
|
+
}
|
|
2102
|
+
t;
|
|
2103
|
+
list(activeOnly) {
|
|
2104
|
+
return this.t.request("GET", "/api/v1/cctv/hotlist", { params: { active_only: activeOnly } });
|
|
2105
|
+
}
|
|
2106
|
+
add(plate, opts = {}) {
|
|
2107
|
+
return this.t.request("POST", "/api/v1/cctv/hotlist", {
|
|
2108
|
+
json: { plate, reason: opts.reason, severity: opts.severity ?? "medium" }
|
|
2109
|
+
});
|
|
2110
|
+
}
|
|
2111
|
+
remove(watchedId) {
|
|
2112
|
+
return this.t.request("DELETE", `/api/v1/cctv/hotlist/${watchedId}`);
|
|
2113
|
+
}
|
|
2114
|
+
};
|
|
2115
|
+
var CctvResource = class {
|
|
2116
|
+
constructor(t) {
|
|
2117
|
+
this.t = t;
|
|
2118
|
+
this.bookmarks = new CctvBookmarksResource(t);
|
|
2119
|
+
this.gcps = new CctvGcpsResource(t);
|
|
2120
|
+
this.hotlist = new CctvHotlistResource(t);
|
|
2121
|
+
}
|
|
2122
|
+
t;
|
|
2123
|
+
bookmarks;
|
|
2124
|
+
gcps;
|
|
2125
|
+
hotlist;
|
|
2126
|
+
streamsPage(opts = {}) {
|
|
2127
|
+
return this.t.request("GET", "/api/v1/cctv/streams/page", { params: opts });
|
|
2128
|
+
}
|
|
2129
|
+
detections(streamId, opts = {}) {
|
|
2130
|
+
return this.t.request("GET", `/api/v1/cctv/streams/${streamId}/detections`, { params: opts });
|
|
2131
|
+
}
|
|
2132
|
+
detectorClasses() {
|
|
2133
|
+
return this.t.request("GET", "/api/v1/cctv/detector/classes");
|
|
2134
|
+
}
|
|
2135
|
+
presets() {
|
|
2136
|
+
return this.t.request("GET", "/api/v1/cctv/presets");
|
|
2137
|
+
}
|
|
2138
|
+
bridgeBackfill() {
|
|
2139
|
+
return this.t.request("POST", "/api/v1/cctv/bridge/backfill");
|
|
2140
|
+
}
|
|
2141
|
+
/** 202 — returns a provider job to poll. */
|
|
2142
|
+
detectNow(streamId, opts = {}) {
|
|
2143
|
+
return this.t.request("POST", `/api/v1/cctv/streams/${streamId}/detect-now`, { json: opts });
|
|
2144
|
+
}
|
|
2145
|
+
/** 202 — export job; poll with `exportStatus`. */
|
|
2146
|
+
exportClip(streamId, opts = {}) {
|
|
2147
|
+
return this.t.request("POST", `/api/v1/cctv/streams/${streamId}/export`, { json: opts });
|
|
2148
|
+
}
|
|
2149
|
+
exportStatus(jobId) {
|
|
2150
|
+
return this.t.request("GET", `/api/v1/cctv/exports/${jobId}`);
|
|
2151
|
+
}
|
|
2152
|
+
recordings(streamId, opts = {}) {
|
|
2153
|
+
return this.t.request("GET", `/api/v1/cctv/streams/${streamId}/recordings`, { params: opts });
|
|
2154
|
+
}
|
|
2155
|
+
recordingStatus(streamId) {
|
|
2156
|
+
return this.t.request("GET", `/api/v1/cctv/streams/${streamId}/recording`);
|
|
2157
|
+
}
|
|
2158
|
+
/** action ∈ start|stop */
|
|
2159
|
+
recordingControl(streamId, action, cadence) {
|
|
2160
|
+
return this.t.request("POST", `/api/v1/cctv/streams/${streamId}/recording`, {
|
|
2161
|
+
json: { action, cadence }
|
|
2162
|
+
});
|
|
2163
|
+
}
|
|
2164
|
+
/** Returns the raw HLS VOD playlist text (m3u8), not JSON. */
|
|
2165
|
+
recordingsPlaylist(streamId, opts = {}) {
|
|
2166
|
+
return this.t.request("GET", `/api/v1/cctv/streams/${streamId}/recordings/playlist.m3u8`, {
|
|
2167
|
+
params: opts
|
|
2168
|
+
});
|
|
2169
|
+
}
|
|
2170
|
+
};
|
|
2171
|
+
var EdgeResource = class {
|
|
2172
|
+
constructor(t) {
|
|
2173
|
+
this.t = t;
|
|
2174
|
+
}
|
|
2175
|
+
t;
|
|
2176
|
+
/**
|
|
2177
|
+
* Issue a single-use pairing code (short TTL). The plaintext `code` appears
|
|
2178
|
+
* ONLY in this response (hash at rest).
|
|
2179
|
+
*
|
|
2180
|
+
* `grants` GRANTS gestures to whichever device redeems the code (allowlist;
|
|
2181
|
+
* today `["retry"]`, so a desk app can ask the station to reconnect a
|
|
2182
|
+
* number). Empty — the default — is **read only**: least privilege, and
|
|
2183
|
+
* granting has to be a choice. The grant travels from the code to the node
|
|
2184
|
+
* and dies with it on `revoke`.
|
|
2185
|
+
*
|
|
2186
|
+
* Even when granted, the device never receives the gesture's ADDRESS
|
|
2187
|
+
* (`agent_id`/`skill_key`): it sends the verb and the server routes it.
|
|
2188
|
+
* Perm: `connectors.manage`.
|
|
2189
|
+
*/
|
|
2190
|
+
createPairingCode(opts = {}) {
|
|
2191
|
+
return this.t.request("POST", "/api/v1/edge/pairing-codes", { json: opts });
|
|
2192
|
+
}
|
|
2193
|
+
/** Nodes carry an additive `kind` field — see {@link EdgeNode}. */
|
|
2194
|
+
listNodes() {
|
|
2195
|
+
return this.t.request("GET", "/api/v1/edge/nodes");
|
|
2196
|
+
}
|
|
2197
|
+
listDiscovered() {
|
|
2198
|
+
return this.t.request("GET", "/api/v1/edge/discovered");
|
|
2199
|
+
}
|
|
2200
|
+
revoke(edgeId) {
|
|
2201
|
+
return this.t.request("POST", `/api/v1/edge/${edgeId}/revoke`);
|
|
2202
|
+
}
|
|
2203
|
+
setExpectedVersion(version) {
|
|
2204
|
+
return this.t.request("PUT", "/api/v1/edge/expected-version", { json: { version } });
|
|
2205
|
+
}
|
|
2206
|
+
getExpectedVersion() {
|
|
2207
|
+
return this.t.request("GET", "/api/v1/edge/expected-version");
|
|
2208
|
+
}
|
|
2209
|
+
};
|
|
2210
|
+
var VideoStreamsResource = class {
|
|
2211
|
+
constructor(t) {
|
|
2212
|
+
this.t = t;
|
|
2213
|
+
}
|
|
2214
|
+
t;
|
|
2215
|
+
list() {
|
|
2216
|
+
return this.t.request("GET", "/video/streams");
|
|
2217
|
+
}
|
|
2218
|
+
create(input) {
|
|
2219
|
+
return this.t.request("POST", "/video/streams", { json: input });
|
|
2220
|
+
}
|
|
2221
|
+
delete(streamId) {
|
|
2222
|
+
return this.t.request("DELETE", `/video/streams/${streamId}`);
|
|
2223
|
+
}
|
|
2224
|
+
};
|
|
2225
|
+
var VideoResource = class {
|
|
2226
|
+
constructor(t) {
|
|
2227
|
+
this.t = t;
|
|
2228
|
+
this.streams = new VideoStreamsResource(t);
|
|
2229
|
+
}
|
|
2230
|
+
t;
|
|
2231
|
+
streams;
|
|
2232
|
+
listDetections(streamId, opts = {}) {
|
|
2233
|
+
return this.t.request("GET", "/video/detections", {
|
|
2234
|
+
params: { stream_id: streamId, ...opts }
|
|
2235
|
+
});
|
|
2236
|
+
}
|
|
2237
|
+
submitDetection(detection) {
|
|
2238
|
+
return this.t.request("POST", "/video/detections", { json: detection });
|
|
2239
|
+
}
|
|
2240
|
+
listTags(streamId) {
|
|
2241
|
+
return this.t.request("GET", "/video/tags", { params: { stream_id: streamId } });
|
|
2242
|
+
}
|
|
2243
|
+
submitTag(tag) {
|
|
2244
|
+
return this.t.request("POST", "/video/tags", { json: tag });
|
|
2245
|
+
}
|
|
2246
|
+
soakHeatmap(streamId, from, to, precision) {
|
|
2247
|
+
return this.t.request("GET", "/video/soak", {
|
|
2248
|
+
params: { stream_id: streamId, from, to, precision }
|
|
2249
|
+
});
|
|
2250
|
+
}
|
|
2251
|
+
createExport(streamId, frameRange, redactions) {
|
|
2252
|
+
return this.t.request("POST", "/video/exports", {
|
|
2253
|
+
json: { stream_id: streamId, frame_range: frameRange, redactions }
|
|
2254
|
+
});
|
|
2255
|
+
}
|
|
2256
|
+
getExport(exportId) {
|
|
2257
|
+
return this.t.request("GET", `/video/exports/${exportId}`);
|
|
2258
|
+
}
|
|
2259
|
+
};
|
|
2260
|
+
var ComunicadosResource = class {
|
|
2261
|
+
constructor(t) {
|
|
2262
|
+
this.t = t;
|
|
2263
|
+
}
|
|
2264
|
+
t;
|
|
2265
|
+
list(opts = {}) {
|
|
2266
|
+
return this.t.request("GET", "/platform/v23/comunicados", { params: opts });
|
|
2267
|
+
}
|
|
2268
|
+
listActive() {
|
|
2269
|
+
return this.t.request("GET", "/platform/v23/comunicados/active");
|
|
2270
|
+
}
|
|
2271
|
+
create(input) {
|
|
2272
|
+
return this.t.request("POST", "/platform/v23/comunicados", { json: input });
|
|
2273
|
+
}
|
|
2274
|
+
/** Sparse patch — only provided keys are sent. */
|
|
2275
|
+
patch(comunicadoId, patch) {
|
|
2276
|
+
const body = Object.fromEntries(Object.entries(patch).filter(([, v]) => v !== void 0));
|
|
2277
|
+
return this.t.request("PATCH", `/platform/v23/comunicados/${comunicadoId}`, { json: body });
|
|
2278
|
+
}
|
|
2279
|
+
/** Soft delete. */
|
|
2280
|
+
delete(comunicadoId) {
|
|
2281
|
+
return this.t.request("DELETE", `/platform/v23/comunicados/${comunicadoId}`);
|
|
2282
|
+
}
|
|
2283
|
+
/** Idempotent per-user dismissal. */
|
|
2284
|
+
dismissMe(comunicadoId) {
|
|
2285
|
+
return this.t.request("POST", `/platform/v23/comunicados/${comunicadoId}/dismiss/me`, {
|
|
2286
|
+
json: {}
|
|
2287
|
+
});
|
|
2288
|
+
}
|
|
2289
|
+
};
|
|
2290
|
+
var CampaignBriefingResource = class {
|
|
2291
|
+
constructor(t) {
|
|
2292
|
+
this.t = t;
|
|
2293
|
+
}
|
|
2294
|
+
t;
|
|
2295
|
+
refresh(opts = {}) {
|
|
2296
|
+
return this.t.request("POST", "/campaign/home-briefing/refresh", {
|
|
2297
|
+
json: { default_modo_inicial: "B", ...opts }
|
|
2298
|
+
});
|
|
2299
|
+
}
|
|
2300
|
+
get(candidatoSlug, includeHeadline) {
|
|
2301
|
+
return this.t.request("GET", "/campaign/home-briefing", {
|
|
2302
|
+
params: {
|
|
2303
|
+
candidato_slug: candidatoSlug,
|
|
2304
|
+
include_headline: includeHeadline === void 0 ? void 0 : String(includeHeadline)
|
|
2305
|
+
}
|
|
2306
|
+
});
|
|
2307
|
+
}
|
|
2308
|
+
/** 409 when the briefing is in crisis mode. */
|
|
2309
|
+
regenerateHeadline(candidatoSlug) {
|
|
2310
|
+
return this.t.request("POST", "/campaign/home-briefing/headline/regenerate", {
|
|
2311
|
+
json: { candidato_slug: candidatoSlug }
|
|
2312
|
+
});
|
|
2313
|
+
}
|
|
2314
|
+
/** duration_hours ∈ 1..168 (default 24). */
|
|
2315
|
+
overrideModo(candidatoSlug, novoModo, durationHours = 24) {
|
|
2316
|
+
return this.t.request("POST", "/campaign/home-briefing/modo/override", {
|
|
2317
|
+
json: { candidato_slug: candidatoSlug, novo_modo: novoModo, duration_hours: durationHours }
|
|
2318
|
+
});
|
|
2319
|
+
}
|
|
2320
|
+
};
|
|
2321
|
+
var CampaignResource = class {
|
|
2322
|
+
briefing;
|
|
2323
|
+
constructor(t) {
|
|
2324
|
+
this.briefing = new CampaignBriefingResource(t);
|
|
2325
|
+
}
|
|
2326
|
+
};
|
|
2327
|
+
|
|
2328
|
+
// src/resources/collab.ts
|
|
2329
|
+
var FormsResource = class {
|
|
2330
|
+
constructor(t) {
|
|
2331
|
+
this.t = t;
|
|
2332
|
+
}
|
|
2333
|
+
t;
|
|
2334
|
+
submit(formKey, payload, opts = {}) {
|
|
2335
|
+
return this.t.request("POST", "/platform/v23/forms/submit", {
|
|
2336
|
+
json: {
|
|
2337
|
+
form_key: formKey,
|
|
2338
|
+
payload,
|
|
2339
|
+
visibility_policy: opts.visibility_policy ?? "requires_auth",
|
|
2340
|
+
...opts
|
|
2341
|
+
}
|
|
2342
|
+
});
|
|
2343
|
+
}
|
|
2344
|
+
listSubmissions(opts = {}) {
|
|
2345
|
+
return this.t.request("GET", "/platform/v23/forms/submissions", { params: opts });
|
|
2346
|
+
}
|
|
2347
|
+
};
|
|
2348
|
+
var AppShellSection = class {
|
|
2349
|
+
constructor(t, path) {
|
|
2350
|
+
this.t = t;
|
|
2351
|
+
this.path = path;
|
|
2352
|
+
}
|
|
2353
|
+
t;
|
|
2354
|
+
path;
|
|
2355
|
+
get() {
|
|
2356
|
+
return this.t.request("GET", this.path);
|
|
2357
|
+
}
|
|
2358
|
+
put(value) {
|
|
2359
|
+
return this.t.request("PUT", this.path, { json: value });
|
|
2360
|
+
}
|
|
2361
|
+
};
|
|
2362
|
+
var AppShellResource = class {
|
|
2363
|
+
constructor(t) {
|
|
2364
|
+
this.t = t;
|
|
2365
|
+
this.banner = new AppShellSection(t, "/platform/v23/app-shell/banner");
|
|
2366
|
+
this.footer = new AppShellSection(t, "/platform/v23/app-shell/footer");
|
|
2367
|
+
this.userMenu = new AppShellSection(t, "/platform/v23/app-shell/user-menu");
|
|
2368
|
+
this.sidenav = new AppShellSection(t, "/platform/v23/app-shell/sidenav");
|
|
2369
|
+
this.homepage = new AppShellSection(t, "/platform/v23/app-shell/homepage");
|
|
2370
|
+
}
|
|
2371
|
+
t;
|
|
2372
|
+
banner;
|
|
2373
|
+
footer;
|
|
2374
|
+
userMenu;
|
|
2375
|
+
sidenav;
|
|
2376
|
+
homepage;
|
|
2377
|
+
getMe() {
|
|
2378
|
+
return this.t.request("GET", "/platform/v23/app-shell/me");
|
|
2379
|
+
}
|
|
2380
|
+
putMe(config) {
|
|
2381
|
+
return this.t.request("PUT", "/platform/v23/app-shell/me", { json: config });
|
|
2382
|
+
}
|
|
2383
|
+
getTenant() {
|
|
2384
|
+
return this.t.request("GET", "/platform/v23/app-shell/tenant");
|
|
2385
|
+
}
|
|
2386
|
+
putTenant(config) {
|
|
2387
|
+
return this.t.request("PUT", "/platform/v23/app-shell/tenant", { json: config });
|
|
2388
|
+
}
|
|
2389
|
+
};
|
|
2390
|
+
var ProjectConstraintsResource = class {
|
|
2391
|
+
constructor(t) {
|
|
2392
|
+
this.t = t;
|
|
2393
|
+
}
|
|
2394
|
+
t;
|
|
2395
|
+
get(projectId) {
|
|
2396
|
+
return this.t.request("GET", `/projects/${projectId}/constraints`);
|
|
2397
|
+
}
|
|
2398
|
+
put(projectId, opts = {}) {
|
|
2399
|
+
return this.t.request("PUT", `/projects/${projectId}/constraints`, {
|
|
2400
|
+
json: { mode: opts.mode ?? "none", ...opts }
|
|
2401
|
+
});
|
|
2402
|
+
}
|
|
2403
|
+
clear(projectId) {
|
|
2404
|
+
return this.t.request("DELETE", `/projects/${projectId}/constraints`);
|
|
2405
|
+
}
|
|
2406
|
+
/** Report-only — deletes nothing. */
|
|
2407
|
+
revalidate(projectId) {
|
|
2408
|
+
return this.t.request("POST", `/projects/${projectId}/constraints/revalidate`);
|
|
2409
|
+
}
|
|
2410
|
+
};
|
|
2411
|
+
var ProjectsResource = class {
|
|
2412
|
+
constructor(t) {
|
|
2413
|
+
this.t = t;
|
|
2414
|
+
this.constraints = new ProjectConstraintsResource(t);
|
|
2415
|
+
}
|
|
2416
|
+
t;
|
|
2417
|
+
constraints;
|
|
2418
|
+
/** `spaceId: null` removes the project from its Space. */
|
|
2419
|
+
move(projectId, spaceId) {
|
|
2420
|
+
return this.t.request("PATCH", `/projects/${projectId}/move`, {
|
|
2421
|
+
json: { space_id: spaceId }
|
|
2422
|
+
});
|
|
2423
|
+
}
|
|
2424
|
+
};
|
|
2425
|
+
var OrganizationsResource = class {
|
|
2426
|
+
constructor(t) {
|
|
2427
|
+
this.t = t;
|
|
2428
|
+
}
|
|
2429
|
+
t;
|
|
2430
|
+
list(opts = {}) {
|
|
2431
|
+
return this.t.request("GET", "/organizations", { params: opts });
|
|
2432
|
+
}
|
|
2433
|
+
get(organizationId) {
|
|
2434
|
+
return this.t.request("GET", `/organizations/${organizationId}`);
|
|
2435
|
+
}
|
|
2436
|
+
listGuests(organizationId, includeRevoked = false) {
|
|
2437
|
+
return this.t.request("GET", `/organizations/${organizationId}/guests`, {
|
|
2438
|
+
params: { include_revoked: includeRevoked }
|
|
2439
|
+
});
|
|
2440
|
+
}
|
|
2441
|
+
inviteGuest(organizationId, userId, expiresAt) {
|
|
2442
|
+
return this.t.request("POST", `/organizations/${organizationId}/guests`, {
|
|
2443
|
+
json: { user_id: userId, expires_at: expiresAt }
|
|
2444
|
+
});
|
|
2445
|
+
}
|
|
2446
|
+
revokeGuest(organizationId, userId) {
|
|
2447
|
+
return this.t.request("DELETE", `/organizations/${organizationId}/guests/${userId}`);
|
|
2448
|
+
}
|
|
2449
|
+
};
|
|
2450
|
+
var SpacesResource = class {
|
|
2451
|
+
constructor(t) {
|
|
2452
|
+
this.t = t;
|
|
2453
|
+
}
|
|
2454
|
+
t;
|
|
2455
|
+
list(opts = {}) {
|
|
2456
|
+
return this.t.request("GET", "/spaces", { params: opts });
|
|
2457
|
+
}
|
|
2458
|
+
get(spaceId) {
|
|
2459
|
+
return this.t.request("GET", `/spaces/${spaceId}`);
|
|
2460
|
+
}
|
|
2461
|
+
create(slug, displayName, description) {
|
|
2462
|
+
return this.t.request("POST", "/spaces", {
|
|
2463
|
+
json: { slug, display_name: displayName, description }
|
|
2464
|
+
});
|
|
2465
|
+
}
|
|
2466
|
+
update(spaceId, patch) {
|
|
2467
|
+
return this.t.request("PATCH", `/spaces/${spaceId}`, { json: patch });
|
|
2468
|
+
}
|
|
2469
|
+
addOrganization(spaceId, tenantId) {
|
|
2470
|
+
return this.t.request("POST", `/spaces/${spaceId}/organizations`, {
|
|
2471
|
+
json: { tenant_id: tenantId }
|
|
2472
|
+
});
|
|
2473
|
+
}
|
|
2474
|
+
removeOrganization(spaceId, tenantId) {
|
|
2475
|
+
return this.t.request("DELETE", `/spaces/${spaceId}/organizations/${tenantId}`);
|
|
2476
|
+
}
|
|
2477
|
+
};
|
|
2478
|
+
var VALID_PROJECT_ROLES = [
|
|
2479
|
+
"owner",
|
|
2480
|
+
"editor",
|
|
2481
|
+
"reviewer",
|
|
2482
|
+
"viewer",
|
|
2483
|
+
"discoverer"
|
|
2484
|
+
];
|
|
2485
|
+
var SolutionsResource = class {
|
|
2486
|
+
constructor(t) {
|
|
2487
|
+
this.t = t;
|
|
2488
|
+
}
|
|
2489
|
+
t;
|
|
2490
|
+
design(problem, opts = {}) {
|
|
2491
|
+
return this.t.request("POST", "/platform/v23/solutions/design", {
|
|
2492
|
+
json: { problem, ...opts }
|
|
2493
|
+
});
|
|
2494
|
+
}
|
|
2495
|
+
/** Accept-flags travel nested under `accept`; blueprint/diagram_id/app_id/linked_sources stay top-level. */
|
|
2496
|
+
materialize(blueprint, accept = {}, opts = {}) {
|
|
2497
|
+
return this.t.request("POST", "/platform/v23/solutions/materialize", {
|
|
2498
|
+
json: { blueprint, accept, ...opts }
|
|
2499
|
+
});
|
|
2500
|
+
}
|
|
2501
|
+
/** depth ∈ lean|full */
|
|
2502
|
+
designGraph(problem, opts = {}) {
|
|
2503
|
+
return this.t.request("POST", "/platform/v23/solutions/design-graph", {
|
|
2504
|
+
json: { problem, depth: opts.depth ?? "lean", wizard: opts.wizard }
|
|
2505
|
+
});
|
|
2506
|
+
}
|
|
2507
|
+
mergeGraph(currentGraph, baseBlueprint, incomingBlueprint) {
|
|
2508
|
+
return this.t.request("POST", "/platform/v23/solutions/merge-graph", {
|
|
2509
|
+
json: {
|
|
2510
|
+
current_graph: currentGraph,
|
|
2511
|
+
base_blueprint: baseBlueprint,
|
|
2512
|
+
incoming_blueprint: incomingBlueprint
|
|
2513
|
+
}
|
|
2514
|
+
});
|
|
2515
|
+
}
|
|
2516
|
+
listPatterns() {
|
|
2517
|
+
return this.t.request("GET", "/platform/v23/solutions/patterns");
|
|
2518
|
+
}
|
|
2519
|
+
listDiagrams(opts = {}) {
|
|
2520
|
+
return this.t.request("GET", "/platform/v23/solutions/diagrams", { params: opts });
|
|
2521
|
+
}
|
|
2522
|
+
get(diagramId) {
|
|
2523
|
+
return this.t.request("GET", `/platform/v23/solutions/diagrams/${diagramId}`);
|
|
2524
|
+
}
|
|
2525
|
+
create(input) {
|
|
2526
|
+
return this.t.request("POST", "/platform/v23/solutions/diagrams", { json: input });
|
|
2527
|
+
}
|
|
2528
|
+
/** Save == publish. */
|
|
2529
|
+
save(diagramId, input) {
|
|
2530
|
+
return this.t.request("PATCH", `/platform/v23/solutions/diagrams/${diagramId}`, {
|
|
2531
|
+
json: input
|
|
2532
|
+
});
|
|
2533
|
+
}
|
|
2534
|
+
delete(diagramId) {
|
|
2535
|
+
return this.t.request("DELETE", `/platform/v23/solutions/diagrams/${diagramId}`);
|
|
2536
|
+
}
|
|
2537
|
+
versions(diagramId) {
|
|
2538
|
+
return this.t.request("GET", `/platform/v23/solutions/diagrams/${diagramId}/versions`);
|
|
2539
|
+
}
|
|
2540
|
+
walkthrough(diagramId) {
|
|
2541
|
+
return this.t.request("POST", `/platform/v23/solutions/diagrams/${diagramId}/walkthrough`, {
|
|
2542
|
+
json: {}
|
|
2543
|
+
});
|
|
2544
|
+
}
|
|
2545
|
+
implementations(graph, nodeId, opts = {}) {
|
|
2546
|
+
return this.t.request("POST", "/platform/v23/solutions/implementations", {
|
|
2547
|
+
json: { graph, node_id: nodeId, problem: opts.problem ?? "", wizard: opts.wizard }
|
|
2548
|
+
});
|
|
2549
|
+
}
|
|
2550
|
+
expandNode(graph, nodeId, planId, wizard) {
|
|
2551
|
+
return this.t.request("POST", "/platform/v23/solutions/expand-node", {
|
|
2552
|
+
json: { graph, node_id: nodeId, plan_id: planId, wizard }
|
|
2553
|
+
});
|
|
2554
|
+
}
|
|
2555
|
+
ontologyModel(prompt) {
|
|
2556
|
+
return this.t.request("POST", "/platform/v23/solutions/ontology-model", { json: { prompt } });
|
|
2557
|
+
}
|
|
2558
|
+
fromLineage(events) {
|
|
2559
|
+
return this.t.request("POST", "/platform/v23/solutions/from-lineage", {
|
|
2560
|
+
json: events ? { events } : {}
|
|
2561
|
+
});
|
|
2562
|
+
}
|
|
2563
|
+
teardownPlan(appId) {
|
|
2564
|
+
return this.t.request("GET", `/workshop/apps/${appId}/teardown-plan`);
|
|
2565
|
+
}
|
|
2566
|
+
teardown(appId) {
|
|
2567
|
+
return this.t.request("DELETE", `/workshop/apps/${appId}`, {
|
|
2568
|
+
params: { teardown_build: "true" }
|
|
2569
|
+
});
|
|
2570
|
+
}
|
|
2571
|
+
marketplaceListings(opts = {}) {
|
|
2572
|
+
return this.t.request("GET", "/solutions/marketplace/listings", {
|
|
2573
|
+
params: { status: opts.status ?? "published", q: opts.q, tag: opts.tag, category: opts.category }
|
|
2574
|
+
});
|
|
2575
|
+
}
|
|
2576
|
+
marketplaceDetail(listingId) {
|
|
2577
|
+
return this.t.request("GET", `/solutions/marketplace/listings/${listingId}`);
|
|
2578
|
+
}
|
|
2579
|
+
marketplacePublish(diagramId, opts = {}) {
|
|
2580
|
+
return this.t.request("POST", "/solutions/marketplace/listings", {
|
|
2581
|
+
json: { diagram_id: diagramId, category: opts.category ?? "", ...opts }
|
|
2582
|
+
});
|
|
2583
|
+
}
|
|
2584
|
+
/** Re-materializes the listing in the caller's tenant. */
|
|
2585
|
+
marketplaceInstall(listingId) {
|
|
2586
|
+
return this.t.request("POST", `/solutions/marketplace/listings/${listingId}/install`);
|
|
2587
|
+
}
|
|
2588
|
+
marketplacePatch(listingId, fields) {
|
|
2589
|
+
return this.t.request("PATCH", `/solutions/marketplace/listings/${listingId}`, {
|
|
2590
|
+
json: fields
|
|
2591
|
+
});
|
|
2592
|
+
}
|
|
2593
|
+
};
|
|
2594
|
+
|
|
2595
|
+
// src/resources/workspaces.ts
|
|
2596
|
+
var WorkspaceVersionsResource = class {
|
|
2597
|
+
constructor(t) {
|
|
2598
|
+
this.t = t;
|
|
2599
|
+
}
|
|
2600
|
+
t;
|
|
2601
|
+
list(workspaceId) {
|
|
2602
|
+
return this.t.request("GET", `/workspaces/${workspaceId}/versions`);
|
|
2603
|
+
}
|
|
2604
|
+
get(workspaceId, versionNumber) {
|
|
2605
|
+
return this.t.request("GET", `/workspaces/${workspaceId}/versions/${versionNumber}`);
|
|
2606
|
+
}
|
|
2607
|
+
republish(workspaceId, versionNumber, message) {
|
|
2608
|
+
return this.t.request(
|
|
2609
|
+
"POST",
|
|
2610
|
+
`/workspaces/${workspaceId}/versions/${versionNumber}/republish`,
|
|
2611
|
+
{ json: message ? { message } : {} }
|
|
2612
|
+
);
|
|
2613
|
+
}
|
|
2614
|
+
};
|
|
2615
|
+
var WorkspacesResource = class {
|
|
2616
|
+
constructor(t) {
|
|
2617
|
+
this.t = t;
|
|
2618
|
+
this.versions = new WorkspaceVersionsResource(t);
|
|
2619
|
+
}
|
|
2620
|
+
t;
|
|
2621
|
+
versions;
|
|
2622
|
+
list(opts = {}) {
|
|
2623
|
+
return this.t.request("GET", "/workspaces", { params: opts });
|
|
2624
|
+
}
|
|
2625
|
+
get(workspaceId) {
|
|
2626
|
+
return this.t.request("GET", `/workspaces/${workspaceId}`);
|
|
2627
|
+
}
|
|
2628
|
+
create(input) {
|
|
2629
|
+
return this.t.request("POST", "/workspaces", { json: input });
|
|
2630
|
+
}
|
|
2631
|
+
/** Save == immediate publish — bumps version + snapshot. */
|
|
2632
|
+
publish(workspaceId, config, message) {
|
|
2633
|
+
return this.t.request("PATCH", `/workspaces/${workspaceId}`, { json: { config, message } });
|
|
2634
|
+
}
|
|
2635
|
+
/** Soft delete (`active=false`). */
|
|
2636
|
+
delete(workspaceId) {
|
|
2637
|
+
return this.t.request("DELETE", `/workspaces/${workspaceId}`);
|
|
2638
|
+
}
|
|
2639
|
+
getNavigation(workspaceId) {
|
|
2640
|
+
return this.t.request("GET", `/workspaces/${workspaceId}/navigation`);
|
|
2641
|
+
}
|
|
2642
|
+
setNavigation(workspaceId, opts = {}) {
|
|
2643
|
+
return this.t.request("PUT", `/workspaces/${workspaceId}/navigation`, {
|
|
2644
|
+
json: { navigate_out_allowed: opts.navigate_out_allowed ?? true, ...opts }
|
|
2645
|
+
});
|
|
2646
|
+
}
|
|
2647
|
+
listPromotions(workspaceId) {
|
|
2648
|
+
return this.t.request("GET", `/workspaces/${workspaceId}/promotions`);
|
|
2649
|
+
}
|
|
2650
|
+
/** Idempotent. */
|
|
2651
|
+
promote(workspaceId, organizationId, ordering = 0) {
|
|
2652
|
+
return this.t.request("POST", `/workspaces/${workspaceId}/promotions`, {
|
|
2653
|
+
json: { organization_id: organizationId, ordering }
|
|
2654
|
+
});
|
|
2655
|
+
}
|
|
2656
|
+
unpromote(workspaceId, organizationId) {
|
|
2657
|
+
return this.t.request("DELETE", `/workspaces/${workspaceId}/promotions/${organizationId}`);
|
|
2658
|
+
}
|
|
2659
|
+
listPromotedForOrganization(organizationId) {
|
|
2660
|
+
return this.t.request("GET", `/organizations/${organizationId}/promoted-workspaces`);
|
|
2661
|
+
}
|
|
2662
|
+
getKiosk(workspaceId) {
|
|
2663
|
+
return this.t.request("GET", `/workspaces/${workspaceId}/kiosk`);
|
|
2664
|
+
}
|
|
2665
|
+
setKiosk(workspaceId, opts = {}) {
|
|
2666
|
+
return this.t.request("PUT", `/workspaces/${workspaceId}/kiosk`, {
|
|
2667
|
+
json: {
|
|
2668
|
+
hide_chrome: opts.hide_chrome ?? true,
|
|
2669
|
+
allow_exit: opts.allow_exit ?? true,
|
|
2670
|
+
auto_fullscreen: opts.auto_fullscreen ?? true,
|
|
2671
|
+
message: opts.message
|
|
2672
|
+
}
|
|
2673
|
+
});
|
|
2674
|
+
}
|
|
2675
|
+
startKioskSession(workspaceId, clientInfo) {
|
|
2676
|
+
return this.t.request("POST", `/workspaces/${workspaceId}/kiosk/sessions`, {
|
|
2677
|
+
json: clientInfo ? { client_info: clientInfo } : {}
|
|
2678
|
+
});
|
|
2679
|
+
}
|
|
2680
|
+
endKioskSession(workspaceId, sessionId) {
|
|
2681
|
+
return this.t.request("POST", `/workspaces/${workspaceId}/kiosk/sessions/${sessionId}/end`);
|
|
2682
|
+
}
|
|
2683
|
+
listKioskSessions(workspaceId, opts = {}) {
|
|
2684
|
+
return this.t.request("GET", `/workspaces/${workspaceId}/kiosk/sessions`, { params: opts });
|
|
2685
|
+
}
|
|
2686
|
+
};
|
|
2687
|
+
var WorkspaceUpdatesResource = class {
|
|
2688
|
+
constructor(t) {
|
|
2689
|
+
this.t = t;
|
|
2690
|
+
}
|
|
2691
|
+
t;
|
|
2692
|
+
list(workspaceId, includeArchived = false) {
|
|
2693
|
+
return this.t.request("GET", `/workspaces/${workspaceId}/updates`, {
|
|
2694
|
+
params: { include_archived: includeArchived }
|
|
2695
|
+
});
|
|
2696
|
+
}
|
|
2697
|
+
/** Active updates not yet seen by the caller. */
|
|
2698
|
+
listUnseen(workspaceId) {
|
|
2699
|
+
return this.t.request("GET", `/workspaces/${workspaceId}/updates/unseen`);
|
|
2700
|
+
}
|
|
2701
|
+
get(workspaceId, updateId) {
|
|
2702
|
+
return this.t.request("GET", `/workspaces/${workspaceId}/updates/${updateId}`);
|
|
2703
|
+
}
|
|
2704
|
+
create(workspaceId, input) {
|
|
2705
|
+
return this.t.request("POST", `/workspaces/${workspaceId}/updates`, { json: input });
|
|
2706
|
+
}
|
|
2707
|
+
patch(workspaceId, updateId, patch) {
|
|
2708
|
+
return this.t.request("PATCH", `/workspaces/${workspaceId}/updates/${updateId}`, {
|
|
2709
|
+
json: patch
|
|
2710
|
+
});
|
|
2711
|
+
}
|
|
2712
|
+
archive(workspaceId, updateId) {
|
|
2713
|
+
return this.t.request("POST", `/workspaces/${workspaceId}/updates/${updateId}/archive`);
|
|
2714
|
+
}
|
|
2715
|
+
/** Hard delete — cascades pages + views. */
|
|
2716
|
+
delete(workspaceId, updateId) {
|
|
2717
|
+
return this.t.request("DELETE", `/workspaces/${workspaceId}/updates/${updateId}`);
|
|
2718
|
+
}
|
|
2719
|
+
markSeen(workspaceId, updateId, dismissed = false) {
|
|
2720
|
+
return this.t.request("POST", `/workspaces/${workspaceId}/updates/${updateId}/seen`, {
|
|
2721
|
+
json: { dismissed }
|
|
2722
|
+
});
|
|
2723
|
+
}
|
|
2724
|
+
};
|
|
2725
|
+
|
|
2726
|
+
// src/resources/platformVersions.ts
|
|
2727
|
+
var V22ActionLogResource = class {
|
|
2728
|
+
constructor(t) {
|
|
2729
|
+
this.t = t;
|
|
2730
|
+
}
|
|
2731
|
+
t;
|
|
2732
|
+
record(input) {
|
|
2733
|
+
return this.t.request("POST", "/platform/v22/action-log", { json: input });
|
|
2734
|
+
}
|
|
2735
|
+
list(opts = {}) {
|
|
2736
|
+
return this.t.request("GET", "/platform/v22/action-log", { params: opts });
|
|
2737
|
+
}
|
|
2738
|
+
};
|
|
2739
|
+
var V22NotepadResource = class {
|
|
2740
|
+
constructor(t) {
|
|
2741
|
+
this.t = t;
|
|
2742
|
+
}
|
|
2743
|
+
t;
|
|
2744
|
+
create(title, opts = {}) {
|
|
2745
|
+
return this.t.request("POST", "/platform/v22/notepad", { json: { title, ...opts } });
|
|
2746
|
+
}
|
|
2747
|
+
freeze(docId) {
|
|
2748
|
+
return this.t.request("POST", `/platform/v22/notepad/${docId}/freeze`);
|
|
2749
|
+
}
|
|
2750
|
+
instantiate(templateId, title, variables) {
|
|
2751
|
+
return this.t.request("POST", `/platform/v22/notepad/${templateId}/instantiate`, {
|
|
2752
|
+
json: { title, variables }
|
|
2753
|
+
});
|
|
2754
|
+
}
|
|
2755
|
+
};
|
|
2756
|
+
var V22QuiverResource = class {
|
|
2757
|
+
constructor(t) {
|
|
2758
|
+
this.t = t;
|
|
2759
|
+
}
|
|
2760
|
+
t;
|
|
2761
|
+
create(input) {
|
|
2762
|
+
return this.t.request("POST", "/platform/v22/quiver", { json: input });
|
|
2763
|
+
}
|
|
2764
|
+
render(dashId, opts = {}) {
|
|
2765
|
+
return this.t.request("POST", `/platform/v22/quiver/${dashId}/render`, { json: opts });
|
|
2766
|
+
}
|
|
2767
|
+
};
|
|
2768
|
+
var PlatformV22Resource = class {
|
|
2769
|
+
constructor(t) {
|
|
2770
|
+
this.t = t;
|
|
2771
|
+
this.actionLog = new V22ActionLogResource(t);
|
|
2772
|
+
this.notepad = new V22NotepadResource(t);
|
|
2773
|
+
this.quiver = new V22QuiverResource(t);
|
|
2774
|
+
}
|
|
2775
|
+
t;
|
|
2776
|
+
actionLog;
|
|
2777
|
+
notepad;
|
|
2778
|
+
quiver;
|
|
2779
|
+
/** Returns the transformed value (unwraps the response's `value` field). */
|
|
2780
|
+
async applyVariableTransform(kind, inputs) {
|
|
2781
|
+
const payload = await this.t.request("POST", "/platform/v22/variable-transforms/apply", {
|
|
2782
|
+
json: { kind, inputs }
|
|
2783
|
+
});
|
|
2784
|
+
return payload.value;
|
|
2785
|
+
}
|
|
2786
|
+
recordUsage(input) {
|
|
2787
|
+
return this.t.request("POST", "/platform/v22/ontology-usage/record", { json: input });
|
|
2788
|
+
}
|
|
2789
|
+
queryUsage(opts = {}) {
|
|
2790
|
+
return this.t.request("GET", "/platform/v22/ontology-usage", {
|
|
2791
|
+
params: { days: 30, ...opts }
|
|
2792
|
+
});
|
|
2793
|
+
}
|
|
2794
|
+
};
|
|
2795
|
+
var V23LogicResource = class {
|
|
2796
|
+
constructor(t) {
|
|
2797
|
+
this.t = t;
|
|
2798
|
+
}
|
|
2799
|
+
t;
|
|
2800
|
+
list() {
|
|
2801
|
+
return this.t.request("GET", "/platform/v23/aip-logic");
|
|
2802
|
+
}
|
|
2803
|
+
get(fid) {
|
|
2804
|
+
return this.t.request("GET", `/platform/v23/aip-logic/${fid}`);
|
|
2805
|
+
}
|
|
2806
|
+
create(input) {
|
|
2807
|
+
return this.t.request("POST", "/platform/v23/aip-logic", { json: input });
|
|
2808
|
+
}
|
|
2809
|
+
update(fid, patch) {
|
|
2810
|
+
return this.t.request("PUT", `/platform/v23/aip-logic/${fid}`, { json: patch });
|
|
2811
|
+
}
|
|
2812
|
+
delete(fid) {
|
|
2813
|
+
return this.t.request("DELETE", `/platform/v23/aip-logic/${fid}`);
|
|
2814
|
+
}
|
|
2815
|
+
invoke(fid, inputs) {
|
|
2816
|
+
return this.t.request("POST", `/platform/v23/aip-logic/${fid}/invoke`, {
|
|
2817
|
+
json: { inputs: inputs ?? {} }
|
|
2818
|
+
});
|
|
2819
|
+
}
|
|
2820
|
+
addTest(fid, input) {
|
|
2821
|
+
return this.t.request("POST", `/platform/v23/aip-logic/${fid}/tests`, { json: input });
|
|
2822
|
+
}
|
|
2823
|
+
runTest(fid, testId) {
|
|
2824
|
+
return this.t.request("POST", `/platform/v23/aip-logic/${fid}/tests/${testId}/run`);
|
|
2825
|
+
}
|
|
2826
|
+
};
|
|
2827
|
+
var V23ActionsResource = class {
|
|
2828
|
+
constructor(t) {
|
|
2829
|
+
this.t = t;
|
|
2830
|
+
}
|
|
2831
|
+
t;
|
|
2832
|
+
list() {
|
|
2833
|
+
return this.t.request("GET", "/platform/v23/action-types");
|
|
2834
|
+
}
|
|
2835
|
+
get(aid) {
|
|
2836
|
+
return this.t.request("GET", `/platform/v23/action-types/${aid}`);
|
|
2837
|
+
}
|
|
2838
|
+
create(input) {
|
|
2839
|
+
return this.t.request("POST", "/platform/v23/action-types", { json: input });
|
|
2840
|
+
}
|
|
2841
|
+
update(aid, patch) {
|
|
2842
|
+
return this.t.request("PUT", `/platform/v23/action-types/${aid}`, { json: patch });
|
|
2843
|
+
}
|
|
2844
|
+
delete(aid) {
|
|
2845
|
+
return this.t.request("DELETE", `/platform/v23/action-types/${aid}`);
|
|
2846
|
+
}
|
|
2847
|
+
execute(aid, inputs, note) {
|
|
2848
|
+
return this.t.request("POST", `/platform/v23/action-types/${aid}/execute`, {
|
|
2849
|
+
json: { input: inputs ?? {}, note }
|
|
2850
|
+
});
|
|
2851
|
+
}
|
|
2852
|
+
plan(steps) {
|
|
2853
|
+
return this.t.request("POST", "/platform/v23/action-types/plan", { json: { steps } });
|
|
2854
|
+
}
|
|
2855
|
+
executions(aid) {
|
|
2856
|
+
return this.t.request("GET", `/platform/v23/action-types/${aid}/executions`);
|
|
2857
|
+
}
|
|
2858
|
+
};
|
|
2859
|
+
var V23AssistResource = class {
|
|
2860
|
+
constructor(t) {
|
|
2861
|
+
this.t = t;
|
|
2862
|
+
}
|
|
2863
|
+
t;
|
|
2864
|
+
list(opts = {}) {
|
|
2865
|
+
return this.t.request("GET", "/platform/v23/aip-assist", { params: opts });
|
|
2866
|
+
}
|
|
2867
|
+
create(input) {
|
|
2868
|
+
return this.t.request("POST", "/platform/v23/aip-assist", { json: input });
|
|
2869
|
+
}
|
|
2870
|
+
delete(cid) {
|
|
2871
|
+
return this.t.request("DELETE", `/platform/v23/aip-assist/${cid}`);
|
|
2872
|
+
}
|
|
2873
|
+
suggest(input) {
|
|
2874
|
+
return this.t.request("POST", "/platform/v23/aip-assist/suggest", { json: input });
|
|
2875
|
+
}
|
|
2876
|
+
};
|
|
2877
|
+
var V23PipelineResource = class {
|
|
2878
|
+
constructor(t) {
|
|
2879
|
+
this.t = t;
|
|
2880
|
+
}
|
|
2881
|
+
t;
|
|
2882
|
+
list() {
|
|
2883
|
+
return this.t.request("GET", "/platform/v23/pipeline");
|
|
2884
|
+
}
|
|
2885
|
+
create(input) {
|
|
2886
|
+
return this.t.request("POST", "/platform/v23/pipeline", { json: input });
|
|
2887
|
+
}
|
|
2888
|
+
update(pid, patch) {
|
|
2889
|
+
return this.t.request("PUT", `/platform/v23/pipeline/${pid}`, { json: patch });
|
|
2890
|
+
}
|
|
2891
|
+
delete(pid) {
|
|
2892
|
+
return this.t.request("DELETE", `/platform/v23/pipeline/${pid}`);
|
|
2893
|
+
}
|
|
2894
|
+
run(pid, opts = {}) {
|
|
2895
|
+
return this.t.request("POST", `/platform/v23/pipeline/${pid}/run`, { json: opts });
|
|
2896
|
+
}
|
|
2897
|
+
runs(pid, limit = 50) {
|
|
2898
|
+
return this.t.request("GET", `/platform/v23/pipeline/${pid}/runs`, { params: { limit } });
|
|
2899
|
+
}
|
|
2900
|
+
};
|
|
2901
|
+
var V23StylesBrandResource = class {
|
|
2902
|
+
constructor(t) {
|
|
2903
|
+
this.t = t;
|
|
2904
|
+
}
|
|
2905
|
+
t;
|
|
2906
|
+
get() {
|
|
2907
|
+
return this.t.request("GET", "/platform/v23/styles/brand");
|
|
2908
|
+
}
|
|
2909
|
+
update(patch) {
|
|
2910
|
+
return this.t.request("PUT", "/platform/v23/styles/brand", { json: patch });
|
|
2911
|
+
}
|
|
2912
|
+
/** Unauthenticated-safe read. */
|
|
2913
|
+
getPublic(tenant) {
|
|
2914
|
+
return this.t.request("GET", "/platform/v23/styles/brand/public", { params: { tenant } });
|
|
2915
|
+
}
|
|
2916
|
+
};
|
|
2917
|
+
var V23StylesResource = class {
|
|
2918
|
+
constructor(t) {
|
|
2919
|
+
this.t = t;
|
|
2920
|
+
this.brand = new V23StylesBrandResource(t);
|
|
2921
|
+
}
|
|
2922
|
+
t;
|
|
2923
|
+
brand;
|
|
2924
|
+
get() {
|
|
2925
|
+
return this.t.request("GET", "/platform/v23/styles");
|
|
2926
|
+
}
|
|
2927
|
+
update(tokens, message) {
|
|
2928
|
+
return this.t.request("PUT", "/platform/v23/styles", { json: { tokens, message } });
|
|
2929
|
+
}
|
|
2930
|
+
getRegionColors() {
|
|
2931
|
+
return this.t.request("GET", "/platform/v23/styles/region-colors");
|
|
2932
|
+
}
|
|
2933
|
+
updateRegionColors(patch) {
|
|
2934
|
+
return this.t.request("PUT", "/platform/v23/styles/region-colors", { json: patch });
|
|
2935
|
+
}
|
|
2936
|
+
/** Multipart upload (the only non-JSON write in the v2x surfaces). */
|
|
2937
|
+
uploadLogo(file, filename = "logo.png") {
|
|
2938
|
+
const form = new FormData();
|
|
2939
|
+
form.append("file", file, filename);
|
|
2940
|
+
return this.t.request("POST", "/platform/v23/styles/upload/logo", { form });
|
|
2941
|
+
}
|
|
2942
|
+
};
|
|
2943
|
+
function crudFactory(t, base) {
|
|
2944
|
+
return {
|
|
2945
|
+
list: () => t.request("GET", base),
|
|
2946
|
+
create: (input) => t.request("POST", base, { json: input }),
|
|
2947
|
+
delete: (id) => t.request("DELETE", `${base}/${id}`)
|
|
2948
|
+
};
|
|
2949
|
+
}
|
|
2950
|
+
var PlatformV23Resource = class {
|
|
2951
|
+
constructor(t) {
|
|
2952
|
+
this.t = t;
|
|
2953
|
+
this.logic = new V23LogicResource(t);
|
|
2954
|
+
this.actions = new V23ActionsResource(t);
|
|
2955
|
+
this.assist = new V23AssistResource(t);
|
|
2956
|
+
this.pipeline = new V23PipelineResource(t);
|
|
2957
|
+
this.styles = new V23StylesResource(t);
|
|
2958
|
+
const quiverBase = "/platform/v23/quiver";
|
|
2959
|
+
this.quiver = {
|
|
2960
|
+
...crudFactory(t, quiverBase),
|
|
2961
|
+
update: (id, patch) => t.request("PUT", `${quiverBase}/${id}`, { json: patch }),
|
|
2962
|
+
run: (id) => t.request("POST", `${quiverBase}/${id}/run`)
|
|
2963
|
+
};
|
|
2964
|
+
const connectorsBase = "/platform/v23/connectors";
|
|
2965
|
+
this.connectors = {
|
|
2966
|
+
list: () => t.request("GET", connectorsBase),
|
|
2967
|
+
register: (input) => t.request("POST", connectorsBase, { json: input }),
|
|
2968
|
+
delete: (id) => t.request("DELETE", `${connectorsBase}/${id}`),
|
|
2969
|
+
heartbeat: (id, status = "connected", error) => t.request("POST", `${connectorsBase}/${id}/heartbeat`, { json: { status, error } })
|
|
2970
|
+
};
|
|
2971
|
+
const automateBase = "/platform/v23/automate";
|
|
2972
|
+
this.automate = {
|
|
2973
|
+
...crudFactory(t, automateBase),
|
|
2974
|
+
fire: (id) => t.request("POST", `${automateBase}/${id}/fire`),
|
|
2975
|
+
runs: (id) => t.request("GET", `${automateBase}/${id}/runs`)
|
|
2976
|
+
};
|
|
2977
|
+
const healthBase = "/platform/v23/health";
|
|
2978
|
+
this.health = {
|
|
2979
|
+
...crudFactory(t, healthBase),
|
|
2980
|
+
run: (id) => t.request("POST", `${healthBase}/${id}/run`)
|
|
2981
|
+
};
|
|
2982
|
+
const contourBase = "/platform/v23/contour";
|
|
2983
|
+
this.contour = {
|
|
2984
|
+
...crudFactory(t, contourBase),
|
|
2985
|
+
evaluate: (id, limit = 50) => t.request("POST", `${contourBase}/${id}/evaluate`, { json: { limit } })
|
|
2986
|
+
};
|
|
2987
|
+
this.vertex = crudFactory(t, "/platform/v23/vertex");
|
|
2988
|
+
const reposBase = "/platform/v23/repos";
|
|
2989
|
+
this.repos = {
|
|
2990
|
+
...crudFactory(t, reposBase),
|
|
2991
|
+
commit: (id, input) => t.request("POST", `${reposBase}/${id}/commits`, { json: input }),
|
|
2992
|
+
commits: (id, branch) => t.request("GET", `${reposBase}/${id}/commits`, { params: { branch } }),
|
|
2993
|
+
show: (id, commitId) => t.request("GET", `${reposBase}/${id}/commits/${commitId}`)
|
|
2994
|
+
};
|
|
2995
|
+
const objectSetsBase = "/platform/v23/object-sets";
|
|
2996
|
+
this.objectSets = {
|
|
2997
|
+
...crudFactory(t, objectSetsBase),
|
|
2998
|
+
materialize: (id, limit = 200) => t.request("POST", `${objectSetsBase}/${id}/materialize`, { json: { limit } })
|
|
2999
|
+
};
|
|
3000
|
+
}
|
|
3001
|
+
t;
|
|
3002
|
+
logic;
|
|
3003
|
+
actions;
|
|
3004
|
+
assist;
|
|
3005
|
+
pipeline;
|
|
3006
|
+
styles;
|
|
3007
|
+
quiver;
|
|
3008
|
+
connectors;
|
|
3009
|
+
automate;
|
|
3010
|
+
health;
|
|
3011
|
+
contour;
|
|
3012
|
+
vertex;
|
|
3013
|
+
repos;
|
|
3014
|
+
objectSets;
|
|
3015
|
+
carbonValidate(config) {
|
|
3016
|
+
return this.t.request("POST", "/platform/v23/carbon/validate", { json: config });
|
|
3017
|
+
}
|
|
3018
|
+
catalog() {
|
|
3019
|
+
return this.t.request("GET", "/platform/v23");
|
|
3020
|
+
}
|
|
3021
|
+
};
|
|
3022
|
+
var MarketplaceResource = class {
|
|
3023
|
+
constructor(t) {
|
|
3024
|
+
this.t = t;
|
|
3025
|
+
}
|
|
3026
|
+
t;
|
|
3027
|
+
storefront(opts = {}) {
|
|
3028
|
+
return this.t.request("GET", "/platform/v23/marketplace", {
|
|
3029
|
+
params: { sort: opts.sort ?? "popular", category: opts.category, search: opts.search, tags: opts.tags }
|
|
3030
|
+
});
|
|
3031
|
+
}
|
|
3032
|
+
products(publishedOnly = false) {
|
|
3033
|
+
return this.t.request("GET", "/platform/v23/marketplace/products", {
|
|
3034
|
+
params: { published_only: publishedOnly }
|
|
3035
|
+
});
|
|
3036
|
+
}
|
|
3037
|
+
create(input) {
|
|
3038
|
+
return this.t.request("POST", "/platform/v23/marketplace/products", { json: input });
|
|
3039
|
+
}
|
|
3040
|
+
publish(pid) {
|
|
3041
|
+
return this.t.request("POST", `/platform/v23/marketplace/products/${pid}/publish`);
|
|
3042
|
+
}
|
|
3043
|
+
details(pid) {
|
|
3044
|
+
return this.t.request("GET", `/platform/v23/marketplace/${pid}`);
|
|
3045
|
+
}
|
|
3046
|
+
ontologyImpact(pid) {
|
|
3047
|
+
return this.t.request("GET", `/platform/v23/marketplace/${pid}/ontology-impact`);
|
|
3048
|
+
}
|
|
3049
|
+
installPrecheck(pid) {
|
|
3050
|
+
return this.t.request("GET", `/platform/v23/marketplace/${pid}/install-precheck`);
|
|
3051
|
+
}
|
|
3052
|
+
/** 422 with `{ok:false, gaps}` in the error payload when modules are missing. */
|
|
3053
|
+
install(pid, opts = {}) {
|
|
3054
|
+
return this.t.request("POST", `/platform/v23/marketplace/${pid}/install`, {
|
|
3055
|
+
json: { confirm_text: opts.confirm_text ?? "instalar", config: opts.config, notes: opts.notes }
|
|
3056
|
+
});
|
|
3057
|
+
}
|
|
3058
|
+
installed() {
|
|
3059
|
+
return this.t.request("GET", "/platform/v23/marketplace/installed");
|
|
3060
|
+
}
|
|
3061
|
+
uninstall(installId) {
|
|
3062
|
+
return this.t.request("POST", `/platform/v23/marketplace/installs/${installId}/uninstall`);
|
|
3063
|
+
}
|
|
3064
|
+
/** Admin, idempotent. */
|
|
3065
|
+
seed() {
|
|
3066
|
+
return this.t.request("POST", "/platform/v23/marketplace/seed");
|
|
3067
|
+
}
|
|
3068
|
+
};
|
|
3069
|
+
var PlatformV24Resource = class {
|
|
3070
|
+
constructor(t) {
|
|
3071
|
+
this.t = t;
|
|
3072
|
+
}
|
|
3073
|
+
t;
|
|
3074
|
+
createLogicFunction(input) {
|
|
3075
|
+
return this.t.request("POST", "/platform/v24/logic/functions", { json: input });
|
|
3076
|
+
}
|
|
3077
|
+
listLogicFunctions() {
|
|
3078
|
+
return this.t.request("GET", "/platform/v24/logic/functions");
|
|
3079
|
+
}
|
|
3080
|
+
invokeLogicFunction(fnId, inputs) {
|
|
3081
|
+
return this.t.request("POST", `/platform/v24/logic/functions/${fnId}/invoke`, {
|
|
3082
|
+
json: { inputs }
|
|
3083
|
+
});
|
|
3084
|
+
}
|
|
3085
|
+
openAssistSession(surface, context) {
|
|
3086
|
+
return this.t.request("POST", "/platform/v24/assist/sessions", {
|
|
3087
|
+
json: { surface, context }
|
|
3088
|
+
});
|
|
3089
|
+
}
|
|
3090
|
+
assistTurn(sessionId, content) {
|
|
3091
|
+
return this.t.request("POST", `/platform/v24/assist/sessions/${sessionId}/turn`, {
|
|
3092
|
+
json: { content }
|
|
3093
|
+
});
|
|
3094
|
+
}
|
|
3095
|
+
createView(input) {
|
|
3096
|
+
return this.t.request("POST", "/platform/v24/views", { json: input });
|
|
3097
|
+
}
|
|
3098
|
+
materializeView(viewId) {
|
|
3099
|
+
return this.t.request("POST", `/platform/v24/views/${viewId}/materialize`);
|
|
3100
|
+
}
|
|
3101
|
+
listTemplates() {
|
|
3102
|
+
return this.t.request("GET", "/platform/v24/marketplace/templates");
|
|
3103
|
+
}
|
|
3104
|
+
installTemplate(templateId, config) {
|
|
3105
|
+
return this.t.request("POST", "/platform/v24/marketplace/install", {
|
|
3106
|
+
json: { template_id: templateId, config }
|
|
3107
|
+
});
|
|
3108
|
+
}
|
|
3109
|
+
createRule(input) {
|
|
3110
|
+
return this.t.request("POST", "/platform/v24/rules", { json: input });
|
|
3111
|
+
}
|
|
3112
|
+
evaluateRules(trigger, subject) {
|
|
3113
|
+
return this.t.request("POST", "/platform/v24/rules/evaluate", {
|
|
3114
|
+
json: { trigger, subject }
|
|
3115
|
+
});
|
|
3116
|
+
}
|
|
3117
|
+
recordCheckpoint(pipeline, step, opts = {}) {
|
|
3118
|
+
return this.t.request("POST", "/platform/v24/checkpoints", {
|
|
3119
|
+
json: { pipeline, step, status: opts.status ?? "OK", state: opts.state }
|
|
3120
|
+
});
|
|
3121
|
+
}
|
|
3122
|
+
resumePipeline(pipeline) {
|
|
3123
|
+
return this.t.request("GET", `/platform/v24/checkpoints/${pipeline}/resume`);
|
|
3124
|
+
}
|
|
3125
|
+
createExpectation(input) {
|
|
3126
|
+
return this.t.request("POST", "/platform/v24/expectations", { json: input });
|
|
3127
|
+
}
|
|
3128
|
+
runExpectation(expId) {
|
|
3129
|
+
return this.t.request("POST", `/platform/v24/expectations/${expId}/run`);
|
|
3130
|
+
}
|
|
3131
|
+
submitChangeRequest(input) {
|
|
3132
|
+
return this.t.request("POST", "/platform/v24/change-requests", { json: input });
|
|
3133
|
+
}
|
|
3134
|
+
reviewChangeRequest(crId, status, note) {
|
|
3135
|
+
return this.t.request("POST", `/platform/v24/change-requests/${crId}/review`, {
|
|
3136
|
+
json: { status, note }
|
|
3137
|
+
});
|
|
3138
|
+
}
|
|
3139
|
+
createScenario(input) {
|
|
3140
|
+
return this.t.request("POST", "/platform/v24/scenarios", { json: input });
|
|
3141
|
+
}
|
|
3142
|
+
simulateScenario(scenarioId) {
|
|
3143
|
+
return this.t.request("POST", `/platform/v24/scenarios/${scenarioId}/simulate`);
|
|
3144
|
+
}
|
|
3145
|
+
createNotebook(input) {
|
|
3146
|
+
return this.t.request("POST", "/platform/v24/quiver/notebooks", { json: input });
|
|
3147
|
+
}
|
|
3148
|
+
createAgent(input) {
|
|
3149
|
+
return this.t.request("POST", "/platform/v24/agent-studio/agents", { json: input });
|
|
3150
|
+
}
|
|
3151
|
+
createEvalDashboard(input) {
|
|
3152
|
+
return this.t.request("POST", "/platform/v24/eval-dashboards", { json: input });
|
|
3153
|
+
}
|
|
3154
|
+
renderEvalDashboard(dashId) {
|
|
3155
|
+
return this.t.request("GET", `/platform/v24/eval-dashboards/${dashId}/render`);
|
|
3156
|
+
}
|
|
3157
|
+
addVerticalTab(input) {
|
|
3158
|
+
return this.t.request("POST", "/platform/v24/vertical-tabs", { json: input });
|
|
3159
|
+
}
|
|
3160
|
+
createAggregation(input) {
|
|
3161
|
+
return this.t.request("POST", "/platform/v24/aggregations", { json: input });
|
|
3162
|
+
}
|
|
3163
|
+
runAggregation(aggId) {
|
|
3164
|
+
return this.t.request("POST", `/platform/v24/aggregations/${aggId}/run`);
|
|
3165
|
+
}
|
|
3166
|
+
/** Multi-hop object-set traversal (gate `workshop.apps.read`). */
|
|
3167
|
+
searchAround(input) {
|
|
3168
|
+
return this.t.request("POST", "/workshop/object-set/search-around", { json: input });
|
|
3169
|
+
}
|
|
3170
|
+
/** On-the-fly aggregation: count/sum/avg/min/max/distinct_count/cardinality. */
|
|
3171
|
+
aggregateObjectSet(input) {
|
|
3172
|
+
return this.t.request("POST", "/workshop/object-set/aggregate", { json: input });
|
|
3173
|
+
}
|
|
3174
|
+
createOsdkToken(name, scopes) {
|
|
3175
|
+
return this.t.request("POST", "/platform/v24/osdk-tokens", { json: { name, scopes } });
|
|
3176
|
+
}
|
|
3177
|
+
verifyOsdkToken(token) {
|
|
3178
|
+
return this.t.request("POST", "/platform/v24/osdk-tokens/verify", { json: { token } });
|
|
3179
|
+
}
|
|
3180
|
+
createAutomation(input) {
|
|
3181
|
+
return this.t.request("POST", "/platform/v24/automations", { json: input });
|
|
3182
|
+
}
|
|
3183
|
+
runAutomation(autoId) {
|
|
3184
|
+
return this.t.request("POST", `/platform/v24/automations/${autoId}/run`);
|
|
3185
|
+
}
|
|
3186
|
+
computeOntologyMetrics() {
|
|
3187
|
+
return this.t.request("POST", "/platform/v24/metrics/compute");
|
|
3188
|
+
}
|
|
3189
|
+
forkThread(parentSessionId, branchName, forkAtMessage = 0) {
|
|
3190
|
+
return this.t.request("POST", "/platform/v24/thread-branches", {
|
|
3191
|
+
json: {
|
|
3192
|
+
parent_session_id: parentSessionId,
|
|
3193
|
+
branch_name: branchName,
|
|
3194
|
+
fork_at_message: forkAtMessage
|
|
3195
|
+
}
|
|
3196
|
+
});
|
|
3197
|
+
}
|
|
3198
|
+
};
|
|
3199
|
+
var PlatformV25Resource = class {
|
|
3200
|
+
constructor(t) {
|
|
3201
|
+
this.t = t;
|
|
3202
|
+
}
|
|
3203
|
+
t;
|
|
3204
|
+
// machinery
|
|
3205
|
+
listProcesses() {
|
|
3206
|
+
return this.t.request("GET", "/platform/v25/machinery/processes");
|
|
3207
|
+
}
|
|
3208
|
+
createProcess(input) {
|
|
3209
|
+
return this.t.request("POST", "/platform/v25/machinery/processes", { json: input });
|
|
3210
|
+
}
|
|
3211
|
+
startProcessInstance(processId, opts = {}) {
|
|
3212
|
+
return this.t.request("POST", `/platform/v25/machinery/processes/${processId}/instances`, {
|
|
3213
|
+
json: opts
|
|
3214
|
+
});
|
|
3215
|
+
}
|
|
3216
|
+
transitionProcessInstance(instanceId, to, reason) {
|
|
3217
|
+
return this.t.request("POST", `/platform/v25/machinery/instances/${instanceId}/transition`, {
|
|
3218
|
+
json: { to, reason }
|
|
3219
|
+
});
|
|
3220
|
+
}
|
|
3221
|
+
// branch protection
|
|
3222
|
+
setBranchProtection(dataset, branch, opts = {}) {
|
|
3223
|
+
return this.t.request("PUT", `/platform/v25/branch-protection/${dataset}/${branch}`, {
|
|
3224
|
+
json: {
|
|
3225
|
+
require_approvals: opts.require_approvals ?? 1,
|
|
3226
|
+
block_direct_commit: opts.block_direct_commit ?? true,
|
|
3227
|
+
required_clearances: opts.required_clearances,
|
|
3228
|
+
required_reviewers: opts.required_reviewers
|
|
3229
|
+
}
|
|
3230
|
+
});
|
|
3231
|
+
}
|
|
3232
|
+
evaluateBranchProtection(dataset, branch, opts = {}) {
|
|
3233
|
+
return this.t.request("POST", "/platform/v25/branch-protection/evaluate", {
|
|
3234
|
+
json: { dataset, branch, ...opts }
|
|
3235
|
+
});
|
|
3236
|
+
}
|
|
3237
|
+
// kiosk
|
|
3238
|
+
mintKioskSession(appId, opts = {}) {
|
|
3239
|
+
return this.t.request("POST", "/platform/v25/kiosk/sessions", {
|
|
3240
|
+
json: {
|
|
3241
|
+
app_id: appId,
|
|
3242
|
+
display_name: opts.display_name ?? "kiosk",
|
|
3243
|
+
allowed_markings: opts.allowed_markings,
|
|
3244
|
+
ttl_hours: opts.ttl_hours ?? 24
|
|
3245
|
+
}
|
|
3246
|
+
});
|
|
3247
|
+
}
|
|
3248
|
+
verifyKioskToken(token) {
|
|
3249
|
+
return this.t.request("POST", "/platform/v25/kiosk/verify", { json: { token } });
|
|
3250
|
+
}
|
|
3251
|
+
// analyst threads
|
|
3252
|
+
newAnalystThread(title = "Analyst thread") {
|
|
3253
|
+
return this.t.request("POST", "/platform/v25/aip/analyst/threads", { json: { title } });
|
|
3254
|
+
}
|
|
3255
|
+
postAnalystMessage(threadId, input) {
|
|
3256
|
+
return this.t.request("POST", `/platform/v25/aip/analyst/threads/${threadId}/messages`, {
|
|
3257
|
+
json: input
|
|
3258
|
+
});
|
|
3259
|
+
}
|
|
3260
|
+
// dataset ops
|
|
3261
|
+
rollbackDataset(dataset, toAssetId, opts = {}) {
|
|
3262
|
+
return this.t.request("POST", `/platform/v25/datasets/${dataset}/rollback`, {
|
|
3263
|
+
json: { branch: opts.branch ?? "main", to_asset_id: toAssetId, reason: opts.reason ?? "" }
|
|
3264
|
+
});
|
|
3265
|
+
}
|
|
3266
|
+
queueSnapshot(dataset, branch = "main") {
|
|
3267
|
+
return this.t.request("POST", `/platform/v25/datasets/${dataset}/queue-snapshot`, {
|
|
3268
|
+
json: { branch }
|
|
3269
|
+
});
|
|
3270
|
+
}
|
|
3271
|
+
peekSnapshotQueue(dataset, branch = "main") {
|
|
3272
|
+
return this.t.request("GET", `/platform/v25/datasets/${dataset}/queue-snapshot`, {
|
|
3273
|
+
params: { branch }
|
|
3274
|
+
});
|
|
3275
|
+
}
|
|
3276
|
+
setTransactionLimits(dataset, opts = {}) {
|
|
3277
|
+
return this.t.request("PUT", `/platform/v25/datasets/${dataset}/transaction-limits`, {
|
|
3278
|
+
json: { branch: "main", max_rows: 0, max_bytes: 0, max_open: 0, ...opts }
|
|
3279
|
+
});
|
|
3280
|
+
}
|
|
3281
|
+
/** Repeated `dataset` query params. */
|
|
3282
|
+
checkFreshness(datasets) {
|
|
3283
|
+
return this.t.request("GET", "/platform/v25/workshop/widgets/data-freshness", {
|
|
3284
|
+
params: { dataset: datasets }
|
|
3285
|
+
});
|
|
3286
|
+
}
|
|
3287
|
+
// code scan
|
|
3288
|
+
raiseCodeScanFinding(input) {
|
|
3289
|
+
return this.t.request("POST", "/platform/v25/code-scan/findings", { json: input });
|
|
3290
|
+
}
|
|
3291
|
+
codeScanSummary(repoRef) {
|
|
3292
|
+
return this.t.request("GET", `/platform/v25/code-scan/summary/${repoRef}`);
|
|
3293
|
+
}
|
|
3294
|
+
// evals
|
|
3295
|
+
generateEvals(subjectFunction, opts = {}) {
|
|
3296
|
+
return this.t.request("POST", "/platform/v25/evals/generate", {
|
|
3297
|
+
json: {
|
|
3298
|
+
subject_function: subjectFunction,
|
|
3299
|
+
description: opts.description ?? "",
|
|
3300
|
+
count: opts.count ?? 5
|
|
3301
|
+
}
|
|
3302
|
+
});
|
|
3303
|
+
}
|
|
3304
|
+
analyzeEvals(evalRunId, failures) {
|
|
3305
|
+
return this.t.request("POST", "/platform/v25/evals/analyze", {
|
|
3306
|
+
json: { eval_run_id: evalRunId, failures }
|
|
3307
|
+
});
|
|
3308
|
+
}
|
|
3309
|
+
};
|
|
3310
|
+
var PlatformV26Resource = class {
|
|
3311
|
+
constructor(t) {
|
|
3312
|
+
this.t = t;
|
|
3313
|
+
}
|
|
3314
|
+
t;
|
|
3315
|
+
listPromotions() {
|
|
3316
|
+
return this.t.request("GET", "/platform/v26/promotions");
|
|
3317
|
+
}
|
|
3318
|
+
promoteObjectType(objectType, opts = {}) {
|
|
3319
|
+
return this.t.request("POST", "/platform/v26/promotions", {
|
|
3320
|
+
json: { object_type: objectType, status: opts.status ?? "verified", justification: opts.justification }
|
|
3321
|
+
});
|
|
3322
|
+
}
|
|
3323
|
+
listObjectViews(objectType) {
|
|
3324
|
+
return this.t.request("GET", "/platform/v26/object-views", {
|
|
3325
|
+
params: { object_type: objectType }
|
|
3326
|
+
});
|
|
3327
|
+
}
|
|
3328
|
+
createObjectView(objectType, branch, opts = {}) {
|
|
3329
|
+
return this.t.request("POST", "/platform/v26/object-views", {
|
|
3330
|
+
json: {
|
|
3331
|
+
object_type: objectType,
|
|
3332
|
+
branch,
|
|
3333
|
+
parent_branch: opts.parent_branch ?? "main",
|
|
3334
|
+
view_spec: opts.view_spec
|
|
3335
|
+
}
|
|
3336
|
+
});
|
|
3337
|
+
}
|
|
3338
|
+
publishObjectView(branchId) {
|
|
3339
|
+
return this.t.request("POST", `/platform/v26/object-views/${branchId}/publish`);
|
|
3340
|
+
}
|
|
3341
|
+
generateCoreView(objectType, topN = 8) {
|
|
3342
|
+
return this.t.request("POST", `/platform/v26/core-views/generate/${objectType}`, {
|
|
3343
|
+
params: { top_n: topN }
|
|
3344
|
+
});
|
|
3345
|
+
}
|
|
3346
|
+
getCoreView(objectType) {
|
|
3347
|
+
return this.t.request("GET", `/platform/v26/core-views/${objectType}`);
|
|
3348
|
+
}
|
|
3349
|
+
reserveCapacity(provider, model, opts = {}) {
|
|
3350
|
+
return this.t.request("POST", "/platform/v26/capacity/reservations", {
|
|
3351
|
+
json: { provider, model, reserved_tpm: 0, reserved_rpm: 0, ...opts }
|
|
3352
|
+
});
|
|
3353
|
+
}
|
|
3354
|
+
consumeCapacity(provider, model, opts = {}) {
|
|
3355
|
+
return this.t.request("POST", "/platform/v26/capacity/consume", {
|
|
3356
|
+
json: { provider, model, tokens: opts.tokens ?? 0, requests: opts.requests ?? 1 }
|
|
3357
|
+
});
|
|
3358
|
+
}
|
|
3359
|
+
/** Webhook listener — the secret is returned once. */
|
|
3360
|
+
createListener(slug, opts = {}) {
|
|
3361
|
+
return this.t.request("POST", "/platform/v26/listeners", {
|
|
3362
|
+
json: { slug, integration: opts.integration ?? "generic", ...opts }
|
|
3363
|
+
});
|
|
3364
|
+
}
|
|
3365
|
+
listenerEvents(listenerId) {
|
|
3366
|
+
return this.t.request("GET", `/platform/v26/listeners/${listenerId}/events`);
|
|
3367
|
+
}
|
|
3368
|
+
/** mode ∈ report_only|hash|redact */
|
|
3369
|
+
scanSensitive(payload, opts = {}) {
|
|
3370
|
+
return this.t.request("POST", "/platform/v26/scanner/scan", {
|
|
3371
|
+
json: { payload, mode: opts.mode ?? "report_only", scope: opts.scope ?? "inline", scope_ref: opts.scope_ref }
|
|
3372
|
+
});
|
|
3373
|
+
}
|
|
3374
|
+
scanHistory(limit = 50) {
|
|
3375
|
+
return this.t.request("GET", "/platform/v26/scanner/scans", { params: { limit } });
|
|
3376
|
+
}
|
|
3377
|
+
createMonitoringView(slug, displayName, opts = {}) {
|
|
3378
|
+
return this.t.request("POST", "/platform/v26/monitoring", {
|
|
3379
|
+
json: {
|
|
3380
|
+
slug,
|
|
3381
|
+
display_name: displayName,
|
|
3382
|
+
project_scope: opts.project_scope,
|
|
3383
|
+
resource_kinds: opts.resource_kinds ?? ["object_type", "action"]
|
|
3384
|
+
}
|
|
3385
|
+
});
|
|
3386
|
+
}
|
|
3387
|
+
monitoringRollup(slug) {
|
|
3388
|
+
return this.t.request("GET", `/platform/v26/monitoring/${slug}/rollup`);
|
|
3389
|
+
}
|
|
3390
|
+
createHealthCheck(datasetName, name, checkType, spec) {
|
|
3391
|
+
return this.t.request("POST", "/platform/v26/health/checks", {
|
|
3392
|
+
json: { dataset_name: datasetName, name, check_type: checkType, spec }
|
|
3393
|
+
});
|
|
3394
|
+
}
|
|
3395
|
+
runHealthCheck(checkId, branch = "main") {
|
|
3396
|
+
return this.t.request("POST", `/platform/v26/health/checks/${checkId}/run`, {
|
|
3397
|
+
params: { branch }
|
|
3398
|
+
});
|
|
3399
|
+
}
|
|
3400
|
+
healthRuns(checkId, limit = 50) {
|
|
3401
|
+
return this.t.request("GET", `/platform/v26/health/checks/${checkId}/runs`, {
|
|
3402
|
+
params: { limit }
|
|
3403
|
+
});
|
|
3404
|
+
}
|
|
3405
|
+
/** Hash-referenced version metadata — no binary body. */
|
|
3406
|
+
uploadMediaVersion(mediaSet, path, input) {
|
|
3407
|
+
return this.t.request("POST", "/platform/v26/media/upload", {
|
|
3408
|
+
json: { media_set: mediaSet, path, size_bytes: 0, ...input }
|
|
3409
|
+
});
|
|
3410
|
+
}
|
|
3411
|
+
mediaHistory(mediaSet, path) {
|
|
3412
|
+
return this.t.request("GET", "/platform/v26/media/items/history", {
|
|
3413
|
+
params: { media_set: mediaSet, path }
|
|
3414
|
+
});
|
|
3415
|
+
}
|
|
3416
|
+
createInsight(slug, input) {
|
|
3417
|
+
return this.t.request("POST", "/platform/v26/insight", { json: { slug, ...input } });
|
|
3418
|
+
}
|
|
3419
|
+
executeInsight(analysisId) {
|
|
3420
|
+
return this.t.request("POST", `/platform/v26/insight/${analysisId}/execute`);
|
|
3421
|
+
}
|
|
3422
|
+
createPeer(slug, displayName, remoteUrl, authToken) {
|
|
3423
|
+
return this.t.request("POST", "/platform/v26/peers", {
|
|
3424
|
+
json: { slug, display_name: displayName, remote_url: remoteUrl, auth_token: authToken }
|
|
3425
|
+
});
|
|
3426
|
+
}
|
|
3427
|
+
syncPeer(peerId, input) {
|
|
3428
|
+
return this.t.request("POST", `/platform/v26/peers/${peerId}/sync`, { json: input });
|
|
3429
|
+
}
|
|
3430
|
+
listPeerMirrors(peerId) {
|
|
3431
|
+
return this.t.request("GET", `/platform/v26/peers/${peerId}/mirrors`);
|
|
3432
|
+
}
|
|
3433
|
+
runHistory(opts = {}) {
|
|
3434
|
+
return this.t.request("GET", "/platform/v26/run-history", {
|
|
3435
|
+
params: { limit: 200, ...opts }
|
|
3436
|
+
});
|
|
3437
|
+
}
|
|
3438
|
+
};
|
|
3439
|
+
|
|
3440
|
+
// src/client.ts
|
|
3441
|
+
var RETRIABLE_STATUS = /* @__PURE__ */ new Set([429, 502, 503, 504]);
|
|
3442
|
+
function isRetriableError(err) {
|
|
3443
|
+
if (err instanceof AegisAPIError) return RETRIABLE_STATUS.has(err.statusCode);
|
|
3444
|
+
if (err instanceof TypeError) return true;
|
|
3445
|
+
return err instanceof Error && err.name === "TimeoutError";
|
|
3446
|
+
}
|
|
3447
|
+
function backoffDelay(attempt, base, max) {
|
|
3448
|
+
const exp = Math.min(max, base * 2 ** (attempt - 1));
|
|
3449
|
+
return exp * (0.5 + Math.random() * 0.5);
|
|
3450
|
+
}
|
|
3451
|
+
var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
3452
|
+
function envVar(name) {
|
|
3453
|
+
if (typeof process !== "undefined" && process.env) return process.env[name];
|
|
3454
|
+
return void 0;
|
|
3455
|
+
}
|
|
3456
|
+
var AegisClient = class {
|
|
3457
|
+
baseUrl;
|
|
3458
|
+
_token;
|
|
3459
|
+
timeoutMs;
|
|
3460
|
+
_fetchOverride;
|
|
3461
|
+
_fetchInit;
|
|
3462
|
+
_refreshToken;
|
|
3463
|
+
_retry;
|
|
3464
|
+
_refreshInFlight = null;
|
|
3465
|
+
auth;
|
|
3466
|
+
iam;
|
|
3467
|
+
osdk;
|
|
3468
|
+
operator;
|
|
3469
|
+
ontology;
|
|
3470
|
+
aip;
|
|
3471
|
+
functions;
|
|
3472
|
+
codeRepositories;
|
|
3473
|
+
datasets;
|
|
3474
|
+
// Reading / consumption
|
|
3475
|
+
geo;
|
|
3476
|
+
mapTemplates;
|
|
3477
|
+
media;
|
|
3478
|
+
docs;
|
|
3479
|
+
pages;
|
|
3480
|
+
dossier;
|
|
3481
|
+
timeseries;
|
|
3482
|
+
/** Public guest-token consumer surface (`/public/v1/guest/{token}/*`). */
|
|
3483
|
+
publicGuest;
|
|
3484
|
+
// Operational
|
|
3485
|
+
alerts;
|
|
3486
|
+
alarms;
|
|
3487
|
+
events;
|
|
3488
|
+
connectors;
|
|
3489
|
+
pipelines;
|
|
3490
|
+
chat;
|
|
3491
|
+
notepad;
|
|
3492
|
+
// Governance
|
|
3493
|
+
lineage;
|
|
3494
|
+
accessAudit;
|
|
3495
|
+
markings;
|
|
3496
|
+
resourceMarkings;
|
|
3497
|
+
propertyMarkings;
|
|
3498
|
+
rowPolicies;
|
|
3499
|
+
erasure;
|
|
3500
|
+
retention;
|
|
3501
|
+
guestTokens;
|
|
3502
|
+
// Domain
|
|
3503
|
+
atlas;
|
|
3504
|
+
briefing;
|
|
3505
|
+
campaign;
|
|
3506
|
+
cctv;
|
|
3507
|
+
comunicados;
|
|
3508
|
+
edge;
|
|
3509
|
+
video;
|
|
3510
|
+
// Collaboration / apps
|
|
3511
|
+
appShell;
|
|
3512
|
+
forms;
|
|
3513
|
+
/** Alias of `iam.groups` (mirrors Python's standalone `client.groups`). */
|
|
3514
|
+
groups;
|
|
3515
|
+
organizations;
|
|
3516
|
+
projects;
|
|
3517
|
+
solutions;
|
|
3518
|
+
spaces;
|
|
3519
|
+
workspaces;
|
|
3520
|
+
workspaceUpdates;
|
|
3521
|
+
marketplace;
|
|
3522
|
+
// Versioned platform surfaces
|
|
3523
|
+
platformV22;
|
|
3524
|
+
platformV23;
|
|
3525
|
+
platformV24;
|
|
3526
|
+
platformV25;
|
|
3527
|
+
platformV26;
|
|
3528
|
+
// Platform
|
|
3529
|
+
workshop;
|
|
3530
|
+
compute;
|
|
3531
|
+
inference;
|
|
3532
|
+
codegen;
|
|
3533
|
+
correlation;
|
|
3534
|
+
situational;
|
|
3535
|
+
merge;
|
|
3536
|
+
constructor(options = {}) {
|
|
3537
|
+
const baseUrl = options.baseUrl ?? envVar("AEGIS_API_URL") ?? "http://localhost:8002";
|
|
3538
|
+
this.baseUrl = baseUrl.replace(/\/+$/, "");
|
|
3539
|
+
this._token = options.token ?? envVar("AEGIS_TOKEN") ?? null;
|
|
3540
|
+
this.timeoutMs = options.timeoutMs ?? 15e3;
|
|
3541
|
+
this._fetchOverride = options.fetch;
|
|
3542
|
+
this._fetchInit = options.fetchInit ?? {};
|
|
3543
|
+
this._refreshToken = options.refreshToken ?? null;
|
|
3544
|
+
this._retry = {
|
|
3545
|
+
retries: options.retry?.retries ?? 2,
|
|
3546
|
+
baseDelayMs: options.retry?.baseDelayMs ?? 250,
|
|
3547
|
+
maxDelayMs: options.retry?.maxDelayMs ?? 4e3,
|
|
3548
|
+
retryPost: options.retry?.retryPost ?? false
|
|
3549
|
+
};
|
|
3550
|
+
this.auth = new AuthResource(this, (pair) => {
|
|
3551
|
+
this.setToken(pair.access_token);
|
|
3552
|
+
if (pair.refresh_token) this.setRefreshToken(pair.refresh_token);
|
|
3553
|
+
});
|
|
3554
|
+
this.iam = new IamResource(this);
|
|
3555
|
+
this.osdk = new OsdkResource(this);
|
|
3556
|
+
this.operator = new OperatorResource(this);
|
|
3557
|
+
this.ontology = new OntologyResource(this);
|
|
3558
|
+
this.aip = new AipResource(this);
|
|
3559
|
+
this.functions = new FunctionsResource(this);
|
|
3560
|
+
this.codeRepositories = new CodeRepositoriesResource(this);
|
|
3561
|
+
this.datasets = new DatasetsResource(this);
|
|
3562
|
+
this.geo = new GeoResource(this);
|
|
3563
|
+
this.mapTemplates = new MapTemplatesResource(this);
|
|
3564
|
+
this.media = new MediaResource(this);
|
|
3565
|
+
this.docs = new DocsResource(this);
|
|
3566
|
+
this.pages = new PagesResource(this);
|
|
3567
|
+
this.dossier = new DossierResource(this);
|
|
3568
|
+
this.timeseries = new TimeSeriesResource(this);
|
|
3569
|
+
this.publicGuest = new PublicGuestResource(this);
|
|
3570
|
+
this.alerts = new AlertsResource(this);
|
|
3571
|
+
this.alarms = new AlarmsResource(this);
|
|
3572
|
+
this.events = new EventsResource(this);
|
|
3573
|
+
this.connectors = new ConnectorsResource(this);
|
|
3574
|
+
this.pipelines = new PipelinesResource(this);
|
|
3575
|
+
this.chat = new ChatResource(this);
|
|
3576
|
+
this.notepad = new NotepadResource(this);
|
|
3577
|
+
this.lineage = new LineageResource(this);
|
|
3578
|
+
this.accessAudit = new AccessAuditResource(this);
|
|
3579
|
+
this.markings = new MarkingsResource(this);
|
|
3580
|
+
this.resourceMarkings = new ResourceMarkingsResource(this);
|
|
3581
|
+
this.propertyMarkings = new PropertyMarkingsResource(this);
|
|
3582
|
+
this.rowPolicies = new RowPoliciesResource(this);
|
|
3583
|
+
this.erasure = new ErasureResource(this);
|
|
3584
|
+
this.retention = new RetentionResource(this);
|
|
3585
|
+
this.guestTokens = new GuestTokensResource(this);
|
|
3586
|
+
this.atlas = new AtlasResource(this);
|
|
3587
|
+
this.briefing = new BriefingResource(this);
|
|
3588
|
+
this.campaign = new CampaignResource(this);
|
|
3589
|
+
this.cctv = new CctvResource(this);
|
|
3590
|
+
this.comunicados = new ComunicadosResource(this);
|
|
3591
|
+
this.edge = new EdgeResource(this);
|
|
3592
|
+
this.video = new VideoResource(this);
|
|
3593
|
+
this.appShell = new AppShellResource(this);
|
|
3594
|
+
this.forms = new FormsResource(this);
|
|
3595
|
+
this.groups = this.iam.groups;
|
|
3596
|
+
this.organizations = new OrganizationsResource(this);
|
|
3597
|
+
this.projects = new ProjectsResource(this);
|
|
3598
|
+
this.solutions = new SolutionsResource(this);
|
|
3599
|
+
this.spaces = new SpacesResource(this);
|
|
3600
|
+
this.workspaces = new WorkspacesResource(this);
|
|
3601
|
+
this.workspaceUpdates = new WorkspaceUpdatesResource(this);
|
|
3602
|
+
this.marketplace = new MarketplaceResource(this);
|
|
3603
|
+
this.platformV22 = new PlatformV22Resource(this);
|
|
3604
|
+
this.platformV23 = new PlatformV23Resource(this);
|
|
3605
|
+
this.platformV24 = new PlatformV24Resource(this);
|
|
3606
|
+
this.platformV25 = new PlatformV25Resource(this);
|
|
3607
|
+
this.platformV26 = new PlatformV26Resource(this);
|
|
3608
|
+
this.workshop = new WorkshopResource(this);
|
|
3609
|
+
this.compute = new ComputeResource(this);
|
|
3610
|
+
this.inference = new InferenceResource(this);
|
|
3611
|
+
this.codegen = new CodegenResource(this);
|
|
3612
|
+
this.correlation = new CorrelationResource(this);
|
|
3613
|
+
this.situational = new SituationalResource(this);
|
|
3614
|
+
this.merge = new MergeResource(this);
|
|
3615
|
+
}
|
|
3616
|
+
/** Replace the active bearer token (or clear with `null`). */
|
|
3617
|
+
setToken(token) {
|
|
3618
|
+
this._token = token;
|
|
3619
|
+
}
|
|
3620
|
+
/** Replace the refresh token used for automatic 401 recovery. */
|
|
3621
|
+
setRefreshToken(token) {
|
|
3622
|
+
this._refreshToken = token;
|
|
3623
|
+
}
|
|
3624
|
+
get token() {
|
|
3625
|
+
return this._token;
|
|
3626
|
+
}
|
|
3627
|
+
get _fetch() {
|
|
3628
|
+
if (this._fetchOverride) return this._fetchOverride;
|
|
3629
|
+
const globalFetch = globalThis.fetch;
|
|
3630
|
+
if (!globalFetch) {
|
|
3631
|
+
throw new Error("no fetch available \u2014 Node >= 18, a browser, or pass options.fetch");
|
|
3632
|
+
}
|
|
3633
|
+
return globalFetch.bind(globalThis);
|
|
3634
|
+
}
|
|
3635
|
+
/** Generic escape hatch — call any AEGIS endpoint not yet wrapped.
|
|
3636
|
+
* Transient failures are retried with backoff (see `RetryOptions`);
|
|
3637
|
+
* a 401 triggers one transparent `POST /auth/refresh` + retry when a
|
|
3638
|
+
* refresh token is held. */
|
|
3639
|
+
async request(method, path, opts = {}) {
|
|
3640
|
+
try {
|
|
3641
|
+
return await this._requestWithRetry(method, path, opts);
|
|
3642
|
+
} catch (err) {
|
|
3643
|
+
const refreshable = err instanceof AuthError && this._refreshToken !== null && !path.startsWith("/auth/");
|
|
3644
|
+
if (!refreshable) throw err;
|
|
3645
|
+
await this._refreshOnce();
|
|
3646
|
+
return this._requestWithRetry(method, path, opts);
|
|
3647
|
+
}
|
|
3648
|
+
}
|
|
3649
|
+
/** Rotate the refresh token (single-flight) and attach the new pair. */
|
|
3650
|
+
_refreshOnce() {
|
|
3651
|
+
this._refreshInFlight ??= (async () => {
|
|
3652
|
+
try {
|
|
3653
|
+
const pair = await this._requestWithRetry("POST", "/auth/refresh", {
|
|
3654
|
+
json: { refresh_token: this._refreshToken }
|
|
3655
|
+
});
|
|
3656
|
+
this._token = pair.access_token;
|
|
3657
|
+
this._refreshToken = pair.refresh_token ?? this._refreshToken;
|
|
3658
|
+
} catch (err) {
|
|
3659
|
+
if (err instanceof AuthError) this._refreshToken = null;
|
|
3660
|
+
throw err;
|
|
3661
|
+
} finally {
|
|
3662
|
+
this._refreshInFlight = null;
|
|
3663
|
+
}
|
|
3664
|
+
})();
|
|
3665
|
+
return this._refreshInFlight;
|
|
3666
|
+
}
|
|
3667
|
+
async _requestWithRetry(method, path, opts) {
|
|
3668
|
+
const idempotent = method === "GET" || method === "HEAD" || this._retry.retryPost;
|
|
3669
|
+
for (let attempt = 0; ; attempt++) {
|
|
3670
|
+
try {
|
|
3671
|
+
return await this._doRequest(method, path, opts);
|
|
3672
|
+
} catch (err) {
|
|
3673
|
+
if (!idempotent || attempt >= this._retry.retries || !isRetriableError(err)) throw err;
|
|
3674
|
+
await sleep(backoffDelay(attempt + 1, this._retry.baseDelayMs, this._retry.maxDelayMs));
|
|
3675
|
+
}
|
|
3676
|
+
}
|
|
3677
|
+
}
|
|
3678
|
+
async _doRequest(method, path, opts) {
|
|
3679
|
+
const url = buildUrl(this.baseUrl, path, opts.params);
|
|
3680
|
+
const headers = {};
|
|
3681
|
+
if (this._token) headers.Authorization = `Bearer ${this._token}`;
|
|
3682
|
+
const init = { ...this._fetchInit, method, headers };
|
|
3683
|
+
if (opts.form !== void 0) {
|
|
3684
|
+
init.body = opts.form;
|
|
3685
|
+
} else if (opts.json !== void 0) {
|
|
3686
|
+
headers["Content-Type"] = "application/json";
|
|
3687
|
+
init.body = JSON.stringify(opts.json);
|
|
3688
|
+
}
|
|
3689
|
+
if (opts.signal) {
|
|
3690
|
+
init.signal = opts.signal;
|
|
3691
|
+
} else if (typeof AbortSignal !== "undefined" && "timeout" in AbortSignal) {
|
|
3692
|
+
init.signal = AbortSignal.timeout(this.timeoutMs);
|
|
3693
|
+
}
|
|
3694
|
+
const res = await this._fetch(url, init);
|
|
3695
|
+
return handleResponse(res);
|
|
3696
|
+
}
|
|
3697
|
+
/**
|
|
3698
|
+
* Open a server-sent-events endpoint and iterate its events. Long-lived:
|
|
3699
|
+
* no default timeout is applied — pass `signal` to cancel.
|
|
3700
|
+
*
|
|
3701
|
+
* ```ts
|
|
3702
|
+
* for await (const ev of client.stream("/operator/tasks/t1/events")) { … }
|
|
3703
|
+
* ```
|
|
3704
|
+
*/
|
|
3705
|
+
async *stream(path, opts = {}) {
|
|
3706
|
+
const url = buildUrl(this.baseUrl, path, opts.params);
|
|
3707
|
+
const headers = { Accept: "text/event-stream" };
|
|
3708
|
+
if (this._token) headers.Authorization = `Bearer ${this._token}`;
|
|
3709
|
+
const init = { ...this._fetchInit, method: opts.method ?? "GET", headers };
|
|
3710
|
+
if (opts.json !== void 0) {
|
|
3711
|
+
headers["Content-Type"] = "application/json";
|
|
3712
|
+
init.body = JSON.stringify(opts.json);
|
|
3713
|
+
init.method = opts.method ?? "POST";
|
|
3714
|
+
}
|
|
3715
|
+
if (opts.signal) init.signal = opts.signal;
|
|
3716
|
+
const res = await this._fetch(url, init);
|
|
3717
|
+
if (!res.ok || !res.body) {
|
|
3718
|
+
await handleResponse(res);
|
|
3719
|
+
throw new AegisAPIError(res.status, "stream endpoint returned no body");
|
|
3720
|
+
}
|
|
3721
|
+
yield* parseSseStream(res.body);
|
|
3722
|
+
}
|
|
3723
|
+
};
|
|
3724
|
+
|
|
3725
|
+
// src/classification.ts
|
|
3726
|
+
var VALID_LEVELS = [
|
|
3727
|
+
"PUBLICO",
|
|
3728
|
+
"INTERNO",
|
|
3729
|
+
"RESTRITO",
|
|
3730
|
+
"SECRETO"
|
|
3731
|
+
];
|
|
3732
|
+
var CLASSIFICATION_RANK = {
|
|
3733
|
+
PUBLICO: 0,
|
|
3734
|
+
INTERNO: 1,
|
|
3735
|
+
RESTRITO: 2,
|
|
3736
|
+
SECRETO: 3
|
|
3737
|
+
};
|
|
3738
|
+
var CLASSIFICATION_LABEL = {
|
|
3739
|
+
PUBLICO: "P\xFAblico",
|
|
3740
|
+
INTERNO: "Interno",
|
|
3741
|
+
RESTRITO: "Restrito",
|
|
3742
|
+
SECRETO: "Secreto"
|
|
3743
|
+
};
|
|
3744
|
+
var ClassificationInvariantViolation = class extends Error {
|
|
3745
|
+
constructor(message) {
|
|
3746
|
+
super(message);
|
|
3747
|
+
this.name = "ClassificationInvariantViolation";
|
|
3748
|
+
}
|
|
3749
|
+
};
|
|
3750
|
+
function rank(level) {
|
|
3751
|
+
const r = CLASSIFICATION_RANK[level];
|
|
3752
|
+
if (r === void 0) throw new ClassificationInvariantViolation(`invalid level: ${level}`);
|
|
3753
|
+
return r;
|
|
3754
|
+
}
|
|
3755
|
+
function maxLevel(levels) {
|
|
3756
|
+
let best = "PUBLICO";
|
|
3757
|
+
for (const level of levels) {
|
|
3758
|
+
if (rank(level) > CLASSIFICATION_RANK[best]) best = level;
|
|
3759
|
+
}
|
|
3760
|
+
return best;
|
|
3761
|
+
}
|
|
3762
|
+
function validateInvariant(fileCls, dataCls, upstreamData = []) {
|
|
3763
|
+
if (rank(fileCls) < rank(dataCls)) {
|
|
3764
|
+
throw new ClassificationInvariantViolation(
|
|
3765
|
+
`file classification ${fileCls} must dominate data classification ${dataCls}`
|
|
3766
|
+
);
|
|
3767
|
+
}
|
|
3768
|
+
for (const upstream of upstreamData) {
|
|
3769
|
+
if (rank(dataCls) < rank(upstream)) {
|
|
3770
|
+
throw new ClassificationInvariantViolation(
|
|
3771
|
+
`data classification ${dataCls} must dominate upstream ${upstream}`
|
|
3772
|
+
);
|
|
3773
|
+
}
|
|
3774
|
+
}
|
|
3775
|
+
}
|
|
3776
|
+
|
|
3777
|
+
// src/permissions.ts
|
|
3778
|
+
var NAV_PERMISSIONS = [
|
|
3779
|
+
"nav.section.discover",
|
|
3780
|
+
"nav.item.discover.home",
|
|
3781
|
+
"nav.section.operations",
|
|
3782
|
+
"nav.item.operations.tasks",
|
|
3783
|
+
"nav.section.core_loop",
|
|
3784
|
+
"nav.item.core_loop.alerts",
|
|
3785
|
+
"nav.item.core_loop.proposals",
|
|
3786
|
+
"nav.item.core_loop.actions",
|
|
3787
|
+
"nav.section.ontology",
|
|
3788
|
+
"nav.item.ontology.manager",
|
|
3789
|
+
"nav.item.ontology.explorer",
|
|
3790
|
+
"nav.item.ontology.types",
|
|
3791
|
+
"nav.item.ontology.actions",
|
|
3792
|
+
"nav.item.ontology.interfaces",
|
|
3793
|
+
"nav.item.ontology.links",
|
|
3794
|
+
"nav.item.ontology.views",
|
|
3795
|
+
"nav.item.ontology.aggregations",
|
|
3796
|
+
"nav.item.ontology.object_sets",
|
|
3797
|
+
"nav.section.data",
|
|
3798
|
+
"nav.item.data.datasets",
|
|
3799
|
+
"nav.item.data.pipelines",
|
|
3800
|
+
"nav.item.data.connectors",
|
|
3801
|
+
"nav.item.data.media",
|
|
3802
|
+
"nav.item.data.schedules",
|
|
3803
|
+
"nav.item.data.notepad",
|
|
3804
|
+
"nav.item.data.lineage",
|
|
3805
|
+
"nav.item.data.health",
|
|
3806
|
+
"nav.section.aip",
|
|
3807
|
+
"nav.item.aip.threads",
|
|
3808
|
+
"nav.item.aip.agents",
|
|
3809
|
+
"nav.item.aip.tools",
|
|
3810
|
+
"nav.item.aip.logic",
|
|
3811
|
+
"nav.item.aip.models",
|
|
3812
|
+
"nav.item.aip.capacity",
|
|
3813
|
+
"nav.item.aip.scenarios",
|
|
3814
|
+
"nav.item.aip.evals",
|
|
3815
|
+
"nav.item.aip.memory",
|
|
3816
|
+
"nav.item.aip.mcp_adapters",
|
|
3817
|
+
"nav.section.workshop",
|
|
3818
|
+
"nav.item.workshop.apps",
|
|
3819
|
+
"nav.section.governance",
|
|
3820
|
+
"nav.item.governance.projects",
|
|
3821
|
+
"nav.item.governance.audit",
|
|
3822
|
+
"nav.item.governance.lgpd",
|
|
3823
|
+
"nav.item.governance.trace",
|
|
3824
|
+
"nav.item.governance.rules",
|
|
3825
|
+
"nav.item.governance.change_requests",
|
|
3826
|
+
"nav.item.governance.automations",
|
|
3827
|
+
"nav.item.governance.tokens",
|
|
3828
|
+
"nav.item.governance.peers",
|
|
3829
|
+
"nav.item.governance.code_scan",
|
|
3830
|
+
"nav.item.governance.kiosk",
|
|
3831
|
+
"nav.item.governance.access",
|
|
3832
|
+
"nav.item.governance.osdk",
|
|
3833
|
+
"nav.section.resources",
|
|
3834
|
+
"nav.item.resources.docs",
|
|
3835
|
+
"nav.item.resources.template_gallery",
|
|
3836
|
+
"nav.item.resources.aegis_sdk",
|
|
3837
|
+
"nav.section.other",
|
|
3838
|
+
"nav.item.other.intel_map",
|
|
3839
|
+
"nav.item.other.cognitive",
|
|
3840
|
+
"nav.item.other.map_view",
|
|
3841
|
+
"nav.section.campanha",
|
|
3842
|
+
"nav.item.campaign.hub",
|
|
3843
|
+
"nav.item.campaign.chat",
|
|
3844
|
+
"nav.item.campaign.visibility",
|
|
3845
|
+
"nav.item.campaign.agents",
|
|
3846
|
+
"nav.item.campaign.scenarios",
|
|
3847
|
+
"nav.item.campaign.brief",
|
|
3848
|
+
"nav.section.painel-de-controle",
|
|
3849
|
+
"nav.item.painel.home",
|
|
3850
|
+
"nav.item.painel.aprovacoes",
|
|
3851
|
+
"nav.item.painel.comunicacoes",
|
|
3852
|
+
"nav.item.painel.atividade"
|
|
3853
|
+
];
|
|
3854
|
+
var CAPABILITY_PERMISSIONS = [
|
|
3855
|
+
"ontology.types.read",
|
|
3856
|
+
"ontology.types.write",
|
|
3857
|
+
"ontology.actions.read",
|
|
3858
|
+
"ontology.actions.write",
|
|
3859
|
+
"ontology.actions.execute",
|
|
3860
|
+
"ontology.actions.execute_external",
|
|
3861
|
+
"ontology.objects.read",
|
|
3862
|
+
"ontology.objects.write",
|
|
3863
|
+
"ontology.objects.bulk_delete",
|
|
3864
|
+
"ontology.links.read",
|
|
3865
|
+
"ontology.links.write",
|
|
3866
|
+
"solution.diagram.read",
|
|
3867
|
+
"solution.diagram.write",
|
|
3868
|
+
"solution.diagram.publish",
|
|
3869
|
+
"solution.diagram.delete",
|
|
3870
|
+
"solution.diagram.history.read",
|
|
3871
|
+
"solution.materialize.delete",
|
|
3872
|
+
"solution.refactor",
|
|
3873
|
+
"data.datasets.read",
|
|
3874
|
+
"data.datasets.write",
|
|
3875
|
+
"data.pipelines.read",
|
|
3876
|
+
"data.pipelines.write",
|
|
3877
|
+
"data.lineage.read",
|
|
3878
|
+
"data.connectors.read",
|
|
3879
|
+
"data.connectors.write",
|
|
3880
|
+
"aip.threads.read",
|
|
3881
|
+
"aip.threads.write",
|
|
3882
|
+
"aip.agents.read",
|
|
3883
|
+
"aip.agents.write",
|
|
3884
|
+
"aip.models.read",
|
|
3885
|
+
"aip.models.write",
|
|
3886
|
+
"aip.evals.read",
|
|
3887
|
+
"aip.evals.run",
|
|
3888
|
+
"aip.memory.read",
|
|
3889
|
+
"aip.memory.write",
|
|
3890
|
+
"workshop.apps.read",
|
|
3891
|
+
"workshop.apps.write",
|
|
3892
|
+
"workshop.apps.purge",
|
|
3893
|
+
"operator.tasks.read",
|
|
3894
|
+
"operator.tasks.write",
|
|
3895
|
+
"governance.audit.read",
|
|
3896
|
+
"governance.rules.read",
|
|
3897
|
+
"governance.rules.write",
|
|
3898
|
+
"governance.change_requests.read",
|
|
3899
|
+
"governance.change_requests.write",
|
|
3900
|
+
"governance.change_requests.approve",
|
|
3901
|
+
"governance.tokens.read",
|
|
3902
|
+
"governance.tokens.write",
|
|
3903
|
+
"governance.lgpd.read",
|
|
3904
|
+
"governance.lgpd.write",
|
|
3905
|
+
"governance.peers.read",
|
|
3906
|
+
"governance.peers.write",
|
|
3907
|
+
"governance.kiosk.read",
|
|
3908
|
+
"governance.kiosk.write",
|
|
3909
|
+
"admin.acessos",
|
|
3910
|
+
"admin.classificacao",
|
|
3911
|
+
"admin.auditoria",
|
|
3912
|
+
"admin.federacao",
|
|
3913
|
+
"admin.unidades",
|
|
3914
|
+
"admin.templates",
|
|
3915
|
+
"admin.automacoes",
|
|
3916
|
+
"admin.tokens",
|
|
3917
|
+
"campaign.chat.read",
|
|
3918
|
+
"campaign.chat.write",
|
|
3919
|
+
"campaign.brief.read",
|
|
3920
|
+
"campaign.brief.generate",
|
|
3921
|
+
"campaign.brief.sign",
|
|
3922
|
+
"campaign.scenario.read",
|
|
3923
|
+
"campaign.scenario.run",
|
|
3924
|
+
"campaign.scenario.write",
|
|
3925
|
+
"campaign.visibility.read",
|
|
3926
|
+
"campaign.visibility.pin",
|
|
3927
|
+
"campaign.visibility.escalate",
|
|
3928
|
+
"campaign.agents.read",
|
|
3929
|
+
"campaign.agents.write",
|
|
3930
|
+
"campaign.agents.run",
|
|
3931
|
+
"campaign.flows.read",
|
|
3932
|
+
"campaign.flows.write",
|
|
3933
|
+
"campaign.flows.run",
|
|
3934
|
+
"campaign.briefing.read",
|
|
3935
|
+
"campaign.briefing.refresh",
|
|
3936
|
+
"campaign.briefing.headline",
|
|
3937
|
+
"campaign.briefing.crisis_override",
|
|
3938
|
+
"vault.cookies.manage",
|
|
3939
|
+
"iam.users.read",
|
|
3940
|
+
"iam.users.write",
|
|
3941
|
+
"iam.roles.read",
|
|
3942
|
+
"iam.roles.write",
|
|
3943
|
+
"iam.permissions.read",
|
|
3944
|
+
"iam.permissions.write",
|
|
3945
|
+
"iam.nav.read",
|
|
3946
|
+
"iam.nav.write",
|
|
3947
|
+
"iam.audit.read",
|
|
3948
|
+
"iam.groups.read",
|
|
3949
|
+
"iam.groups.write",
|
|
3950
|
+
"iam.groups.manage_members",
|
|
3951
|
+
"docs.tree.read",
|
|
3952
|
+
"docs.content.read",
|
|
3953
|
+
"aip.flows.read",
|
|
3954
|
+
"aip.flows.write",
|
|
3955
|
+
"aip.flows.execute",
|
|
3956
|
+
"aip.agents.execute",
|
|
3957
|
+
"briefing.read",
|
|
3958
|
+
"briefing.refresh",
|
|
3959
|
+
"ontology.objects.view",
|
|
3960
|
+
"ontology.graph.read",
|
|
3961
|
+
"ontology.graph.export",
|
|
3962
|
+
"ontology.explorer.aggregate",
|
|
3963
|
+
"workshop.briefings.read",
|
|
3964
|
+
"workshop.briefings.write",
|
|
3965
|
+
"workshop.briefings.broadcast",
|
|
3966
|
+
"workshop.dossiers.read",
|
|
3967
|
+
"workshop.dossiers.write",
|
|
3968
|
+
"workshop.dossiers.share",
|
|
3969
|
+
"workshop.covs.read",
|
|
3970
|
+
"workshop.covs.write",
|
|
3971
|
+
"workshop.covs.share",
|
|
3972
|
+
"chat.channels.read",
|
|
3973
|
+
"chat.channels.write",
|
|
3974
|
+
"chat.channels.manage",
|
|
3975
|
+
"chat.messages.send",
|
|
3976
|
+
"chat.messages.read",
|
|
3977
|
+
"alerts.feeds.read",
|
|
3978
|
+
"alerts.feeds.subscribe",
|
|
3979
|
+
"alerts.watches.read",
|
|
3980
|
+
"alerts.watches.subscribe",
|
|
3981
|
+
"alerts.geofences.read",
|
|
3982
|
+
"alerts.geofences.manage",
|
|
3983
|
+
"alerts.shares.read",
|
|
3984
|
+
"alerts.read",
|
|
3985
|
+
"alerts.escalate",
|
|
3986
|
+
"alerts.routes.view",
|
|
3987
|
+
"alerts.routes.manage",
|
|
3988
|
+
"atlas.layers.read",
|
|
3989
|
+
"atlas.layers.manage",
|
|
3990
|
+
"atlas.geofences.draw",
|
|
3991
|
+
"atlas.evaluation.read",
|
|
3992
|
+
"atlas.evaluation.manage",
|
|
3993
|
+
"video.exports.create",
|
|
3994
|
+
"connectors.manage",
|
|
3995
|
+
"events.pipeline.view",
|
|
3996
|
+
"events.pipeline.manage",
|
|
3997
|
+
"situational.correlate.view",
|
|
3998
|
+
"situational.correlate.manage",
|
|
3999
|
+
"security.painel.view",
|
|
4000
|
+
"security.buscar.view",
|
|
4001
|
+
"security.geo.view",
|
|
4002
|
+
"security.geo.cerca.create",
|
|
4003
|
+
"security.cameras.view",
|
|
4004
|
+
"security.cameras.tag",
|
|
4005
|
+
"security.cameras.export",
|
|
4006
|
+
"security.cameras.manage",
|
|
4007
|
+
"security.cameras.bookmark",
|
|
4008
|
+
"security.cameras.hotlist",
|
|
4009
|
+
"security.cameras.cloud_inference",
|
|
4010
|
+
"security.explorador.view",
|
|
4011
|
+
"security.rede.view",
|
|
4012
|
+
"security.rede.edit",
|
|
4013
|
+
"security.ficha.view",
|
|
4014
|
+
"security.ficha.edit",
|
|
4015
|
+
"security.alertas.view",
|
|
4016
|
+
"security.alertas.resolve",
|
|
4017
|
+
"security.relatorios.view",
|
|
4018
|
+
"security.relatorios.edit",
|
|
4019
|
+
"security.relatorios.close",
|
|
4020
|
+
"security.briefings.view",
|
|
4021
|
+
"security.briefings.edit",
|
|
4022
|
+
"security.briefings.broadcast",
|
|
4023
|
+
"security.workshop.view",
|
|
4024
|
+
"security.workshop.edit",
|
|
4025
|
+
"security.workshop.publish_global",
|
|
4026
|
+
"security.fluxos.view",
|
|
4027
|
+
"security.fluxos.edit",
|
|
4028
|
+
"security.fluxos.run",
|
|
4029
|
+
"security.agentes.view",
|
|
4030
|
+
"security.agentes.edit",
|
|
4031
|
+
"security.agentes.run",
|
|
4032
|
+
"security.ontologia.view",
|
|
4033
|
+
"security.ontologia.edit",
|
|
4034
|
+
"security.workshop.kiosk",
|
|
4035
|
+
"security.configuracoes.view",
|
|
4036
|
+
"security.browser.manage",
|
|
4037
|
+
"painel.home.view",
|
|
4038
|
+
"painel.aprovacoes.view",
|
|
4039
|
+
"painel.aprovacoes.act",
|
|
4040
|
+
"painel.comunicacoes.view",
|
|
4041
|
+
"painel.comunicacoes.edit",
|
|
4042
|
+
"painel.atividade.view",
|
|
4043
|
+
"painel.atividade.export",
|
|
4044
|
+
"painel.favoritos.edit",
|
|
4045
|
+
"organization.read",
|
|
4046
|
+
"organization.write",
|
|
4047
|
+
"organization.invite_guest",
|
|
4048
|
+
"space.read",
|
|
4049
|
+
"space.write",
|
|
4050
|
+
"space.add_organization",
|
|
4051
|
+
"project.read",
|
|
4052
|
+
"project.write",
|
|
4053
|
+
"project.move",
|
|
4054
|
+
"project.link",
|
|
4055
|
+
"markings.read",
|
|
4056
|
+
"markings.write",
|
|
4057
|
+
"markings.apply",
|
|
4058
|
+
"markings.remove",
|
|
4059
|
+
"markings.expand_access",
|
|
4060
|
+
"markings.manage_eligibility",
|
|
4061
|
+
"classification.read",
|
|
4062
|
+
"classification.set",
|
|
4063
|
+
"classification.upgrade",
|
|
4064
|
+
"project.constraints.read",
|
|
4065
|
+
"project.constraints.configure",
|
|
4066
|
+
"project.constraints.revalidate",
|
|
4067
|
+
"workspace.read",
|
|
4068
|
+
"workspace.write",
|
|
4069
|
+
"workspace.delete",
|
|
4070
|
+
"workspace.publish",
|
|
4071
|
+
"workspace.history.read",
|
|
4072
|
+
"workspace.republish",
|
|
4073
|
+
"workspace.update.read",
|
|
4074
|
+
"workspace.update.write",
|
|
4075
|
+
"workspace.update.archive",
|
|
4076
|
+
"workspace.update.delete",
|
|
4077
|
+
"workspace.update.view",
|
|
4078
|
+
"workspace.navigation.read",
|
|
4079
|
+
"workspace.navigation.configure",
|
|
4080
|
+
"workspace.promote.read",
|
|
4081
|
+
"workspace.promote.set",
|
|
4082
|
+
"workspace.promote.unset",
|
|
4083
|
+
"workspace.kiosk.read",
|
|
4084
|
+
"workspace.kiosk.configure",
|
|
4085
|
+
"workspace.kiosk.session.start",
|
|
4086
|
+
"workspace.kiosk.session.end",
|
|
4087
|
+
"app_shell.manage",
|
|
4088
|
+
"comunicado.read",
|
|
4089
|
+
"comunicado.write",
|
|
4090
|
+
"comunicado.delete",
|
|
4091
|
+
"forms.submit",
|
|
4092
|
+
"forms.submissions.read",
|
|
4093
|
+
"vendor.dev_mode",
|
|
4094
|
+
"public.token.read",
|
|
4095
|
+
"public.token.issue",
|
|
4096
|
+
"public.token.revoke",
|
|
4097
|
+
"messaging.send",
|
|
4098
|
+
"automation.alarms.read",
|
|
4099
|
+
"automation.alarms.write",
|
|
4100
|
+
"data.media.read",
|
|
4101
|
+
"data.media.write",
|
|
4102
|
+
"function.read",
|
|
4103
|
+
"function.write",
|
|
4104
|
+
"function.invoke",
|
|
4105
|
+
"function.review",
|
|
4106
|
+
"sandbox.install",
|
|
4107
|
+
"sandbox.terminal",
|
|
4108
|
+
"llm.budget.read",
|
|
4109
|
+
"llm.budget.write",
|
|
4110
|
+
"governance.retention.read",
|
|
4111
|
+
"governance.retention.write",
|
|
4112
|
+
"rowpolicy.read",
|
|
4113
|
+
"rowpolicy.write",
|
|
4114
|
+
"compute.providers.read",
|
|
4115
|
+
"compute.providers.write",
|
|
4116
|
+
"compute.pipelines.deploy",
|
|
4117
|
+
"vision.count.execute",
|
|
4118
|
+
"ontology.objects.bulk_write"
|
|
4119
|
+
];
|
|
4120
|
+
var ALL_PERMISSIONS = [
|
|
4121
|
+
...NAV_PERMISSIONS,
|
|
4122
|
+
...CAPABILITY_PERMISSIONS
|
|
4123
|
+
];
|
|
4124
|
+
function toDef(key, kind) {
|
|
4125
|
+
const idx = key.lastIndexOf(".");
|
|
4126
|
+
return { key, kind, resource: key.slice(0, idx), action: key.slice(idx + 1) };
|
|
4127
|
+
}
|
|
4128
|
+
function listPermissions(kind) {
|
|
4129
|
+
if (kind === "nav") return NAV_PERMISSIONS.map((k) => toDef(k, "nav"));
|
|
4130
|
+
if (kind === "capability") return CAPABILITY_PERMISSIONS.map((k) => toDef(k, "capability"));
|
|
4131
|
+
if (kind !== void 0) throw new Error(`invalid permission kind: ${String(kind)}`);
|
|
4132
|
+
return [...listPermissions("nav"), ...listPermissions("capability")];
|
|
4133
|
+
}
|
|
4134
|
+
var ALL_SET = new Set(ALL_PERMISSIONS);
|
|
4135
|
+
function isSystemPermission(key) {
|
|
4136
|
+
return ALL_SET.has(key);
|
|
4137
|
+
}
|
|
4138
|
+
|
|
4139
|
+
// src/osdk-applications.ts
|
|
4140
|
+
var APPLICATIONS = [
|
|
4141
|
+
{
|
|
4142
|
+
slug: "security-app",
|
|
4143
|
+
display_name: "Security Application",
|
|
4144
|
+
description: "Operational security frontend \u2014 painel, geo, cameras, ficha, workshop, AIP.",
|
|
4145
|
+
permissions: [
|
|
4146
|
+
"nav.section.discover",
|
|
4147
|
+
"nav.section.painel-de-controle",
|
|
4148
|
+
"nav.item.painel.home",
|
|
4149
|
+
"nav.item.painel.aprovacoes",
|
|
4150
|
+
"nav.item.painel.comunicacoes",
|
|
4151
|
+
"nav.item.painel.atividade",
|
|
4152
|
+
"security.painel.view",
|
|
4153
|
+
"security.buscar.view",
|
|
4154
|
+
"security.geo.view",
|
|
4155
|
+
"security.geo.cerca.create",
|
|
4156
|
+
"security.cameras.view",
|
|
4157
|
+
"security.cameras.tag",
|
|
4158
|
+
"security.cameras.export",
|
|
4159
|
+
"security.cameras.manage",
|
|
4160
|
+
"security.cameras.bookmark",
|
|
4161
|
+
"security.cameras.hotlist",
|
|
4162
|
+
"security.cameras.cloud_inference",
|
|
4163
|
+
"video.exports.create",
|
|
4164
|
+
"security.explorador.view",
|
|
4165
|
+
"security.rede.view",
|
|
4166
|
+
"security.rede.edit",
|
|
4167
|
+
"security.ficha.view",
|
|
4168
|
+
"security.ficha.edit",
|
|
4169
|
+
"security.alertas.view",
|
|
4170
|
+
"security.alertas.resolve",
|
|
4171
|
+
"security.relatorios.view",
|
|
4172
|
+
"security.relatorios.edit",
|
|
4173
|
+
"security.relatorios.close",
|
|
4174
|
+
"security.briefings.view",
|
|
4175
|
+
"security.briefings.edit",
|
|
4176
|
+
"security.briefings.broadcast",
|
|
4177
|
+
"security.workshop.view",
|
|
4178
|
+
"security.workshop.edit",
|
|
4179
|
+
"security.workshop.publish_global",
|
|
4180
|
+
"security.fluxos.view",
|
|
4181
|
+
"security.fluxos.edit",
|
|
4182
|
+
"security.fluxos.run",
|
|
4183
|
+
"security.agentes.view",
|
|
4184
|
+
"security.agentes.edit",
|
|
4185
|
+
"security.agentes.run",
|
|
4186
|
+
"security.ontologia.view",
|
|
4187
|
+
"security.ontologia.edit",
|
|
4188
|
+
"security.workshop.kiosk",
|
|
4189
|
+
"security.configuracoes.view",
|
|
4190
|
+
"security.browser.manage",
|
|
4191
|
+
"connectors.manage",
|
|
4192
|
+
"events.pipeline.view",
|
|
4193
|
+
"events.pipeline.manage",
|
|
4194
|
+
"alerts.read",
|
|
4195
|
+
"alerts.escalate",
|
|
4196
|
+
"alerts.geofences.read",
|
|
4197
|
+
"alerts.geofences.manage",
|
|
4198
|
+
"alerts.routes.view",
|
|
4199
|
+
"alerts.routes.manage",
|
|
4200
|
+
"situational.correlate.view",
|
|
4201
|
+
"situational.correlate.manage",
|
|
4202
|
+
"painel.home.view",
|
|
4203
|
+
"painel.aprovacoes.view",
|
|
4204
|
+
"painel.aprovacoes.act",
|
|
4205
|
+
"painel.comunicacoes.view",
|
|
4206
|
+
"painel.comunicacoes.edit",
|
|
4207
|
+
"painel.atividade.view",
|
|
4208
|
+
"painel.atividade.export",
|
|
4209
|
+
"painel.favoritos.edit",
|
|
4210
|
+
"aip.threads.read",
|
|
4211
|
+
"aip.threads.write",
|
|
4212
|
+
"aip.models.read",
|
|
4213
|
+
"aip.memory.read",
|
|
4214
|
+
"aip.memory.write",
|
|
4215
|
+
"compute.providers.read",
|
|
4216
|
+
"compute.providers.write",
|
|
4217
|
+
"compute.pipelines.deploy",
|
|
4218
|
+
"vision.count.execute",
|
|
4219
|
+
"ontology.objects.bulk_write"
|
|
4220
|
+
]
|
|
4221
|
+
},
|
|
4222
|
+
{
|
|
4223
|
+
slug: "aip-application",
|
|
4224
|
+
display_name: "AIP Application",
|
|
4225
|
+
description: "AIP threads, agents, tools, logic, models, evals, memory.",
|
|
4226
|
+
permissions: [
|
|
4227
|
+
"nav.section.aip",
|
|
4228
|
+
"nav.item.aip.threads",
|
|
4229
|
+
"nav.item.aip.agents",
|
|
4230
|
+
"nav.item.aip.tools",
|
|
4231
|
+
"nav.item.aip.logic",
|
|
4232
|
+
"nav.item.aip.models",
|
|
4233
|
+
"nav.item.aip.capacity",
|
|
4234
|
+
"nav.item.aip.scenarios",
|
|
4235
|
+
"nav.item.aip.evals",
|
|
4236
|
+
"nav.item.aip.memory",
|
|
4237
|
+
"nav.item.aip.mcp_adapters",
|
|
4238
|
+
"aip.threads.read",
|
|
4239
|
+
"aip.threads.write",
|
|
4240
|
+
"aip.agents.read",
|
|
4241
|
+
"aip.agents.write",
|
|
4242
|
+
"aip.agents.execute",
|
|
4243
|
+
"aip.models.read",
|
|
4244
|
+
"aip.models.write",
|
|
4245
|
+
"aip.memory.read",
|
|
4246
|
+
"aip.memory.write",
|
|
4247
|
+
"aip.evals.read",
|
|
4248
|
+
"aip.evals.run",
|
|
4249
|
+
"aip.flows.read",
|
|
4250
|
+
"aip.flows.write",
|
|
4251
|
+
"aip.flows.execute"
|
|
4252
|
+
]
|
|
4253
|
+
},
|
|
4254
|
+
{
|
|
4255
|
+
slug: "ontology-application",
|
|
4256
|
+
display_name: "Ontology Application",
|
|
4257
|
+
description: "Ontology types, objects, links, graph, solution diagrams, lineage.",
|
|
4258
|
+
permissions: [
|
|
4259
|
+
"ontology.types.read",
|
|
4260
|
+
"ontology.types.write",
|
|
4261
|
+
"ontology.actions.read",
|
|
4262
|
+
"ontology.actions.write",
|
|
4263
|
+
"ontology.actions.execute",
|
|
4264
|
+
"ontology.actions.execute_external",
|
|
4265
|
+
"ontology.objects.read",
|
|
4266
|
+
"ontology.objects.write",
|
|
4267
|
+
"ontology.objects.view",
|
|
4268
|
+
"ontology.links.read",
|
|
4269
|
+
"ontology.links.write",
|
|
4270
|
+
"ontology.graph.read",
|
|
4271
|
+
"ontology.graph.export",
|
|
4272
|
+
"ontology.explorer.aggregate",
|
|
4273
|
+
"data.lineage.read",
|
|
4274
|
+
"solution.diagram.read",
|
|
4275
|
+
"solution.diagram.write",
|
|
4276
|
+
"solution.diagram.publish",
|
|
4277
|
+
"solution.diagram.delete",
|
|
4278
|
+
"solution.diagram.history.read",
|
|
4279
|
+
"solution.materialize.delete",
|
|
4280
|
+
"solution.refactor",
|
|
4281
|
+
"messaging.send",
|
|
4282
|
+
"compute.providers.read",
|
|
4283
|
+
"compute.pipelines.deploy",
|
|
4284
|
+
"vision.count.execute",
|
|
4285
|
+
"ontology.objects.bulk_write"
|
|
4286
|
+
]
|
|
4287
|
+
},
|
|
4288
|
+
{
|
|
4289
|
+
slug: "governance-application",
|
|
4290
|
+
display_name: "Governance Application",
|
|
4291
|
+
description: "IAM groups, audit, rules, change requests, tokens, LGPD, markings, classification.",
|
|
4292
|
+
permissions: [
|
|
4293
|
+
"iam.groups.read",
|
|
4294
|
+
"iam.groups.write",
|
|
4295
|
+
"iam.groups.manage_members",
|
|
4296
|
+
"governance.audit.read",
|
|
4297
|
+
"governance.rules.read",
|
|
4298
|
+
"governance.rules.write",
|
|
4299
|
+
"governance.change_requests.read",
|
|
4300
|
+
"governance.change_requests.write",
|
|
4301
|
+
"governance.change_requests.approve",
|
|
4302
|
+
"governance.tokens.read",
|
|
4303
|
+
"governance.tokens.write",
|
|
4304
|
+
"governance.lgpd.read",
|
|
4305
|
+
"governance.lgpd.write",
|
|
4306
|
+
"governance.peers.read",
|
|
4307
|
+
"governance.peers.write",
|
|
4308
|
+
"governance.kiosk.read",
|
|
4309
|
+
"governance.kiosk.write",
|
|
4310
|
+
"admin.acessos",
|
|
4311
|
+
"admin.classificacao",
|
|
4312
|
+
"admin.auditoria",
|
|
4313
|
+
"admin.federacao",
|
|
4314
|
+
"admin.unidades",
|
|
4315
|
+
"admin.templates",
|
|
4316
|
+
"admin.automacoes",
|
|
4317
|
+
"admin.tokens",
|
|
4318
|
+
"markings.read",
|
|
4319
|
+
"markings.write",
|
|
4320
|
+
"markings.apply",
|
|
4321
|
+
"markings.remove",
|
|
4322
|
+
"markings.expand_access",
|
|
4323
|
+
"markings.manage_eligibility",
|
|
4324
|
+
"classification.read",
|
|
4325
|
+
"classification.set",
|
|
4326
|
+
"classification.upgrade",
|
|
4327
|
+
"project.constraints.read",
|
|
4328
|
+
"project.constraints.configure",
|
|
4329
|
+
"project.constraints.revalidate",
|
|
4330
|
+
"public.token.read",
|
|
4331
|
+
"public.token.issue",
|
|
4332
|
+
"public.token.revoke"
|
|
4333
|
+
]
|
|
4334
|
+
},
|
|
4335
|
+
{
|
|
4336
|
+
slug: "workshop-application",
|
|
4337
|
+
display_name: "Workshop Application",
|
|
4338
|
+
description: "Workshop apps, briefings, dossiers, COVs, workspaces, app-shell, comunicados.",
|
|
4339
|
+
permissions: [
|
|
4340
|
+
"workshop.apps.read",
|
|
4341
|
+
"workshop.apps.write",
|
|
4342
|
+
"workshop.briefings.read",
|
|
4343
|
+
"workshop.briefings.write",
|
|
4344
|
+
"workshop.briefings.broadcast",
|
|
4345
|
+
"workshop.dossiers.read",
|
|
4346
|
+
"workshop.dossiers.write",
|
|
4347
|
+
"workshop.dossiers.share",
|
|
4348
|
+
"workshop.covs.read",
|
|
4349
|
+
"workshop.covs.write",
|
|
4350
|
+
"workshop.covs.share",
|
|
4351
|
+
"workspace.read",
|
|
4352
|
+
"workspace.write",
|
|
4353
|
+
"workspace.delete",
|
|
4354
|
+
"workspace.publish",
|
|
4355
|
+
"workspace.history.read",
|
|
4356
|
+
"workspace.republish",
|
|
4357
|
+
"workspace.update.read",
|
|
4358
|
+
"workspace.update.write",
|
|
4359
|
+
"workspace.update.archive",
|
|
4360
|
+
"workspace.update.delete",
|
|
4361
|
+
"workspace.update.view",
|
|
4362
|
+
"workspace.navigation.read",
|
|
4363
|
+
"workspace.navigation.configure",
|
|
4364
|
+
"workspace.promote.read",
|
|
4365
|
+
"workspace.promote.set",
|
|
4366
|
+
"workspace.promote.unset",
|
|
4367
|
+
"workspace.kiosk.read",
|
|
4368
|
+
"workspace.kiosk.configure",
|
|
4369
|
+
"workspace.kiosk.session.start",
|
|
4370
|
+
"workspace.kiosk.session.end",
|
|
4371
|
+
"app_shell.manage",
|
|
4372
|
+
"comunicado.read",
|
|
4373
|
+
"comunicado.write",
|
|
4374
|
+
"comunicado.delete"
|
|
4375
|
+
]
|
|
4376
|
+
},
|
|
4377
|
+
{
|
|
4378
|
+
slug: "campaign-application",
|
|
4379
|
+
display_name: "Campaign Application (politicians-app)",
|
|
4380
|
+
description: "Campaign hub, chat, visibility, agents, scenarios, briefing.",
|
|
4381
|
+
permissions: [
|
|
4382
|
+
"nav.section.campanha",
|
|
4383
|
+
"nav.item.campaign.hub",
|
|
4384
|
+
"nav.item.campaign.chat",
|
|
4385
|
+
"nav.item.campaign.visibility",
|
|
4386
|
+
"nav.item.campaign.agents",
|
|
4387
|
+
"nav.item.campaign.scenarios",
|
|
4388
|
+
"nav.item.campaign.brief",
|
|
4389
|
+
"campaign.chat.read",
|
|
4390
|
+
"campaign.chat.write",
|
|
4391
|
+
"campaign.brief.read",
|
|
4392
|
+
"campaign.brief.generate",
|
|
4393
|
+
"campaign.brief.sign",
|
|
4394
|
+
"campaign.scenario.read",
|
|
4395
|
+
"campaign.scenario.run",
|
|
4396
|
+
"campaign.scenario.write",
|
|
4397
|
+
"campaign.visibility.read",
|
|
4398
|
+
"campaign.visibility.pin",
|
|
4399
|
+
"campaign.visibility.escalate",
|
|
4400
|
+
"campaign.agents.read",
|
|
4401
|
+
"campaign.agents.write",
|
|
4402
|
+
"campaign.agents.run",
|
|
4403
|
+
"campaign.briefing.read",
|
|
4404
|
+
"campaign.briefing.refresh",
|
|
4405
|
+
"campaign.briefing.headline",
|
|
4406
|
+
"campaign.briefing.crisis_override",
|
|
4407
|
+
"vault.cookies.manage"
|
|
4408
|
+
]
|
|
4409
|
+
},
|
|
4410
|
+
{
|
|
4411
|
+
slug: "docs-loader",
|
|
4412
|
+
display_name: "Docs UI Loader",
|
|
4413
|
+
description: "Read-only access to the docs tree and content.",
|
|
4414
|
+
permissions: ["docs.tree.read", "docs.content.read"]
|
|
4415
|
+
}
|
|
4416
|
+
];
|
|
4417
|
+
function listApplications() {
|
|
4418
|
+
return APPLICATIONS;
|
|
4419
|
+
}
|
|
4420
|
+
function applicationBySlug(slug) {
|
|
4421
|
+
return APPLICATIONS.find((app) => app.slug === slug);
|
|
4422
|
+
}
|
|
4423
|
+
function applicationHas(app, key) {
|
|
4424
|
+
return app.permissions.includes(key);
|
|
4425
|
+
}
|
|
4426
|
+
function validateApplication(app) {
|
|
4427
|
+
for (const key of app.permissions) {
|
|
4428
|
+
if (!isSystemPermission(key)) {
|
|
4429
|
+
throw new Error(`application ${app.slug} references unknown permission: ${key}`);
|
|
4430
|
+
}
|
|
4431
|
+
}
|
|
4432
|
+
}
|
|
4433
|
+
|
|
4434
|
+
// src/osdk-adapter.ts
|
|
4435
|
+
function asOsdkClient(client) {
|
|
4436
|
+
return {
|
|
4437
|
+
get: (path, params) => client.request("GET", path, {
|
|
4438
|
+
params
|
|
4439
|
+
}),
|
|
4440
|
+
post: (path, body) => client.request("POST", path, { json: body ?? {} })
|
|
4441
|
+
};
|
|
4442
|
+
}
|
|
681
4443
|
export {
|
|
4444
|
+
ALL_PERMISSIONS,
|
|
4445
|
+
APPLICATIONS,
|
|
4446
|
+
AccessAuditResource,
|
|
682
4447
|
AegisAPIError,
|
|
683
4448
|
AegisClient,
|
|
4449
|
+
AipResource,
|
|
4450
|
+
AlarmsResource,
|
|
4451
|
+
AlertsResource,
|
|
4452
|
+
AppShellResource,
|
|
4453
|
+
AtlasResource,
|
|
684
4454
|
AuthError,
|
|
4455
|
+
AuthResource,
|
|
4456
|
+
BriefingResource,
|
|
4457
|
+
CAPABILITY_PERMISSIONS,
|
|
4458
|
+
CLASSIFICATION_LABEL,
|
|
4459
|
+
CLASSIFICATION_RANK,
|
|
4460
|
+
CampaignResource,
|
|
4461
|
+
CctvResource,
|
|
4462
|
+
ChatResource,
|
|
4463
|
+
ClassificationInvariantViolation,
|
|
4464
|
+
CodeRepositoriesResource,
|
|
4465
|
+
CodegenResource,
|
|
4466
|
+
ComputeControlResource,
|
|
4467
|
+
ComputeResource,
|
|
4468
|
+
ComunicadosResource,
|
|
4469
|
+
ConnectorsResource,
|
|
4470
|
+
CorrelationResource,
|
|
4471
|
+
DatasetsResource,
|
|
4472
|
+
DocsResource,
|
|
4473
|
+
DossierResource,
|
|
4474
|
+
EdgeResource,
|
|
4475
|
+
ErasureResource,
|
|
4476
|
+
EventsResource,
|
|
4477
|
+
FormsResource,
|
|
4478
|
+
FunctionsResource,
|
|
4479
|
+
GeoResource,
|
|
4480
|
+
GroupsResource,
|
|
4481
|
+
GuestTokensResource,
|
|
4482
|
+
IamResource,
|
|
4483
|
+
InferenceResource,
|
|
4484
|
+
LineageResource,
|
|
4485
|
+
MapTemplatesResource,
|
|
4486
|
+
MarketplaceResource,
|
|
4487
|
+
MarkingsResource,
|
|
4488
|
+
MediaResource,
|
|
4489
|
+
MergeResource,
|
|
4490
|
+
NAV_PERMISSIONS,
|
|
685
4491
|
NotFoundError,
|
|
686
|
-
|
|
4492
|
+
NotepadResource,
|
|
4493
|
+
OntologyResource,
|
|
4494
|
+
OperatorResource,
|
|
4495
|
+
OrganizationsResource,
|
|
4496
|
+
OsdkResource,
|
|
4497
|
+
PagesResource,
|
|
4498
|
+
PermissionDeniedError,
|
|
4499
|
+
PipelinesResource,
|
|
4500
|
+
PlatformV22Resource,
|
|
4501
|
+
PlatformV23Resource,
|
|
4502
|
+
PlatformV24Resource,
|
|
4503
|
+
PlatformV25Resource,
|
|
4504
|
+
PlatformV26Resource,
|
|
4505
|
+
ProjectsResource,
|
|
4506
|
+
PropertyMarkingsResource,
|
|
4507
|
+
PublicGuestResource,
|
|
4508
|
+
ResourceMarkingsResource,
|
|
4509
|
+
RetentionResource,
|
|
4510
|
+
RowPoliciesResource,
|
|
4511
|
+
SituationalResource,
|
|
4512
|
+
SolutionsResource,
|
|
4513
|
+
SpacesResource,
|
|
4514
|
+
TimeSeriesResource,
|
|
4515
|
+
VALID_LEVELS,
|
|
4516
|
+
VALID_PROJECT_ROLES,
|
|
4517
|
+
VideoResource,
|
|
4518
|
+
WorkshopResource,
|
|
4519
|
+
WorkspaceUpdatesResource,
|
|
4520
|
+
WorkspacesResource,
|
|
4521
|
+
applicationBySlug,
|
|
4522
|
+
applicationHas,
|
|
4523
|
+
asOsdkClient,
|
|
4524
|
+
isSystemPermission,
|
|
4525
|
+
listApplications,
|
|
4526
|
+
listPermissions,
|
|
4527
|
+
maxLevel,
|
|
4528
|
+
parseSseStream,
|
|
4529
|
+
validateApplication,
|
|
4530
|
+
validateInvariant
|
|
687
4531
|
};
|
|
688
4532
|
//# sourceMappingURL=index.js.map
|