@unifiedcommerce/core 0.3.4 → 0.4.1

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.
Files changed (33) hide show
  1. package/dist/interfaces/mcp/tools/webhooks.d.ts +1 -1
  2. package/dist/interfaces/rest/index.d.ts.map +1 -1
  3. package/dist/interfaces/rest/index.js +14 -3
  4. package/dist/interfaces/rest/routes/customers.d.ts +5 -0
  5. package/dist/interfaces/rest/routes/customers.d.ts.map +1 -0
  6. package/dist/interfaces/rest/routes/customers.js +74 -0
  7. package/dist/interfaces/rest/routes/inventory.d.ts.map +1 -1
  8. package/dist/interfaces/rest/routes/inventory.js +14 -1
  9. package/dist/interfaces/rest/schemas/customers.d.ts +422 -0
  10. package/dist/interfaces/rest/schemas/customers.d.ts.map +1 -0
  11. package/dist/interfaces/rest/schemas/customers.js +150 -0
  12. package/dist/interfaces/rest/schemas/inventory.d.ts +92 -0
  13. package/dist/interfaces/rest/schemas/inventory.d.ts.map +1 -1
  14. package/dist/interfaces/rest/schemas/inventory.js +20 -0
  15. package/dist/modules/customers/service.d.ts +2 -0
  16. package/dist/modules/customers/service.d.ts.map +1 -1
  17. package/dist/modules/customers/service.js +15 -0
  18. package/dist/modules/inventory/service.d.ts +4 -0
  19. package/dist/modules/inventory/service.d.ts.map +1 -1
  20. package/dist/modules/inventory/service.js +12 -0
  21. package/dist/runtime/server.d.ts.map +1 -1
  22. package/dist/runtime/server.js +29 -0
  23. package/package.json +2 -2
  24. package/src/config/types.ts +2 -0
  25. package/src/interfaces/rest/index.ts +50 -3
  26. package/src/interfaces/rest/routes/customers.ts +94 -0
  27. package/src/interfaces/rest/routes/entity-aliases.ts +346 -0
  28. package/src/interfaces/rest/routes/inventory.ts +17 -0
  29. package/src/interfaces/rest/schemas/customers.ts +155 -0
  30. package/src/interfaces/rest/schemas/inventory.ts +21 -0
  31. package/src/modules/customers/service.ts +25 -0
  32. package/src/modules/inventory/service.ts +17 -0
  33. package/src/runtime/server.ts +41 -0
@@ -2,8 +2,8 @@ import { z } from "zod";
2
2
  import type { ToolDefinition } from "./registry.js";
3
3
  export declare const webhooksManage: ToolDefinition<z.ZodObject<{
4
4
  action: z.ZodEnum<{
5
- delete: "delete";
6
5
  create: "create";
6
+ delete: "delete";
7
7
  list: "list";
8
8
  }>;
9
9
  url: z.ZodOptional<z.ZodString>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interfaces/rest/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAezC,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,gCAsD9C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interfaces/rest/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAgBzC,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,gCAmE9C"}
@@ -1,5 +1,5 @@
1
1
  import { OpenAPIHono } from "@hono/zod-openapi";
2
- import { swaggerUI } from "@hono/swagger-ui";
2
+ import { Scalar } from "@scalar/hono-api-reference";
3
3
  import { sql } from "drizzle-orm";
4
4
  import { catalogRoutes } from "./routes/catalog.js";
5
5
  import { inventoryRoutes } from "./routes/inventory.js";
@@ -14,6 +14,7 @@ import { promotionRoutes } from "./routes/promotions.js";
14
14
  import { searchRoutes } from "./routes/search.js";
15
15
  import { auditRoutes } from "./routes/audit.js";
16
16
  import { adminJobRoutes } from "./routes/admin-jobs.js";
17
+ import { customerRoutes } from "./routes/customers.js";
17
18
  export function createRestRoutes(kernel) {
18
19
  const router = new OpenAPIHono({
19
20
  // Standardize Zod validation error responses across all routes
@@ -57,12 +58,22 @@ export function createRestRoutes(kernel) {
57
58
  router.route("/pricing", pricingRoutes(kernel));
58
59
  router.route("/promotions", promotionRoutes(kernel));
59
60
  router.route("/search", searchRoutes(kernel));
61
+ router.route("/customers", customerRoutes(kernel));
60
62
  router.route("/audit", auditRoutes(kernel));
61
63
  router.route("/admin", adminJobRoutes(kernel));
62
- // Swagger UI — disabled in production unless config.exposeOpenApiSpec is true
64
+ // API Reference (Scalar) — disabled in production unless config.exposeOpenApiSpec is true
63
65
  const exposeSpec = kernel.config.exposeOpenApiSpec ?? (process.env.NODE_ENV !== "production");
64
66
  if (exposeSpec) {
65
- router.get("/reference", swaggerUI({ url: "/api/doc" }));
67
+ router.get("/reference", Scalar({
68
+ url: "/api/doc-ext",
69
+ theme: "kepler",
70
+ layout: "modern",
71
+ darkMode: true,
72
+ hideModels: true,
73
+ tagsSorter: "alpha",
74
+ defaultHttpClient: { targetKey: "js", clientKey: "fetch" },
75
+ metaData: { title: "UnifiedCommerce API Reference" },
76
+ }));
66
77
  }
67
78
  return router;
68
79
  }
@@ -0,0 +1,5 @@
1
+ import { OpenAPIHono } from "@hono/zod-openapi";
2
+ import type { Kernel } from "../../../runtime/kernel.js";
3
+ import { type AppEnv } from "../utils.js";
4
+ export declare function customerRoutes(kernel: Kernel): OpenAPIHono<AppEnv, {}, "/">;
5
+ //# sourceMappingURL=customers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customers.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/rest/routes/customers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAQzD,OAAO,EAAE,KAAK,MAAM,EAAyD,MAAM,aAAa,CAAC;AAEjG,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,gCAkF5C"}
@@ -0,0 +1,74 @@
1
+ import { OpenAPIHono } from "@hono/zod-openapi";
2
+ import { listCustomersRoute, getCustomerRoute, updateCustomerRoute, getCustomerOrdersRoute, getCustomerAddressesRoute, } from "../schemas/customers.js";
3
+ import { mapErrorToResponse, mapErrorToStatus, parsePagination } from "../utils.js";
4
+ export function customerRoutes(kernel) {
5
+ const router = new OpenAPIHono();
6
+ // @ts-expect-error -- openapi handler union return type
7
+ router.openapi(listCustomersRoute, async (c) => {
8
+ const actor = c.get("actor");
9
+ const { page, limit } = parsePagination(c.req.query());
10
+ const result = await kernel.services.customers.list(actor);
11
+ if (!result.ok)
12
+ return c.json(mapErrorToResponse(result.error), mapErrorToStatus(result.error));
13
+ const all = result.value;
14
+ const total = all.length;
15
+ const start = (page - 1) * limit;
16
+ const paged = all.slice(start, start + limit);
17
+ return c.json({
18
+ data: paged,
19
+ meta: {
20
+ pagination: { page, limit, total, totalPages: Math.ceil(total / limit) },
21
+ },
22
+ });
23
+ });
24
+ // @ts-expect-error -- openapi handler union return type
25
+ router.openapi(getCustomerRoute, async (c) => {
26
+ const { id } = c.req.valid("param");
27
+ const actor = c.get("actor");
28
+ const result = await kernel.services.customers.getById(id, actor);
29
+ if (!result.ok)
30
+ return c.json(mapErrorToResponse(result.error), mapErrorToStatus(result.error));
31
+ return c.json({ data: result.value });
32
+ });
33
+ // @ts-expect-error -- openapi handler union return type
34
+ router.openapi(updateCustomerRoute, async (c) => {
35
+ const { id } = c.req.valid("param");
36
+ const body = c.req.valid("json");
37
+ const actor = c.get("actor");
38
+ // Strip undefined values — exactOptionalPropertyTypes requires omission, not undefined
39
+ const updates = {};
40
+ for (const [k, v] of Object.entries(body)) {
41
+ if (v !== undefined)
42
+ updates[k] = v;
43
+ }
44
+ const result = await kernel.services.customers.update(id, updates, actor);
45
+ if (!result.ok)
46
+ return c.json(mapErrorToResponse(result.error), mapErrorToStatus(result.error));
47
+ return c.json({ data: result.value });
48
+ });
49
+ // @ts-expect-error -- openapi handler union return type
50
+ router.openapi(getCustomerOrdersRoute, async (c) => {
51
+ const { id } = c.req.valid("param");
52
+ const actor = c.get("actor");
53
+ const { page, limit } = parsePagination(c.req.query());
54
+ const status = c.req.query("status") || undefined;
55
+ const result = await kernel.services.orders.listByCustomer(id, { page, limit, ...(status ? { status } : {}) }, actor);
56
+ if (!result.ok)
57
+ return c.json(mapErrorToResponse(result.error), mapErrorToStatus(result.error));
58
+ return c.json({ data: result.value.items, meta: { pagination: result.value.pagination } });
59
+ });
60
+ // @ts-expect-error -- openapi handler union return type
61
+ router.openapi(getCustomerAddressesRoute, async (c) => {
62
+ const { id } = c.req.valid("param");
63
+ const actor = c.get("actor");
64
+ // Get customer first, then use their userId for address lookup
65
+ const customerResult = await kernel.services.customers.getById(id, actor);
66
+ if (!customerResult.ok)
67
+ return c.json(mapErrorToResponse(customerResult.error), mapErrorToStatus(customerResult.error));
68
+ const addressResult = await kernel.services.customers.getAddresses(customerResult.value.userId, actor);
69
+ if (!addressResult.ok)
70
+ return c.json(mapErrorToResponse(addressResult.error), mapErrorToStatus(addressResult.error));
71
+ return c.json({ data: addressResult.value });
72
+ });
73
+ return router;
74
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"inventory.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/rest/routes/inventory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AASzD,OAAO,EAAE,KAAK,MAAM,EAAwC,MAAM,aAAa,CAAC;AAEhF,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,gCAyD7C"}
1
+ {"version":3,"file":"inventory.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/rest/routes/inventory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAUzD,OAAO,EAAE,KAAK,MAAM,EAAwC,MAAM,aAAa,CAAC;AAEhF,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,gCAyE7C"}
@@ -1,9 +1,22 @@
1
1
  import { OpenAPIHono } from "@hono/zod-openapi";
2
- import { inventoryAdjustRoute, inventoryReserveRoute, inventoryReleaseRoute, createWarehouseRoute, inventoryCheckRoute, listWarehousesRoute, } from "../schemas/inventory.js";
2
+ import { inventoryAdjustRoute, inventoryReserveRoute, inventoryReleaseRoute, createWarehouseRoute, inventoryCheckRoute, listWarehousesRoute, listInventoryLevelsRoute, } from "../schemas/inventory.js";
3
3
  import { mapErrorToResponse, mapErrorToStatus } from "../utils.js";
4
4
  export function inventoryRoutes(kernel) {
5
5
  const router = new OpenAPIHono();
6
6
  // @ts-expect-error -- openapi handler union return type
7
+ router.openapi(listInventoryLevelsRoute, async (c) => {
8
+ const actor = c.get("actor");
9
+ const warehouseId = c.req.query("warehouseId");
10
+ const entityId = c.req.query("entityId");
11
+ const result = await kernel.services.inventory.listLevels({
12
+ ...(warehouseId ? { warehouseId } : {}),
13
+ ...(entityId ? { entityId } : {}),
14
+ }, actor);
15
+ if (!result.ok)
16
+ return c.json(mapErrorToResponse(result.error), mapErrorToStatus(result.error));
17
+ return c.json({ data: result.value });
18
+ });
19
+ // @ts-expect-error -- openapi handler union return type
7
20
  router.openapi(inventoryCheckRoute, async (c) => {
8
21
  const entityIds = (c.req.query("entityIds") ?? "")
9
22
  .split(",")
@@ -0,0 +1,422 @@
1
+ import { z } from "@hono/zod-openapi";
2
+ export declare const listCustomersRoute: {
3
+ method: "get";
4
+ path: "/";
5
+ tags: string[];
6
+ summary: string;
7
+ request: {
8
+ query: z.ZodObject<{
9
+ page: z.ZodOptional<z.ZodString>;
10
+ limit: z.ZodOptional<z.ZodString>;
11
+ }, z.core.$strip>;
12
+ };
13
+ responses: {
14
+ 200: {
15
+ content: {
16
+ "application/json": {
17
+ schema: z.ZodObject<{
18
+ data: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
19
+ meta: z.ZodObject<{
20
+ pagination: z.ZodObject<{
21
+ page: z.ZodNumber;
22
+ limit: z.ZodNumber;
23
+ total: z.ZodNumber;
24
+ totalPages: z.ZodNumber;
25
+ }, z.core.$strip>;
26
+ }, z.core.$strip>;
27
+ }, z.core.$strip>;
28
+ };
29
+ };
30
+ description: string;
31
+ };
32
+ };
33
+ } & {
34
+ getRoutingPath(): "/";
35
+ };
36
+ export declare const getCustomerRoute: {
37
+ method: "get";
38
+ path: "/{id}";
39
+ tags: string[];
40
+ summary: string;
41
+ request: {
42
+ params: z.ZodObject<{
43
+ id: z.ZodString;
44
+ }, z.core.$strip>;
45
+ };
46
+ responses: {
47
+ 400: {
48
+ readonly content: {
49
+ readonly "application/json": {
50
+ readonly schema: z.ZodObject<{
51
+ error: z.ZodObject<{
52
+ code: z.ZodString;
53
+ message: z.ZodString;
54
+ }, z.core.$strip>;
55
+ }, z.core.$strip>;
56
+ };
57
+ };
58
+ readonly description: "Business logic error.";
59
+ };
60
+ 401: {
61
+ readonly content: {
62
+ readonly "application/json": {
63
+ readonly schema: z.ZodObject<{
64
+ error: z.ZodObject<{
65
+ code: z.ZodString;
66
+ message: z.ZodString;
67
+ }, z.core.$strip>;
68
+ }, z.core.$strip>;
69
+ };
70
+ };
71
+ readonly description: "Authentication required.";
72
+ };
73
+ 403: {
74
+ readonly content: {
75
+ readonly "application/json": {
76
+ readonly schema: z.ZodObject<{
77
+ error: z.ZodObject<{
78
+ code: z.ZodString;
79
+ message: z.ZodString;
80
+ }, z.core.$strip>;
81
+ }, z.core.$strip>;
82
+ };
83
+ };
84
+ readonly description: "Insufficient permissions.";
85
+ };
86
+ 404: {
87
+ readonly content: {
88
+ readonly "application/json": {
89
+ readonly schema: z.ZodObject<{
90
+ error: z.ZodObject<{
91
+ code: z.ZodString;
92
+ message: z.ZodString;
93
+ }, z.core.$strip>;
94
+ }, z.core.$strip>;
95
+ };
96
+ };
97
+ readonly description: "Resource not found.";
98
+ };
99
+ 422: {
100
+ readonly content: {
101
+ readonly "application/json": {
102
+ readonly schema: z.ZodObject<{
103
+ error: z.ZodObject<{
104
+ code: z.ZodString;
105
+ message: z.ZodString;
106
+ }, z.core.$strip>;
107
+ }, z.core.$strip>;
108
+ };
109
+ };
110
+ readonly description: "Validation error.";
111
+ };
112
+ 200: {
113
+ content: {
114
+ "application/json": {
115
+ schema: z.ZodObject<{
116
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
117
+ }, z.core.$strip>;
118
+ };
119
+ };
120
+ description: string;
121
+ };
122
+ };
123
+ } & {
124
+ getRoutingPath(): "/:id";
125
+ };
126
+ export declare const updateCustomerRoute: {
127
+ method: "patch";
128
+ path: "/{id}";
129
+ tags: string[];
130
+ summary: string;
131
+ request: {
132
+ params: z.ZodObject<{
133
+ id: z.ZodString;
134
+ }, z.core.$strip>;
135
+ body: {
136
+ content: {
137
+ "application/json": {
138
+ schema: z.ZodObject<{
139
+ firstName: z.ZodOptional<z.ZodString>;
140
+ lastName: z.ZodOptional<z.ZodString>;
141
+ email: z.ZodOptional<z.ZodString>;
142
+ phone: z.ZodOptional<z.ZodString>;
143
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
144
+ }, z.core.$strip>;
145
+ };
146
+ };
147
+ };
148
+ };
149
+ responses: {
150
+ 400: {
151
+ readonly content: {
152
+ readonly "application/json": {
153
+ readonly schema: z.ZodObject<{
154
+ error: z.ZodObject<{
155
+ code: z.ZodString;
156
+ message: z.ZodString;
157
+ }, z.core.$strip>;
158
+ }, z.core.$strip>;
159
+ };
160
+ };
161
+ readonly description: "Business logic error.";
162
+ };
163
+ 401: {
164
+ readonly content: {
165
+ readonly "application/json": {
166
+ readonly schema: z.ZodObject<{
167
+ error: z.ZodObject<{
168
+ code: z.ZodString;
169
+ message: z.ZodString;
170
+ }, z.core.$strip>;
171
+ }, z.core.$strip>;
172
+ };
173
+ };
174
+ readonly description: "Authentication required.";
175
+ };
176
+ 403: {
177
+ readonly content: {
178
+ readonly "application/json": {
179
+ readonly schema: z.ZodObject<{
180
+ error: z.ZodObject<{
181
+ code: z.ZodString;
182
+ message: z.ZodString;
183
+ }, z.core.$strip>;
184
+ }, z.core.$strip>;
185
+ };
186
+ };
187
+ readonly description: "Insufficient permissions.";
188
+ };
189
+ 404: {
190
+ readonly content: {
191
+ readonly "application/json": {
192
+ readonly schema: z.ZodObject<{
193
+ error: z.ZodObject<{
194
+ code: z.ZodString;
195
+ message: z.ZodString;
196
+ }, z.core.$strip>;
197
+ }, z.core.$strip>;
198
+ };
199
+ };
200
+ readonly description: "Resource not found.";
201
+ };
202
+ 422: {
203
+ readonly content: {
204
+ readonly "application/json": {
205
+ readonly schema: z.ZodObject<{
206
+ error: z.ZodObject<{
207
+ code: z.ZodString;
208
+ message: z.ZodString;
209
+ }, z.core.$strip>;
210
+ }, z.core.$strip>;
211
+ };
212
+ };
213
+ readonly description: "Validation error.";
214
+ };
215
+ 200: {
216
+ content: {
217
+ "application/json": {
218
+ schema: z.ZodObject<{
219
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
220
+ }, z.core.$strip>;
221
+ };
222
+ };
223
+ description: string;
224
+ };
225
+ };
226
+ } & {
227
+ getRoutingPath(): "/:id";
228
+ };
229
+ export declare const getCustomerOrdersRoute: {
230
+ method: "get";
231
+ path: "/{id}/orders";
232
+ tags: string[];
233
+ summary: string;
234
+ request: {
235
+ params: z.ZodObject<{
236
+ id: z.ZodString;
237
+ }, z.core.$strip>;
238
+ query: z.ZodObject<{
239
+ status: z.ZodOptional<z.ZodString>;
240
+ page: z.ZodOptional<z.ZodString>;
241
+ limit: z.ZodOptional<z.ZodString>;
242
+ }, z.core.$strip>;
243
+ };
244
+ responses: {
245
+ 400: {
246
+ readonly content: {
247
+ readonly "application/json": {
248
+ readonly schema: z.ZodObject<{
249
+ error: z.ZodObject<{
250
+ code: z.ZodString;
251
+ message: z.ZodString;
252
+ }, z.core.$strip>;
253
+ }, z.core.$strip>;
254
+ };
255
+ };
256
+ readonly description: "Business logic error.";
257
+ };
258
+ 401: {
259
+ readonly content: {
260
+ readonly "application/json": {
261
+ readonly schema: z.ZodObject<{
262
+ error: z.ZodObject<{
263
+ code: z.ZodString;
264
+ message: z.ZodString;
265
+ }, z.core.$strip>;
266
+ }, z.core.$strip>;
267
+ };
268
+ };
269
+ readonly description: "Authentication required.";
270
+ };
271
+ 403: {
272
+ readonly content: {
273
+ readonly "application/json": {
274
+ readonly schema: z.ZodObject<{
275
+ error: z.ZodObject<{
276
+ code: z.ZodString;
277
+ message: z.ZodString;
278
+ }, z.core.$strip>;
279
+ }, z.core.$strip>;
280
+ };
281
+ };
282
+ readonly description: "Insufficient permissions.";
283
+ };
284
+ 404: {
285
+ readonly content: {
286
+ readonly "application/json": {
287
+ readonly schema: z.ZodObject<{
288
+ error: z.ZodObject<{
289
+ code: z.ZodString;
290
+ message: z.ZodString;
291
+ }, z.core.$strip>;
292
+ }, z.core.$strip>;
293
+ };
294
+ };
295
+ readonly description: "Resource not found.";
296
+ };
297
+ 422: {
298
+ readonly content: {
299
+ readonly "application/json": {
300
+ readonly schema: z.ZodObject<{
301
+ error: z.ZodObject<{
302
+ code: z.ZodString;
303
+ message: z.ZodString;
304
+ }, z.core.$strip>;
305
+ }, z.core.$strip>;
306
+ };
307
+ };
308
+ readonly description: "Validation error.";
309
+ };
310
+ 200: {
311
+ content: {
312
+ "application/json": {
313
+ schema: z.ZodObject<{
314
+ data: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
315
+ meta: z.ZodObject<{
316
+ pagination: z.ZodObject<{
317
+ page: z.ZodNumber;
318
+ limit: z.ZodNumber;
319
+ total: z.ZodNumber;
320
+ totalPages: z.ZodNumber;
321
+ }, z.core.$strip>;
322
+ }, z.core.$strip>;
323
+ }, z.core.$strip>;
324
+ };
325
+ };
326
+ description: string;
327
+ };
328
+ };
329
+ } & {
330
+ getRoutingPath(): "/:id/orders";
331
+ };
332
+ export declare const getCustomerAddressesRoute: {
333
+ method: "get";
334
+ path: "/{id}/addresses";
335
+ tags: string[];
336
+ summary: string;
337
+ request: {
338
+ params: z.ZodObject<{
339
+ id: z.ZodString;
340
+ }, z.core.$strip>;
341
+ };
342
+ responses: {
343
+ 400: {
344
+ readonly content: {
345
+ readonly "application/json": {
346
+ readonly schema: z.ZodObject<{
347
+ error: z.ZodObject<{
348
+ code: z.ZodString;
349
+ message: z.ZodString;
350
+ }, z.core.$strip>;
351
+ }, z.core.$strip>;
352
+ };
353
+ };
354
+ readonly description: "Business logic error.";
355
+ };
356
+ 401: {
357
+ readonly content: {
358
+ readonly "application/json": {
359
+ readonly schema: z.ZodObject<{
360
+ error: z.ZodObject<{
361
+ code: z.ZodString;
362
+ message: z.ZodString;
363
+ }, z.core.$strip>;
364
+ }, z.core.$strip>;
365
+ };
366
+ };
367
+ readonly description: "Authentication required.";
368
+ };
369
+ 403: {
370
+ readonly content: {
371
+ readonly "application/json": {
372
+ readonly schema: z.ZodObject<{
373
+ error: z.ZodObject<{
374
+ code: z.ZodString;
375
+ message: z.ZodString;
376
+ }, z.core.$strip>;
377
+ }, z.core.$strip>;
378
+ };
379
+ };
380
+ readonly description: "Insufficient permissions.";
381
+ };
382
+ 404: {
383
+ readonly content: {
384
+ readonly "application/json": {
385
+ readonly schema: z.ZodObject<{
386
+ error: z.ZodObject<{
387
+ code: z.ZodString;
388
+ message: z.ZodString;
389
+ }, z.core.$strip>;
390
+ }, z.core.$strip>;
391
+ };
392
+ };
393
+ readonly description: "Resource not found.";
394
+ };
395
+ 422: {
396
+ readonly content: {
397
+ readonly "application/json": {
398
+ readonly schema: z.ZodObject<{
399
+ error: z.ZodObject<{
400
+ code: z.ZodString;
401
+ message: z.ZodString;
402
+ }, z.core.$strip>;
403
+ }, z.core.$strip>;
404
+ };
405
+ };
406
+ readonly description: "Validation error.";
407
+ };
408
+ 200: {
409
+ content: {
410
+ "application/json": {
411
+ schema: z.ZodObject<{
412
+ data: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
413
+ }, z.core.$strip>;
414
+ };
415
+ };
416
+ description: string;
417
+ };
418
+ };
419
+ } & {
420
+ getRoutingPath(): "/:id/addresses";
421
+ };
422
+ //# sourceMappingURL=customers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customers.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/rest/schemas/customers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAe,MAAM,mBAAmB,CAAC;AAGnD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+B7B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqB3B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkC9B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCjC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqBpC,CAAC"}