@voyantjs/suppliers 0.4.5 → 0.6.0

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/routes.d.ts CHANGED
@@ -14,7 +14,7 @@ export declare const supplierRoutes: import("hono/hono-base").HonoBase<Env, {
14
14
  id: string;
15
15
  name: string;
16
16
  type: "other" | "hotel" | "restaurant" | "transfer" | "guide" | "experience" | "airline";
17
- status: "active" | "inactive" | "pending";
17
+ status: "pending" | "active" | "inactive";
18
18
  description: string | null;
19
19
  defaultCurrency: string | null;
20
20
  paymentTermsDays: number | null;
@@ -64,7 +64,7 @@ export declare const supplierRoutes: import("hono/hono-base").HonoBase<Env, {
64
64
  id: string;
65
65
  entityType: string;
66
66
  entityId: string;
67
- kind: "email" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social" | "other";
67
+ kind: "email" | "other" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social";
68
68
  label: string | null;
69
69
  value: string;
70
70
  normalizedValue: string | null;
@@ -105,7 +105,7 @@ export declare const supplierRoutes: import("hono/hono-base").HonoBase<Env, {
105
105
  id: string;
106
106
  entityType: string;
107
107
  entityId: string;
108
- role: "other" | "primary" | "legal" | "general" | "reservations" | "operations" | "front_desk" | "sales" | "emergency" | "accounting";
108
+ role: "primary" | "other" | "legal" | "general" | "reservations" | "operations" | "front_desk" | "sales" | "emergency" | "accounting";
109
109
  name: string;
110
110
  title: string | null;
111
111
  email: string | null;
@@ -199,7 +199,7 @@ export declare const supplierRoutes: import("hono/hono-base").HonoBase<Env, {
199
199
  id: string;
200
200
  entityType: string;
201
201
  entityId: string;
202
- label: "other" | "primary" | "billing" | "shipping" | "mailing" | "meeting" | "service" | "legal";
202
+ label: "service" | "primary" | "other" | "billing" | "shipping" | "mailing" | "meeting" | "legal";
203
203
  fullText: string | null;
204
204
  line1: string | null;
205
205
  line2: string | null;
@@ -273,7 +273,7 @@ export declare const supplierRoutes: import("hono/hono-base").HonoBase<Env, {
273
273
  id: string;
274
274
  name: string;
275
275
  type: "other" | "hotel" | "restaurant" | "transfer" | "guide" | "experience" | "airline";
276
- status: "active" | "inactive" | "pending";
276
+ status: "pending" | "active" | "inactive";
277
277
  description: string | null;
278
278
  defaultCurrency: string | null;
279
279
  paymentTermsDays: number | null;
@@ -311,12 +311,12 @@ export declare const supplierRoutes: import("hono/hono-base").HonoBase<Env, {
311
311
  contactName: string | null;
312
312
  contactEmail: string | null;
313
313
  contactPhone: string | null;
314
- name: string;
315
- type: "other" | "hotel" | "restaurant" | "transfer" | "guide" | "experience" | "airline";
316
314
  id: string;
315
+ name: string;
317
316
  createdAt: string;
318
317
  updatedAt: string;
319
- status: "active" | "inactive" | "pending";
318
+ status: "pending" | "active" | "inactive";
319
+ type: "other" | "hotel" | "restaurant" | "transfer" | "guide" | "experience" | "airline";
320
320
  description: string | null;
321
321
  tags: string[] | null;
322
322
  defaultCurrency: string | null;
@@ -361,7 +361,7 @@ export declare const supplierRoutes: import("hono/hono-base").HonoBase<Env, {
361
361
  id: string;
362
362
  name: string;
363
363
  type: "other" | "hotel" | "restaurant" | "transfer" | "guide" | "experience" | "airline";
364
- status: "active" | "inactive" | "pending";
364
+ status: "pending" | "active" | "inactive";
365
365
  description: string | null;
366
366
  defaultCurrency: string | null;
367
367
  paymentTermsDays: number | null;
@@ -414,7 +414,7 @@ export declare const supplierRoutes: import("hono/hono-base").HonoBase<Env, {
414
414
  id: string;
415
415
  entityType: string;
416
416
  entityId: string;
417
- kind: "email" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social" | "other";
417
+ kind: "email" | "other" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social";
418
418
  label: string | null;
419
419
  value: string;
420
420
  normalizedValue: string | null;
@@ -453,19 +453,19 @@ export declare const supplierRoutes: import("hono/hono-base").HonoBase<Env, {
453
453
  output: {
454
454
  data: {
455
455
  value: string;
456
- kind: "email" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social" | "other";
457
- entityType: string;
458
- entityId: string;
459
- label: string | null;
460
- normalizedValue: string | null;
461
- isPrimary: boolean;
462
- notes: string | null;
463
456
  metadata: {
464
457
  [x: string]: import("hono/utils/types").JSONValue;
465
458
  } | null;
466
459
  id: string;
467
460
  createdAt: string;
468
461
  updatedAt: string;
462
+ notes: string | null;
463
+ kind: "email" | "other" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social";
464
+ entityType: string;
465
+ entityId: string;
466
+ label: string | null;
467
+ normalizedValue: string | null;
468
+ isPrimary: boolean;
469
469
  };
470
470
  };
471
471
  outputFormat: "json";
@@ -485,7 +485,7 @@ export declare const supplierRoutes: import("hono/hono-base").HonoBase<Env, {
485
485
  id: string;
486
486
  entityType: string;
487
487
  entityId: string;
488
- role: "other" | "primary" | "legal" | "general" | "reservations" | "operations" | "front_desk" | "sales" | "emergency" | "accounting";
488
+ role: "primary" | "other" | "legal" | "general" | "reservations" | "operations" | "front_desk" | "sales" | "emergency" | "accounting";
489
489
  name: string;
490
490
  title: string | null;
491
491
  email: string | null;
@@ -524,21 +524,21 @@ export declare const supplierRoutes: import("hono/hono-base").HonoBase<Env, {
524
524
  };
525
525
  output: {
526
526
  data: {
527
+ metadata: {
528
+ [x: string]: import("hono/utils/types").JSONValue;
529
+ } | null;
530
+ id: string;
527
531
  name: string;
532
+ createdAt: string;
533
+ updatedAt: string;
528
534
  email: string | null;
535
+ role: "primary" | "other" | "legal" | "general" | "reservations" | "operations" | "front_desk" | "sales" | "emergency" | "accounting";
536
+ notes: string | null;
529
537
  phone: string | null;
530
538
  entityType: string;
531
539
  entityId: string;
532
540
  isPrimary: boolean;
533
- notes: string | null;
534
- metadata: {
535
- [x: string]: import("hono/utils/types").JSONValue;
536
- } | null;
537
- role: "other" | "primary" | "legal" | "general" | "reservations" | "operations" | "front_desk" | "sales" | "emergency" | "accounting";
538
541
  title: string | null;
539
- id: string;
540
- createdAt: string;
541
- updatedAt: string;
542
542
  };
543
543
  };
544
544
  outputFormat: "json";
@@ -558,7 +558,7 @@ export declare const supplierRoutes: import("hono/hono-base").HonoBase<Env, {
558
558
  id: string;
559
559
  entityType: string;
560
560
  entityId: string;
561
- label: "other" | "primary" | "billing" | "shipping" | "mailing" | "meeting" | "service" | "legal";
561
+ label: "service" | "primary" | "other" | "billing" | "shipping" | "mailing" | "meeting" | "legal";
562
562
  fullText: string | null;
563
563
  line1: string | null;
564
564
  line2: string | null;
@@ -603,14 +603,18 @@ export declare const supplierRoutes: import("hono/hono-base").HonoBase<Env, {
603
603
  };
604
604
  output: {
605
605
  data: {
606
- entityType: string;
607
- entityId: string;
608
- label: "other" | "primary" | "billing" | "shipping" | "mailing" | "meeting" | "service" | "legal";
609
- isPrimary: boolean;
610
- notes: string | null;
611
606
  metadata: {
612
607
  [x: string]: import("hono/utils/types").JSONValue;
613
608
  } | null;
609
+ id: string;
610
+ createdAt: string;
611
+ updatedAt: string;
612
+ notes: string | null;
613
+ timezone: string | null;
614
+ entityType: string;
615
+ entityId: string;
616
+ label: "service" | "primary" | "other" | "billing" | "shipping" | "mailing" | "meeting" | "legal";
617
+ isPrimary: boolean;
614
618
  fullText: string | null;
615
619
  line1: string | null;
616
620
  line2: string | null;
@@ -620,10 +624,6 @@ export declare const supplierRoutes: import("hono/hono-base").HonoBase<Env, {
620
624
  country: string | null;
621
625
  latitude: number | null;
622
626
  longitude: number | null;
623
- timezone: string | null;
624
- id: string;
625
- createdAt: string;
626
- updatedAt: string;
627
627
  };
628
628
  };
629
629
  outputFormat: "json";
@@ -679,13 +679,13 @@ export declare const supplierRoutes: import("hono/hono-base").HonoBase<Env, {
679
679
  };
680
680
  output: {
681
681
  data: {
682
- name: string;
683
682
  duration: string | null;
684
683
  id: string;
684
+ name: string;
685
685
  createdAt: string;
686
686
  updatedAt: string;
687
- active: boolean;
688
687
  description: string | null;
688
+ active: boolean;
689
689
  tags: string[] | null;
690
690
  facilityId: string | null;
691
691
  supplierId: string;
@@ -825,14 +825,14 @@ export declare const supplierRoutes: import("hono/hono-base").HonoBase<Env, {
825
825
  };
826
826
  output: {
827
827
  data: {
828
- name: string;
829
- notes: string | null;
830
828
  id: string;
829
+ name: string;
831
830
  createdAt: string;
831
+ currency: string;
832
+ notes: string | null;
832
833
  validFrom: string | null;
833
834
  validTo: string | null;
834
835
  serviceId: string;
835
- currency: string;
836
836
  amountCents: number;
837
837
  unit: "flat" | "per_person" | "per_group" | "per_night" | "per_vehicle";
838
838
  minPax: number | null;
@@ -948,17 +948,6 @@ export declare const supplierRoutes: import("hono/hono-base").HonoBase<Env, {
948
948
  } & {
949
949
  "/:id/notes": {
950
950
  $post: {
951
- input: {
952
- param: {
953
- id: string;
954
- };
955
- };
956
- output: {
957
- error: string;
958
- };
959
- outputFormat: "json";
960
- status: 400;
961
- } | {
962
951
  input: {
963
952
  param: {
964
953
  id: string;
@@ -1032,9 +1021,9 @@ export declare const supplierRoutes: import("hono/hono-base").HonoBase<Env, {
1032
1021
  output: {
1033
1022
  data: {
1034
1023
  date: string;
1035
- notes: string | null;
1036
1024
  id: string;
1037
1025
  createdAt: string;
1026
+ notes: string | null;
1038
1027
  supplierId: string;
1039
1028
  available: boolean;
1040
1029
  }[];
@@ -1060,7 +1049,7 @@ export declare const supplierRoutes: import("hono/hono-base").HonoBase<Env, {
1060
1049
  endDate: string | null;
1061
1050
  renewalDate: string | null;
1062
1051
  terms: string | null;
1063
- status: "active" | "pending" | "expired" | "terminated";
1052
+ status: "pending" | "active" | "expired" | "terminated";
1064
1053
  createdAt: string;
1065
1054
  updatedAt: string;
1066
1055
  }[];
@@ -1093,11 +1082,11 @@ export declare const supplierRoutes: import("hono/hono-base").HonoBase<Env, {
1093
1082
  id: string;
1094
1083
  createdAt: string;
1095
1084
  updatedAt: string;
1096
- status: "active" | "pending" | "expired" | "terminated";
1097
- supplierId: string;
1098
- agreementNumber: string | null;
1085
+ status: "pending" | "active" | "expired" | "terminated";
1099
1086
  startDate: string;
1100
1087
  endDate: string | null;
1088
+ supplierId: string;
1089
+ agreementNumber: string | null;
1101
1090
  renewalDate: string | null;
1102
1091
  terms: string | null;
1103
1092
  };
@@ -1138,7 +1127,7 @@ export declare const supplierRoutes: import("hono/hono-base").HonoBase<Env, {
1138
1127
  endDate: string | null;
1139
1128
  renewalDate: string | null;
1140
1129
  terms: string | null;
1141
- status: "active" | "pending" | "expired" | "terminated";
1130
+ status: "pending" | "active" | "expired" | "terminated";
1142
1131
  createdAt: string;
1143
1132
  updatedAt: string;
1144
1133
  };
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAmBjE,KAAK,GAAG,GAAG;IACT,SAAS,EAAE;QACT,EAAE,EAAE,kBAAkB,CAAA;QACtB,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,CAAA;CACF,CAAA;AAMD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCA0ZvB,CAAA;AAEJ,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAA"}
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAoBjE,KAAK,GAAG,GAAG;IACT,SAAS,EAAE;QACT,EAAE,EAAE,kBAAkB,CAAA;QACtB,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,CAAA;CACF,CAAA;AAMD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCAqZvB,CAAA;AAEJ,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAA"}
package/dist/routes.js CHANGED
@@ -1,5 +1,7 @@
1
+ import { parseJsonBody, parseQuery, requireUserId } from "@voyantjs/hono";
1
2
  import { insertAddressForEntitySchema, insertContactPointForEntitySchema, insertNamedContactForEntitySchema, updateAddressSchema as updateIdentityAddressSchema, updateContactPointSchema as updateIdentityContactPointSchema, updateNamedContactSchema as updateIdentityNamedContactSchema, } from "@voyantjs/identity/validation";
2
3
  import { Hono } from "hono";
4
+ import { z } from "zod";
3
5
  import { suppliersService } from "./service.js";
4
6
  import { availabilityQuerySchema, insertAvailabilitySchema, insertContractSchema, insertRateSchema, insertServiceSchema, insertSupplierNoteSchema, insertSupplierSchema, supplierListQuerySchema, updateContractSchema, updateRateSchema, updateServiceSchema, updateSupplierSchema, } from "./validation.js";
5
7
  // ==========================================================================
@@ -11,12 +13,12 @@ export const supplierRoutes = new Hono()
11
13
  // ========================================================================
12
14
  // GET / — List suppliers
13
15
  .get("/", async (c) => {
14
- const query = supplierListQuerySchema.parse(Object.fromEntries(new URL(c.req.url).searchParams));
16
+ const query = parseQuery(c, supplierListQuerySchema);
15
17
  return c.json(await suppliersService.listSuppliers(c.get("db"), query));
16
18
  })
17
19
  // PATCH /contact-points/:contactPointId — Update supplier contact point
18
20
  .patch("/contact-points/:contactPointId", async (c) => {
19
- const row = await suppliersService.updateContactPoint(c.get("db"), c.req.param("contactPointId"), updateIdentityContactPointSchema.parse(await c.req.json()));
21
+ const row = await suppliersService.updateContactPoint(c.get("db"), c.req.param("contactPointId"), await parseJsonBody(c, updateIdentityContactPointSchema));
20
22
  if (!row) {
21
23
  return c.json({ error: "Contact point not found" }, 404);
22
24
  }
@@ -24,7 +26,7 @@ export const supplierRoutes = new Hono()
24
26
  })
25
27
  // PATCH /contacts/:contactId — Update supplier named contact
26
28
  .patch("/contacts/:contactId", async (c) => {
27
- const row = await suppliersService.updateNamedContact(c.get("db"), c.req.param("contactId"), updateIdentityNamedContactSchema.parse(await c.req.json()));
29
+ const row = await suppliersService.updateNamedContact(c.get("db"), c.req.param("contactId"), await parseJsonBody(c, updateIdentityNamedContactSchema));
28
30
  if (!row) {
29
31
  return c.json({ error: "Contact not found" }, 404);
30
32
  }
@@ -48,7 +50,7 @@ export const supplierRoutes = new Hono()
48
50
  })
49
51
  // PATCH /addresses/:addressId — Update supplier address
50
52
  .patch("/addresses/:addressId", async (c) => {
51
- const row = await suppliersService.updateAddress(c.get("db"), c.req.param("addressId"), updateIdentityAddressSchema.parse(await c.req.json()));
53
+ const row = await suppliersService.updateAddress(c.get("db"), c.req.param("addressId"), await parseJsonBody(c, updateIdentityAddressSchema));
52
54
  if (!row) {
53
55
  return c.json({ error: "Address not found" }, 404);
54
56
  }
@@ -72,12 +74,12 @@ export const supplierRoutes = new Hono()
72
74
  })
73
75
  // POST / — Create supplier
74
76
  .post("/", async (c) => {
75
- const data = insertSupplierSchema.parse(await c.req.json());
77
+ const data = await parseJsonBody(c, insertSupplierSchema);
76
78
  return c.json({ data: await suppliersService.createSupplier(c.get("db"), data) }, 201);
77
79
  })
78
80
  // PATCH /:id — Update supplier
79
81
  .patch("/:id", async (c) => {
80
- const row = await suppliersService.updateSupplier(c.get("db"), c.req.param("id"), updateSupplierSchema.parse(await c.req.json()));
82
+ const row = await suppliersService.updateSupplier(c.get("db"), c.req.param("id"), await parseJsonBody(c, updateSupplierSchema));
81
83
  if (!row) {
82
84
  return c.json({ error: "Supplier not found" }, 404);
83
85
  }
@@ -99,7 +101,7 @@ export const supplierRoutes = new Hono()
99
101
  })
100
102
  // POST /:id/contact-points — Create shared contact point for a supplier
101
103
  .post("/:id/contact-points", async (c) => {
102
- const row = await suppliersService.createContactPoint(c.get("db"), c.req.param("id"), insertContactPointForEntitySchema.parse(await c.req.json()));
104
+ const row = await suppliersService.createContactPoint(c.get("db"), c.req.param("id"), await parseJsonBody(c, insertContactPointForEntitySchema));
103
105
  if (!row) {
104
106
  return c.json({ error: "Supplier not found" }, 404);
105
107
  }
@@ -113,7 +115,7 @@ export const supplierRoutes = new Hono()
113
115
  })
114
116
  // POST /:id/contacts — Create shared named contact for a supplier
115
117
  .post("/:id/contacts", async (c) => {
116
- const row = await suppliersService.createNamedContact(c.get("db"), c.req.param("id"), insertNamedContactForEntitySchema.parse(await c.req.json()));
118
+ const row = await suppliersService.createNamedContact(c.get("db"), c.req.param("id"), await parseJsonBody(c, insertNamedContactForEntitySchema));
117
119
  if (!row) {
118
120
  return c.json({ error: "Supplier not found" }, 404);
119
121
  }
@@ -125,7 +127,7 @@ export const supplierRoutes = new Hono()
125
127
  })
126
128
  // POST /:id/addresses — Create shared address for a supplier
127
129
  .post("/:id/addresses", async (c) => {
128
- const row = await suppliersService.createAddress(c.get("db"), c.req.param("id"), insertAddressForEntitySchema.parse(await c.req.json()));
130
+ const row = await suppliersService.createAddress(c.get("db"), c.req.param("id"), await parseJsonBody(c, insertAddressForEntitySchema));
129
131
  if (!row) {
130
132
  return c.json({ error: "Supplier not found" }, 404);
131
133
  }
@@ -140,7 +142,7 @@ export const supplierRoutes = new Hono()
140
142
  })
141
143
  // POST /:id/services — Add service to supplier
142
144
  .post("/:id/services", async (c) => {
143
- const row = await suppliersService.createService(c.get("db"), c.req.param("id"), insertServiceSchema.parse(await c.req.json()));
145
+ const row = await suppliersService.createService(c.get("db"), c.req.param("id"), await parseJsonBody(c, insertServiceSchema));
144
146
  if (!row) {
145
147
  return c.json({ error: "Supplier not found" }, 404);
146
148
  }
@@ -148,7 +150,7 @@ export const supplierRoutes = new Hono()
148
150
  })
149
151
  // PATCH /:id/services/:serviceId — Update service
150
152
  .patch("/:id/services/:serviceId", async (c) => {
151
- const row = await suppliersService.updateService(c.get("db"), c.req.param("serviceId"), updateServiceSchema.parse(await c.req.json()));
153
+ const row = await suppliersService.updateService(c.get("db"), c.req.param("serviceId"), await parseJsonBody(c, updateServiceSchema));
152
154
  if (!row) {
153
155
  return c.json({ error: "Service not found" }, 404);
154
156
  }
@@ -173,7 +175,7 @@ export const supplierRoutes = new Hono()
173
175
  })
174
176
  // POST /:id/services/:serviceId/rates — Add rate to service
175
177
  .post("/:id/services/:serviceId/rates", async (c) => {
176
- const row = await suppliersService.createRate(c.get("db"), c.req.param("serviceId"), insertRateSchema.parse(await c.req.json()));
178
+ const row = await suppliersService.createRate(c.get("db"), c.req.param("serviceId"), await parseJsonBody(c, insertRateSchema));
177
179
  if (!row) {
178
180
  return c.json({ error: "Service not found" }, 404);
179
181
  }
@@ -181,7 +183,7 @@ export const supplierRoutes = new Hono()
181
183
  })
182
184
  // PATCH /:id/services/:serviceId/rates/:rateId — Update rate
183
185
  .patch("/:id/services/:serviceId/rates/:rateId", async (c) => {
184
- const row = await suppliersService.updateRate(c.get("db"), c.req.param("rateId"), updateRateSchema.parse(await c.req.json()));
186
+ const row = await suppliersService.updateRate(c.get("db"), c.req.param("rateId"), await parseJsonBody(c, updateRateSchema));
185
187
  if (!row) {
186
188
  return c.json({ error: "Rate not found" }, 404);
187
189
  }
@@ -204,11 +206,8 @@ export const supplierRoutes = new Hono()
204
206
  })
205
207
  // POST /:id/notes — Add note to supplier
206
208
  .post("/:id/notes", async (c) => {
207
- const userId = c.get("userId");
208
- if (!userId) {
209
- return c.json({ error: "User ID required to create notes" }, 400);
210
- }
211
- const row = await suppliersService.createNote(c.get("db"), c.req.param("id"), userId, insertSupplierNoteSchema.parse(await c.req.json()));
209
+ const userId = requireUserId(c);
210
+ const row = await suppliersService.createNote(c.get("db"), c.req.param("id"), userId, await parseJsonBody(c, insertSupplierNoteSchema));
212
211
  if (!row) {
213
212
  return c.json({ error: "Supplier not found" }, 404);
214
213
  }
@@ -219,16 +218,16 @@ export const supplierRoutes = new Hono()
219
218
  // ========================================================================
220
219
  // GET /:id/availability — List availability entries
221
220
  .get("/:id/availability", async (c) => {
222
- const query = availabilityQuerySchema.parse(Object.fromEntries(new URL(c.req.url).searchParams));
221
+ const query = parseQuery(c, availabilityQuerySchema);
223
222
  return c.json({
224
223
  data: await suppliersService.listAvailability(c.get("db"), c.req.param("id"), query),
225
224
  });
226
225
  })
227
226
  // POST /:id/availability — Add availability entries (bulk)
228
227
  .post("/:id/availability", async (c) => {
229
- const body = await c.req.json();
228
+ const body = await parseJsonBody(c, z.union([z.array(insertAvailabilitySchema), insertAvailabilitySchema]));
230
229
  const entries = Array.isArray(body) ? body : [body];
231
- const row = await suppliersService.createAvailability(c.get("db"), c.req.param("id"), entries.map((entry) => insertAvailabilitySchema.parse(entry)));
230
+ const row = await suppliersService.createAvailability(c.get("db"), c.req.param("id"), entries);
232
231
  if (!row) {
233
232
  return c.json({ error: "Supplier not found" }, 404);
234
233
  }
@@ -243,7 +242,7 @@ export const supplierRoutes = new Hono()
243
242
  })
244
243
  // POST /:id/contracts — Create contract
245
244
  .post("/:id/contracts", async (c) => {
246
- const row = await suppliersService.createContract(c.get("db"), c.req.param("id"), insertContractSchema.parse(await c.req.json()));
245
+ const row = await suppliersService.createContract(c.get("db"), c.req.param("id"), await parseJsonBody(c, insertContractSchema));
247
246
  if (!row) {
248
247
  return c.json({ error: "Supplier not found" }, 404);
249
248
  }
@@ -251,7 +250,7 @@ export const supplierRoutes = new Hono()
251
250
  })
252
251
  // PATCH /:id/contracts/:contractId — Update contract
253
252
  .patch("/:id/contracts/:contractId", async (c) => {
254
- const row = await suppliersService.updateContract(c.get("db"), c.req.param("contractId"), updateContractSchema.parse(await c.req.json()));
253
+ const row = await suppliersService.updateContract(c.get("db"), c.req.param("contractId"), await parseJsonBody(c, updateContractSchema));
255
254
  if (!row) {
256
255
  return c.json({ error: "Contract not found" }, 404);
257
256
  }
package/dist/schema.d.ts CHANGED
@@ -63,7 +63,7 @@ export declare const suppliers: import("drizzle-orm/pg-core").PgTableWithColumns
63
63
  tableName: "suppliers";
64
64
  dataType: "string";
65
65
  columnType: "PgEnumColumn";
66
- data: "active" | "inactive" | "pending";
66
+ data: "pending" | "active" | "inactive";
67
67
  driverParam: string;
68
68
  notNull: true;
69
69
  hasDefault: true;
@@ -962,7 +962,7 @@ export declare const supplierContracts: import("drizzle-orm/pg-core").PgTableWit
962
962
  tableName: "supplier_contracts";
963
963
  dataType: "string";
964
964
  columnType: "PgEnumColumn";
965
- data: "active" | "pending" | "expired" | "terminated";
965
+ data: "pending" | "active" | "expired" | "terminated";
966
966
  driverParam: string;
967
967
  notNull: true;
968
968
  hasDefault: true;
@@ -5,7 +5,7 @@ export declare function listSuppliers(db: PostgresJsDatabase, query: SupplierLis
5
5
  id: string;
6
6
  name: string;
7
7
  type: "other" | "hotel" | "restaurant" | "transfer" | "guide" | "experience" | "airline";
8
- status: "active" | "inactive" | "pending";
8
+ status: "pending" | "active" | "inactive";
9
9
  description: string | null;
10
10
  defaultCurrency: string | null;
11
11
  paymentTermsDays: number | null;
@@ -22,7 +22,7 @@ export declare function getSupplierById(db: PostgresJsDatabase, id: string): Pro
22
22
  id: string;
23
23
  name: string;
24
24
  type: "other" | "hotel" | "restaurant" | "transfer" | "guide" | "experience" | "airline";
25
- status: "active" | "inactive" | "pending";
25
+ status: "pending" | "active" | "inactive";
26
26
  description: string | null;
27
27
  defaultCurrency: string | null;
28
28
  paymentTermsDays: number | null;
@@ -41,12 +41,12 @@ export declare function createSupplier(db: PostgresJsDatabase, data: CreateSuppl
41
41
  contactName: string | null;
42
42
  contactEmail: string | null;
43
43
  contactPhone: string | null;
44
- name: string;
45
- type: "other" | "hotel" | "restaurant" | "transfer" | "guide" | "experience" | "airline";
46
44
  id: string;
45
+ name: string;
47
46
  createdAt: Date;
48
47
  updatedAt: Date;
49
- status: "active" | "inactive" | "pending";
48
+ status: "pending" | "active" | "inactive";
49
+ type: "other" | "hotel" | "restaurant" | "transfer" | "guide" | "experience" | "airline";
50
50
  description: string | null;
51
51
  tags: string[] | null;
52
52
  defaultCurrency: string | null;
@@ -66,7 +66,7 @@ export declare function updateSupplier(db: PostgresJsDatabase, id: string, data:
66
66
  id: string;
67
67
  name: string;
68
68
  type: "other" | "hotel" | "restaurant" | "transfer" | "guide" | "experience" | "airline";
69
- status: "active" | "inactive" | "pending";
69
+ status: "pending" | "active" | "inactive";
70
70
  description: string | null;
71
71
  defaultCurrency: string | null;
72
72
  paymentTermsDays: number | null;
@@ -4,7 +4,7 @@ export declare function listContactPoints(db: PostgresJsDatabase, supplierId: st
4
4
  id: string;
5
5
  entityType: string;
6
6
  entityId: string;
7
- kind: "email" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social" | "other";
7
+ kind: "email" | "other" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social";
8
8
  label: string | null;
9
9
  value: string;
10
10
  normalizedValue: string | null;
@@ -18,7 +18,7 @@ export declare function listNamedContacts(db: PostgresJsDatabase, supplierId: st
18
18
  id: string;
19
19
  entityType: string;
20
20
  entityId: string;
21
- role: "other" | "primary" | "legal" | "general" | "reservations" | "operations" | "front_desk" | "sales" | "emergency" | "accounting";
21
+ role: "primary" | "other" | "legal" | "general" | "reservations" | "operations" | "front_desk" | "sales" | "emergency" | "accounting";
22
22
  name: string;
23
23
  title: string | null;
24
24
  email: string | null;
@@ -30,25 +30,25 @@ export declare function listNamedContacts(db: PostgresJsDatabase, supplierId: st
30
30
  updatedAt: Date;
31
31
  }[]>;
32
32
  export declare function createNamedContact(db: PostgresJsDatabase, supplierId: string, data: InsertNamedContactForEntity): Promise<{
33
+ metadata: Record<string, unknown> | null;
34
+ id: string;
33
35
  name: string;
36
+ createdAt: Date;
37
+ updatedAt: Date;
34
38
  email: string | null;
39
+ role: "primary" | "other" | "legal" | "general" | "reservations" | "operations" | "front_desk" | "sales" | "emergency" | "accounting";
40
+ notes: string | null;
35
41
  phone: string | null;
36
42
  entityType: string;
37
43
  entityId: string;
38
44
  isPrimary: boolean;
39
- notes: string | null;
40
- metadata: Record<string, unknown> | null;
41
- role: "other" | "primary" | "legal" | "general" | "reservations" | "operations" | "front_desk" | "sales" | "emergency" | "accounting";
42
45
  title: string | null;
43
- id: string;
44
- createdAt: Date;
45
- updatedAt: Date;
46
46
  } | null>;
47
47
  export declare function updateNamedContact(db: PostgresJsDatabase, contactId: string, data: UpdateIdentityNamedContact): Promise<{
48
48
  id: string;
49
49
  entityType: string;
50
50
  entityId: string;
51
- role: "other" | "primary" | "legal" | "general" | "reservations" | "operations" | "front_desk" | "sales" | "emergency" | "accounting";
51
+ role: "primary" | "other" | "legal" | "general" | "reservations" | "operations" | "front_desk" | "sales" | "emergency" | "accounting";
52
52
  name: string;
53
53
  title: string | null;
54
54
  email: string | null;
@@ -64,23 +64,23 @@ export declare function deleteNamedContact(db: PostgresJsDatabase, contactId: st
64
64
  } | null>;
65
65
  export declare function createContactPoint(db: PostgresJsDatabase, supplierId: string, data: InsertContactPointForEntity): Promise<{
66
66
  value: string;
67
- kind: "email" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social" | "other";
67
+ metadata: Record<string, unknown> | null;
68
+ id: string;
69
+ createdAt: Date;
70
+ updatedAt: Date;
71
+ notes: string | null;
72
+ kind: "email" | "other" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social";
68
73
  entityType: string;
69
74
  entityId: string;
70
75
  label: string | null;
71
76
  normalizedValue: string | null;
72
77
  isPrimary: boolean;
73
- notes: string | null;
74
- metadata: Record<string, unknown> | null;
75
- id: string;
76
- createdAt: Date;
77
- updatedAt: Date;
78
78
  } | null>;
79
79
  export declare function updateContactPoint(db: PostgresJsDatabase, contactPointId: string, data: UpdateIdentityContactPoint): Promise<{
80
80
  id: string;
81
81
  entityType: string;
82
82
  entityId: string;
83
- kind: "email" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social" | "other";
83
+ kind: "email" | "other" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social";
84
84
  label: string | null;
85
85
  value: string;
86
86
  normalizedValue: string | null;
@@ -97,7 +97,7 @@ export declare function listAddresses(db: PostgresJsDatabase, supplierId: string
97
97
  id: string;
98
98
  entityType: string;
99
99
  entityId: string;
100
- label: "other" | "primary" | "billing" | "shipping" | "mailing" | "meeting" | "service" | "legal";
100
+ label: "service" | "primary" | "other" | "billing" | "shipping" | "mailing" | "meeting" | "legal";
101
101
  fullText: string | null;
102
102
  line1: string | null;
103
103
  line2: string | null;
@@ -115,12 +115,16 @@ export declare function listAddresses(db: PostgresJsDatabase, supplierId: string
115
115
  updatedAt: Date;
116
116
  }[]>;
117
117
  export declare function createAddress(db: PostgresJsDatabase, supplierId: string, data: InsertAddressForEntity): Promise<{
118
+ metadata: Record<string, unknown> | null;
119
+ id: string;
120
+ createdAt: Date;
121
+ updatedAt: Date;
122
+ notes: string | null;
123
+ timezone: string | null;
118
124
  entityType: string;
119
125
  entityId: string;
120
- label: "other" | "primary" | "billing" | "shipping" | "mailing" | "meeting" | "service" | "legal";
126
+ label: "service" | "primary" | "other" | "billing" | "shipping" | "mailing" | "meeting" | "legal";
121
127
  isPrimary: boolean;
122
- notes: string | null;
123
- metadata: Record<string, unknown> | null;
124
128
  fullText: string | null;
125
129
  line1: string | null;
126
130
  line2: string | null;
@@ -130,16 +134,12 @@ export declare function createAddress(db: PostgresJsDatabase, supplierId: string
130
134
  country: string | null;
131
135
  latitude: number | null;
132
136
  longitude: number | null;
133
- timezone: string | null;
134
- id: string;
135
- createdAt: Date;
136
- updatedAt: Date;
137
137
  } | null>;
138
138
  export declare function updateAddress(db: PostgresJsDatabase, addressId: string, data: UpdateIdentityAddress): Promise<{
139
139
  id: string;
140
140
  entityType: string;
141
141
  entityId: string;
142
- label: "other" | "primary" | "billing" | "shipping" | "mailing" | "meeting" | "service" | "legal";
142
+ label: "service" | "primary" | "other" | "billing" | "shipping" | "mailing" | "meeting" | "legal";
143
143
  fullText: string | null;
144
144
  line1: string | null;
145
145
  line2: string | null;
@@ -429,13 +429,13 @@ export declare function listServices(db: PostgresJsDatabase, supplierId: string)
429
429
  }, {}, {}>;
430
430
  }>, "where" | "orderBy">;
431
431
  export declare function createService(db: PostgresJsDatabase, supplierId: string, data: CreateServiceInput): Promise<{
432
- name: string;
433
432
  duration: string | null;
434
433
  id: string;
434
+ name: string;
435
435
  createdAt: Date;
436
436
  updatedAt: Date;
437
- active: boolean;
438
437
  description: string | null;
438
+ active: boolean;
439
439
  tags: string[] | null;
440
440
  facilityId: string | null;
441
441
  supplierId: string;
@@ -884,14 +884,14 @@ export declare function listRates(db: PostgresJsDatabase, serviceId: string): Om
884
884
  }, {}, {}>;
885
885
  }>, "where" | "orderBy">;
886
886
  export declare function createRate(db: PostgresJsDatabase, serviceId: string, data: CreateRateInput): Promise<{
887
- name: string;
888
- notes: string | null;
889
887
  id: string;
888
+ name: string;
890
889
  createdAt: Date;
890
+ currency: string;
891
+ notes: string | null;
891
892
  validFrom: string | null;
892
893
  validTo: string | null;
893
894
  serviceId: string;
894
- currency: string;
895
895
  amountCents: number;
896
896
  unit: "flat" | "per_person" | "per_group" | "per_night" | "per_vehicle";
897
897
  minPax: number | null;
@@ -1110,9 +1110,9 @@ export declare function listAvailability(db: PostgresJsDatabase, supplierId: str
1110
1110
  }[]>;
1111
1111
  export declare function createAvailability(db: PostgresJsDatabase, supplierId: string, entries: CreateAvailabilityInput[]): Promise<{
1112
1112
  date: string;
1113
- notes: string | null;
1114
1113
  id: string;
1115
1114
  createdAt: Date;
1115
+ notes: string | null;
1116
1116
  supplierId: string;
1117
1117
  available: boolean;
1118
1118
  }[] | null>;
@@ -1241,7 +1241,7 @@ export declare function listContracts(db: PostgresJsDatabase, supplierId: string
1241
1241
  tableName: "supplier_contracts";
1242
1242
  dataType: "string";
1243
1243
  columnType: "PgEnumColumn";
1244
- data: "active" | "pending" | "expired" | "terminated";
1244
+ data: "pending" | "active" | "expired" | "terminated";
1245
1245
  driverParam: string;
1246
1246
  notNull: true;
1247
1247
  hasDefault: true;
@@ -1295,7 +1295,7 @@ export declare function listContracts(db: PostgresJsDatabase, supplierId: string
1295
1295
  endDate: string | null;
1296
1296
  renewalDate: string | null;
1297
1297
  terms: string | null;
1298
- status: "active" | "pending" | "expired" | "terminated";
1298
+ status: "pending" | "active" | "expired" | "terminated";
1299
1299
  createdAt: Date;
1300
1300
  updatedAt: Date;
1301
1301
  }[], {
@@ -1423,7 +1423,7 @@ export declare function listContracts(db: PostgresJsDatabase, supplierId: string
1423
1423
  tableName: "supplier_contracts";
1424
1424
  dataType: "string";
1425
1425
  columnType: "PgEnumColumn";
1426
- data: "active" | "pending" | "expired" | "terminated";
1426
+ data: "pending" | "active" | "expired" | "terminated";
1427
1427
  driverParam: string;
1428
1428
  notNull: true;
1429
1429
  hasDefault: true;
@@ -1474,11 +1474,11 @@ export declare function createContract(db: PostgresJsDatabase, supplierId: strin
1474
1474
  id: string;
1475
1475
  createdAt: Date;
1476
1476
  updatedAt: Date;
1477
- status: "active" | "pending" | "expired" | "terminated";
1478
- supplierId: string;
1479
- agreementNumber: string | null;
1477
+ status: "pending" | "active" | "expired" | "terminated";
1480
1478
  startDate: string;
1481
1479
  endDate: string | null;
1480
+ supplierId: string;
1481
+ agreementNumber: string | null;
1482
1482
  renewalDate: string | null;
1483
1483
  terms: string | null;
1484
1484
  } | null>;
@@ -1490,7 +1490,7 @@ export declare function updateContract(db: PostgresJsDatabase, contractId: strin
1490
1490
  endDate: string | null;
1491
1491
  renewalDate: string | null;
1492
1492
  terms: string | null;
1493
- status: "active" | "pending" | "expired" | "terminated";
1493
+ status: "pending" | "active" | "expired" | "terminated";
1494
1494
  createdAt: Date;
1495
1495
  updatedAt: Date;
1496
1496
  } | null>;
@@ -11,9 +11,9 @@ export declare const insertSupplierSchema: z.ZodObject<{
11
11
  airline: "airline";
12
12
  }>;
13
13
  status: z.ZodDefault<z.ZodEnum<{
14
+ pending: "pending";
14
15
  active: "active";
15
16
  inactive: "inactive";
16
- pending: "pending";
17
17
  }>>;
18
18
  description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
19
19
  email: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -42,9 +42,9 @@ export declare const updateSupplierSchema: z.ZodObject<{
42
42
  airline: "airline";
43
43
  }>>;
44
44
  status: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
45
+ pending: "pending";
45
46
  active: "active";
46
47
  inactive: "inactive";
47
- pending: "pending";
48
48
  }>>>;
49
49
  description: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
50
50
  email: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
@@ -73,9 +73,9 @@ export declare const selectSupplierSchema: z.ZodObject<{
73
73
  airline: "airline";
74
74
  }>;
75
75
  status: z.ZodDefault<z.ZodEnum<{
76
+ pending: "pending";
76
77
  active: "active";
77
78
  inactive: "inactive";
78
- pending: "pending";
79
79
  }>>;
80
80
  description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
81
81
  email: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -106,9 +106,9 @@ export declare const supplierListQuerySchema: z.ZodObject<{
106
106
  airline: "airline";
107
107
  }>>;
108
108
  status: z.ZodOptional<z.ZodEnum<{
109
+ pending: "pending";
109
110
  active: "active";
110
111
  inactive: "inactive";
111
- pending: "pending";
112
112
  }>>;
113
113
  primaryFacilityId: z.ZodOptional<z.ZodString>;
114
114
  search: z.ZodOptional<z.ZodString>;
@@ -209,8 +209,8 @@ export declare const insertContractSchema: z.ZodObject<{
209
209
  renewalDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
210
210
  terms: z.ZodNullable<z.ZodOptional<z.ZodString>>;
211
211
  status: z.ZodDefault<z.ZodEnum<{
212
- active: "active";
213
212
  pending: "pending";
213
+ active: "active";
214
214
  expired: "expired";
215
215
  terminated: "terminated";
216
216
  }>>;
@@ -222,8 +222,8 @@ export declare const updateContractSchema: z.ZodObject<{
222
222
  renewalDate: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
223
223
  terms: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
224
224
  status: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
225
- active: "active";
226
225
  pending: "pending";
226
+ active: "active";
227
227
  expired: "expired";
228
228
  terminated: "terminated";
229
229
  }>>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyantjs/suppliers",
3
- "version": "0.4.5",
3
+ "version": "0.6.0",
4
4
  "license": "FSL-1.1-Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -25,11 +25,11 @@
25
25
  "drizzle-orm": "^0.45.2",
26
26
  "hono": "^4.12.10",
27
27
  "zod": "^4.3.6",
28
- "@voyantjs/core": "0.4.5",
29
- "@voyantjs/db": "0.4.5",
30
- "@voyantjs/facilities": "0.4.5",
31
- "@voyantjs/hono": "0.4.5",
32
- "@voyantjs/identity": "0.4.5"
28
+ "@voyantjs/core": "0.6.0",
29
+ "@voyantjs/db": "0.6.0",
30
+ "@voyantjs/facilities": "0.6.0",
31
+ "@voyantjs/hono": "0.6.0",
32
+ "@voyantjs/identity": "0.6.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "typescript": "^6.0.2",