@veruna/api-contracts 20.5.1 → 20.5.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.
Files changed (48) hide show
  1. package/build/tsconfig.tsbuildinfo +1 -1
  2. package/build/v1/message/commands/create-message.command.d.ts +217 -0
  3. package/build/v1/message/commands/create-message.command.js +2 -0
  4. package/build/v1/message/commands/create-message.command.js.map +1 -1
  5. package/build/v1/message/queries/get-message-stream-reg.query.d.ts +216 -0
  6. package/build/v1/message/queries/get-message-stream-reg.query.js +1 -0
  7. package/build/v1/message/queries/get-message-stream-reg.query.js.map +1 -1
  8. package/build/v1/message/queries/get-message-stream-unreg.query.d.ts +216 -0
  9. package/build/v1/message/queries/get-message-stream-unreg.query.js +1 -0
  10. package/build/v1/message/queries/get-message-stream-unreg.query.js.map +1 -1
  11. package/build/v1/message/schemas/index.d.ts +4 -1
  12. package/build/v1/message/schemas/index.js +11 -2
  13. package/build/v1/message/schemas/index.js.map +1 -1
  14. package/build/v1/message/schemas/message-stream-frame.schema.d.ts +212 -0
  15. package/build/v1/message/schemas/message-stream-frame.schema.js +9 -0
  16. package/build/v1/message/schemas/message-stream-frame.schema.js.map +1 -0
  17. package/build/v1/message/schemas/preparation-status.enum.d.ts +4 -0
  18. package/build/v1/message/schemas/preparation-status.enum.js +9 -0
  19. package/build/v1/message/schemas/preparation-status.enum.js.map +1 -0
  20. package/build/v1/message/schemas/stream-event-type.enum.d.ts +2 -0
  21. package/build/v1/message/schemas/stream-event-type.enum.js +2 -0
  22. package/build/v1/message/schemas/stream-event-type.enum.js.map +1 -1
  23. package/build/v1/message/schemas/stream-events.schema.d.ts +15 -0
  24. package/build/v1/message/schemas/stream-events.schema.js +8 -1
  25. package/build/v1/message/schemas/stream-events.schema.js.map +1 -1
  26. package/build/v1/message/schemas/transport-heartbeat.schema.d.ts +16 -0
  27. package/build/v1/message/schemas/transport-heartbeat.schema.js +16 -0
  28. package/build/v1/message/schemas/transport-heartbeat.schema.js.map +1 -0
  29. package/build-esm/.tsbuildinfo +1 -1
  30. package/build-esm/v1/message/commands/create-message.command.js +3 -1
  31. package/build-esm/v1/message/commands/create-message.command.js.map +1 -1
  32. package/build-esm/v1/message/queries/get-message-stream-reg.query.js +2 -1
  33. package/build-esm/v1/message/queries/get-message-stream-reg.query.js.map +1 -1
  34. package/build-esm/v1/message/queries/get-message-stream-unreg.query.js +2 -1
  35. package/build-esm/v1/message/queries/get-message-stream-unreg.query.js.map +1 -1
  36. package/build-esm/v1/message/schemas/index.js +4 -1
  37. package/build-esm/v1/message/schemas/index.js.map +1 -1
  38. package/build-esm/v1/message/schemas/message-stream-frame.schema.js +6 -0
  39. package/build-esm/v1/message/schemas/message-stream-frame.schema.js.map +1 -0
  40. package/build-esm/v1/message/schemas/preparation-status.enum.js +6 -0
  41. package/build-esm/v1/message/schemas/preparation-status.enum.js.map +1 -0
  42. package/build-esm/v1/message/schemas/stream-event-type.enum.js +2 -0
  43. package/build-esm/v1/message/schemas/stream-event-type.enum.js.map +1 -1
  44. package/build-esm/v1/message/schemas/stream-events.schema.js +7 -0
  45. package/build-esm/v1/message/schemas/stream-events.schema.js.map +1 -1
  46. package/build-esm/v1/message/schemas/transport-heartbeat.schema.js +13 -0
  47. package/build-esm/v1/message/schemas/transport-heartbeat.schema.js.map +1 -0
  48. package/package.json +1 -1
@@ -66,6 +66,12 @@ export declare namespace CreateMessageCommand {
66
66
  }, z.core.$strip>;
67
67
  /** Discriminated union of all stream events */
68
68
  const StreamEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
69
+ id: z.ZodNumber;
70
+ chatId: z.ZodString;
71
+ messageId: z.ZodString;
72
+ type: z.ZodLiteral<import("../schemas").StreamEventType.PREPARATION_STATUS>;
73
+ status: z.ZodEnum<typeof import("../schemas").PreparationStatus>;
74
+ }, z.core.$strip>, z.ZodObject<{
69
75
  id: z.ZodNumber;
70
76
  chatId: z.ZodString;
71
77
  messageId: z.ZodString;
@@ -265,6 +271,216 @@ export declare namespace CreateMessageCommand {
265
271
  type: z.ZodLiteral<import("../schemas").StreamEventType.ERROR>;
266
272
  chargedTokens: z.ZodOptional<z.ZodNumber>;
267
273
  }, z.core.$strip>], "type">;
274
+ /** Entire NDJSON transport, including the lowercase connection heartbeat. */
275
+ const Frame: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
276
+ id: z.ZodNumber;
277
+ chatId: z.ZodString;
278
+ messageId: z.ZodString;
279
+ type: z.ZodLiteral<import("../schemas").StreamEventType.PREPARATION_STATUS>;
280
+ status: z.ZodEnum<typeof import("../schemas").PreparationStatus>;
281
+ }, z.core.$strip>, z.ZodObject<{
282
+ id: z.ZodNumber;
283
+ chatId: z.ZodString;
284
+ messageId: z.ZodString;
285
+ type: z.ZodLiteral<import("../schemas").StreamEventType.GENERATION_STATUS>;
286
+ status: z.ZodEnum<typeof import("../schemas").GenerationStatus>;
287
+ modelId: z.ZodString;
288
+ }, z.core.$strip>, z.ZodObject<{
289
+ id: z.ZodNumber;
290
+ chatId: z.ZodString;
291
+ messageId: z.ZodString;
292
+ type: z.ZodLiteral<import("../schemas").StreamEventType.STEP_START>;
293
+ stepType: z.ZodEnum<typeof import("../schemas").GenerationStepType>;
294
+ stepId: z.ZodString;
295
+ stepIndex: z.ZodNumber;
296
+ modelUuid: z.ZodDefault<z.ZodNullable<z.ZodString>>;
297
+ metadata: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
298
+ path: z.ZodString;
299
+ filename: z.ZodString;
300
+ }, z.core.$strip>, z.ZodObject<{
301
+ queries: z.ZodArray<z.ZodString>;
302
+ }, z.core.$strip>, z.ZodObject<{
303
+ query: z.ZodString;
304
+ }, z.core.$strip>, z.ZodObject<{
305
+ sourceResolution: z.ZodString;
306
+ sourceImageCount: z.ZodNumber;
307
+ }, z.core.$strip>, z.ZodObject<{
308
+ videoUrl: z.ZodString;
309
+ }, z.core.$strip>, z.ZodObject<{
310
+ primitiveType: z.ZodEnum<typeof import("../..").SandboxPrimitiveType>;
311
+ }, z.core.$strip>, z.ZodObject<{
312
+ toolName: z.ZodString;
313
+ connectionUuid: z.ZodString;
314
+ providerKey: z.ZodNullable<z.ZodString>;
315
+ argsPreview: z.ZodOptional<z.ZodString>;
316
+ }, z.core.$strip>]>>;
317
+ }, z.core.$strip>, z.ZodObject<{
318
+ id: z.ZodNumber;
319
+ chatId: z.ZodString;
320
+ messageId: z.ZodString;
321
+ type: z.ZodLiteral<import("../schemas").StreamEventType.STEP_CHUNK>;
322
+ stepType: z.ZodEnum<typeof import("../schemas").GenerationStepType>;
323
+ stepId: z.ZodString;
324
+ chunk: z.ZodString;
325
+ modelUuid: z.ZodDefault<z.ZodNullable<z.ZodString>>;
326
+ metadata: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
327
+ kind: z.ZodLiteral<import("../schemas").StepChunkKind.ARGS>;
328
+ primitiveType: z.ZodEnum<typeof import("../..").SandboxPrimitiveType>;
329
+ }, z.core.$strip>, z.ZodObject<{
330
+ kind: z.ZodLiteral<import("../schemas").StepChunkKind.DESCRIBE>;
331
+ primitiveType: z.ZodEnum<typeof import("../..").SandboxPrimitiveType>;
332
+ }, z.core.$strip>, z.ZodObject<{
333
+ kind: z.ZodLiteral<import("../schemas").StepChunkKind.BASH>;
334
+ stream: z.ZodEnum<typeof import("../schemas").BashChunkStream>;
335
+ }, z.core.$strip>, z.ZodObject<{
336
+ kind: z.ZodLiteral<import("../schemas").StepChunkKind.CREATE_FILE>;
337
+ path: z.ZodString;
338
+ totalLines: z.ZodNumber;
339
+ bytesWritten: z.ZodNumber;
340
+ overwrite: z.ZodBoolean;
341
+ preview: z.ZodObject<{
342
+ lines: z.ZodArray<z.ZodString>;
343
+ truncated: z.ZodBoolean;
344
+ }, z.core.$strip>;
345
+ }, z.core.$strip>, z.ZodObject<{
346
+ kind: z.ZodLiteral<import("../schemas").StepChunkKind.STR_REPLACE>;
347
+ path: z.ZodString;
348
+ linesAdded: z.ZodNumber;
349
+ linesRemoved: z.ZodNumber;
350
+ linesBefore: z.ZodNumber;
351
+ linesAfter: z.ZodNumber;
352
+ hunk: z.ZodObject<{
353
+ startLine: z.ZodNumber;
354
+ contextBefore: z.ZodArray<z.ZodString>;
355
+ oldLines: z.ZodArray<z.ZodString>;
356
+ newLines: z.ZodArray<z.ZodString>;
357
+ contextAfter: z.ZodArray<z.ZodString>;
358
+ truncated: z.ZodBoolean;
359
+ }, z.core.$strip>;
360
+ }, z.core.$strip>, z.ZodObject<{
361
+ kind: z.ZodLiteral<import("../schemas").StepChunkKind.VIEW>;
362
+ path: z.ZodString;
363
+ view: z.ZodDiscriminatedUnion<[z.ZodObject<{
364
+ type: z.ZodLiteral<import("../..").SandboxViewKind.DIRECTORY>;
365
+ entryCount: z.ZodNumber;
366
+ }, z.core.$strip>, z.ZodObject<{
367
+ type: z.ZodLiteral<import("../..").SandboxViewKind.TEXT>;
368
+ startLine: z.ZodNumber;
369
+ endLine: z.ZodNumber;
370
+ totalLines: z.ZodNumber;
371
+ truncated: z.ZodBoolean;
372
+ }, z.core.$strip>, z.ZodObject<{
373
+ type: z.ZodLiteral<import("../..").SandboxViewKind.IMAGE>;
374
+ }, z.core.$strip>, z.ZodObject<{
375
+ type: z.ZodLiteral<import("../..").SandboxViewKind.PDF>;
376
+ pagesShown: z.ZodNumber;
377
+ }, z.core.$strip>], "type">;
378
+ }, z.core.$strip>], "kind">>;
379
+ }, z.core.$strip>, z.ZodObject<{
380
+ id: z.ZodNumber;
381
+ chatId: z.ZodString;
382
+ messageId: z.ZodString;
383
+ type: z.ZodLiteral<import("../schemas").StreamEventType.STEP_ERROR>;
384
+ stepType: z.ZodEnum<typeof import("../schemas").GenerationStepType>;
385
+ stepId: z.ZodString;
386
+ stepIndex: z.ZodNumber;
387
+ modelUuid: z.ZodDefault<z.ZodNullable<z.ZodString>>;
388
+ errorCode: z.ZodString;
389
+ errorMessage: z.ZodOptional<z.ZodString>;
390
+ }, z.core.$strip>, z.ZodObject<{
391
+ id: z.ZodNumber;
392
+ chatId: z.ZodString;
393
+ messageId: z.ZodString;
394
+ type: z.ZodLiteral<import("../schemas").StreamEventType.STEP_DONE>;
395
+ stepType: z.ZodEnum<typeof import("../schemas").GenerationStepType>;
396
+ stepId: z.ZodString;
397
+ stepIndex: z.ZodNumber;
398
+ modelUuid: z.ZodDefault<z.ZodNullable<z.ZodString>>;
399
+ fullContent: z.ZodOptional<z.ZodString>;
400
+ structuredContent: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
401
+ metadata: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
402
+ imageUrl: z.ZodString;
403
+ }, z.core.$strip>, z.ZodObject<{
404
+ imageUrls: z.ZodArray<z.ZodString>;
405
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>]>>;
406
+ }, z.core.$strip>, z.ZodObject<{
407
+ id: z.ZodNumber;
408
+ chatId: z.ZodString;
409
+ messageId: z.ZodString;
410
+ type: z.ZodLiteral<import("../schemas").StreamEventType.IMAGE>;
411
+ imageBase64: z.ZodString;
412
+ imageMimeType: z.ZodString;
413
+ imageIndex: z.ZodNumber;
414
+ }, z.core.$strip>, z.ZodObject<{
415
+ id: z.ZodNumber;
416
+ chatId: z.ZodString;
417
+ messageId: z.ZodString;
418
+ type: z.ZodLiteral<import("../schemas").StreamEventType.IMAGE_GENERATION_ERROR>;
419
+ }, z.core.$strip>, z.ZodObject<{
420
+ id: z.ZodNumber;
421
+ chatId: z.ZodString;
422
+ messageId: z.ZodString;
423
+ type: z.ZodLiteral<import("../schemas").StreamEventType.CITATIONS>;
424
+ citations: z.ZodArray<z.ZodObject<{
425
+ url: z.ZodString;
426
+ title: z.ZodString;
427
+ content: z.ZodOptional<z.ZodString>;
428
+ startIndex: z.ZodNumber;
429
+ endIndex: z.ZodNumber;
430
+ }, z.core.$strip>>;
431
+ }, z.core.$strip>, z.ZodObject<{
432
+ type: z.ZodLiteral<import("../schemas").StreamEventType.HEARTBEAT>;
433
+ timestamp: z.ZodString;
434
+ }, z.core.$strip>, z.ZodObject<{
435
+ id: z.ZodNumber;
436
+ chatId: z.ZodString;
437
+ messageId: z.ZodString;
438
+ type: z.ZodLiteral<import("../schemas").StreamEventType.BILLING_ESTIMATE>;
439
+ holdId: z.ZodString;
440
+ estimatedTokens: z.ZodNumber;
441
+ }, z.core.$strip>, z.ZodObject<{
442
+ id: z.ZodNumber;
443
+ chatId: z.ZodString;
444
+ messageId: z.ZodString;
445
+ type: z.ZodLiteral<import("../schemas").StreamEventType.STEP_BILLED>;
446
+ holdId: z.ZodString;
447
+ stepId: z.ZodString;
448
+ stepTokens: z.ZodNumber;
449
+ heldTokens: z.ZodNumber;
450
+ requestedTokens: z.ZodOptional<z.ZodNumber>;
451
+ discountTokens: z.ZodOptional<z.ZodNumber>;
452
+ }, z.core.$strip>, z.ZodObject<{
453
+ id: z.ZodNumber;
454
+ chatId: z.ZodString;
455
+ messageId: z.ZodString;
456
+ errorCategory: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof import("../schemas").MessageErrorCategory>>>;
457
+ errorActions: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof import("../schemas").MessageErrorAction>>>;
458
+ type: z.ZodLiteral<import("../schemas").StreamEventType.DONE>;
459
+ chargedTokens: z.ZodOptional<z.ZodNumber>;
460
+ }, z.core.$strip>, z.ZodObject<{
461
+ id: z.ZodNumber;
462
+ chatId: z.ZodString;
463
+ messageId: z.ZodString;
464
+ errorCategory: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof import("../schemas").MessageErrorCategory>>>;
465
+ errorActions: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof import("../schemas").MessageErrorAction>>>;
466
+ type: z.ZodLiteral<import("../schemas").StreamEventType.CANCELLED>;
467
+ chargedTokens: z.ZodOptional<z.ZodNumber>;
468
+ reason: z.ZodOptional<z.ZodEnum<typeof import("../schemas").StreamCancellationReason>>;
469
+ failedStepType: z.ZodOptional<z.ZodEnum<typeof import("../schemas").GenerationStepType>>;
470
+ requiredTokens: z.ZodOptional<z.ZodNumber>;
471
+ shortfallTokens: z.ZodOptional<z.ZodNumber>;
472
+ }, z.core.$strip>, z.ZodObject<{
473
+ id: z.ZodNumber;
474
+ chatId: z.ZodString;
475
+ messageId: z.ZodString;
476
+ errorCategory: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof import("../schemas").MessageErrorCategory>>>;
477
+ errorActions: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof import("../schemas").MessageErrorAction>>>;
478
+ type: z.ZodLiteral<import("../schemas").StreamEventType.ERROR>;
479
+ chargedTokens: z.ZodOptional<z.ZodNumber>;
480
+ }, z.core.$strip>], "type">, z.ZodObject<{
481
+ type: z.ZodLiteral<"heartbeat">;
482
+ timestamp: z.ZodString;
483
+ }, z.core.$strip>]>;
268
484
  const StepStartEvent: z.ZodObject<{
269
485
  id: z.ZodNumber;
270
486
  chatId: z.ZodString;
@@ -413,6 +629,7 @@ export declare namespace CreateMessageCommand {
413
629
  const IS_STREAM: true;
414
630
  type RequestType = z.infer<typeof Request>;
415
631
  type StreamEventType = z.infer<typeof StreamEvent>;
632
+ type FrameType = z.infer<typeof Frame>;
416
633
  type StepStartEventType = z.infer<typeof StepStartEvent>;
417
634
  type StepChunkEventType = z.infer<typeof StepChunkEvent>;
418
635
  type StepErrorEventType = z.infer<typeof StepErrorEvent>;
@@ -46,6 +46,8 @@ var CreateMessageCommand;
46
46
  CreateMessageCommand.Response = schemas_1.CreateMessageResponseSchema;
47
47
  /** Discriminated union of all stream events */
48
48
  CreateMessageCommand.StreamEvent = schemas_1.StreamEventSchema;
49
+ /** Entire NDJSON transport, including the lowercase connection heartbeat. */
50
+ CreateMessageCommand.Frame = schemas_1.MessageStreamFrameSchema;
49
51
  CreateMessageCommand.StepStartEvent = schemas_1.StreamStepStartEventSchema;
50
52
  CreateMessageCommand.StepChunkEvent = schemas_1.StreamStepChunkEventSchema;
51
53
  CreateMessageCommand.StepErrorEvent = schemas_1.StreamStepErrorEventSchema;
@@ -1 +1 @@
1
- {"version":3,"file":"create-message.command.js","sourceRoot":"","sources":["../../../../v1/message/commands/create-message.command.ts"],"names":[],"mappings":";;;AACA,wCAUoB;AACpB,gDAA6C;AAC7C,uEAA8D;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,IAAiB,oBAAoB,CA8BpC;AA9BD,WAAiB,oBAAoB;IACpB,4BAAO,GAAG,oCAA0B,CAAC;IACrC,6BAAQ,GAAG,qCAA2B,CAAC;IAEpD,+CAA+C;IAClC,gCAAW,GAAG,2BAAiB,CAAC;IAChC,mCAAc,GAAG,oCAA0B,CAAC;IAC5C,mCAAc,GAAG,oCAA0B,CAAC;IAC5C,mCAAc,GAAG,oCAA0B,CAAC;IAC5C,kCAAa,GAAG,mCAAyB,CAAC;IAC1C,8BAAS,GAAG,+BAAqB,CAAC;IAClC,+BAAU,GAAG,gCAAsB,CAAC;IAEpC,wBAAG,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,mBAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACjE,2BAAM,GAAG,6BAAU,CAAC,IAAI,CAAC;IAEtC,4BAA4B;IACf,iCAAY,GAAG,sBAA+B,CAAC;IAE5D,4DAA4D;IAC/C,8BAAS,GAAG,IAAa,CAAC;AAU3C,CAAC,EA9BgB,oBAAoB,oCAApB,oBAAoB,QA8BpC"}
1
+ {"version":3,"file":"create-message.command.js","sourceRoot":"","sources":["../../../../v1/message/commands/create-message.command.ts"],"names":[],"mappings":";;;AACA,wCAWoB;AACpB,gDAA6C;AAC7C,uEAA8D;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,IAAiB,oBAAoB,CAiCpC;AAjCD,WAAiB,oBAAoB;IACpB,4BAAO,GAAG,oCAA0B,CAAC;IACrC,6BAAQ,GAAG,qCAA2B,CAAC;IAEpD,+CAA+C;IAClC,gCAAW,GAAG,2BAAiB,CAAC;IAC7C,6EAA6E;IAChE,0BAAK,GAAG,kCAAwB,CAAC;IACjC,mCAAc,GAAG,oCAA0B,CAAC;IAC5C,mCAAc,GAAG,oCAA0B,CAAC;IAC5C,mCAAc,GAAG,oCAA0B,CAAC;IAC5C,kCAAa,GAAG,mCAAyB,CAAC;IAC1C,8BAAS,GAAG,+BAAqB,CAAC;IAClC,+BAAU,GAAG,gCAAsB,CAAC;IAEpC,wBAAG,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,mBAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACjE,2BAAM,GAAG,6BAAU,CAAC,IAAI,CAAC;IAEtC,4BAA4B;IACf,iCAAY,GAAG,sBAA+B,CAAC;IAE5D,4DAA4D;IAC/C,8BAAS,GAAG,IAAa,CAAC;AAW3C,CAAC,EAjCgB,oBAAoB,oCAApB,oBAAoB,QAiCpC"}
@@ -7,6 +7,12 @@ import { HttpMethod } from '../../../shared/http-method.enum';
7
7
  export declare namespace GetMessageStreamRegQuery {
8
8
  const Request: z.ZodObject<{}, z.core.$strip>;
9
9
  const Response: z.ZodDiscriminatedUnion<[z.ZodObject<{
10
+ id: z.ZodNumber;
11
+ chatId: z.ZodString;
12
+ messageId: z.ZodString;
13
+ type: z.ZodLiteral<import("../schemas").StreamEventType.PREPARATION_STATUS>;
14
+ status: z.ZodEnum<typeof import("../schemas").PreparationStatus>;
15
+ }, z.core.$strip>, z.ZodObject<{
10
16
  id: z.ZodNumber;
11
17
  chatId: z.ZodString;
12
18
  messageId: z.ZodString;
@@ -206,10 +212,220 @@ export declare namespace GetMessageStreamRegQuery {
206
212
  type: z.ZodLiteral<import("../schemas").StreamEventType.ERROR>;
207
213
  chargedTokens: z.ZodOptional<z.ZodNumber>;
208
214
  }, z.core.$strip>], "type">;
215
+ const Frame: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
216
+ id: z.ZodNumber;
217
+ chatId: z.ZodString;
218
+ messageId: z.ZodString;
219
+ type: z.ZodLiteral<import("../schemas").StreamEventType.PREPARATION_STATUS>;
220
+ status: z.ZodEnum<typeof import("../schemas").PreparationStatus>;
221
+ }, z.core.$strip>, z.ZodObject<{
222
+ id: z.ZodNumber;
223
+ chatId: z.ZodString;
224
+ messageId: z.ZodString;
225
+ type: z.ZodLiteral<import("../schemas").StreamEventType.GENERATION_STATUS>;
226
+ status: z.ZodEnum<typeof import("../schemas").GenerationStatus>;
227
+ modelId: z.ZodString;
228
+ }, z.core.$strip>, z.ZodObject<{
229
+ id: z.ZodNumber;
230
+ chatId: z.ZodString;
231
+ messageId: z.ZodString;
232
+ type: z.ZodLiteral<import("../schemas").StreamEventType.STEP_START>;
233
+ stepType: z.ZodEnum<typeof import("../schemas").GenerationStepType>;
234
+ stepId: z.ZodString;
235
+ stepIndex: z.ZodNumber;
236
+ modelUuid: z.ZodDefault<z.ZodNullable<z.ZodString>>;
237
+ metadata: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
238
+ path: z.ZodString;
239
+ filename: z.ZodString;
240
+ }, z.core.$strip>, z.ZodObject<{
241
+ queries: z.ZodArray<z.ZodString>;
242
+ }, z.core.$strip>, z.ZodObject<{
243
+ query: z.ZodString;
244
+ }, z.core.$strip>, z.ZodObject<{
245
+ sourceResolution: z.ZodString;
246
+ sourceImageCount: z.ZodNumber;
247
+ }, z.core.$strip>, z.ZodObject<{
248
+ videoUrl: z.ZodString;
249
+ }, z.core.$strip>, z.ZodObject<{
250
+ primitiveType: z.ZodEnum<typeof import("../..").SandboxPrimitiveType>;
251
+ }, z.core.$strip>, z.ZodObject<{
252
+ toolName: z.ZodString;
253
+ connectionUuid: z.ZodString;
254
+ providerKey: z.ZodNullable<z.ZodString>;
255
+ argsPreview: z.ZodOptional<z.ZodString>;
256
+ }, z.core.$strip>]>>;
257
+ }, z.core.$strip>, z.ZodObject<{
258
+ id: z.ZodNumber;
259
+ chatId: z.ZodString;
260
+ messageId: z.ZodString;
261
+ type: z.ZodLiteral<import("../schemas").StreamEventType.STEP_CHUNK>;
262
+ stepType: z.ZodEnum<typeof import("../schemas").GenerationStepType>;
263
+ stepId: z.ZodString;
264
+ chunk: z.ZodString;
265
+ modelUuid: z.ZodDefault<z.ZodNullable<z.ZodString>>;
266
+ metadata: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
267
+ kind: z.ZodLiteral<import("../schemas").StepChunkKind.ARGS>;
268
+ primitiveType: z.ZodEnum<typeof import("../..").SandboxPrimitiveType>;
269
+ }, z.core.$strip>, z.ZodObject<{
270
+ kind: z.ZodLiteral<import("../schemas").StepChunkKind.DESCRIBE>;
271
+ primitiveType: z.ZodEnum<typeof import("../..").SandboxPrimitiveType>;
272
+ }, z.core.$strip>, z.ZodObject<{
273
+ kind: z.ZodLiteral<import("../schemas").StepChunkKind.BASH>;
274
+ stream: z.ZodEnum<typeof import("../schemas").BashChunkStream>;
275
+ }, z.core.$strip>, z.ZodObject<{
276
+ kind: z.ZodLiteral<import("../schemas").StepChunkKind.CREATE_FILE>;
277
+ path: z.ZodString;
278
+ totalLines: z.ZodNumber;
279
+ bytesWritten: z.ZodNumber;
280
+ overwrite: z.ZodBoolean;
281
+ preview: z.ZodObject<{
282
+ lines: z.ZodArray<z.ZodString>;
283
+ truncated: z.ZodBoolean;
284
+ }, z.core.$strip>;
285
+ }, z.core.$strip>, z.ZodObject<{
286
+ kind: z.ZodLiteral<import("../schemas").StepChunkKind.STR_REPLACE>;
287
+ path: z.ZodString;
288
+ linesAdded: z.ZodNumber;
289
+ linesRemoved: z.ZodNumber;
290
+ linesBefore: z.ZodNumber;
291
+ linesAfter: z.ZodNumber;
292
+ hunk: z.ZodObject<{
293
+ startLine: z.ZodNumber;
294
+ contextBefore: z.ZodArray<z.ZodString>;
295
+ oldLines: z.ZodArray<z.ZodString>;
296
+ newLines: z.ZodArray<z.ZodString>;
297
+ contextAfter: z.ZodArray<z.ZodString>;
298
+ truncated: z.ZodBoolean;
299
+ }, z.core.$strip>;
300
+ }, z.core.$strip>, z.ZodObject<{
301
+ kind: z.ZodLiteral<import("../schemas").StepChunkKind.VIEW>;
302
+ path: z.ZodString;
303
+ view: z.ZodDiscriminatedUnion<[z.ZodObject<{
304
+ type: z.ZodLiteral<import("../..").SandboxViewKind.DIRECTORY>;
305
+ entryCount: z.ZodNumber;
306
+ }, z.core.$strip>, z.ZodObject<{
307
+ type: z.ZodLiteral<import("../..").SandboxViewKind.TEXT>;
308
+ startLine: z.ZodNumber;
309
+ endLine: z.ZodNumber;
310
+ totalLines: z.ZodNumber;
311
+ truncated: z.ZodBoolean;
312
+ }, z.core.$strip>, z.ZodObject<{
313
+ type: z.ZodLiteral<import("../..").SandboxViewKind.IMAGE>;
314
+ }, z.core.$strip>, z.ZodObject<{
315
+ type: z.ZodLiteral<import("../..").SandboxViewKind.PDF>;
316
+ pagesShown: z.ZodNumber;
317
+ }, z.core.$strip>], "type">;
318
+ }, z.core.$strip>], "kind">>;
319
+ }, z.core.$strip>, z.ZodObject<{
320
+ id: z.ZodNumber;
321
+ chatId: z.ZodString;
322
+ messageId: z.ZodString;
323
+ type: z.ZodLiteral<import("../schemas").StreamEventType.STEP_ERROR>;
324
+ stepType: z.ZodEnum<typeof import("../schemas").GenerationStepType>;
325
+ stepId: z.ZodString;
326
+ stepIndex: z.ZodNumber;
327
+ modelUuid: z.ZodDefault<z.ZodNullable<z.ZodString>>;
328
+ errorCode: z.ZodString;
329
+ errorMessage: z.ZodOptional<z.ZodString>;
330
+ }, z.core.$strip>, z.ZodObject<{
331
+ id: z.ZodNumber;
332
+ chatId: z.ZodString;
333
+ messageId: z.ZodString;
334
+ type: z.ZodLiteral<import("../schemas").StreamEventType.STEP_DONE>;
335
+ stepType: z.ZodEnum<typeof import("../schemas").GenerationStepType>;
336
+ stepId: z.ZodString;
337
+ stepIndex: z.ZodNumber;
338
+ modelUuid: z.ZodDefault<z.ZodNullable<z.ZodString>>;
339
+ fullContent: z.ZodOptional<z.ZodString>;
340
+ structuredContent: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
341
+ metadata: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
342
+ imageUrl: z.ZodString;
343
+ }, z.core.$strip>, z.ZodObject<{
344
+ imageUrls: z.ZodArray<z.ZodString>;
345
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>]>>;
346
+ }, z.core.$strip>, z.ZodObject<{
347
+ id: z.ZodNumber;
348
+ chatId: z.ZodString;
349
+ messageId: z.ZodString;
350
+ type: z.ZodLiteral<import("../schemas").StreamEventType.IMAGE>;
351
+ imageBase64: z.ZodString;
352
+ imageMimeType: z.ZodString;
353
+ imageIndex: z.ZodNumber;
354
+ }, z.core.$strip>, z.ZodObject<{
355
+ id: z.ZodNumber;
356
+ chatId: z.ZodString;
357
+ messageId: z.ZodString;
358
+ type: z.ZodLiteral<import("../schemas").StreamEventType.IMAGE_GENERATION_ERROR>;
359
+ }, z.core.$strip>, z.ZodObject<{
360
+ id: z.ZodNumber;
361
+ chatId: z.ZodString;
362
+ messageId: z.ZodString;
363
+ type: z.ZodLiteral<import("../schemas").StreamEventType.CITATIONS>;
364
+ citations: z.ZodArray<z.ZodObject<{
365
+ url: z.ZodString;
366
+ title: z.ZodString;
367
+ content: z.ZodOptional<z.ZodString>;
368
+ startIndex: z.ZodNumber;
369
+ endIndex: z.ZodNumber;
370
+ }, z.core.$strip>>;
371
+ }, z.core.$strip>, z.ZodObject<{
372
+ type: z.ZodLiteral<import("../schemas").StreamEventType.HEARTBEAT>;
373
+ timestamp: z.ZodString;
374
+ }, z.core.$strip>, z.ZodObject<{
375
+ id: z.ZodNumber;
376
+ chatId: z.ZodString;
377
+ messageId: z.ZodString;
378
+ type: z.ZodLiteral<import("../schemas").StreamEventType.BILLING_ESTIMATE>;
379
+ holdId: z.ZodString;
380
+ estimatedTokens: z.ZodNumber;
381
+ }, z.core.$strip>, z.ZodObject<{
382
+ id: z.ZodNumber;
383
+ chatId: z.ZodString;
384
+ messageId: z.ZodString;
385
+ type: z.ZodLiteral<import("../schemas").StreamEventType.STEP_BILLED>;
386
+ holdId: z.ZodString;
387
+ stepId: z.ZodString;
388
+ stepTokens: z.ZodNumber;
389
+ heldTokens: z.ZodNumber;
390
+ requestedTokens: z.ZodOptional<z.ZodNumber>;
391
+ discountTokens: z.ZodOptional<z.ZodNumber>;
392
+ }, z.core.$strip>, z.ZodObject<{
393
+ id: z.ZodNumber;
394
+ chatId: z.ZodString;
395
+ messageId: z.ZodString;
396
+ errorCategory: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof import("../schemas").MessageErrorCategory>>>;
397
+ errorActions: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof import("../schemas").MessageErrorAction>>>;
398
+ type: z.ZodLiteral<import("../schemas").StreamEventType.DONE>;
399
+ chargedTokens: z.ZodOptional<z.ZodNumber>;
400
+ }, z.core.$strip>, z.ZodObject<{
401
+ id: z.ZodNumber;
402
+ chatId: z.ZodString;
403
+ messageId: z.ZodString;
404
+ errorCategory: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof import("../schemas").MessageErrorCategory>>>;
405
+ errorActions: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof import("../schemas").MessageErrorAction>>>;
406
+ type: z.ZodLiteral<import("../schemas").StreamEventType.CANCELLED>;
407
+ chargedTokens: z.ZodOptional<z.ZodNumber>;
408
+ reason: z.ZodOptional<z.ZodEnum<typeof import("../schemas").StreamCancellationReason>>;
409
+ failedStepType: z.ZodOptional<z.ZodEnum<typeof import("../schemas").GenerationStepType>>;
410
+ requiredTokens: z.ZodOptional<z.ZodNumber>;
411
+ shortfallTokens: z.ZodOptional<z.ZodNumber>;
412
+ }, z.core.$strip>, z.ZodObject<{
413
+ id: z.ZodNumber;
414
+ chatId: z.ZodString;
415
+ messageId: z.ZodString;
416
+ errorCategory: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof import("../schemas").MessageErrorCategory>>>;
417
+ errorActions: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof import("../schemas").MessageErrorAction>>>;
418
+ type: z.ZodLiteral<import("../schemas").StreamEventType.ERROR>;
419
+ chargedTokens: z.ZodOptional<z.ZodNumber>;
420
+ }, z.core.$strip>], "type">, z.ZodObject<{
421
+ type: z.ZodLiteral<"heartbeat">;
422
+ timestamp: z.ZodString;
423
+ }, z.core.$strip>]>;
209
424
  const URL: (chatId: string, messageId: string) => string;
210
425
  const METHOD = HttpMethod.GET;
211
426
  const CONTENT_TYPE: "application/x-ndjson";
212
427
  const IS_STREAM: true;
213
428
  type RequestType = z.infer<typeof Request>;
214
429
  type ResponseType = z.infer<typeof Response>;
430
+ type FrameType = z.infer<typeof Frame>;
215
431
  }
@@ -13,6 +13,7 @@ var GetMessageStreamRegQuery;
13
13
  (function (GetMessageStreamRegQuery) {
14
14
  GetMessageStreamRegQuery.Request = zod_1.z.object({});
15
15
  GetMessageStreamRegQuery.Response = schemas_1.StreamEventSchema;
16
+ GetMessageStreamRegQuery.Frame = schemas_1.MessageStreamFrameSchema;
16
17
  GetMessageStreamRegQuery.URL = (chatId, messageId) => rest_api_1.REST_API.V1.MESSAGE.REG.STREAM(chatId, messageId);
17
18
  GetMessageStreamRegQuery.METHOD = http_method_enum_1.HttpMethod.GET;
18
19
  GetMessageStreamRegQuery.CONTENT_TYPE = 'application/x-ndjson';
@@ -1 +1 @@
1
- {"version":3,"file":"get-message-stream-reg.query.js","sourceRoot":"","sources":["../../../../v1/message/queries/get-message-stream-reg.query.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,wCAA+C;AAC/C,gDAA6C;AAC7C,uEAA8D;AAE9D;;;GAGG;AACH,IAAiB,wBAAwB,CAYxC;AAZD,WAAiB,wBAAwB;IACxB,gCAAO,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACvB,iCAAQ,GAAG,2BAAiB,CAAC;IAE7B,4BAAG,GAAG,CAAC,MAAc,EAAE,SAAiB,EAAE,EAAE,CACrD,mBAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACzC,+BAAM,GAAG,6BAAU,CAAC,GAAG,CAAC;IACxB,qCAAY,GAAG,sBAA+B,CAAC;IAC/C,kCAAS,GAAG,IAAa,CAAC;AAI3C,CAAC,EAZgB,wBAAwB,wCAAxB,wBAAwB,QAYxC"}
1
+ {"version":3,"file":"get-message-stream-reg.query.js","sourceRoot":"","sources":["../../../../v1/message/queries/get-message-stream-reg.query.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,wCAAyE;AACzE,gDAA6C;AAC7C,uEAA8D;AAE9D;;;GAGG;AACH,IAAiB,wBAAwB,CAcxC;AAdD,WAAiB,wBAAwB;IACxB,gCAAO,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACvB,iCAAQ,GAAG,2BAAiB,CAAC;IAC7B,8BAAK,GAAG,kCAAwB,CAAC;IAEjC,4BAAG,GAAG,CAAC,MAAc,EAAE,SAAiB,EAAE,EAAE,CACrD,mBAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACzC,+BAAM,GAAG,6BAAU,CAAC,GAAG,CAAC;IACxB,qCAAY,GAAG,sBAA+B,CAAC;IAC/C,kCAAS,GAAG,IAAa,CAAC;AAK3C,CAAC,EAdgB,wBAAwB,wCAAxB,wBAAwB,QAcxC"}