@opengeni/sdk 2.5.0-canary.2 → 3.1.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.
Files changed (42) hide show
  1. package/README.md +54 -0
  2. package/dist/accounts.d.ts +149 -0
  3. package/dist/accounts.js +295 -0
  4. package/dist/accounts.js.map +1 -0
  5. package/dist/artifact-client.d.ts +3 -3
  6. package/dist/artifacts.js +4 -3
  7. package/dist/browser.d.ts +6 -0
  8. package/dist/browser.js +30 -0
  9. package/dist/browser.js.map +1 -0
  10. package/dist/{chunk-7VERSV47.js → chunk-7ZXBPJZP.js} +90 -75
  11. package/dist/chunk-7ZXBPJZP.js.map +1 -0
  12. package/dist/chunk-TX3EIENU.js +79 -0
  13. package/dist/chunk-TX3EIENU.js.map +1 -0
  14. package/dist/{chunk-UP2PIWU2.js → chunk-VUQZAB3O.js} +5 -5
  15. package/dist/chunk-VUQZAB3O.js.map +1 -0
  16. package/dist/{chunk-ERPT45NP.js → chunk-YTAWBDO2.js} +2 -2
  17. package/dist/chunk-YTAWBDO2.js.map +1 -0
  18. package/dist/client.d.ts +25 -21
  19. package/dist/core.d.ts +2 -1
  20. package/dist/core.js +6 -5
  21. package/dist/document-authority-client.d.ts +29 -0
  22. package/dist/document-authority.d.ts +2 -0
  23. package/dist/document-authority.js +11 -0
  24. package/dist/document-authority.js.map +1 -0
  25. package/dist/editable-artifacts.js +4 -4
  26. package/dist/index.d.ts +1 -1
  27. package/dist/index.js +22 -21
  28. package/dist/index.js.map +1 -1
  29. package/dist/types.d.ts +143 -2
  30. package/package.json +14 -2
  31. package/src/accounts.ts +425 -0
  32. package/src/artifact-client.ts +3 -3
  33. package/src/browser.ts +21 -0
  34. package/src/client.ts +156 -108
  35. package/src/core.ts +2 -1
  36. package/src/document-authority-client.ts +116 -0
  37. package/src/document-authority.ts +17 -0
  38. package/src/index.ts +19 -0
  39. package/src/types.ts +186 -2
  40. package/dist/chunk-7VERSV47.js.map +0 -1
  41. package/dist/chunk-ERPT45NP.js.map +0 -1
  42. package/dist/chunk-UP2PIWU2.js.map +0 -1
@@ -0,0 +1,425 @@
1
+ import {
2
+ BeginManagedAuthLoginTransactionRequest,
3
+ BootstrapManagedAuthSessionSetRequest,
4
+ CancelManagedAuthLoginTransactionRequest,
5
+ CompleteManagedAuthEmailPasswordTransactionRequest,
6
+ CompleteManagedAuthLoginTransactionResponse,
7
+ LogoutManagedAuthLoginSlotRequest,
8
+ LogoutManagedAuthSessionSetRequest,
9
+ MANAGED_AUTH_SESSION_SET_API_CONTRACT_HEADER,
10
+ MANAGED_AUTH_SESSION_SET_API_CONTRACT_REVISION,
11
+ ManagedAuthDeepLinkResolution,
12
+ ManagedAuthLoginTransaction,
13
+ ManagedAuthLogoutAllReceipt,
14
+ ManagedAuthSessionSetProjection,
15
+ ManagedAuthSessionSetErrorCode,
16
+ ResolveManagedAuthDeepLinkRequest,
17
+ SelectManagedAuthLoginSlotRequest,
18
+ type BeginManagedAuthLoginTransactionRequest as BeginManagedAuthLoginTransactionRequestType,
19
+ type BootstrapManagedAuthSessionSetRequest as BootstrapManagedAuthSessionSetRequestType,
20
+ type CancelManagedAuthLoginTransactionRequest as CancelManagedAuthLoginTransactionRequestType,
21
+ type CompleteManagedAuthEmailPasswordTransactionRequest as CompleteManagedAuthEmailPasswordTransactionRequestType,
22
+ type CompleteManagedAuthLoginTransactionResponse as CompleteManagedAuthLoginTransactionResponseType,
23
+ type LogoutManagedAuthLoginSlotRequest as LogoutManagedAuthLoginSlotRequestType,
24
+ type LogoutManagedAuthSessionSetRequest as LogoutManagedAuthSessionSetRequestType,
25
+ type ManagedAuthDeepLinkResolution as ManagedAuthDeepLinkResolutionType,
26
+ type ManagedAuthLoginTransaction as ManagedAuthLoginTransactionType,
27
+ type ManagedAuthLogoutAllReceipt as ManagedAuthLogoutAllReceiptType,
28
+ type ManagedAuthSessionSetProjection as ManagedAuthSessionSetProjectionType,
29
+ type ResolveManagedAuthDeepLinkRequest as ResolveManagedAuthDeepLinkRequestType,
30
+ type SelectManagedAuthLoginSlotRequest as SelectManagedAuthLoginSlotRequestType,
31
+ } from "@opengeni/contracts/managed-auth-session-sets";
32
+ import type { z } from "zod";
33
+
34
+ export type BrowserAccountsFetch = (
35
+ input: string | URL | Request,
36
+ init?: RequestInit,
37
+ ) => Promise<Response>;
38
+
39
+ export type BrowserAccountsClientOptions = {
40
+ baseUrl: string;
41
+ fetch?: BrowserAccountsFetch;
42
+ };
43
+
44
+ export interface BrowserAccountsClientLike {
45
+ getSessionSet(): Promise<ManagedAuthSessionSetProjectionType>;
46
+ reconcileSessionSetAuthority(): Promise<ManagedAuthSessionSetProjectionType>;
47
+ bootstrapSessionSet(
48
+ request: BootstrapManagedAuthSessionSetRequestType,
49
+ ): Promise<ManagedAuthSessionSetProjectionType>;
50
+ beginLoginTransaction(
51
+ request: BeginManagedAuthLoginTransactionRequestType,
52
+ ): Promise<ManagedAuthLoginTransactionType>;
53
+ completeEmailPasswordTransaction(
54
+ request: CompleteManagedAuthEmailPasswordTransactionRequestType,
55
+ ): Promise<CompleteManagedAuthLoginTransactionResponseType>;
56
+ cancelLoginTransaction(
57
+ request: CancelManagedAuthLoginTransactionRequestType,
58
+ ): Promise<ManagedAuthSessionSetProjectionType>;
59
+ selectLoginSlot(
60
+ request: SelectManagedAuthLoginSlotRequestType,
61
+ ): Promise<ManagedAuthSessionSetProjectionType>;
62
+ logoutLoginSlot(
63
+ request: LogoutManagedAuthLoginSlotRequestType,
64
+ ): Promise<ManagedAuthSessionSetProjectionType>;
65
+ logoutSessionSet(
66
+ request: LogoutManagedAuthSessionSetRequestType,
67
+ ): Promise<ManagedAuthLogoutAllReceiptType>;
68
+ resolveDeepLink(
69
+ request: ResolveManagedAuthDeepLinkRequestType,
70
+ ): Promise<ManagedAuthDeepLinkResolutionType>;
71
+ }
72
+
73
+ export class BrowserAccountsApiError extends Error {
74
+ readonly name = "BrowserAccountsApiError";
75
+ constructor(
76
+ readonly status: number,
77
+ readonly code: string,
78
+ options?: { cause?: unknown },
79
+ ) {
80
+ super(code, options?.cause === undefined ? undefined : { cause: options.cause });
81
+ }
82
+ }
83
+
84
+ export class BrowserAccountsClient implements BrowserAccountsClientLike {
85
+ readonly #baseUrl: string;
86
+ readonly #fetch: BrowserAccountsFetch;
87
+ // CSRF is generation-bound. Exact idempotent replay must retain the
88
+ // admission envelope even after an authority reread observes a newer clock.
89
+ readonly #mutationAdmissions = new Map<
90
+ string,
91
+ { signature: string; csrfToken: string; actorEpoch: string }
92
+ >();
93
+ #projection: ManagedAuthSessionSetProjectionType | null = null;
94
+ #authorityReadEpoch = 0;
95
+ #authorityResetPending = false;
96
+ #authorityReconciliation: Promise<ManagedAuthSessionSetProjectionType> | null = null;
97
+
98
+ constructor(options: BrowserAccountsClientOptions) {
99
+ this.#baseUrl = options.baseUrl.replace(/\/+$/, "");
100
+ this.#fetch = options.fetch ?? ((input, init) => fetch(input, init));
101
+ }
102
+
103
+ async getSessionSet(): Promise<ManagedAuthSessionSetProjectionType> {
104
+ if (this.#authorityResetPending || this.#authorityReconciliation) {
105
+ return await this.reconcileSessionSetAuthority();
106
+ }
107
+ const readEpoch = this.#authorityReadEpoch;
108
+ const received = await this.#readSessionSet();
109
+ if (readEpoch !== this.#authorityReadEpoch) {
110
+ return this.#authorityReconciliation
111
+ ? await this.#authorityReconciliation
112
+ : (this.#projection ?? (await this.getSessionSet()));
113
+ }
114
+ return this.#remember(received);
115
+ }
116
+
117
+ async reconcileSessionSetAuthority(): Promise<ManagedAuthSessionSetProjectionType> {
118
+ if (this.#authorityReconciliation) return await this.#authorityReconciliation;
119
+ const previous = this.#projection;
120
+ const readEpoch = ++this.#authorityReadEpoch;
121
+ // Explicit reconciliation is an authority-invalidation boundary, not an
122
+ // ordinary monotonic refresh. Old operation admissions must never cross it,
123
+ // and mutations stay closed until two sequential reads reach a decision.
124
+ this.#authorityResetPending = true;
125
+ this.#mutationAdmissions.clear();
126
+ const reconciliation = this.#reconcileSessionSetAuthority(previous, readEpoch);
127
+ this.#authorityReconciliation = reconciliation;
128
+ try {
129
+ const accepted = await reconciliation;
130
+ if (readEpoch === this.#authorityReadEpoch) this.#authorityResetPending = false;
131
+ return accepted;
132
+ } finally {
133
+ if (this.#authorityReconciliation === reconciliation) {
134
+ this.#authorityReconciliation = null;
135
+ }
136
+ }
137
+ }
138
+
139
+ async bootstrapSessionSet(request: BootstrapManagedAuthSessionSetRequestType) {
140
+ return this.#projectionResponse(
141
+ "POST",
142
+ "/v1/auth/session-set/bootstrap",
143
+ BootstrapManagedAuthSessionSetRequest,
144
+ request,
145
+ );
146
+ }
147
+
148
+ async beginLoginTransaction(request: BeginManagedAuthLoginTransactionRequestType) {
149
+ return ManagedAuthLoginTransaction.parse(
150
+ await this.#mutation(
151
+ "POST",
152
+ "/v1/auth/session-set/transactions",
153
+ BeginManagedAuthLoginTransactionRequest,
154
+ request,
155
+ ),
156
+ );
157
+ }
158
+
159
+ async completeEmailPasswordTransaction(
160
+ request: CompleteManagedAuthEmailPasswordTransactionRequestType,
161
+ ) {
162
+ const authorityReadEpoch = this.#authorityReadEpoch;
163
+ const response = CompleteManagedAuthLoginTransactionResponse.parse(
164
+ await this.#mutation(
165
+ "POST",
166
+ "/v1/auth/session-set/transactions/email-password",
167
+ CompleteManagedAuthEmailPasswordTransactionRequest,
168
+ request,
169
+ ),
170
+ );
171
+ if (authorityReadEpoch !== this.#authorityReadEpoch) {
172
+ return { ...response, projection: await this.getSessionSet() };
173
+ }
174
+ const remembered = this.#remember(response.projection);
175
+ if (remembered !== response.projection) {
176
+ return { ...response, projection: await this.getSessionSet() };
177
+ }
178
+ return response;
179
+ }
180
+
181
+ async cancelLoginTransaction(request: CancelManagedAuthLoginTransactionRequestType) {
182
+ return this.#projectionResponse(
183
+ "DELETE",
184
+ `/v1/auth/session-set/transactions/${encodeURIComponent(request.transactionId)}`,
185
+ CancelManagedAuthLoginTransactionRequest,
186
+ request,
187
+ );
188
+ }
189
+
190
+ async selectLoginSlot(request: SelectManagedAuthLoginSlotRequestType) {
191
+ return this.#projectionResponse(
192
+ "POST",
193
+ "/v1/auth/session-set/select",
194
+ SelectManagedAuthLoginSlotRequest,
195
+ request,
196
+ );
197
+ }
198
+
199
+ async logoutLoginSlot(request: LogoutManagedAuthLoginSlotRequestType) {
200
+ return this.#projectionResponse(
201
+ "POST",
202
+ "/v1/auth/session-set/logout-one",
203
+ LogoutManagedAuthLoginSlotRequest,
204
+ request,
205
+ );
206
+ }
207
+
208
+ async logoutSessionSet(request: LogoutManagedAuthSessionSetRequestType) {
209
+ const receipt = ManagedAuthLogoutAllReceipt.parse(
210
+ await this.#mutation(
211
+ "POST",
212
+ "/v1/auth/session-set/logout-all",
213
+ LogoutManagedAuthSessionSetRequest,
214
+ request,
215
+ ),
216
+ );
217
+ this.#authorityReadEpoch += 1;
218
+ this.#authorityResetPending = false;
219
+ this.#projection = null;
220
+ this.#mutationAdmissions.clear();
221
+ return receipt;
222
+ }
223
+
224
+ async resolveDeepLink(request: ResolveManagedAuthDeepLinkRequestType) {
225
+ return ManagedAuthDeepLinkResolution.parse(
226
+ await this.#mutation(
227
+ "POST",
228
+ "/v1/auth/session-set/deep-link/resolve",
229
+ ResolveManagedAuthDeepLinkRequest,
230
+ request,
231
+ ),
232
+ );
233
+ }
234
+
235
+ async #projectionResponse<S extends z.ZodType>(
236
+ method: "POST" | "DELETE",
237
+ path: string,
238
+ schema: S,
239
+ request: z.infer<S>,
240
+ ): Promise<ManagedAuthSessionSetProjectionType> {
241
+ const authorityReadEpoch = this.#authorityReadEpoch;
242
+ const received = ManagedAuthSessionSetProjection.parse(
243
+ await this.#mutation(method, path, schema, request),
244
+ );
245
+ if (authorityReadEpoch !== this.#authorityReadEpoch) return await this.getSessionSet();
246
+ const remembered = this.#remember(received);
247
+ // An exact replay may legitimately return its older durable receipt after
248
+ // another tab has advanced this in-memory client. Reconcile from authority
249
+ // instead of presenting that receipt as the current actor projection.
250
+ return remembered === received ? received : await this.getSessionSet();
251
+ }
252
+
253
+ async #mutation<S extends z.ZodType>(
254
+ method: "POST" | "DELETE",
255
+ path: string,
256
+ schema: S,
257
+ request: z.infer<S>,
258
+ ): Promise<unknown> {
259
+ if (this.#authorityResetPending) {
260
+ throw new BrowserAccountsApiError(409, "actor_change_required");
261
+ }
262
+ const body = schema.parse(request);
263
+ const projection = this.#projection;
264
+ if (!projection) throw new BrowserAccountsApiError(409, "session_set_projection_required");
265
+ const operationId = mutationOperationId(body);
266
+ const signature = operationId ? JSON.stringify([method, path, body]) : null;
267
+ const retained = operationId ? this.#mutationAdmissions.get(operationId) : null;
268
+ if (retained && retained.signature !== signature) {
269
+ throw new BrowserAccountsApiError(409, "operation_reused");
270
+ }
271
+ const admission =
272
+ retained ??
273
+ ({
274
+ signature: signature ?? "",
275
+ csrfToken: projection.csrfToken,
276
+ actorEpoch: projection.actorEpoch,
277
+ } as const);
278
+ if (operationId && !retained) {
279
+ this.#mutationAdmissions.set(operationId, admission);
280
+ if (this.#mutationAdmissions.size > 64) {
281
+ this.#mutationAdmissions.delete(this.#mutationAdmissions.keys().next().value!);
282
+ }
283
+ }
284
+ return await this.#request(method, path, body, {
285
+ "x-opengeni-session-csrf": admission.csrfToken,
286
+ "x-opengeni-actor-epoch": admission.actorEpoch,
287
+ });
288
+ }
289
+
290
+ async #request(
291
+ method: "GET" | "POST" | "DELETE",
292
+ path: string,
293
+ body?: unknown,
294
+ headers: Record<string, string> = {},
295
+ ): Promise<unknown> {
296
+ let response: Response;
297
+ try {
298
+ response = await this.#fetch(`${this.#baseUrl}${path}`, {
299
+ method,
300
+ credentials: "include",
301
+ headers: {
302
+ accept: "application/json",
303
+ [MANAGED_AUTH_SESSION_SET_API_CONTRACT_HEADER]:
304
+ MANAGED_AUTH_SESSION_SET_API_CONTRACT_REVISION,
305
+ ...(body === undefined ? {} : { "content-type": "application/json" }),
306
+ ...headers,
307
+ },
308
+ ...(body === undefined ? {} : { body: JSON.stringify(body) }),
309
+ });
310
+ } catch (cause) {
311
+ if (method !== "GET") {
312
+ throw new BrowserAccountsApiError(503, "operation_outcome_unknown", { cause });
313
+ }
314
+ throw cause;
315
+ }
316
+ let parsed = true;
317
+ const value = await response.json().catch(() => {
318
+ parsed = false;
319
+ return null;
320
+ });
321
+ if (!response.ok) {
322
+ const code = managedAuthErrorCode(value) ?? `http_${response.status}`;
323
+ throw new BrowserAccountsApiError(response.status, code);
324
+ }
325
+ if (!parsed && method !== "GET") {
326
+ throw new BrowserAccountsApiError(503, "operation_outcome_unknown");
327
+ }
328
+ return value;
329
+ }
330
+
331
+ async #readSessionSet(): Promise<ManagedAuthSessionSetProjectionType> {
332
+ return ManagedAuthSessionSetProjection.parse(
333
+ await this.#request("GET", "/v1/auth/session-set"),
334
+ );
335
+ }
336
+
337
+ async #reconcileSessionSetAuthority(
338
+ previous: ManagedAuthSessionSetProjectionType | null,
339
+ readEpoch: number,
340
+ ): Promise<ManagedAuthSessionSetProjectionType> {
341
+ const first = await this.#readSessionSet();
342
+ const second = await this.#readSessionSet();
343
+ if (readEpoch !== this.#authorityReadEpoch) {
344
+ return await this.#reconcileSessionSetAuthority(this.#projection, this.#authorityReadEpoch);
345
+ }
346
+ if (this.#projection !== previous) return this.#remember(second);
347
+ if (!previous || compareProjectionClock(second, previous) >= 0) {
348
+ return this.#remember(second);
349
+ }
350
+ if (compareProjectionClock(first, previous) < 0 && compareProjectionClock(second, first) >= 0) {
351
+ // Same-authority clocks never decrease. Two sequential no-store reads
352
+ // that both remain below the remembered clock therefore prove that the
353
+ // HttpOnly authority rotated; the second may already have advanced from
354
+ // the fresh authority's initial 1/1 projection.
355
+ this.#projection = second;
356
+ this.#mutationAdmissions.clear();
357
+ return second;
358
+ }
359
+ return previous;
360
+ }
361
+
362
+ #remember(projection: ManagedAuthSessionSetProjectionType) {
363
+ const current = this.#projection;
364
+ if (!current || compareProjectionClock(projection, current) >= 0) {
365
+ this.#projection = projection;
366
+ return projection;
367
+ }
368
+ return current;
369
+ }
370
+ }
371
+
372
+ function mutationOperationId(value: unknown): string | null {
373
+ if (!value || typeof value !== "object") return null;
374
+ const operationId = (value as { operationId?: unknown }).operationId;
375
+ return typeof operationId === "string" ? operationId : null;
376
+ }
377
+
378
+ function compareProjectionClock(
379
+ left: Pick<ManagedAuthSessionSetProjectionType, "actorEpoch" | "generation">,
380
+ right: Pick<ManagedAuthSessionSetProjectionType, "actorEpoch" | "generation">,
381
+ ): number {
382
+ const actorDelta = BigInt(left.actorEpoch) - BigInt(right.actorEpoch);
383
+ if (actorDelta !== 0n) return actorDelta > 0n ? 1 : -1;
384
+ const generationDelta = BigInt(left.generation) - BigInt(right.generation);
385
+ return generationDelta === 0n ? 0 : generationDelta > 0n ? 1 : -1;
386
+ }
387
+
388
+ function managedAuthErrorCode(value: unknown): string | null {
389
+ if (!value || typeof value !== "object") return null;
390
+ const error = (value as { error?: unknown }).error;
391
+ if (error && typeof error === "object") {
392
+ const details = (error as { details?: unknown }).details;
393
+ if (details && typeof details === "object") {
394
+ const parsed = ManagedAuthSessionSetErrorCode.safeParse(
395
+ (details as { managedAuthCode?: unknown }).managedAuthCode,
396
+ );
397
+ if (parsed.success) return parsed.data;
398
+ }
399
+ }
400
+ const legacy = (value as { message?: unknown }).message;
401
+ const parsed = ManagedAuthSessionSetErrorCode.safeParse(legacy);
402
+ return parsed.success ? parsed.data : null;
403
+ }
404
+
405
+ export function createBrowserAccountsClient(
406
+ options: BrowserAccountsClientOptions,
407
+ ): BrowserAccountsClient {
408
+ return new BrowserAccountsClient(options);
409
+ }
410
+
411
+ export type {
412
+ BeginManagedAuthLoginTransactionRequestType as BeginManagedAuthLoginTransactionRequest,
413
+ BootstrapManagedAuthSessionSetRequestType as BootstrapManagedAuthSessionSetRequest,
414
+ CancelManagedAuthLoginTransactionRequestType as CancelManagedAuthLoginTransactionRequest,
415
+ CompleteManagedAuthEmailPasswordTransactionRequestType as CompleteManagedAuthEmailPasswordTransactionRequest,
416
+ CompleteManagedAuthLoginTransactionResponseType as CompleteManagedAuthLoginTransactionResponse,
417
+ LogoutManagedAuthLoginSlotRequestType as LogoutManagedAuthLoginSlotRequest,
418
+ LogoutManagedAuthSessionSetRequestType as LogoutManagedAuthSessionSetRequest,
419
+ ManagedAuthDeepLinkResolutionType as ManagedAuthDeepLinkResolution,
420
+ ManagedAuthLoginTransactionType as ManagedAuthLoginTransaction,
421
+ ManagedAuthLogoutAllReceiptType as ManagedAuthLogoutAllReceipt,
422
+ ManagedAuthSessionSetProjectionType as ManagedAuthSessionSetProjection,
423
+ ResolveManagedAuthDeepLinkRequestType as ResolveManagedAuthDeepLinkRequest,
424
+ SelectManagedAuthLoginSlotRequestType as SelectManagedAuthLoginSlotRequest,
425
+ };
@@ -1,4 +1,4 @@
1
- import { OpenGeniClient as OpenGeniCoreClient } from "./client";
1
+ import { OpenGeniDocumentAuthorityClient } from "./document-authority-client";
2
2
  import type {
3
3
  CreateEditableArtifactMaterializationRequest,
4
4
  CreateEditableArtifactResourceRequest,
@@ -23,8 +23,8 @@ import type {
23
23
  WorkspaceArtifactMutationResponse,
24
24
  } from "./workspace-artifacts";
25
25
 
26
- /** Public SDK client. Artifact operations stay out of the console's eager core graph. */
27
- export class OpenGeniClient extends OpenGeniCoreClient {
26
+ /** Public SDK client. Optional operator and artifact operations stay out of the console core. */
27
+ export class OpenGeniClient extends OpenGeniDocumentAuthorityClient {
28
28
  async createEditableArtifact(
29
29
  workspaceId: string,
30
30
  request: CreateEditableArtifactResourceRequest,
package/src/browser.ts ADDED
@@ -0,0 +1,21 @@
1
+ /** Browser-console client. Optional SDK surfaces must not enter this eager graph. */
2
+ export { OpenGeniClient as OpenGeniBrowserClient } from "./client";
3
+ export type {
4
+ FetchLike,
5
+ GetSessionOptions,
6
+ OpenGeniClientOptions,
7
+ OpenGeniRequestOptions,
8
+ SendMessageInput,
9
+ SteerMessageResult,
10
+ TranscribeAudioInput,
11
+ WorkspaceControlEventPage,
12
+ } from "./client";
13
+ export {
14
+ OpenGeniApiContractMismatchError,
15
+ OpenGeniApiError,
16
+ OpenGeniSessionListCursorError,
17
+ OpenGeniStreamError,
18
+ isRetryableStreamError,
19
+ } from "./errors";
20
+ export { resolveWorkspaceVoiceInputEnabled } from "./transcription";
21
+ export { OPENGENI_API_CONTRACT_HEADER, OPENGENI_API_CONTRACT_REVISION } from "./types";