@porulle/core 0.1.0 → 0.5.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/auth/middleware.d.ts.map +1 -1
- package/dist/auth/middleware.js +17 -1
- package/dist/config/define-config.d.ts.map +1 -1
- package/dist/config/define-config.js +6 -0
- package/dist/config/types.d.ts +12 -0
- package/dist/config/types.d.ts.map +1 -1
- package/dist/hooks/checkout.d.ts +3 -3
- package/dist/hooks/checkout.js +4 -4
- package/dist/index.d.ts +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/interfaces/rest/audit-middleware.d.ts +46 -0
- package/dist/interfaces/rest/audit-middleware.d.ts.map +1 -0
- package/dist/interfaces/rest/audit-middleware.js +82 -0
- package/dist/interfaces/rest/parse-json.d.ts +39 -0
- package/dist/interfaces/rest/parse-json.d.ts.map +1 -0
- package/dist/interfaces/rest/parse-json.js +45 -0
- package/dist/interfaces/rest/routes/catalog.d.ts.map +1 -1
- package/dist/interfaces/rest/routes/catalog.js +17 -2
- package/dist/interfaces/rest/routes/customers.d.ts.map +1 -1
- package/dist/interfaces/rest/routes/customers.js +59 -4
- package/dist/interfaces/rest/routes/inventory.d.ts.map +1 -1
- package/dist/interfaces/rest/routes/inventory.js +4 -2
- package/dist/interfaces/rest/routes/media.d.ts.map +1 -1
- package/dist/interfaces/rest/routes/media.js +6 -0
- package/dist/interfaces/rest/routes/orders.d.ts.map +1 -1
- package/dist/interfaces/rest/routes/orders.js +23 -1
- package/dist/interfaces/rest/routes/promotions.d.ts.map +1 -1
- package/dist/interfaces/rest/routes/promotions.js +21 -1
- package/dist/interfaces/rest/schemas/carts.d.ts +175 -0
- package/dist/interfaces/rest/schemas/carts.d.ts.map +1 -1
- package/dist/interfaces/rest/schemas/catalog.d.ts +1410 -0
- package/dist/interfaces/rest/schemas/catalog.d.ts.map +1 -1
- package/dist/interfaces/rest/schemas/catalog.js +28 -1
- package/dist/interfaces/rest/schemas/checkout.d.ts +35 -0
- package/dist/interfaces/rest/schemas/checkout.d.ts.map +1 -1
- package/dist/interfaces/rest/schemas/customer-portal.d.ts +280 -0
- package/dist/interfaces/rest/schemas/customer-portal.d.ts.map +1 -1
- package/dist/interfaces/rest/schemas/customers.d.ts +863 -0
- package/dist/interfaces/rest/schemas/customers.d.ts.map +1 -1
- package/dist/interfaces/rest/schemas/customers.js +88 -0
- package/dist/interfaces/rest/schemas/inventory.d.ts +182 -1
- package/dist/interfaces/rest/schemas/inventory.d.ts.map +1 -1
- package/dist/interfaces/rest/schemas/media.d.ts +105 -0
- package/dist/interfaces/rest/schemas/media.d.ts.map +1 -1
- package/dist/interfaces/rest/schemas/orders.d.ts +136 -0
- package/dist/interfaces/rest/schemas/orders.d.ts.map +1 -1
- package/dist/interfaces/rest/schemas/orders.js +20 -0
- package/dist/interfaces/rest/schemas/pricing.d.ts +70 -0
- package/dist/interfaces/rest/schemas/pricing.d.ts.map +1 -1
- package/dist/interfaces/rest/schemas/promotions.d.ts +298 -0
- package/dist/interfaces/rest/schemas/promotions.d.ts.map +1 -1
- package/dist/interfaces/rest/schemas/promotions.js +25 -1
- package/dist/interfaces/rest/schemas/shared.d.ts +47 -0
- package/dist/interfaces/rest/schemas/shared.d.ts.map +1 -1
- package/dist/interfaces/rest/schemas/shared.js +8 -0
- package/dist/interfaces/rest/schemas/webhooks.d.ts +70 -0
- package/dist/interfaces/rest/schemas/webhooks.d.ts.map +1 -1
- package/dist/kernel/database/adapter.d.ts +6 -0
- package/dist/kernel/database/adapter.d.ts.map +1 -1
- package/dist/kernel/database/adapter.js +62 -1
- package/dist/kernel/database/migrate.d.ts +22 -2
- package/dist/kernel/database/migrate.d.ts.map +1 -1
- package/dist/kernel/database/migrate.js +42 -2
- package/dist/modules/analytics/hooks.d.ts +5 -5
- package/dist/modules/analytics/hooks.js +5 -5
- package/dist/modules/analytics/repository/index.d.ts.map +1 -1
- package/dist/modules/catalog/category-service.d.ts +6 -1
- package/dist/modules/catalog/category-service.d.ts.map +1 -1
- package/dist/modules/catalog/category-service.js +35 -5
- package/dist/modules/catalog/schema.d.ts +17 -0
- package/dist/modules/catalog/schema.d.ts.map +1 -1
- package/dist/modules/catalog/schema.js +2 -0
- package/dist/modules/catalog/service.d.ts +11 -2
- package/dist/modules/catalog/service.d.ts.map +1 -1
- package/dist/modules/catalog/service.js +8 -2
- package/dist/modules/customers/repository/index.d.ts +8 -1
- package/dist/modules/customers/repository/index.d.ts.map +1 -1
- package/dist/modules/customers/repository/index.js +42 -2
- package/dist/modules/customers/schema.d.ts +162 -0
- package/dist/modules/customers/schema.d.ts.map +1 -1
- package/dist/modules/customers/schema.js +18 -0
- package/dist/modules/customers/service.d.ts +32 -2
- package/dist/modules/customers/service.d.ts.map +1 -1
- package/dist/modules/customers/service.js +119 -3
- package/dist/modules/inventory/schemas.d.ts +7 -1
- package/dist/modules/inventory/schemas.d.ts.map +1 -1
- package/dist/modules/inventory/schemas.js +6 -1
- package/dist/modules/inventory/service.d.ts +18 -0
- package/dist/modules/inventory/service.d.ts.map +1 -1
- package/dist/modules/inventory/service.js +58 -21
- package/dist/modules/media/noop-adapter.d.ts +11 -0
- package/dist/modules/media/noop-adapter.d.ts.map +1 -0
- package/dist/modules/media/noop-adapter.js +31 -0
- package/dist/modules/orders/repository/index.d.ts +19 -0
- package/dist/modules/orders/repository/index.d.ts.map +1 -1
- package/dist/modules/orders/repository/index.js +42 -1
- package/dist/modules/orders/service.d.ts +31 -0
- package/dist/modules/orders/service.d.ts.map +1 -1
- package/dist/modules/orders/service.js +52 -2
- package/dist/modules/payments/repository/index.d.ts.map +1 -1
- package/dist/modules/promotions/schemas.d.ts +46 -0
- package/dist/modules/promotions/schemas.d.ts.map +1 -1
- package/dist/modules/promotions/schemas.js +19 -8
- package/dist/modules/promotions/service.d.ts +8 -2
- package/dist/modules/promotions/service.d.ts.map +1 -1
- package/dist/modules/promotions/service.js +74 -9
- package/dist/modules/search/repository/index.d.ts.map +1 -1
- package/dist/modules/shipping/repository/index.d.ts.map +1 -1
- package/dist/modules/tax/repository/index.d.ts.map +1 -1
- package/dist/runtime/client-ip.d.ts +31 -0
- package/dist/runtime/client-ip.d.ts.map +1 -0
- package/dist/runtime/client-ip.js +31 -0
- package/dist/runtime/server.d.ts +4 -0
- package/dist/runtime/server.d.ts.map +1 -1
- package/dist/runtime/server.js +35 -19
- package/dist/test-utils/create-plugin-test-app.d.ts.map +1 -1
- package/dist/test-utils/create-plugin-test-app.js +4 -1
- package/dist/test-utils/test-actors.d.ts +3 -2
- package/dist/test-utils/test-actors.d.ts.map +1 -1
- package/dist/test-utils/test-actors.js +3 -2
- package/package.json +4 -4
- package/src/auth/middleware.ts +18 -1
- package/src/config/define-config.ts +7 -0
- package/src/config/types.ts +12 -0
- package/src/hooks/checkout.ts +4 -4
- package/src/index.ts +18 -1
- package/src/interfaces/rest/audit-middleware.ts +110 -0
- package/src/interfaces/rest/parse-json.ts +81 -0
- package/src/interfaces/rest/routes/catalog.ts +21 -1
- package/src/interfaces/rest/routes/customers.ts +64 -3
- package/src/interfaces/rest/routes/inventory.ts +4 -2
- package/src/interfaces/rest/routes/media.ts +7 -0
- package/src/interfaces/rest/routes/orders.ts +21 -1
- package/src/interfaces/rest/routes/promotions.ts +22 -1
- package/src/interfaces/rest/schemas/catalog.ts +30 -1
- package/src/interfaces/rest/schemas/customers.ts +99 -0
- package/src/interfaces/rest/schemas/orders.ts +21 -0
- package/src/interfaces/rest/schemas/promotions.ts +32 -1
- package/src/interfaces/rest/schemas/shared.ts +9 -0
- package/src/kernel/database/adapter.ts +64 -1
- package/src/kernel/database/migrate.ts +50 -2
- package/src/modules/analytics/hooks.ts +5 -5
- package/src/modules/analytics/repository/index.ts +0 -1
- package/src/modules/catalog/category-service.ts +26 -5
- package/src/modules/catalog/schema.ts +2 -0
- package/src/modules/catalog/service.ts +25 -3
- package/src/modules/customers/repository/index.ts +55 -1
- package/src/modules/customers/schema.ts +19 -0
- package/src/modules/customers/service.ts +137 -2
- package/src/modules/inventory/schemas.ts +6 -1
- package/src/modules/inventory/service.ts +84 -29
- package/src/modules/media/noop-adapter.ts +36 -0
- package/src/modules/orders/repository/index.ts +63 -1
- package/src/modules/orders/service.ts +86 -3
- package/src/modules/payments/repository/index.ts +0 -1
- package/src/modules/promotions/schemas.ts +21 -4
- package/src/modules/promotions/service.ts +90 -18
- package/src/modules/search/repository/index.ts +0 -1
- package/src/modules/shipping/repository/index.ts +0 -1
- package/src/modules/tax/repository/index.ts +0 -1
- package/src/runtime/client-ip.ts +49 -0
- package/src/runtime/server.ts +39 -18
- package/src/test-utils/create-plugin-test-app.ts +3 -1
- package/src/test-utils/test-actors.ts +3 -2
|
@@ -1 +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
|
|
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,wBAAwB;;;;;;;iBASL,CAAC;AAEjC,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAe9B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+B7B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAajC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAajC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUjC,CAAC"}
|
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
import { z, createRoute } from "@hono/zod-openapi";
|
|
2
2
|
import { errorResponses } from "./shared.js";
|
|
3
|
+
export const CreateCustomerBodySchema = z.object({
|
|
4
|
+
// Optional: omit for walk-in / POS customers who never log in. A synthetic
|
|
5
|
+
// anonymous_<uuid> id is generated and metadata.walkIn is set.
|
|
6
|
+
userId: z.string().optional().openapi({ example: "user_123" }),
|
|
7
|
+
firstName: z.string().optional().openapi({ example: "Nimali" }),
|
|
8
|
+
lastName: z.string().optional().openapi({ example: "Perera" }),
|
|
9
|
+
phone: z.string().optional().openapi({ example: "+94 77 412 6601" }),
|
|
10
|
+
email: z.string().optional().openapi({ example: "nimali@example.com" }),
|
|
11
|
+
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
12
|
+
}).openapi("CreateCustomerBody");
|
|
13
|
+
export const createCustomerRoute = createRoute({
|
|
14
|
+
method: "post",
|
|
15
|
+
path: "/",
|
|
16
|
+
tags: ["Customers"],
|
|
17
|
+
summary: "Create a customer (supports walk-in / userId-less)",
|
|
18
|
+
request: {
|
|
19
|
+
body: { content: { "application/json": { schema: CreateCustomerBodySchema } }, required: true },
|
|
20
|
+
},
|
|
21
|
+
responses: {
|
|
22
|
+
201: {
|
|
23
|
+
content: { "application/json": { schema: z.object({ data: z.record(z.string(), z.unknown()) }) } },
|
|
24
|
+
description: "Customer created.",
|
|
25
|
+
},
|
|
26
|
+
...errorResponses,
|
|
27
|
+
},
|
|
28
|
+
});
|
|
3
29
|
export const listCustomersRoute = createRoute({
|
|
4
30
|
method: "get",
|
|
5
31
|
path: "/",
|
|
@@ -148,3 +174,65 @@ export const getCustomerAddressesRoute = createRoute({
|
|
|
148
174
|
...errorResponses,
|
|
149
175
|
},
|
|
150
176
|
});
|
|
177
|
+
// ─── Customer interactions (#3) ──────────────────────────────────────────────
|
|
178
|
+
export const InteractionKindEnum = z.enum([
|
|
179
|
+
"visit", "call", "inquiry", "fitting", "follow_up", "message",
|
|
180
|
+
]);
|
|
181
|
+
export const CreateInteractionBodySchema = z.object({
|
|
182
|
+
kind: InteractionKindEnum.openapi({ example: "visit" }),
|
|
183
|
+
notes: z.string().min(1).openapi({ example: "Asked about the navy blazer in M." }),
|
|
184
|
+
relatedEntityId: z.string().uuid().nullable().optional(),
|
|
185
|
+
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
186
|
+
}).openapi("CreateInteractionBody");
|
|
187
|
+
export const UpdateInteractionBodySchema = CreateInteractionBodySchema.partial().openapi("UpdateInteractionBody");
|
|
188
|
+
const InteractionDataResponse = z.object({ data: z.record(z.string(), z.unknown()) });
|
|
189
|
+
export const listInteractionsRoute = createRoute({
|
|
190
|
+
method: "get",
|
|
191
|
+
path: "/{id}/interactions",
|
|
192
|
+
tags: ["Customers"],
|
|
193
|
+
summary: "List a customer's interactions",
|
|
194
|
+
request: { params: z.object({ id: z.string().uuid() }) },
|
|
195
|
+
responses: {
|
|
196
|
+
200: { content: { "application/json": { schema: z.object({ data: z.array(z.record(z.string(), z.unknown())) }) } }, description: "Interactions" },
|
|
197
|
+
...errorResponses,
|
|
198
|
+
},
|
|
199
|
+
});
|
|
200
|
+
export const createInteractionRoute = createRoute({
|
|
201
|
+
method: "post",
|
|
202
|
+
path: "/{id}/interactions",
|
|
203
|
+
tags: ["Customers"],
|
|
204
|
+
summary: "Log a customer interaction",
|
|
205
|
+
request: {
|
|
206
|
+
params: z.object({ id: z.string().uuid() }),
|
|
207
|
+
body: { content: { "application/json": { schema: CreateInteractionBodySchema } }, required: true },
|
|
208
|
+
},
|
|
209
|
+
responses: {
|
|
210
|
+
201: { content: { "application/json": { schema: InteractionDataResponse } }, description: "Interaction logged" },
|
|
211
|
+
...errorResponses,
|
|
212
|
+
},
|
|
213
|
+
});
|
|
214
|
+
export const updateInteractionRoute = createRoute({
|
|
215
|
+
method: "patch",
|
|
216
|
+
path: "/{id}/interactions/{iid}",
|
|
217
|
+
tags: ["Customers"],
|
|
218
|
+
summary: "Edit a customer interaction",
|
|
219
|
+
request: {
|
|
220
|
+
params: z.object({ id: z.string().uuid(), iid: z.string().uuid() }),
|
|
221
|
+
body: { content: { "application/json": { schema: UpdateInteractionBodySchema } }, required: true },
|
|
222
|
+
},
|
|
223
|
+
responses: {
|
|
224
|
+
200: { content: { "application/json": { schema: InteractionDataResponse } }, description: "Interaction updated" },
|
|
225
|
+
...errorResponses,
|
|
226
|
+
},
|
|
227
|
+
});
|
|
228
|
+
export const deleteInteractionRoute = createRoute({
|
|
229
|
+
method: "delete",
|
|
230
|
+
path: "/{id}/interactions/{iid}",
|
|
231
|
+
tags: ["Customers"],
|
|
232
|
+
summary: "Delete a customer interaction",
|
|
233
|
+
request: { params: z.object({ id: z.string().uuid(), iid: z.string().uuid() }) },
|
|
234
|
+
responses: {
|
|
235
|
+
200: { content: { "application/json": { schema: z.object({ data: z.object({ deleted: z.literal(true) }) }) } }, description: "Deleted" },
|
|
236
|
+
...errorResponses,
|
|
237
|
+
},
|
|
238
|
+
});
|
|
@@ -26,6 +26,13 @@ export declare const listInventoryLevelsRoute: {
|
|
|
26
26
|
error: z.ZodObject<{
|
|
27
27
|
code: z.ZodString;
|
|
28
28
|
message: z.ZodString;
|
|
29
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
30
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
31
|
+
path: z.ZodString;
|
|
32
|
+
message: z.ZodString;
|
|
33
|
+
code: z.ZodString;
|
|
34
|
+
}, z.core.$strip>>>;
|
|
35
|
+
}, z.core.$strip>>;
|
|
29
36
|
}, z.core.$strip>;
|
|
30
37
|
}, z.core.$strip>;
|
|
31
38
|
};
|
|
@@ -39,6 +46,13 @@ export declare const listInventoryLevelsRoute: {
|
|
|
39
46
|
error: z.ZodObject<{
|
|
40
47
|
code: z.ZodString;
|
|
41
48
|
message: z.ZodString;
|
|
49
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
50
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
51
|
+
path: z.ZodString;
|
|
52
|
+
message: z.ZodString;
|
|
53
|
+
code: z.ZodString;
|
|
54
|
+
}, z.core.$strip>>>;
|
|
55
|
+
}, z.core.$strip>>;
|
|
42
56
|
}, z.core.$strip>;
|
|
43
57
|
}, z.core.$strip>;
|
|
44
58
|
};
|
|
@@ -52,6 +66,13 @@ export declare const listInventoryLevelsRoute: {
|
|
|
52
66
|
error: z.ZodObject<{
|
|
53
67
|
code: z.ZodString;
|
|
54
68
|
message: z.ZodString;
|
|
69
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
70
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
71
|
+
path: z.ZodString;
|
|
72
|
+
message: z.ZodString;
|
|
73
|
+
code: z.ZodString;
|
|
74
|
+
}, z.core.$strip>>>;
|
|
75
|
+
}, z.core.$strip>>;
|
|
55
76
|
}, z.core.$strip>;
|
|
56
77
|
}, z.core.$strip>;
|
|
57
78
|
};
|
|
@@ -65,6 +86,13 @@ export declare const listInventoryLevelsRoute: {
|
|
|
65
86
|
error: z.ZodObject<{
|
|
66
87
|
code: z.ZodString;
|
|
67
88
|
message: z.ZodString;
|
|
89
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
90
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
91
|
+
path: z.ZodString;
|
|
92
|
+
message: z.ZodString;
|
|
93
|
+
code: z.ZodString;
|
|
94
|
+
}, z.core.$strip>>>;
|
|
95
|
+
}, z.core.$strip>>;
|
|
68
96
|
}, z.core.$strip>;
|
|
69
97
|
}, z.core.$strip>;
|
|
70
98
|
};
|
|
@@ -78,6 +106,13 @@ export declare const listInventoryLevelsRoute: {
|
|
|
78
106
|
error: z.ZodObject<{
|
|
79
107
|
code: z.ZodString;
|
|
80
108
|
message: z.ZodString;
|
|
109
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
110
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
111
|
+
path: z.ZodString;
|
|
112
|
+
message: z.ZodString;
|
|
113
|
+
code: z.ZodString;
|
|
114
|
+
}, z.core.$strip>>>;
|
|
115
|
+
}, z.core.$strip>>;
|
|
81
116
|
}, z.core.$strip>;
|
|
82
117
|
}, z.core.$strip>;
|
|
83
118
|
};
|
|
@@ -157,7 +192,13 @@ export declare const inventoryAdjustRoute: {
|
|
|
157
192
|
entityId: z.ZodString;
|
|
158
193
|
variantId: z.ZodOptional<z.ZodString>;
|
|
159
194
|
warehouseId: z.ZodOptional<z.ZodString>;
|
|
160
|
-
adjustment: z.ZodNumber
|
|
195
|
+
adjustment: z.ZodOptional<z.ZodNumber>;
|
|
196
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
197
|
+
set: "set";
|
|
198
|
+
add: "add";
|
|
199
|
+
remove: "remove";
|
|
200
|
+
}>>;
|
|
201
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
161
202
|
reason: z.ZodString;
|
|
162
203
|
performedBy: z.ZodOptional<z.ZodString>;
|
|
163
204
|
referenceType: z.ZodOptional<z.ZodString>;
|
|
@@ -176,6 +217,13 @@ export declare const inventoryAdjustRoute: {
|
|
|
176
217
|
error: z.ZodObject<{
|
|
177
218
|
code: z.ZodString;
|
|
178
219
|
message: z.ZodString;
|
|
220
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
221
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
222
|
+
path: z.ZodString;
|
|
223
|
+
message: z.ZodString;
|
|
224
|
+
code: z.ZodString;
|
|
225
|
+
}, z.core.$strip>>>;
|
|
226
|
+
}, z.core.$strip>>;
|
|
179
227
|
}, z.core.$strip>;
|
|
180
228
|
}, z.core.$strip>;
|
|
181
229
|
};
|
|
@@ -189,6 +237,13 @@ export declare const inventoryAdjustRoute: {
|
|
|
189
237
|
error: z.ZodObject<{
|
|
190
238
|
code: z.ZodString;
|
|
191
239
|
message: z.ZodString;
|
|
240
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
241
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
242
|
+
path: z.ZodString;
|
|
243
|
+
message: z.ZodString;
|
|
244
|
+
code: z.ZodString;
|
|
245
|
+
}, z.core.$strip>>>;
|
|
246
|
+
}, z.core.$strip>>;
|
|
192
247
|
}, z.core.$strip>;
|
|
193
248
|
}, z.core.$strip>;
|
|
194
249
|
};
|
|
@@ -202,6 +257,13 @@ export declare const inventoryAdjustRoute: {
|
|
|
202
257
|
error: z.ZodObject<{
|
|
203
258
|
code: z.ZodString;
|
|
204
259
|
message: z.ZodString;
|
|
260
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
261
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
262
|
+
path: z.ZodString;
|
|
263
|
+
message: z.ZodString;
|
|
264
|
+
code: z.ZodString;
|
|
265
|
+
}, z.core.$strip>>>;
|
|
266
|
+
}, z.core.$strip>>;
|
|
205
267
|
}, z.core.$strip>;
|
|
206
268
|
}, z.core.$strip>;
|
|
207
269
|
};
|
|
@@ -215,6 +277,13 @@ export declare const inventoryAdjustRoute: {
|
|
|
215
277
|
error: z.ZodObject<{
|
|
216
278
|
code: z.ZodString;
|
|
217
279
|
message: z.ZodString;
|
|
280
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
281
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
282
|
+
path: z.ZodString;
|
|
283
|
+
message: z.ZodString;
|
|
284
|
+
code: z.ZodString;
|
|
285
|
+
}, z.core.$strip>>>;
|
|
286
|
+
}, z.core.$strip>>;
|
|
218
287
|
}, z.core.$strip>;
|
|
219
288
|
}, z.core.$strip>;
|
|
220
289
|
};
|
|
@@ -228,6 +297,13 @@ export declare const inventoryAdjustRoute: {
|
|
|
228
297
|
error: z.ZodObject<{
|
|
229
298
|
code: z.ZodString;
|
|
230
299
|
message: z.ZodString;
|
|
300
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
301
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
302
|
+
path: z.ZodString;
|
|
303
|
+
message: z.ZodString;
|
|
304
|
+
code: z.ZodString;
|
|
305
|
+
}, z.core.$strip>>>;
|
|
306
|
+
}, z.core.$strip>>;
|
|
231
307
|
}, z.core.$strip>;
|
|
232
308
|
}, z.core.$strip>;
|
|
233
309
|
};
|
|
@@ -279,6 +355,13 @@ export declare const inventoryReserveRoute: {
|
|
|
279
355
|
error: z.ZodObject<{
|
|
280
356
|
code: z.ZodString;
|
|
281
357
|
message: z.ZodString;
|
|
358
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
359
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
360
|
+
path: z.ZodString;
|
|
361
|
+
message: z.ZodString;
|
|
362
|
+
code: z.ZodString;
|
|
363
|
+
}, z.core.$strip>>>;
|
|
364
|
+
}, z.core.$strip>>;
|
|
282
365
|
}, z.core.$strip>;
|
|
283
366
|
}, z.core.$strip>;
|
|
284
367
|
};
|
|
@@ -292,6 +375,13 @@ export declare const inventoryReserveRoute: {
|
|
|
292
375
|
error: z.ZodObject<{
|
|
293
376
|
code: z.ZodString;
|
|
294
377
|
message: z.ZodString;
|
|
378
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
379
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
380
|
+
path: z.ZodString;
|
|
381
|
+
message: z.ZodString;
|
|
382
|
+
code: z.ZodString;
|
|
383
|
+
}, z.core.$strip>>>;
|
|
384
|
+
}, z.core.$strip>>;
|
|
295
385
|
}, z.core.$strip>;
|
|
296
386
|
}, z.core.$strip>;
|
|
297
387
|
};
|
|
@@ -305,6 +395,13 @@ export declare const inventoryReserveRoute: {
|
|
|
305
395
|
error: z.ZodObject<{
|
|
306
396
|
code: z.ZodString;
|
|
307
397
|
message: z.ZodString;
|
|
398
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
399
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
400
|
+
path: z.ZodString;
|
|
401
|
+
message: z.ZodString;
|
|
402
|
+
code: z.ZodString;
|
|
403
|
+
}, z.core.$strip>>>;
|
|
404
|
+
}, z.core.$strip>>;
|
|
308
405
|
}, z.core.$strip>;
|
|
309
406
|
}, z.core.$strip>;
|
|
310
407
|
};
|
|
@@ -318,6 +415,13 @@ export declare const inventoryReserveRoute: {
|
|
|
318
415
|
error: z.ZodObject<{
|
|
319
416
|
code: z.ZodString;
|
|
320
417
|
message: z.ZodString;
|
|
418
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
419
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
420
|
+
path: z.ZodString;
|
|
421
|
+
message: z.ZodString;
|
|
422
|
+
code: z.ZodString;
|
|
423
|
+
}, z.core.$strip>>>;
|
|
424
|
+
}, z.core.$strip>>;
|
|
321
425
|
}, z.core.$strip>;
|
|
322
426
|
}, z.core.$strip>;
|
|
323
427
|
};
|
|
@@ -331,6 +435,13 @@ export declare const inventoryReserveRoute: {
|
|
|
331
435
|
error: z.ZodObject<{
|
|
332
436
|
code: z.ZodString;
|
|
333
437
|
message: z.ZodString;
|
|
438
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
439
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
440
|
+
path: z.ZodString;
|
|
441
|
+
message: z.ZodString;
|
|
442
|
+
code: z.ZodString;
|
|
443
|
+
}, z.core.$strip>>>;
|
|
444
|
+
}, z.core.$strip>>;
|
|
334
445
|
}, z.core.$strip>;
|
|
335
446
|
}, z.core.$strip>;
|
|
336
447
|
};
|
|
@@ -384,6 +495,13 @@ export declare const inventoryReleaseRoute: {
|
|
|
384
495
|
error: z.ZodObject<{
|
|
385
496
|
code: z.ZodString;
|
|
386
497
|
message: z.ZodString;
|
|
498
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
499
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
500
|
+
path: z.ZodString;
|
|
501
|
+
message: z.ZodString;
|
|
502
|
+
code: z.ZodString;
|
|
503
|
+
}, z.core.$strip>>>;
|
|
504
|
+
}, z.core.$strip>>;
|
|
387
505
|
}, z.core.$strip>;
|
|
388
506
|
}, z.core.$strip>;
|
|
389
507
|
};
|
|
@@ -397,6 +515,13 @@ export declare const inventoryReleaseRoute: {
|
|
|
397
515
|
error: z.ZodObject<{
|
|
398
516
|
code: z.ZodString;
|
|
399
517
|
message: z.ZodString;
|
|
518
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
519
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
520
|
+
path: z.ZodString;
|
|
521
|
+
message: z.ZodString;
|
|
522
|
+
code: z.ZodString;
|
|
523
|
+
}, z.core.$strip>>>;
|
|
524
|
+
}, z.core.$strip>>;
|
|
400
525
|
}, z.core.$strip>;
|
|
401
526
|
}, z.core.$strip>;
|
|
402
527
|
};
|
|
@@ -410,6 +535,13 @@ export declare const inventoryReleaseRoute: {
|
|
|
410
535
|
error: z.ZodObject<{
|
|
411
536
|
code: z.ZodString;
|
|
412
537
|
message: z.ZodString;
|
|
538
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
539
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
540
|
+
path: z.ZodString;
|
|
541
|
+
message: z.ZodString;
|
|
542
|
+
code: z.ZodString;
|
|
543
|
+
}, z.core.$strip>>>;
|
|
544
|
+
}, z.core.$strip>>;
|
|
413
545
|
}, z.core.$strip>;
|
|
414
546
|
}, z.core.$strip>;
|
|
415
547
|
};
|
|
@@ -423,6 +555,13 @@ export declare const inventoryReleaseRoute: {
|
|
|
423
555
|
error: z.ZodObject<{
|
|
424
556
|
code: z.ZodString;
|
|
425
557
|
message: z.ZodString;
|
|
558
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
559
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
560
|
+
path: z.ZodString;
|
|
561
|
+
message: z.ZodString;
|
|
562
|
+
code: z.ZodString;
|
|
563
|
+
}, z.core.$strip>>>;
|
|
564
|
+
}, z.core.$strip>>;
|
|
426
565
|
}, z.core.$strip>;
|
|
427
566
|
}, z.core.$strip>;
|
|
428
567
|
};
|
|
@@ -436,6 +575,13 @@ export declare const inventoryReleaseRoute: {
|
|
|
436
575
|
error: z.ZodObject<{
|
|
437
576
|
code: z.ZodString;
|
|
438
577
|
message: z.ZodString;
|
|
578
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
579
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
580
|
+
path: z.ZodString;
|
|
581
|
+
message: z.ZodString;
|
|
582
|
+
code: z.ZodString;
|
|
583
|
+
}, z.core.$strip>>>;
|
|
584
|
+
}, z.core.$strip>>;
|
|
439
585
|
}, z.core.$strip>;
|
|
440
586
|
}, z.core.$strip>;
|
|
441
587
|
};
|
|
@@ -486,6 +632,13 @@ export declare const createWarehouseRoute: {
|
|
|
486
632
|
error: z.ZodObject<{
|
|
487
633
|
code: z.ZodString;
|
|
488
634
|
message: z.ZodString;
|
|
635
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
636
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
637
|
+
path: z.ZodString;
|
|
638
|
+
message: z.ZodString;
|
|
639
|
+
code: z.ZodString;
|
|
640
|
+
}, z.core.$strip>>>;
|
|
641
|
+
}, z.core.$strip>>;
|
|
489
642
|
}, z.core.$strip>;
|
|
490
643
|
}, z.core.$strip>;
|
|
491
644
|
};
|
|
@@ -499,6 +652,13 @@ export declare const createWarehouseRoute: {
|
|
|
499
652
|
error: z.ZodObject<{
|
|
500
653
|
code: z.ZodString;
|
|
501
654
|
message: z.ZodString;
|
|
655
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
656
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
657
|
+
path: z.ZodString;
|
|
658
|
+
message: z.ZodString;
|
|
659
|
+
code: z.ZodString;
|
|
660
|
+
}, z.core.$strip>>>;
|
|
661
|
+
}, z.core.$strip>>;
|
|
502
662
|
}, z.core.$strip>;
|
|
503
663
|
}, z.core.$strip>;
|
|
504
664
|
};
|
|
@@ -512,6 +672,13 @@ export declare const createWarehouseRoute: {
|
|
|
512
672
|
error: z.ZodObject<{
|
|
513
673
|
code: z.ZodString;
|
|
514
674
|
message: z.ZodString;
|
|
675
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
676
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
677
|
+
path: z.ZodString;
|
|
678
|
+
message: z.ZodString;
|
|
679
|
+
code: z.ZodString;
|
|
680
|
+
}, z.core.$strip>>>;
|
|
681
|
+
}, z.core.$strip>>;
|
|
515
682
|
}, z.core.$strip>;
|
|
516
683
|
}, z.core.$strip>;
|
|
517
684
|
};
|
|
@@ -525,6 +692,13 @@ export declare const createWarehouseRoute: {
|
|
|
525
692
|
error: z.ZodObject<{
|
|
526
693
|
code: z.ZodString;
|
|
527
694
|
message: z.ZodString;
|
|
695
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
696
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
697
|
+
path: z.ZodString;
|
|
698
|
+
message: z.ZodString;
|
|
699
|
+
code: z.ZodString;
|
|
700
|
+
}, z.core.$strip>>>;
|
|
701
|
+
}, z.core.$strip>>;
|
|
528
702
|
}, z.core.$strip>;
|
|
529
703
|
}, z.core.$strip>;
|
|
530
704
|
};
|
|
@@ -538,6 +712,13 @@ export declare const createWarehouseRoute: {
|
|
|
538
712
|
error: z.ZodObject<{
|
|
539
713
|
code: z.ZodString;
|
|
540
714
|
message: z.ZodString;
|
|
715
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
716
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
717
|
+
path: z.ZodString;
|
|
718
|
+
message: z.ZodString;
|
|
719
|
+
code: z.ZodString;
|
|
720
|
+
}, z.core.$strip>>>;
|
|
721
|
+
}, z.core.$strip>>;
|
|
541
722
|
}, z.core.$strip>;
|
|
542
723
|
}, z.core.$strip>;
|
|
543
724
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inventory.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/rest/schemas/inventory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAe,MAAM,mBAAmB,CAAC;AAKnD,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AAC1I,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,CAAC;AAE7F,eAAO,MAAM,yBAAyB;;;;iBAIF,CAAC;AAIrC,eAAO,MAAM,wBAAwB
|
|
1
|
+
{"version":3,"file":"inventory.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/rest/schemas/inventory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAe,MAAM,mBAAmB,CAAC;AAKnD,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AAC1I,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,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