@wazootech/client 0.0.0-stage → 0.7.2

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.
@@ -0,0 +1,2005 @@
1
+ type AuthToken = string | undefined;
2
+ interface Auth {
3
+ /**
4
+ * Which part of the request do we use to send the auth?
5
+ *
6
+ * @default 'header'
7
+ */
8
+ in?: 'header' | 'query' | 'cookie';
9
+ /**
10
+ * A unique identifier for the security scheme.
11
+ *
12
+ * Defined only when there are multiple security schemes whose `Auth`
13
+ * shape would otherwise be identical.
14
+ */
15
+ key?: string;
16
+ /**
17
+ * Header or query parameter name.
18
+ *
19
+ * @default 'Authorization'
20
+ */
21
+ name?: string;
22
+ scheme?: 'basic' | 'bearer';
23
+ type: 'apiKey' | 'http';
24
+ }
25
+ interface SerializerOptions<T> {
26
+ /**
27
+ * @default true
28
+ */
29
+ explode: boolean;
30
+ style: T;
31
+ }
32
+ type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
33
+ type ObjectStyle = 'form' | 'deepObject';
34
+ type QuerySerializer = (query: Record<string, unknown>) => string;
35
+ type BodySerializer = (body: unknown) => unknown;
36
+ type QuerySerializerOptionsObject = {
37
+ allowReserved?: boolean;
38
+ array?: Partial<SerializerOptions<ArrayStyle>>;
39
+ object?: Partial<SerializerOptions<ObjectStyle>>;
40
+ };
41
+ type QuerySerializerOptions = QuerySerializerOptionsObject & {
42
+ /**
43
+ * Per-parameter serialization overrides. When provided, these settings
44
+ * override the global array/object settings for specific parameter names.
45
+ */
46
+ parameters?: Record<string, QuerySerializerOptionsObject>;
47
+ };
48
+ type HttpMethod = 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace';
49
+ type Client$1<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never, SseFn = never> = {
50
+ /**
51
+ * Returns the final request URL.
52
+ */
53
+ buildUrl: BuildUrlFn;
54
+ getConfig: () => Config;
55
+ request: RequestFn;
56
+ setConfig: (config: Config) => Config;
57
+ } & { [K in HttpMethod]: MethodFn; } & ([SseFn] extends [never] ? {
58
+ sse?: never;
59
+ } : {
60
+ sse: { [K in HttpMethod]: SseFn; };
61
+ });
62
+ interface Config$1 {
63
+ /**
64
+ * Auth token or a function returning auth token. The resolved value will be
65
+ * added to the request payload as defined by its `security` array.
66
+ */
67
+ auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
68
+ /**
69
+ * A function for serializing request body parameter. By default,
70
+ * {@link JSON.stringify()} will be used.
71
+ */
72
+ bodySerializer?: BodySerializer | null;
73
+ /**
74
+ * An object containing any HTTP headers that you want to pre-populate your
75
+ * `Headers` object with.
76
+ *
77
+ * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
78
+ */
79
+ headers?: RequestInit['headers'] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>;
80
+ /**
81
+ * The request method.
82
+ *
83
+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
84
+ */
85
+ method?: Uppercase<HttpMethod>;
86
+ /**
87
+ * A function for serializing request query parameters. By default, arrays
88
+ * will be exploded in form style, objects will be exploded in deepObject
89
+ * style, and reserved characters are percent-encoded.
90
+ *
91
+ * This method will have no effect if the native `paramsSerializer()` Axios
92
+ * API function is used.
93
+ *
94
+ * {@link https://swagger.io/docs/specification/serialization/#query View examples}
95
+ */
96
+ querySerializer?: QuerySerializer | QuerySerializerOptions;
97
+ /**
98
+ * A function validating request data. This is useful if you want to ensure
99
+ * the request conforms to the desired shape, so it can be safely sent to
100
+ * the server.
101
+ */
102
+ requestValidator?: (data: unknown) => Promise<unknown>;
103
+ /**
104
+ * A function transforming response data before it's returned. This is useful
105
+ * for post-processing data, e.g., converting ISO strings into Date objects.
106
+ */
107
+ responseTransformer?: (data: unknown) => Promise<unknown>;
108
+ /**
109
+ * A function validating response data. This is useful if you want to ensure
110
+ * the response conforms to the desired shape, so it can be safely passed to
111
+ * the transformers and returned to the user.
112
+ */
113
+ responseValidator?: (data: unknown) => Promise<unknown>;
114
+ }
115
+ /**
116
+ * Arbitrary metadata passed through the `meta` request option.
117
+ */
118
+ interface ClientMeta {}
119
+ type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> & Pick<Config$1, 'method' | 'responseTransformer' | 'responseValidator'> & {
120
+ /**
121
+ * Fetch API implementation. You can use this option to provide a custom
122
+ * fetch instance.
123
+ *
124
+ * @default globalThis.fetch
125
+ */
126
+ fetch?: typeof fetch;
127
+ /**
128
+ * Implementing clients can call request interceptors inside this hook.
129
+ */
130
+ onRequest?: (url: string, init: RequestInit) => Promise<Request>;
131
+ /**
132
+ * Callback invoked when a network or parsing error occurs during streaming.
133
+ *
134
+ * This option applies only if the endpoint returns a stream of events.
135
+ *
136
+ * @param error The error that occurred.
137
+ */
138
+ onSseError?: (error: unknown) => void;
139
+ /**
140
+ * Callback invoked when an event is streamed from the server.
141
+ *
142
+ * This option applies only if the endpoint returns a stream of events.
143
+ *
144
+ * @param event Event streamed from the server.
145
+ * @returns Nothing (void).
146
+ */
147
+ onSseEvent?: (event: StreamEvent<TData>) => void;
148
+ serializedBody?: RequestInit['body'];
149
+ /**
150
+ * Default retry delay in milliseconds.
151
+ *
152
+ * This option applies only if the endpoint returns a stream of events.
153
+ *
154
+ * @default 3000
155
+ */
156
+ sseDefaultRetryDelay?: number;
157
+ /**
158
+ * Maximum number of retry attempts before giving up.
159
+ */
160
+ sseMaxRetryAttempts?: number;
161
+ /**
162
+ * Maximum retry delay in milliseconds.
163
+ *
164
+ * Applies only when exponential backoff is used.
165
+ *
166
+ * This option applies only if the endpoint returns a stream of events.
167
+ *
168
+ * @default 30000
169
+ */
170
+ sseMaxRetryDelay?: number;
171
+ /**
172
+ * Optional sleep function for retry backoff.
173
+ *
174
+ * Defaults to using `setTimeout`.
175
+ */
176
+ sseSleepFn?: (ms: number) => Promise<void>;
177
+ url: string;
178
+ };
179
+ interface StreamEvent<TData = unknown> {
180
+ data: TData;
181
+ event?: string;
182
+ id?: string;
183
+ retry?: number;
184
+ }
185
+ type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unknown> = {
186
+ stream: AsyncGenerator<TData extends Record<string, unknown> ? TData[keyof TData] : TData, TReturn, TNext>;
187
+ };
188
+ type ErrInterceptor<Err, Res, Req, Options> = (error: Err,
189
+ /** response may be undefined due to a network error where no response object is produced */
190
+ response: Res | undefined,
191
+ /** request may be undefined, because error may be from building the request object itself */
192
+ request: Req | undefined, options: Options) => Err | Promise<Err>;
193
+ type ReqInterceptor<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;
194
+ type ResInterceptor<Res, Req, Options> = (response: Res, request: Req, options: Options) => Res | Promise<Res>;
195
+ declare class Interceptors<Interceptor> {
196
+ fns: Array<Interceptor | null>;
197
+ clear(): void;
198
+ eject(id: number | Interceptor): void;
199
+ exists(id: number | Interceptor): boolean;
200
+ getInterceptorIndex(id: number | Interceptor): number;
201
+ update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false;
202
+ use(fn: Interceptor): number;
203
+ }
204
+ interface Middleware<Req, Res, Err, Options> {
205
+ error: Interceptors<ErrInterceptor<Err, Res, Req, Options>>;
206
+ request: Interceptors<ReqInterceptor<Req, Options>>;
207
+ response: Interceptors<ResInterceptor<Res, Req, Options>>;
208
+ }
209
+ type ResponseStyle = 'data' | 'fields';
210
+ interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Config$1 {
211
+ /**
212
+ * Base URL for all requests made by this client.
213
+ */
214
+ baseUrl?: T['baseUrl'];
215
+ /**
216
+ * Fetch API implementation. You can use this option to provide a custom
217
+ * fetch instance.
218
+ *
219
+ * @default globalThis.fetch
220
+ */
221
+ fetch?: typeof fetch;
222
+ /**
223
+ * Please don't use the Fetch client for Next.js applications. The `next`
224
+ * options won't have any effect.
225
+ *
226
+ * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.
227
+ */
228
+ next?: never;
229
+ /**
230
+ * Return the response data parsed in a specified format. By default, `auto`
231
+ * will infer the appropriate method from the `Content-Type` response header.
232
+ * You can override this behavior with any of the {@link Body} methods.
233
+ * Select `stream` if you don't want to parse response data at all.
234
+ *
235
+ * @default 'auto'
236
+ */
237
+ parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';
238
+ /**
239
+ * Should we return only data or multiple fields (data, error, response, etc.)?
240
+ *
241
+ * @default 'fields'
242
+ */
243
+ responseStyle?: ResponseStyle;
244
+ /**
245
+ * Throw an error instead of returning it in the response?
246
+ *
247
+ * @default false
248
+ */
249
+ throwOnError?: T['throwOnError'];
250
+ }
251
+ interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
252
+ responseStyle: TResponseStyle;
253
+ throwOnError: ThrowOnError;
254
+ }>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
255
+ /**
256
+ * Any body that you want to add to your request.
257
+ *
258
+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
259
+ */
260
+ body?: unknown;
261
+ path?: Record<string, unknown>;
262
+ query?: Record<string, unknown>;
263
+ /**
264
+ * Security mechanism(s) to use for the request.
265
+ */
266
+ security?: ReadonlyArray<Auth>;
267
+ url: Url;
268
+ }
269
+ interface ResolvedRequestOptions<TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {
270
+ headers: Headers;
271
+ serializedBody?: string;
272
+ }
273
+ type RequestResult<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle = 'fields'> = ThrowOnError extends true ? Promise<TResponseStyle extends 'data' ? TData extends Record<string, unknown> ? TData[keyof TData] : TData : {
274
+ data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
275
+ request: Request;
276
+ response: Response;
277
+ }> : Promise<TResponseStyle extends 'data' ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined : ({
278
+ data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
279
+ error: undefined;
280
+ } | {
281
+ data: undefined;
282
+ error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
283
+ }) & {
284
+ /** request may be undefined, because error may be from building the request object itself */
285
+ request?: Request;
286
+ /** response may be undefined, because error may be from building the request object itself or from a network error */
287
+ response?: Response;
288
+ }>;
289
+ interface ClientOptions$1 {
290
+ baseUrl?: string;
291
+ responseStyle?: ResponseStyle;
292
+ throwOnError?: boolean;
293
+ }
294
+ type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
295
+ type SseFn = <TData = unknown, _TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<never, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData>>;
296
+ type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
297
+ type BuildUrlFn = <TData extends {
298
+ body?: unknown;
299
+ path?: Record<string, unknown>;
300
+ query?: Record<string, unknown>;
301
+ url: string;
302
+ }>(options: TData & Options<TData>) => string;
303
+ type Client = Client$1<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {
304
+ interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;
305
+ };
306
+ interface TDataShape {
307
+ body?: unknown;
308
+ headers?: unknown;
309
+ path?: unknown;
310
+ query?: unknown;
311
+ url: string;
312
+ }
313
+ type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;
314
+ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle = 'fields'> = OmitKeys<RequestOptions<TResponse, TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
315
+ export declare const createClient: (config?: Config) => Client;
316
+ type ClientOptions = {
317
+ baseUrl: 'https://api.wazoo.dev' | (string & {});
318
+ };
319
+ /**
320
+ * Always `{ ok: true }` for accepted, rate-limited, unconfigured, or empty requests, so the endpoint is not an oracle for allowlist membership.
321
+ */
322
+ type LoginResponse = {
323
+ ok: true;
324
+ };
325
+ type LoginRequest = {
326
+ /**
327
+ * Email address to send the magic-link code to. Matched case-insensitively.
328
+ */
329
+ email: string;
330
+ };
331
+ type VerifyResponse = {
332
+ /**
333
+ * Platform session token (wzp_).
334
+ */
335
+ token: string;
336
+ };
337
+ type ErrorResponse = {
338
+ error: {
339
+ code: string;
340
+ message: string;
341
+ };
342
+ };
343
+ type VerifyRequest = {
344
+ email: string;
345
+ /**
346
+ * WorkOS magic-auth code.
347
+ */
348
+ code: string;
349
+ /**
350
+ * Required `true` when the email does not yet have an account (13+ age gate).
351
+ */
352
+ ageConfirmed?: boolean;
353
+ };
354
+ type WorkosSessionResponse = {
355
+ token: string;
356
+ expiresAt: string;
357
+ };
358
+ type WorkosSessionRequest = {
359
+ email: string;
360
+ displayName?: string;
361
+ /**
362
+ * Required `true` when the email does not yet have an account (13+ age gate).
363
+ */
364
+ ageConfirmed?: boolean;
365
+ };
366
+ type User = {
367
+ uid: string;
368
+ email: string;
369
+ displayName: string | null;
370
+ state: 'ACTIVE';
371
+ createTime: string;
372
+ };
373
+ type EmbeddingProviderList = {
374
+ providers: Array<EmbeddingCredential>;
375
+ };
376
+ type EmbeddingCredential = {
377
+ provider: 'openai' | 'openrouter';
378
+ status: 'active' | 'invalid' | 'revoked';
379
+ fingerprint: string;
380
+ last4: string;
381
+ createTime: string;
382
+ rotateTime?: string;
383
+ revokeTime?: string;
384
+ };
385
+ type World = {
386
+ /**
387
+ * World ID minted by worlds-api in w_<ULID> form.
388
+ */
389
+ id: string;
390
+ displayName: string;
391
+ region: string;
392
+ state: 'ACTIVE' | 'SUSPENDED' | 'DELETED';
393
+ restorable: boolean;
394
+ backend: 'worlds-api';
395
+ createTime?: string;
396
+ updateTime?: string;
397
+ deleteTime?: string;
398
+ expireTime?: string;
399
+ };
400
+ /**
401
+ * Flat create body, e.g. {"displayName":"hello"}. The control plane and the worlds-api data plane use the same shape; unknown keys are rejected.
402
+ */
403
+ type CreateWorldRequest = {
404
+ ownerEmail?: string;
405
+ email?: string;
406
+ displayName: string;
407
+ region?: string;
408
+ };
409
+ type UpdateWorldRequest = {
410
+ updateMask: string;
411
+ world: {
412
+ displayName?: string;
413
+ region?: string;
414
+ state?: 'ACTIVE' | 'SUSPENDED';
415
+ };
416
+ };
417
+ type WorldToken = {
418
+ uid: string;
419
+ name: string;
420
+ namespace?: string;
421
+ worldId?: string;
422
+ scopes?: Array<string>;
423
+ createTime?: string;
424
+ };
425
+ type WorldTokenCreated = {
426
+ uid: string;
427
+ name: string;
428
+ namespace?: string;
429
+ worldId?: string;
430
+ scopes?: Array<string>;
431
+ createTime?: string;
432
+ /**
433
+ * One-time wzw_ secret returned only when the token is created; it cannot be retrieved again.
434
+ */
435
+ token: string;
436
+ };
437
+ type WorldTokenCreateRequest = {
438
+ name?: string;
439
+ };
440
+ type PlatformToken = {
441
+ uid: string;
442
+ name: string;
443
+ scope?: string;
444
+ last_used_at?: string | null;
445
+ expires_at?: string | null;
446
+ createTime?: string;
447
+ };
448
+ type PlatformTokenCreateResponse = {
449
+ uid: string;
450
+ name: string;
451
+ token: string;
452
+ };
453
+ type PlatformTokenCreateRequest = {
454
+ user?: string;
455
+ email?: string;
456
+ name?: string;
457
+ tokenName?: string;
458
+ scope?: string;
459
+ expiresAt?: string;
460
+ };
461
+ type UsageEvent = {
462
+ name: string;
463
+ metric: string;
464
+ quantity: number;
465
+ unit: string;
466
+ providerCostMicrocents?: number | null;
467
+ wazooMarkupMicrocents?: number;
468
+ estimatedCostMicrocents?: number | null;
469
+ billingSource: string;
470
+ createTime: string;
471
+ };
472
+ type QuotaSummary = {
473
+ state: 'OK' | 'WARN' | 'THROTTLED';
474
+ usagePercent: number;
475
+ limits: Array<LimitSummary>;
476
+ };
477
+ type LimitSummary = {
478
+ metric: string;
479
+ quantity: number;
480
+ limitQuantity: number;
481
+ usagePercent: number;
482
+ };
483
+ type UsageRecordRequest = {
484
+ user?: string;
485
+ email?: string;
486
+ metric: string;
487
+ quantity: number;
488
+ unit?: string;
489
+ providerCostMicrocents?: number;
490
+ wazooMarkupMicrocents?: number;
491
+ estimatedCostMicrocents?: number;
492
+ billingSource?: string;
493
+ createTime?: string;
494
+ };
495
+ type Billing = {
496
+ world: string;
497
+ state: string;
498
+ provider: string;
499
+ customerConfigured: boolean;
500
+ subscriptionConfigured: boolean;
501
+ paymentRequired: boolean;
502
+ };
503
+ type UserPlan = {
504
+ /**
505
+ * The user's plan. It sets their daily database write budget.
506
+ */
507
+ plan: 'free' | 'pro';
508
+ /**
509
+ * Database rows the user's worlds may write per UTC day, shared across all of them. A stored quad costs about 9 rows, and about 94 per asserted quad with inference on. Null if the data plane could not be reached.
510
+ */
511
+ dailyRowWrites: number | null;
512
+ /**
513
+ * Rows written so far today (UTC), or null if the data plane could not be reached.
514
+ */
515
+ rowsWrittenToday: number | null;
516
+ usagePercent: number | null;
517
+ /**
518
+ * The UTC day.
519
+ */
520
+ day: string | null;
521
+ /**
522
+ * What the console may offer.
523
+ */
524
+ billing: {
525
+ /**
526
+ * True when this user can start a Pro checkout: billing is configured and they are on the free plan.
527
+ */
528
+ checkoutAvailable: boolean;
529
+ /**
530
+ * True when the user has a billing account to manage in the Stripe portal.
531
+ */
532
+ portalAvailable: boolean;
533
+ };
534
+ };
535
+ type BillingSessionUrl = {
536
+ /**
537
+ * The Stripe-hosted page to send the user to. It is single-use and expires.
538
+ */
539
+ url: string;
540
+ };
541
+ type GetHealthData = {
542
+ body?: never;
543
+ path?: never;
544
+ query?: never;
545
+ url: '/health';
546
+ };
547
+ type GetHealthResponses = {
548
+ /**
549
+ * Service is healthy
550
+ */
551
+ 200: {
552
+ status: string;
553
+ gitSha: string | null;
554
+ };
555
+ };
556
+ type GetHealthResponse = GetHealthResponses[keyof GetHealthResponses];
557
+ type GetReadinessData = {
558
+ body?: never;
559
+ path?: never;
560
+ query?: never;
561
+ url: '/ready';
562
+ };
563
+ type GetReadinessErrors = {
564
+ /**
565
+ * World identity schema is unavailable or incompatible
566
+ */
567
+ 503: {
568
+ status: 'not_ready';
569
+ error: string;
570
+ };
571
+ };
572
+ type GetReadinessError = GetReadinessErrors[keyof GetReadinessErrors];
573
+ type GetReadinessResponses = {
574
+ /**
575
+ * World identity schema is ready
576
+ */
577
+ 200: {
578
+ status: 'ready';
579
+ };
580
+ };
581
+ type GetReadinessResponse = GetReadinessResponses[keyof GetReadinessResponses];
582
+ type LoginData = {
583
+ body?: LoginRequest;
584
+ path?: never;
585
+ query?: never;
586
+ url: '/v1/auth/login';
587
+ };
588
+ type LoginResponses = {
589
+ /**
590
+ * Request accepted
591
+ */
592
+ 200: LoginResponse;
593
+ };
594
+ type LoginResponse2 = LoginResponses[keyof LoginResponses];
595
+ type VerifyLoginData = {
596
+ body?: VerifyRequest;
597
+ path?: never;
598
+ query?: never;
599
+ url: '/v1/auth/verify';
600
+ };
601
+ type VerifyLoginErrors = {
602
+ /**
603
+ * INVALID_ARGUMENT, INVALID_CODE, EXPIRED, or AGE_GATE_REQUIRED
604
+ */
605
+ 400: ErrorResponse;
606
+ /**
607
+ * Authentication failed
608
+ */
609
+ 401: ErrorResponse;
610
+ /**
611
+ * Too many attempts
612
+ */
613
+ 429: ErrorResponse;
614
+ /**
615
+ * Auth is not configured
616
+ */
617
+ 500: ErrorResponse;
618
+ };
619
+ type VerifyLoginError = VerifyLoginErrors[keyof VerifyLoginErrors];
620
+ type VerifyLoginResponses = {
621
+ /**
622
+ * Session token
623
+ */
624
+ 201: VerifyResponse;
625
+ };
626
+ type VerifyLoginResponse = VerifyLoginResponses[keyof VerifyLoginResponses];
627
+ type MintWorkosSessionData = {
628
+ body?: WorkosSessionRequest;
629
+ path?: never;
630
+ query?: never;
631
+ url: '/v1/auth/workos';
632
+ };
633
+ type MintWorkosSessionErrors = {
634
+ /**
635
+ * INVALID_ARGUMENT or AGE_GATE_REQUIRED
636
+ */
637
+ 400: ErrorResponse;
638
+ /**
639
+ * Missing or invalid platform token
640
+ */
641
+ 401: ErrorResponse;
642
+ /**
643
+ * Admin scope required
644
+ */
645
+ 403: ErrorResponse;
646
+ };
647
+ type MintWorkosSessionError = MintWorkosSessionErrors[keyof MintWorkosSessionErrors];
648
+ type MintWorkosSessionResponses = {
649
+ /**
650
+ * Console session token
651
+ */
652
+ 201: WorkosSessionResponse;
653
+ };
654
+ type MintWorkosSessionResponse = MintWorkosSessionResponses[keyof MintWorkosSessionResponses];
655
+ type CreateWorkosSessionData = {
656
+ body?: WorkosSessionRequest;
657
+ path?: never;
658
+ query?: never;
659
+ url: '/v1/auth/workos-session';
660
+ };
661
+ type CreateWorkosSessionErrors = {
662
+ /**
663
+ * INVALID_ARGUMENT or AGE_GATE_REQUIRED
664
+ */
665
+ 400: ErrorResponse;
666
+ /**
667
+ * Missing or invalid platform token
668
+ */
669
+ 401: ErrorResponse;
670
+ /**
671
+ * Admin scope required
672
+ */
673
+ 403: ErrorResponse;
674
+ };
675
+ type CreateWorkosSessionError = CreateWorkosSessionErrors[keyof CreateWorkosSessionErrors];
676
+ type CreateWorkosSessionResponses = {
677
+ /**
678
+ * Console session token
679
+ */
680
+ 201: WorkosSessionResponse;
681
+ };
682
+ type CreateWorkosSessionResponse = CreateWorkosSessionResponses[keyof CreateWorkosSessionResponses];
683
+ type DeleteUserMeData = {
684
+ body: {
685
+ confirmationToken: string;
686
+ };
687
+ path?: never;
688
+ query?: never;
689
+ url: '/v1/users/me';
690
+ };
691
+ type DeleteUserMeErrors = {
692
+ /**
693
+ * Invalid or expired confirmation token
694
+ */
695
+ 400: {
696
+ error: {
697
+ code: string;
698
+ message: string;
699
+ };
700
+ };
701
+ /**
702
+ * Not authenticated as a user
703
+ */
704
+ 401: {
705
+ error: {
706
+ code: string;
707
+ message: string;
708
+ };
709
+ };
710
+ };
711
+ type DeleteUserMeError = DeleteUserMeErrors[keyof DeleteUserMeErrors];
712
+ type DeleteUserMeResponses = {
713
+ /**
714
+ * Account deleted
715
+ */
716
+ 204: void;
717
+ };
718
+ type DeleteUserMeResponse = DeleteUserMeResponses[keyof DeleteUserMeResponses];
719
+ type GetUserMeData = {
720
+ body?: never;
721
+ path?: never;
722
+ query?: never;
723
+ url: '/v1/users/me';
724
+ };
725
+ type GetUserMeErrors = {
726
+ /**
727
+ * User not found
728
+ */
729
+ 404: {
730
+ error: {
731
+ code: string;
732
+ message: string;
733
+ };
734
+ };
735
+ };
736
+ type GetUserMeError = GetUserMeErrors[keyof GetUserMeErrors];
737
+ type GetUserMeResponses = {
738
+ /**
739
+ * Authenticated user
740
+ */
741
+ 200: {
742
+ user: User;
743
+ };
744
+ };
745
+ type GetUserMeResponse = GetUserMeResponses[keyof GetUserMeResponses];
746
+ type InitiateAccountDeletionData = {
747
+ body?: never;
748
+ path?: never;
749
+ query?: never;
750
+ url: '/v1/users/me/deletion';
751
+ };
752
+ type InitiateAccountDeletionErrors = {
753
+ /**
754
+ * Not authenticated as a user
755
+ */
756
+ 401: {
757
+ error: {
758
+ code: string;
759
+ message: string;
760
+ };
761
+ };
762
+ };
763
+ type InitiateAccountDeletionError = InitiateAccountDeletionErrors[keyof InitiateAccountDeletionErrors];
764
+ type InitiateAccountDeletionResponses = {
765
+ /**
766
+ * Deletion initiated
767
+ */
768
+ 201: {
769
+ deletion: {
770
+ uid: string;
771
+ expiresAt: string;
772
+ };
773
+ confirmationToken: string;
774
+ message: string;
775
+ };
776
+ };
777
+ type InitiateAccountDeletionResponse = InitiateAccountDeletionResponses[keyof InitiateAccountDeletionResponses];
778
+ type ExportUserMeData = {
779
+ body?: never;
780
+ path?: never;
781
+ query?: never;
782
+ url: '/v1/users/me/export';
783
+ };
784
+ type ExportUserMeErrors = {
785
+ /**
786
+ * Not authenticated as a user
787
+ */
788
+ 401: {
789
+ error: {
790
+ code: string;
791
+ message: string;
792
+ };
793
+ };
794
+ };
795
+ type ExportUserMeError = ExportUserMeErrors[keyof ExportUserMeErrors];
796
+ type ExportUserMeResponses = {
797
+ /**
798
+ * User data export
799
+ */
800
+ 200: {
801
+ user: User;
802
+ worlds: Array<{
803
+ id: string;
804
+ displayName: string;
805
+ state: string;
806
+ createTime?: string;
807
+ deleteTime?: string | null;
808
+ }>;
809
+ apiTokens: Array<{
810
+ uid: string;
811
+ name: string;
812
+ scope: string;
813
+ createTime?: string;
814
+ }>;
815
+ usageEvents: Array<{
816
+ metric: string;
817
+ quantity: number;
818
+ unit: string;
819
+ createTime: string;
820
+ }>;
821
+ };
822
+ };
823
+ type ExportUserMeResponse = ExportUserMeResponses[keyof ExportUserMeResponses];
824
+ type ListEmbeddingProvidersData = {
825
+ body?: never;
826
+ path?: never;
827
+ query?: never;
828
+ url: '/v1/users/me/embedding-providers';
829
+ };
830
+ type ListEmbeddingProvidersErrors = {
831
+ /**
832
+ * Not authenticated as a user
833
+ */
834
+ 401: {
835
+ error: {
836
+ code: string;
837
+ message: string;
838
+ };
839
+ };
840
+ /**
841
+ * Missing scope
842
+ */
843
+ 403: {
844
+ error: {
845
+ code: string;
846
+ message: string;
847
+ };
848
+ };
849
+ };
850
+ type ListEmbeddingProvidersError = ListEmbeddingProvidersErrors[keyof ListEmbeddingProvidersErrors];
851
+ type ListEmbeddingProvidersResponses = {
852
+ /**
853
+ * Credential metadata, one entry per provider
854
+ */
855
+ 200: EmbeddingProviderList;
856
+ };
857
+ type ListEmbeddingProvidersResponse = ListEmbeddingProvidersResponses[keyof ListEmbeddingProvidersResponses];
858
+ type DeleteEmbeddingProviderCredentialData = {
859
+ body?: never;
860
+ path: {
861
+ /**
862
+ * Embedding provider this credential addresses. A user holds at most one credential per provider.
863
+ */
864
+ provider: 'openai' | 'openrouter';
865
+ };
866
+ query?: never;
867
+ url: '/v1/users/me/embedding-providers/{provider}';
868
+ };
869
+ type DeleteEmbeddingProviderCredentialErrors = {
870
+ /**
871
+ * Not authenticated as a user
872
+ */
873
+ 401: {
874
+ error: {
875
+ code: string;
876
+ message: string;
877
+ };
878
+ };
879
+ /**
880
+ * Missing scope
881
+ */
882
+ 403: {
883
+ error: {
884
+ code: string;
885
+ message: string;
886
+ };
887
+ };
888
+ /**
889
+ * No credential
890
+ */
891
+ 404: {
892
+ error: {
893
+ code: string;
894
+ message: string;
895
+ };
896
+ };
897
+ };
898
+ type DeleteEmbeddingProviderCredentialError = DeleteEmbeddingProviderCredentialErrors[keyof DeleteEmbeddingProviderCredentialErrors];
899
+ type DeleteEmbeddingProviderCredentialResponses = {
900
+ /**
901
+ * Revoked
902
+ */
903
+ 204: void;
904
+ };
905
+ type DeleteEmbeddingProviderCredentialResponse = DeleteEmbeddingProviderCredentialResponses[keyof DeleteEmbeddingProviderCredentialResponses];
906
+ type GetEmbeddingProviderCredentialData = {
907
+ body?: never;
908
+ path: {
909
+ /**
910
+ * Embedding provider this credential addresses. A user holds at most one credential per provider.
911
+ */
912
+ provider: 'openai' | 'openrouter';
913
+ };
914
+ query?: never;
915
+ url: '/v1/users/me/embedding-providers/{provider}';
916
+ };
917
+ type GetEmbeddingProviderCredentialErrors = {
918
+ /**
919
+ * Not authenticated as a user
920
+ */
921
+ 401: {
922
+ error: {
923
+ code: string;
924
+ message: string;
925
+ };
926
+ };
927
+ /**
928
+ * Missing scope
929
+ */
930
+ 403: {
931
+ error: {
932
+ code: string;
933
+ message: string;
934
+ };
935
+ };
936
+ /**
937
+ * No credential
938
+ */
939
+ 404: {
940
+ error: {
941
+ code: string;
942
+ message: string;
943
+ };
944
+ };
945
+ };
946
+ type GetEmbeddingProviderCredentialError = GetEmbeddingProviderCredentialErrors[keyof GetEmbeddingProviderCredentialErrors];
947
+ type GetEmbeddingProviderCredentialResponses = {
948
+ /**
949
+ * Credential metadata
950
+ */
951
+ 200: EmbeddingCredential;
952
+ };
953
+ type GetEmbeddingProviderCredentialResponse = GetEmbeddingProviderCredentialResponses[keyof GetEmbeddingProviderCredentialResponses];
954
+ type SetEmbeddingProviderCredentialData = {
955
+ body: {
956
+ /**
957
+ * The provider API key: 16 to 512 printable characters with no whitespace.
958
+ */
959
+ apiKey: string;
960
+ };
961
+ path: {
962
+ /**
963
+ * Embedding provider this credential addresses. A user holds at most one credential per provider.
964
+ */
965
+ provider: 'openai' | 'openrouter';
966
+ };
967
+ query?: never;
968
+ url: '/v1/users/me/embedding-providers/{provider}';
969
+ };
970
+ type SetEmbeddingProviderCredentialErrors = {
971
+ /**
972
+ * Bad request
973
+ */
974
+ 400: {
975
+ error: {
976
+ code: string;
977
+ message: string;
978
+ };
979
+ };
980
+ /**
981
+ * Not authenticated as a user
982
+ */
983
+ 401: {
984
+ error: {
985
+ code: string;
986
+ message: string;
987
+ };
988
+ };
989
+ /**
990
+ * Missing scope
991
+ */
992
+ 403: {
993
+ error: {
994
+ code: string;
995
+ message: string;
996
+ };
997
+ };
998
+ /**
999
+ * Embeddings are not configured on this deployment
1000
+ */
1001
+ 503: {
1002
+ error: {
1003
+ code: string;
1004
+ message: string;
1005
+ };
1006
+ };
1007
+ };
1008
+ type SetEmbeddingProviderCredentialError = SetEmbeddingProviderCredentialErrors[keyof SetEmbeddingProviderCredentialErrors];
1009
+ type SetEmbeddingProviderCredentialResponses = {
1010
+ /**
1011
+ * Credential stored; metadata only
1012
+ */
1013
+ 200: EmbeddingCredential;
1014
+ };
1015
+ type SetEmbeddingProviderCredentialResponse = SetEmbeddingProviderCredentialResponses[keyof SetEmbeddingProviderCredentialResponses];
1016
+ type ListWorldsData = {
1017
+ body?: never;
1018
+ path?: never;
1019
+ query?: {
1020
+ /**
1021
+ * User email to operate on when using an admin token. User tokens ignore this parameter.
1022
+ */
1023
+ email?: string;
1024
+ };
1025
+ url: '/v1/worlds';
1026
+ };
1027
+ type ListWorldsResponses = {
1028
+ /**
1029
+ * World list
1030
+ */
1031
+ 200: {
1032
+ worlds: Array<World>;
1033
+ };
1034
+ };
1035
+ type ListWorldsResponse = ListWorldsResponses[keyof ListWorldsResponses];
1036
+ type CreateWorldData = {
1037
+ body: CreateWorldRequest;
1038
+ path?: never;
1039
+ query?: never;
1040
+ url: '/v1/worlds';
1041
+ };
1042
+ type CreateWorldErrors = {
1043
+ /**
1044
+ * Bad request
1045
+ */
1046
+ 400: {
1047
+ error: {
1048
+ code: string;
1049
+ message: string;
1050
+ };
1051
+ };
1052
+ /**
1053
+ * World ID already exists
1054
+ */
1055
+ 409: ErrorResponse;
1056
+ /**
1057
+ * Quota exceeded
1058
+ */
1059
+ 429: {
1060
+ error: {
1061
+ code: string;
1062
+ message: string;
1063
+ };
1064
+ quota: {
1065
+ state: string;
1066
+ reason?: string;
1067
+ usagePercent?: number;
1068
+ };
1069
+ };
1070
+ /**
1071
+ * World provisioning failed
1072
+ */
1073
+ 502: ErrorResponse;
1074
+ };
1075
+ type CreateWorldError = CreateWorldErrors[keyof CreateWorldErrors];
1076
+ type CreateWorldResponses = {
1077
+ /**
1078
+ * Created World
1079
+ */
1080
+ 201: {
1081
+ world: World;
1082
+ };
1083
+ };
1084
+ type CreateWorldResponse = CreateWorldResponses[keyof CreateWorldResponses];
1085
+ type DeleteWorldData = {
1086
+ body?: never;
1087
+ path: {
1088
+ /**
1089
+ * World ID minted by worlds-api in w_<ULID> form.
1090
+ */
1091
+ worldId: string;
1092
+ };
1093
+ query?: {
1094
+ /**
1095
+ * User email to operate on when using an admin token. User tokens ignore this parameter.
1096
+ */
1097
+ email?: string;
1098
+ };
1099
+ url: '/v1/worlds/{worldId}';
1100
+ };
1101
+ type DeleteWorldErrors = {
1102
+ /**
1103
+ * Not found
1104
+ */
1105
+ 404: {
1106
+ error: {
1107
+ code: string;
1108
+ message: string;
1109
+ };
1110
+ };
1111
+ };
1112
+ type DeleteWorldError = DeleteWorldErrors[keyof DeleteWorldErrors];
1113
+ type DeleteWorldResponses = {
1114
+ /**
1115
+ * Deleted World
1116
+ */
1117
+ 200: {
1118
+ world: World;
1119
+ };
1120
+ };
1121
+ type DeleteWorldResponse = DeleteWorldResponses[keyof DeleteWorldResponses];
1122
+ type GetWorldData = {
1123
+ body?: never;
1124
+ path: {
1125
+ /**
1126
+ * World ID minted by worlds-api in w_<ULID> form.
1127
+ */
1128
+ worldId: string;
1129
+ };
1130
+ query?: {
1131
+ /**
1132
+ * User email to operate on when using an admin token. User tokens ignore this parameter.
1133
+ */
1134
+ email?: string;
1135
+ };
1136
+ url: '/v1/worlds/{worldId}';
1137
+ };
1138
+ type GetWorldErrors = {
1139
+ /**
1140
+ * Not found
1141
+ */
1142
+ 404: {
1143
+ error: {
1144
+ code: string;
1145
+ message: string;
1146
+ };
1147
+ };
1148
+ };
1149
+ type GetWorldError = GetWorldErrors[keyof GetWorldErrors];
1150
+ type GetWorldResponses = {
1151
+ /**
1152
+ * World
1153
+ */
1154
+ 200: {
1155
+ world: World;
1156
+ };
1157
+ };
1158
+ type GetWorldResponse = GetWorldResponses[keyof GetWorldResponses];
1159
+ type UpdateWorldData = {
1160
+ body: UpdateWorldRequest;
1161
+ path: {
1162
+ /**
1163
+ * World ID minted by worlds-api in w_<ULID> form.
1164
+ */
1165
+ worldId: string;
1166
+ };
1167
+ query?: {
1168
+ /**
1169
+ * User email to operate on when using an admin token. User tokens ignore this parameter.
1170
+ */
1171
+ email?: string;
1172
+ };
1173
+ url: '/v1/worlds/{worldId}';
1174
+ };
1175
+ type UpdateWorldErrors = {
1176
+ /**
1177
+ * Bad request
1178
+ */
1179
+ 400: {
1180
+ error: {
1181
+ code: string;
1182
+ message: string;
1183
+ };
1184
+ };
1185
+ };
1186
+ type UpdateWorldError = UpdateWorldErrors[keyof UpdateWorldErrors];
1187
+ type UpdateWorldResponses = {
1188
+ /**
1189
+ * Updated World
1190
+ */
1191
+ 200: {
1192
+ world: World;
1193
+ };
1194
+ };
1195
+ type UpdateWorldResponse = UpdateWorldResponses[keyof UpdateWorldResponses];
1196
+ type UndeleteWorldData = {
1197
+ body?: never;
1198
+ path: {
1199
+ /**
1200
+ * World ID minted by worlds-api in w_<ULID> form.
1201
+ */
1202
+ worldId: string;
1203
+ };
1204
+ query?: {
1205
+ /**
1206
+ * User email to operate on when using an admin token. User tokens ignore this parameter.
1207
+ */
1208
+ email?: string;
1209
+ };
1210
+ url: '/v1/worlds/{worldId}/undelete';
1211
+ };
1212
+ type UndeleteWorldErrors = {
1213
+ /**
1214
+ * Bad request
1215
+ */
1216
+ 400: {
1217
+ error: {
1218
+ code: string;
1219
+ message: string;
1220
+ };
1221
+ };
1222
+ };
1223
+ type UndeleteWorldError = UndeleteWorldErrors[keyof UndeleteWorldErrors];
1224
+ type UndeleteWorldResponses = {
1225
+ /**
1226
+ * Restored World
1227
+ */
1228
+ 200: {
1229
+ world: World;
1230
+ };
1231
+ };
1232
+ type UndeleteWorldResponse = UndeleteWorldResponses[keyof UndeleteWorldResponses];
1233
+ type ListWorldTokensData = {
1234
+ body?: never;
1235
+ path: {
1236
+ /**
1237
+ * World ID minted by worlds-api in w_<ULID> form.
1238
+ */
1239
+ worldId: string;
1240
+ };
1241
+ query?: {
1242
+ /**
1243
+ * User email to operate on when using an admin token. User tokens ignore this parameter.
1244
+ */
1245
+ email?: string;
1246
+ };
1247
+ url: '/v1/worlds/{worldId}/auth/tokens';
1248
+ };
1249
+ type ListWorldTokensResponses = {
1250
+ /**
1251
+ * World tokens
1252
+ */
1253
+ 200: {
1254
+ tokens: Array<WorldToken>;
1255
+ };
1256
+ };
1257
+ type ListWorldTokensResponse = ListWorldTokensResponses[keyof ListWorldTokensResponses];
1258
+ type CreateWorldTokenData = {
1259
+ body?: WorldTokenCreateRequest;
1260
+ path: {
1261
+ /**
1262
+ * World ID minted by worlds-api in w_<ULID> form.
1263
+ */
1264
+ worldId: string;
1265
+ };
1266
+ query?: {
1267
+ /**
1268
+ * User email to operate on when using an admin token. User tokens ignore this parameter.
1269
+ */
1270
+ email?: string;
1271
+ };
1272
+ url: '/v1/worlds/{worldId}/auth/tokens';
1273
+ };
1274
+ type CreateWorldTokenResponses = {
1275
+ /**
1276
+ * Created World token
1277
+ */
1278
+ 201: {
1279
+ token: WorldTokenCreated;
1280
+ };
1281
+ };
1282
+ type CreateWorldTokenResponse = CreateWorldTokenResponses[keyof CreateWorldTokenResponses];
1283
+ type DeleteWorldTokenData = {
1284
+ body?: never;
1285
+ path: {
1286
+ /**
1287
+ * World ID minted by worlds-api in w_<ULID> form.
1288
+ */
1289
+ worldId: string;
1290
+ tokenUid: string;
1291
+ };
1292
+ query?: {
1293
+ /**
1294
+ * User email to operate on when using an admin token. User tokens ignore this parameter.
1295
+ */
1296
+ email?: string;
1297
+ };
1298
+ url: '/v1/worlds/{worldId}/auth/tokens/{tokenUid}';
1299
+ };
1300
+ type DeleteWorldTokenResponses = {
1301
+ /**
1302
+ * Revoked
1303
+ */
1304
+ 204: void;
1305
+ };
1306
+ type DeleteWorldTokenResponse = DeleteWorldTokenResponses[keyof DeleteWorldTokenResponses];
1307
+ type ListPlatformTokensData = {
1308
+ body?: never;
1309
+ path?: never;
1310
+ query?: never;
1311
+ url: '/v1/auth/api-tokens';
1312
+ };
1313
+ type ListPlatformTokensResponses = {
1314
+ /**
1315
+ * Platform tokens
1316
+ */
1317
+ 200: {
1318
+ tokens: Array<PlatformToken>;
1319
+ };
1320
+ };
1321
+ type ListPlatformTokensResponse = ListPlatformTokensResponses[keyof ListPlatformTokensResponses];
1322
+ type CreatePlatformTokenData = {
1323
+ body: PlatformTokenCreateRequest;
1324
+ path?: never;
1325
+ query?: never;
1326
+ url: '/v1/auth/api-tokens';
1327
+ };
1328
+ type CreatePlatformTokenErrors = {
1329
+ /**
1330
+ * Permission denied
1331
+ */
1332
+ 403: {
1333
+ error: {
1334
+ code: string;
1335
+ message: string;
1336
+ };
1337
+ };
1338
+ };
1339
+ type CreatePlatformTokenError = CreatePlatformTokenErrors[keyof CreatePlatformTokenErrors];
1340
+ type CreatePlatformTokenResponses = {
1341
+ /**
1342
+ * Created platform token
1343
+ */
1344
+ 201: PlatformTokenCreateResponse;
1345
+ };
1346
+ type CreatePlatformTokenResponse = CreatePlatformTokenResponses[keyof CreatePlatformTokenResponses];
1347
+ type DeletePlatformTokenData = {
1348
+ body?: never;
1349
+ path: {
1350
+ tokenName: string;
1351
+ };
1352
+ query?: never;
1353
+ url: '/v1/auth/api-tokens/{tokenName}';
1354
+ };
1355
+ type DeletePlatformTokenResponses = {
1356
+ /**
1357
+ * Deleted platform token
1358
+ */
1359
+ 200: {
1360
+ token: string;
1361
+ };
1362
+ };
1363
+ type DeletePlatformTokenResponse = DeletePlatformTokenResponses[keyof DeletePlatformTokenResponses];
1364
+ type CreateNamedPlatformTokenData = {
1365
+ body?: PlatformTokenCreateRequest;
1366
+ path: {
1367
+ tokenName: string;
1368
+ };
1369
+ query?: never;
1370
+ url: '/v1/auth/api-tokens/{tokenName}';
1371
+ };
1372
+ type CreateNamedPlatformTokenResponses = {
1373
+ /**
1374
+ * Created platform token
1375
+ */
1376
+ 201: PlatformTokenCreateResponse;
1377
+ };
1378
+ type CreateNamedPlatformTokenResponse = CreateNamedPlatformTokenResponses[keyof CreateNamedPlatformTokenResponses];
1379
+ type ValidatePlatformTokenData = {
1380
+ body?: never;
1381
+ path?: never;
1382
+ query?: never;
1383
+ url: '/v1/auth/api-tokens/validate';
1384
+ };
1385
+ type ValidatePlatformTokenResponses = {
1386
+ /**
1387
+ * Token validity
1388
+ */
1389
+ 200: {
1390
+ exp: number;
1391
+ };
1392
+ };
1393
+ type ValidatePlatformTokenResponse = ValidatePlatformTokenResponses[keyof ValidatePlatformTokenResponses];
1394
+ type GetWorldUsageData = {
1395
+ body?: never;
1396
+ path: {
1397
+ /**
1398
+ * World ID minted by worlds-api in w_<ULID> form.
1399
+ */
1400
+ worldId: string;
1401
+ };
1402
+ query?: {
1403
+ email?: string;
1404
+ from?: string;
1405
+ to?: string;
1406
+ };
1407
+ url: '/v1/worlds/{worldId}/usage';
1408
+ };
1409
+ type GetWorldUsageResponses = {
1410
+ /**
1411
+ * Usage summary
1412
+ */
1413
+ 200: {
1414
+ usage: {
1415
+ world: string;
1416
+ total: Array<{
1417
+ metric: string;
1418
+ quantity: number;
1419
+ }>;
1420
+ events: Array<UsageEvent>;
1421
+ };
1422
+ quota: QuotaSummary;
1423
+ };
1424
+ };
1425
+ type GetWorldUsageResponse = GetWorldUsageResponses[keyof GetWorldUsageResponses];
1426
+ type RecordWorldUsageData = {
1427
+ body: UsageRecordRequest;
1428
+ path: {
1429
+ /**
1430
+ * World ID minted by worlds-api in w_<ULID> form.
1431
+ */
1432
+ worldId: string;
1433
+ };
1434
+ query?: never;
1435
+ url: '/v1/worlds/{worldId}/usage';
1436
+ };
1437
+ type RecordWorldUsageErrors = {
1438
+ /**
1439
+ * Limit exceeded
1440
+ */
1441
+ 429: {
1442
+ error: {
1443
+ code: string;
1444
+ message: string;
1445
+ };
1446
+ quota: {
1447
+ state: string;
1448
+ reason?: string;
1449
+ };
1450
+ };
1451
+ };
1452
+ type RecordWorldUsageError = RecordWorldUsageErrors[keyof RecordWorldUsageErrors];
1453
+ type RecordWorldUsageResponses = {
1454
+ /**
1455
+ * Usage accepted
1456
+ */
1457
+ 201: {
1458
+ accepted: boolean;
1459
+ };
1460
+ };
1461
+ type RecordWorldUsageResponse = RecordWorldUsageResponses[keyof RecordWorldUsageResponses];
1462
+ type GetWorldLimitsData = {
1463
+ body?: never;
1464
+ path: {
1465
+ /**
1466
+ * World ID minted by worlds-api in w_<ULID> form.
1467
+ */
1468
+ worldId: string;
1469
+ };
1470
+ query?: {
1471
+ email?: string;
1472
+ };
1473
+ url: '/v1/worlds/{worldId}/limits';
1474
+ };
1475
+ type GetWorldLimitsResponses = {
1476
+ /**
1477
+ * World limits
1478
+ */
1479
+ 200: {
1480
+ limits: Array<{
1481
+ metric: string;
1482
+ limitQuantity: number;
1483
+ }>;
1484
+ };
1485
+ };
1486
+ type GetWorldLimitsResponse = GetWorldLimitsResponses[keyof GetWorldLimitsResponses];
1487
+ type GetWorldBillingData = {
1488
+ body?: never;
1489
+ path: {
1490
+ /**
1491
+ * World ID minted by worlds-api in w_<ULID> form.
1492
+ */
1493
+ worldId: string;
1494
+ };
1495
+ query?: {
1496
+ email?: string;
1497
+ };
1498
+ url: '/v1/worlds/{worldId}/billing';
1499
+ };
1500
+ type GetWorldBillingResponses = {
1501
+ /**
1502
+ * World billing state
1503
+ */
1504
+ 200: {
1505
+ billing: Billing;
1506
+ quota: QuotaSummary;
1507
+ };
1508
+ };
1509
+ type GetWorldBillingResponse = GetWorldBillingResponses[keyof GetWorldBillingResponses];
1510
+ type ListWorldInvoicesData = {
1511
+ body?: never;
1512
+ path: {
1513
+ /**
1514
+ * World ID minted by worlds-api in w_<ULID> form.
1515
+ */
1516
+ worldId: string;
1517
+ };
1518
+ query?: {
1519
+ email?: string;
1520
+ };
1521
+ url: '/v1/worlds/{worldId}/billing/invoices';
1522
+ };
1523
+ type ListWorldInvoicesResponses = {
1524
+ /**
1525
+ * World invoices
1526
+ */
1527
+ 200: {
1528
+ invoices: Array<unknown>;
1529
+ };
1530
+ };
1531
+ type ListWorldInvoicesResponse = ListWorldInvoicesResponses[keyof ListWorldInvoicesResponses];
1532
+ type CancelWorldSubscriptionData = {
1533
+ body?: never;
1534
+ path: {
1535
+ /**
1536
+ * World ID minted by worlds-api in w_<ULID> form.
1537
+ */
1538
+ worldId: string;
1539
+ };
1540
+ query?: {
1541
+ email?: string;
1542
+ };
1543
+ url: '/v1/worlds/{worldId}/billing/cancel';
1544
+ };
1545
+ type CancelWorldSubscriptionErrors = {
1546
+ /**
1547
+ * No subscription to cancel
1548
+ */
1549
+ 400: {
1550
+ error: {
1551
+ code: string;
1552
+ message: string;
1553
+ };
1554
+ };
1555
+ };
1556
+ type CancelWorldSubscriptionError = CancelWorldSubscriptionErrors[keyof CancelWorldSubscriptionErrors];
1557
+ type CancelWorldSubscriptionResponses = {
1558
+ /**
1559
+ * Cancelled subscription
1560
+ */
1561
+ 200: {
1562
+ billing: {
1563
+ world: string;
1564
+ state: string;
1565
+ provider: string;
1566
+ customerConfigured: boolean;
1567
+ subscriptionConfigured: boolean;
1568
+ paymentRequired: boolean;
1569
+ };
1570
+ };
1571
+ };
1572
+ type CancelWorldSubscriptionResponse = CancelWorldSubscriptionResponses[keyof CancelWorldSubscriptionResponses];
1573
+ type OpenWorldBillingPortalData = {
1574
+ body?: never;
1575
+ path: {
1576
+ /**
1577
+ * World ID minted by worlds-api in w_<ULID> form.
1578
+ */
1579
+ worldId: string;
1580
+ };
1581
+ query?: {
1582
+ email?: string;
1583
+ };
1584
+ url: '/v1/worlds/{worldId}/billing/openPortal';
1585
+ };
1586
+ type OpenWorldBillingPortalErrors = {
1587
+ /**
1588
+ * Not available
1589
+ */
1590
+ 400: {
1591
+ error: {
1592
+ code: string;
1593
+ message: string;
1594
+ };
1595
+ };
1596
+ };
1597
+ type OpenWorldBillingPortalError = OpenWorldBillingPortalErrors[keyof OpenWorldBillingPortalErrors];
1598
+ type ListAdminAuditEventsData = {
1599
+ body?: never;
1600
+ path?: never;
1601
+ query?: {
1602
+ limit?: number;
1603
+ offset?: number | null;
1604
+ };
1605
+ url: '/v1/admin/audit-events';
1606
+ };
1607
+ type ListAdminAuditEventsErrors = {
1608
+ /**
1609
+ * Not authenticated
1610
+ */
1611
+ 401: {
1612
+ error: {
1613
+ code: string;
1614
+ message: string;
1615
+ };
1616
+ };
1617
+ /**
1618
+ * Insufficient scope
1619
+ */
1620
+ 403: {
1621
+ error: {
1622
+ code: string;
1623
+ message: string;
1624
+ };
1625
+ };
1626
+ };
1627
+ type ListAdminAuditEventsError = ListAdminAuditEventsErrors[keyof ListAdminAuditEventsErrors];
1628
+ type ListAdminAuditEventsResponses = {
1629
+ /**
1630
+ * List of admin audit events
1631
+ */
1632
+ 200: {
1633
+ auditEvents: Array<{
1634
+ uid: string;
1635
+ actorTokenUid?: string | null;
1636
+ action: string;
1637
+ targetResourceName: string;
1638
+ outcome: string;
1639
+ errorCode?: string | null;
1640
+ createTime: string;
1641
+ }>;
1642
+ total?: number;
1643
+ };
1644
+ };
1645
+ type ListAdminAuditEventsResponse = ListAdminAuditEventsResponses[keyof ListAdminAuditEventsResponses];
1646
+ type GetUserPlanData = {
1647
+ body?: never;
1648
+ path?: never;
1649
+ query?: never;
1650
+ url: '/v1/users/me/plan';
1651
+ };
1652
+ type GetUserPlanErrors = {
1653
+ /**
1654
+ * User not found
1655
+ */
1656
+ 404: {
1657
+ error: {
1658
+ code: string;
1659
+ message: string;
1660
+ };
1661
+ };
1662
+ };
1663
+ type GetUserPlanError = GetUserPlanErrors[keyof GetUserPlanErrors];
1664
+ type GetUserPlanResponses = {
1665
+ /**
1666
+ * The plan and usage against its daily write budget
1667
+ */
1668
+ 200: UserPlan;
1669
+ };
1670
+ type GetUserPlanResponse = GetUserPlanResponses[keyof GetUserPlanResponses];
1671
+ type SetUserPlanData = {
1672
+ body: {
1673
+ /**
1674
+ * The user's plan. It sets their daily database write budget.
1675
+ */
1676
+ plan: 'free' | 'pro';
1677
+ };
1678
+ path: {
1679
+ userUid: string;
1680
+ };
1681
+ query?: never;
1682
+ url: '/v1/admin/users/{userUid}/plan';
1683
+ };
1684
+ type SetUserPlanErrors = {
1685
+ /**
1686
+ * User not found
1687
+ */
1688
+ 404: {
1689
+ error: {
1690
+ code: string;
1691
+ message: string;
1692
+ };
1693
+ };
1694
+ /**
1695
+ * The plan was saved but the data plane did not accept its budget (BUDGET_SYNC_FAILED). Repeat the call.
1696
+ */
1697
+ 502: {
1698
+ error: {
1699
+ code: string;
1700
+ message: string;
1701
+ };
1702
+ };
1703
+ };
1704
+ type SetUserPlanError = SetUserPlanErrors[keyof SetUserPlanErrors];
1705
+ type SetUserPlanResponses = {
1706
+ /**
1707
+ * The plan now in effect
1708
+ */
1709
+ 200: {
1710
+ userUid: string;
1711
+ /**
1712
+ * The user's plan. It sets their daily database write budget.
1713
+ */
1714
+ plan: 'free' | 'pro';
1715
+ dailyRowWrites: number;
1716
+ };
1717
+ };
1718
+ type SetUserPlanResponse = SetUserPlanResponses[keyof SetUserPlanResponses];
1719
+ type CreateCheckoutSessionData = {
1720
+ body?: never;
1721
+ path?: never;
1722
+ query?: never;
1723
+ url: '/v1/users/me/billing/checkout';
1724
+ };
1725
+ type CreateCheckoutSessionErrors = {
1726
+ /**
1727
+ * The user already has a subscription (ALREADY_SUBSCRIBED).
1728
+ */
1729
+ 409: {
1730
+ error: {
1731
+ code: string;
1732
+ message: string;
1733
+ };
1734
+ };
1735
+ /**
1736
+ * Stripe refused the request (STRIPE_ERROR).
1737
+ */
1738
+ 502: {
1739
+ error: {
1740
+ code: string;
1741
+ message: string;
1742
+ };
1743
+ };
1744
+ /**
1745
+ * Billing is not configured (BILLING_NOT_CONFIGURED).
1746
+ */
1747
+ 503: {
1748
+ error: {
1749
+ code: string;
1750
+ message: string;
1751
+ };
1752
+ };
1753
+ };
1754
+ type CreateCheckoutSessionError = CreateCheckoutSessionErrors[keyof CreateCheckoutSessionErrors];
1755
+ type CreateCheckoutSessionResponses = {
1756
+ /**
1757
+ * Checkout session created
1758
+ */
1759
+ 200: BillingSessionUrl;
1760
+ };
1761
+ type CreateCheckoutSessionResponse = CreateCheckoutSessionResponses[keyof CreateCheckoutSessionResponses];
1762
+ type CreateBillingPortalSessionData = {
1763
+ body?: never;
1764
+ path?: never;
1765
+ query?: never;
1766
+ url: '/v1/users/me/billing/portal';
1767
+ };
1768
+ type CreateBillingPortalSessionErrors = {
1769
+ /**
1770
+ * The user has no billing account yet (NO_BILLING_ACCOUNT).
1771
+ */
1772
+ 409: {
1773
+ error: {
1774
+ code: string;
1775
+ message: string;
1776
+ };
1777
+ };
1778
+ /**
1779
+ * Stripe refused the request (STRIPE_ERROR).
1780
+ */
1781
+ 502: {
1782
+ error: {
1783
+ code: string;
1784
+ message: string;
1785
+ };
1786
+ };
1787
+ /**
1788
+ * Billing is not configured (BILLING_NOT_CONFIGURED).
1789
+ */
1790
+ 503: {
1791
+ error: {
1792
+ code: string;
1793
+ message: string;
1794
+ };
1795
+ };
1796
+ };
1797
+ type CreateBillingPortalSessionError = CreateBillingPortalSessionErrors[keyof CreateBillingPortalSessionErrors];
1798
+ type CreateBillingPortalSessionResponses = {
1799
+ /**
1800
+ * Portal session created
1801
+ */
1802
+ 200: BillingSessionUrl;
1803
+ };
1804
+ type CreateBillingPortalSessionResponse = CreateBillingPortalSessionResponses[keyof CreateBillingPortalSessionResponses];
1805
+ type Options$1<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options<TData, ThrowOnError, TResponse> & {
1806
+ /**
1807
+ * You can provide a client instance returned by `createClient()` instead of
1808
+ * individual options. This might be also useful if you want to implement a
1809
+ * custom client.
1810
+ */
1811
+ client?: Client;
1812
+ /**
1813
+ * You can pass arbitrary values through the `meta` object. This can be
1814
+ * used to access values that aren't defined as part of the SDK function.
1815
+ */
1816
+ meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
1817
+ };
1818
+ /**
1819
+ * Get health
1820
+ */
1821
+ export declare const getHealth: <ThrowOnError extends boolean = false>(options?: Options$1<GetHealthData, ThrowOnError>) => RequestResult<GetHealthResponses, unknown, ThrowOnError>;
1822
+ /**
1823
+ * Get readiness
1824
+ *
1825
+ * Returns ready only when the management database uses the canonical world-identity schema.
1826
+ */
1827
+ export declare const getReadiness: <ThrowOnError extends boolean = false>(options?: Options$1<GetReadinessData, ThrowOnError>) => RequestResult<GetReadinessResponses, GetReadinessErrors, ThrowOnError>;
1828
+ /**
1829
+ * Start magic-link login
1830
+ *
1831
+ * Sends a one-time code to an allowlisted email. Unauthenticated; limited to 5 requests per minute per IP. Every outcome (missing email, rate-limited, not allowlisted, unconfigured) returns 200 `{ ok: true }` so the endpoint does not reveal which emails are on the beta list; no code is sent to an email that is not allowlisted.
1832
+ */
1833
+ export declare const login: <ThrowOnError extends boolean = false>(options?: Options$1<LoginData, ThrowOnError>) => RequestResult<LoginResponses, unknown, ThrowOnError>;
1834
+ /**
1835
+ * Redeem login code for a session token
1836
+ *
1837
+ * Redeems the WorkOS magic-auth code and mints a `wzp_` session token. Unauthenticated; limited to 10 requests per minute per IP.
1838
+ */
1839
+ export declare const verifyLogin: <ThrowOnError extends boolean = false>(options?: Options$1<VerifyLoginData, ThrowOnError>) => RequestResult<VerifyLoginResponses, VerifyLoginErrors, ThrowOnError>;
1840
+ /**
1841
+ * Mint a console session token (admin)
1842
+ *
1843
+ * Admin-only. Mints a 30-day console session token for an arbitrary email, creating the user when needed. Requires the `admin` scope.
1844
+ */
1845
+ export declare const mintWorkosSession: <ThrowOnError extends boolean = false>(options?: Options$1<MintWorkosSessionData, ThrowOnError>) => RequestResult<MintWorkosSessionResponses, MintWorkosSessionErrors, ThrowOnError>;
1846
+ /**
1847
+ * Mint a console session token (deprecated path)
1848
+ *
1849
+ * Deprecated: use `POST /v1/auth/workos`. This path replies with a 308 redirect to it, which keeps the method and body. Admin-only; requires the `admin` scope.
1850
+ *
1851
+ * @deprecated
1852
+ */
1853
+ export declare const createWorkosSession: <ThrowOnError extends boolean = false>(options?: Options$1<CreateWorkosSessionData, ThrowOnError>) => RequestResult<CreateWorkosSessionResponses, CreateWorkosSessionErrors, ThrowOnError>;
1854
+ /**
1855
+ * Delete the authenticated user's account (two-step confirmation)
1856
+ */
1857
+ export declare const deleteUserMe: <ThrowOnError extends boolean = false>(options: Options$1<DeleteUserMeData, ThrowOnError>) => RequestResult<DeleteUserMeResponses, DeleteUserMeErrors, ThrowOnError>;
1858
+ /**
1859
+ * Get authenticated user
1860
+ */
1861
+ export declare const getUserMe: <ThrowOnError extends boolean = false>(options?: Options$1<GetUserMeData, ThrowOnError>) => RequestResult<GetUserMeResponses, GetUserMeErrors, ThrowOnError>;
1862
+ /**
1863
+ * Initiate account deletion (returns a short-lived confirmation token)
1864
+ */
1865
+ export declare const initiateAccountDeletion: <ThrowOnError extends boolean = false>(options?: Options$1<InitiateAccountDeletionData, ThrowOnError>) => RequestResult<InitiateAccountDeletionResponses, InitiateAccountDeletionErrors, ThrowOnError>;
1866
+ /**
1867
+ * Export the data Wazoo holds on the authenticated user
1868
+ */
1869
+ export declare const exportUserMe: <ThrowOnError extends boolean = false>(options?: Options$1<ExportUserMeData, ThrowOnError>) => RequestResult<ExportUserMeResponses, ExportUserMeErrors, ThrowOnError>;
1870
+ /**
1871
+ * List embedding provider credentials
1872
+ *
1873
+ * Lists the caller's bring-your-own-key embedding credentials, revoked ones included so their status stays readable. Metadata only: a key is never returned.
1874
+ */
1875
+ export declare const listEmbeddingProviders: <ThrowOnError extends boolean = false>(options?: Options$1<ListEmbeddingProvidersData, ThrowOnError>) => RequestResult<ListEmbeddingProvidersResponses, ListEmbeddingProvidersErrors, ThrowOnError>;
1876
+ /**
1877
+ * Revoke an embedding provider credential
1878
+ *
1879
+ * Revokes the caller's credential for one provider. The stored key is erased and every world on that provider's models falls back to keyword search until a new key is stored and the world is reindexed. Worlds on another provider's models are not affected.
1880
+ */
1881
+ export declare const deleteEmbeddingProviderCredential: <ThrowOnError extends boolean = false>(options: Options$1<DeleteEmbeddingProviderCredentialData, ThrowOnError>) => RequestResult<DeleteEmbeddingProviderCredentialResponses, DeleteEmbeddingProviderCredentialErrors, ThrowOnError>;
1882
+ /**
1883
+ * Get an embedding provider credential's status
1884
+ *
1885
+ * Returns the metadata of the caller's credential for one provider. The key itself is never returned.
1886
+ */
1887
+ export declare const getEmbeddingProviderCredential: <ThrowOnError extends boolean = false>(options: Options$1<GetEmbeddingProviderCredentialData, ThrowOnError>) => RequestResult<GetEmbeddingProviderCredentialResponses, GetEmbeddingProviderCredentialErrors, ThrowOnError>;
1888
+ /**
1889
+ * Set an embedding provider credential
1890
+ *
1891
+ * Stores or rotates the caller's API key for one embedding provider. The key is encrypted at rest, write-only, and never returned or logged. Choose a model, reindex, and search with a world token on the data plane afterwards. Returns 503 EMBEDDINGS_NOT_CONFIGURED when the deployment has embeddings disabled.
1892
+ */
1893
+ export declare const setEmbeddingProviderCredential: <ThrowOnError extends boolean = false>(options: Options$1<SetEmbeddingProviderCredentialData, ThrowOnError>) => RequestResult<SetEmbeddingProviderCredentialResponses, SetEmbeddingProviderCredentialErrors, ThrowOnError>;
1894
+ /**
1895
+ * List worlds
1896
+ */
1897
+ export declare const listWorlds: <ThrowOnError extends boolean = false>(options?: Options$1<ListWorldsData, ThrowOnError>) => RequestResult<ListWorldsResponses, unknown, ThrowOnError>;
1898
+ /**
1899
+ * Create world
1900
+ */
1901
+ export declare const createWorld: <ThrowOnError extends boolean = false>(options: Options$1<CreateWorldData, ThrowOnError>) => RequestResult<CreateWorldResponses, CreateWorldErrors, ThrowOnError>;
1902
+ /**
1903
+ * Delete world
1904
+ */
1905
+ export declare const deleteWorld: <ThrowOnError extends boolean = false>(options: Options$1<DeleteWorldData, ThrowOnError>) => RequestResult<DeleteWorldResponses, DeleteWorldErrors, ThrowOnError>;
1906
+ /**
1907
+ * Get world
1908
+ */
1909
+ export declare const getWorld: <ThrowOnError extends boolean = false>(options: Options$1<GetWorldData, ThrowOnError>) => RequestResult<GetWorldResponses, GetWorldErrors, ThrowOnError>;
1910
+ /**
1911
+ * Update world
1912
+ */
1913
+ export declare const updateWorld: <ThrowOnError extends boolean = false>(options: Options$1<UpdateWorldData, ThrowOnError>) => RequestResult<UpdateWorldResponses, UpdateWorldErrors, ThrowOnError>;
1914
+ /**
1915
+ * Undelete world
1916
+ */
1917
+ export declare const undeleteWorld: <ThrowOnError extends boolean = false>(options: Options$1<UndeleteWorldData, ThrowOnError>) => RequestResult<UndeleteWorldResponses, UndeleteWorldErrors, ThrowOnError>;
1918
+ /**
1919
+ * List world tokens
1920
+ */
1921
+ export declare const listWorldTokens: <ThrowOnError extends boolean = false>(options: Options$1<ListWorldTokensData, ThrowOnError>) => RequestResult<ListWorldTokensResponses, unknown, ThrowOnError>;
1922
+ /**
1923
+ * Create world token
1924
+ */
1925
+ export declare const createWorldToken: <ThrowOnError extends boolean = false>(options: Options$1<CreateWorldTokenData, ThrowOnError>) => RequestResult<CreateWorldTokenResponses, unknown, ThrowOnError>;
1926
+ /**
1927
+ * Revoke world token
1928
+ */
1929
+ export declare const deleteWorldToken: <ThrowOnError extends boolean = false>(options: Options$1<DeleteWorldTokenData, ThrowOnError>) => RequestResult<DeleteWorldTokenResponses, unknown, ThrowOnError>;
1930
+ /**
1931
+ * List platform tokens
1932
+ */
1933
+ export declare const listPlatformTokens: <ThrowOnError extends boolean = false>(options?: Options$1<ListPlatformTokensData, ThrowOnError>) => RequestResult<ListPlatformTokensResponses, unknown, ThrowOnError>;
1934
+ /**
1935
+ * Create platform token
1936
+ */
1937
+ export declare const createPlatformToken: <ThrowOnError extends boolean = false>(options: Options$1<CreatePlatformTokenData, ThrowOnError>) => RequestResult<CreatePlatformTokenResponses, CreatePlatformTokenErrors, ThrowOnError>;
1938
+ /**
1939
+ * Revoke platform token
1940
+ */
1941
+ export declare const deletePlatformToken: <ThrowOnError extends boolean = false>(options: Options$1<DeletePlatformTokenData, ThrowOnError>) => RequestResult<DeletePlatformTokenResponses, unknown, ThrowOnError>;
1942
+ /**
1943
+ * Create named platform token
1944
+ */
1945
+ export declare const createNamedPlatformToken: <ThrowOnError extends boolean = false>(options: Options$1<CreateNamedPlatformTokenData, ThrowOnError>) => RequestResult<CreateNamedPlatformTokenResponses, unknown, ThrowOnError>;
1946
+ /**
1947
+ * Validate platform token
1948
+ */
1949
+ export declare const validatePlatformToken: <ThrowOnError extends boolean = false>(options?: Options$1<ValidatePlatformTokenData, ThrowOnError>) => RequestResult<ValidatePlatformTokenResponses, unknown, ThrowOnError>;
1950
+ /**
1951
+ * Get world usage
1952
+ */
1953
+ export declare const getWorldUsage: <ThrowOnError extends boolean = false>(options: Options$1<GetWorldUsageData, ThrowOnError>) => RequestResult<GetWorldUsageResponses, unknown, ThrowOnError>;
1954
+ /**
1955
+ * Record world usage
1956
+ */
1957
+ export declare const recordWorldUsage: <ThrowOnError extends boolean = false>(options: Options$1<RecordWorldUsageData, ThrowOnError>) => RequestResult<RecordWorldUsageResponses, RecordWorldUsageErrors, ThrowOnError>;
1958
+ /**
1959
+ * Get world limits
1960
+ */
1961
+ export declare const getWorldLimits: <ThrowOnError extends boolean = false>(options: Options$1<GetWorldLimitsData, ThrowOnError>) => RequestResult<GetWorldLimitsResponses, unknown, ThrowOnError>;
1962
+ /**
1963
+ * Get world billing
1964
+ */
1965
+ export declare const getWorldBilling: <ThrowOnError extends boolean = false>(options: Options$1<GetWorldBillingData, ThrowOnError>) => RequestResult<GetWorldBillingResponses, unknown, ThrowOnError>;
1966
+ /**
1967
+ * List world invoices
1968
+ */
1969
+ export declare const listWorldInvoices: <ThrowOnError extends boolean = false>(options: Options$1<ListWorldInvoicesData, ThrowOnError>) => RequestResult<ListWorldInvoicesResponses, unknown, ThrowOnError>;
1970
+ /**
1971
+ * Cancel world subscription
1972
+ */
1973
+ export declare const cancelWorldSubscription: <ThrowOnError extends boolean = false>(options: Options$1<CancelWorldSubscriptionData, ThrowOnError>) => RequestResult<CancelWorldSubscriptionResponses, CancelWorldSubscriptionErrors, ThrowOnError>;
1974
+ /**
1975
+ * Open billing portal
1976
+ */
1977
+ export declare const openWorldBillingPortal: <ThrowOnError extends boolean = false>(options: Options$1<OpenWorldBillingPortalData, ThrowOnError>) => RequestResult<unknown, OpenWorldBillingPortalErrors, ThrowOnError>;
1978
+ /**
1979
+ * List admin audit events
1980
+ */
1981
+ export declare const listAdminAuditEvents: <ThrowOnError extends boolean = false>(options?: Options$1<ListAdminAuditEventsData, ThrowOnError>) => RequestResult<ListAdminAuditEventsResponses, ListAdminAuditEventsErrors, ThrowOnError>;
1982
+ /**
1983
+ * Get the authenticated user's plan and today's write usage
1984
+ */
1985
+ export declare const getUserPlan: <ThrowOnError extends boolean = false>(options?: Options$1<GetUserPlanData, ThrowOnError>) => RequestResult<GetUserPlanResponses, GetUserPlanErrors, ThrowOnError>;
1986
+ /**
1987
+ * Set a user's plan
1988
+ *
1989
+ * Admin-only. Stores the plan and applies its daily write budget in the data plane. Idempotent: if the data plane cannot be reached the plan is still saved, the call returns 502 BUDGET_SYNC_FAILED, and repeating it retries the sync.
1990
+ */
1991
+ export declare const setUserPlan: <ThrowOnError extends boolean = false>(options: Options$1<SetUserPlanData, ThrowOnError>) => RequestResult<SetUserPlanResponses, SetUserPlanErrors, ThrowOnError>;
1992
+ /**
1993
+ * Start a Pro subscription checkout
1994
+ *
1995
+ * Creates a Stripe Checkout session for the Pro plan and returns the hosted page's URL. The plan changes when Stripe confirms the payment (a webhook), not when this call returns, so the console shows the new plan shortly after the user comes back.
1996
+ */
1997
+ export declare const createCheckoutSession: <ThrowOnError extends boolean = false>(options?: Options$1<CreateCheckoutSessionData, ThrowOnError>) => RequestResult<CreateCheckoutSessionResponses, CreateCheckoutSessionErrors, ThrowOnError>;
1998
+ /**
1999
+ * Open the Stripe billing portal
2000
+ *
2001
+ * Creates a Stripe billing portal session where the user can update their card, see invoices or cancel, and returns its URL.
2002
+ */
2003
+ export declare const createBillingPortalSession: <ThrowOnError extends boolean = false>(options?: Options$1<CreateBillingPortalSessionData, ThrowOnError>) => RequestResult<CreateBillingPortalSessionResponses, CreateBillingPortalSessionErrors, ThrowOnError>;
2004
+ export declare const client: Client;
2005
+ export type { Billing, BillingSessionUrl, CancelWorldSubscriptionData, CancelWorldSubscriptionError, CancelWorldSubscriptionErrors, CancelWorldSubscriptionResponse, CancelWorldSubscriptionResponses, Client, ClientOptions, CreateBillingPortalSessionData, CreateBillingPortalSessionError, CreateBillingPortalSessionErrors, CreateBillingPortalSessionResponse, CreateBillingPortalSessionResponses, CreateCheckoutSessionData, CreateCheckoutSessionError, CreateCheckoutSessionErrors, CreateCheckoutSessionResponse, CreateCheckoutSessionResponses, CreateNamedPlatformTokenData, CreateNamedPlatformTokenResponse, CreateNamedPlatformTokenResponses, CreatePlatformTokenData, CreatePlatformTokenError, CreatePlatformTokenErrors, CreatePlatformTokenResponse, CreatePlatformTokenResponses, CreateWorkosSessionData, CreateWorkosSessionError, CreateWorkosSessionErrors, CreateWorkosSessionResponse, CreateWorkosSessionResponses, CreateWorldData, CreateWorldError, CreateWorldErrors, CreateWorldRequest, CreateWorldResponse, CreateWorldResponses, CreateWorldTokenData, CreateWorldTokenResponse, CreateWorldTokenResponses, DeleteEmbeddingProviderCredentialData, DeleteEmbeddingProviderCredentialError, DeleteEmbeddingProviderCredentialErrors, DeleteEmbeddingProviderCredentialResponse, DeleteEmbeddingProviderCredentialResponses, DeletePlatformTokenData, DeletePlatformTokenResponse, DeletePlatformTokenResponses, DeleteUserMeData, DeleteUserMeError, DeleteUserMeErrors, DeleteUserMeResponse, DeleteUserMeResponses, DeleteWorldData, DeleteWorldError, DeleteWorldErrors, DeleteWorldResponse, DeleteWorldResponses, DeleteWorldTokenData, DeleteWorldTokenResponse, DeleteWorldTokenResponses, EmbeddingCredential, EmbeddingProviderList, ErrorResponse, ExportUserMeData, ExportUserMeError, ExportUserMeErrors, ExportUserMeResponse, ExportUserMeResponses, GetEmbeddingProviderCredentialData, GetEmbeddingProviderCredentialError, GetEmbeddingProviderCredentialErrors, GetEmbeddingProviderCredentialResponse, GetEmbeddingProviderCredentialResponses, GetHealthData, GetHealthResponse, GetHealthResponses, GetReadinessData, GetReadinessError, GetReadinessErrors, GetReadinessResponse, GetReadinessResponses, GetUserMeData, GetUserMeError, GetUserMeErrors, GetUserMeResponse, GetUserMeResponses, GetUserPlanData, GetUserPlanError, GetUserPlanErrors, GetUserPlanResponse, GetUserPlanResponses, GetWorldBillingData, GetWorldBillingResponse, GetWorldBillingResponses, GetWorldData, GetWorldError, GetWorldErrors, GetWorldLimitsData, GetWorldLimitsResponse, GetWorldLimitsResponses, GetWorldResponse, GetWorldResponses, GetWorldUsageData, GetWorldUsageResponse, GetWorldUsageResponses, InitiateAccountDeletionData, InitiateAccountDeletionError, InitiateAccountDeletionErrors, InitiateAccountDeletionResponse, InitiateAccountDeletionResponses, LimitSummary, ListAdminAuditEventsData, ListAdminAuditEventsError, ListAdminAuditEventsErrors, ListAdminAuditEventsResponse, ListAdminAuditEventsResponses, ListEmbeddingProvidersData, ListEmbeddingProvidersError, ListEmbeddingProvidersErrors, ListEmbeddingProvidersResponse, ListEmbeddingProvidersResponses, ListPlatformTokensData, ListPlatformTokensResponse, ListPlatformTokensResponses, ListWorldInvoicesData, ListWorldInvoicesResponse, ListWorldInvoicesResponses, ListWorldTokensData, ListWorldTokensResponse, ListWorldTokensResponses, ListWorldsData, ListWorldsResponse, ListWorldsResponses, LoginData, LoginRequest, LoginResponse, LoginResponse2, LoginResponses, MintWorkosSessionData, MintWorkosSessionError, MintWorkosSessionErrors, MintWorkosSessionResponse, MintWorkosSessionResponses, OpenWorldBillingPortalData, OpenWorldBillingPortalError, OpenWorldBillingPortalErrors, Options, PlatformToken, PlatformTokenCreateRequest, PlatformTokenCreateResponse, QuotaSummary, RecordWorldUsageData, RecordWorldUsageError, RecordWorldUsageErrors, RecordWorldUsageResponse, RecordWorldUsageResponses, RequestResult, SetEmbeddingProviderCredentialData, SetEmbeddingProviderCredentialError, SetEmbeddingProviderCredentialErrors, SetEmbeddingProviderCredentialResponse, SetEmbeddingProviderCredentialResponses, SetUserPlanData, SetUserPlanError, SetUserPlanErrors, SetUserPlanResponse, SetUserPlanResponses, UndeleteWorldData, UndeleteWorldError, UndeleteWorldErrors, UndeleteWorldResponse, UndeleteWorldResponses, UpdateWorldData, UpdateWorldError, UpdateWorldErrors, UpdateWorldRequest, UpdateWorldResponse, UpdateWorldResponses, UsageEvent, UsageRecordRequest, User, UserPlan, ValidatePlatformTokenData, ValidatePlatformTokenResponse, ValidatePlatformTokenResponses, VerifyLoginData, VerifyLoginError, VerifyLoginErrors, VerifyLoginResponse, VerifyLoginResponses, VerifyRequest, VerifyResponse, WorkosSessionRequest, WorkosSessionResponse, World, WorldToken, WorldTokenCreateRequest, WorldTokenCreated };