@magiclabs.ai/magicbook-client 0.7.24-canary → 0.7.25-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.cjs +7 -7
- package/index.cjs.map +1 -1
- package/index.d.cts +32 -32
- package/index.d.ts +32 -32
- package/index.iife.js +7 -7
- package/index.iife.min.js +1 -1
- package/index.js +7 -7
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.cts
CHANGED
|
@@ -4427,12 +4427,12 @@ declare class ImagesEndpoints {
|
|
|
4427
4427
|
}
|
|
4428
4428
|
|
|
4429
4429
|
declare const spreadServerSchema: z.ZodObject<{
|
|
4430
|
-
id: z.
|
|
4430
|
+
id: z.ZodString;
|
|
4431
4431
|
book_id: z.ZodString;
|
|
4432
4432
|
state: z.ZodString;
|
|
4433
4433
|
spread_type: z.ZodString;
|
|
4434
|
-
width: z.
|
|
4435
|
-
height: z.
|
|
4434
|
+
width: z.ZodNumber;
|
|
4435
|
+
height: z.ZodNumber;
|
|
4436
4436
|
sequence: z.ZodNumber;
|
|
4437
4437
|
wells: z.ZodArray<z.ZodUnknown, "many">;
|
|
4438
4438
|
background: z.ZodUnknown;
|
|
@@ -4442,7 +4442,10 @@ declare const spreadServerSchema: z.ZodObject<{
|
|
|
4442
4442
|
metadata: z.ZodUnknown;
|
|
4443
4443
|
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4444
4444
|
}, "strip", z.ZodTypeAny, {
|
|
4445
|
+
id: string;
|
|
4445
4446
|
state: string;
|
|
4447
|
+
width: number;
|
|
4448
|
+
height: number;
|
|
4446
4449
|
book_id: string;
|
|
4447
4450
|
spread_type: string;
|
|
4448
4451
|
sequence: number;
|
|
@@ -4450,14 +4453,14 @@ declare const spreadServerSchema: z.ZodObject<{
|
|
|
4450
4453
|
laid_out_at: string | null;
|
|
4451
4454
|
embellished_at: string | null;
|
|
4452
4455
|
polished_at: string | null;
|
|
4453
|
-
id?: string | undefined;
|
|
4454
4456
|
url?: string | null | undefined;
|
|
4455
|
-
width?: number | undefined;
|
|
4456
|
-
height?: number | undefined;
|
|
4457
4457
|
metadata?: unknown;
|
|
4458
4458
|
background?: unknown;
|
|
4459
4459
|
}, {
|
|
4460
|
+
id: string;
|
|
4460
4461
|
state: string;
|
|
4462
|
+
width: number;
|
|
4463
|
+
height: number;
|
|
4461
4464
|
book_id: string;
|
|
4462
4465
|
spread_type: string;
|
|
4463
4466
|
sequence: number;
|
|
@@ -4465,21 +4468,18 @@ declare const spreadServerSchema: z.ZodObject<{
|
|
|
4465
4468
|
laid_out_at: string | null;
|
|
4466
4469
|
embellished_at: string | null;
|
|
4467
4470
|
polished_at: string | null;
|
|
4468
|
-
id?: string | undefined;
|
|
4469
4471
|
url?: string | null | undefined;
|
|
4470
|
-
width?: number | undefined;
|
|
4471
|
-
height?: number | undefined;
|
|
4472
4472
|
metadata?: unknown;
|
|
4473
4473
|
background?: unknown;
|
|
4474
4474
|
}>;
|
|
4475
4475
|
type SpreadServer = z.infer<typeof spreadServerSchema>;
|
|
4476
4476
|
declare const spreadSchema: z.ZodObject<{
|
|
4477
|
-
id: z.
|
|
4477
|
+
id: z.ZodString;
|
|
4478
4478
|
bookId: z.ZodString;
|
|
4479
4479
|
state: z.ZodString;
|
|
4480
4480
|
spreadType: z.ZodString;
|
|
4481
|
-
width: z.
|
|
4482
|
-
height: z.
|
|
4481
|
+
width: z.ZodNumber;
|
|
4482
|
+
height: z.ZodNumber;
|
|
4483
4483
|
sequence: z.ZodNumber;
|
|
4484
4484
|
wells: z.ZodArray<z.ZodUnknown, "many">;
|
|
4485
4485
|
background: z.ZodUnknown;
|
|
@@ -4489,7 +4489,10 @@ declare const spreadSchema: z.ZodObject<{
|
|
|
4489
4489
|
metadata: z.ZodUnknown;
|
|
4490
4490
|
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4491
4491
|
}, "strip", z.ZodTypeAny, {
|
|
4492
|
+
id: string;
|
|
4492
4493
|
state: string;
|
|
4494
|
+
width: number;
|
|
4495
|
+
height: number;
|
|
4493
4496
|
sequence: number;
|
|
4494
4497
|
wells: unknown[];
|
|
4495
4498
|
bookId: string;
|
|
@@ -4497,14 +4500,14 @@ declare const spreadSchema: z.ZodObject<{
|
|
|
4497
4500
|
laidOutAt: string | null;
|
|
4498
4501
|
embellishedAt: string | null;
|
|
4499
4502
|
polishedAt: string | null;
|
|
4500
|
-
id?: string | undefined;
|
|
4501
4503
|
url?: string | null | undefined;
|
|
4502
|
-
width?: number | undefined;
|
|
4503
|
-
height?: number | undefined;
|
|
4504
4504
|
metadata?: unknown;
|
|
4505
4505
|
background?: unknown;
|
|
4506
4506
|
}, {
|
|
4507
|
+
id: string;
|
|
4507
4508
|
state: string;
|
|
4509
|
+
width: number;
|
|
4510
|
+
height: number;
|
|
4508
4511
|
sequence: number;
|
|
4509
4512
|
wells: unknown[];
|
|
4510
4513
|
bookId: string;
|
|
@@ -4512,10 +4515,7 @@ declare const spreadSchema: z.ZodObject<{
|
|
|
4512
4515
|
laidOutAt: string | null;
|
|
4513
4516
|
embellishedAt: string | null;
|
|
4514
4517
|
polishedAt: string | null;
|
|
4515
|
-
id?: string | undefined;
|
|
4516
4518
|
url?: string | null | undefined;
|
|
4517
|
-
width?: number | undefined;
|
|
4518
|
-
height?: number | undefined;
|
|
4519
4519
|
metadata?: unknown;
|
|
4520
4520
|
background?: unknown;
|
|
4521
4521
|
}>;
|
|
@@ -4525,7 +4525,10 @@ declare class SpreadsEndpoints {
|
|
|
4525
4525
|
private readonly engineAPI;
|
|
4526
4526
|
constructor(engineAPI: EngineAPI);
|
|
4527
4527
|
list(bookId: string): Promise<{
|
|
4528
|
+
id: string;
|
|
4528
4529
|
state: string;
|
|
4530
|
+
width: number;
|
|
4531
|
+
height: number;
|
|
4529
4532
|
book_id: string;
|
|
4530
4533
|
spread_type: string;
|
|
4531
4534
|
sequence: number;
|
|
@@ -4533,15 +4536,15 @@ declare class SpreadsEndpoints {
|
|
|
4533
4536
|
laid_out_at: string | null;
|
|
4534
4537
|
embellished_at: string | null;
|
|
4535
4538
|
polished_at: string | null;
|
|
4536
|
-
id?: string | undefined;
|
|
4537
4539
|
url?: string | null | undefined;
|
|
4538
|
-
width?: number | undefined;
|
|
4539
|
-
height?: number | undefined;
|
|
4540
4540
|
metadata?: unknown;
|
|
4541
4541
|
background?: unknown;
|
|
4542
4542
|
}[]>;
|
|
4543
|
-
create(bookId: string, spread: SpreadServer): Promise<{
|
|
4543
|
+
create(bookId: string, spread: Partial<SpreadServer>): Promise<{
|
|
4544
|
+
id: string;
|
|
4544
4545
|
state: string;
|
|
4546
|
+
width: number;
|
|
4547
|
+
height: number;
|
|
4545
4548
|
book_id: string;
|
|
4546
4549
|
spread_type: string;
|
|
4547
4550
|
sequence: number;
|
|
@@ -4549,15 +4552,15 @@ declare class SpreadsEndpoints {
|
|
|
4549
4552
|
laid_out_at: string | null;
|
|
4550
4553
|
embellished_at: string | null;
|
|
4551
4554
|
polished_at: string | null;
|
|
4552
|
-
id?: string | undefined;
|
|
4553
4555
|
url?: string | null | undefined;
|
|
4554
|
-
width?: number | undefined;
|
|
4555
|
-
height?: number | undefined;
|
|
4556
4556
|
metadata?: unknown;
|
|
4557
4557
|
background?: unknown;
|
|
4558
4558
|
}>;
|
|
4559
4559
|
retrieve(spreadId: string, bookId: string): Promise<{
|
|
4560
|
+
id: string;
|
|
4560
4561
|
state: string;
|
|
4562
|
+
width: number;
|
|
4563
|
+
height: number;
|
|
4561
4564
|
book_id: string;
|
|
4562
4565
|
spread_type: string;
|
|
4563
4566
|
sequence: number;
|
|
@@ -4565,16 +4568,16 @@ declare class SpreadsEndpoints {
|
|
|
4565
4568
|
laid_out_at: string | null;
|
|
4566
4569
|
embellished_at: string | null;
|
|
4567
4570
|
polished_at: string | null;
|
|
4568
|
-
id?: string | undefined;
|
|
4569
4571
|
url?: string | null | undefined;
|
|
4570
|
-
width?: number | undefined;
|
|
4571
|
-
height?: number | undefined;
|
|
4572
4572
|
metadata?: unknown;
|
|
4573
4573
|
background?: unknown;
|
|
4574
4574
|
}>;
|
|
4575
4575
|
render(spreadId: string, bookId: string, size?: number): Promise<any>;
|
|
4576
|
-
update(spreadId: string, bookId: string, spread: SpreadServer): Promise<{
|
|
4576
|
+
update(spreadId: string, bookId: string, spread: Partial<SpreadServer>): Promise<{
|
|
4577
|
+
id: string;
|
|
4577
4578
|
state: string;
|
|
4579
|
+
width: number;
|
|
4580
|
+
height: number;
|
|
4578
4581
|
book_id: string;
|
|
4579
4582
|
spread_type: string;
|
|
4580
4583
|
sequence: number;
|
|
@@ -4582,10 +4585,7 @@ declare class SpreadsEndpoints {
|
|
|
4582
4585
|
laid_out_at: string | null;
|
|
4583
4586
|
embellished_at: string | null;
|
|
4584
4587
|
polished_at: string | null;
|
|
4585
|
-
id?: string | undefined;
|
|
4586
4588
|
url?: string | null | undefined;
|
|
4587
|
-
width?: number | undefined;
|
|
4588
|
-
height?: number | undefined;
|
|
4589
4589
|
metadata?: unknown;
|
|
4590
4590
|
background?: unknown;
|
|
4591
4591
|
}>;
|
package/index.d.ts
CHANGED
|
@@ -4427,12 +4427,12 @@ declare class ImagesEndpoints {
|
|
|
4427
4427
|
}
|
|
4428
4428
|
|
|
4429
4429
|
declare const spreadServerSchema: z.ZodObject<{
|
|
4430
|
-
id: z.
|
|
4430
|
+
id: z.ZodString;
|
|
4431
4431
|
book_id: z.ZodString;
|
|
4432
4432
|
state: z.ZodString;
|
|
4433
4433
|
spread_type: z.ZodString;
|
|
4434
|
-
width: z.
|
|
4435
|
-
height: z.
|
|
4434
|
+
width: z.ZodNumber;
|
|
4435
|
+
height: z.ZodNumber;
|
|
4436
4436
|
sequence: z.ZodNumber;
|
|
4437
4437
|
wells: z.ZodArray<z.ZodUnknown, "many">;
|
|
4438
4438
|
background: z.ZodUnknown;
|
|
@@ -4442,7 +4442,10 @@ declare const spreadServerSchema: z.ZodObject<{
|
|
|
4442
4442
|
metadata: z.ZodUnknown;
|
|
4443
4443
|
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4444
4444
|
}, "strip", z.ZodTypeAny, {
|
|
4445
|
+
id: string;
|
|
4445
4446
|
state: string;
|
|
4447
|
+
width: number;
|
|
4448
|
+
height: number;
|
|
4446
4449
|
book_id: string;
|
|
4447
4450
|
spread_type: string;
|
|
4448
4451
|
sequence: number;
|
|
@@ -4450,14 +4453,14 @@ declare const spreadServerSchema: z.ZodObject<{
|
|
|
4450
4453
|
laid_out_at: string | null;
|
|
4451
4454
|
embellished_at: string | null;
|
|
4452
4455
|
polished_at: string | null;
|
|
4453
|
-
id?: string | undefined;
|
|
4454
4456
|
url?: string | null | undefined;
|
|
4455
|
-
width?: number | undefined;
|
|
4456
|
-
height?: number | undefined;
|
|
4457
4457
|
metadata?: unknown;
|
|
4458
4458
|
background?: unknown;
|
|
4459
4459
|
}, {
|
|
4460
|
+
id: string;
|
|
4460
4461
|
state: string;
|
|
4462
|
+
width: number;
|
|
4463
|
+
height: number;
|
|
4461
4464
|
book_id: string;
|
|
4462
4465
|
spread_type: string;
|
|
4463
4466
|
sequence: number;
|
|
@@ -4465,21 +4468,18 @@ declare const spreadServerSchema: z.ZodObject<{
|
|
|
4465
4468
|
laid_out_at: string | null;
|
|
4466
4469
|
embellished_at: string | null;
|
|
4467
4470
|
polished_at: string | null;
|
|
4468
|
-
id?: string | undefined;
|
|
4469
4471
|
url?: string | null | undefined;
|
|
4470
|
-
width?: number | undefined;
|
|
4471
|
-
height?: number | undefined;
|
|
4472
4472
|
metadata?: unknown;
|
|
4473
4473
|
background?: unknown;
|
|
4474
4474
|
}>;
|
|
4475
4475
|
type SpreadServer = z.infer<typeof spreadServerSchema>;
|
|
4476
4476
|
declare const spreadSchema: z.ZodObject<{
|
|
4477
|
-
id: z.
|
|
4477
|
+
id: z.ZodString;
|
|
4478
4478
|
bookId: z.ZodString;
|
|
4479
4479
|
state: z.ZodString;
|
|
4480
4480
|
spreadType: z.ZodString;
|
|
4481
|
-
width: z.
|
|
4482
|
-
height: z.
|
|
4481
|
+
width: z.ZodNumber;
|
|
4482
|
+
height: z.ZodNumber;
|
|
4483
4483
|
sequence: z.ZodNumber;
|
|
4484
4484
|
wells: z.ZodArray<z.ZodUnknown, "many">;
|
|
4485
4485
|
background: z.ZodUnknown;
|
|
@@ -4489,7 +4489,10 @@ declare const spreadSchema: z.ZodObject<{
|
|
|
4489
4489
|
metadata: z.ZodUnknown;
|
|
4490
4490
|
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4491
4491
|
}, "strip", z.ZodTypeAny, {
|
|
4492
|
+
id: string;
|
|
4492
4493
|
state: string;
|
|
4494
|
+
width: number;
|
|
4495
|
+
height: number;
|
|
4493
4496
|
sequence: number;
|
|
4494
4497
|
wells: unknown[];
|
|
4495
4498
|
bookId: string;
|
|
@@ -4497,14 +4500,14 @@ declare const spreadSchema: z.ZodObject<{
|
|
|
4497
4500
|
laidOutAt: string | null;
|
|
4498
4501
|
embellishedAt: string | null;
|
|
4499
4502
|
polishedAt: string | null;
|
|
4500
|
-
id?: string | undefined;
|
|
4501
4503
|
url?: string | null | undefined;
|
|
4502
|
-
width?: number | undefined;
|
|
4503
|
-
height?: number | undefined;
|
|
4504
4504
|
metadata?: unknown;
|
|
4505
4505
|
background?: unknown;
|
|
4506
4506
|
}, {
|
|
4507
|
+
id: string;
|
|
4507
4508
|
state: string;
|
|
4509
|
+
width: number;
|
|
4510
|
+
height: number;
|
|
4508
4511
|
sequence: number;
|
|
4509
4512
|
wells: unknown[];
|
|
4510
4513
|
bookId: string;
|
|
@@ -4512,10 +4515,7 @@ declare const spreadSchema: z.ZodObject<{
|
|
|
4512
4515
|
laidOutAt: string | null;
|
|
4513
4516
|
embellishedAt: string | null;
|
|
4514
4517
|
polishedAt: string | null;
|
|
4515
|
-
id?: string | undefined;
|
|
4516
4518
|
url?: string | null | undefined;
|
|
4517
|
-
width?: number | undefined;
|
|
4518
|
-
height?: number | undefined;
|
|
4519
4519
|
metadata?: unknown;
|
|
4520
4520
|
background?: unknown;
|
|
4521
4521
|
}>;
|
|
@@ -4525,7 +4525,10 @@ declare class SpreadsEndpoints {
|
|
|
4525
4525
|
private readonly engineAPI;
|
|
4526
4526
|
constructor(engineAPI: EngineAPI);
|
|
4527
4527
|
list(bookId: string): Promise<{
|
|
4528
|
+
id: string;
|
|
4528
4529
|
state: string;
|
|
4530
|
+
width: number;
|
|
4531
|
+
height: number;
|
|
4529
4532
|
book_id: string;
|
|
4530
4533
|
spread_type: string;
|
|
4531
4534
|
sequence: number;
|
|
@@ -4533,15 +4536,15 @@ declare class SpreadsEndpoints {
|
|
|
4533
4536
|
laid_out_at: string | null;
|
|
4534
4537
|
embellished_at: string | null;
|
|
4535
4538
|
polished_at: string | null;
|
|
4536
|
-
id?: string | undefined;
|
|
4537
4539
|
url?: string | null | undefined;
|
|
4538
|
-
width?: number | undefined;
|
|
4539
|
-
height?: number | undefined;
|
|
4540
4540
|
metadata?: unknown;
|
|
4541
4541
|
background?: unknown;
|
|
4542
4542
|
}[]>;
|
|
4543
|
-
create(bookId: string, spread: SpreadServer): Promise<{
|
|
4543
|
+
create(bookId: string, spread: Partial<SpreadServer>): Promise<{
|
|
4544
|
+
id: string;
|
|
4544
4545
|
state: string;
|
|
4546
|
+
width: number;
|
|
4547
|
+
height: number;
|
|
4545
4548
|
book_id: string;
|
|
4546
4549
|
spread_type: string;
|
|
4547
4550
|
sequence: number;
|
|
@@ -4549,15 +4552,15 @@ declare class SpreadsEndpoints {
|
|
|
4549
4552
|
laid_out_at: string | null;
|
|
4550
4553
|
embellished_at: string | null;
|
|
4551
4554
|
polished_at: string | null;
|
|
4552
|
-
id?: string | undefined;
|
|
4553
4555
|
url?: string | null | undefined;
|
|
4554
|
-
width?: number | undefined;
|
|
4555
|
-
height?: number | undefined;
|
|
4556
4556
|
metadata?: unknown;
|
|
4557
4557
|
background?: unknown;
|
|
4558
4558
|
}>;
|
|
4559
4559
|
retrieve(spreadId: string, bookId: string): Promise<{
|
|
4560
|
+
id: string;
|
|
4560
4561
|
state: string;
|
|
4562
|
+
width: number;
|
|
4563
|
+
height: number;
|
|
4561
4564
|
book_id: string;
|
|
4562
4565
|
spread_type: string;
|
|
4563
4566
|
sequence: number;
|
|
@@ -4565,16 +4568,16 @@ declare class SpreadsEndpoints {
|
|
|
4565
4568
|
laid_out_at: string | null;
|
|
4566
4569
|
embellished_at: string | null;
|
|
4567
4570
|
polished_at: string | null;
|
|
4568
|
-
id?: string | undefined;
|
|
4569
4571
|
url?: string | null | undefined;
|
|
4570
|
-
width?: number | undefined;
|
|
4571
|
-
height?: number | undefined;
|
|
4572
4572
|
metadata?: unknown;
|
|
4573
4573
|
background?: unknown;
|
|
4574
4574
|
}>;
|
|
4575
4575
|
render(spreadId: string, bookId: string, size?: number): Promise<any>;
|
|
4576
|
-
update(spreadId: string, bookId: string, spread: SpreadServer): Promise<{
|
|
4576
|
+
update(spreadId: string, bookId: string, spread: Partial<SpreadServer>): Promise<{
|
|
4577
|
+
id: string;
|
|
4577
4578
|
state: string;
|
|
4579
|
+
width: number;
|
|
4580
|
+
height: number;
|
|
4578
4581
|
book_id: string;
|
|
4579
4582
|
spread_type: string;
|
|
4580
4583
|
sequence: number;
|
|
@@ -4582,10 +4585,7 @@ declare class SpreadsEndpoints {
|
|
|
4582
4585
|
laid_out_at: string | null;
|
|
4583
4586
|
embellished_at: string | null;
|
|
4584
4587
|
polished_at: string | null;
|
|
4585
|
-
id?: string | undefined;
|
|
4586
4588
|
url?: string | null | undefined;
|
|
4587
|
-
width?: number | undefined;
|
|
4588
|
-
height?: number | undefined;
|
|
4589
4589
|
metadata?: unknown;
|
|
4590
4590
|
background?: unknown;
|
|
4591
4591
|
}>;
|
package/index.iife.js
CHANGED
|
@@ -6239,7 +6239,7 @@ var MagicLabs = (() => {
|
|
|
6239
6239
|
const res = await fetch(this.cleanUrl(new URL(props.path, this.baseUrl).href), options);
|
|
6240
6240
|
if (res.status >= 200 && res.status < 300) {
|
|
6241
6241
|
try {
|
|
6242
|
-
return await res.json();
|
|
6242
|
+
return await res.clone().json();
|
|
6243
6243
|
} catch (error) {
|
|
6244
6244
|
try {
|
|
6245
6245
|
return await res.text();
|
|
@@ -6321,12 +6321,12 @@ var MagicLabs = (() => {
|
|
|
6321
6321
|
}
|
|
6322
6322
|
};
|
|
6323
6323
|
var spreadServerSchema = z.object({
|
|
6324
|
-
id: z.string()
|
|
6324
|
+
id: z.string(),
|
|
6325
6325
|
book_id: z.string(),
|
|
6326
6326
|
state: z.string(),
|
|
6327
6327
|
spread_type: z.string(),
|
|
6328
|
-
width: z.number()
|
|
6329
|
-
height: z.number()
|
|
6328
|
+
width: z.number(),
|
|
6329
|
+
height: z.number(),
|
|
6330
6330
|
sequence: z.number(),
|
|
6331
6331
|
wells: z.array(z.unknown()),
|
|
6332
6332
|
background: z.unknown(),
|
|
@@ -6337,12 +6337,12 @@ var MagicLabs = (() => {
|
|
|
6337
6337
|
url: z.string().nullable().optional()
|
|
6338
6338
|
});
|
|
6339
6339
|
var spreadSchema = z.object({
|
|
6340
|
-
id: z.string()
|
|
6340
|
+
id: z.string(),
|
|
6341
6341
|
bookId: z.string(),
|
|
6342
6342
|
state: z.string(),
|
|
6343
6343
|
spreadType: z.string(),
|
|
6344
|
-
width: z.number()
|
|
6345
|
-
height: z.number()
|
|
6344
|
+
width: z.number(),
|
|
6345
|
+
height: z.number(),
|
|
6346
6346
|
sequence: z.number(),
|
|
6347
6347
|
wells: z.array(z.unknown()),
|
|
6348
6348
|
background: z.unknown(),
|