@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.js CHANGED
@@ -6189,9 +6189,13 @@ var Fetcher = class {
6189
6189
  const res = await fetch(this.cleanUrl(new URL(props.path, this.baseUrl).href), options);
6190
6190
  if (res.status >= 200 && res.status < 300) {
6191
6191
  try {
6192
- return await res.json();
6192
+ return await res.clone().json();
6193
6193
  } catch (error) {
6194
- return {};
6194
+ try {
6195
+ return await res.text();
6196
+ } catch (e) {
6197
+ return {};
6198
+ }
6195
6199
  }
6196
6200
  } else {
6197
6201
  let detail = res.statusText;
@@ -6271,12 +6275,12 @@ var ImagesEndpoints = class {
6271
6275
 
6272
6276
  // ../../core/models/spread.ts
6273
6277
  var spreadServerSchema = z.object({
6274
- id: z.string().optional(),
6278
+ id: z.string(),
6275
6279
  book_id: z.string(),
6276
6280
  state: z.string(),
6277
6281
  spread_type: z.string(),
6278
- width: z.number().optional(),
6279
- height: z.number().optional(),
6282
+ width: z.number(),
6283
+ height: z.number(),
6280
6284
  sequence: z.number(),
6281
6285
  wells: z.array(z.unknown()),
6282
6286
  background: z.unknown(),
@@ -6287,12 +6291,12 @@ var spreadServerSchema = z.object({
6287
6291
  url: z.string().nullable().optional()
6288
6292
  });
6289
6293
  var spreadSchema = z.object({
6290
- id: z.string().optional(),
6294
+ id: z.string(),
6291
6295
  bookId: z.string(),
6292
6296
  state: z.string(),
6293
6297
  spreadType: z.string(),
6294
- width: z.number().optional(),
6295
- height: z.number().optional(),
6298
+ width: z.number(),
6299
+ height: z.number(),
6296
6300
  sequence: z.number(),
6297
6301
  wells: z.array(z.unknown()),
6298
6302
  background: z.unknown(),