@magiclabs.ai/magicbook-client 0.7.6-canary → 0.7.7-canary

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/index.d.cts CHANGED
@@ -3,476 +3,9 @@ import { z } from 'zod';
3
3
  declare const eventContextSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4
4
  type EventContext = z.infer<typeof eventContextSchema>;
5
5
 
6
- declare class BooksEndpoints {
7
- private readonly engineAPI;
8
- constructor(engineAPI: EngineAPI);
9
- create(book: Partial<Book>): Promise<Book>;
10
- retrieve(bookId: string): Promise<Book>;
11
- update(bookId: string, book: Partial<Book>): Promise<Book>;
12
- design(bookId: string): Promise<Book>;
13
- cancel(bookId: string): Promise<Book>;
14
- report(bookId: string, report: BookReport): Promise<void>;
15
- delete(bookId: string): Promise<void>;
16
- retrieveGalleon(bookId: string): Promise<{
17
- title: string;
18
- binding: string;
19
- coverSpecId: string;
20
- styleId: number;
21
- userId: string;
22
- magicShopBook: {
23
- pages: {
24
- type: string;
25
- pageNum: number;
26
- canvas: {
27
- backgroundId: string | null;
28
- assets?: {
29
- type: string;
30
- position: {
31
- x: number;
32
- y: number;
33
- rotation: number;
34
- width?: number | undefined;
35
- height?: number | undefined;
36
- };
37
- seqNum: number;
38
- z: number;
39
- imageAssignment?: {
40
- photoRefId: string;
41
- finalCrop: number[];
42
- } | undefined;
43
- id?: string | undefined;
44
- horizJustification?: string | undefined;
45
- vertJustification?: string | null | undefined;
46
- text?: string | undefined;
47
- fontId?: string | undefined;
48
- fontSize?: number | undefined;
49
- fontColor?: string | undefined;
50
- frame?: string | undefined;
51
- }[] | undefined;
52
- };
53
- }[];
54
- photoStrip: {
55
- photoRefId: string;
56
- url: string;
57
- encryptId: string;
58
- photoId: string;
59
- photoMetadata: {
60
- data: string | null;
61
- width: number;
62
- height: number;
63
- rotation: number;
64
- id: string;
65
- llx: number;
66
- lly: number;
67
- urx: number;
68
- ury: number;
69
- title: string;
70
- effect: string;
71
- source: string;
72
- uploadTime: string;
73
- };
74
- }[];
75
- };
76
- reportingData: {
77
- properties: {
78
- key: string;
79
- value?: any;
80
- }[];
81
- };
82
- }>;
83
- }
84
-
85
- declare class DesignOptionsEndpoints {
86
- private readonly engineAPI;
87
- constructor(engineAPI: EngineAPI);
88
- retrieve(bookSize: BookSize, imageCount: number, imageFilteringLevel: ImageFilteringLevel): Promise<{
89
- densities: {
90
- low: {
91
- max_page_count: number;
92
- min_page_count: number;
93
- max_image_count: number;
94
- avg_image_count: number;
95
- min_image_count: number;
96
- };
97
- medium: {
98
- max_page_count: number;
99
- min_page_count: number;
100
- max_image_count: number;
101
- avg_image_count: number;
102
- min_image_count: number;
103
- };
104
- high: {
105
- max_page_count: number;
106
- min_page_count: number;
107
- max_image_count: number;
108
- avg_image_count: number;
109
- min_image_count: number;
110
- };
111
- };
112
- }>;
113
- }
114
-
115
- declare class EventsEndpoints {
116
- private readonly engineAPI;
117
- constructor(engineAPI: EngineAPI);
118
- createBookEvent(bookId: string, name: string, data?: EventContext): Promise<{
119
- name: string;
120
- context?: Record<string, unknown> | undefined;
121
- }>;
122
- }
123
-
124
- type CallProps = {
125
- path: string;
126
- options?: RequestInit;
127
- apiKey?: string;
128
- };
129
- declare class Fetcher {
130
- baseUrl: URL;
131
- options: RequestInit;
132
- constructor(baseUrl: string, options?: RequestInit | undefined);
133
- call(props: CallProps): Promise<any>;
134
- cleanUrl(url: string): string;
135
- }
136
-
137
- declare class ImagesEndpoints {
138
- private readonly engineAPI;
139
- constructor(engineAPI: EngineAPI);
140
- list(bookId: string): Promise<{
141
- width: number;
142
- height: number;
143
- url: string;
144
- handle: string;
145
- orientation: number;
146
- taken_at: string;
147
- filename: string;
148
- id?: string | undefined;
149
- camera_make?: string | undefined;
150
- camera?: string | undefined;
151
- }[]>;
152
- retrieve(imageId: string, bookId: string): Promise<{
153
- width: number;
154
- height: number;
155
- url: string;
156
- handle: string;
157
- orientation: number;
158
- taken_at: string;
159
- filename: string;
160
- id?: string | undefined;
161
- camera_make?: string | undefined;
162
- camera?: string | undefined;
163
- }>;
164
- update(imageId: string, bookId: string, image: ImageServer): Promise<{
165
- width: number;
166
- height: number;
167
- url: string;
168
- handle: string;
169
- orientation: number;
170
- taken_at: string;
171
- filename: string;
172
- id?: string | undefined;
173
- camera_make?: string | undefined;
174
- camera?: string | undefined;
175
- }>;
176
- delete(imageId: string, bookId: string): Promise<void>;
177
- addToBook(bookId: string, image: ImageServer): Promise<{
178
- width: number;
179
- height: number;
180
- url: string;
181
- handle: string;
182
- orientation: number;
183
- taken_at: string;
184
- filename: string;
185
- id?: string | undefined;
186
- camera_make?: string | undefined;
187
- camera?: string | undefined;
188
- }>;
189
- }
190
-
191
- declare const spreadServerSchema: z.ZodObject<{
192
- id: z.ZodOptional<z.ZodString>;
193
- book_id: z.ZodString;
194
- state: z.ZodString;
195
- spread_type: z.ZodString;
196
- width: z.ZodOptional<z.ZodNumber>;
197
- height: z.ZodOptional<z.ZodNumber>;
198
- sequence: z.ZodNumber;
199
- wells: z.ZodArray<z.ZodUnknown, "many">;
200
- background: z.ZodUnknown;
201
- laid_out_at: z.ZodNullable<z.ZodString>;
202
- embellished_at: z.ZodNullable<z.ZodString>;
203
- polished_at: z.ZodNullable<z.ZodString>;
204
- metadata: z.ZodUnknown;
205
- url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
206
- }, "strip", z.ZodTypeAny, {
207
- state: string;
208
- book_id: string;
209
- spread_type: string;
210
- sequence: number;
211
- wells: unknown[];
212
- laid_out_at: string | null;
213
- embellished_at: string | null;
214
- polished_at: string | null;
215
- id?: string | undefined;
216
- width?: number | undefined;
217
- height?: number | undefined;
218
- background?: unknown;
219
- metadata?: unknown;
220
- url?: string | null | undefined;
221
- }, {
222
- state: string;
223
- book_id: string;
224
- spread_type: string;
225
- sequence: number;
226
- wells: unknown[];
227
- laid_out_at: string | null;
228
- embellished_at: string | null;
229
- polished_at: string | null;
230
- id?: string | undefined;
231
- width?: number | undefined;
232
- height?: number | undefined;
233
- background?: unknown;
234
- metadata?: unknown;
235
- url?: string | null | undefined;
236
- }>;
237
- type SpreadServer = z.infer<typeof spreadServerSchema>;
238
-
239
- declare class SpreadsEndpoints {
240
- private readonly engineAPI;
241
- constructor(engineAPI: EngineAPI);
242
- list(bookId: string): Promise<{
243
- state: string;
244
- book_id: string;
245
- spread_type: string;
246
- sequence: number;
247
- wells: unknown[];
248
- laid_out_at: string | null;
249
- embellished_at: string | null;
250
- polished_at: string | null;
251
- id?: string | undefined;
252
- width?: number | undefined;
253
- height?: number | undefined;
254
- background?: unknown;
255
- metadata?: unknown;
256
- url?: string | null | undefined;
257
- }[]>;
258
- create(bookId: string, spread: SpreadServer): Promise<{
259
- state: string;
260
- book_id: string;
261
- spread_type: string;
262
- sequence: number;
263
- wells: unknown[];
264
- laid_out_at: string | null;
265
- embellished_at: string | null;
266
- polished_at: string | null;
267
- id?: string | undefined;
268
- width?: number | undefined;
269
- height?: number | undefined;
270
- background?: unknown;
271
- metadata?: unknown;
272
- url?: string | null | undefined;
273
- }>;
274
- retrieve(spreadId: string, bookId: string): Promise<{
275
- state: string;
276
- book_id: string;
277
- spread_type: string;
278
- sequence: number;
279
- wells: unknown[];
280
- laid_out_at: string | null;
281
- embellished_at: string | null;
282
- polished_at: string | null;
283
- id?: string | undefined;
284
- width?: number | undefined;
285
- height?: number | undefined;
286
- background?: unknown;
287
- metadata?: unknown;
288
- url?: string | null | undefined;
289
- }>;
290
- update(spreadId: string, bookId: string, spread: SpreadServer): Promise<{
291
- state: string;
292
- book_id: string;
293
- spread_type: string;
294
- sequence: number;
295
- wells: unknown[];
296
- laid_out_at: string | null;
297
- embellished_at: string | null;
298
- polished_at: string | null;
299
- id?: string | undefined;
300
- width?: number | undefined;
301
- height?: number | undefined;
302
- background?: unknown;
303
- metadata?: unknown;
304
- url?: string | null | undefined;
305
- }>;
306
- delete(spreadId: string, bookId: string): Promise<void>;
307
- layouts(bookId: string, page: number): Promise<{
308
- backgroundId: string | null;
309
- assets?: {
310
- type: string;
311
- position: {
312
- x: number;
313
- y: number;
314
- rotation: number;
315
- width?: number | undefined;
316
- height?: number | undefined;
317
- };
318
- seqNum: number;
319
- z: number;
320
- imageAssignment?: {
321
- photoRefId: string;
322
- finalCrop: number[];
323
- } | undefined;
324
- id?: string | undefined;
325
- horizJustification?: string | undefined;
326
- vertJustification?: string | null | undefined;
327
- text?: string | undefined;
328
- fontId?: string | undefined;
329
- fontSize?: number | undefined;
330
- fontColor?: string | undefined;
331
- frame?: string | undefined;
332
- }[] | undefined;
333
- }[]>;
334
- }
335
-
336
- declare class StoryboardItemsEndpoints {
337
- private readonly engineAPI;
338
- constructor(engineAPI: EngineAPI);
339
- list(bookId: string): Promise<{
340
- id: string;
341
- book_id: string;
342
- sequence: number;
343
- similarity: number;
344
- duplicate: boolean;
345
- selected: boolean;
346
- surface_weight: number;
347
- scene: number;
348
- subscene: number;
349
- image: {
350
- width: number;
351
- height: number;
352
- id: string;
353
- url: string;
354
- taken_at: number;
355
- category: string;
356
- aesthetic_score: number;
357
- faces: {
358
- score: number;
359
- bounding_box: {
360
- x: number;
361
- y: number;
362
- width: number;
363
- height: number;
364
- };
365
- size: number;
366
- eyes_open_score: number;
367
- smile_score: number;
368
- facing_camera_score: number;
369
- }[];
370
- roi: {
371
- x: number;
372
- y: number;
373
- width: number;
374
- height: number;
375
- };
376
- };
377
- front_cover?: boolean | undefined;
378
- back_cover?: boolean | undefined;
379
- spine_break?: boolean | undefined;
380
- }[]>;
381
- }
382
-
383
- declare class EngineAPI {
384
- baseUrl: URL;
385
- apiKey: string;
386
- fetcher: Fetcher;
387
- constructor(baseUrl: string, apiKey: string);
388
- readonly books: BooksEndpoints;
389
- readonly designOptions: DesignOptionsEndpoints;
390
- readonly events: EventsEndpoints;
391
- readonly images: ImagesEndpoints;
392
- readonly storyboardItems: StoryboardItemsEndpoints;
393
- readonly spreads: SpreadsEndpoints;
394
- }
395
-
396
- declare class MagicBookClient {
397
- private readonly apiKey;
398
- private readonly apiHost;
399
- readonly webSocketHost: string;
400
- engineAPI: EngineAPI;
401
- constructor(apiKey: string, apiHost?: string, webSocketHost?: string);
402
- createDesignRequest(designRequestProps: DesignRequestProps): Promise<DesignRequest>;
403
- }
404
-
405
- type Image = {
406
- handle: string;
407
- url: string;
408
- width: number;
409
- height: number;
410
- rotation: number;
411
- captureTime: string;
412
- cameraMake?: string;
413
- cameraModel?: string;
414
- filename: string;
415
- };
416
- declare class Images {
417
- private readonly client;
418
- private parentId;
419
- private images;
420
- length: number;
421
- designRequestState: State;
422
- constructor(client: MagicBookClient, parentId: string, designRequestState: State);
423
- add(image: Image): Promise<number>;
424
- }
425
- declare const imageServerSchema: z.ZodObject<{
426
- id: z.ZodOptional<z.ZodString>;
427
- handle: z.ZodString;
428
- url: z.ZodString;
429
- width: z.ZodNumber;
430
- height: z.ZodNumber;
431
- orientation: z.ZodNumber;
432
- taken_at: z.ZodString;
433
- camera_make: z.ZodOptional<z.ZodString>;
434
- camera: z.ZodOptional<z.ZodString>;
435
- filename: z.ZodString;
436
- }, "strip", z.ZodTypeAny, {
437
- width: number;
438
- height: number;
439
- url: string;
440
- handle: string;
441
- orientation: number;
442
- taken_at: string;
443
- filename: string;
444
- id?: string | undefined;
445
- camera_make?: string | undefined;
446
- camera?: string | undefined;
447
- }, {
448
- width: number;
449
- height: number;
450
- url: string;
451
- handle: string;
452
- orientation: number;
453
- taken_at: string;
454
- filename: string;
455
- id?: string | undefined;
456
- camera_make?: string | undefined;
457
- camera?: string | undefined;
458
- }>;
459
- declare class ImageServer {
460
- handle: string;
461
- url: string;
462
- width: number;
463
- height: number;
464
- orientation: number;
465
- taken_at: string;
466
- camera_make?: string;
467
- camera?: string;
468
- filename: string;
469
- constructor(image: Image);
470
- }
471
- declare function imageServerToImage(imageServer: ImageServer): Image;
472
-
473
6
  declare const states: readonly ["new", "ingesting", "submitted", "storyboarding", "deduplication", "image-selection", "designing", "layouting", "embellishing", "polishing", "ready", "timeout", "error", "cancelled"];
474
- declare const statesToCloseWS: ReadonlyArray<typeof states[number]>;
475
- declare const statesToReport: ReadonlyArray<typeof states[number]>;
7
+ declare const statesToCloseWS: ReadonlyArray<(typeof states)[number]>;
8
+ declare const statesToReport: ReadonlyArray<(typeof states)[number]>;
476
9
  declare const isDesignRequestSubmitted: (state: string) => boolean;
477
10
  declare const canSubmitDesignRequest: (state: string) => boolean;
478
11
  declare const occasions: readonly ["baby", "birthday", "default", "everyday", "family", "kids", "life-stories", "portfolio", "school-memories", "seasonal-holidays", "special-celebrations", "sports-and-hobbies", "travel", "wedding", "year-in-review"];
@@ -991,15 +524,484 @@ declare const styles: {
991
524
  slug: string;
992
525
  };
993
526
  };
994
- declare const bookSizes: readonly ["8x8", "10x10", "12x12", "8x11", "11x8", "11x14"];
995
- declare const coverTypes: readonly ["sc", "hc", "pl"];
996
- declare const pageTypes: readonly ["sp", "sl", "dl"];
997
- declare const imageDensities: readonly ["low", "medium", "high"];
998
- declare const imageFilteringLevels: readonly ["best", "most", "all"];
999
- declare const embellishmentLevels: readonly ["none", "few", "lots"];
1000
- declare const textStickerLevels: readonly ["none", "few", "lots"];
1001
- declare const timeoutEventDetail: DesignRequestEventDetail;
1002
- declare const cancelledEventDetail: DesignRequestEventDetail;
527
+ declare const bookSizes: readonly ["8x8", "10x10", "12x12", "8x11", "11x8", "11x14"];
528
+ declare const coverTypes: readonly ["sc", "hc", "pl"];
529
+ declare const pageTypes: readonly ["sp", "sl", "dl"];
530
+ declare const imageDensities: readonly ["low", "medium", "high"];
531
+ declare const imageFilteringLevels: readonly ["best", "most", "all"];
532
+ declare const embellishmentLevels: readonly ["none", "few", "lots"];
533
+ declare const textStickerLevels: readonly ["none", "few", "lots"];
534
+ declare const timeoutEventDetail: DesignRequestEventDetail;
535
+ declare const cancelledEventDetail: DesignRequestEventDetail;
536
+ declare const formats: readonly ["galleon", "snapfish"];
537
+ type Format = (typeof formats)[number];
538
+
539
+ declare class BooksEndpoints {
540
+ private readonly engineAPI;
541
+ constructor(engineAPI: EngineAPI);
542
+ create(book: Partial<Book>): Promise<Book>;
543
+ retrieve(bookId: string): Promise<Book>;
544
+ update(bookId: string, book: Partial<Book>): Promise<Book>;
545
+ design(bookId: string): Promise<Book>;
546
+ cancel(bookId: string): Promise<Book>;
547
+ report(bookId: string, report: BookReport): Promise<void>;
548
+ delete(bookId: string): Promise<void>;
549
+ format(bookId: string, format: Format): Promise<{
550
+ title: string;
551
+ binding: string;
552
+ coverSpecId: string;
553
+ styleId: number;
554
+ userId: string;
555
+ magicShopBook: {
556
+ pages: {
557
+ type: string;
558
+ pageNum: number;
559
+ canvas: {
560
+ backgroundId: string | null;
561
+ assets?: {
562
+ type: string;
563
+ position: {
564
+ x: number;
565
+ y: number;
566
+ rotation: number;
567
+ width?: number | undefined;
568
+ height?: number | undefined;
569
+ };
570
+ seqNum: number;
571
+ z: number;
572
+ id?: string | undefined;
573
+ imageAssignment?: {
574
+ photoRefId: string;
575
+ finalCrop: number[];
576
+ } | undefined;
577
+ horizJustification?: string | undefined;
578
+ vertJustification?: string | null | undefined;
579
+ text?: string | undefined;
580
+ fontId?: string | undefined;
581
+ fontSize?: number | undefined;
582
+ fontColor?: string | undefined;
583
+ frame?: string | undefined;
584
+ }[] | undefined;
585
+ };
586
+ }[];
587
+ photoStrip: {
588
+ photoRefId: string;
589
+ url: string;
590
+ encryptId: string;
591
+ photoId: string;
592
+ photoMetadata: {
593
+ width: number;
594
+ height: number;
595
+ rotation: number;
596
+ id: string;
597
+ llx: number;
598
+ lly: number;
599
+ urx: number;
600
+ ury: number;
601
+ data: string | null;
602
+ title: string;
603
+ effect: string;
604
+ source: string;
605
+ uploadTime: string;
606
+ };
607
+ }[];
608
+ };
609
+ reportingData: {
610
+ properties: {
611
+ key: string;
612
+ value?: any;
613
+ }[];
614
+ };
615
+ }>;
616
+ }
617
+
618
+ declare class DesignOptionsEndpoints {
619
+ private readonly engineAPI;
620
+ constructor(engineAPI: EngineAPI);
621
+ retrieve(bookSize: BookSize, imageCount: number, imageFilteringLevel: ImageFilteringLevel): Promise<{
622
+ densities: {
623
+ low: {
624
+ max_page_count: number;
625
+ min_page_count: number;
626
+ max_image_count: number;
627
+ avg_image_count: number;
628
+ min_image_count: number;
629
+ };
630
+ medium: {
631
+ max_page_count: number;
632
+ min_page_count: number;
633
+ max_image_count: number;
634
+ avg_image_count: number;
635
+ min_image_count: number;
636
+ };
637
+ high: {
638
+ max_page_count: number;
639
+ min_page_count: number;
640
+ max_image_count: number;
641
+ avg_image_count: number;
642
+ min_image_count: number;
643
+ };
644
+ };
645
+ }>;
646
+ }
647
+
648
+ declare class EventsEndpoints {
649
+ private readonly engineAPI;
650
+ constructor(engineAPI: EngineAPI);
651
+ createBookEvent(bookId: string, name: string, data?: EventContext): Promise<{
652
+ name: string;
653
+ context?: Record<string, unknown> | undefined;
654
+ }>;
655
+ }
656
+
657
+ type CallProps = {
658
+ path: string;
659
+ options?: RequestInit;
660
+ apiKey?: string;
661
+ };
662
+ declare class Fetcher {
663
+ baseUrl: URL;
664
+ options: RequestInit;
665
+ constructor(baseUrl: string, options?: RequestInit | undefined);
666
+ call(props: CallProps): Promise<any>;
667
+ cleanUrl(url: string): string;
668
+ }
669
+
670
+ declare class ImagesEndpoints {
671
+ private readonly engineAPI;
672
+ constructor(engineAPI: EngineAPI);
673
+ list(bookId: string): Promise<{
674
+ width: number;
675
+ height: number;
676
+ url: string;
677
+ handle: string;
678
+ orientation: number;
679
+ taken_at: string;
680
+ filename: string;
681
+ id?: string | undefined;
682
+ camera_make?: string | undefined;
683
+ camera?: string | undefined;
684
+ }[]>;
685
+ retrieve(imageId: string, bookId: string): Promise<{
686
+ width: number;
687
+ height: number;
688
+ url: string;
689
+ handle: string;
690
+ orientation: number;
691
+ taken_at: string;
692
+ filename: string;
693
+ id?: string | undefined;
694
+ camera_make?: string | undefined;
695
+ camera?: string | undefined;
696
+ }>;
697
+ update(imageId: string, bookId: string, image: ImageServer): Promise<{
698
+ width: number;
699
+ height: number;
700
+ url: string;
701
+ handle: string;
702
+ orientation: number;
703
+ taken_at: string;
704
+ filename: string;
705
+ id?: string | undefined;
706
+ camera_make?: string | undefined;
707
+ camera?: string | undefined;
708
+ }>;
709
+ delete(imageId: string, bookId: string): Promise<void>;
710
+ addToBook(bookId: string, image: ImageServer): Promise<{
711
+ width: number;
712
+ height: number;
713
+ url: string;
714
+ handle: string;
715
+ orientation: number;
716
+ taken_at: string;
717
+ filename: string;
718
+ id?: string | undefined;
719
+ camera_make?: string | undefined;
720
+ camera?: string | undefined;
721
+ }>;
722
+ }
723
+
724
+ declare const spreadServerSchema: z.ZodObject<{
725
+ id: z.ZodOptional<z.ZodString>;
726
+ book_id: z.ZodString;
727
+ state: z.ZodString;
728
+ spread_type: z.ZodString;
729
+ width: z.ZodOptional<z.ZodNumber>;
730
+ height: z.ZodOptional<z.ZodNumber>;
731
+ sequence: z.ZodNumber;
732
+ wells: z.ZodArray<z.ZodUnknown, "many">;
733
+ background: z.ZodUnknown;
734
+ laid_out_at: z.ZodNullable<z.ZodString>;
735
+ embellished_at: z.ZodNullable<z.ZodString>;
736
+ polished_at: z.ZodNullable<z.ZodString>;
737
+ metadata: z.ZodUnknown;
738
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
739
+ }, "strip", z.ZodTypeAny, {
740
+ state: string;
741
+ book_id: string;
742
+ spread_type: string;
743
+ sequence: number;
744
+ wells: unknown[];
745
+ laid_out_at: string | null;
746
+ embellished_at: string | null;
747
+ polished_at: string | null;
748
+ width?: number | undefined;
749
+ height?: number | undefined;
750
+ id?: string | undefined;
751
+ url?: string | null | undefined;
752
+ background?: unknown;
753
+ metadata?: unknown;
754
+ }, {
755
+ state: string;
756
+ book_id: string;
757
+ spread_type: string;
758
+ sequence: number;
759
+ wells: unknown[];
760
+ laid_out_at: string | null;
761
+ embellished_at: string | null;
762
+ polished_at: string | null;
763
+ width?: number | undefined;
764
+ height?: number | undefined;
765
+ id?: string | undefined;
766
+ url?: string | null | undefined;
767
+ background?: unknown;
768
+ metadata?: unknown;
769
+ }>;
770
+ type SpreadServer = z.infer<typeof spreadServerSchema>;
771
+
772
+ declare class SpreadsEndpoints {
773
+ private readonly engineAPI;
774
+ constructor(engineAPI: EngineAPI);
775
+ list(bookId: string): Promise<{
776
+ state: string;
777
+ book_id: string;
778
+ spread_type: string;
779
+ sequence: number;
780
+ wells: unknown[];
781
+ laid_out_at: string | null;
782
+ embellished_at: string | null;
783
+ polished_at: string | null;
784
+ width?: number | undefined;
785
+ height?: number | undefined;
786
+ id?: string | undefined;
787
+ url?: string | null | undefined;
788
+ background?: unknown;
789
+ metadata?: unknown;
790
+ }[]>;
791
+ create(bookId: string, spread: SpreadServer): Promise<{
792
+ state: string;
793
+ book_id: string;
794
+ spread_type: string;
795
+ sequence: number;
796
+ wells: unknown[];
797
+ laid_out_at: string | null;
798
+ embellished_at: string | null;
799
+ polished_at: string | null;
800
+ width?: number | undefined;
801
+ height?: number | undefined;
802
+ id?: string | undefined;
803
+ url?: string | null | undefined;
804
+ background?: unknown;
805
+ metadata?: unknown;
806
+ }>;
807
+ retrieve(spreadId: string, bookId: string): Promise<{
808
+ state: string;
809
+ book_id: string;
810
+ spread_type: string;
811
+ sequence: number;
812
+ wells: unknown[];
813
+ laid_out_at: string | null;
814
+ embellished_at: string | null;
815
+ polished_at: string | null;
816
+ width?: number | undefined;
817
+ height?: number | undefined;
818
+ id?: string | undefined;
819
+ url?: string | null | undefined;
820
+ background?: unknown;
821
+ metadata?: unknown;
822
+ }>;
823
+ update(spreadId: string, bookId: string, spread: SpreadServer): Promise<{
824
+ state: string;
825
+ book_id: string;
826
+ spread_type: string;
827
+ sequence: number;
828
+ wells: unknown[];
829
+ laid_out_at: string | null;
830
+ embellished_at: string | null;
831
+ polished_at: string | null;
832
+ width?: number | undefined;
833
+ height?: number | undefined;
834
+ id?: string | undefined;
835
+ url?: string | null | undefined;
836
+ background?: unknown;
837
+ metadata?: unknown;
838
+ }>;
839
+ delete(spreadId: string, bookId: string): Promise<void>;
840
+ layouts(bookId: string, page: number): Promise<{
841
+ backgroundId: string | null;
842
+ assets?: {
843
+ type: string;
844
+ position: {
845
+ x: number;
846
+ y: number;
847
+ rotation: number;
848
+ width?: number | undefined;
849
+ height?: number | undefined;
850
+ };
851
+ seqNum: number;
852
+ z: number;
853
+ id?: string | undefined;
854
+ imageAssignment?: {
855
+ photoRefId: string;
856
+ finalCrop: number[];
857
+ } | undefined;
858
+ horizJustification?: string | undefined;
859
+ vertJustification?: string | null | undefined;
860
+ text?: string | undefined;
861
+ fontId?: string | undefined;
862
+ fontSize?: number | undefined;
863
+ fontColor?: string | undefined;
864
+ frame?: string | undefined;
865
+ }[] | undefined;
866
+ }[]>;
867
+ }
868
+
869
+ declare class StoryboardItemsEndpoints {
870
+ private readonly engineAPI;
871
+ constructor(engineAPI: EngineAPI);
872
+ list(bookId: string): Promise<{
873
+ id: string;
874
+ book_id: string;
875
+ sequence: number;
876
+ similarity: number;
877
+ duplicate: boolean;
878
+ selected: boolean;
879
+ surface_weight: number;
880
+ scene: number;
881
+ subscene: number;
882
+ image: {
883
+ width: number;
884
+ height: number;
885
+ id: string;
886
+ url: string;
887
+ taken_at: number;
888
+ category: string;
889
+ aesthetic_score: number;
890
+ faces: {
891
+ score: number;
892
+ bounding_box: {
893
+ x: number;
894
+ y: number;
895
+ width: number;
896
+ height: number;
897
+ };
898
+ size: number;
899
+ eyes_open_score: number;
900
+ smile_score: number;
901
+ facing_camera_score: number;
902
+ }[];
903
+ roi: {
904
+ x: number;
905
+ y: number;
906
+ width: number;
907
+ height: number;
908
+ };
909
+ };
910
+ front_cover?: boolean | undefined;
911
+ back_cover?: boolean | undefined;
912
+ spine_break?: boolean | undefined;
913
+ }[]>;
914
+ }
915
+
916
+ declare class EngineAPI {
917
+ baseUrl: URL;
918
+ apiKey: string;
919
+ fetcher: Fetcher;
920
+ constructor(baseUrl: string, apiKey: string);
921
+ readonly books: BooksEndpoints;
922
+ readonly designOptions: DesignOptionsEndpoints;
923
+ readonly events: EventsEndpoints;
924
+ readonly images: ImagesEndpoints;
925
+ readonly storyboardItems: StoryboardItemsEndpoints;
926
+ readonly spreads: SpreadsEndpoints;
927
+ }
928
+
929
+ declare class MagicBookClient {
930
+ private readonly apiKey;
931
+ private readonly apiHost;
932
+ readonly webSocketHost: string;
933
+ engineAPI: EngineAPI;
934
+ constructor(apiKey: string, apiHost?: string, webSocketHost?: string);
935
+ createDesignRequest(designRequestProps: DesignRequestProps): Promise<DesignRequest>;
936
+ }
937
+
938
+ type Image = {
939
+ handle: string;
940
+ url: string;
941
+ width: number;
942
+ height: number;
943
+ rotation: number;
944
+ captureTime: string;
945
+ cameraMake?: string;
946
+ cameraModel?: string;
947
+ filename: string;
948
+ };
949
+ declare class Images {
950
+ private readonly client;
951
+ private parentId;
952
+ private images;
953
+ length: number;
954
+ designRequestState: State;
955
+ constructor(client: MagicBookClient, parentId: string, designRequestState: State);
956
+ add(image: Image): Promise<number>;
957
+ }
958
+ declare const imageServerSchema: z.ZodObject<{
959
+ id: z.ZodOptional<z.ZodString>;
960
+ handle: z.ZodString;
961
+ url: z.ZodString;
962
+ width: z.ZodNumber;
963
+ height: z.ZodNumber;
964
+ orientation: z.ZodNumber;
965
+ taken_at: z.ZodString;
966
+ camera_make: z.ZodOptional<z.ZodString>;
967
+ camera: z.ZodOptional<z.ZodString>;
968
+ filename: z.ZodString;
969
+ }, "strip", z.ZodTypeAny, {
970
+ width: number;
971
+ height: number;
972
+ url: string;
973
+ handle: string;
974
+ orientation: number;
975
+ taken_at: string;
976
+ filename: string;
977
+ id?: string | undefined;
978
+ camera_make?: string | undefined;
979
+ camera?: string | undefined;
980
+ }, {
981
+ width: number;
982
+ height: number;
983
+ url: string;
984
+ handle: string;
985
+ orientation: number;
986
+ taken_at: string;
987
+ filename: string;
988
+ id?: string | undefined;
989
+ camera_make?: string | undefined;
990
+ camera?: string | undefined;
991
+ }>;
992
+ declare class ImageServer {
993
+ handle: string;
994
+ url: string;
995
+ width: number;
996
+ height: number;
997
+ orientation: number;
998
+ taken_at: string;
999
+ camera_make?: string;
1000
+ camera?: string;
1001
+ filename: string;
1002
+ constructor(image: Image);
1003
+ }
1004
+ declare function imageServerToImage(imageServer: ImageServer): Image;
1003
1005
 
1004
1006
  type Occasion = (typeof occasions)[number];
1005
1007
  type Style = keyof typeof styles;
@@ -1104,11 +1106,11 @@ declare class DesignRequest {
1104
1106
  };
1105
1107
  seqNum: number;
1106
1108
  z: number;
1109
+ id?: string | undefined;
1107
1110
  imageAssignment?: {
1108
1111
  photoRefId: string;
1109
1112
  finalCrop: number[];
1110
1113
  } | undefined;
1111
- id?: string | undefined;
1112
1114
  horizJustification?: string | undefined;
1113
1115
  vertJustification?: string | null | undefined;
1114
1116
  text?: string | undefined;
@@ -1121,7 +1123,7 @@ declare class DesignRequest {
1121
1123
  submit(submitDesignRequestProps?: Partial<DesignRequestProps>): Promise<this>;
1122
1124
  setGuid(guid: string): Promise<string>;
1123
1125
  cancel(): Promise<this>;
1124
- getJSON(): Promise<{
1126
+ getJSON(format: Format): Promise<{
1125
1127
  title: string;
1126
1128
  binding: string;
1127
1129
  coverSpecId: string;
@@ -1144,11 +1146,11 @@ declare class DesignRequest {
1144
1146
  };
1145
1147
  seqNum: number;
1146
1148
  z: number;
1149
+ id?: string | undefined;
1147
1150
  imageAssignment?: {
1148
1151
  photoRefId: string;
1149
1152
  finalCrop: number[];
1150
1153
  } | undefined;
1151
- id?: string | undefined;
1152
1154
  horizJustification?: string | undefined;
1153
1155
  vertJustification?: string | null | undefined;
1154
1156
  text?: string | undefined;
@@ -1165,7 +1167,6 @@ declare class DesignRequest {
1165
1167
  encryptId: string;
1166
1168
  photoId: string;
1167
1169
  photoMetadata: {
1168
- data: string | null;
1169
1170
  width: number;
1170
1171
  height: number;
1171
1172
  rotation: number;
@@ -1174,6 +1175,7 @@ declare class DesignRequest {
1174
1175
  lly: number;
1175
1176
  urx: number;
1176
1177
  ury: number;
1178
+ data: string | null;
1177
1179
  title: string;
1178
1180
  effect: string;
1179
1181
  source: string;
@@ -1960,7 +1962,6 @@ declare const photoMetadataSchema: z.ZodObject<{
1960
1962
  rotation: z.ZodNumber;
1961
1963
  uploadTime: z.ZodString;
1962
1964
  }, "strip", z.ZodTypeAny, {
1963
- data: string | null;
1964
1965
  width: number;
1965
1966
  height: number;
1966
1967
  rotation: number;
@@ -1969,12 +1970,12 @@ declare const photoMetadataSchema: z.ZodObject<{
1969
1970
  lly: number;
1970
1971
  urx: number;
1971
1972
  ury: number;
1973
+ data: string | null;
1972
1974
  title: string;
1973
1975
  effect: string;
1974
1976
  source: string;
1975
1977
  uploadTime: string;
1976
1978
  }, {
1977
- data: string | null;
1978
1979
  width: number;
1979
1980
  height: number;
1980
1981
  rotation: number;
@@ -1983,6 +1984,7 @@ declare const photoMetadataSchema: z.ZodObject<{
1983
1984
  lly: number;
1984
1985
  urx: number;
1985
1986
  ury: number;
1987
+ data: string | null;
1986
1988
  title: string;
1987
1989
  effect: string;
1988
1990
  source: string;
@@ -2052,11 +2054,11 @@ declare const assetSchema: z.ZodObject<{
2052
2054
  };
2053
2055
  seqNum: number;
2054
2056
  z: number;
2057
+ id?: string | undefined;
2055
2058
  imageAssignment?: {
2056
2059
  photoRefId: string;
2057
2060
  finalCrop: number[];
2058
2061
  } | undefined;
2059
- id?: string | undefined;
2060
2062
  horizJustification?: string | undefined;
2061
2063
  vertJustification?: string | null | undefined;
2062
2064
  text?: string | undefined;
@@ -2075,11 +2077,11 @@ declare const assetSchema: z.ZodObject<{
2075
2077
  };
2076
2078
  seqNum: number;
2077
2079
  z: number;
2080
+ id?: string | undefined;
2078
2081
  imageAssignment?: {
2079
2082
  photoRefId: string;
2080
2083
  finalCrop: number[];
2081
2084
  } | undefined;
2082
- id?: string | undefined;
2083
2085
  horizJustification?: string | undefined;
2084
2086
  vertJustification?: string | null | undefined;
2085
2087
  text?: string | undefined;
@@ -2109,7 +2111,6 @@ declare const photoStripSchema: z.ZodObject<{
2109
2111
  rotation: z.ZodNumber;
2110
2112
  uploadTime: z.ZodString;
2111
2113
  }, "strip", z.ZodTypeAny, {
2112
- data: string | null;
2113
2114
  width: number;
2114
2115
  height: number;
2115
2116
  rotation: number;
@@ -2118,12 +2119,12 @@ declare const photoStripSchema: z.ZodObject<{
2118
2119
  lly: number;
2119
2120
  urx: number;
2120
2121
  ury: number;
2122
+ data: string | null;
2121
2123
  title: string;
2122
2124
  effect: string;
2123
2125
  source: string;
2124
2126
  uploadTime: string;
2125
2127
  }, {
2126
- data: string | null;
2127
2128
  width: number;
2128
2129
  height: number;
2129
2130
  rotation: number;
@@ -2132,6 +2133,7 @@ declare const photoStripSchema: z.ZodObject<{
2132
2133
  lly: number;
2133
2134
  urx: number;
2134
2135
  ury: number;
2136
+ data: string | null;
2135
2137
  title: string;
2136
2138
  effect: string;
2137
2139
  source: string;
@@ -2143,7 +2145,6 @@ declare const photoStripSchema: z.ZodObject<{
2143
2145
  encryptId: string;
2144
2146
  photoId: string;
2145
2147
  photoMetadata: {
2146
- data: string | null;
2147
2148
  width: number;
2148
2149
  height: number;
2149
2150
  rotation: number;
@@ -2152,6 +2153,7 @@ declare const photoStripSchema: z.ZodObject<{
2152
2153
  lly: number;
2153
2154
  urx: number;
2154
2155
  ury: number;
2156
+ data: string | null;
2155
2157
  title: string;
2156
2158
  effect: string;
2157
2159
  source: string;
@@ -2163,7 +2165,6 @@ declare const photoStripSchema: z.ZodObject<{
2163
2165
  encryptId: string;
2164
2166
  photoId: string;
2165
2167
  photoMetadata: {
2166
- data: string | null;
2167
2168
  width: number;
2168
2169
  height: number;
2169
2170
  rotation: number;
@@ -2172,6 +2173,7 @@ declare const photoStripSchema: z.ZodObject<{
2172
2173
  lly: number;
2173
2174
  urx: number;
2174
2175
  ury: number;
2176
+ data: string | null;
2175
2177
  title: string;
2176
2178
  effect: string;
2177
2179
  source: string;
@@ -2256,11 +2258,11 @@ declare const canvasSchema: z.ZodObject<{
2256
2258
  };
2257
2259
  seqNum: number;
2258
2260
  z: number;
2261
+ id?: string | undefined;
2259
2262
  imageAssignment?: {
2260
2263
  photoRefId: string;
2261
2264
  finalCrop: number[];
2262
2265
  } | undefined;
2263
- id?: string | undefined;
2264
2266
  horizJustification?: string | undefined;
2265
2267
  vertJustification?: string | null | undefined;
2266
2268
  text?: string | undefined;
@@ -2279,11 +2281,11 @@ declare const canvasSchema: z.ZodObject<{
2279
2281
  };
2280
2282
  seqNum: number;
2281
2283
  z: number;
2284
+ id?: string | undefined;
2282
2285
  imageAssignment?: {
2283
2286
  photoRefId: string;
2284
2287
  finalCrop: number[];
2285
2288
  } | undefined;
2286
- id?: string | undefined;
2287
2289
  horizJustification?: string | undefined;
2288
2290
  vertJustification?: string | null | undefined;
2289
2291
  text?: string | undefined;
@@ -2305,11 +2307,11 @@ declare const canvasSchema: z.ZodObject<{
2305
2307
  };
2306
2308
  seqNum: number;
2307
2309
  z: number;
2310
+ id?: string | undefined;
2308
2311
  imageAssignment?: {
2309
2312
  photoRefId: string;
2310
2313
  finalCrop: number[];
2311
2314
  } | undefined;
2312
- id?: string | undefined;
2313
2315
  horizJustification?: string | undefined;
2314
2316
  vertJustification?: string | null | undefined;
2315
2317
  text?: string | undefined;
@@ -2331,11 +2333,11 @@ declare const canvasSchema: z.ZodObject<{
2331
2333
  };
2332
2334
  seqNum: number;
2333
2335
  z: number;
2336
+ id?: string | undefined;
2334
2337
  imageAssignment?: {
2335
2338
  photoRefId: string;
2336
2339
  finalCrop: number[];
2337
2340
  } | undefined;
2338
- id?: string | undefined;
2339
2341
  horizJustification?: string | undefined;
2340
2342
  vertJustification?: string | null | undefined;
2341
2343
  text?: string | undefined;
@@ -2403,11 +2405,11 @@ declare const pageSchema: z.ZodObject<{
2403
2405
  };
2404
2406
  seqNum: number;
2405
2407
  z: number;
2408
+ id?: string | undefined;
2406
2409
  imageAssignment?: {
2407
2410
  photoRefId: string;
2408
2411
  finalCrop: number[];
2409
2412
  } | undefined;
2410
- id?: string | undefined;
2411
2413
  horizJustification?: string | undefined;
2412
2414
  vertJustification?: string | null | undefined;
2413
2415
  text?: string | undefined;
@@ -2426,11 +2428,11 @@ declare const pageSchema: z.ZodObject<{
2426
2428
  };
2427
2429
  seqNum: number;
2428
2430
  z: number;
2431
+ id?: string | undefined;
2429
2432
  imageAssignment?: {
2430
2433
  photoRefId: string;
2431
2434
  finalCrop: number[];
2432
2435
  } | undefined;
2433
- id?: string | undefined;
2434
2436
  horizJustification?: string | undefined;
2435
2437
  vertJustification?: string | null | undefined;
2436
2438
  text?: string | undefined;
@@ -2452,11 +2454,11 @@ declare const pageSchema: z.ZodObject<{
2452
2454
  };
2453
2455
  seqNum: number;
2454
2456
  z: number;
2457
+ id?: string | undefined;
2455
2458
  imageAssignment?: {
2456
2459
  photoRefId: string;
2457
2460
  finalCrop: number[];
2458
2461
  } | undefined;
2459
- id?: string | undefined;
2460
2462
  horizJustification?: string | undefined;
2461
2463
  vertJustification?: string | null | undefined;
2462
2464
  text?: string | undefined;
@@ -2478,11 +2480,11 @@ declare const pageSchema: z.ZodObject<{
2478
2480
  };
2479
2481
  seqNum: number;
2480
2482
  z: number;
2483
+ id?: string | undefined;
2481
2484
  imageAssignment?: {
2482
2485
  photoRefId: string;
2483
2486
  finalCrop: number[];
2484
2487
  } | undefined;
2485
- id?: string | undefined;
2486
2488
  horizJustification?: string | undefined;
2487
2489
  vertJustification?: string | null | undefined;
2488
2490
  text?: string | undefined;
@@ -2508,11 +2510,11 @@ declare const pageSchema: z.ZodObject<{
2508
2510
  };
2509
2511
  seqNum: number;
2510
2512
  z: number;
2513
+ id?: string | undefined;
2511
2514
  imageAssignment?: {
2512
2515
  photoRefId: string;
2513
2516
  finalCrop: number[];
2514
2517
  } | undefined;
2515
- id?: string | undefined;
2516
2518
  horizJustification?: string | undefined;
2517
2519
  vertJustification?: string | null | undefined;
2518
2520
  text?: string | undefined;
@@ -2538,11 +2540,11 @@ declare const pageSchema: z.ZodObject<{
2538
2540
  };
2539
2541
  seqNum: number;
2540
2542
  z: number;
2543
+ id?: string | undefined;
2541
2544
  imageAssignment?: {
2542
2545
  photoRefId: string;
2543
2546
  finalCrop: number[];
2544
2547
  } | undefined;
2545
- id?: string | undefined;
2546
2548
  horizJustification?: string | undefined;
2547
2549
  vertJustification?: string | null | undefined;
2548
2550
  text?: string | undefined;
@@ -2612,11 +2614,11 @@ declare const magicShopBookSchema: z.ZodObject<{
2612
2614
  };
2613
2615
  seqNum: number;
2614
2616
  z: number;
2617
+ id?: string | undefined;
2615
2618
  imageAssignment?: {
2616
2619
  photoRefId: string;
2617
2620
  finalCrop: number[];
2618
2621
  } | undefined;
2619
- id?: string | undefined;
2620
2622
  horizJustification?: string | undefined;
2621
2623
  vertJustification?: string | null | undefined;
2622
2624
  text?: string | undefined;
@@ -2635,11 +2637,11 @@ declare const magicShopBookSchema: z.ZodObject<{
2635
2637
  };
2636
2638
  seqNum: number;
2637
2639
  z: number;
2640
+ id?: string | undefined;
2638
2641
  imageAssignment?: {
2639
2642
  photoRefId: string;
2640
2643
  finalCrop: number[];
2641
2644
  } | undefined;
2642
- id?: string | undefined;
2643
2645
  horizJustification?: string | undefined;
2644
2646
  vertJustification?: string | null | undefined;
2645
2647
  text?: string | undefined;
@@ -2661,11 +2663,11 @@ declare const magicShopBookSchema: z.ZodObject<{
2661
2663
  };
2662
2664
  seqNum: number;
2663
2665
  z: number;
2666
+ id?: string | undefined;
2664
2667
  imageAssignment?: {
2665
2668
  photoRefId: string;
2666
2669
  finalCrop: number[];
2667
2670
  } | undefined;
2668
- id?: string | undefined;
2669
2671
  horizJustification?: string | undefined;
2670
2672
  vertJustification?: string | null | undefined;
2671
2673
  text?: string | undefined;
@@ -2687,11 +2689,11 @@ declare const magicShopBookSchema: z.ZodObject<{
2687
2689
  };
2688
2690
  seqNum: number;
2689
2691
  z: number;
2692
+ id?: string | undefined;
2690
2693
  imageAssignment?: {
2691
2694
  photoRefId: string;
2692
2695
  finalCrop: number[];
2693
2696
  } | undefined;
2694
- id?: string | undefined;
2695
2697
  horizJustification?: string | undefined;
2696
2698
  vertJustification?: string | null | undefined;
2697
2699
  text?: string | undefined;
@@ -2717,11 +2719,11 @@ declare const magicShopBookSchema: z.ZodObject<{
2717
2719
  };
2718
2720
  seqNum: number;
2719
2721
  z: number;
2722
+ id?: string | undefined;
2720
2723
  imageAssignment?: {
2721
2724
  photoRefId: string;
2722
2725
  finalCrop: number[];
2723
2726
  } | undefined;
2724
- id?: string | undefined;
2725
2727
  horizJustification?: string | undefined;
2726
2728
  vertJustification?: string | null | undefined;
2727
2729
  text?: string | undefined;
@@ -2747,11 +2749,11 @@ declare const magicShopBookSchema: z.ZodObject<{
2747
2749
  };
2748
2750
  seqNum: number;
2749
2751
  z: number;
2752
+ id?: string | undefined;
2750
2753
  imageAssignment?: {
2751
2754
  photoRefId: string;
2752
2755
  finalCrop: number[];
2753
2756
  } | undefined;
2754
- id?: string | undefined;
2755
2757
  horizJustification?: string | undefined;
2756
2758
  vertJustification?: string | null | undefined;
2757
2759
  text?: string | undefined;
@@ -2782,7 +2784,6 @@ declare const magicShopBookSchema: z.ZodObject<{
2782
2784
  rotation: z.ZodNumber;
2783
2785
  uploadTime: z.ZodString;
2784
2786
  }, "strip", z.ZodTypeAny, {
2785
- data: string | null;
2786
2787
  width: number;
2787
2788
  height: number;
2788
2789
  rotation: number;
@@ -2791,12 +2792,12 @@ declare const magicShopBookSchema: z.ZodObject<{
2791
2792
  lly: number;
2792
2793
  urx: number;
2793
2794
  ury: number;
2795
+ data: string | null;
2794
2796
  title: string;
2795
2797
  effect: string;
2796
2798
  source: string;
2797
2799
  uploadTime: string;
2798
2800
  }, {
2799
- data: string | null;
2800
2801
  width: number;
2801
2802
  height: number;
2802
2803
  rotation: number;
@@ -2805,6 +2806,7 @@ declare const magicShopBookSchema: z.ZodObject<{
2805
2806
  lly: number;
2806
2807
  urx: number;
2807
2808
  ury: number;
2809
+ data: string | null;
2808
2810
  title: string;
2809
2811
  effect: string;
2810
2812
  source: string;
@@ -2816,7 +2818,6 @@ declare const magicShopBookSchema: z.ZodObject<{
2816
2818
  encryptId: string;
2817
2819
  photoId: string;
2818
2820
  photoMetadata: {
2819
- data: string | null;
2820
2821
  width: number;
2821
2822
  height: number;
2822
2823
  rotation: number;
@@ -2825,6 +2826,7 @@ declare const magicShopBookSchema: z.ZodObject<{
2825
2826
  lly: number;
2826
2827
  urx: number;
2827
2828
  ury: number;
2829
+ data: string | null;
2828
2830
  title: string;
2829
2831
  effect: string;
2830
2832
  source: string;
@@ -2836,7 +2838,6 @@ declare const magicShopBookSchema: z.ZodObject<{
2836
2838
  encryptId: string;
2837
2839
  photoId: string;
2838
2840
  photoMetadata: {
2839
- data: string | null;
2840
2841
  width: number;
2841
2842
  height: number;
2842
2843
  rotation: number;
@@ -2845,6 +2846,7 @@ declare const magicShopBookSchema: z.ZodObject<{
2845
2846
  lly: number;
2846
2847
  urx: number;
2847
2848
  ury: number;
2849
+ data: string | null;
2848
2850
  title: string;
2849
2851
  effect: string;
2850
2852
  source: string;
@@ -2868,11 +2870,11 @@ declare const magicShopBookSchema: z.ZodObject<{
2868
2870
  };
2869
2871
  seqNum: number;
2870
2872
  z: number;
2873
+ id?: string | undefined;
2871
2874
  imageAssignment?: {
2872
2875
  photoRefId: string;
2873
2876
  finalCrop: number[];
2874
2877
  } | undefined;
2875
- id?: string | undefined;
2876
2878
  horizJustification?: string | undefined;
2877
2879
  vertJustification?: string | null | undefined;
2878
2880
  text?: string | undefined;
@@ -2889,7 +2891,6 @@ declare const magicShopBookSchema: z.ZodObject<{
2889
2891
  encryptId: string;
2890
2892
  photoId: string;
2891
2893
  photoMetadata: {
2892
- data: string | null;
2893
2894
  width: number;
2894
2895
  height: number;
2895
2896
  rotation: number;
@@ -2898,6 +2899,7 @@ declare const magicShopBookSchema: z.ZodObject<{
2898
2899
  lly: number;
2899
2900
  urx: number;
2900
2901
  ury: number;
2902
+ data: string | null;
2901
2903
  title: string;
2902
2904
  effect: string;
2903
2905
  source: string;
@@ -2921,11 +2923,11 @@ declare const magicShopBookSchema: z.ZodObject<{
2921
2923
  };
2922
2924
  seqNum: number;
2923
2925
  z: number;
2926
+ id?: string | undefined;
2924
2927
  imageAssignment?: {
2925
2928
  photoRefId: string;
2926
2929
  finalCrop: number[];
2927
2930
  } | undefined;
2928
- id?: string | undefined;
2929
2931
  horizJustification?: string | undefined;
2930
2932
  vertJustification?: string | null | undefined;
2931
2933
  text?: string | undefined;
@@ -2942,7 +2944,6 @@ declare const magicShopBookSchema: z.ZodObject<{
2942
2944
  encryptId: string;
2943
2945
  photoId: string;
2944
2946
  photoMetadata: {
2945
- data: string | null;
2946
2947
  width: number;
2947
2948
  height: number;
2948
2949
  rotation: number;
@@ -2951,6 +2952,7 @@ declare const magicShopBookSchema: z.ZodObject<{
2951
2952
  lly: number;
2952
2953
  urx: number;
2953
2954
  ury: number;
2955
+ data: string | null;
2954
2956
  title: string;
2955
2957
  effect: string;
2956
2958
  source: string;
@@ -3023,11 +3025,11 @@ declare const bookCreationRequestSchema: z.ZodObject<{
3023
3025
  };
3024
3026
  seqNum: number;
3025
3027
  z: number;
3028
+ id?: string | undefined;
3026
3029
  imageAssignment?: {
3027
3030
  photoRefId: string;
3028
3031
  finalCrop: number[];
3029
3032
  } | undefined;
3030
- id?: string | undefined;
3031
3033
  horizJustification?: string | undefined;
3032
3034
  vertJustification?: string | null | undefined;
3033
3035
  text?: string | undefined;
@@ -3046,11 +3048,11 @@ declare const bookCreationRequestSchema: z.ZodObject<{
3046
3048
  };
3047
3049
  seqNum: number;
3048
3050
  z: number;
3051
+ id?: string | undefined;
3049
3052
  imageAssignment?: {
3050
3053
  photoRefId: string;
3051
3054
  finalCrop: number[];
3052
3055
  } | undefined;
3053
- id?: string | undefined;
3054
3056
  horizJustification?: string | undefined;
3055
3057
  vertJustification?: string | null | undefined;
3056
3058
  text?: string | undefined;
@@ -3072,11 +3074,11 @@ declare const bookCreationRequestSchema: z.ZodObject<{
3072
3074
  };
3073
3075
  seqNum: number;
3074
3076
  z: number;
3077
+ id?: string | undefined;
3075
3078
  imageAssignment?: {
3076
3079
  photoRefId: string;
3077
3080
  finalCrop: number[];
3078
3081
  } | undefined;
3079
- id?: string | undefined;
3080
3082
  horizJustification?: string | undefined;
3081
3083
  vertJustification?: string | null | undefined;
3082
3084
  text?: string | undefined;
@@ -3098,11 +3100,11 @@ declare const bookCreationRequestSchema: z.ZodObject<{
3098
3100
  };
3099
3101
  seqNum: number;
3100
3102
  z: number;
3103
+ id?: string | undefined;
3101
3104
  imageAssignment?: {
3102
3105
  photoRefId: string;
3103
3106
  finalCrop: number[];
3104
3107
  } | undefined;
3105
- id?: string | undefined;
3106
3108
  horizJustification?: string | undefined;
3107
3109
  vertJustification?: string | null | undefined;
3108
3110
  text?: string | undefined;
@@ -3128,11 +3130,11 @@ declare const bookCreationRequestSchema: z.ZodObject<{
3128
3130
  };
3129
3131
  seqNum: number;
3130
3132
  z: number;
3133
+ id?: string | undefined;
3131
3134
  imageAssignment?: {
3132
3135
  photoRefId: string;
3133
3136
  finalCrop: number[];
3134
3137
  } | undefined;
3135
- id?: string | undefined;
3136
3138
  horizJustification?: string | undefined;
3137
3139
  vertJustification?: string | null | undefined;
3138
3140
  text?: string | undefined;
@@ -3158,11 +3160,11 @@ declare const bookCreationRequestSchema: z.ZodObject<{
3158
3160
  };
3159
3161
  seqNum: number;
3160
3162
  z: number;
3163
+ id?: string | undefined;
3161
3164
  imageAssignment?: {
3162
3165
  photoRefId: string;
3163
3166
  finalCrop: number[];
3164
3167
  } | undefined;
3165
- id?: string | undefined;
3166
3168
  horizJustification?: string | undefined;
3167
3169
  vertJustification?: string | null | undefined;
3168
3170
  text?: string | undefined;
@@ -3193,7 +3195,6 @@ declare const bookCreationRequestSchema: z.ZodObject<{
3193
3195
  rotation: z.ZodNumber;
3194
3196
  uploadTime: z.ZodString;
3195
3197
  }, "strip", z.ZodTypeAny, {
3196
- data: string | null;
3197
3198
  width: number;
3198
3199
  height: number;
3199
3200
  rotation: number;
@@ -3202,12 +3203,12 @@ declare const bookCreationRequestSchema: z.ZodObject<{
3202
3203
  lly: number;
3203
3204
  urx: number;
3204
3205
  ury: number;
3206
+ data: string | null;
3205
3207
  title: string;
3206
3208
  effect: string;
3207
3209
  source: string;
3208
3210
  uploadTime: string;
3209
3211
  }, {
3210
- data: string | null;
3211
3212
  width: number;
3212
3213
  height: number;
3213
3214
  rotation: number;
@@ -3216,6 +3217,7 @@ declare const bookCreationRequestSchema: z.ZodObject<{
3216
3217
  lly: number;
3217
3218
  urx: number;
3218
3219
  ury: number;
3220
+ data: string | null;
3219
3221
  title: string;
3220
3222
  effect: string;
3221
3223
  source: string;
@@ -3227,7 +3229,6 @@ declare const bookCreationRequestSchema: z.ZodObject<{
3227
3229
  encryptId: string;
3228
3230
  photoId: string;
3229
3231
  photoMetadata: {
3230
- data: string | null;
3231
3232
  width: number;
3232
3233
  height: number;
3233
3234
  rotation: number;
@@ -3236,6 +3237,7 @@ declare const bookCreationRequestSchema: z.ZodObject<{
3236
3237
  lly: number;
3237
3238
  urx: number;
3238
3239
  ury: number;
3240
+ data: string | null;
3239
3241
  title: string;
3240
3242
  effect: string;
3241
3243
  source: string;
@@ -3247,7 +3249,6 @@ declare const bookCreationRequestSchema: z.ZodObject<{
3247
3249
  encryptId: string;
3248
3250
  photoId: string;
3249
3251
  photoMetadata: {
3250
- data: string | null;
3251
3252
  width: number;
3252
3253
  height: number;
3253
3254
  rotation: number;
@@ -3256,6 +3257,7 @@ declare const bookCreationRequestSchema: z.ZodObject<{
3256
3257
  lly: number;
3257
3258
  urx: number;
3258
3259
  ury: number;
3260
+ data: string | null;
3259
3261
  title: string;
3260
3262
  effect: string;
3261
3263
  source: string;
@@ -3279,11 +3281,11 @@ declare const bookCreationRequestSchema: z.ZodObject<{
3279
3281
  };
3280
3282
  seqNum: number;
3281
3283
  z: number;
3284
+ id?: string | undefined;
3282
3285
  imageAssignment?: {
3283
3286
  photoRefId: string;
3284
3287
  finalCrop: number[];
3285
3288
  } | undefined;
3286
- id?: string | undefined;
3287
3289
  horizJustification?: string | undefined;
3288
3290
  vertJustification?: string | null | undefined;
3289
3291
  text?: string | undefined;
@@ -3300,7 +3302,6 @@ declare const bookCreationRequestSchema: z.ZodObject<{
3300
3302
  encryptId: string;
3301
3303
  photoId: string;
3302
3304
  photoMetadata: {
3303
- data: string | null;
3304
3305
  width: number;
3305
3306
  height: number;
3306
3307
  rotation: number;
@@ -3309,6 +3310,7 @@ declare const bookCreationRequestSchema: z.ZodObject<{
3309
3310
  lly: number;
3310
3311
  urx: number;
3311
3312
  ury: number;
3313
+ data: string | null;
3312
3314
  title: string;
3313
3315
  effect: string;
3314
3316
  source: string;
@@ -3332,11 +3334,11 @@ declare const bookCreationRequestSchema: z.ZodObject<{
3332
3334
  };
3333
3335
  seqNum: number;
3334
3336
  z: number;
3337
+ id?: string | undefined;
3335
3338
  imageAssignment?: {
3336
3339
  photoRefId: string;
3337
3340
  finalCrop: number[];
3338
3341
  } | undefined;
3339
- id?: string | undefined;
3340
3342
  horizJustification?: string | undefined;
3341
3343
  vertJustification?: string | null | undefined;
3342
3344
  text?: string | undefined;
@@ -3353,7 +3355,6 @@ declare const bookCreationRequestSchema: z.ZodObject<{
3353
3355
  encryptId: string;
3354
3356
  photoId: string;
3355
3357
  photoMetadata: {
3356
- data: string | null;
3357
3358
  width: number;
3358
3359
  height: number;
3359
3360
  rotation: number;
@@ -3362,6 +3363,7 @@ declare const bookCreationRequestSchema: z.ZodObject<{
3362
3363
  lly: number;
3363
3364
  urx: number;
3364
3365
  ury: number;
3366
+ data: string | null;
3365
3367
  title: string;
3366
3368
  effect: string;
3367
3369
  source: string;
@@ -3414,11 +3416,11 @@ declare const bookCreationRequestSchema: z.ZodObject<{
3414
3416
  };
3415
3417
  seqNum: number;
3416
3418
  z: number;
3419
+ id?: string | undefined;
3417
3420
  imageAssignment?: {
3418
3421
  photoRefId: string;
3419
3422
  finalCrop: number[];
3420
3423
  } | undefined;
3421
- id?: string | undefined;
3422
3424
  horizJustification?: string | undefined;
3423
3425
  vertJustification?: string | null | undefined;
3424
3426
  text?: string | undefined;
@@ -3435,7 +3437,6 @@ declare const bookCreationRequestSchema: z.ZodObject<{
3435
3437
  encryptId: string;
3436
3438
  photoId: string;
3437
3439
  photoMetadata: {
3438
- data: string | null;
3439
3440
  width: number;
3440
3441
  height: number;
3441
3442
  rotation: number;
@@ -3444,6 +3445,7 @@ declare const bookCreationRequestSchema: z.ZodObject<{
3444
3445
  lly: number;
3445
3446
  urx: number;
3446
3447
  ury: number;
3448
+ data: string | null;
3447
3449
  title: string;
3448
3450
  effect: string;
3449
3451
  source: string;
@@ -3480,11 +3482,11 @@ declare const bookCreationRequestSchema: z.ZodObject<{
3480
3482
  };
3481
3483
  seqNum: number;
3482
3484
  z: number;
3485
+ id?: string | undefined;
3483
3486
  imageAssignment?: {
3484
3487
  photoRefId: string;
3485
3488
  finalCrop: number[];
3486
3489
  } | undefined;
3487
- id?: string | undefined;
3488
3490
  horizJustification?: string | undefined;
3489
3491
  vertJustification?: string | null | undefined;
3490
3492
  text?: string | undefined;
@@ -3501,7 +3503,6 @@ declare const bookCreationRequestSchema: z.ZodObject<{
3501
3503
  encryptId: string;
3502
3504
  photoId: string;
3503
3505
  photoMetadata: {
3504
- data: string | null;
3505
3506
  width: number;
3506
3507
  height: number;
3507
3508
  rotation: number;
@@ -3510,6 +3511,7 @@ declare const bookCreationRequestSchema: z.ZodObject<{
3510
3511
  lly: number;
3511
3512
  urx: number;
3512
3513
  ury: number;
3514
+ data: string | null;
3513
3515
  title: string;
3514
3516
  effect: string;
3515
3517
  source: string;
@@ -3526,4 +3528,4 @@ declare const bookCreationRequestSchema: z.ZodObject<{
3526
3528
  }>;
3527
3529
  type BookCreationRequest = z.infer<typeof bookCreationRequestSchema>;
3528
3530
 
3529
- export { type Asset, Book, type BookCreationRequest, BookDesignRequest, type BookDesignRequestProps, type BookProps, type BookReport, type BookSize, type Canvas, type CoverType, type DesignOptions, type DesignOptionsServer, DesignRequest, type DesignRequestEvent, type DesignRequestEventDetail, DesignRequestOptions, type DesignRequestProps, type EmbellishmentLevel, type Image, type ImageAssignment, type ImageDensity, type ImageDensityOption, type ImageDensityOptionServer, type ImageDensityOptions, type ImageDensityOptionsServer, type ImageFilteringLevel, ImageServer, Images, MagicBookClient, type MagicShopBook, type Occasion, type Page, type PageType, type PhotoMetadata, type PhotoStrip, type Position, type Property, type ReportingData, type State, type Style, type TextStickerLevel, assetSchema, bookCreationRequestSchema, bookDesignRequestSchema, bookPropsSchema, bookSizes, canSubmitDesignRequest, cancelledEventDetail, canvasSchema, coverTypes, designOptionsSchema, designOptionsServerSchema, embellishmentLevels, imageAssignmentSchema, imageDensities, imageDensityOptionSchema, imageDensityOptionServerSchema, imageDensityOptionsSchema, imageDensityOptionsServerSchema, imageFilteringLevels, imageServerSchema, imageServerToImage, isDesignRequestSubmitted, magicShopBookSchema, occasions, pageSchema, pageTypes, photoMetadataSchema, photoStripSchema, positionSchema, propertySchema, reportingDataSchema, states, statesToCloseWS, statesToReport, styles, textStickerLevels, timeoutEventDetail };
3531
+ export { type Asset, Book, type BookCreationRequest, BookDesignRequest, type BookDesignRequestProps, type BookProps, type BookReport, type BookSize, type Canvas, type CoverType, type DesignOptions, type DesignOptionsServer, DesignRequest, type DesignRequestEvent, type DesignRequestEventDetail, DesignRequestOptions, type DesignRequestProps, type EmbellishmentLevel, type Format, type Image, type ImageAssignment, type ImageDensity, type ImageDensityOption, type ImageDensityOptionServer, type ImageDensityOptions, type ImageDensityOptionsServer, type ImageFilteringLevel, ImageServer, Images, MagicBookClient, type MagicShopBook, type Occasion, type Page, type PageType, type PhotoMetadata, type PhotoStrip, type Position, type Property, type ReportingData, type State, type Style, type TextStickerLevel, assetSchema, bookCreationRequestSchema, bookDesignRequestSchema, bookPropsSchema, bookSizes, canSubmitDesignRequest, cancelledEventDetail, canvasSchema, coverTypes, designOptionsSchema, designOptionsServerSchema, embellishmentLevels, formats, imageAssignmentSchema, imageDensities, imageDensityOptionSchema, imageDensityOptionServerSchema, imageDensityOptionsSchema, imageDensityOptionsServerSchema, imageFilteringLevels, imageServerSchema, imageServerToImage, isDesignRequestSubmitted, magicShopBookSchema, occasions, pageSchema, pageTypes, photoMetadataSchema, photoStripSchema, positionSchema, propertySchema, reportingDataSchema, states, statesToCloseWS, statesToReport, styles, textStickerLevels, timeoutEventDetail };