@opengeni/sdk 0.52.1 → 0.57.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/README.md +61 -7
- package/dist/artifacts.js +5 -5
- package/dist/{chunk-V5F253OG.js → chunk-GU6JF75T.js} +6 -3
- package/dist/chunk-GU6JF75T.js.map +1 -0
- package/dist/{chunk-FRJFNDIR.js → chunk-HJ3HHUT5.js} +5 -1
- package/dist/chunk-HJ3HHUT5.js.map +1 -0
- package/dist/{chunk-KIHGPM7H.js → chunk-JDLDDRNE.js} +20 -14
- package/dist/chunk-JDLDDRNE.js.map +1 -0
- package/dist/{chunk-FHI4DFIG.js → chunk-JRPFWI6T.js} +2 -2
- package/dist/{chunk-ILQZR5N6.js → chunk-PKQ377ED.js} +693 -34
- package/dist/chunk-PKQ377ED.js.map +1 -0
- package/dist/{chunk-MZWTWOX6.js → chunk-ST5DDKJP.js} +327 -1
- package/dist/chunk-ST5DDKJP.js.map +1 -0
- package/dist/{chunk-DXDL7EEW.js → chunk-YKZME56C.js} +197 -113
- package/dist/chunk-YKZME56C.js.map +1 -0
- package/dist/client.d.ts +106 -16
- package/dist/codex-realtime-controller.d.ts +3 -0
- package/dist/codex-realtime-controller.js +2 -2
- package/dist/core.js +7 -7
- package/dist/desktop.d.ts +8 -0
- package/dist/editable-artifacts.js +4 -4
- package/dist/gateway-realtime-transport.d.ts +1 -0
- package/dist/gateway-realtime-transport.js +5 -3
- package/dist/index.d.ts +6 -2
- package/dist/index.js +68 -34
- package/dist/index.js.map +1 -1
- package/dist/interaction-revision-stream.d.ts +11 -0
- package/dist/interaction.d.ts +604 -5
- package/dist/interaction.js +27 -1
- package/dist/realtime.d.ts +3 -3
- package/dist/realtime.js +11 -7
- package/dist/realtime.js.map +1 -1
- package/dist/types.d.ts +267 -64
- package/dist/workspace-live-stream.d.ts +14 -0
- package/package.json +2 -2
- package/src/client.ts +861 -60
- package/src/codex-realtime-controller.ts +25 -7
- package/src/codex-realtime-lifecycle.ts +1 -0
- package/src/desktop.ts +11 -1
- package/src/errors.ts +16 -2
- package/src/gateway-realtime-transport.ts +252 -109
- package/src/index.ts +42 -13
- package/src/interaction-revision-stream.ts +117 -0
- package/src/interaction.ts +1049 -5
- package/src/realtime.ts +14 -4
- package/src/types.ts +336 -67
- package/src/workspace-live-stream.ts +137 -0
- package/dist/chunk-DXDL7EEW.js.map +0 -1
- package/dist/chunk-FRJFNDIR.js.map +0 -1
- package/dist/chunk-ILQZR5N6.js.map +0 -1
- package/dist/chunk-KIHGPM7H.js.map +0 -1
- package/dist/chunk-MZWTWOX6.js.map +0 -1
- package/dist/chunk-V5F253OG.js.map +0 -1
- /package/dist/{chunk-FHI4DFIG.js.map → chunk-JRPFWI6T.js.map} +0 -0
package/src/client.ts
CHANGED
|
@@ -12,15 +12,33 @@ import {
|
|
|
12
12
|
streamWorkspaceControlEvents,
|
|
13
13
|
type WorkspaceControlStreamTransport,
|
|
14
14
|
} from "./workspace-control-stream";
|
|
15
|
+
import {
|
|
16
|
+
streamWorkspaceInteractionRevisions,
|
|
17
|
+
type WorkspaceInteractionRevisionStreamTransport,
|
|
18
|
+
} from "./interaction-revision-stream";
|
|
19
|
+
import {
|
|
20
|
+
streamWorkspaceLiveEvents,
|
|
21
|
+
type WorkspaceLiveStreamOptions,
|
|
22
|
+
type WorkspaceLiveStreamTransport,
|
|
23
|
+
} from "./workspace-live-stream";
|
|
15
24
|
import {
|
|
16
25
|
OpenGeniInteractionClient,
|
|
26
|
+
type AuthRun,
|
|
27
|
+
type AuthRunListOptions,
|
|
28
|
+
type AuthRunListResponse,
|
|
29
|
+
type AuthRunMutationResponse,
|
|
17
30
|
type AttachedBrowserDevice,
|
|
18
31
|
type AttachedBrowserDeviceListOptions,
|
|
19
32
|
type AttachedBrowserDeviceListResponse,
|
|
20
33
|
type BrowserActionReceipt,
|
|
21
34
|
type BrowserActionRequest,
|
|
35
|
+
type BrowserClipboard,
|
|
22
36
|
type BrowserDiagnosticBatch,
|
|
23
37
|
type BrowserDiagnosticsOptions,
|
|
38
|
+
type BrowserDownload,
|
|
39
|
+
type BrowserDownloadListResponse,
|
|
40
|
+
type BrowserDownloadSaveRequest,
|
|
41
|
+
type BrowserDownloadSaveResponse,
|
|
24
42
|
type BrowserIdentity,
|
|
25
43
|
type BrowserIdentityListOptions,
|
|
26
44
|
type BrowserIdentityListResponse,
|
|
@@ -34,11 +52,11 @@ import {
|
|
|
34
52
|
type BrowserSessionLifecycleRequest,
|
|
35
53
|
type BrowserSessionListResponse,
|
|
36
54
|
type BrowserSessionMutationResponse,
|
|
37
|
-
type BrowserTarget,
|
|
38
55
|
type BrowserTargetListResponse,
|
|
39
56
|
type BrowserRevisionListResponse,
|
|
40
57
|
type ComputerActionReceipt,
|
|
41
58
|
type ComputerActionRequest,
|
|
59
|
+
type ComputerClipboard,
|
|
42
60
|
type ComputerObservation,
|
|
43
61
|
type ComputerSession,
|
|
44
62
|
type ComputerSessionAttachment,
|
|
@@ -51,8 +69,37 @@ import {
|
|
|
51
69
|
type CreateBrowserIdentityRequest,
|
|
52
70
|
type CreateBrowserSessionRequest,
|
|
53
71
|
type CreateComputerSessionRequest,
|
|
72
|
+
type CreateInteractionInterventionRequest,
|
|
73
|
+
type CreateNetworkRouteRequest,
|
|
74
|
+
type CreateSiteAuthConnectionRequest,
|
|
75
|
+
type ExternalAuthInteractiveRequest,
|
|
76
|
+
type ExternalAuthInteractiveResponse,
|
|
77
|
+
type ExternalAuthRunRequest,
|
|
78
|
+
type ExternalAuthRunResponse,
|
|
79
|
+
type InteractionIntervention,
|
|
80
|
+
type InteractionInterventionListOptions,
|
|
81
|
+
type InteractionInterventionListResponse,
|
|
82
|
+
type InteractionInterventionMutationResponse,
|
|
83
|
+
type NetworkRoute,
|
|
84
|
+
type NetworkRouteListOptions,
|
|
85
|
+
type NetworkRouteListResponse,
|
|
86
|
+
type NetworkRouteMutationResponse,
|
|
87
|
+
type ProtectedAuthFillRequest,
|
|
88
|
+
type ProtectedAuthFillResponse,
|
|
54
89
|
type PublishBrowserRevisionRequest,
|
|
55
90
|
type PublishBrowserRevisionResponse,
|
|
91
|
+
type ReportAuthRunRequest,
|
|
92
|
+
type ResolveInteractionInterventionRequest,
|
|
93
|
+
type SiteAuthConnection,
|
|
94
|
+
type SiteAuthConnectionListOptions,
|
|
95
|
+
type SiteAuthConnectionListResponse,
|
|
96
|
+
type SiteAuthConnectionMutationResponse,
|
|
97
|
+
type StartAuthRunRequest,
|
|
98
|
+
type UpdateNetworkRouteRequest,
|
|
99
|
+
type UpdateBrowserIdentityRequest,
|
|
100
|
+
type UpdateSiteAuthConnectionRequest,
|
|
101
|
+
type VerifyAuthRunRequest,
|
|
102
|
+
type WorkspaceInteractionRevisionEvent,
|
|
56
103
|
} from "./interaction";
|
|
57
104
|
import type {
|
|
58
105
|
AccessContext,
|
|
@@ -75,6 +122,14 @@ import type {
|
|
|
75
122
|
CodexConnectStart,
|
|
76
123
|
CodexUsage,
|
|
77
124
|
CodexUsageMap,
|
|
125
|
+
SuperGrokAccount,
|
|
126
|
+
SuperGrokAccountsResponse,
|
|
127
|
+
SuperGrokAccountScope,
|
|
128
|
+
SuperGrokAllocatorUpdate,
|
|
129
|
+
SuperGrokConnectionStatus,
|
|
130
|
+
SuperGrokConnectPoll,
|
|
131
|
+
SuperGrokConnectStart,
|
|
132
|
+
SuperGrokRotationSettings,
|
|
78
133
|
BillingSummary,
|
|
79
134
|
BillingUsageResponse,
|
|
80
135
|
InsightsRange,
|
|
@@ -88,16 +143,16 @@ import type {
|
|
|
88
143
|
ApiIntegrationUninstallPreview,
|
|
89
144
|
InstallApiIntegrationRequest,
|
|
90
145
|
InstalledApiIntegration,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
146
|
+
IntegrationFacetMutationResult,
|
|
147
|
+
IntegrationFacetRemovalResult,
|
|
148
|
+
IntegrationInstanceFacetsResponse,
|
|
149
|
+
ListIntegrationDefinitionsResponse,
|
|
95
150
|
ListApiIntegrationsResponse,
|
|
96
|
-
|
|
151
|
+
MutateIntegrationFacetRequest,
|
|
97
152
|
PreviewApiIntegrationRequest,
|
|
98
153
|
UninstallApiIntegrationRequest,
|
|
99
154
|
UninstallApiIntegrationResult,
|
|
100
|
-
|
|
155
|
+
UpsertIntegrationFacetRequest,
|
|
101
156
|
PreviewPluginRequest,
|
|
102
157
|
PluginPreview,
|
|
103
158
|
InstallPluginRequest,
|
|
@@ -120,12 +175,17 @@ import type {
|
|
|
120
175
|
CreateApiKeyResponse,
|
|
121
176
|
CreateCapabilityCatalogItemRequest,
|
|
122
177
|
InstallSkillRequest,
|
|
178
|
+
InstallLibrarySkillRequest,
|
|
123
179
|
InstalledSkill,
|
|
180
|
+
ListInstalledSkillsResponse,
|
|
124
181
|
CreateCheckoutRequest,
|
|
125
182
|
CreateCheckoutResponse,
|
|
126
183
|
OpenGeniSlackBotInstallRequest,
|
|
127
184
|
OpenGeniSlackBotInstallStart,
|
|
128
185
|
SlackReactionChannelListResponse,
|
|
186
|
+
FikenInstallRequest,
|
|
187
|
+
FikenOAuthStartRequest,
|
|
188
|
+
FikenOAuthStartResponse,
|
|
129
189
|
CreateConnectionRequest,
|
|
130
190
|
CreateDocumentBaseRequest,
|
|
131
191
|
CreateFileUploadRequest,
|
|
@@ -165,6 +225,7 @@ import type {
|
|
|
165
225
|
KnowledgeMemory,
|
|
166
226
|
KnowledgeMemorySearchRequest,
|
|
167
227
|
ListApiKeysResponse,
|
|
228
|
+
ListManagedOrganizationMembershipsResponse,
|
|
168
229
|
ListPacksResponse,
|
|
169
230
|
// Bring-your-own-compute: the Machines dashboard + per-machine metrics (M10).
|
|
170
231
|
MachinesResponse,
|
|
@@ -209,6 +270,7 @@ import type {
|
|
|
209
270
|
Session,
|
|
210
271
|
SessionListResponse,
|
|
211
272
|
AgentTopologyPageResponse,
|
|
273
|
+
UpdateSessionChannelRequest,
|
|
212
274
|
UpdateSessionPinRequest,
|
|
213
275
|
UninstallPackRequest,
|
|
214
276
|
UninstallPackResult,
|
|
@@ -218,6 +280,7 @@ import type {
|
|
|
218
280
|
SessionEventListOptions,
|
|
219
281
|
SessionEventPage,
|
|
220
282
|
SessionGoal,
|
|
283
|
+
SessionGoalRevision,
|
|
221
284
|
SessionHumanInputRequest,
|
|
222
285
|
SessionLineageResponse,
|
|
223
286
|
SessionRealtimeMutationResponse,
|
|
@@ -295,6 +358,7 @@ import type {
|
|
|
295
358
|
UpdateKnowledgeMemoryRequest,
|
|
296
359
|
UpdateScheduledTaskRequest,
|
|
297
360
|
UpdateSessionGoalRequest,
|
|
361
|
+
ApplySessionGoalRevisionRequest,
|
|
298
362
|
UpdateSessionRequest,
|
|
299
363
|
UpdateSessionToolPolicyRequest,
|
|
300
364
|
UpdateVariableSetRequest,
|
|
@@ -307,6 +371,9 @@ import type {
|
|
|
307
371
|
VariableSet,
|
|
308
372
|
VariableSetSecret,
|
|
309
373
|
VariableSetVariableMetadata,
|
|
374
|
+
Channel,
|
|
375
|
+
CreateChannelRequest,
|
|
376
|
+
UpdateChannelRequest,
|
|
310
377
|
Rig,
|
|
311
378
|
RigVersion,
|
|
312
379
|
RigChange,
|
|
@@ -993,6 +1060,22 @@ export class OpenGeniClient {
|
|
|
993
1060
|
);
|
|
994
1061
|
}
|
|
995
1062
|
|
|
1063
|
+
/** Mint a short-lived browser token from a connected SuperGrok account. */
|
|
1064
|
+
async negotiateXaiSubscriptionRealtime(
|
|
1065
|
+
workspaceId: string,
|
|
1066
|
+
sessionId: string,
|
|
1067
|
+
request: GatewayRealtimeConnectRequest,
|
|
1068
|
+
options: { signal?: AbortSignal | undefined } = {},
|
|
1069
|
+
): Promise<GatewayRealtimeConnectResponse> {
|
|
1070
|
+
return await this.requestJson<GatewayRealtimeConnectResponse>(
|
|
1071
|
+
"POST",
|
|
1072
|
+
`/v1/workspaces/${workspaceId}/sessions/${sessionId}/realtime/supergrok`,
|
|
1073
|
+
request,
|
|
1074
|
+
{},
|
|
1075
|
+
{ signal: options.signal },
|
|
1076
|
+
);
|
|
1077
|
+
}
|
|
1078
|
+
|
|
996
1079
|
/** Promote a negotiated connection only after its browser data channel is ready. */
|
|
997
1080
|
async activateCodexRealtimeConnection(
|
|
998
1081
|
workspaceId: string,
|
|
@@ -1777,6 +1860,61 @@ export class OpenGeniClient {
|
|
|
1777
1860
|
return streamWorkspaceControlEvents(this.workspaceControlStreamTransport(workspaceId), options);
|
|
1778
1861
|
}
|
|
1779
1862
|
|
|
1863
|
+
/**
|
|
1864
|
+
* Multiplex workspace control and interaction invalidations over one HTTP
|
|
1865
|
+
* connection while retaining an independent durable cursor for each domain.
|
|
1866
|
+
*/
|
|
1867
|
+
streamWorkspaceLiveEvents(workspaceId: string, options: WorkspaceLiveStreamOptions = {}) {
|
|
1868
|
+
return streamWorkspaceLiveEvents(this.workspaceLiveStreamTransport(workspaceId), options);
|
|
1869
|
+
}
|
|
1870
|
+
|
|
1871
|
+
workspaceLiveStreamTransport(workspaceId: string): WorkspaceLiveStreamTransport {
|
|
1872
|
+
return {
|
|
1873
|
+
openStream: async (controlAfter, interactionAfter, signal) =>
|
|
1874
|
+
await this.openWorkspaceLiveEventStream(workspaceId, {
|
|
1875
|
+
controlAfter,
|
|
1876
|
+
interactionAfter,
|
|
1877
|
+
...(signal ? { signal } : {}),
|
|
1878
|
+
}),
|
|
1879
|
+
};
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
async openWorkspaceLiveEventStream(
|
|
1883
|
+
workspaceId: string,
|
|
1884
|
+
options: {
|
|
1885
|
+
controlAfter?: number;
|
|
1886
|
+
interactionAfter?: number;
|
|
1887
|
+
signal?: AbortSignal;
|
|
1888
|
+
} = {},
|
|
1889
|
+
): Promise<ReadableStream<Uint8Array>> {
|
|
1890
|
+
const correlationId = crypto.randomUUID();
|
|
1891
|
+
const response = await this.fetchImpl(
|
|
1892
|
+
this.url(`/v1/workspaces/${workspaceId}/live-events/stream`, {
|
|
1893
|
+
controlAfter: String(options.controlAfter ?? 0),
|
|
1894
|
+
interactionAfter: String(options.interactionAfter ?? 0),
|
|
1895
|
+
}),
|
|
1896
|
+
{
|
|
1897
|
+
method: "GET",
|
|
1898
|
+
headers: {
|
|
1899
|
+
...this.headers(correlationId),
|
|
1900
|
+
Accept: "text/event-stream",
|
|
1901
|
+
},
|
|
1902
|
+
...(options.signal ? { signal: options.signal } : {}),
|
|
1903
|
+
},
|
|
1904
|
+
);
|
|
1905
|
+
assertApiContractResponse(response);
|
|
1906
|
+
if (!response.ok) {
|
|
1907
|
+
throw await apiErrorFromResponse(response, {
|
|
1908
|
+
method: "GET",
|
|
1909
|
+
correlationId,
|
|
1910
|
+
});
|
|
1911
|
+
}
|
|
1912
|
+
if (!response.body) {
|
|
1913
|
+
throw new OpenGeniApiError(response.status, "SSE response did not include a readable body");
|
|
1914
|
+
}
|
|
1915
|
+
return response.body;
|
|
1916
|
+
}
|
|
1917
|
+
|
|
1780
1918
|
workspaceControlStreamTransport(workspaceId: string): WorkspaceControlStreamTransport {
|
|
1781
1919
|
return {
|
|
1782
1920
|
openStream: async (after, signal) =>
|
|
@@ -1855,6 +1993,26 @@ export class OpenGeniClient {
|
|
|
1855
1993
|
);
|
|
1856
1994
|
}
|
|
1857
1995
|
|
|
1996
|
+
async listGoalRevisions(workspaceId: string, sessionId: string): Promise<SessionGoalRevision[]> {
|
|
1997
|
+
return await this.requestJson<SessionGoalRevision[]>(
|
|
1998
|
+
"GET",
|
|
1999
|
+
`/v1/workspaces/${workspaceId}/sessions/${sessionId}/goal/revisions`,
|
|
2000
|
+
);
|
|
2001
|
+
}
|
|
2002
|
+
|
|
2003
|
+
async applyGoalRevision(
|
|
2004
|
+
workspaceId: string,
|
|
2005
|
+
sessionId: string,
|
|
2006
|
+
revisionId: string,
|
|
2007
|
+
request: ApplySessionGoalRevisionRequest,
|
|
2008
|
+
): Promise<SessionGoal> {
|
|
2009
|
+
return await this.requestJson<SessionGoal>(
|
|
2010
|
+
"POST",
|
|
2011
|
+
`/v1/workspaces/${workspaceId}/sessions/${sessionId}/goal/revisions/${revisionId}/apply`,
|
|
2012
|
+
request,
|
|
2013
|
+
);
|
|
2014
|
+
}
|
|
2015
|
+
|
|
1858
2016
|
async deleteGoal(workspaceId: string, sessionId: string): Promise<void> {
|
|
1859
2017
|
await this.requestVoid("DELETE", `/v1/workspaces/${workspaceId}/sessions/${sessionId}/goal`);
|
|
1860
2018
|
}
|
|
@@ -2274,6 +2432,359 @@ export class OpenGeniClient {
|
|
|
2274
2432
|
|
|
2275
2433
|
// --- Browser / Computer interaction resources --------------------------------
|
|
2276
2434
|
|
|
2435
|
+
streamWorkspaceInteractionRevisions(
|
|
2436
|
+
workspaceId: string,
|
|
2437
|
+
options: StreamSessionEventsOptions = {},
|
|
2438
|
+
): AsyncGenerator<WorkspaceInteractionRevisionEvent, void, void> {
|
|
2439
|
+
return streamWorkspaceInteractionRevisions(
|
|
2440
|
+
this.workspaceInteractionRevisionStreamTransport(workspaceId),
|
|
2441
|
+
options,
|
|
2442
|
+
);
|
|
2443
|
+
}
|
|
2444
|
+
|
|
2445
|
+
workspaceInteractionRevisionStreamTransport(
|
|
2446
|
+
workspaceId: string,
|
|
2447
|
+
): WorkspaceInteractionRevisionStreamTransport {
|
|
2448
|
+
return {
|
|
2449
|
+
openStream: async (after, signal) =>
|
|
2450
|
+
await this.openWorkspaceInteractionRevisionStream(workspaceId, {
|
|
2451
|
+
after,
|
|
2452
|
+
...(signal ? { signal } : {}),
|
|
2453
|
+
}),
|
|
2454
|
+
};
|
|
2455
|
+
}
|
|
2456
|
+
|
|
2457
|
+
async openWorkspaceInteractionRevisionStream(
|
|
2458
|
+
workspaceId: string,
|
|
2459
|
+
options: { after?: number; signal?: AbortSignal } = {},
|
|
2460
|
+
): Promise<ReadableStream<Uint8Array>> {
|
|
2461
|
+
const correlationId = crypto.randomUUID();
|
|
2462
|
+
const response = await this.fetchImpl(
|
|
2463
|
+
this.url(`/v1/workspaces/${workspaceId}/interaction-events/stream`, {
|
|
2464
|
+
after: String(options.after ?? 0),
|
|
2465
|
+
}),
|
|
2466
|
+
{
|
|
2467
|
+
method: "GET",
|
|
2468
|
+
headers: {
|
|
2469
|
+
...this.headers(correlationId),
|
|
2470
|
+
Accept: "text/event-stream",
|
|
2471
|
+
},
|
|
2472
|
+
...(options.signal ? { signal: options.signal } : {}),
|
|
2473
|
+
},
|
|
2474
|
+
);
|
|
2475
|
+
assertApiContractResponse(response);
|
|
2476
|
+
if (!response.ok) {
|
|
2477
|
+
throw await apiErrorFromResponse(response, {
|
|
2478
|
+
method: "GET",
|
|
2479
|
+
correlationId,
|
|
2480
|
+
});
|
|
2481
|
+
}
|
|
2482
|
+
if (!response.body) {
|
|
2483
|
+
throw new OpenGeniApiError(response.status, "SSE response did not include a readable body");
|
|
2484
|
+
}
|
|
2485
|
+
return response.body;
|
|
2486
|
+
}
|
|
2487
|
+
|
|
2488
|
+
async listNetworkRoutes(
|
|
2489
|
+
workspaceId: string,
|
|
2490
|
+
options: NetworkRouteListOptions = {},
|
|
2491
|
+
): Promise<NetworkRouteListResponse> {
|
|
2492
|
+
return await this.requestJson<NetworkRouteListResponse>(
|
|
2493
|
+
"GET",
|
|
2494
|
+
`/v1/workspaces/${workspaceId}/network-routes`,
|
|
2495
|
+
undefined,
|
|
2496
|
+
options.includeArchived ? { includeArchived: "true" } : {},
|
|
2497
|
+
options,
|
|
2498
|
+
);
|
|
2499
|
+
}
|
|
2500
|
+
|
|
2501
|
+
async getNetworkRoute(
|
|
2502
|
+
workspaceId: string,
|
|
2503
|
+
networkRouteId: string,
|
|
2504
|
+
options: OpenGeniRequestOptions = {},
|
|
2505
|
+
): Promise<NetworkRoute> {
|
|
2506
|
+
return await this.requestJson<NetworkRoute>(
|
|
2507
|
+
"GET",
|
|
2508
|
+
`/v1/workspaces/${workspaceId}/network-routes/${encodeURIComponent(networkRouteId)}`,
|
|
2509
|
+
undefined,
|
|
2510
|
+
{},
|
|
2511
|
+
options,
|
|
2512
|
+
);
|
|
2513
|
+
}
|
|
2514
|
+
|
|
2515
|
+
async createNetworkRoute(
|
|
2516
|
+
workspaceId: string,
|
|
2517
|
+
request: CreateNetworkRouteRequest,
|
|
2518
|
+
options: OpenGeniRequestOptions = {},
|
|
2519
|
+
): Promise<NetworkRouteMutationResponse> {
|
|
2520
|
+
return await this.requestJson<NetworkRouteMutationResponse>(
|
|
2521
|
+
"POST",
|
|
2522
|
+
`/v1/workspaces/${workspaceId}/network-routes`,
|
|
2523
|
+
request,
|
|
2524
|
+
{},
|
|
2525
|
+
options,
|
|
2526
|
+
);
|
|
2527
|
+
}
|
|
2528
|
+
|
|
2529
|
+
async updateNetworkRoute(
|
|
2530
|
+
workspaceId: string,
|
|
2531
|
+
networkRouteId: string,
|
|
2532
|
+
request: UpdateNetworkRouteRequest,
|
|
2533
|
+
options: OpenGeniRequestOptions = {},
|
|
2534
|
+
): Promise<NetworkRouteMutationResponse> {
|
|
2535
|
+
return await this.requestJson<NetworkRouteMutationResponse>(
|
|
2536
|
+
"PATCH",
|
|
2537
|
+
`/v1/workspaces/${workspaceId}/network-routes/${encodeURIComponent(networkRouteId)}`,
|
|
2538
|
+
request,
|
|
2539
|
+
{},
|
|
2540
|
+
options,
|
|
2541
|
+
);
|
|
2542
|
+
}
|
|
2543
|
+
|
|
2544
|
+
async listSiteAuthConnections(
|
|
2545
|
+
workspaceId: string,
|
|
2546
|
+
options: SiteAuthConnectionListOptions = {},
|
|
2547
|
+
): Promise<SiteAuthConnectionListResponse> {
|
|
2548
|
+
return await this.requestJson<SiteAuthConnectionListResponse>(
|
|
2549
|
+
"GET",
|
|
2550
|
+
`/v1/workspaces/${workspaceId}/site-auth-connections`,
|
|
2551
|
+
undefined,
|
|
2552
|
+
options.includeArchived ? { includeArchived: "true" } : {},
|
|
2553
|
+
options,
|
|
2554
|
+
);
|
|
2555
|
+
}
|
|
2556
|
+
|
|
2557
|
+
async getSiteAuthConnection(
|
|
2558
|
+
workspaceId: string,
|
|
2559
|
+
siteAuthConnectionId: string,
|
|
2560
|
+
options: OpenGeniRequestOptions = {},
|
|
2561
|
+
): Promise<SiteAuthConnection> {
|
|
2562
|
+
return await this.requestJson<SiteAuthConnection>(
|
|
2563
|
+
"GET",
|
|
2564
|
+
`/v1/workspaces/${workspaceId}/site-auth-connections/${encodeURIComponent(siteAuthConnectionId)}`,
|
|
2565
|
+
undefined,
|
|
2566
|
+
{},
|
|
2567
|
+
options,
|
|
2568
|
+
);
|
|
2569
|
+
}
|
|
2570
|
+
|
|
2571
|
+
async createSiteAuthConnection(
|
|
2572
|
+
workspaceId: string,
|
|
2573
|
+
request: CreateSiteAuthConnectionRequest,
|
|
2574
|
+
options: OpenGeniRequestOptions = {},
|
|
2575
|
+
): Promise<SiteAuthConnectionMutationResponse> {
|
|
2576
|
+
return await this.requestJson<SiteAuthConnectionMutationResponse>(
|
|
2577
|
+
"POST",
|
|
2578
|
+
`/v1/workspaces/${workspaceId}/site-auth-connections`,
|
|
2579
|
+
request,
|
|
2580
|
+
{},
|
|
2581
|
+
options,
|
|
2582
|
+
);
|
|
2583
|
+
}
|
|
2584
|
+
|
|
2585
|
+
async updateSiteAuthConnection(
|
|
2586
|
+
workspaceId: string,
|
|
2587
|
+
siteAuthConnectionId: string,
|
|
2588
|
+
request: UpdateSiteAuthConnectionRequest,
|
|
2589
|
+
options: OpenGeniRequestOptions = {},
|
|
2590
|
+
): Promise<SiteAuthConnectionMutationResponse> {
|
|
2591
|
+
return await this.requestJson<SiteAuthConnectionMutationResponse>(
|
|
2592
|
+
"PATCH",
|
|
2593
|
+
`/v1/workspaces/${workspaceId}/site-auth-connections/${encodeURIComponent(siteAuthConnectionId)}`,
|
|
2594
|
+
request,
|
|
2595
|
+
{},
|
|
2596
|
+
options,
|
|
2597
|
+
);
|
|
2598
|
+
}
|
|
2599
|
+
|
|
2600
|
+
async listAuthRuns(
|
|
2601
|
+
workspaceId: string,
|
|
2602
|
+
options: AuthRunListOptions = {},
|
|
2603
|
+
): Promise<AuthRunListResponse> {
|
|
2604
|
+
return await this.requestJson<AuthRunListResponse>(
|
|
2605
|
+
"GET",
|
|
2606
|
+
`/v1/workspaces/${workspaceId}/auth-runs`,
|
|
2607
|
+
undefined,
|
|
2608
|
+
{
|
|
2609
|
+
...(options.browserSessionId ? { browserSessionId: options.browserSessionId } : {}),
|
|
2610
|
+
...(options.siteAuthConnectionId
|
|
2611
|
+
? { siteAuthConnectionId: options.siteAuthConnectionId }
|
|
2612
|
+
: {}),
|
|
2613
|
+
...(options.includeSettled ? { includeSettled: "true" } : {}),
|
|
2614
|
+
},
|
|
2615
|
+
options,
|
|
2616
|
+
);
|
|
2617
|
+
}
|
|
2618
|
+
|
|
2619
|
+
async getAuthRun(
|
|
2620
|
+
workspaceId: string,
|
|
2621
|
+
authRunId: string,
|
|
2622
|
+
options: OpenGeniRequestOptions = {},
|
|
2623
|
+
): Promise<AuthRun> {
|
|
2624
|
+
return await this.requestJson<AuthRun>(
|
|
2625
|
+
"GET",
|
|
2626
|
+
`/v1/workspaces/${workspaceId}/auth-runs/${encodeURIComponent(authRunId)}`,
|
|
2627
|
+
undefined,
|
|
2628
|
+
{},
|
|
2629
|
+
options,
|
|
2630
|
+
);
|
|
2631
|
+
}
|
|
2632
|
+
|
|
2633
|
+
async startBrowserAuthRun(
|
|
2634
|
+
workspaceId: string,
|
|
2635
|
+
browserSessionId: string,
|
|
2636
|
+
request: StartAuthRunRequest,
|
|
2637
|
+
options: OpenGeniRequestOptions = {},
|
|
2638
|
+
): Promise<AuthRunMutationResponse> {
|
|
2639
|
+
return await this.requestJson<AuthRunMutationResponse>(
|
|
2640
|
+
"POST",
|
|
2641
|
+
`/v1/workspaces/${workspaceId}/browser-sessions/${encodeURIComponent(browserSessionId)}/auth-runs`,
|
|
2642
|
+
request,
|
|
2643
|
+
{},
|
|
2644
|
+
options,
|
|
2645
|
+
);
|
|
2646
|
+
}
|
|
2647
|
+
|
|
2648
|
+
async reportBrowserAuthRun(
|
|
2649
|
+
workspaceId: string,
|
|
2650
|
+
browserSessionId: string,
|
|
2651
|
+
authRunId: string,
|
|
2652
|
+
request: ReportAuthRunRequest,
|
|
2653
|
+
options: OpenGeniRequestOptions = {},
|
|
2654
|
+
): Promise<AuthRunMutationResponse> {
|
|
2655
|
+
return await this.requestJson<AuthRunMutationResponse>(
|
|
2656
|
+
"POST",
|
|
2657
|
+
`/v1/workspaces/${workspaceId}/browser-sessions/${encodeURIComponent(browserSessionId)}/auth-runs/${encodeURIComponent(authRunId)}/report`,
|
|
2658
|
+
request,
|
|
2659
|
+
{},
|
|
2660
|
+
options,
|
|
2661
|
+
);
|
|
2662
|
+
}
|
|
2663
|
+
|
|
2664
|
+
async protectedBrowserAuthFill(
|
|
2665
|
+
workspaceId: string,
|
|
2666
|
+
browserSessionId: string,
|
|
2667
|
+
authRunId: string,
|
|
2668
|
+
request: ProtectedAuthFillRequest,
|
|
2669
|
+
options: OpenGeniRequestOptions = {},
|
|
2670
|
+
): Promise<ProtectedAuthFillResponse> {
|
|
2671
|
+
return await this.requestJson<ProtectedAuthFillResponse>(
|
|
2672
|
+
"POST",
|
|
2673
|
+
`/v1/workspaces/${workspaceId}/browser-sessions/${encodeURIComponent(browserSessionId)}/auth-runs/${encodeURIComponent(authRunId)}/protected-fill`,
|
|
2674
|
+
request,
|
|
2675
|
+
{},
|
|
2676
|
+
options,
|
|
2677
|
+
);
|
|
2678
|
+
}
|
|
2679
|
+
|
|
2680
|
+
async advanceExternalBrowserAuthRun(
|
|
2681
|
+
workspaceId: string,
|
|
2682
|
+
browserSessionId: string,
|
|
2683
|
+
authRunId: string,
|
|
2684
|
+
request: ExternalAuthRunRequest,
|
|
2685
|
+
options: OpenGeniRequestOptions = {},
|
|
2686
|
+
): Promise<ExternalAuthRunResponse> {
|
|
2687
|
+
return await this.requestJson<ExternalAuthRunResponse>(
|
|
2688
|
+
"POST",
|
|
2689
|
+
`/v1/workspaces/${workspaceId}/browser-sessions/${encodeURIComponent(browserSessionId)}/auth-runs/${encodeURIComponent(authRunId)}/external-auth`,
|
|
2690
|
+
request,
|
|
2691
|
+
{},
|
|
2692
|
+
options,
|
|
2693
|
+
);
|
|
2694
|
+
}
|
|
2695
|
+
|
|
2696
|
+
async openExternalBrowserAuthFlow(
|
|
2697
|
+
workspaceId: string,
|
|
2698
|
+
browserSessionId: string,
|
|
2699
|
+
authRunId: string,
|
|
2700
|
+
request: ExternalAuthInteractiveRequest,
|
|
2701
|
+
options: OpenGeniRequestOptions = {},
|
|
2702
|
+
): Promise<ExternalAuthInteractiveResponse> {
|
|
2703
|
+
return await this.requestJson<ExternalAuthInteractiveResponse>(
|
|
2704
|
+
"POST",
|
|
2705
|
+
`/v1/workspaces/${workspaceId}/browser-sessions/${encodeURIComponent(browserSessionId)}/auth-runs/${encodeURIComponent(authRunId)}/external-auth/interactive`,
|
|
2706
|
+
request,
|
|
2707
|
+
{},
|
|
2708
|
+
options,
|
|
2709
|
+
);
|
|
2710
|
+
}
|
|
2711
|
+
|
|
2712
|
+
async verifyBrowserAuthRun(
|
|
2713
|
+
workspaceId: string,
|
|
2714
|
+
browserSessionId: string,
|
|
2715
|
+
authRunId: string,
|
|
2716
|
+
request: VerifyAuthRunRequest,
|
|
2717
|
+
options: OpenGeniRequestOptions = {},
|
|
2718
|
+
): Promise<AuthRunMutationResponse> {
|
|
2719
|
+
return await this.requestJson<AuthRunMutationResponse>(
|
|
2720
|
+
"POST",
|
|
2721
|
+
`/v1/workspaces/${workspaceId}/browser-sessions/${encodeURIComponent(browserSessionId)}/auth-runs/${encodeURIComponent(authRunId)}/verify`,
|
|
2722
|
+
request,
|
|
2723
|
+
{},
|
|
2724
|
+
options,
|
|
2725
|
+
);
|
|
2726
|
+
}
|
|
2727
|
+
|
|
2728
|
+
async listInteractionInterventions(
|
|
2729
|
+
workspaceId: string,
|
|
2730
|
+
options: InteractionInterventionListOptions = {},
|
|
2731
|
+
): Promise<InteractionInterventionListResponse> {
|
|
2732
|
+
return await this.requestJson<InteractionInterventionListResponse>(
|
|
2733
|
+
"GET",
|
|
2734
|
+
`/v1/workspaces/${workspaceId}/interaction-interventions`,
|
|
2735
|
+
undefined,
|
|
2736
|
+
{
|
|
2737
|
+
...(options.resourceKind ? { resourceKind: options.resourceKind } : {}),
|
|
2738
|
+
...(options.resourceId ? { resourceId: options.resourceId } : {}),
|
|
2739
|
+
...(options.includeSettled ? { includeSettled: "true" } : {}),
|
|
2740
|
+
},
|
|
2741
|
+
options,
|
|
2742
|
+
);
|
|
2743
|
+
}
|
|
2744
|
+
|
|
2745
|
+
async getInteractionIntervention(
|
|
2746
|
+
workspaceId: string,
|
|
2747
|
+
interventionId: string,
|
|
2748
|
+
options: OpenGeniRequestOptions = {},
|
|
2749
|
+
): Promise<InteractionIntervention> {
|
|
2750
|
+
return await this.requestJson<InteractionIntervention>(
|
|
2751
|
+
"GET",
|
|
2752
|
+
`/v1/workspaces/${workspaceId}/interaction-interventions/${encodeURIComponent(interventionId)}`,
|
|
2753
|
+
undefined,
|
|
2754
|
+
{},
|
|
2755
|
+
options,
|
|
2756
|
+
);
|
|
2757
|
+
}
|
|
2758
|
+
|
|
2759
|
+
async createInteractionIntervention(
|
|
2760
|
+
workspaceId: string,
|
|
2761
|
+
request: CreateInteractionInterventionRequest,
|
|
2762
|
+
options: OpenGeniRequestOptions = {},
|
|
2763
|
+
): Promise<InteractionInterventionMutationResponse> {
|
|
2764
|
+
return await this.requestJson<InteractionInterventionMutationResponse>(
|
|
2765
|
+
"POST",
|
|
2766
|
+
`/v1/workspaces/${workspaceId}/interaction-interventions`,
|
|
2767
|
+
request,
|
|
2768
|
+
{},
|
|
2769
|
+
options,
|
|
2770
|
+
);
|
|
2771
|
+
}
|
|
2772
|
+
|
|
2773
|
+
async resolveInteractionIntervention(
|
|
2774
|
+
workspaceId: string,
|
|
2775
|
+
interventionId: string,
|
|
2776
|
+
request: ResolveInteractionInterventionRequest,
|
|
2777
|
+
options: OpenGeniRequestOptions = {},
|
|
2778
|
+
): Promise<InteractionInterventionMutationResponse> {
|
|
2779
|
+
return await this.requestJson<InteractionInterventionMutationResponse>(
|
|
2780
|
+
"POST",
|
|
2781
|
+
`/v1/workspaces/${workspaceId}/interaction-interventions/${encodeURIComponent(interventionId)}/resolve`,
|
|
2782
|
+
request,
|
|
2783
|
+
{},
|
|
2784
|
+
options,
|
|
2785
|
+
);
|
|
2786
|
+
}
|
|
2787
|
+
|
|
2277
2788
|
async listAttachedBrowsers(
|
|
2278
2789
|
workspaceId: string,
|
|
2279
2790
|
options: AttachedBrowserDeviceListOptions = {},
|
|
@@ -2342,6 +2853,21 @@ export class OpenGeniClient {
|
|
|
2342
2853
|
);
|
|
2343
2854
|
}
|
|
2344
2855
|
|
|
2856
|
+
async updateBrowserIdentity(
|
|
2857
|
+
workspaceId: string,
|
|
2858
|
+
identityId: string,
|
|
2859
|
+
request: UpdateBrowserIdentityRequest,
|
|
2860
|
+
options: OpenGeniRequestOptions = {},
|
|
2861
|
+
): Promise<BrowserIdentityMutationResponse> {
|
|
2862
|
+
return await this.requestJson<BrowserIdentityMutationResponse>(
|
|
2863
|
+
"PATCH",
|
|
2864
|
+
`/v1/workspaces/${workspaceId}/browser-identities/${encodeURIComponent(identityId)}`,
|
|
2865
|
+
request,
|
|
2866
|
+
{},
|
|
2867
|
+
options,
|
|
2868
|
+
);
|
|
2869
|
+
}
|
|
2870
|
+
|
|
2345
2871
|
async listBrowserRevisions(
|
|
2346
2872
|
workspaceId: string,
|
|
2347
2873
|
identityId: string,
|
|
@@ -2385,6 +2911,65 @@ export class OpenGeniClient {
|
|
|
2385
2911
|
);
|
|
2386
2912
|
}
|
|
2387
2913
|
|
|
2914
|
+
async readBrowserClipboard(
|
|
2915
|
+
workspaceId: string,
|
|
2916
|
+
browserSessionId: string,
|
|
2917
|
+
options: OpenGeniRequestOptions = {},
|
|
2918
|
+
): Promise<BrowserClipboard> {
|
|
2919
|
+
return await this.requestJson<BrowserClipboard>(
|
|
2920
|
+
"GET",
|
|
2921
|
+
`/v1/workspaces/${workspaceId}/browser-sessions/${encodeURIComponent(browserSessionId)}/clipboard`,
|
|
2922
|
+
undefined,
|
|
2923
|
+
{},
|
|
2924
|
+
options,
|
|
2925
|
+
);
|
|
2926
|
+
}
|
|
2927
|
+
|
|
2928
|
+
async listBrowserDownloads(
|
|
2929
|
+
workspaceId: string,
|
|
2930
|
+
browserSessionId: string,
|
|
2931
|
+
options: OpenGeniRequestOptions = {},
|
|
2932
|
+
): Promise<BrowserDownloadListResponse> {
|
|
2933
|
+
return await this.requestJson<BrowserDownloadListResponse>(
|
|
2934
|
+
"GET",
|
|
2935
|
+
`/v1/workspaces/${workspaceId}/browser-sessions/${encodeURIComponent(browserSessionId)}/downloads`,
|
|
2936
|
+
undefined,
|
|
2937
|
+
{},
|
|
2938
|
+
options,
|
|
2939
|
+
);
|
|
2940
|
+
}
|
|
2941
|
+
|
|
2942
|
+
async getBrowserDownload(
|
|
2943
|
+
workspaceId: string,
|
|
2944
|
+
browserSessionId: string,
|
|
2945
|
+
downloadId: string,
|
|
2946
|
+
options: OpenGeniRequestOptions = {},
|
|
2947
|
+
): Promise<BrowserDownload> {
|
|
2948
|
+
return await this.requestJson<BrowserDownload>(
|
|
2949
|
+
"GET",
|
|
2950
|
+
`/v1/workspaces/${workspaceId}/browser-sessions/${encodeURIComponent(browserSessionId)}/downloads/${encodeURIComponent(downloadId)}`,
|
|
2951
|
+
undefined,
|
|
2952
|
+
{},
|
|
2953
|
+
options,
|
|
2954
|
+
);
|
|
2955
|
+
}
|
|
2956
|
+
|
|
2957
|
+
async saveBrowserDownload(
|
|
2958
|
+
workspaceId: string,
|
|
2959
|
+
browserSessionId: string,
|
|
2960
|
+
downloadId: string,
|
|
2961
|
+
request: BrowserDownloadSaveRequest,
|
|
2962
|
+
options: OpenGeniRequestOptions = {},
|
|
2963
|
+
): Promise<BrowserDownloadSaveResponse> {
|
|
2964
|
+
return await this.requestJson<BrowserDownloadSaveResponse>(
|
|
2965
|
+
"POST",
|
|
2966
|
+
`/v1/workspaces/${workspaceId}/browser-sessions/${encodeURIComponent(browserSessionId)}/downloads/${encodeURIComponent(downloadId)}/save`,
|
|
2967
|
+
request,
|
|
2968
|
+
{},
|
|
2969
|
+
options,
|
|
2970
|
+
);
|
|
2971
|
+
}
|
|
2972
|
+
|
|
2388
2973
|
async createBrowserSession(
|
|
2389
2974
|
workspaceId: string,
|
|
2390
2975
|
request: CreateBrowserSessionRequest,
|
|
@@ -2418,8 +3003,8 @@ export class OpenGeniClient {
|
|
|
2418
3003
|
browserSessionId: string,
|
|
2419
3004
|
request: BrowserOpenTargetRequest = {},
|
|
2420
3005
|
options: OpenGeniRequestOptions = {},
|
|
2421
|
-
): Promise<
|
|
2422
|
-
return await this.requestJson<
|
|
3006
|
+
): Promise<BrowserObservation> {
|
|
3007
|
+
return await this.requestJson<BrowserObservation>(
|
|
2423
3008
|
"POST",
|
|
2424
3009
|
`/v1/workspaces/${workspaceId}/browser-sessions/${encodeURIComponent(browserSessionId)}/targets`,
|
|
2425
3010
|
request,
|
|
@@ -2433,8 +3018,8 @@ export class OpenGeniClient {
|
|
|
2433
3018
|
browserSessionId: string,
|
|
2434
3019
|
targetId: string,
|
|
2435
3020
|
options: OpenGeniRequestOptions = {},
|
|
2436
|
-
): Promise<
|
|
2437
|
-
return await this.requestJson<
|
|
3021
|
+
): Promise<BrowserObservation> {
|
|
3022
|
+
return await this.requestJson<BrowserObservation>(
|
|
2438
3023
|
"POST",
|
|
2439
3024
|
`/v1/workspaces/${workspaceId}/browser-sessions/${encodeURIComponent(browserSessionId)}/targets/${encodeURIComponent(targetId)}/select`,
|
|
2440
3025
|
{},
|
|
@@ -2640,6 +3225,20 @@ export class OpenGeniClient {
|
|
|
2640
3225
|
);
|
|
2641
3226
|
}
|
|
2642
3227
|
|
|
3228
|
+
async readComputerClipboard(
|
|
3229
|
+
workspaceId: string,
|
|
3230
|
+
computerSessionId: string,
|
|
3231
|
+
options: OpenGeniRequestOptions = {},
|
|
3232
|
+
): Promise<ComputerClipboard> {
|
|
3233
|
+
return await this.requestJson<ComputerClipboard>(
|
|
3234
|
+
"GET",
|
|
3235
|
+
`/v1/workspaces/${workspaceId}/computer-sessions/${encodeURIComponent(computerSessionId)}/clipboard`,
|
|
3236
|
+
undefined,
|
|
3237
|
+
{},
|
|
3238
|
+
options,
|
|
3239
|
+
);
|
|
3240
|
+
}
|
|
3241
|
+
|
|
2643
3242
|
async createComputerSession(
|
|
2644
3243
|
workspaceId: string,
|
|
2645
3244
|
request: CreateComputerSessionRequest,
|
|
@@ -2800,6 +3399,14 @@ export class OpenGeniClient {
|
|
|
2800
3399
|
return await this.requestJson<AccessContext>("GET", "/v1/access/me");
|
|
2801
3400
|
}
|
|
2802
3401
|
|
|
3402
|
+
/** Active organization memberships proven by the current managed-human session. */
|
|
3403
|
+
async listOrganizationMemberships(): Promise<ListManagedOrganizationMembershipsResponse> {
|
|
3404
|
+
return await this.requestJson<ListManagedOrganizationMembershipsResponse>(
|
|
3405
|
+
"GET",
|
|
3406
|
+
"/v1/organization-memberships",
|
|
3407
|
+
);
|
|
3408
|
+
}
|
|
3409
|
+
|
|
2803
3410
|
async listWorkspaces(): Promise<Workspace[]> {
|
|
2804
3411
|
return await this.requestJson<Workspace[]>("GET", "/v1/workspaces");
|
|
2805
3412
|
}
|
|
@@ -3456,6 +4063,55 @@ export class OpenGeniClient {
|
|
|
3456
4063
|
);
|
|
3457
4064
|
}
|
|
3458
4065
|
|
|
4066
|
+
// --- Channels --------------------------------------------------------------
|
|
4067
|
+
// Workspace-shared rail organization for root sessions. sessions:read gates
|
|
4068
|
+
// list; sessions:create gates create / update / delete; sessions:control
|
|
4069
|
+
// gates re-filing a session.
|
|
4070
|
+
|
|
4071
|
+
async listChannels(workspaceId: string): Promise<Channel[]> {
|
|
4072
|
+
return await this.requestJson<Channel[]>("GET", `/v1/workspaces/${workspaceId}/channels`);
|
|
4073
|
+
}
|
|
4074
|
+
|
|
4075
|
+
async createChannel(workspaceId: string, request: CreateChannelRequest): Promise<Channel> {
|
|
4076
|
+
return await this.requestJson<Channel>(
|
|
4077
|
+
"POST",
|
|
4078
|
+
`/v1/workspaces/${workspaceId}/channels`,
|
|
4079
|
+
request,
|
|
4080
|
+
);
|
|
4081
|
+
}
|
|
4082
|
+
|
|
4083
|
+
async updateChannel(
|
|
4084
|
+
workspaceId: string,
|
|
4085
|
+
channelId: string,
|
|
4086
|
+
request: UpdateChannelRequest,
|
|
4087
|
+
): Promise<Channel> {
|
|
4088
|
+
return await this.requestJson<Channel>(
|
|
4089
|
+
"PATCH",
|
|
4090
|
+
`/v1/workspaces/${workspaceId}/channels/${channelId}`,
|
|
4091
|
+
request,
|
|
4092
|
+
);
|
|
4093
|
+
}
|
|
4094
|
+
|
|
4095
|
+
async deleteChannel(workspaceId: string, channelId: string): Promise<void> {
|
|
4096
|
+
await this.requestJson<unknown>(
|
|
4097
|
+
"DELETE",
|
|
4098
|
+
`/v1/workspaces/${workspaceId}/channels/${channelId}`,
|
|
4099
|
+
);
|
|
4100
|
+
}
|
|
4101
|
+
|
|
4102
|
+
/** Re-file a session into a channel (null = back to the unfiled inbox). */
|
|
4103
|
+
async updateSessionChannel(
|
|
4104
|
+
workspaceId: string,
|
|
4105
|
+
sessionId: string,
|
|
4106
|
+
request: UpdateSessionChannelRequest,
|
|
4107
|
+
): Promise<Session> {
|
|
4108
|
+
return await this.requestJson<Session>(
|
|
4109
|
+
"PUT",
|
|
4110
|
+
`/v1/workspaces/${workspaceId}/sessions/${sessionId}/channel`,
|
|
4111
|
+
request,
|
|
4112
|
+
);
|
|
4113
|
+
}
|
|
4114
|
+
|
|
3459
4115
|
// --- Rigs ------------------------------------------------------------------
|
|
3460
4116
|
// Workspace-scoped, versioned sandbox machine definitions. rigs:use gates read
|
|
3461
4117
|
// + proposeRigChange; rigs:manage gates create / update / delete / activate.
|
|
@@ -4413,11 +5069,13 @@ export class OpenGeniClient {
|
|
|
4413
5069
|
);
|
|
4414
5070
|
}
|
|
4415
5071
|
|
|
4416
|
-
/** List curated provider
|
|
4417
|
-
async
|
|
4418
|
-
|
|
5072
|
+
/** List curated provider definitions without exposing deployment OAuth credentials. */
|
|
5073
|
+
async listIntegrationDefinitions(
|
|
5074
|
+
workspaceId: string,
|
|
5075
|
+
): Promise<ListIntegrationDefinitionsResponse> {
|
|
5076
|
+
return await this.requestJson<ListIntegrationDefinitionsResponse>(
|
|
4419
5077
|
"GET",
|
|
4420
|
-
`/v1/workspaces/${workspaceId}/integrations/
|
|
5078
|
+
`/v1/workspaces/${workspaceId}/integrations/definitions`,
|
|
4421
5079
|
);
|
|
4422
5080
|
}
|
|
4423
5081
|
|
|
@@ -4433,7 +5091,7 @@ export class OpenGeniClient {
|
|
|
4433
5091
|
);
|
|
4434
5092
|
}
|
|
4435
5093
|
|
|
4436
|
-
/** Start a signed PKCE OAuth flow for a built-in Google or Microsoft
|
|
5094
|
+
/** Start a signed PKCE OAuth flow for a built-in Google or Microsoft definition. */
|
|
4437
5095
|
async startApiIntegrationOAuth(
|
|
4438
5096
|
workspaceId: string,
|
|
4439
5097
|
request: ApiIntegrationOAuthStartRequest,
|
|
@@ -4483,39 +5141,42 @@ export class OpenGeniClient {
|
|
|
4483
5141
|
}
|
|
4484
5142
|
|
|
4485
5143
|
/** List immutable provider facets and their exact per-account bindings. */
|
|
4486
|
-
async
|
|
5144
|
+
async listIntegrationFacets(
|
|
4487
5145
|
workspaceId: string,
|
|
4488
5146
|
capabilityId: string,
|
|
4489
5147
|
instanceKey: string,
|
|
4490
|
-
): Promise<
|
|
4491
|
-
return await this.requestJson<
|
|
5148
|
+
): Promise<IntegrationInstanceFacetsResponse> {
|
|
5149
|
+
return await this.requestJson<IntegrationInstanceFacetsResponse>(
|
|
4492
5150
|
"GET",
|
|
4493
|
-
`/v1/workspaces/${workspaceId}/integrations/${encodeURIComponent(capabilityId)}/instances/${encodeURIComponent(instanceKey)}/
|
|
5151
|
+
`/v1/workspaces/${workspaceId}/integrations/${encodeURIComponent(capabilityId)}/instances/${encodeURIComponent(instanceKey)}/facets`,
|
|
4494
5152
|
);
|
|
4495
5153
|
}
|
|
4496
5154
|
|
|
4497
|
-
/** Configure or OCC-update one adapter-owned
|
|
4498
|
-
async
|
|
5155
|
+
/** Configure or OCC-update one adapter-owned facet on an Integration instance. */
|
|
5156
|
+
async configureIntegrationFacet(
|
|
4499
5157
|
workspaceId: string,
|
|
4500
5158
|
capabilityId: string,
|
|
4501
5159
|
instanceKey: string,
|
|
4502
|
-
|
|
4503
|
-
request:
|
|
4504
|
-
): Promise<
|
|
4505
|
-
return await this.requestJson<
|
|
5160
|
+
facetKey: string,
|
|
5161
|
+
request: UpsertIntegrationFacetRequest,
|
|
5162
|
+
): Promise<IntegrationFacetMutationResult> {
|
|
5163
|
+
return await this.requestJson<IntegrationFacetMutationResult>(
|
|
4506
5164
|
"PUT",
|
|
4507
|
-
`/v1/workspaces/${workspaceId}/integrations/${encodeURIComponent(capabilityId)}/instances/${encodeURIComponent(instanceKey)}/
|
|
5165
|
+
`/v1/workspaces/${workspaceId}/integrations/${encodeURIComponent(capabilityId)}/instances/${encodeURIComponent(instanceKey)}/facets/${encodeURIComponent(facetKey)}`,
|
|
4508
5166
|
request,
|
|
4509
5167
|
);
|
|
4510
5168
|
}
|
|
4511
5169
|
|
|
4512
5170
|
/** Browse source metadata through one exact Google Drive Integration instance. */
|
|
4513
|
-
async
|
|
5171
|
+
async browseGoogleDriveFacetSource(
|
|
4514
5172
|
workspaceId: string,
|
|
4515
5173
|
capabilityId: string,
|
|
4516
5174
|
instanceKey: string,
|
|
4517
|
-
|
|
4518
|
-
options: {
|
|
5175
|
+
facetKey: string,
|
|
5176
|
+
options: {
|
|
5177
|
+
parentId?: string | undefined;
|
|
5178
|
+
pageToken?: string | undefined;
|
|
5179
|
+
} = {},
|
|
4519
5180
|
): Promise<GoogleDriveBrowseResponse> {
|
|
4520
5181
|
const query = new URLSearchParams();
|
|
4521
5182
|
if (options.parentId) query.set("parentId", options.parentId);
|
|
@@ -4523,84 +5184,84 @@ export class OpenGeniClient {
|
|
|
4523
5184
|
const suffix = query.size > 0 ? `?${query}` : "";
|
|
4524
5185
|
return await this.requestJson<GoogleDriveBrowseResponse>(
|
|
4525
5186
|
"GET",
|
|
4526
|
-
`/v1/workspaces/${workspaceId}/integrations/${encodeURIComponent(capabilityId)}/instances/${encodeURIComponent(instanceKey)}/
|
|
5187
|
+
`/v1/workspaces/${workspaceId}/integrations/${encodeURIComponent(capabilityId)}/instances/${encodeURIComponent(instanceKey)}/facets/${encodeURIComponent(facetKey)}/browse${suffix}`,
|
|
4527
5188
|
);
|
|
4528
5189
|
}
|
|
4529
5190
|
|
|
4530
5191
|
/** Verify and bind document sources to one exact Google Drive Integration instance. */
|
|
4531
|
-
async
|
|
5192
|
+
async saveGoogleDriveFacetSource(
|
|
4532
5193
|
workspaceId: string,
|
|
4533
5194
|
capabilityId: string,
|
|
4534
5195
|
instanceKey: string,
|
|
4535
|
-
|
|
5196
|
+
facetKey: string,
|
|
4536
5197
|
request: SaveGoogleDriveIntegrationSourceRequest,
|
|
4537
|
-
): Promise<
|
|
4538
|
-
return await this.requestJson<
|
|
5198
|
+
): Promise<IntegrationFacetMutationResult> {
|
|
5199
|
+
return await this.requestJson<IntegrationFacetMutationResult>(
|
|
4539
5200
|
"PUT",
|
|
4540
|
-
`/v1/workspaces/${workspaceId}/integrations/${encodeURIComponent(capabilityId)}/instances/${encodeURIComponent(instanceKey)}/
|
|
5201
|
+
`/v1/workspaces/${workspaceId}/integrations/${encodeURIComponent(capabilityId)}/instances/${encodeURIComponent(instanceKey)}/facets/${encodeURIComponent(facetKey)}/source`,
|
|
4541
5202
|
request,
|
|
4542
5203
|
);
|
|
4543
5204
|
}
|
|
4544
5205
|
|
|
4545
|
-
async
|
|
5206
|
+
async pauseIntegrationFacet(
|
|
4546
5207
|
workspaceId: string,
|
|
4547
5208
|
capabilityId: string,
|
|
4548
5209
|
instanceKey: string,
|
|
4549
|
-
|
|
4550
|
-
request:
|
|
4551
|
-
): Promise<
|
|
4552
|
-
return await this.
|
|
5210
|
+
facetKey: string,
|
|
5211
|
+
request: MutateIntegrationFacetRequest,
|
|
5212
|
+
): Promise<IntegrationFacetMutationResult> {
|
|
5213
|
+
return await this.mutateIntegrationFacetLifecycle(
|
|
4553
5214
|
workspaceId,
|
|
4554
5215
|
capabilityId,
|
|
4555
5216
|
instanceKey,
|
|
4556
|
-
|
|
5217
|
+
facetKey,
|
|
4557
5218
|
"pause",
|
|
4558
5219
|
request,
|
|
4559
5220
|
);
|
|
4560
5221
|
}
|
|
4561
5222
|
|
|
4562
|
-
async
|
|
5223
|
+
async resumeIntegrationFacet(
|
|
4563
5224
|
workspaceId: string,
|
|
4564
5225
|
capabilityId: string,
|
|
4565
5226
|
instanceKey: string,
|
|
4566
|
-
|
|
4567
|
-
request:
|
|
4568
|
-
): Promise<
|
|
4569
|
-
return await this.
|
|
5227
|
+
facetKey: string,
|
|
5228
|
+
request: MutateIntegrationFacetRequest,
|
|
5229
|
+
): Promise<IntegrationFacetMutationResult> {
|
|
5230
|
+
return await this.mutateIntegrationFacetLifecycle(
|
|
4570
5231
|
workspaceId,
|
|
4571
5232
|
capabilityId,
|
|
4572
5233
|
instanceKey,
|
|
4573
|
-
|
|
5234
|
+
facetKey,
|
|
4574
5235
|
"resume",
|
|
4575
5236
|
request,
|
|
4576
5237
|
);
|
|
4577
5238
|
}
|
|
4578
5239
|
|
|
4579
|
-
async
|
|
5240
|
+
async removeIntegrationFacet(
|
|
4580
5241
|
workspaceId: string,
|
|
4581
5242
|
capabilityId: string,
|
|
4582
5243
|
instanceKey: string,
|
|
4583
|
-
|
|
4584
|
-
request:
|
|
4585
|
-
): Promise<
|
|
4586
|
-
return await this.requestJson<
|
|
5244
|
+
facetKey: string,
|
|
5245
|
+
request: MutateIntegrationFacetRequest,
|
|
5246
|
+
): Promise<IntegrationFacetRemovalResult> {
|
|
5247
|
+
return await this.requestJson<IntegrationFacetRemovalResult>(
|
|
4587
5248
|
"DELETE",
|
|
4588
|
-
`/v1/workspaces/${workspaceId}/integrations/${encodeURIComponent(capabilityId)}/instances/${encodeURIComponent(instanceKey)}/
|
|
5249
|
+
`/v1/workspaces/${workspaceId}/integrations/${encodeURIComponent(capabilityId)}/instances/${encodeURIComponent(instanceKey)}/facets/${encodeURIComponent(facetKey)}`,
|
|
4589
5250
|
request,
|
|
4590
5251
|
);
|
|
4591
5252
|
}
|
|
4592
5253
|
|
|
4593
|
-
private async
|
|
5254
|
+
private async mutateIntegrationFacetLifecycle(
|
|
4594
5255
|
workspaceId: string,
|
|
4595
5256
|
capabilityId: string,
|
|
4596
5257
|
instanceKey: string,
|
|
4597
|
-
|
|
5258
|
+
facetKey: string,
|
|
4598
5259
|
action: "pause" | "resume",
|
|
4599
|
-
request:
|
|
4600
|
-
): Promise<
|
|
4601
|
-
return await this.requestJson<
|
|
5260
|
+
request: MutateIntegrationFacetRequest,
|
|
5261
|
+
): Promise<IntegrationFacetMutationResult> {
|
|
5262
|
+
return await this.requestJson<IntegrationFacetMutationResult>(
|
|
4602
5263
|
"POST",
|
|
4603
|
-
`/v1/workspaces/${workspaceId}/integrations/${encodeURIComponent(capabilityId)}/instances/${encodeURIComponent(instanceKey)}/
|
|
5264
|
+
`/v1/workspaces/${workspaceId}/integrations/${encodeURIComponent(capabilityId)}/instances/${encodeURIComponent(instanceKey)}/facets/${encodeURIComponent(facetKey)}/${action}`,
|
|
4604
5265
|
request,
|
|
4605
5266
|
);
|
|
4606
5267
|
}
|
|
@@ -4674,6 +5335,27 @@ export class OpenGeniClient {
|
|
|
4674
5335
|
);
|
|
4675
5336
|
}
|
|
4676
5337
|
|
|
5338
|
+
/** List Skills from the authoritative Plugin/Skill-Facet installation ledger. */
|
|
5339
|
+
async listInstalledSkills(workspaceId: string): Promise<ListInstalledSkillsResponse> {
|
|
5340
|
+
return await this.requestJson<ListInstalledSkillsResponse>(
|
|
5341
|
+
"GET",
|
|
5342
|
+
`/v1/workspaces/${workspaceId}/skills`,
|
|
5343
|
+
);
|
|
5344
|
+
}
|
|
5345
|
+
|
|
5346
|
+
/** Install one exact reviewed curated-library Skill through the Skill domain. */
|
|
5347
|
+
async installLibrarySkill(
|
|
5348
|
+
workspaceId: string,
|
|
5349
|
+
libraryId: string,
|
|
5350
|
+
request: InstallLibrarySkillRequest,
|
|
5351
|
+
): Promise<InstalledSkill> {
|
|
5352
|
+
return await this.requestJson<InstalledSkill>(
|
|
5353
|
+
"POST",
|
|
5354
|
+
`/v1/workspaces/${workspaceId}/skills/library/${encodeURIComponent(libraryId)}/install`,
|
|
5355
|
+
request,
|
|
5356
|
+
);
|
|
5357
|
+
}
|
|
5358
|
+
|
|
4677
5359
|
async previewSkillUninstall(
|
|
4678
5360
|
workspaceId: string,
|
|
4679
5361
|
capabilityId: string,
|
|
@@ -4728,6 +5410,34 @@ export class OpenGeniClient {
|
|
|
4728
5410
|
return response.connection;
|
|
4729
5411
|
}
|
|
4730
5412
|
|
|
5413
|
+
/**
|
|
5414
|
+
* Verify a pasted Fiken personal API token and store it as the
|
|
5415
|
+
* workspace-shared Fiken connection (or rewrite an existing one in place).
|
|
5416
|
+
*/
|
|
5417
|
+
async installFikenConnection(
|
|
5418
|
+
workspaceId: string,
|
|
5419
|
+
request: FikenInstallRequest,
|
|
5420
|
+
): Promise<ConnectionMetadata> {
|
|
5421
|
+
const response = await this.requestJson<ConnectionResponse>(
|
|
5422
|
+
"POST",
|
|
5423
|
+
`/v1/workspaces/${workspaceId}/connections/fiken/install`,
|
|
5424
|
+
request,
|
|
5425
|
+
);
|
|
5426
|
+
return response.connection;
|
|
5427
|
+
}
|
|
5428
|
+
|
|
5429
|
+
/** Start the Fiken OAuth flow for the workspace-shared Fiken connection. */
|
|
5430
|
+
async startFikenOAuth(
|
|
5431
|
+
workspaceId: string,
|
|
5432
|
+
request: FikenOAuthStartRequest = {},
|
|
5433
|
+
): Promise<FikenOAuthStartResponse> {
|
|
5434
|
+
return await this.requestJson<FikenOAuthStartResponse>(
|
|
5435
|
+
"POST",
|
|
5436
|
+
`/v1/workspaces/${workspaceId}/connections/fiken/oauth/start`,
|
|
5437
|
+
request,
|
|
5438
|
+
);
|
|
5439
|
+
}
|
|
5440
|
+
|
|
4731
5441
|
/** Start the public Slack installation flow for the workspace-shared OpenGeni bot. */
|
|
4732
5442
|
async startOpenGeniSlackBotInstall(
|
|
4733
5443
|
workspaceId: string,
|
|
@@ -5187,6 +5897,97 @@ export class OpenGeniClient {
|
|
|
5187
5897
|
);
|
|
5188
5898
|
}
|
|
5189
5899
|
|
|
5900
|
+
// --- SuperGrok/xAI connected subscriptions ------------------------------------------------------
|
|
5901
|
+
|
|
5902
|
+
async supergrokStatus(workspaceId: string): Promise<SuperGrokConnectionStatus> {
|
|
5903
|
+
return await this.requestJson<SuperGrokConnectionStatus>(
|
|
5904
|
+
"GET",
|
|
5905
|
+
`/v1/workspaces/${workspaceId}/supergrok/status`,
|
|
5906
|
+
);
|
|
5907
|
+
}
|
|
5908
|
+
|
|
5909
|
+
async supergrokConnectStart(
|
|
5910
|
+
workspaceId: string,
|
|
5911
|
+
scope: SuperGrokAccountScope = "workspace",
|
|
5912
|
+
): Promise<SuperGrokConnectStart> {
|
|
5913
|
+
return await this.requestJson<SuperGrokConnectStart>(
|
|
5914
|
+
"POST",
|
|
5915
|
+
`/v1/workspaces/${workspaceId}/supergrok/connect/start`,
|
|
5916
|
+
{ scope },
|
|
5917
|
+
);
|
|
5918
|
+
}
|
|
5919
|
+
|
|
5920
|
+
async supergrokConnectPoll(workspaceId: string, state: string): Promise<SuperGrokConnectPoll> {
|
|
5921
|
+
return await this.requestJson<SuperGrokConnectPoll>(
|
|
5922
|
+
"POST",
|
|
5923
|
+
`/v1/workspaces/${workspaceId}/supergrok/connect/poll`,
|
|
5924
|
+
{ state },
|
|
5925
|
+
);
|
|
5926
|
+
}
|
|
5927
|
+
|
|
5928
|
+
async listSuperGrokAccounts(workspaceId: string): Promise<SuperGrokAccountsResponse> {
|
|
5929
|
+
return await this.requestJson<SuperGrokAccountsResponse>(
|
|
5930
|
+
"GET",
|
|
5931
|
+
`/v1/workspaces/${workspaceId}/supergrok/accounts`,
|
|
5932
|
+
);
|
|
5933
|
+
}
|
|
5934
|
+
|
|
5935
|
+
async activateSuperGrokAccount(
|
|
5936
|
+
workspaceId: string,
|
|
5937
|
+
accountId: string,
|
|
5938
|
+
): Promise<{ activated: boolean; accountId: string }> {
|
|
5939
|
+
return await this.requestJson<{ activated: boolean; accountId: string }>(
|
|
5940
|
+
"POST",
|
|
5941
|
+
`/v1/workspaces/${workspaceId}/supergrok/accounts/${accountId}/activate`,
|
|
5942
|
+
{},
|
|
5943
|
+
);
|
|
5944
|
+
}
|
|
5945
|
+
|
|
5946
|
+
async setSuperGrokRotationSettings(
|
|
5947
|
+
workspaceId: string,
|
|
5948
|
+
patch: { rotationEnabled: boolean },
|
|
5949
|
+
): Promise<SuperGrokRotationSettings> {
|
|
5950
|
+
return await this.requestJson<SuperGrokRotationSettings>(
|
|
5951
|
+
"PATCH",
|
|
5952
|
+
`/v1/workspaces/${workspaceId}/supergrok/settings`,
|
|
5953
|
+
patch,
|
|
5954
|
+
);
|
|
5955
|
+
}
|
|
5956
|
+
|
|
5957
|
+
async setSuperGrokAccountAllocator(
|
|
5958
|
+
workspaceId: string,
|
|
5959
|
+
accountId: string,
|
|
5960
|
+
input: { enabled: boolean; expectedVersion: number },
|
|
5961
|
+
): Promise<SuperGrokAllocatorUpdate> {
|
|
5962
|
+
return await this.requestJson<SuperGrokAllocatorUpdate>(
|
|
5963
|
+
"PATCH",
|
|
5964
|
+
`/v1/workspaces/${workspaceId}/supergrok/accounts/${accountId}/allocator`,
|
|
5965
|
+
input,
|
|
5966
|
+
);
|
|
5967
|
+
}
|
|
5968
|
+
|
|
5969
|
+
async renameSuperGrokAccount(
|
|
5970
|
+
workspaceId: string,
|
|
5971
|
+
accountId: string,
|
|
5972
|
+
label: string | null,
|
|
5973
|
+
): Promise<SuperGrokAccount> {
|
|
5974
|
+
return await this.requestJson<SuperGrokAccount>(
|
|
5975
|
+
"PATCH",
|
|
5976
|
+
`/v1/workspaces/${workspaceId}/supergrok/accounts/${accountId}`,
|
|
5977
|
+
{ label },
|
|
5978
|
+
);
|
|
5979
|
+
}
|
|
5980
|
+
|
|
5981
|
+
async disconnectSuperGrokAccount(
|
|
5982
|
+
workspaceId: string,
|
|
5983
|
+
accountId: string,
|
|
5984
|
+
): Promise<{ disconnected: boolean; newActiveId: string | null }> {
|
|
5985
|
+
return await this.requestJson<{
|
|
5986
|
+
disconnected: boolean;
|
|
5987
|
+
newActiveId: string | null;
|
|
5988
|
+
}>("DELETE", `/v1/workspaces/${workspaceId}/supergrok/accounts/${accountId}`, {});
|
|
5989
|
+
}
|
|
5990
|
+
|
|
5190
5991
|
/** Contract-checked JSON transport shared by opt-in typed SDK clients. */
|
|
5191
5992
|
async requestJson<T>(
|
|
5192
5993
|
method: string,
|