@magiclabs.ai/magicbook-client 0.7.23-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 CHANGED
@@ -6263,9 +6263,13 @@ var Fetcher = class {
6263
6263
  const res = await fetch(this.cleanUrl(new URL(props.path, this.baseUrl).href), options);
6264
6264
  if (res.status >= 200 && res.status < 300) {
6265
6265
  try {
6266
- return await res.json();
6266
+ return await res.clone().json();
6267
6267
  } catch (error) {
6268
- return {};
6268
+ try {
6269
+ return await res.text();
6270
+ } catch (e) {
6271
+ return {};
6272
+ }
6269
6273
  }
6270
6274
  } else {
6271
6275
  let detail = res.statusText;
@@ -6345,12 +6349,12 @@ var ImagesEndpoints = class {
6345
6349
 
6346
6350
  // ../../core/models/spread.ts
6347
6351
  var spreadServerSchema = z.object({
6348
- id: z.string().optional(),
6352
+ id: z.string(),
6349
6353
  book_id: z.string(),
6350
6354
  state: z.string(),
6351
6355
  spread_type: z.string(),
6352
- width: z.number().optional(),
6353
- height: z.number().optional(),
6356
+ width: z.number(),
6357
+ height: z.number(),
6354
6358
  sequence: z.number(),
6355
6359
  wells: z.array(z.unknown()),
6356
6360
  background: z.unknown(),
@@ -6361,12 +6365,12 @@ var spreadServerSchema = z.object({
6361
6365
  url: z.string().nullable().optional()
6362
6366
  });
6363
6367
  var spreadSchema = z.object({
6364
- id: z.string().optional(),
6368
+ id: z.string(),
6365
6369
  bookId: z.string(),
6366
6370
  state: z.string(),
6367
6371
  spreadType: z.string(),
6368
- width: z.number().optional(),
6369
- height: z.number().optional(),
6372
+ width: z.number(),
6373
+ height: z.number(),
6370
6374
  sequence: z.number(),
6371
6375
  wells: z.array(z.unknown()),
6372
6376
  background: z.unknown(),