optio-contracts 0.11.3 → 0.11.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -6,5 +6,7 @@ export type { SessionEventsStreamMessage } from './schemas/session-events.js';
6
6
  export { and, or, not, leaf, eq, ne, isIn, notIn, exists, gt, gte, lt, lte } from './process-filter-helpers.js';
7
7
  export { processesContract, discoveryContract, ConversationFailureReason, ConversationRecordSchema, type ConversationRecord, PendingChatMessageSchema, PendingChatSchema, type PendingChatMessage, ChatAttachmentSchema, type ChatAttachment, } from './api-to-frontend.js';
8
8
  export { LaunchFailureReason, CancelFailureReason, DismissFailureReason, ResurrectFailureReason, ListSnapshotsFailureReason, GroupCancelFailureReason, BlockLaunchesFailureReason, StoreAvatarFailureReason, } from './engine-failure-reasons.js';
9
+ export { PoolFailureReason, PoolOperationSchema, PoolActionSchema, PoolCapabilitiesSchema, PoolKindInfoSchema, PoolKindInfoWithCollectionSchema, PoolSeedRowSchema, PoolAccountRowSchema, PoolGatewayModelRowSchema, PoolGatewaySummarySchema, PoolStatsSchema, ModelChoiceSchema, PoolRowSchema, PoolsStreamFrameSchema, PoolsQuerySchema, GatewayModelsBodySchema, GatewayConfigureBodySchema, type PoolOperation, type PoolAction, type PoolCapabilities, type PoolKindInfo, type PoolKindInfoWithCollection, type PoolSeedRow, type PoolAccountRow, type PoolGatewayModelRow, type PoolGatewaySummary, type PoolStats, type ModelChoice, type PoolRow, type PoolsStreamFrame, type PoolsQuery, type GatewayModelsBody, type GatewayConfigureBody, } from './pools/schemas.js';
10
+ export { poolsContract } from './pools/api-to-frontend.js';
9
11
  export { apiToFrontendRouteErrorReasons, type ApiToFrontendRouteId, } from './route-error-reasons.js';
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,o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tB,kBAAkB,EAClB,gCAAgC,EAChC,iBAAiB,EACjB,oBAAoB,EACpB,yBAAyB,EACzB,wBAAwB,EACxB,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,sBAAsB,EACtB,gBAAgB,EAChB,uBAAuB,EACvB,0BAA0B,EAC1B,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,0BAA0B,EAC/B,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D,OAAO,EACL,8BAA8B,EAC9B,KAAK,oBAAoB,GAC1B,MAAM,0BAA0B,CAAC"}
package/dist/index.js CHANGED
@@ -8,6 +8,10 @@ export { and, or, not, leaf, eq, ne, isIn, notIn, exists, gt, gte, lt, lte } fro
8
8
  export { processesContract, discoveryContract, ConversationFailureReason, ConversationRecordSchema, PendingChatMessageSchema, PendingChatSchema, ChatAttachmentSchema, } from './api-to-frontend.js';
9
9
  // Engine contract failure-reason enums (Zod schemas + types) — browser-safe re-exports
10
10
  export { LaunchFailureReason, CancelFailureReason, DismissFailureReason, ResurrectFailureReason, ListSnapshotsFailureReason, GroupCancelFailureReason, BlockLaunchesFailureReason, StoreAvatarFailureReason, } from './engine-failure-reasons.js';
11
+ // Login pools: schemas, types and routes (the engine's clamator contract is
12
+ // `optio-contracts/optio-pools`, not re-exported here: it pulls in @clamator/protocol)
13
+ export { PoolFailureReason, PoolOperationSchema, PoolActionSchema, PoolCapabilitiesSchema, PoolKindInfoSchema, PoolKindInfoWithCollectionSchema, PoolSeedRowSchema, PoolAccountRowSchema, PoolGatewayModelRowSchema, PoolGatewaySummarySchema, PoolStatsSchema, ModelChoiceSchema, PoolRowSchema, PoolsStreamFrameSchema, PoolsQuerySchema, GatewayModelsBodySchema, GatewayConfigureBodySchema, } from './pools/schemas.js';
14
+ export { poolsContract } from './pools/api-to-frontend.js';
11
15
  // Cross-package error-route manifest (consumed by host-app lints)
12
16
  export { apiToFrontendRouteErrorReasons, } from './route-error-reasons.js';
13
17
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,qBAAqB,EAC3D,uBAAuB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,cAAc,EACjD,2BAA2B,EAAE,8BAA8B,EAC3D,8BAA8B,EAAE,iCAAiC,EACjE,YAAY,EAAE,aAAa,EAAE,eAAe,EAC5C,wBAAwB,EAAE,kBAAkB,EAC5C,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,gCAAgC,EAAE,MAAM,6BAA6B,CAAC;AAQ/E,yBAAyB;AACzB,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,6BAA6B,CAAC;AAEhH,WAAW;AACX,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,yBAAyB,EACzB,wBAAwB,EAExB,wBAAwB,EACxB,iBAAiB,EAEjB,oBAAoB,GAErB,MAAM,sBAAsB,CAAC;AAE9B,uFAAuF;AACvF,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EAC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gB,EAChB,sBAAsB,EACtB,kBAAkB,EAClB,gCAAgC,EAChC,iBAAiB,EACjB,oBAAoB,EACpB,yBAAyB,EACzB,wBAAwB,EACxB,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,sBAAsB,EACtB,gBAAgB,EAChB,uBAAuB,EACvB,0BAA0B,GAiB3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,kEAAkE;AAClE,OAAO,EACL,8BAA8B,GAE/B,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,647 @@
1
+ import { z } from 'zod';
2
+ /** 409 reasons of a route that starts the setup process (setup, gateway configure). */
3
+ export declare const PoolSetupConflictReason: z.ZodEnum<["setup-running", "unsupported", "launch-refused"]>;
4
+ /** 409 reasons of a route the kind may not support (bury dead, sort out, gateway models). */
5
+ export declare const PoolUnsupportedReason: z.ZodEnum<["unsupported"]>;
6
+ /** 409 reasons of the retest (the form kind's test task: optio refused its launch). */
7
+ export declare const PoolRetestConflictReason: z.ZodEnum<["launch-refused"]>;
8
+ /** 422 reasons of the gateway model list. */
9
+ export declare const PoolGatewayModelsReason: z.ZodEnum<["no-key", "key-rejected", "unreachable", "no-models", "unknown-region"]>;
10
+ /** 422 reasons of the gateway configuration: the model list's, then the ticks' checks. */
11
+ export declare const PoolGatewayConfigureReason: z.ZodEnum<["no-key", "key-rejected", "unreachable", "no-models", "unknown-region", "unknown-model", "default-not-ticked"]>;
12
+ export declare const poolsContract: {
13
+ setup: {
14
+ pathParams: z.ZodObject<{
15
+ kind: z.ZodString;
16
+ }, "strip", z.ZodTypeAny, {
17
+ kind: string;
18
+ }, {
19
+ kind: string;
20
+ }>;
21
+ query: z.ZodObject<{
22
+ database: z.ZodOptional<z.ZodString>;
23
+ prefix: z.ZodOptional<z.ZodString>;
24
+ owner: z.ZodOptional<z.ZodString>;
25
+ }, "strip", z.ZodTypeAny, {
26
+ database?: string | undefined;
27
+ prefix?: string | undefined;
28
+ owner?: string | undefined;
29
+ }, {
30
+ database?: string | undefined;
31
+ prefix?: string | undefined;
32
+ owner?: string | undefined;
33
+ }>;
34
+ summary: "Start (or follow) the pool's login setup task";
35
+ method: "POST";
36
+ body: typeof import("@ts-rest/core").ContractNoBody;
37
+ path: "/pools/:kind/setup";
38
+ responses: {
39
+ 409: z.ZodObject<{
40
+ reason: z.ZodEnum<["setup-running", "unsupported", "launch-refused"]>;
41
+ message: z.ZodString;
42
+ }, "strip", z.ZodTypeAny, {
43
+ message: string;
44
+ reason: "unsupported" | "setup-running" | "launch-refused";
45
+ }, {
46
+ message: string;
47
+ reason: "unsupported" | "setup-running" | "launch-refused";
48
+ }>;
49
+ 403: z.ZodObject<{
50
+ message: z.ZodString;
51
+ }, "strip", z.ZodTypeAny, {
52
+ message: string;
53
+ }, {
54
+ message: string;
55
+ }>;
56
+ 404: z.ZodObject<{
57
+ reason: z.ZodLiteral<"unknown-kind">;
58
+ message: z.ZodString;
59
+ }, "strip", z.ZodTypeAny, {
60
+ message: string;
61
+ reason: "unknown-kind";
62
+ }, {
63
+ message: string;
64
+ reason: "unknown-kind";
65
+ }>;
66
+ 500: z.ZodObject<{
67
+ message: z.ZodString;
68
+ }, "strip", z.ZodTypeAny, {
69
+ message: string;
70
+ }, {
71
+ message: string;
72
+ }>;
73
+ 503: z.ZodObject<{
74
+ reason: z.ZodLiteral<"engine-unavailable">;
75
+ message: z.ZodString;
76
+ }, "strip", z.ZodTypeAny, {
77
+ message: string;
78
+ reason: "engine-unavailable";
79
+ }, {
80
+ message: string;
81
+ reason: "engine-unavailable";
82
+ }>;
83
+ 202: z.ZodObject<{
84
+ processId: z.ZodString;
85
+ }, "strip", z.ZodTypeAny, {
86
+ processId: string;
87
+ }, {
88
+ processId: string;
89
+ }>;
90
+ };
91
+ };
92
+ retest: {
93
+ pathParams: z.ZodObject<{
94
+ kind: z.ZodString;
95
+ }, "strip", z.ZodTypeAny, {
96
+ kind: string;
97
+ }, {
98
+ kind: string;
99
+ }>;
100
+ query: z.ZodObject<{
101
+ database: z.ZodOptional<z.ZodString>;
102
+ prefix: z.ZodOptional<z.ZodString>;
103
+ owner: z.ZodOptional<z.ZodString>;
104
+ }, "strip", z.ZodTypeAny, {
105
+ database?: string | undefined;
106
+ prefix?: string | undefined;
107
+ owner?: string | undefined;
108
+ }, {
109
+ database?: string | undefined;
110
+ prefix?: string | undefined;
111
+ owner?: string | undefined;
112
+ }>;
113
+ summary: "Retest the pool's logins (the form kind: relaunch its test task)";
114
+ method: "POST";
115
+ body: typeof import("@ts-rest/core").ContractNoBody;
116
+ path: "/pools/:kind/retest";
117
+ responses: {
118
+ 409: z.ZodObject<{
119
+ reason: z.ZodEnum<["launch-refused"]>;
120
+ message: z.ZodString;
121
+ }, "strip", z.ZodTypeAny, {
122
+ message: string;
123
+ reason: "launch-refused";
124
+ }, {
125
+ message: string;
126
+ reason: "launch-refused";
127
+ }>;
128
+ 403: z.ZodObject<{
129
+ message: z.ZodString;
130
+ }, "strip", z.ZodTypeAny, {
131
+ message: string;
132
+ }, {
133
+ message: string;
134
+ }>;
135
+ 404: z.ZodObject<{
136
+ reason: z.ZodLiteral<"unknown-kind">;
137
+ message: z.ZodString;
138
+ }, "strip", z.ZodTypeAny, {
139
+ message: string;
140
+ reason: "unknown-kind";
141
+ }, {
142
+ message: string;
143
+ reason: "unknown-kind";
144
+ }>;
145
+ 500: z.ZodObject<{
146
+ message: z.ZodString;
147
+ }, "strip", z.ZodTypeAny, {
148
+ message: string;
149
+ }, {
150
+ message: string;
151
+ }>;
152
+ 503: z.ZodObject<{
153
+ reason: z.ZodLiteral<"engine-unavailable">;
154
+ message: z.ZodString;
155
+ }, "strip", z.ZodTypeAny, {
156
+ message: string;
157
+ reason: "engine-unavailable";
158
+ }, {
159
+ message: string;
160
+ reason: "engine-unavailable";
161
+ }>;
162
+ 200: z.ZodObject<{
163
+ verified: z.ZodNumber;
164
+ dead: z.ZodNumber;
165
+ unverified: z.ZodNumber;
166
+ processId: z.ZodNullable<z.ZodString>;
167
+ }, "strip", z.ZodTypeAny, {
168
+ processId: string | null;
169
+ dead: number;
170
+ verified: number;
171
+ unverified: number;
172
+ }, {
173
+ processId: string | null;
174
+ dead: number;
175
+ verified: number;
176
+ unverified: number;
177
+ }>;
178
+ };
179
+ };
180
+ buryDead: {
181
+ pathParams: z.ZodObject<{
182
+ kind: z.ZodString;
183
+ }, "strip", z.ZodTypeAny, {
184
+ kind: string;
185
+ }, {
186
+ kind: string;
187
+ }>;
188
+ query: z.ZodObject<{
189
+ database: z.ZodOptional<z.ZodString>;
190
+ prefix: z.ZodOptional<z.ZodString>;
191
+ owner: z.ZodOptional<z.ZodString>;
192
+ }, "strip", z.ZodTypeAny, {
193
+ database?: string | undefined;
194
+ prefix?: string | undefined;
195
+ owner?: string | undefined;
196
+ }, {
197
+ database?: string | undefined;
198
+ prefix?: string | undefined;
199
+ owner?: string | undefined;
200
+ }>;
201
+ summary: "Remove the pool's dead logins";
202
+ method: "POST";
203
+ body: typeof import("@ts-rest/core").ContractNoBody;
204
+ path: "/pools/:kind/bury-dead";
205
+ responses: {
206
+ 409: z.ZodObject<{
207
+ reason: z.ZodEnum<["unsupported"]>;
208
+ message: z.ZodString;
209
+ }, "strip", z.ZodTypeAny, {
210
+ message: string;
211
+ reason: "unsupported";
212
+ }, {
213
+ message: string;
214
+ reason: "unsupported";
215
+ }>;
216
+ 403: z.ZodObject<{
217
+ message: z.ZodString;
218
+ }, "strip", z.ZodTypeAny, {
219
+ message: string;
220
+ }, {
221
+ message: string;
222
+ }>;
223
+ 404: z.ZodObject<{
224
+ reason: z.ZodLiteral<"unknown-kind">;
225
+ message: z.ZodString;
226
+ }, "strip", z.ZodTypeAny, {
227
+ message: string;
228
+ reason: "unknown-kind";
229
+ }, {
230
+ message: string;
231
+ reason: "unknown-kind";
232
+ }>;
233
+ 500: z.ZodObject<{
234
+ message: z.ZodString;
235
+ }, "strip", z.ZodTypeAny, {
236
+ message: string;
237
+ }, {
238
+ message: string;
239
+ }>;
240
+ 503: z.ZodObject<{
241
+ reason: z.ZodLiteral<"engine-unavailable">;
242
+ message: z.ZodString;
243
+ }, "strip", z.ZodTypeAny, {
244
+ message: string;
245
+ reason: "engine-unavailable";
246
+ }, {
247
+ message: string;
248
+ reason: "engine-unavailable";
249
+ }>;
250
+ 200: z.ZodObject<{
251
+ buried: z.ZodNumber;
252
+ }, "strip", z.ZodTypeAny, {
253
+ buried: number;
254
+ }, {
255
+ buried: number;
256
+ }>;
257
+ };
258
+ };
259
+ removeAll: {
260
+ pathParams: z.ZodObject<{
261
+ kind: z.ZodString;
262
+ }, "strip", z.ZodTypeAny, {
263
+ kind: string;
264
+ }, {
265
+ kind: string;
266
+ }>;
267
+ query: z.ZodObject<{
268
+ database: z.ZodOptional<z.ZodString>;
269
+ prefix: z.ZodOptional<z.ZodString>;
270
+ owner: z.ZodOptional<z.ZodString>;
271
+ }, "strip", z.ZodTypeAny, {
272
+ database?: string | undefined;
273
+ prefix?: string | undefined;
274
+ owner?: string | undefined;
275
+ }, {
276
+ database?: string | undefined;
277
+ prefix?: string | undefined;
278
+ owner?: string | undefined;
279
+ }>;
280
+ summary: "Remove every login of the pool no running agent holds (the form kind: its configuration)";
281
+ method: "POST";
282
+ body: typeof import("@ts-rest/core").ContractNoBody;
283
+ path: "/pools/:kind/remove-all";
284
+ responses: {
285
+ 403: z.ZodObject<{
286
+ message: z.ZodString;
287
+ }, "strip", z.ZodTypeAny, {
288
+ message: string;
289
+ }, {
290
+ message: string;
291
+ }>;
292
+ 404: z.ZodObject<{
293
+ reason: z.ZodLiteral<"unknown-kind">;
294
+ message: z.ZodString;
295
+ }, "strip", z.ZodTypeAny, {
296
+ message: string;
297
+ reason: "unknown-kind";
298
+ }, {
299
+ message: string;
300
+ reason: "unknown-kind";
301
+ }>;
302
+ 500: z.ZodObject<{
303
+ message: z.ZodString;
304
+ }, "strip", z.ZodTypeAny, {
305
+ message: string;
306
+ }, {
307
+ message: string;
308
+ }>;
309
+ 503: z.ZodObject<{
310
+ reason: z.ZodLiteral<"engine-unavailable">;
311
+ message: z.ZodString;
312
+ }, "strip", z.ZodTypeAny, {
313
+ message: string;
314
+ reason: "engine-unavailable";
315
+ }, {
316
+ message: string;
317
+ reason: "engine-unavailable";
318
+ }>;
319
+ 200: z.ZodObject<{
320
+ removed: z.ZodNumber;
321
+ skipped: z.ZodNumber;
322
+ }, "strip", z.ZodTypeAny, {
323
+ removed: number;
324
+ skipped: number;
325
+ }, {
326
+ removed: number;
327
+ skipped: number;
328
+ }>;
329
+ };
330
+ };
331
+ sortOut: {
332
+ pathParams: z.ZodObject<{
333
+ kind: z.ZodString;
334
+ }, "strip", z.ZodTypeAny, {
335
+ kind: string;
336
+ }, {
337
+ kind: string;
338
+ }>;
339
+ query: z.ZodObject<{
340
+ database: z.ZodOptional<z.ZodString>;
341
+ prefix: z.ZodOptional<z.ZodString>;
342
+ owner: z.ZodOptional<z.ZodString>;
343
+ }, "strip", z.ZodTypeAny, {
344
+ database?: string | undefined;
345
+ prefix?: string | undefined;
346
+ owner?: string | undefined;
347
+ }, {
348
+ database?: string | undefined;
349
+ prefix?: string | undefined;
350
+ owner?: string | undefined;
351
+ }>;
352
+ summary: "Remove every login whose signature differs from the pool's first one (none a running agent holds)";
353
+ method: "POST";
354
+ body: typeof import("@ts-rest/core").ContractNoBody;
355
+ path: "/pools/:kind/sort-out";
356
+ responses: {
357
+ 409: z.ZodObject<{
358
+ reason: z.ZodEnum<["unsupported"]>;
359
+ message: z.ZodString;
360
+ }, "strip", z.ZodTypeAny, {
361
+ message: string;
362
+ reason: "unsupported";
363
+ }, {
364
+ message: string;
365
+ reason: "unsupported";
366
+ }>;
367
+ 403: z.ZodObject<{
368
+ message: z.ZodString;
369
+ }, "strip", z.ZodTypeAny, {
370
+ message: string;
371
+ }, {
372
+ message: string;
373
+ }>;
374
+ 404: z.ZodObject<{
375
+ reason: z.ZodLiteral<"unknown-kind">;
376
+ message: z.ZodString;
377
+ }, "strip", z.ZodTypeAny, {
378
+ message: string;
379
+ reason: "unknown-kind";
380
+ }, {
381
+ message: string;
382
+ reason: "unknown-kind";
383
+ }>;
384
+ 500: z.ZodObject<{
385
+ message: z.ZodString;
386
+ }, "strip", z.ZodTypeAny, {
387
+ message: string;
388
+ }, {
389
+ message: string;
390
+ }>;
391
+ 503: z.ZodObject<{
392
+ reason: z.ZodLiteral<"engine-unavailable">;
393
+ message: z.ZodString;
394
+ }, "strip", z.ZodTypeAny, {
395
+ message: string;
396
+ reason: "engine-unavailable";
397
+ }, {
398
+ message: string;
399
+ reason: "engine-unavailable";
400
+ }>;
401
+ 200: z.ZodObject<{
402
+ removed: z.ZodNumber;
403
+ skipped: z.ZodNumber;
404
+ }, "strip", z.ZodTypeAny, {
405
+ removed: number;
406
+ skipped: number;
407
+ }, {
408
+ removed: number;
409
+ skipped: number;
410
+ }>;
411
+ };
412
+ };
413
+ gatewayModels: {
414
+ pathParams: z.ZodObject<{
415
+ kind: z.ZodString;
416
+ }, "strip", z.ZodTypeAny, {
417
+ kind: string;
418
+ }, {
419
+ kind: string;
420
+ }>;
421
+ query: z.ZodObject<{
422
+ database: z.ZodOptional<z.ZodString>;
423
+ prefix: z.ZodOptional<z.ZodString>;
424
+ owner: z.ZodOptional<z.ZodString>;
425
+ }, "strip", z.ZodTypeAny, {
426
+ database?: string | undefined;
427
+ prefix?: string | undefined;
428
+ owner?: string | undefined;
429
+ }, {
430
+ database?: string | undefined;
431
+ prefix?: string | undefined;
432
+ owner?: string | undefined;
433
+ }>;
434
+ summary: "List the gateway account's models in a region";
435
+ method: "POST";
436
+ body: z.ZodObject<{
437
+ apiKey: z.ZodOptional<z.ZodString>;
438
+ region: z.ZodString;
439
+ }, "strip", z.ZodTypeAny, {
440
+ region: string;
441
+ apiKey?: string | undefined;
442
+ }, {
443
+ region: string;
444
+ apiKey?: string | undefined;
445
+ }>;
446
+ path: "/pools/:kind/gateway/models";
447
+ responses: {
448
+ 409: z.ZodObject<{
449
+ reason: z.ZodEnum<["unsupported"]>;
450
+ message: z.ZodString;
451
+ }, "strip", z.ZodTypeAny, {
452
+ message: string;
453
+ reason: "unsupported";
454
+ }, {
455
+ message: string;
456
+ reason: "unsupported";
457
+ }>;
458
+ 422: z.ZodObject<{
459
+ reason: z.ZodEnum<["no-key", "key-rejected", "unreachable", "no-models", "unknown-region"]>;
460
+ message: z.ZodString;
461
+ }, "strip", z.ZodTypeAny, {
462
+ message: string;
463
+ reason: "no-key" | "key-rejected" | "unreachable" | "no-models" | "unknown-region";
464
+ }, {
465
+ message: string;
466
+ reason: "no-key" | "key-rejected" | "unreachable" | "no-models" | "unknown-region";
467
+ }>;
468
+ 403: z.ZodObject<{
469
+ message: z.ZodString;
470
+ }, "strip", z.ZodTypeAny, {
471
+ message: string;
472
+ }, {
473
+ message: string;
474
+ }>;
475
+ 404: z.ZodObject<{
476
+ reason: z.ZodLiteral<"unknown-kind">;
477
+ message: z.ZodString;
478
+ }, "strip", z.ZodTypeAny, {
479
+ message: string;
480
+ reason: "unknown-kind";
481
+ }, {
482
+ message: string;
483
+ reason: "unknown-kind";
484
+ }>;
485
+ 500: z.ZodObject<{
486
+ message: z.ZodString;
487
+ }, "strip", z.ZodTypeAny, {
488
+ message: string;
489
+ }, {
490
+ message: string;
491
+ }>;
492
+ 503: z.ZodObject<{
493
+ reason: z.ZodLiteral<"engine-unavailable">;
494
+ message: z.ZodString;
495
+ }, "strip", z.ZodTypeAny, {
496
+ message: string;
497
+ reason: "engine-unavailable";
498
+ }, {
499
+ message: string;
500
+ reason: "engine-unavailable";
501
+ }>;
502
+ 200: z.ZodObject<{
503
+ models: z.ZodArray<z.ZodObject<{
504
+ id: z.ZodString;
505
+ label: z.ZodString;
506
+ group: z.ZodEnum<["managed", "pinned", "policy"]>;
507
+ efforts: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
508
+ euOnly: z.ZodBoolean;
509
+ }, "strip", z.ZodTypeAny, {
510
+ id: string;
511
+ label: string;
512
+ group: "managed" | "pinned" | "policy";
513
+ efforts: string[] | null;
514
+ euOnly: boolean;
515
+ }, {
516
+ id: string;
517
+ label: string;
518
+ group: "managed" | "pinned" | "policy";
519
+ efforts: string[] | null;
520
+ euOnly: boolean;
521
+ }>, "many">;
522
+ }, "strip", z.ZodTypeAny, {
523
+ models: {
524
+ id: string;
525
+ label: string;
526
+ group: "managed" | "pinned" | "policy";
527
+ efforts: string[] | null;
528
+ euOnly: boolean;
529
+ }[];
530
+ }, {
531
+ models: {
532
+ id: string;
533
+ label: string;
534
+ group: "managed" | "pinned" | "policy";
535
+ efforts: string[] | null;
536
+ euOnly: boolean;
537
+ }[];
538
+ }>;
539
+ };
540
+ };
541
+ gatewayConfigure: {
542
+ pathParams: z.ZodObject<{
543
+ kind: z.ZodString;
544
+ }, "strip", z.ZodTypeAny, {
545
+ kind: string;
546
+ }, {
547
+ kind: string;
548
+ }>;
549
+ query: z.ZodObject<{
550
+ database: z.ZodOptional<z.ZodString>;
551
+ prefix: z.ZodOptional<z.ZodString>;
552
+ owner: z.ZodOptional<z.ZodString>;
553
+ }, "strip", z.ZodTypeAny, {
554
+ database?: string | undefined;
555
+ prefix?: string | undefined;
556
+ owner?: string | undefined;
557
+ }, {
558
+ database?: string | undefined;
559
+ prefix?: string | undefined;
560
+ owner?: string | undefined;
561
+ }>;
562
+ summary: "Save the gateway configuration and launch its test task";
563
+ method: "POST";
564
+ body: z.ZodObject<{
565
+ apiKey: z.ZodOptional<z.ZodString>;
566
+ region: z.ZodString;
567
+ } & {
568
+ models: z.ZodArray<z.ZodString, "many">;
569
+ defaultModel: z.ZodString;
570
+ }, "strip", z.ZodTypeAny, {
571
+ region: string;
572
+ defaultModel: string;
573
+ models: string[];
574
+ apiKey?: string | undefined;
575
+ }, {
576
+ region: string;
577
+ defaultModel: string;
578
+ models: string[];
579
+ apiKey?: string | undefined;
580
+ }>;
581
+ path: "/pools/:kind/gateway/configure";
582
+ responses: {
583
+ 409: z.ZodObject<{
584
+ reason: z.ZodEnum<["setup-running", "unsupported", "launch-refused"]>;
585
+ message: z.ZodString;
586
+ }, "strip", z.ZodTypeAny, {
587
+ message: string;
588
+ reason: "unsupported" | "setup-running" | "launch-refused";
589
+ }, {
590
+ message: string;
591
+ reason: "unsupported" | "setup-running" | "launch-refused";
592
+ }>;
593
+ 422: z.ZodObject<{
594
+ reason: z.ZodEnum<["no-key", "key-rejected", "unreachable", "no-models", "unknown-region", "unknown-model", "default-not-ticked"]>;
595
+ message: z.ZodString;
596
+ }, "strip", z.ZodTypeAny, {
597
+ message: string;
598
+ reason: "no-key" | "key-rejected" | "unreachable" | "no-models" | "unknown-model" | "default-not-ticked" | "unknown-region";
599
+ }, {
600
+ message: string;
601
+ reason: "no-key" | "key-rejected" | "unreachable" | "no-models" | "unknown-model" | "default-not-ticked" | "unknown-region";
602
+ }>;
603
+ 403: z.ZodObject<{
604
+ message: z.ZodString;
605
+ }, "strip", z.ZodTypeAny, {
606
+ message: string;
607
+ }, {
608
+ message: string;
609
+ }>;
610
+ 404: z.ZodObject<{
611
+ reason: z.ZodLiteral<"unknown-kind">;
612
+ message: z.ZodString;
613
+ }, "strip", z.ZodTypeAny, {
614
+ message: string;
615
+ reason: "unknown-kind";
616
+ }, {
617
+ message: string;
618
+ reason: "unknown-kind";
619
+ }>;
620
+ 500: z.ZodObject<{
621
+ message: z.ZodString;
622
+ }, "strip", z.ZodTypeAny, {
623
+ message: string;
624
+ }, {
625
+ message: string;
626
+ }>;
627
+ 503: z.ZodObject<{
628
+ reason: z.ZodLiteral<"engine-unavailable">;
629
+ message: z.ZodString;
630
+ }, "strip", z.ZodTypeAny, {
631
+ message: string;
632
+ reason: "engine-unavailable";
633
+ }, {
634
+ message: string;
635
+ reason: "engine-unavailable";
636
+ }>;
637
+ 202: z.ZodObject<{
638
+ processId: z.ZodString;
639
+ }, "strip", z.ZodTypeAny, {
640
+ processId: string;
641
+ }, {
642
+ processId: string;
643
+ }>;
644
+ };
645
+ };
646
+ };
647
+ //# sourceMappingURL=api-to-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