@drawcall/design 0.8.1 → 0.9.1

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.
@@ -142,41 +142,29 @@ export declare const contract: {
142
142
  updatedAt: z.ZodString;
143
143
  type: z.ZodLiteral<"image">;
144
144
  file: z.ZodString;
145
- provenance: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
145
+ provenance: z.ZodOptional<z.ZodObject<{
146
146
  kind: z.ZodLiteral<"generated">;
147
147
  operation: z.ZodEnum<{
148
148
  generate: "generate";
149
149
  edit: "edit";
150
150
  }>;
151
151
  prompt: z.ZodString;
152
- references: z.ZodArray<z.ZodObject<{
153
- frameId: z.ZodString;
154
- frameUpdatedAt: z.ZodString;
155
- }, z.core.$strip>>;
152
+ references: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
153
+ kind: z.ZodLiteral<"url">;
154
+ url: z.ZodString;
155
+ digest: z.ZodString;
156
+ }, z.core.$strict>, z.ZodObject<{
157
+ kind: z.ZodLiteral<"file">;
158
+ name: z.ZodString;
159
+ digest: z.ZodString;
160
+ }, z.core.$strict>], "kind">>;
156
161
  result: z.ZodEnum<{
157
162
  replace: "replace";
158
163
  new: "new";
159
164
  }>;
160
165
  provider: z.ZodLiteral<"fal-ai">;
161
166
  model: z.ZodLiteral<"openai/gpt-image-2">;
162
- }, z.core.$strip>, z.ZodObject<{
163
- kind: z.ZodLiteral<"generated">;
164
- operation: z.ZodEnum<{
165
- generate: "generate";
166
- edit: "edit";
167
- }>;
168
- prompt: z.ZodString;
169
- references: z.ZodArray<z.ZodObject<{
170
- frameId: z.ZodString;
171
- frameUpdatedAt: z.ZodString;
172
- }, z.core.$strip>>;
173
- result: z.ZodEnum<{
174
- replace: "replace";
175
- new: "new";
176
- }>;
177
- provider: z.ZodLiteral<"cloudflare-workers-ai">;
178
- model: z.ZodLiteral<"@cf/black-forest-labs/flux-2-klein-4b">;
179
- }, z.core.$strip>], "provider">>;
167
+ }, z.core.$strip>>;
180
168
  }, z.core.$strip>, z.ZodObject<{
181
169
  id: z.ZodString;
182
170
  projectId: z.ZodString;
@@ -252,41 +240,29 @@ export declare const contract: {
252
240
  updatedAt: z.ZodString;
253
241
  type: z.ZodLiteral<"image">;
254
242
  file: z.ZodString;
255
- provenance: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
243
+ provenance: z.ZodOptional<z.ZodObject<{
256
244
  kind: z.ZodLiteral<"generated">;
257
245
  operation: z.ZodEnum<{
258
246
  generate: "generate";
259
247
  edit: "edit";
260
248
  }>;
261
249
  prompt: z.ZodString;
262
- references: z.ZodArray<z.ZodObject<{
263
- frameId: z.ZodString;
264
- frameUpdatedAt: z.ZodString;
265
- }, z.core.$strip>>;
250
+ references: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
251
+ kind: z.ZodLiteral<"url">;
252
+ url: z.ZodString;
253
+ digest: z.ZodString;
254
+ }, z.core.$strict>, z.ZodObject<{
255
+ kind: z.ZodLiteral<"file">;
256
+ name: z.ZodString;
257
+ digest: z.ZodString;
258
+ }, z.core.$strict>], "kind">>;
266
259
  result: z.ZodEnum<{
267
260
  replace: "replace";
268
261
  new: "new";
269
262
  }>;
270
263
  provider: z.ZodLiteral<"fal-ai">;
271
264
  model: z.ZodLiteral<"openai/gpt-image-2">;
272
- }, z.core.$strip>, z.ZodObject<{
273
- kind: z.ZodLiteral<"generated">;
274
- operation: z.ZodEnum<{
275
- generate: "generate";
276
- edit: "edit";
277
- }>;
278
- prompt: z.ZodString;
279
- references: z.ZodArray<z.ZodObject<{
280
- frameId: z.ZodString;
281
- frameUpdatedAt: z.ZodString;
282
- }, z.core.$strip>>;
283
- result: z.ZodEnum<{
284
- replace: "replace";
285
- new: "new";
286
- }>;
287
- provider: z.ZodLiteral<"cloudflare-workers-ai">;
288
- model: z.ZodLiteral<"@cf/black-forest-labs/flux-2-klein-4b">;
289
- }, z.core.$strip>], "provider">>;
265
+ }, z.core.$strip>>;
290
266
  }, z.core.$strip>, z.ZodObject<{
291
267
  id: z.ZodString;
292
268
  projectId: z.ZodString;
@@ -301,23 +277,36 @@ export declare const contract: {
301
277
  type: z.ZodLiteral<"market">;
302
278
  asset: z.ZodString;
303
279
  }, z.core.$strip>], "type">, Record<never, never>, Record<never, never>>;
304
- generateImage: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
280
+ generateImage: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodUnion<readonly [z.ZodObject<{
281
+ result: z.ZodLiteral<"new">;
282
+ name: z.ZodString;
283
+ x: z.ZodOptional<z.ZodNumber>;
284
+ y: z.ZodOptional<z.ZodNumber>;
285
+ operation: z.ZodLiteral<"generate">;
286
+ references: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodFile, z.ZodString]>>>;
305
287
  project: z.ZodString;
306
- operation: z.ZodEnum<{
307
- generate: "generate";
308
- edit: "edit";
309
- }>;
310
288
  prompt: z.ZodString;
311
- target: z.ZodOptional<z.ZodString>;
312
- references: z.ZodDefault<z.ZodArray<z.ZodString>>;
313
- result: z.ZodEnum<{
314
- replace: "replace";
315
- new: "new";
316
- }>;
317
- name: z.ZodOptional<z.ZodString>;
289
+ }, z.core.$strict>, z.ZodObject<{
290
+ result: z.ZodLiteral<"new">;
291
+ name: z.ZodString;
318
292
  x: z.ZodOptional<z.ZodNumber>;
319
293
  y: z.ZodOptional<z.ZodNumber>;
320
- }, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
294
+ operation: z.ZodLiteral<"edit">;
295
+ target: z.ZodString;
296
+ references: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodFile, z.ZodString]>>>;
297
+ project: z.ZodString;
298
+ prompt: z.ZodString;
299
+ }, z.core.$strict>, z.ZodObject<{
300
+ operation: z.ZodLiteral<"edit">;
301
+ target: z.ZodString;
302
+ references: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodFile, z.ZodString]>>>;
303
+ result: z.ZodLiteral<"replace">;
304
+ name: z.ZodOptional<z.ZodNever>;
305
+ x: z.ZodOptional<z.ZodNever>;
306
+ y: z.ZodOptional<z.ZodNever>;
307
+ project: z.ZodString;
308
+ prompt: z.ZodString;
309
+ }, z.core.$strict>]>, z.ZodDiscriminatedUnion<[z.ZodObject<{
321
310
  id: z.ZodString;
322
311
  projectId: z.ZodString;
323
312
  name: z.ZodString;
@@ -356,41 +345,29 @@ export declare const contract: {
356
345
  updatedAt: z.ZodString;
357
346
  type: z.ZodLiteral<"image">;
358
347
  file: z.ZodString;
359
- provenance: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
348
+ provenance: z.ZodOptional<z.ZodObject<{
360
349
  kind: z.ZodLiteral<"generated">;
361
350
  operation: z.ZodEnum<{
362
351
  generate: "generate";
363
352
  edit: "edit";
364
353
  }>;
365
354
  prompt: z.ZodString;
366
- references: z.ZodArray<z.ZodObject<{
367
- frameId: z.ZodString;
368
- frameUpdatedAt: z.ZodString;
369
- }, z.core.$strip>>;
355
+ references: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
356
+ kind: z.ZodLiteral<"url">;
357
+ url: z.ZodString;
358
+ digest: z.ZodString;
359
+ }, z.core.$strict>, z.ZodObject<{
360
+ kind: z.ZodLiteral<"file">;
361
+ name: z.ZodString;
362
+ digest: z.ZodString;
363
+ }, z.core.$strict>], "kind">>;
370
364
  result: z.ZodEnum<{
371
365
  replace: "replace";
372
366
  new: "new";
373
367
  }>;
374
368
  provider: z.ZodLiteral<"fal-ai">;
375
369
  model: z.ZodLiteral<"openai/gpt-image-2">;
376
- }, z.core.$strip>, z.ZodObject<{
377
- kind: z.ZodLiteral<"generated">;
378
- operation: z.ZodEnum<{
379
- generate: "generate";
380
- edit: "edit";
381
- }>;
382
- prompt: z.ZodString;
383
- references: z.ZodArray<z.ZodObject<{
384
- frameId: z.ZodString;
385
- frameUpdatedAt: z.ZodString;
386
- }, z.core.$strip>>;
387
- result: z.ZodEnum<{
388
- replace: "replace";
389
- new: "new";
390
- }>;
391
- provider: z.ZodLiteral<"cloudflare-workers-ai">;
392
- model: z.ZodLiteral<"@cf/black-forest-labs/flux-2-klein-4b">;
393
- }, z.core.$strip>], "provider">>;
370
+ }, z.core.$strip>>;
394
371
  }, z.core.$strip>, z.ZodObject<{
395
372
  id: z.ZodString;
396
373
  projectId: z.ZodString;
@@ -448,41 +425,29 @@ export declare const contract: {
448
425
  updatedAt: z.ZodString;
449
426
  type: z.ZodLiteral<"image">;
450
427
  file: z.ZodString;
451
- provenance: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
428
+ provenance: z.ZodOptional<z.ZodObject<{
452
429
  kind: z.ZodLiteral<"generated">;
453
430
  operation: z.ZodEnum<{
454
431
  generate: "generate";
455
432
  edit: "edit";
456
433
  }>;
457
434
  prompt: z.ZodString;
458
- references: z.ZodArray<z.ZodObject<{
459
- frameId: z.ZodString;
460
- frameUpdatedAt: z.ZodString;
461
- }, z.core.$strip>>;
435
+ references: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
436
+ kind: z.ZodLiteral<"url">;
437
+ url: z.ZodString;
438
+ digest: z.ZodString;
439
+ }, z.core.$strict>, z.ZodObject<{
440
+ kind: z.ZodLiteral<"file">;
441
+ name: z.ZodString;
442
+ digest: z.ZodString;
443
+ }, z.core.$strict>], "kind">>;
462
444
  result: z.ZodEnum<{
463
445
  replace: "replace";
464
446
  new: "new";
465
447
  }>;
466
448
  provider: z.ZodLiteral<"fal-ai">;
467
449
  model: z.ZodLiteral<"openai/gpt-image-2">;
468
- }, z.core.$strip>, z.ZodObject<{
469
- kind: z.ZodLiteral<"generated">;
470
- operation: z.ZodEnum<{
471
- generate: "generate";
472
- edit: "edit";
473
- }>;
474
- prompt: z.ZodString;
475
- references: z.ZodArray<z.ZodObject<{
476
- frameId: z.ZodString;
477
- frameUpdatedAt: z.ZodString;
478
- }, z.core.$strip>>;
479
- result: z.ZodEnum<{
480
- replace: "replace";
481
- new: "new";
482
- }>;
483
- provider: z.ZodLiteral<"cloudflare-workers-ai">;
484
- model: z.ZodLiteral<"@cf/black-forest-labs/flux-2-klein-4b">;
485
- }, z.core.$strip>], "provider">>;
450
+ }, z.core.$strip>>;
486
451
  }, z.core.$strip>, z.ZodObject<{
487
452
  id: z.ZodString;
488
453
  projectId: z.ZodString;
@@ -554,41 +519,29 @@ export declare const contract: {
554
519
  updatedAt: z.ZodString;
555
520
  type: z.ZodLiteral<"image">;
556
521
  file: z.ZodString;
557
- provenance: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
522
+ provenance: z.ZodOptional<z.ZodObject<{
558
523
  kind: z.ZodLiteral<"generated">;
559
524
  operation: z.ZodEnum<{
560
525
  generate: "generate";
561
526
  edit: "edit";
562
527
  }>;
563
528
  prompt: z.ZodString;
564
- references: z.ZodArray<z.ZodObject<{
565
- frameId: z.ZodString;
566
- frameUpdatedAt: z.ZodString;
567
- }, z.core.$strip>>;
529
+ references: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
530
+ kind: z.ZodLiteral<"url">;
531
+ url: z.ZodString;
532
+ digest: z.ZodString;
533
+ }, z.core.$strict>, z.ZodObject<{
534
+ kind: z.ZodLiteral<"file">;
535
+ name: z.ZodString;
536
+ digest: z.ZodString;
537
+ }, z.core.$strict>], "kind">>;
568
538
  result: z.ZodEnum<{
569
539
  replace: "replace";
570
540
  new: "new";
571
541
  }>;
572
542
  provider: z.ZodLiteral<"fal-ai">;
573
543
  model: z.ZodLiteral<"openai/gpt-image-2">;
574
- }, z.core.$strip>, z.ZodObject<{
575
- kind: z.ZodLiteral<"generated">;
576
- operation: z.ZodEnum<{
577
- generate: "generate";
578
- edit: "edit";
579
- }>;
580
- prompt: z.ZodString;
581
- references: z.ZodArray<z.ZodObject<{
582
- frameId: z.ZodString;
583
- frameUpdatedAt: z.ZodString;
584
- }, z.core.$strip>>;
585
- result: z.ZodEnum<{
586
- replace: "replace";
587
- new: "new";
588
- }>;
589
- provider: z.ZodLiteral<"cloudflare-workers-ai">;
590
- model: z.ZodLiteral<"@cf/black-forest-labs/flux-2-klein-4b">;
591
- }, z.core.$strip>], "provider">>;
544
+ }, z.core.$strip>>;
592
545
  }, z.core.$strip>, z.ZodObject<{
593
546
  id: z.ZodString;
594
547
  projectId: z.ZodString;
@@ -649,41 +602,29 @@ export declare const contract: {
649
602
  updatedAt: z.ZodString;
650
603
  type: z.ZodLiteral<"image">;
651
604
  file: z.ZodString;
652
- provenance: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
605
+ provenance: z.ZodOptional<z.ZodObject<{
653
606
  kind: z.ZodLiteral<"generated">;
654
607
  operation: z.ZodEnum<{
655
608
  generate: "generate";
656
609
  edit: "edit";
657
610
  }>;
658
611
  prompt: z.ZodString;
659
- references: z.ZodArray<z.ZodObject<{
660
- frameId: z.ZodString;
661
- frameUpdatedAt: z.ZodString;
662
- }, z.core.$strip>>;
612
+ references: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
613
+ kind: z.ZodLiteral<"url">;
614
+ url: z.ZodString;
615
+ digest: z.ZodString;
616
+ }, z.core.$strict>, z.ZodObject<{
617
+ kind: z.ZodLiteral<"file">;
618
+ name: z.ZodString;
619
+ digest: z.ZodString;
620
+ }, z.core.$strict>], "kind">>;
663
621
  result: z.ZodEnum<{
664
622
  replace: "replace";
665
623
  new: "new";
666
624
  }>;
667
625
  provider: z.ZodLiteral<"fal-ai">;
668
626
  model: z.ZodLiteral<"openai/gpt-image-2">;
669
- }, z.core.$strip>, z.ZodObject<{
670
- kind: z.ZodLiteral<"generated">;
671
- operation: z.ZodEnum<{
672
- generate: "generate";
673
- edit: "edit";
674
- }>;
675
- prompt: z.ZodString;
676
- references: z.ZodArray<z.ZodObject<{
677
- frameId: z.ZodString;
678
- frameUpdatedAt: z.ZodString;
679
- }, z.core.$strip>>;
680
- result: z.ZodEnum<{
681
- replace: "replace";
682
- new: "new";
683
- }>;
684
- provider: z.ZodLiteral<"cloudflare-workers-ai">;
685
- model: z.ZodLiteral<"@cf/black-forest-labs/flux-2-klein-4b">;
686
- }, z.core.$strip>], "provider">>;
627
+ }, z.core.$strip>>;
687
628
  }, z.core.$strip>, z.ZodObject<{
688
629
  id: z.ZodString;
689
630
  projectId: z.ZodString;
@@ -1,7 +1,7 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import { z } from "zod";
3
3
  import { projectFrameLayoutSchema } from "../project-state.js";
4
- import { cameraPoseSchema, createFrameSchema, createProjectFromBriefSchema, designIdSchema, fileListSchema, fileMutationSchema, fileSchema, fileTextSchema, frameExportSchema, frameNameSchema, frameSchema, generateImageFrameSchema, projectDirectoryPathSchema, projectFilePathSchema, projectNameSchema, projectSchema, screenshotSchema, userSchema, } from "./schemas.js";
4
+ import { cameraPoseSchema, createFrameSchema, createProjectFromBriefSchema, designIdSchema, fileListSchema, fileMutationSchema, fileSchema, fileTextSchema, frameExportSchema, frameNameSchema, frameSchema, generateImageSchema, projectDirectoryPathSchema, projectFilePathSchema, projectNameSchema, projectSchema, screenshotSchema, userSchema, } from "./schemas.js";
5
5
  const projectInputSchema = z.object({ project: designIdSchema });
6
6
  const frameInputSchema = projectInputSchema.extend({ frame: designIdSchema });
7
7
  const fileInputSchema = projectInputSchema.extend({
@@ -52,9 +52,9 @@ export const contract = {
52
52
  generateImage: oc
53
53
  .route({
54
54
  method: "POST",
55
- path: "/projects/{project}/images/generations",
55
+ path: "/projects/{project}/images",
56
56
  })
57
- .input(generateImageFrameSchema)
57
+ .input(generateImageSchema)
58
58
  .output(frameSchema),
59
59
  rename: oc
60
60
  .route({ method: "PATCH", path: "/projects/{project}/frames/{frame}" })
@@ -31,6 +31,7 @@ export declare const cameraPoseSchema: z.ZodObject<{
31
31
  }, z.core.$strict>;
32
32
  export declare const httpUrlSchema: z.ZodString;
33
33
  export declare const imageUrlSchema: z.ZodString;
34
+ export declare const imageInputSchema: z.ZodUnion<readonly [z.ZodFile, z.ZodString]>;
34
35
  /** An absolute path in the hosted project filesystem. */
35
36
  export declare const projectPathSchema: z.ZodString;
36
37
  /** A project directory path. `/` denotes the project root. */
@@ -100,49 +101,40 @@ export declare const imageGenerationResultSchema: z.ZodEnum<{
100
101
  replace: "replace";
101
102
  new: "new";
102
103
  }>;
103
- export declare const imageGenerationReferenceSchema: z.ZodObject<{
104
- frameId: z.ZodString;
105
- frameUpdatedAt: z.ZodString;
106
- }, z.core.$strip>;
104
+ export declare const imageInputProvenanceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
105
+ kind: z.ZodLiteral<"url">;
106
+ url: z.ZodString;
107
+ digest: z.ZodString;
108
+ }, z.core.$strict>, z.ZodObject<{
109
+ kind: z.ZodLiteral<"file">;
110
+ name: z.ZodString;
111
+ digest: z.ZodString;
112
+ }, z.core.$strict>], "kind">;
107
113
  export declare const IMAGE_GENERATION_PROVIDER = "fal-ai";
108
114
  export declare const IMAGE_GENERATION_MODEL = "openai/gpt-image-2";
109
- export declare const LEGACY_IMAGE_GENERATION_PROVIDER = "cloudflare-workers-ai";
110
- export declare const LEGACY_IMAGE_GENERATION_MODEL = "@cf/black-forest-labs/flux-2-klein-4b";
111
- export declare const imageGenerationProvenanceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
115
+ export declare const imageGenerationProvenanceSchema: z.ZodObject<{
112
116
  kind: z.ZodLiteral<"generated">;
113
117
  operation: z.ZodEnum<{
114
118
  generate: "generate";
115
119
  edit: "edit";
116
120
  }>;
117
121
  prompt: z.ZodString;
118
- references: z.ZodArray<z.ZodObject<{
119
- frameId: z.ZodString;
120
- frameUpdatedAt: z.ZodString;
121
- }, z.core.$strip>>;
122
+ references: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
123
+ kind: z.ZodLiteral<"url">;
124
+ url: z.ZodString;
125
+ digest: z.ZodString;
126
+ }, z.core.$strict>, z.ZodObject<{
127
+ kind: z.ZodLiteral<"file">;
128
+ name: z.ZodString;
129
+ digest: z.ZodString;
130
+ }, z.core.$strict>], "kind">>;
122
131
  result: z.ZodEnum<{
123
132
  replace: "replace";
124
133
  new: "new";
125
134
  }>;
126
135
  provider: z.ZodLiteral<"fal-ai">;
127
136
  model: z.ZodLiteral<"openai/gpt-image-2">;
128
- }, z.core.$strip>, z.ZodObject<{
129
- kind: z.ZodLiteral<"generated">;
130
- operation: z.ZodEnum<{
131
- generate: "generate";
132
- edit: "edit";
133
- }>;
134
- prompt: z.ZodString;
135
- references: z.ZodArray<z.ZodObject<{
136
- frameId: z.ZodString;
137
- frameUpdatedAt: z.ZodString;
138
- }, z.core.$strip>>;
139
- result: z.ZodEnum<{
140
- replace: "replace";
141
- new: "new";
142
- }>;
143
- provider: z.ZodLiteral<"cloudflare-workers-ai">;
144
- model: z.ZodLiteral<"@cf/black-forest-labs/flux-2-klein-4b">;
145
- }, z.core.$strip>], "provider">;
137
+ }, z.core.$strip>;
146
138
  export declare const imageFrameSchema: z.ZodObject<{
147
139
  id: z.ZodString;
148
140
  projectId: z.ZodString;
@@ -156,41 +148,29 @@ export declare const imageFrameSchema: z.ZodObject<{
156
148
  updatedAt: z.ZodString;
157
149
  type: z.ZodLiteral<"image">;
158
150
  file: z.ZodString;
159
- provenance: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
151
+ provenance: z.ZodOptional<z.ZodObject<{
160
152
  kind: z.ZodLiteral<"generated">;
161
153
  operation: z.ZodEnum<{
162
154
  generate: "generate";
163
155
  edit: "edit";
164
156
  }>;
165
157
  prompt: z.ZodString;
166
- references: z.ZodArray<z.ZodObject<{
167
- frameId: z.ZodString;
168
- frameUpdatedAt: z.ZodString;
169
- }, z.core.$strip>>;
158
+ references: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
159
+ kind: z.ZodLiteral<"url">;
160
+ url: z.ZodString;
161
+ digest: z.ZodString;
162
+ }, z.core.$strict>, z.ZodObject<{
163
+ kind: z.ZodLiteral<"file">;
164
+ name: z.ZodString;
165
+ digest: z.ZodString;
166
+ }, z.core.$strict>], "kind">>;
170
167
  result: z.ZodEnum<{
171
168
  replace: "replace";
172
169
  new: "new";
173
170
  }>;
174
171
  provider: z.ZodLiteral<"fal-ai">;
175
172
  model: z.ZodLiteral<"openai/gpt-image-2">;
176
- }, z.core.$strip>, z.ZodObject<{
177
- kind: z.ZodLiteral<"generated">;
178
- operation: z.ZodEnum<{
179
- generate: "generate";
180
- edit: "edit";
181
- }>;
182
- prompt: z.ZodString;
183
- references: z.ZodArray<z.ZodObject<{
184
- frameId: z.ZodString;
185
- frameUpdatedAt: z.ZodString;
186
- }, z.core.$strip>>;
187
- result: z.ZodEnum<{
188
- replace: "replace";
189
- new: "new";
190
- }>;
191
- provider: z.ZodLiteral<"cloudflare-workers-ai">;
192
- model: z.ZodLiteral<"@cf/black-forest-labs/flux-2-klein-4b">;
193
- }, z.core.$strip>], "provider">>;
173
+ }, z.core.$strip>>;
194
174
  }, z.core.$strip>;
195
175
  export declare const marketFrameSchema: z.ZodObject<{
196
176
  id: z.ZodString;
@@ -245,41 +225,29 @@ export declare const frameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
245
225
  updatedAt: z.ZodString;
246
226
  type: z.ZodLiteral<"image">;
247
227
  file: z.ZodString;
248
- provenance: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
228
+ provenance: z.ZodOptional<z.ZodObject<{
249
229
  kind: z.ZodLiteral<"generated">;
250
230
  operation: z.ZodEnum<{
251
231
  generate: "generate";
252
232
  edit: "edit";
253
233
  }>;
254
234
  prompt: z.ZodString;
255
- references: z.ZodArray<z.ZodObject<{
256
- frameId: z.ZodString;
257
- frameUpdatedAt: z.ZodString;
258
- }, z.core.$strip>>;
235
+ references: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
236
+ kind: z.ZodLiteral<"url">;
237
+ url: z.ZodString;
238
+ digest: z.ZodString;
239
+ }, z.core.$strict>, z.ZodObject<{
240
+ kind: z.ZodLiteral<"file">;
241
+ name: z.ZodString;
242
+ digest: z.ZodString;
243
+ }, z.core.$strict>], "kind">>;
259
244
  result: z.ZodEnum<{
260
245
  replace: "replace";
261
246
  new: "new";
262
247
  }>;
263
248
  provider: z.ZodLiteral<"fal-ai">;
264
249
  model: z.ZodLiteral<"openai/gpt-image-2">;
265
- }, z.core.$strip>, z.ZodObject<{
266
- kind: z.ZodLiteral<"generated">;
267
- operation: z.ZodEnum<{
268
- generate: "generate";
269
- edit: "edit";
270
- }>;
271
- prompt: z.ZodString;
272
- references: z.ZodArray<z.ZodObject<{
273
- frameId: z.ZodString;
274
- frameUpdatedAt: z.ZodString;
275
- }, z.core.$strip>>;
276
- result: z.ZodEnum<{
277
- replace: "replace";
278
- new: "new";
279
- }>;
280
- provider: z.ZodLiteral<"cloudflare-workers-ai">;
281
- model: z.ZodLiteral<"@cf/black-forest-labs/flux-2-klein-4b">;
282
- }, z.core.$strip>], "provider">>;
250
+ }, z.core.$strip>>;
283
251
  }, z.core.$strip>, z.ZodObject<{
284
252
  id: z.ZodString;
285
253
  projectId: z.ZodString;
@@ -342,23 +310,66 @@ export declare const createFrameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
342
310
  type: z.ZodLiteral<"market">;
343
311
  asset: z.ZodString;
344
312
  }, z.core.$strict>], "type">;
345
- export declare const generateImageFrameSchema: z.ZodObject<{
313
+ export declare const generateImageSchema: z.ZodUnion<readonly [z.ZodObject<{
314
+ result: z.ZodLiteral<"new">;
315
+ name: z.ZodString;
316
+ x: z.ZodOptional<z.ZodNumber>;
317
+ y: z.ZodOptional<z.ZodNumber>;
318
+ operation: z.ZodLiteral<"generate">;
319
+ references: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodFile, z.ZodString]>>>;
320
+ project: z.ZodString;
321
+ prompt: z.ZodString;
322
+ }, z.core.$strict>, z.ZodObject<{
323
+ result: z.ZodLiteral<"new">;
324
+ name: z.ZodString;
325
+ x: z.ZodOptional<z.ZodNumber>;
326
+ y: z.ZodOptional<z.ZodNumber>;
327
+ operation: z.ZodLiteral<"edit">;
328
+ target: z.ZodString;
329
+ references: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodFile, z.ZodString]>>>;
330
+ project: z.ZodString;
331
+ prompt: z.ZodString;
332
+ }, z.core.$strict>, z.ZodObject<{
333
+ operation: z.ZodLiteral<"edit">;
334
+ target: z.ZodString;
335
+ references: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodFile, z.ZodString]>>>;
336
+ result: z.ZodLiteral<"replace">;
337
+ name: z.ZodOptional<z.ZodNever>;
338
+ x: z.ZodOptional<z.ZodNever>;
339
+ y: z.ZodOptional<z.ZodNever>;
346
340
  project: z.ZodString;
347
- operation: z.ZodEnum<{
348
- generate: "generate";
349
- edit: "edit";
350
- }>;
351
341
  prompt: z.ZodString;
352
- target: z.ZodOptional<z.ZodString>;
342
+ }, z.core.$strict>]>;
343
+ export declare const generateImageUrlSchema: z.ZodUnion<readonly [z.ZodObject<{
344
+ result: z.ZodLiteral<"new">;
345
+ name: z.ZodString;
346
+ x: z.ZodOptional<z.ZodNumber>;
347
+ y: z.ZodOptional<z.ZodNumber>;
348
+ operation: z.ZodLiteral<"generate">;
353
349
  references: z.ZodDefault<z.ZodArray<z.ZodString>>;
354
- result: z.ZodEnum<{
355
- replace: "replace";
356
- new: "new";
357
- }>;
358
- name: z.ZodOptional<z.ZodString>;
350
+ project: z.ZodString;
351
+ prompt: z.ZodString;
352
+ }, z.core.$strict>, z.ZodObject<{
353
+ result: z.ZodLiteral<"new">;
354
+ name: z.ZodString;
359
355
  x: z.ZodOptional<z.ZodNumber>;
360
356
  y: z.ZodOptional<z.ZodNumber>;
361
- }, z.core.$strict>;
357
+ operation: z.ZodLiteral<"edit">;
358
+ target: z.ZodString;
359
+ references: z.ZodDefault<z.ZodArray<z.ZodString>>;
360
+ project: z.ZodString;
361
+ prompt: z.ZodString;
362
+ }, z.core.$strict>, z.ZodObject<{
363
+ operation: z.ZodLiteral<"edit">;
364
+ target: z.ZodString;
365
+ references: z.ZodDefault<z.ZodArray<z.ZodString>>;
366
+ result: z.ZodLiteral<"replace">;
367
+ name: z.ZodOptional<z.ZodNever>;
368
+ x: z.ZodOptional<z.ZodNever>;
369
+ y: z.ZodOptional<z.ZodNever>;
370
+ project: z.ZodString;
371
+ prompt: z.ZodString;
372
+ }, z.core.$strict>]>;
362
373
  export declare const fileListSchema: z.ZodObject<{
363
374
  paths: z.ZodArray<z.ZodString>;
364
375
  }, z.core.$strip>;
@@ -494,13 +505,16 @@ export type ImageFrame = z.infer<typeof imageFrameSchema>;
494
505
  export type ImageGenerationOperation = z.infer<typeof imageGenerationOperationSchema>;
495
506
  export type ImageGenerationResult = z.infer<typeof imageGenerationResultSchema>;
496
507
  export type ImageGenerationProvenance = z.infer<typeof imageGenerationProvenanceSchema>;
508
+ export type ImageInput = z.infer<typeof imageInputSchema>;
509
+ export type ImageInputProvenance = z.infer<typeof imageInputProvenanceSchema>;
497
510
  export type MarketFrame = z.infer<typeof marketFrameSchema>;
498
511
  export type Frame = z.infer<typeof frameSchema>;
499
512
  export type CreateGltsFrame = z.infer<typeof createGltsFrameSchema>;
500
513
  export type CreateImageFrame = z.infer<typeof createImageFrameSchema>;
501
514
  export type CreateMarketFrame = z.infer<typeof createMarketFrameSchema>;
502
515
  export type CreateFrame = z.infer<typeof createFrameSchema>;
503
- export type GenerateImageFrame = z.infer<typeof generateImageFrameSchema>;
516
+ export type GenerateImage = z.infer<typeof generateImageSchema>;
517
+ export type GenerateImageUrl = z.infer<typeof generateImageUrlSchema>;
504
518
  export type FileList = z.infer<typeof fileListSchema>;
505
519
  export type TextFile = z.infer<typeof textFileSchema>;
506
520
  export type BinaryFile = z.infer<typeof binaryFileSchema>;