@magiclabs.ai/magicbook-client 0.7.7-canary → 0.7.8-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/README.md +2 -1
- package/index.cjs +125 -6
- package/index.cjs.map +1 -1
- package/index.d.cts +320 -11
- package/index.d.ts +320 -11
- package/index.js +125 -6
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -523,8 +523,311 @@ declare const styles: {
|
|
|
523
523
|
6156: {
|
|
524
524
|
slug: string;
|
|
525
525
|
};
|
|
526
|
+
be5f79d7525f4717844db77a2f1b5e50: {
|
|
527
|
+
slug: string;
|
|
528
|
+
};
|
|
529
|
+
'519bf5f2b6734103a9a359469be4961b': {
|
|
530
|
+
slug: string;
|
|
531
|
+
};
|
|
532
|
+
'029a2ebd65b448bf93753c813b7b7363': {
|
|
533
|
+
slug: string;
|
|
534
|
+
};
|
|
535
|
+
'16d0d436594b4171bd9688876a85c9c1': {
|
|
536
|
+
slug: string;
|
|
537
|
+
};
|
|
538
|
+
'5b95e1d678584558b2c3397ab996da7b': {
|
|
539
|
+
slug: string;
|
|
540
|
+
};
|
|
541
|
+
a2c088e32541429ba8e5e15d09991264: {
|
|
542
|
+
slug: string;
|
|
543
|
+
};
|
|
544
|
+
'0ddec2b965094c8ea03d669e771ff1a6': {
|
|
545
|
+
slug: string;
|
|
546
|
+
};
|
|
547
|
+
'339699fedd3743f69c5b05587fbfd41a': {
|
|
548
|
+
slug: string;
|
|
549
|
+
};
|
|
550
|
+
'091f9a6a83c349b2a9732177d89f8664': {
|
|
551
|
+
slug: string;
|
|
552
|
+
};
|
|
553
|
+
e768ec11406545809ca9598be3bda88c: {
|
|
554
|
+
slug: string;
|
|
555
|
+
};
|
|
556
|
+
'0c55a3eb5cc6414c9f2570886132d331': {
|
|
557
|
+
slug: string;
|
|
558
|
+
};
|
|
559
|
+
'9c49df50d76b4789834ca7abaabe2bc6': {
|
|
560
|
+
slug: string;
|
|
561
|
+
};
|
|
562
|
+
fd7cf7c4dc244705ad391334d76f7229: {
|
|
563
|
+
slug: string;
|
|
564
|
+
};
|
|
565
|
+
'363ceab4906b47a09dd287f53dc1d30f': {
|
|
566
|
+
slug: string;
|
|
567
|
+
};
|
|
568
|
+
e47017576d0e451180ff4591d2aee2fa: {
|
|
569
|
+
slug: string;
|
|
570
|
+
};
|
|
571
|
+
d9743da5f46843aab84b1f90ff776ee0: {
|
|
572
|
+
slug: string;
|
|
573
|
+
};
|
|
574
|
+
'13039c15c81b4e50af5e39cd99f4e274': {
|
|
575
|
+
slug: string;
|
|
576
|
+
};
|
|
577
|
+
'0c98757783874104a488a1a88747344d': {
|
|
578
|
+
slug: string;
|
|
579
|
+
};
|
|
580
|
+
'5b0d80d6ca164919b7ee558c0bc2537b': {
|
|
581
|
+
slug: string;
|
|
582
|
+
};
|
|
583
|
+
eb734aa7c87a4db1ac9695e935f13489: {
|
|
584
|
+
slug: string;
|
|
585
|
+
};
|
|
586
|
+
'7ed9132a96484ed2b200cf30e73cf049': {
|
|
587
|
+
slug: string;
|
|
588
|
+
};
|
|
589
|
+
'3e15106389764a3cb2b6a6c29c065993': {
|
|
590
|
+
slug: string;
|
|
591
|
+
};
|
|
592
|
+
'47f9e28d811842a5870c74bb4c6b3608': {
|
|
593
|
+
slug: string;
|
|
594
|
+
};
|
|
595
|
+
bef3d3bc49f3476aa6f39ad073294a04: {
|
|
596
|
+
slug: string;
|
|
597
|
+
};
|
|
598
|
+
'496138703d5346bd9678a2fa487b54fd': {
|
|
599
|
+
slug: string;
|
|
600
|
+
};
|
|
601
|
+
'303773eee9934e8ba9f676b339c84d39': {
|
|
602
|
+
slug: string;
|
|
603
|
+
};
|
|
604
|
+
'02c52e4cdccd40b0b99cf2215a6b8fe1': {
|
|
605
|
+
slug: string;
|
|
606
|
+
};
|
|
607
|
+
c59f05e866344332b2953199fd2972fa: {
|
|
608
|
+
slug: string;
|
|
609
|
+
};
|
|
610
|
+
'5a2d025aaa3746b2b047daa6206ba8ad': {
|
|
611
|
+
slug: string;
|
|
612
|
+
};
|
|
613
|
+
'1c8784e76020435d88ddab7bc8d72cae': {
|
|
614
|
+
slug: string;
|
|
615
|
+
};
|
|
616
|
+
'1735277701d6483e9934074f25053f3a': {
|
|
617
|
+
slug: string;
|
|
618
|
+
};
|
|
619
|
+
'9c35a7f890204c38adb4255571377114': {
|
|
620
|
+
slug: string;
|
|
621
|
+
};
|
|
622
|
+
'9c946c20f0dc45adb3f85735690f3395': {
|
|
623
|
+
slug: string;
|
|
624
|
+
};
|
|
625
|
+
c216373996d945c186cc6db5a53e10b1: {
|
|
626
|
+
slug: string;
|
|
627
|
+
};
|
|
628
|
+
'6f7cd5c4e4e247f2bdf7c44ace0fdad5': {
|
|
629
|
+
slug: string;
|
|
630
|
+
};
|
|
631
|
+
'7eae47a7cbd743d4a47ca94f7a6b87a7': {
|
|
632
|
+
slug: string;
|
|
633
|
+
};
|
|
634
|
+
ac7a649cbd27433c9d0b405f34ff29f5: {
|
|
635
|
+
slug: string;
|
|
636
|
+
};
|
|
637
|
+
'3aa989376bc5414eb2a35f2cb930f57c': {
|
|
638
|
+
slug: string;
|
|
639
|
+
};
|
|
640
|
+
d86767aacb4f464892702ed3ffac1a98: {
|
|
641
|
+
slug: string;
|
|
642
|
+
};
|
|
643
|
+
c5d1654a989d4f2f87594e486239e77b: {
|
|
644
|
+
slug: string;
|
|
645
|
+
};
|
|
646
|
+
'73e54769af5f4943a8403c6a5e38f5fb': {
|
|
647
|
+
slug: string;
|
|
648
|
+
};
|
|
649
|
+
'7d15aef8b54d41ee82a99d327d571020': {
|
|
650
|
+
slug: string;
|
|
651
|
+
};
|
|
652
|
+
'46594aace0ca42b1bdd086d1b8ac0ad4': {
|
|
653
|
+
slug: string;
|
|
654
|
+
};
|
|
655
|
+
'77c78fbe2b4b4c7fb37e34a9515912d2': {
|
|
656
|
+
slug: string;
|
|
657
|
+
};
|
|
658
|
+
'659893fcc6c24fef9ea1a3a8ccf2539e': {
|
|
659
|
+
slug: string;
|
|
660
|
+
};
|
|
661
|
+
'0f1182fcc18c428fb7c3d80c5a637c3b': {
|
|
662
|
+
slug: string;
|
|
663
|
+
};
|
|
664
|
+
'54b7a8ca59774060835fdd48653dba9a': {
|
|
665
|
+
slug: string;
|
|
666
|
+
};
|
|
667
|
+
'2d56caccc29a40b5bd16334937de0083': {
|
|
668
|
+
slug: string;
|
|
669
|
+
};
|
|
670
|
+
'3c12993b18ff473fa6fc7f695bd64180': {
|
|
671
|
+
slug: string;
|
|
672
|
+
};
|
|
673
|
+
c4393a1da2e54ca4ab9a3ec0aeb682e4: {
|
|
674
|
+
slug: string;
|
|
675
|
+
};
|
|
676
|
+
ee9fd665523c41078a65c5389896d0ab: {
|
|
677
|
+
slug: string;
|
|
678
|
+
};
|
|
679
|
+
b84d0171dbb748e1ab2fb535fd318830: {
|
|
680
|
+
slug: string;
|
|
681
|
+
};
|
|
682
|
+
'4d61b18d992c4d8eb33a331e4201ae05': {
|
|
683
|
+
slug: string;
|
|
684
|
+
};
|
|
685
|
+
bdbe9158b33343c6ae11217fde9c8a57: {
|
|
686
|
+
slug: string;
|
|
687
|
+
};
|
|
688
|
+
'790a78454af94287b2a84c2324d6956e': {
|
|
689
|
+
slug: string;
|
|
690
|
+
};
|
|
691
|
+
'4211083b4bad4fee87e04dd65e5fed5d': {
|
|
692
|
+
slug: string;
|
|
693
|
+
};
|
|
694
|
+
'47bb41bb9e174657aa0c48ec140ed2c8': {
|
|
695
|
+
slug: string;
|
|
696
|
+
};
|
|
697
|
+
bac69bcc341c445d9c5c81f04231c685: {
|
|
698
|
+
slug: string;
|
|
699
|
+
};
|
|
700
|
+
'2d561db2b849457f8f830c2e977ced6c': {
|
|
701
|
+
slug: string;
|
|
702
|
+
};
|
|
703
|
+
e2727f32f9e248a3a7fd02f50cf493ab: {
|
|
704
|
+
slug: string;
|
|
705
|
+
};
|
|
706
|
+
'85005f9b9c1c4a4485508c52465b7110': {
|
|
707
|
+
slug: string;
|
|
708
|
+
};
|
|
709
|
+
df1eded2d6e24c81a9e9bd66567b39f0: {
|
|
710
|
+
slug: string;
|
|
711
|
+
};
|
|
712
|
+
bfdc9b325b1a4471a948eccb7c76fd2e: {
|
|
713
|
+
slug: string;
|
|
714
|
+
};
|
|
715
|
+
'7cb42c74e4704c08a51f0930703fff34': {
|
|
716
|
+
slug: string;
|
|
717
|
+
};
|
|
718
|
+
c88a62c1e3584591b278fe0ccfe3b02b: {
|
|
719
|
+
slug: string;
|
|
720
|
+
};
|
|
721
|
+
'2a682e5b38d64f77b7c1b6c0a8a06670': {
|
|
722
|
+
slug: string;
|
|
723
|
+
};
|
|
724
|
+
'5eddabc29f704c66ba03deff870f2c18': {
|
|
725
|
+
slug: string;
|
|
726
|
+
};
|
|
727
|
+
'18f048f0a07f40c09495fdc3830f7228': {
|
|
728
|
+
slug: string;
|
|
729
|
+
};
|
|
730
|
+
f2fd5fd83bbb4e9ebf3af33ba4589561: {
|
|
731
|
+
slug: string;
|
|
732
|
+
};
|
|
733
|
+
'31ed7e06afb347f2a302ba35267c8a0a': {
|
|
734
|
+
slug: string;
|
|
735
|
+
};
|
|
736
|
+
'17e8062b9ed749ba8428cbb3924e719d': {
|
|
737
|
+
slug: string;
|
|
738
|
+
};
|
|
739
|
+
'7573b1a594e8405295adfcf145c5322a': {
|
|
740
|
+
slug: string;
|
|
741
|
+
};
|
|
742
|
+
acc3ac3b7e724c288a849b471616e373: {
|
|
743
|
+
slug: string;
|
|
744
|
+
};
|
|
745
|
+
ddb203e3ae0443209ada75135e13a63e: {
|
|
746
|
+
slug: string;
|
|
747
|
+
};
|
|
748
|
+
bdee0a45e5144156b88621238cd31bbe: {
|
|
749
|
+
slug: string;
|
|
750
|
+
};
|
|
751
|
+
dc0d15f9aa474bd89c49e6da49bb3cc5: {
|
|
752
|
+
slug: string;
|
|
753
|
+
};
|
|
754
|
+
'55cebda93e1c4f52b07d824a57f8677b': {
|
|
755
|
+
slug: string;
|
|
756
|
+
};
|
|
757
|
+
'2172f706eedf4c36a3fba10a0fe5448d': {
|
|
758
|
+
slug: string;
|
|
759
|
+
};
|
|
760
|
+
'0964a6d8e0234df7ad7df8e56c33ff2b': {
|
|
761
|
+
slug: string;
|
|
762
|
+
};
|
|
763
|
+
e47b1860677e45909de56915a350a84e: {
|
|
764
|
+
slug: string;
|
|
765
|
+
};
|
|
766
|
+
'0b8fcc5f30cb4649bb4d8ea9cf35578c': {
|
|
767
|
+
slug: string;
|
|
768
|
+
};
|
|
769
|
+
'2972e73653da4dc5805853e22717f1ee': {
|
|
770
|
+
slug: string;
|
|
771
|
+
};
|
|
772
|
+
f292a52aff774e698fe26dc61a7a3f71: {
|
|
773
|
+
slug: string;
|
|
774
|
+
};
|
|
775
|
+
b9192bf9df6b4984b29f4731b5f0bb63: {
|
|
776
|
+
slug: string;
|
|
777
|
+
};
|
|
778
|
+
d2dd8fe6e2e44c78935206323ee89af1: {
|
|
779
|
+
slug: string;
|
|
780
|
+
};
|
|
781
|
+
'61f74eec39ff425b85e4f1c7e9e15ef6': {
|
|
782
|
+
slug: string;
|
|
783
|
+
};
|
|
784
|
+
'148b777f385c4df2bc1b4900a4208e82': {
|
|
785
|
+
slug: string;
|
|
786
|
+
};
|
|
787
|
+
'77550e4c36b34454bac2ae9c4d9d2bd1': {
|
|
788
|
+
slug: string;
|
|
789
|
+
};
|
|
790
|
+
'6aac0d2309744e9ea8fd4621f8213dbd': {
|
|
791
|
+
slug: string;
|
|
792
|
+
};
|
|
793
|
+
f5ef0aaddd294a0ba37ebc76012858ff: {
|
|
794
|
+
slug: string;
|
|
795
|
+
};
|
|
796
|
+
'73966e2885a544ed9ba8e0a314a6528c': {
|
|
797
|
+
slug: string;
|
|
798
|
+
};
|
|
799
|
+
'33242c4285024ccfafc57d72a7292ea9': {
|
|
800
|
+
slug: string;
|
|
801
|
+
};
|
|
802
|
+
'605f06522caa449ba93b7c5fa4d8e54b': {
|
|
803
|
+
slug: string;
|
|
804
|
+
};
|
|
805
|
+
c154e4664672441fa640f1ddff883db1: {
|
|
806
|
+
slug: string;
|
|
807
|
+
};
|
|
808
|
+
'86024d3f1def489495cc7525d8232bea': {
|
|
809
|
+
slug: string;
|
|
810
|
+
};
|
|
811
|
+
f52d1dd24f9c49ae82d8f70449fe40b7: {
|
|
812
|
+
slug: string;
|
|
813
|
+
};
|
|
814
|
+
'1cbbd20a3a4542f38d2f9932016c4584': {
|
|
815
|
+
slug: string;
|
|
816
|
+
};
|
|
817
|
+
fdf4b31ea3434b03a5c3ddaab1579084: {
|
|
818
|
+
slug: string;
|
|
819
|
+
};
|
|
820
|
+
'1b104c3a036e4825bd60a5c7ceac4e66': {
|
|
821
|
+
slug: string;
|
|
822
|
+
};
|
|
823
|
+
'03f332e3b2b947ebae73b67a9a22b6f4': {
|
|
824
|
+
slug: string;
|
|
825
|
+
};
|
|
826
|
+
'97f70f6cdb5244a08d45772cccfa2788': {
|
|
827
|
+
slug: string;
|
|
828
|
+
};
|
|
526
829
|
};
|
|
527
|
-
declare const bookSizes: readonly ["8x8", "10x10", "12x12", "8x11", "11x8", "11x14"];
|
|
830
|
+
declare const bookSizes: readonly ["5x7", "6x6", "8x8", "10x10", "12x12", "8x11", "11x8", "11x14"];
|
|
528
831
|
declare const coverTypes: readonly ["sc", "hc", "pl"];
|
|
529
832
|
declare const pageTypes: readonly ["sp", "sl", "dl"];
|
|
530
833
|
declare const imageDensities: readonly ["low", "medium", "high"];
|
|
@@ -618,7 +921,7 @@ declare class BooksEndpoints {
|
|
|
618
921
|
declare class DesignOptionsEndpoints {
|
|
619
922
|
private readonly engineAPI;
|
|
620
923
|
constructor(engineAPI: EngineAPI);
|
|
621
|
-
retrieve(bookSize: BookSize, imageCount: number, imageFilteringLevel: ImageFilteringLevel): Promise<{
|
|
924
|
+
retrieve(bookSize: BookSize, imageCount: number, imageFilteringLevel: ImageFilteringLevel, sku?: string): Promise<{
|
|
622
925
|
densities: {
|
|
623
926
|
low: {
|
|
624
927
|
max_page_count: number;
|
|
@@ -1015,7 +1318,7 @@ type TextStickerLevel = (typeof textStickerLevels)[number];
|
|
|
1015
1318
|
declare const DesignRequestOptions: {
|
|
1016
1319
|
occasion: readonly ["baby", "birthday", "default", "everyday", "family", "kids", "life-stories", "portfolio", "school-memories", "seasonal-holidays", "special-celebrations", "sports-and-hobbies", "travel", "wedding", "year-in-review"];
|
|
1017
1320
|
style: number[];
|
|
1018
|
-
bookSize: readonly ["8x8", "10x10", "12x12", "8x11", "11x8", "11x14"];
|
|
1321
|
+
bookSize: readonly ["5x7", "6x6", "8x8", "10x10", "12x12", "8x11", "11x8", "11x14"];
|
|
1019
1322
|
coverType: readonly ["sc", "hc", "pl"];
|
|
1020
1323
|
pageType: readonly ["sp", "sl", "dl"];
|
|
1021
1324
|
imageDensity: readonly ["low", "medium", "high"];
|
|
@@ -1029,6 +1332,7 @@ type DesignRequestProps = {
|
|
|
1029
1332
|
state?: State;
|
|
1030
1333
|
occasion?: Occasion;
|
|
1031
1334
|
style?: Style;
|
|
1335
|
+
sku?: string;
|
|
1032
1336
|
bookSize?: BookSize;
|
|
1033
1337
|
coverType?: CoverType;
|
|
1034
1338
|
pageType?: PageType;
|
|
@@ -1054,6 +1358,7 @@ declare class DesignRequest {
|
|
|
1054
1358
|
subtitle?: string;
|
|
1055
1359
|
occasion: Occasion;
|
|
1056
1360
|
style: Style;
|
|
1361
|
+
sku?: string;
|
|
1057
1362
|
bookSize: BookSize;
|
|
1058
1363
|
coverType: CoverType;
|
|
1059
1364
|
pageType: PageType;
|
|
@@ -1230,7 +1535,7 @@ declare class BookDesignRequest {
|
|
|
1230
1535
|
declare const bookDesignRequestSchema: z.ZodObject<{
|
|
1231
1536
|
occasion: z.ZodEnum<["baby", "birthday", "default", "everyday", "family", "kids", "life-stories", "portfolio", "school-memories", "seasonal-holidays", "special-celebrations", "sports-and-hobbies", "travel", "wedding", "year-in-review"]>;
|
|
1232
1537
|
style: z.ZodString;
|
|
1233
|
-
book_size: z.ZodEnum<["8x8", "10x10", "12x12", "8x11", "11x8", "11x14"]>;
|
|
1538
|
+
book_size: z.ZodEnum<["5x7", "6x6", "8x8", "10x10", "12x12", "8x11", "11x8", "11x14"]>;
|
|
1234
1539
|
cover_type: z.ZodEnum<["sc", "hc", "pl"]>;
|
|
1235
1540
|
page_type: z.ZodEnum<["sp", "sl", "dl"]>;
|
|
1236
1541
|
image_density: z.ZodEnum<["low", "medium", "high"]>;
|
|
@@ -1240,7 +1545,7 @@ declare const bookDesignRequestSchema: z.ZodObject<{
|
|
|
1240
1545
|
}, "strip", z.ZodTypeAny, {
|
|
1241
1546
|
occasion: "baby" | "birthday" | "default" | "everyday" | "family" | "kids" | "life-stories" | "portfolio" | "school-memories" | "seasonal-holidays" | "special-celebrations" | "sports-and-hobbies" | "travel" | "wedding" | "year-in-review";
|
|
1242
1547
|
style: string;
|
|
1243
|
-
book_size: "8x8" | "10x10" | "12x12" | "8x11" | "11x8" | "11x14";
|
|
1548
|
+
book_size: "5x7" | "6x6" | "8x8" | "10x10" | "12x12" | "8x11" | "11x8" | "11x14";
|
|
1244
1549
|
cover_type: "sc" | "hc" | "pl";
|
|
1245
1550
|
page_type: "sp" | "sl" | "dl";
|
|
1246
1551
|
image_density: "low" | "medium" | "high";
|
|
@@ -1250,7 +1555,7 @@ declare const bookDesignRequestSchema: z.ZodObject<{
|
|
|
1250
1555
|
}, {
|
|
1251
1556
|
occasion: "baby" | "birthday" | "default" | "everyday" | "family" | "kids" | "life-stories" | "portfolio" | "school-memories" | "seasonal-holidays" | "special-celebrations" | "sports-and-hobbies" | "travel" | "wedding" | "year-in-review";
|
|
1252
1557
|
style: string;
|
|
1253
|
-
book_size: "8x8" | "10x10" | "12x12" | "8x11" | "11x8" | "11x14";
|
|
1558
|
+
book_size: "5x7" | "6x6" | "8x8" | "10x10" | "12x12" | "8x11" | "11x8" | "11x14";
|
|
1254
1559
|
cover_type: "sc" | "hc" | "pl";
|
|
1255
1560
|
page_type: "sp" | "sl" | "dl";
|
|
1256
1561
|
image_density: "low" | "medium" | "high";
|
|
@@ -1265,7 +1570,7 @@ declare const bookPropsSchema: z.ZodObject<{
|
|
|
1265
1570
|
design_request: z.ZodObject<{
|
|
1266
1571
|
occasion: z.ZodEnum<["baby", "birthday", "default", "everyday", "family", "kids", "life-stories", "portfolio", "school-memories", "seasonal-holidays", "special-celebrations", "sports-and-hobbies", "travel", "wedding", "year-in-review"]>;
|
|
1267
1572
|
style: z.ZodString;
|
|
1268
|
-
book_size: z.ZodEnum<["8x8", "10x10", "12x12", "8x11", "11x8", "11x14"]>;
|
|
1573
|
+
book_size: z.ZodEnum<["5x7", "6x6", "8x8", "10x10", "12x12", "8x11", "11x8", "11x14"]>;
|
|
1269
1574
|
cover_type: z.ZodEnum<["sc", "hc", "pl"]>;
|
|
1270
1575
|
page_type: z.ZodEnum<["sp", "sl", "dl"]>;
|
|
1271
1576
|
image_density: z.ZodEnum<["low", "medium", "high"]>;
|
|
@@ -1275,7 +1580,7 @@ declare const bookPropsSchema: z.ZodObject<{
|
|
|
1275
1580
|
}, "strip", z.ZodTypeAny, {
|
|
1276
1581
|
occasion: "baby" | "birthday" | "default" | "everyday" | "family" | "kids" | "life-stories" | "portfolio" | "school-memories" | "seasonal-holidays" | "special-celebrations" | "sports-and-hobbies" | "travel" | "wedding" | "year-in-review";
|
|
1277
1582
|
style: string;
|
|
1278
|
-
book_size: "8x8" | "10x10" | "12x12" | "8x11" | "11x8" | "11x14";
|
|
1583
|
+
book_size: "5x7" | "6x6" | "8x8" | "10x10" | "12x12" | "8x11" | "11x8" | "11x14";
|
|
1279
1584
|
cover_type: "sc" | "hc" | "pl";
|
|
1280
1585
|
page_type: "sp" | "sl" | "dl";
|
|
1281
1586
|
image_density: "low" | "medium" | "high";
|
|
@@ -1285,7 +1590,7 @@ declare const bookPropsSchema: z.ZodObject<{
|
|
|
1285
1590
|
}, {
|
|
1286
1591
|
occasion: "baby" | "birthday" | "default" | "everyday" | "family" | "kids" | "life-stories" | "portfolio" | "school-memories" | "seasonal-holidays" | "special-celebrations" | "sports-and-hobbies" | "travel" | "wedding" | "year-in-review";
|
|
1287
1592
|
style: string;
|
|
1288
|
-
book_size: "8x8" | "10x10" | "12x12" | "8x11" | "11x8" | "11x14";
|
|
1593
|
+
book_size: "5x7" | "6x6" | "8x8" | "10x10" | "12x12" | "8x11" | "11x8" | "11x14";
|
|
1289
1594
|
cover_type: "sc" | "hc" | "pl";
|
|
1290
1595
|
page_type: "sp" | "sl" | "dl";
|
|
1291
1596
|
image_density: "low" | "medium" | "high";
|
|
@@ -1293,6 +1598,7 @@ declare const bookPropsSchema: z.ZodObject<{
|
|
|
1293
1598
|
embellishment_level: "none" | "few" | "lots";
|
|
1294
1599
|
text_sticker_level: "none" | "few" | "lots";
|
|
1295
1600
|
}>;
|
|
1601
|
+
sku: z.ZodOptional<z.ZodString>;
|
|
1296
1602
|
state: z.ZodOptional<z.ZodEnum<["new", "ingesting", "submitted", "storyboarding", "deduplication", "image-selection", "designing", "layouting", "embellishing", "polishing", "ready", "timeout", "error", "cancelled"]>>;
|
|
1297
1603
|
guid: z.ZodOptional<z.ZodString>;
|
|
1298
1604
|
cancelled_at: z.ZodOptional<z.ZodString>;
|
|
@@ -1304,7 +1610,7 @@ declare const bookPropsSchema: z.ZodObject<{
|
|
|
1304
1610
|
design_request: {
|
|
1305
1611
|
occasion: "baby" | "birthday" | "default" | "everyday" | "family" | "kids" | "life-stories" | "portfolio" | "school-memories" | "seasonal-holidays" | "special-celebrations" | "sports-and-hobbies" | "travel" | "wedding" | "year-in-review";
|
|
1306
1612
|
style: string;
|
|
1307
|
-
book_size: "8x8" | "10x10" | "12x12" | "8x11" | "11x8" | "11x14";
|
|
1613
|
+
book_size: "5x7" | "6x6" | "8x8" | "10x10" | "12x12" | "8x11" | "11x8" | "11x14";
|
|
1308
1614
|
cover_type: "sc" | "hc" | "pl";
|
|
1309
1615
|
page_type: "sp" | "sl" | "dl";
|
|
1310
1616
|
image_density: "low" | "medium" | "high";
|
|
@@ -1314,6 +1620,7 @@ declare const bookPropsSchema: z.ZodObject<{
|
|
|
1314
1620
|
};
|
|
1315
1621
|
id?: string | undefined;
|
|
1316
1622
|
subtitle?: string | undefined;
|
|
1623
|
+
sku?: string | undefined;
|
|
1317
1624
|
state?: "new" | "ingesting" | "submitted" | "storyboarding" | "deduplication" | "image-selection" | "designing" | "layouting" | "embellishing" | "polishing" | "ready" | "timeout" | "error" | "cancelled" | undefined;
|
|
1318
1625
|
guid?: string | undefined;
|
|
1319
1626
|
cancelled_at?: string | undefined;
|
|
@@ -1325,7 +1632,7 @@ declare const bookPropsSchema: z.ZodObject<{
|
|
|
1325
1632
|
design_request: {
|
|
1326
1633
|
occasion: "baby" | "birthday" | "default" | "everyday" | "family" | "kids" | "life-stories" | "portfolio" | "school-memories" | "seasonal-holidays" | "special-celebrations" | "sports-and-hobbies" | "travel" | "wedding" | "year-in-review";
|
|
1327
1634
|
style: string;
|
|
1328
|
-
book_size: "8x8" | "10x10" | "12x12" | "8x11" | "11x8" | "11x14";
|
|
1635
|
+
book_size: "5x7" | "6x6" | "8x8" | "10x10" | "12x12" | "8x11" | "11x8" | "11x14";
|
|
1329
1636
|
cover_type: "sc" | "hc" | "pl";
|
|
1330
1637
|
page_type: "sp" | "sl" | "dl";
|
|
1331
1638
|
image_density: "low" | "medium" | "high";
|
|
@@ -1335,6 +1642,7 @@ declare const bookPropsSchema: z.ZodObject<{
|
|
|
1335
1642
|
};
|
|
1336
1643
|
id?: string | undefined;
|
|
1337
1644
|
subtitle?: string | undefined;
|
|
1645
|
+
sku?: string | undefined;
|
|
1338
1646
|
state?: "new" | "ingesting" | "submitted" | "storyboarding" | "deduplication" | "image-selection" | "designing" | "layouting" | "embellishing" | "polishing" | "ready" | "timeout" | "error" | "cancelled" | undefined;
|
|
1339
1647
|
guid?: string | undefined;
|
|
1340
1648
|
cancelled_at?: string | undefined;
|
|
@@ -1349,6 +1657,7 @@ declare class Book {
|
|
|
1349
1657
|
revision?: number;
|
|
1350
1658
|
subtitle?: string;
|
|
1351
1659
|
design_request: BookDesignRequest;
|
|
1660
|
+
sku?: string;
|
|
1352
1661
|
state?: State;
|
|
1353
1662
|
guid?: string;
|
|
1354
1663
|
cancelled_at?: string;
|
package/index.js
CHANGED
|
@@ -42,6 +42,7 @@ var occasions = [
|
|
|
42
42
|
"year-in-review"
|
|
43
43
|
];
|
|
44
44
|
var styles = {
|
|
45
|
+
//shutterfly styles
|
|
45
46
|
1005: { slug: "modern-black-sfly" },
|
|
46
47
|
1101: { slug: "bon-voyage-sfly" },
|
|
47
48
|
1103: { slug: "fun-in-the-sun-sfly" },
|
|
@@ -212,9 +213,120 @@ var styles = {
|
|
|
212
213
|
6098: { slug: "black-and-white-rustic-sfly" },
|
|
213
214
|
6099: { slug: "bright-color-pop-sfly" },
|
|
214
215
|
6159: { slug: "grateful-for-you-sfly" },
|
|
215
|
-
6156: { slug: "europe-mementos-sfly" }
|
|
216
|
+
6156: { slug: "europe-mementos-sfly" },
|
|
217
|
+
//snapfish styles
|
|
218
|
+
be5f79d7525f4717844db77a2f1b5e50: { slug: "abstract-baby-first-year-snap" },
|
|
219
|
+
"519bf5f2b6734103a9a359469be4961b": { slug: "album-snap" },
|
|
220
|
+
"029a2ebd65b448bf93753c813b7b7363": { slug: "all-about-love-snap" },
|
|
221
|
+
"16d0d436594b4171bd9688876a85c9c1": { slug: "alphabet-book-snap" },
|
|
222
|
+
"5b95e1d678584558b2c3397ab996da7b": { slug: "always-and-forever-snap" },
|
|
223
|
+
a2c088e32541429ba8e5e15d09991264: { slug: "art-of-travel-snap" },
|
|
224
|
+
"0ddec2b965094c8ea03d669e771ff1a6": { slug: "autumn-snapshots-snap" },
|
|
225
|
+
"339699fedd3743f69c5b05587fbfd41a": { slug: "baby-boy-first-year-snap" },
|
|
226
|
+
"091f9a6a83c349b2a9732177d89f8664": { slug: "baby-girl-first-year-snap" },
|
|
227
|
+
e768ec11406545809ca9598be3bda88c: { slug: "best-dad-ever-snap" },
|
|
228
|
+
"0c55a3eb5cc6414c9f2570886132d331": { slug: "best-year-ever-snap" },
|
|
229
|
+
"9c49df50d76b4789834ca7abaabe2bc6": { slug: "bold-shapes-snap" },
|
|
230
|
+
fd7cf7c4dc244705ad391334d76f7229: { slug: "bold-type-snap" },
|
|
231
|
+
"363ceab4906b47a09dd287f53dc1d30f": { slug: "botanicals-snap" },
|
|
232
|
+
e47017576d0e451180ff4591d2aee2fa: { slug: "celebrating-grandma-snap" },
|
|
233
|
+
d9743da5f46843aab84b1f90ff776ee0: { slug: "celebrating-mum-snap" },
|
|
234
|
+
"13039c15c81b4e50af5e39cd99f4e274": { slug: "chalkboard-snap" },
|
|
235
|
+
"0c98757783874104a488a1a88747344d": { slug: "childs-yearbook-snap" },
|
|
236
|
+
"5b0d80d6ca164919b7ee558c0bc2537b": { slug: "classic-fathers-snap" },
|
|
237
|
+
eb734aa7c87a4db1ac9695e935f13489: { slug: "colour-block-rainbow-snap" },
|
|
238
|
+
"7ed9132a96484ed2b200cf30e73cf049": { slug: "contemporary-travel-snap" },
|
|
239
|
+
"3e15106389764a3cb2b6a6c29c065993": { slug: "contemporary-wedding-snap" },
|
|
240
|
+
"47f9e28d811842a5870c74bb4c6b3608": { slug: "design-your-own-snap" },
|
|
241
|
+
bef3d3bc49f3476aa6f39ad073294a04: { slug: "destination-stamps-snap" },
|
|
242
|
+
"496138703d5346bd9678a2fa487b54fd": { slug: "dip-dye-snap" },
|
|
243
|
+
"303773eee9934e8ba9f676b339c84d39": { slug: "earth-tones-snap" },
|
|
244
|
+
"02c52e4cdccd40b0b99cf2215a6b8fe1": { slug: "elegant-florals-snap" },
|
|
245
|
+
c59f05e866344332b2953199fd2972fa: { slug: "everyday-happiness-snap" },
|
|
246
|
+
"5a2d025aaa3746b2b047daa6206ba8ad": { slug: "family-chalkboard-snap" },
|
|
247
|
+
"1c8784e76020435d88ddab7bc8d72cae": { slug: "family-farmhouse-snap" },
|
|
248
|
+
"1735277701d6483e9934074f25053f3a": { slug: "family-memories-snap" },
|
|
249
|
+
"9c35a7f890204c38adb4255571377114": { slug: "family-yearbook-snap" },
|
|
250
|
+
"9c946c20f0dc45adb3f85735690f3395": { slug: "favourite-things-snap" },
|
|
251
|
+
c216373996d945c186cc6db5a53e10b1: { slug: "framed-full-photo-snap" },
|
|
252
|
+
"6f7cd5c4e4e247f2bdf7c44ace0fdad5": { slug: "fresh-cookbook-snap" },
|
|
253
|
+
"7eae47a7cbd743d4a47ca94f7a6b87a7": { slug: "full-and-multi-square-photo-snap" },
|
|
254
|
+
ac7a649cbd27433c9d0b405f34ff29f5: { slug: "full-photo-snap" },
|
|
255
|
+
"3aa989376bc5414eb2a35f2cb930f57c": { slug: "full-photo-snap" },
|
|
256
|
+
d86767aacb4f464892702ed3ffac1a98: { slug: "fun-dots-snap" },
|
|
257
|
+
c5d1654a989d4f2f87594e486239e77b: { slug: "geometric-lines-snap" },
|
|
258
|
+
"73e54769af5f4943a8403c6a5e38f5fb": { slug: "golden-graduation-snap" },
|
|
259
|
+
"7d15aef8b54d41ee82a99d327d571020": { slug: "graduation-memories-snap" },
|
|
260
|
+
"46594aace0ca42b1bdd086d1b8ac0ad4": { slug: "guest-book-snap" },
|
|
261
|
+
"77c78fbe2b4b4c7fb37e34a9515912d2": { slug: "hearts-for-mum-snap" },
|
|
262
|
+
"659893fcc6c24fef9ea1a3a8ccf2539e": { slug: "hello-baby-snap" },
|
|
263
|
+
"0f1182fcc18c428fb7c3d80c5a637c3b": { slug: "hello-baby-boy-snap" },
|
|
264
|
+
"54b7a8ca59774060835fdd48653dba9a": { slug: "hello-baby-girl-snap" },
|
|
265
|
+
"2d56caccc29a40b5bd16334937de0083": { slug: "i-love-my-cat-snap" },
|
|
266
|
+
"3c12993b18ff473fa6fc7f695bd64180": { slug: "i-love-my-dog-snap" },
|
|
267
|
+
c4393a1da2e54ca4ab9a3ec0aeb682e4: { slug: "lets-celebrate-snap" },
|
|
268
|
+
ee9fd665523c41078a65c5389896d0ab: { slug: "love-lives-here-snap" },
|
|
269
|
+
b84d0171dbb748e1ab2fb535fd318830: { slug: "love-story-snap" },
|
|
270
|
+
"4d61b18d992c4d8eb33a331e4201ae05": { slug: "magical-memories-snap" },
|
|
271
|
+
bdbe9158b33343c6ae11217fde9c8a57: { slug: "milestone-memories-snap" },
|
|
272
|
+
"790a78454af94287b2a84c2324d6956e": { slug: "modern-graduation-snap" },
|
|
273
|
+
"4211083b4bad4fee87e04dd65e5fed5d": { slug: "modern-highlights-snap" },
|
|
274
|
+
"47bb41bb9e174657aa0c48ec140ed2c8": { slug: "modern-rustic-snap" },
|
|
275
|
+
bac69bcc341c445d9c5c81f04231c685: { slug: "my-family-snap" },
|
|
276
|
+
"2d561db2b849457f8f830c2e977ced6c": { slug: "my-graduation-snap" },
|
|
277
|
+
e2727f32f9e248a3a7fd02f50cf493ab: { slug: "natural-blues-snap" },
|
|
278
|
+
"85005f9b9c1c4a4485508c52465b7110": { slug: "nautical-summer-snap" },
|
|
279
|
+
df1eded2d6e24c81a9e9bd66567b39f0: { slug: "organic-patterns-snap" },
|
|
280
|
+
bfdc9b325b1a4471a948eccb7c76fd2e: { slug: "organic-shapes-snap" },
|
|
281
|
+
"7cb42c74e4704c08a51f0930703fff34": { slug: "our-wedding-guests-snap" },
|
|
282
|
+
c88a62c1e3584591b278fe0ccfe3b02b: { slug: "over-the-moon-snap" },
|
|
283
|
+
"2a682e5b38d64f77b7c1b6c0a8a06670": { slug: "painterly-patterns-snap" },
|
|
284
|
+
"5eddabc29f704c66ba03deff870f2c18": { slug: "precious-experiences-snap" },
|
|
285
|
+
"18f048f0a07f40c09495fdc3830f7228": { slug: "reflections-on-our-year-snap" },
|
|
286
|
+
f2fd5fd83bbb4e9ebf3af33ba4589561: { slug: "roadtrip-snap" },
|
|
287
|
+
"31ed7e06afb347f2a302ba35267c8a0a": { slug: "rustic-chic-snap" },
|
|
288
|
+
"17e8062b9ed749ba8428cbb3924e719d": { slug: "rustic-family-snapshots-snap" },
|
|
289
|
+
"7573b1a594e8405295adfcf145c5322a": { slug: "serene-memories-snap" },
|
|
290
|
+
acc3ac3b7e724c288a849b471616e373: { slug: "simple-snap" },
|
|
291
|
+
ddb203e3ae0443209ada75135e13a63e: { slug: "simple-family-moments-snap" },
|
|
292
|
+
bdee0a45e5144156b88621238cd31bbe: { slug: "simply-love-snap" },
|
|
293
|
+
dc0d15f9aa474bd89c49e6da49bb3cc5: { slug: "sketched-botanicals-snap" },
|
|
294
|
+
"55cebda93e1c4f52b07d824a57f8677b": { slug: "smitten-snap" },
|
|
295
|
+
"2172f706eedf4c36a3fba10a0fe5448d": { slug: "snow-days-snap" },
|
|
296
|
+
"0964a6d8e0234df7ad7df8e56c33ff2b": { slug: "solid-brights-snap" },
|
|
297
|
+
e47b1860677e45909de56915a350a84e: { slug: "studio-snap" },
|
|
298
|
+
"0b8fcc5f30cb4649bb4d8ea9cf35578c": { slug: "studio-multi-snap" },
|
|
299
|
+
"2972e73653da4dc5805853e22717f1ee": { slug: "summer-snapshots-snap" },
|
|
300
|
+
f292a52aff774e698fe26dc61a7a3f71: { slug: "team-spirit-snap" },
|
|
301
|
+
b9192bf9df6b4984b29f4731b5f0bb63: { slug: "ten-things-i-love-snap" },
|
|
302
|
+
d2dd8fe6e2e44c78935206323ee89af1: { slug: "travel-maps-snap" },
|
|
303
|
+
"61f74eec39ff425b85e4f1c7e9e15ef6": { slug: "travel-memories-snap" },
|
|
304
|
+
"148b777f385c4df2bc1b4900a4208e82": { slug: "travel-stamps-snap" },
|
|
305
|
+
"77550e4c36b34454bac2ae9c4d9d2bd1": { slug: "tropical-beach-escape-snap" },
|
|
306
|
+
"6aac0d2309744e9ea8fd4621f8213dbd": { slug: "unfurgettable-kitty-snap" },
|
|
307
|
+
f5ef0aaddd294a0ba37ebc76012858ff: { slug: "vibrant-memories-snap" },
|
|
308
|
+
"73966e2885a544ed9ba8e0a314a6528c": { slug: "vintage-birthday-memories-snap" },
|
|
309
|
+
"33242c4285024ccfafc57d72a7292ea9": { slug: "warm-neutrals-snap" },
|
|
310
|
+
"605f06522caa449ba93b7c5fa4d8e54b": { slug: "warmest-memories-snap" },
|
|
311
|
+
c154e4664672441fa640f1ddff883db1: { slug: "watercolour-memories-snap" },
|
|
312
|
+
"86024d3f1def489495cc7525d8232bea": { slug: "watercolour-sketchbook-snap" },
|
|
313
|
+
f52d1dd24f9c49ae82d8f70449fe40b7: { slug: "watercolour-wonders-snap" },
|
|
314
|
+
"1cbbd20a3a4542f38d2f9932016c4584": { slug: "watercolours-snap" },
|
|
315
|
+
fdf4b31ea3434b03a5c3ddaab1579084: { slug: "wedding-studio-snap" },
|
|
316
|
+
"1b104c3a036e4825bd60a5c7ceac4e66": { slug: "winter-magic-snap" },
|
|
317
|
+
"03f332e3b2b947ebae73b67a9a22b6f4": { slug: "winter-sparkle-snap" },
|
|
318
|
+
"97f70f6cdb5244a08d45772cccfa2788": { slug: "year-of-memories-snap" }
|
|
216
319
|
};
|
|
217
|
-
var bookSizes = [
|
|
320
|
+
var bookSizes = [
|
|
321
|
+
"5x7",
|
|
322
|
+
"6x6",
|
|
323
|
+
"8x8",
|
|
324
|
+
"10x10",
|
|
325
|
+
"12x12",
|
|
326
|
+
"8x11",
|
|
327
|
+
"11x8",
|
|
328
|
+
"11x14"
|
|
329
|
+
];
|
|
218
330
|
var coverTypes = ["sc", "hc", "pl"];
|
|
219
331
|
var pageTypes = ["sp", "sl", "dl"];
|
|
220
332
|
var imageDensities = ["low", "medium", "high"];
|
|
@@ -301,7 +413,7 @@ function getStyleIdBySlug(slug) {
|
|
|
301
413
|
for (const id in styles) {
|
|
302
414
|
const style = styles[id];
|
|
303
415
|
if (style.slug === slug) {
|
|
304
|
-
return
|
|
416
|
+
return id;
|
|
305
417
|
}
|
|
306
418
|
}
|
|
307
419
|
return void 0;
|
|
@@ -4266,6 +4378,7 @@ var bookPropsSchema = z.object({
|
|
|
4266
4378
|
title: z.string(),
|
|
4267
4379
|
subtitle: z.string().optional(),
|
|
4268
4380
|
design_request: bookDesignRequestSchema,
|
|
4381
|
+
sku: z.string().optional(),
|
|
4269
4382
|
state: z.enum(states).optional(),
|
|
4270
4383
|
guid: z.string().optional(),
|
|
4271
4384
|
cancelled_at: z.string().optional(),
|
|
@@ -4279,6 +4392,7 @@ var Book = class {
|
|
|
4279
4392
|
revision;
|
|
4280
4393
|
subtitle;
|
|
4281
4394
|
design_request;
|
|
4395
|
+
sku;
|
|
4282
4396
|
state;
|
|
4283
4397
|
guid;
|
|
4284
4398
|
cancelled_at;
|
|
@@ -4289,6 +4403,7 @@ var Book = class {
|
|
|
4289
4403
|
this.title = props.title;
|
|
4290
4404
|
this.subtitle = props.subtitle;
|
|
4291
4405
|
this.design_request = new BookDesignRequest(props.design_request);
|
|
4406
|
+
this.sku = props.sku;
|
|
4292
4407
|
this.state = props.state;
|
|
4293
4408
|
this.guid = props.guid;
|
|
4294
4409
|
this.cancelled_at = props.cancelled_at;
|
|
@@ -4439,6 +4554,7 @@ var DesignRequest = class {
|
|
|
4439
4554
|
this.subtitle = designRequestProps?.subtitle;
|
|
4440
4555
|
this.occasion = designRequestProps?.occasion || occasions[0];
|
|
4441
4556
|
this.style = designRequestProps?.style || parseInt(Object.keys(styles)[0]);
|
|
4557
|
+
this.sku = designRequestProps?.sku;
|
|
4442
4558
|
this.bookSize = designRequestProps?.bookSize || bookSizes[0];
|
|
4443
4559
|
this.coverType = designRequestProps?.coverType || coverTypes[0];
|
|
4444
4560
|
this.pageType = designRequestProps?.pageType || pageTypes[0];
|
|
@@ -4454,6 +4570,7 @@ var DesignRequest = class {
|
|
|
4454
4570
|
subtitle;
|
|
4455
4571
|
occasion;
|
|
4456
4572
|
style;
|
|
4573
|
+
sku;
|
|
4457
4574
|
bookSize;
|
|
4458
4575
|
coverType;
|
|
4459
4576
|
pageType;
|
|
@@ -4478,7 +4595,8 @@ var DesignRequest = class {
|
|
|
4478
4595
|
await this.client.engineAPI.designOptions.retrieve(
|
|
4479
4596
|
this.bookSize,
|
|
4480
4597
|
imageCount || this.images.length,
|
|
4481
|
-
this.imageFilteringLevel
|
|
4598
|
+
this.imageFilteringLevel,
|
|
4599
|
+
this.sku
|
|
4482
4600
|
)
|
|
4483
4601
|
)
|
|
4484
4602
|
);
|
|
@@ -4594,6 +4712,7 @@ var DesignRequest = class {
|
|
|
4594
4712
|
title: designRequest.title,
|
|
4595
4713
|
subtitle: designRequest.subtitle,
|
|
4596
4714
|
design_request: bookDesignRequest,
|
|
4715
|
+
sku: designRequest.sku,
|
|
4597
4716
|
state: designRequest.state,
|
|
4598
4717
|
user_id: designRequest.userId
|
|
4599
4718
|
});
|
|
@@ -4775,11 +4894,11 @@ var DesignOptionsEndpoints = class {
|
|
|
4775
4894
|
this.engineAPI = engineAPI;
|
|
4776
4895
|
bindThisToFunctions(this);
|
|
4777
4896
|
}
|
|
4778
|
-
retrieve(bookSize, imageCount, imageFilteringLevel) {
|
|
4897
|
+
retrieve(bookSize, imageCount, imageFilteringLevel, sku) {
|
|
4779
4898
|
return handleAsyncFunction(async () => {
|
|
4780
4899
|
const res = await this.engineAPI.fetcher.call({
|
|
4781
4900
|
// eslint-disable-next-line max-len
|
|
4782
|
-
path: `/v1/designoptions/booksize/${bookSize}/imagecount/${imageCount}/imagefilteringlevel/${imageFilteringLevel}`
|
|
4901
|
+
path: `/v1/designoptions/booksize/${bookSize}/imagecount/${imageCount}/imagefilteringlevel/${imageFilteringLevel}${sku ? `?sku=${sku}` : ""}`
|
|
4783
4902
|
});
|
|
4784
4903
|
return designOptionsServerSchema.parse(res);
|
|
4785
4904
|
});
|