@reduck-ai/sdk 1.1.21 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/README.md +105 -202
  2. package/dist/client.d.ts +11 -20
  3. package/dist/client.js +19 -107
  4. package/dist/generated/client/client.gen.d.ts +2 -0
  5. package/dist/generated/client/client.gen.js +216 -0
  6. package/dist/generated/client/index.d.ts +10 -0
  7. package/dist/generated/client/index.js +6 -0
  8. package/dist/generated/client/types.gen.d.ts +120 -0
  9. package/dist/generated/client/types.gen.js +2 -0
  10. package/dist/generated/client/utils.gen.d.ts +37 -0
  11. package/dist/generated/client/utils.gen.js +228 -0
  12. package/dist/generated/client.gen.d.ts +12 -0
  13. package/dist/generated/client.gen.js +3 -0
  14. package/dist/generated/core/auth.gen.d.ts +25 -0
  15. package/dist/generated/core/auth.gen.js +14 -0
  16. package/dist/generated/core/bodySerializer.gen.d.ts +25 -0
  17. package/dist/generated/core/bodySerializer.gen.js +57 -0
  18. package/dist/generated/core/params.gen.d.ts +43 -0
  19. package/dist/generated/core/params.gen.js +109 -0
  20. package/dist/generated/core/pathSerializer.gen.d.ts +33 -0
  21. package/dist/generated/core/pathSerializer.gen.js +106 -0
  22. package/dist/generated/core/queryKeySerializer.gen.d.ts +18 -0
  23. package/dist/generated/core/queryKeySerializer.gen.js +92 -0
  24. package/dist/generated/core/serverSentEvents.gen.d.ts +71 -0
  25. package/dist/generated/core/serverSentEvents.gen.js +132 -0
  26. package/dist/generated/core/types.gen.d.ts +83 -0
  27. package/dist/generated/core/types.gen.js +2 -0
  28. package/dist/generated/core/utils.gen.d.ts +19 -0
  29. package/dist/generated/core/utils.gen.js +87 -0
  30. package/dist/generated/index.d.ts +2 -0
  31. package/dist/generated/index.js +3 -0
  32. package/dist/generated/sdk.gen.d.ts +471 -0
  33. package/dist/generated/sdk.gen.js +862 -0
  34. package/dist/generated/types.gen.d.ts +5489 -0
  35. package/dist/generated/types.gen.js +56 -0
  36. package/dist/index.d.ts +3 -5
  37. package/dist/index.js +4 -4
  38. package/openapi.json +16668 -0
  39. package/package.json +23 -25
  40. package/dist/build-env.generated.d.ts +0 -3
  41. package/dist/build-env.generated.js +0 -4
  42. package/dist/device.d.ts +0 -3
  43. package/dist/device.js +0 -7
  44. package/dist/errors.d.ts +0 -9
  45. package/dist/errors.js +0 -21
  46. package/dist/method.d.ts +0 -3
  47. package/dist/method.js +0 -23
  48. package/dist/run.d.ts +0 -12
  49. package/dist/run.js +0 -73
  50. package/dist/schemas.d.ts +0 -597
  51. package/dist/schemas.js +0 -106
  52. package/dist/session.d.ts +0 -3
  53. package/dist/session.js +0 -14
  54. package/dist/site.d.ts +0 -3
  55. package/dist/site.js +0 -21
  56. package/dist/types.d.ts +0 -43
  57. package/dist/types.js +0 -8
package/dist/schemas.d.ts DELETED
@@ -1,597 +0,0 @@
1
- import { z } from "zod";
2
- export declare const DeviceSchema: z.ZodObject<{
3
- id: z.ZodString;
4
- name: z.ZodNullable<z.ZodString>;
5
- browser: z.ZodNullable<z.ZodString>;
6
- os: z.ZodNullable<z.ZodString>;
7
- reachable: z.ZodBoolean;
8
- created_at: z.ZodString;
9
- }, "strip", z.ZodTypeAny, {
10
- id: string;
11
- name: string | null;
12
- browser: string | null;
13
- os: string | null;
14
- reachable: boolean;
15
- created_at: string;
16
- }, {
17
- id: string;
18
- name: string | null;
19
- browser: string | null;
20
- os: string | null;
21
- reachable: boolean;
22
- created_at: string;
23
- }>;
24
- export declare const RunEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
25
- run_id: z.ZodString;
26
- device_id: z.ZodString;
27
- } & {
28
- type: z.ZodLiteral<"run_requested">;
29
- query: z.ZodOptional<z.ZodString>;
30
- args: z.ZodObject<{
31
- mount: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
32
- method: z.ZodOptional<z.ZodString>;
33
- method_args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
34
- paste_slots: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
35
- output_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
36
- }, "strip", z.ZodTypeAny, {
37
- mount?: string[] | undefined;
38
- method?: string | undefined;
39
- method_args?: Record<string, string> | undefined;
40
- paste_slots?: Record<string, string> | undefined;
41
- output_schema?: Record<string, unknown> | undefined;
42
- }, {
43
- mount?: string[] | undefined;
44
- method?: string | undefined;
45
- method_args?: Record<string, string> | undefined;
46
- paste_slots?: Record<string, string> | undefined;
47
- output_schema?: Record<string, unknown> | undefined;
48
- }>;
49
- cli_args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
50
- }, "strip", z.ZodTypeAny, {
51
- type: "run_requested";
52
- run_id: string;
53
- device_id: string;
54
- args: {
55
- mount?: string[] | undefined;
56
- method?: string | undefined;
57
- method_args?: Record<string, string> | undefined;
58
- paste_slots?: Record<string, string> | undefined;
59
- output_schema?: Record<string, unknown> | undefined;
60
- };
61
- query?: string | undefined;
62
- cli_args?: Record<string, unknown> | undefined;
63
- }, {
64
- type: "run_requested";
65
- run_id: string;
66
- device_id: string;
67
- args: {
68
- mount?: string[] | undefined;
69
- method?: string | undefined;
70
- method_args?: Record<string, string> | undefined;
71
- paste_slots?: Record<string, string> | undefined;
72
- output_schema?: Record<string, unknown> | undefined;
73
- };
74
- query?: string | undefined;
75
- cli_args?: Record<string, unknown> | undefined;
76
- }>, z.ZodObject<{
77
- run_id: z.ZodString;
78
- device_id: z.ZodString;
79
- } & {
80
- type: z.ZodLiteral<"progress">;
81
- text: z.ZodString;
82
- timestamp: z.ZodNumber;
83
- }, "strip", z.ZodTypeAny, {
84
- type: "progress";
85
- run_id: string;
86
- device_id: string;
87
- text: string;
88
- timestamp: number;
89
- }, {
90
- type: "progress";
91
- run_id: string;
92
- device_id: string;
93
- text: string;
94
- timestamp: number;
95
- }>, z.ZodObject<{
96
- run_id: z.ZodString;
97
- device_id: z.ZodString;
98
- } & {
99
- type: z.ZodLiteral<"assistant">;
100
- text: z.ZodString;
101
- timestamp: z.ZodNumber;
102
- }, "strip", z.ZodTypeAny, {
103
- type: "assistant";
104
- run_id: string;
105
- device_id: string;
106
- text: string;
107
- timestamp: number;
108
- }, {
109
- type: "assistant";
110
- run_id: string;
111
- device_id: string;
112
- text: string;
113
- timestamp: number;
114
- }>, z.ZodObject<{
115
- run_id: z.ZodString;
116
- device_id: z.ZodString;
117
- } & {
118
- type: z.ZodLiteral<"turn_completed">;
119
- timestamp: z.ZodNumber;
120
- }, "strip", z.ZodTypeAny, {
121
- type: "turn_completed";
122
- run_id: string;
123
- device_id: string;
124
- timestamp: number;
125
- }, {
126
- type: "turn_completed";
127
- run_id: string;
128
- device_id: string;
129
- timestamp: number;
130
- }>, z.ZodObject<{
131
- run_id: z.ZodString;
132
- device_id: z.ZodString;
133
- } & {
134
- type: z.ZodLiteral<"run_started">;
135
- timestamp: z.ZodNumber;
136
- }, "strip", z.ZodTypeAny, {
137
- type: "run_started";
138
- run_id: string;
139
- device_id: string;
140
- timestamp: number;
141
- }, {
142
- type: "run_started";
143
- run_id: string;
144
- device_id: string;
145
- timestamp: number;
146
- }>, z.ZodObject<{
147
- run_id: z.ZodString;
148
- device_id: z.ZodString;
149
- } & {
150
- type: z.ZodLiteral<"run_completed">;
151
- timestamp: z.ZodNumber;
152
- }, "strip", z.ZodTypeAny, {
153
- type: "run_completed";
154
- run_id: string;
155
- device_id: string;
156
- timestamp: number;
157
- }, {
158
- type: "run_completed";
159
- run_id: string;
160
- device_id: string;
161
- timestamp: number;
162
- }>, z.ZodObject<{
163
- run_id: z.ZodString;
164
- device_id: z.ZodString;
165
- } & {
166
- type: z.ZodLiteral<"done">;
167
- success: z.ZodBoolean;
168
- output: z.ZodOptional<z.ZodString>;
169
- final_url: z.ZodOptional<z.ZodString>;
170
- extractions: z.ZodOptional<z.ZodArray<z.ZodObject<{
171
- host: z.ZodString;
172
- slug: z.ZodString;
173
- records: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
174
- output_schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
175
- }, "strip", z.ZodTypeAny, {
176
- output_schema: Record<string, unknown>;
177
- host: string;
178
- slug: string;
179
- records: Record<string, unknown>[];
180
- }, {
181
- output_schema: Record<string, unknown>;
182
- host: string;
183
- slug: string;
184
- records: Record<string, unknown>[];
185
- }>, "many">>;
186
- downloads: z.ZodOptional<z.ZodArray<z.ZodObject<{
187
- filename: z.ZodString;
188
- path: z.ZodOptional<z.ZodString>;
189
- mimetype: z.ZodOptional<z.ZodString>;
190
- url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
191
- }, "strip", z.ZodTypeAny, {
192
- filename: string;
193
- path?: string | undefined;
194
- mimetype?: string | undefined;
195
- url?: string | null | undefined;
196
- }, {
197
- filename: string;
198
- path?: string | undefined;
199
- mimetype?: string | undefined;
200
- url?: string | null | undefined;
201
- }>, "many">>;
202
- }, "strip", z.ZodTypeAny, {
203
- type: "done";
204
- run_id: string;
205
- device_id: string;
206
- success: boolean;
207
- output?: string | undefined;
208
- final_url?: string | undefined;
209
- extractions?: {
210
- output_schema: Record<string, unknown>;
211
- host: string;
212
- slug: string;
213
- records: Record<string, unknown>[];
214
- }[] | undefined;
215
- downloads?: {
216
- filename: string;
217
- path?: string | undefined;
218
- mimetype?: string | undefined;
219
- url?: string | null | undefined;
220
- }[] | undefined;
221
- }, {
222
- type: "done";
223
- run_id: string;
224
- device_id: string;
225
- success: boolean;
226
- output?: string | undefined;
227
- final_url?: string | undefined;
228
- extractions?: {
229
- output_schema: Record<string, unknown>;
230
- host: string;
231
- slug: string;
232
- records: Record<string, unknown>[];
233
- }[] | undefined;
234
- downloads?: {
235
- filename: string;
236
- path?: string | undefined;
237
- mimetype?: string | undefined;
238
- url?: string | null | undefined;
239
- }[] | undefined;
240
- }>, z.ZodObject<{
241
- run_id: z.ZodString;
242
- device_id: z.ZodString;
243
- } & {
244
- type: z.ZodLiteral<"failure">;
245
- error: z.ZodString;
246
- }, "strip", z.ZodTypeAny, {
247
- type: "failure";
248
- run_id: string;
249
- device_id: string;
250
- error: string;
251
- }, {
252
- type: "failure";
253
- run_id: string;
254
- device_id: string;
255
- error: string;
256
- }>, z.ZodObject<{
257
- run_id: z.ZodString;
258
- device_id: z.ZodString;
259
- } & {
260
- type: z.ZodLiteral<"cancel">;
261
- }, "strip", z.ZodTypeAny, {
262
- type: "cancel";
263
- run_id: string;
264
- device_id: string;
265
- }, {
266
- type: "cancel";
267
- run_id: string;
268
- device_id: string;
269
- }>]>;
270
- export declare const RunResultSchema: z.ZodObject<{
271
- run_id: z.ZodString;
272
- device_id: z.ZodString;
273
- } & {
274
- type: z.ZodLiteral<"done">;
275
- success: z.ZodBoolean;
276
- output: z.ZodOptional<z.ZodString>;
277
- final_url: z.ZodOptional<z.ZodString>;
278
- extractions: z.ZodOptional<z.ZodArray<z.ZodObject<{
279
- host: z.ZodString;
280
- slug: z.ZodString;
281
- records: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
282
- output_schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
283
- }, "strip", z.ZodTypeAny, {
284
- output_schema: Record<string, unknown>;
285
- host: string;
286
- slug: string;
287
- records: Record<string, unknown>[];
288
- }, {
289
- output_schema: Record<string, unknown>;
290
- host: string;
291
- slug: string;
292
- records: Record<string, unknown>[];
293
- }>, "many">>;
294
- downloads: z.ZodOptional<z.ZodArray<z.ZodObject<{
295
- filename: z.ZodString;
296
- path: z.ZodOptional<z.ZodString>;
297
- mimetype: z.ZodOptional<z.ZodString>;
298
- url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
299
- }, "strip", z.ZodTypeAny, {
300
- filename: string;
301
- path?: string | undefined;
302
- mimetype?: string | undefined;
303
- url?: string | null | undefined;
304
- }, {
305
- filename: string;
306
- path?: string | undefined;
307
- mimetype?: string | undefined;
308
- url?: string | null | undefined;
309
- }>, "many">>;
310
- }, "strip", z.ZodTypeAny, {
311
- type: "done";
312
- run_id: string;
313
- device_id: string;
314
- success: boolean;
315
- output?: string | undefined;
316
- final_url?: string | undefined;
317
- extractions?: {
318
- output_schema: Record<string, unknown>;
319
- host: string;
320
- slug: string;
321
- records: Record<string, unknown>[];
322
- }[] | undefined;
323
- downloads?: {
324
- filename: string;
325
- path?: string | undefined;
326
- mimetype?: string | undefined;
327
- url?: string | null | undefined;
328
- }[] | undefined;
329
- }, {
330
- type: "done";
331
- run_id: string;
332
- device_id: string;
333
- success: boolean;
334
- output?: string | undefined;
335
- final_url?: string | undefined;
336
- extractions?: {
337
- output_schema: Record<string, unknown>;
338
- host: string;
339
- slug: string;
340
- records: Record<string, unknown>[];
341
- }[] | undefined;
342
- downloads?: {
343
- filename: string;
344
- path?: string | undefined;
345
- mimetype?: string | undefined;
346
- url?: string | null | undefined;
347
- }[] | undefined;
348
- }>;
349
- export declare const RunRecordSchema: z.ZodObject<{
350
- id: z.ZodString;
351
- started_at: z.ZodString;
352
- finished_at: z.ZodNullable<z.ZodString>;
353
- result: z.ZodNullable<z.ZodObject<{
354
- success: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
355
- cancelled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
356
- reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
357
- output: z.ZodOptional<z.ZodNullable<z.ZodString>>;
358
- }, "strip", z.ZodTypeAny, {
359
- success?: boolean | null | undefined;
360
- output?: string | null | undefined;
361
- cancelled?: boolean | null | undefined;
362
- reason?: string | null | undefined;
363
- }, {
364
- success?: boolean | null | undefined;
365
- output?: string | null | undefined;
366
- cancelled?: boolean | null | undefined;
367
- reason?: string | null | undefined;
368
- }>>;
369
- resolved: z.ZodNullable<z.ZodObject<{
370
- url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
371
- prompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
372
- }, "strip", z.ZodTypeAny, {
373
- url?: string | null | undefined;
374
- prompt?: string | null | undefined;
375
- }, {
376
- url?: string | null | undefined;
377
- prompt?: string | null | undefined;
378
- }>>;
379
- }, "strip", z.ZodTypeAny, {
380
- id: string;
381
- started_at: string;
382
- finished_at: string | null;
383
- result: {
384
- success?: boolean | null | undefined;
385
- output?: string | null | undefined;
386
- cancelled?: boolean | null | undefined;
387
- reason?: string | null | undefined;
388
- } | null;
389
- resolved: {
390
- url?: string | null | undefined;
391
- prompt?: string | null | undefined;
392
- } | null;
393
- }, {
394
- id: string;
395
- started_at: string;
396
- finished_at: string | null;
397
- result: {
398
- success?: boolean | null | undefined;
399
- output?: string | null | undefined;
400
- cancelled?: boolean | null | undefined;
401
- reason?: string | null | undefined;
402
- } | null;
403
- resolved: {
404
- url?: string | null | undefined;
405
- prompt?: string | null | undefined;
406
- } | null;
407
- }>;
408
- export declare const RunsPageSchema: z.ZodObject<{
409
- data: z.ZodArray<z.ZodObject<{
410
- id: z.ZodString;
411
- started_at: z.ZodString;
412
- finished_at: z.ZodNullable<z.ZodString>;
413
- result: z.ZodNullable<z.ZodObject<{
414
- success: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
415
- cancelled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
416
- reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
417
- output: z.ZodOptional<z.ZodNullable<z.ZodString>>;
418
- }, "strip", z.ZodTypeAny, {
419
- success?: boolean | null | undefined;
420
- output?: string | null | undefined;
421
- cancelled?: boolean | null | undefined;
422
- reason?: string | null | undefined;
423
- }, {
424
- success?: boolean | null | undefined;
425
- output?: string | null | undefined;
426
- cancelled?: boolean | null | undefined;
427
- reason?: string | null | undefined;
428
- }>>;
429
- resolved: z.ZodNullable<z.ZodObject<{
430
- url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
431
- prompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
432
- }, "strip", z.ZodTypeAny, {
433
- url?: string | null | undefined;
434
- prompt?: string | null | undefined;
435
- }, {
436
- url?: string | null | undefined;
437
- prompt?: string | null | undefined;
438
- }>>;
439
- }, "strip", z.ZodTypeAny, {
440
- id: string;
441
- started_at: string;
442
- finished_at: string | null;
443
- result: {
444
- success?: boolean | null | undefined;
445
- output?: string | null | undefined;
446
- cancelled?: boolean | null | undefined;
447
- reason?: string | null | undefined;
448
- } | null;
449
- resolved: {
450
- url?: string | null | undefined;
451
- prompt?: string | null | undefined;
452
- } | null;
453
- }, {
454
- id: string;
455
- started_at: string;
456
- finished_at: string | null;
457
- result: {
458
- success?: boolean | null | undefined;
459
- output?: string | null | undefined;
460
- cancelled?: boolean | null | undefined;
461
- reason?: string | null | undefined;
462
- } | null;
463
- resolved: {
464
- url?: string | null | undefined;
465
- prompt?: string | null | undefined;
466
- } | null;
467
- }>, "many">;
468
- hasNextPage: z.ZodBoolean;
469
- }, "strip", z.ZodTypeAny, {
470
- data: {
471
- id: string;
472
- started_at: string;
473
- finished_at: string | null;
474
- result: {
475
- success?: boolean | null | undefined;
476
- output?: string | null | undefined;
477
- cancelled?: boolean | null | undefined;
478
- reason?: string | null | undefined;
479
- } | null;
480
- resolved: {
481
- url?: string | null | undefined;
482
- prompt?: string | null | undefined;
483
- } | null;
484
- }[];
485
- hasNextPage: boolean;
486
- }, {
487
- data: {
488
- id: string;
489
- started_at: string;
490
- finished_at: string | null;
491
- result: {
492
- success?: boolean | null | undefined;
493
- output?: string | null | undefined;
494
- cancelled?: boolean | null | undefined;
495
- reason?: string | null | undefined;
496
- } | null;
497
- resolved: {
498
- url?: string | null | undefined;
499
- prompt?: string | null | undefined;
500
- } | null;
501
- }[];
502
- hasNextPage: boolean;
503
- }>;
504
- export declare const MethodSchema: z.ZodObject<{
505
- host: z.ZodString;
506
- method_slug: z.ZodString;
507
- description: z.ZodString;
508
- args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
509
- output_schema: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
510
- }, "strip", z.ZodTypeAny, {
511
- output_schema: Record<string, unknown> | null;
512
- args: Record<string, unknown>;
513
- host: string;
514
- method_slug: string;
515
- description: string;
516
- }, {
517
- output_schema: Record<string, unknown> | null;
518
- args: Record<string, unknown>;
519
- host: string;
520
- method_slug: string;
521
- description: string;
522
- }>;
523
- export declare const SiteSchema: z.ZodObject<{
524
- host: z.ZodString;
525
- notes: z.ZodDefault<z.ZodString>;
526
- }, "strip", z.ZodTypeAny, {
527
- host: string;
528
- notes: string;
529
- }, {
530
- host: string;
531
- notes?: string | undefined;
532
- }>;
533
- export declare const SitesPageSchema: z.ZodObject<{
534
- data: z.ZodArray<z.ZodObject<{
535
- host: z.ZodString;
536
- notes: z.ZodDefault<z.ZodString>;
537
- }, "strip", z.ZodTypeAny, {
538
- host: string;
539
- notes: string;
540
- }, {
541
- host: string;
542
- notes?: string | undefined;
543
- }>, "many">;
544
- hasNextPage: z.ZodBoolean;
545
- }, "strip", z.ZodTypeAny, {
546
- data: {
547
- host: string;
548
- notes: string;
549
- }[];
550
- hasNextPage: boolean;
551
- }, {
552
- data: {
553
- host: string;
554
- notes?: string | undefined;
555
- }[];
556
- hasNextPage: boolean;
557
- }>;
558
- export declare const MethodsPageSchema: z.ZodObject<{
559
- data: z.ZodArray<z.ZodObject<{
560
- host: z.ZodString;
561
- method_slug: z.ZodString;
562
- description: z.ZodString;
563
- args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
564
- output_schema: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
565
- }, "strip", z.ZodTypeAny, {
566
- output_schema: Record<string, unknown> | null;
567
- args: Record<string, unknown>;
568
- host: string;
569
- method_slug: string;
570
- description: string;
571
- }, {
572
- output_schema: Record<string, unknown> | null;
573
- args: Record<string, unknown>;
574
- host: string;
575
- method_slug: string;
576
- description: string;
577
- }>, "many">;
578
- hasNextPage: z.ZodBoolean;
579
- }, "strip", z.ZodTypeAny, {
580
- data: {
581
- output_schema: Record<string, unknown> | null;
582
- args: Record<string, unknown>;
583
- host: string;
584
- method_slug: string;
585
- description: string;
586
- }[];
587
- hasNextPage: boolean;
588
- }, {
589
- data: {
590
- output_schema: Record<string, unknown> | null;
591
- args: Record<string, unknown>;
592
- host: string;
593
- method_slug: string;
594
- description: string;
595
- }[];
596
- hasNextPage: boolean;
597
- }>;
package/dist/schemas.js DELETED
@@ -1,106 +0,0 @@
1
- import { z } from "zod";
2
- export const DeviceSchema = z.object({
3
- id: z.string(),
4
- name: z.string().nullable(),
5
- browser: z.string().nullable(),
6
- os: z.string().nullable(),
7
- reachable: z.boolean(),
8
- created_at: z.string(),
9
- });
10
- const RunEventBase = z.object({ run_id: z.string(), device_id: z.string() });
11
- const RunRequestedArgsSchema = z.object({
12
- mount: z.array(z.string()).optional(),
13
- method: z.string().optional(),
14
- method_args: z.record(z.string()).optional(),
15
- paste_slots: z.record(z.string()).optional(),
16
- output_schema: z.record(z.unknown()).optional(),
17
- });
18
- export const RunEventSchema = z.discriminatedUnion("type", [
19
- RunEventBase.extend({
20
- type: z.literal("run_requested"),
21
- query: z.string().optional(),
22
- args: RunRequestedArgsSchema,
23
- cli_args: z.record(z.unknown()).optional(),
24
- }),
25
- RunEventBase.extend({ type: z.literal("progress"), text: z.string(), timestamp: z.number() }),
26
- RunEventBase.extend({ type: z.literal("assistant"), text: z.string(), timestamp: z.number() }),
27
- RunEventBase.extend({ type: z.literal("turn_completed"), timestamp: z.number() }),
28
- RunEventBase.extend({ type: z.literal("run_started"), timestamp: z.number() }),
29
- RunEventBase.extend({ type: z.literal("run_completed"), timestamp: z.number() }),
30
- RunEventBase.extend({
31
- type: z.literal("done"),
32
- success: z.boolean(),
33
- output: z.string().optional(),
34
- final_url: z.string().optional(),
35
- extractions: z.array(z.object({
36
- host: z.string(),
37
- slug: z.string(),
38
- records: z.array(z.record(z.unknown())),
39
- output_schema: z.record(z.unknown()),
40
- })).optional(),
41
- downloads: z.array(z.object({
42
- filename: z.string(),
43
- path: z.string().optional(),
44
- mimetype: z.string().optional(),
45
- url: z.string().nullable().optional(),
46
- })).optional(),
47
- }),
48
- RunEventBase.extend({ type: z.literal("failure"), error: z.string() }),
49
- RunEventBase.extend({ type: z.literal("cancel") }),
50
- ]);
51
- export const RunResultSchema = RunEventBase.extend({
52
- type: z.literal("done"),
53
- success: z.boolean(),
54
- output: z.string().optional(),
55
- final_url: z.string().optional(),
56
- extractions: z.array(z.object({
57
- host: z.string(),
58
- slug: z.string(),
59
- records: z.array(z.record(z.unknown())),
60
- output_schema: z.record(z.unknown()),
61
- })).optional(),
62
- downloads: z.array(z.object({
63
- filename: z.string(),
64
- path: z.string().optional(),
65
- mimetype: z.string().optional(),
66
- url: z.string().nullable().optional(),
67
- })).optional(),
68
- });
69
- export const RunRecordSchema = z.object({
70
- id: z.string(),
71
- started_at: z.string(),
72
- finished_at: z.string().nullable(),
73
- result: z.object({
74
- success: z.boolean().nullable().optional(),
75
- cancelled: z.boolean().nullable().optional(),
76
- reason: z.string().nullable().optional(),
77
- output: z.string().nullable().optional(),
78
- }).nullable(),
79
- resolved: z.object({
80
- url: z.string().nullable().optional(),
81
- prompt: z.string().nullable().optional(),
82
- }).nullable(),
83
- });
84
- export const RunsPageSchema = z.object({
85
- data: z.array(RunRecordSchema),
86
- hasNextPage: z.boolean(),
87
- });
88
- export const MethodSchema = z.object({
89
- host: z.string(),
90
- method_slug: z.string(),
91
- description: z.string(),
92
- args: z.record(z.unknown()),
93
- output_schema: z.record(z.unknown()).nullable(),
94
- });
95
- export const SiteSchema = z.object({
96
- host: z.string(),
97
- notes: z.string().default(""),
98
- });
99
- export const SitesPageSchema = z.object({
100
- data: z.array(SiteSchema),
101
- hasNextPage: z.boolean(),
102
- });
103
- export const MethodsPageSchema = z.object({
104
- data: z.array(MethodSchema),
105
- hasNextPage: z.boolean(),
106
- });
package/dist/session.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import type { RunRecord, RunsPage } from "./types.js";
2
- export declare function fetchRuns(appBaseUrl: string, headers: Record<string, string>, page?: number): Promise<RunsPage>;
3
- export declare function fetchRun(appBaseUrl: string, headers: Record<string, string>, runId: string): Promise<RunRecord>;