@moonbase.sh/api 0.1.116 → 0.1.118

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/dist/index.cjs CHANGED
@@ -83,7 +83,8 @@ var importCustomerRequestSchema = import_zod.z.object({
83
83
  email: import_zod.z.string(),
84
84
  externalId: import_zod.z.string().optional(),
85
85
  password: import_zod.z.string().optional(),
86
- address: addressSchema.optional()
86
+ address: addressSchema.optional(),
87
+ createdAt: import_zod.z.date().optional()
87
88
  });
88
89
 
89
90
  // src/licenses/schemas.ts
@@ -346,13 +347,13 @@ async function handleResponseProblem(response) {
346
347
  } catch (e) {
347
348
  throw new Error("An unknown problem occurred");
348
349
  }
349
- if (response.status === 404)
350
- throw new NotFoundError(problemDetails);
351
350
  if (response.status === 401)
352
351
  throw new NotAuthenticatedError(problemDetails);
353
352
  if (response.status === 403)
354
353
  throw new NotAuthorizedError(problemDetails);
355
354
  if (response.status === 404)
355
+ throw new NotFoundError(problemDetails);
356
+ if (response.status === 409)
356
357
  throw new ConflictError(problemDetails);
357
358
  throw new MoonbaseError(problemDetails);
358
359
  }
package/dist/index.d.cts CHANGED
@@ -518,6 +518,7 @@ declare const importCustomerRequestSchema: z.ZodObject<{
518
518
  region: string | null;
519
519
  postCode: string;
520
520
  }>>;
521
+ createdAt: z.ZodOptional<z.ZodDate>;
521
522
  }, "strip", z.ZodTypeAny, {
522
523
  name: string;
523
524
  email: string;
@@ -531,6 +532,7 @@ declare const importCustomerRequestSchema: z.ZodObject<{
531
532
  region: string | null;
532
533
  postCode: string;
533
534
  } | undefined;
535
+ createdAt?: Date | undefined;
534
536
  }, {
535
537
  name: string;
536
538
  email: string;
@@ -544,6 +546,7 @@ declare const importCustomerRequestSchema: z.ZodObject<{
544
546
  region: string | null;
545
547
  postCode: string;
546
548
  } | undefined;
549
+ createdAt?: Date | undefined;
547
550
  }>;
548
551
 
549
552
  type Customer = z.infer<typeof customerSchema>;
package/dist/index.d.ts CHANGED
@@ -518,6 +518,7 @@ declare const importCustomerRequestSchema: z.ZodObject<{
518
518
  region: string | null;
519
519
  postCode: string;
520
520
  }>>;
521
+ createdAt: z.ZodOptional<z.ZodDate>;
521
522
  }, "strip", z.ZodTypeAny, {
522
523
  name: string;
523
524
  email: string;
@@ -531,6 +532,7 @@ declare const importCustomerRequestSchema: z.ZodObject<{
531
532
  region: string | null;
532
533
  postCode: string;
533
534
  } | undefined;
535
+ createdAt?: Date | undefined;
534
536
  }, {
535
537
  name: string;
536
538
  email: string;
@@ -544,6 +546,7 @@ declare const importCustomerRequestSchema: z.ZodObject<{
544
546
  region: string | null;
545
547
  postCode: string;
546
548
  } | undefined;
549
+ createdAt?: Date | undefined;
547
550
  }>;
548
551
 
549
552
  type Customer = z.infer<typeof customerSchema>;
package/dist/index.js CHANGED
@@ -36,7 +36,8 @@ var importCustomerRequestSchema = z.object({
36
36
  email: z.string(),
37
37
  externalId: z.string().optional(),
38
38
  password: z.string().optional(),
39
- address: addressSchema.optional()
39
+ address: addressSchema.optional(),
40
+ createdAt: z.date().optional()
40
41
  });
41
42
 
42
43
  // src/licenses/schemas.ts
@@ -299,13 +300,13 @@ async function handleResponseProblem(response) {
299
300
  } catch (e) {
300
301
  throw new Error("An unknown problem occurred");
301
302
  }
302
- if (response.status === 404)
303
- throw new NotFoundError(problemDetails);
304
303
  if (response.status === 401)
305
304
  throw new NotAuthenticatedError(problemDetails);
306
305
  if (response.status === 403)
307
306
  throw new NotAuthorizedError(problemDetails);
308
307
  if (response.status === 404)
308
+ throw new NotFoundError(problemDetails);
309
+ if (response.status === 409)
309
310
  throw new ConflictError(problemDetails);
310
311
  throw new MoonbaseError(problemDetails);
311
312
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@moonbase.sh/api",
3
3
  "type": "module",
4
- "version": "0.1.116",
4
+ "version": "0.1.118",
5
5
  "description": "Package to let you integrate backends with Moonbase.sh as payment and delivery provider",
6
6
  "author": "Tobias Lønnerød Madsen <m@dsen.tv>",
7
7
  "license": "MIT",