@kernhq/module-inventory 0.1.1 → 0.2.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.
Files changed (103) hide show
  1. package/README.md +55 -9
  2. package/dist/contract/capabilities.d.ts +49 -0
  3. package/dist/contract/capabilities.d.ts.map +1 -0
  4. package/dist/contract/capabilities.js +52 -0
  5. package/dist/contract/capabilities.js.map +1 -0
  6. package/dist/contract/events.d.ts +33 -0
  7. package/dist/contract/events.d.ts.map +1 -0
  8. package/dist/contract/events.js +22 -0
  9. package/dist/contract/events.js.map +1 -0
  10. package/dist/contract/index.d.ts +15 -0
  11. package/dist/contract/index.d.ts.map +1 -0
  12. package/dist/contract/index.js +15 -0
  13. package/dist/contract/index.js.map +1 -0
  14. package/dist/contract/models.d.ts +146 -0
  15. package/dist/contract/models.d.ts.map +1 -0
  16. package/dist/contract/models.js +107 -0
  17. package/dist/contract/models.js.map +1 -0
  18. package/dist/contract/permissions.d.ts +22 -0
  19. package/dist/contract/permissions.d.ts.map +1 -0
  20. package/dist/contract/permissions.js +26 -0
  21. package/dist/contract/permissions.js.map +1 -0
  22. package/dist/{contract.d.ts → contract/router.d.ts} +24 -85
  23. package/dist/contract/router.d.ts.map +1 -0
  24. package/dist/contract/router.js +42 -0
  25. package/dist/contract/router.js.map +1 -0
  26. package/dist/contract/settings.d.ts +18 -0
  27. package/dist/contract/settings.d.ts.map +1 -0
  28. package/dist/contract/settings.js +29 -0
  29. package/dist/contract/settings.js.map +1 -0
  30. package/dist/server/index.d.ts +4 -1
  31. package/dist/server/index.d.ts.map +1 -1
  32. package/dist/server/index.js +9 -13
  33. package/dist/server/index.js.map +1 -1
  34. package/dist/server/{_impl.d.ts → router.d.ts} +33 -8
  35. package/dist/server/{_impl.d.ts.map → router.d.ts.map} +1 -1
  36. package/dist/server/router.js +83 -0
  37. package/dist/server/router.js.map +1 -0
  38. package/dist/server/schema.d.ts +25 -11
  39. package/dist/server/schema.d.ts.map +1 -1
  40. package/dist/server/schema.js +28 -10
  41. package/dist/server/schema.js.map +1 -1
  42. package/dist/server/services/assets.d.ts +73 -0
  43. package/dist/server/services/assets.d.ts.map +1 -0
  44. package/dist/server/services/assets.js +261 -0
  45. package/dist/server/services/assets.js.map +1 -0
  46. package/dist/server/services/index.d.ts +10 -0
  47. package/dist/server/services/index.d.ts.map +1 -0
  48. package/dist/server/services/index.js +15 -0
  49. package/dist/server/services/index.js.map +1 -0
  50. package/dist/server/services/notify.d.ts +63 -0
  51. package/dist/server/services/notify.d.ts.map +1 -0
  52. package/dist/server/services/notify.js +105 -0
  53. package/dist/server/services/notify.js.map +1 -0
  54. package/migrations/0000_init.sql +12 -3
  55. package/migrations/0001_rls.sql +24 -0
  56. package/migrations/meta/0000_snapshot.json +40 -13
  57. package/migrations/meta/_journal.json +2 -2
  58. package/package.json +12 -9
  59. package/src/client/api.ts +1 -1
  60. package/src/client/components/AssetFormDialog.svelte +130 -47
  61. package/src/client/i18n.ts +11 -166
  62. package/src/client/index.ts +8 -1
  63. package/src/client/messages.test.ts +169 -0
  64. package/src/client/messages.ts +399 -0
  65. package/src/client/mock.test.ts +161 -0
  66. package/src/client/mock.ts +267 -45
  67. package/src/client/module.ts +22 -2
  68. package/src/client/pages/AssetsPage.svelte +358 -137
  69. package/src/client/permissions.ts +1 -1
  70. package/src/client/price.test.ts +106 -0
  71. package/src/client/price.ts +135 -0
  72. package/src/client/query.test.ts +58 -0
  73. package/src/client/query.ts +15 -2
  74. package/src/client/settings/GeneralSettings.svelte +0 -0
  75. package/src/client/settings/core-api.ts +32 -0
  76. package/src/client/widgets/OverviewWidget.svelte +16 -3
  77. package/src/contract/capabilities.ts +55 -0
  78. package/src/contract/events.ts +34 -0
  79. package/src/contract/index.ts +15 -0
  80. package/src/contract/models.ts +123 -0
  81. package/src/contract/permissions.ts +26 -0
  82. package/src/contract/router.ts +46 -0
  83. package/src/contract/settings.ts +30 -0
  84. package/src/module.test.ts +140 -7
  85. package/src/server/index.ts +16 -13
  86. package/src/server/inventory.int.test.ts +819 -0
  87. package/src/server/migrations.test.ts +138 -0
  88. package/src/server/router.ts +118 -0
  89. package/src/server/schema.ts +27 -10
  90. package/src/server/services/assets.ts +368 -0
  91. package/src/server/services/index.ts +23 -0
  92. package/src/server/services/notify.ts +151 -0
  93. package/tsconfig.base.json +22 -0
  94. package/tsconfig.client.json +1 -1
  95. package/tsconfig.json +1 -1
  96. package/vitest.config.ts +18 -3
  97. package/dist/contract.d.ts.map +0 -1
  98. package/dist/contract.js +0 -119
  99. package/dist/contract.js.map +0 -1
  100. package/dist/server/_impl.js +0 -204
  101. package/dist/server/_impl.js.map +0 -1
  102. package/src/contract.ts +0 -143
  103. package/src/server/_impl.ts +0 -275
@@ -1,54 +1,4 @@
1
1
  import { z } from 'zod';
2
- /**
3
- * What this module offers, as data.
4
- *
5
- * Imported by **both** halves — the server implements it, the client calls it — so nothing here may
6
- * touch Node. The contract is the only thing that crosses that line, which is why a procedure that
7
- * exists here and not in the router is a lie that compiles. `module.test.ts` checks exactly that.
8
- */
9
- /** Lowercase, 2-32 characters. Names the API prefix, the Postgres schema `mod_<id>` and every event. */
10
- export declare const MODULE_ID = "inventory";
11
- /**
12
- * An asset's lifecycle. `in_stock` and `assigned` follow custody (an open row in
13
- * `custody_periods` means assigned); `under_repair` follows an open repair; `retired` is set by
14
- * hand when an item leaves the company. Stored, because every list filter needs it, and kept in
15
- * step inside the same transaction that writes the row it derives from.
16
- */
17
- export declare const AssetStatus: z.ZodEnum<{
18
- in_stock: "in_stock";
19
- assigned: "assigned";
20
- under_repair: "under_repair";
21
- retired: "retired";
22
- }>;
23
- export type AssetStatus = z.infer<typeof AssetStatus>;
24
- export declare const Asset: z.ZodObject<{
25
- id: z.ZodUUID;
26
- workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
27
- code: z.ZodString;
28
- name: z.ZodString;
29
- description: z.ZodString;
30
- categoryId: z.ZodNullable<z.ZodUUID>;
31
- status: z.ZodEnum<{
32
- in_stock: "in_stock";
33
- assigned: "assigned";
34
- under_repair: "under_repair";
35
- retired: "retired";
36
- }>;
37
- custodianUserId: z.ZodNullable<z.ZodUUID>;
38
- custodySince: z.ZodNullable<z.ZodString>;
39
- serialNumber: z.ZodNullable<z.ZodString>;
40
- location: z.ZodNullable<z.ZodString>;
41
- purchasedOn: z.ZodNullable<z.ZodString>;
42
- purchasedFrom: z.ZodNullable<z.ZodString>;
43
- priceMinor: z.ZodNullable<z.ZodNumber>;
44
- currency: z.ZodNullable<z.ZodString>;
45
- warrantyUntil: z.ZodNullable<z.ZodString>;
46
- photoFileId: z.ZodNullable<z.ZodUUID>;
47
- createdAt: z.ZodString;
48
- updatedAt: z.ZodString;
49
- archivedAt: z.ZodNullable<z.ZodString>;
50
- }, z.core.$strip>;
51
- export type Asset = z.infer<typeof Asset>;
52
2
  export declare const inventoryContract: {
53
3
  assets: {
54
4
  list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
@@ -58,9 +8,13 @@ export declare const inventoryContract: {
58
8
  status: z.ZodOptional<z.ZodEnum<{
59
9
  in_stock: "in_stock";
60
10
  assigned: "assigned";
11
+ reserved: "reserved";
61
12
  under_repair: "under_repair";
13
+ lost: "lost";
62
14
  retired: "retired";
63
15
  }>>;
16
+ custodianUserId: z.ZodOptional<z.ZodUUID>;
17
+ archived: z.ZodDefault<z.ZodBoolean>;
64
18
  sort: z.ZodDefault<z.ZodEnum<{
65
19
  code: "code";
66
20
  name: "name";
@@ -79,7 +33,9 @@ export declare const inventoryContract: {
79
33
  status: z.ZodEnum<{
80
34
  in_stock: "in_stock";
81
35
  assigned: "assigned";
36
+ reserved: "reserved";
82
37
  under_repair: "under_repair";
38
+ lost: "lost";
83
39
  retired: "retired";
84
40
  }>;
85
41
  custodianUserId: z.ZodNullable<z.ZodUUID>;
@@ -92,6 +48,7 @@ export declare const inventoryContract: {
92
48
  currency: z.ZodNullable<z.ZodString>;
93
49
  warrantyUntil: z.ZodNullable<z.ZodString>;
94
50
  photoFileId: z.ZodNullable<z.ZodUUID>;
51
+ custom: z.ZodRecord<z.ZodString, z.ZodUnknown>;
95
52
  createdAt: z.ZodString;
96
53
  updatedAt: z.ZodString;
97
54
  archivedAt: z.ZodNullable<z.ZodString>;
@@ -134,7 +91,9 @@ export declare const inventoryContract: {
134
91
  status: z.ZodEnum<{
135
92
  in_stock: "in_stock";
136
93
  assigned: "assigned";
94
+ reserved: "reserved";
137
95
  under_repair: "under_repair";
96
+ lost: "lost";
138
97
  retired: "retired";
139
98
  }>;
140
99
  custodianUserId: z.ZodNullable<z.ZodUUID>;
@@ -147,6 +106,7 @@ export declare const inventoryContract: {
147
106
  currency: z.ZodNullable<z.ZodString>;
148
107
  warrantyUntil: z.ZodNullable<z.ZodString>;
149
108
  photoFileId: z.ZodNullable<z.ZodUUID>;
109
+ custom: z.ZodRecord<z.ZodString, z.ZodUnknown>;
150
110
  createdAt: z.ZodString;
151
111
  updatedAt: z.ZodString;
152
112
  archivedAt: z.ZodNullable<z.ZodString>;
@@ -176,7 +136,6 @@ export declare const inventoryContract: {
176
136
  create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
177
137
  workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
178
138
  name: z.ZodString;
179
- description: z.ZodDefault<z.ZodString>;
180
139
  categoryId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
181
140
  serialNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
182
141
  location: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -185,6 +144,8 @@ export declare const inventoryContract: {
185
144
  warrantyUntil: z.ZodOptional<z.ZodNullable<z.ZodISODate>>;
186
145
  priceMinor: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
187
146
  currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
147
+ photoFileId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
148
+ description: z.ZodDefault<z.ZodString>;
188
149
  }, z.core.$strip>, z.ZodObject<{
189
150
  id: z.ZodUUID;
190
151
  workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
@@ -195,7 +156,9 @@ export declare const inventoryContract: {
195
156
  status: z.ZodEnum<{
196
157
  in_stock: "in_stock";
197
158
  assigned: "assigned";
159
+ reserved: "reserved";
198
160
  under_repair: "under_repair";
161
+ lost: "lost";
199
162
  retired: "retired";
200
163
  }>;
201
164
  custodianUserId: z.ZodNullable<z.ZodUUID>;
@@ -208,6 +171,7 @@ export declare const inventoryContract: {
208
171
  currency: z.ZodNullable<z.ZodString>;
209
172
  warrantyUntil: z.ZodNullable<z.ZodString>;
210
173
  photoFileId: z.ZodNullable<z.ZodUUID>;
174
+ custom: z.ZodRecord<z.ZodString, z.ZodUnknown>;
211
175
  createdAt: z.ZodString;
212
176
  updatedAt: z.ZodString;
213
177
  archivedAt: z.ZodNullable<z.ZodString>;
@@ -237,7 +201,7 @@ export declare const inventoryContract: {
237
201
  update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
238
202
  workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
239
203
  name: z.ZodOptional<z.ZodString>;
240
- description: z.ZodOptional<z.ZodDefault<z.ZodString>>;
204
+ description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
241
205
  categoryId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodUUID>>>;
242
206
  serialNumber: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
243
207
  location: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
@@ -246,6 +210,7 @@ export declare const inventoryContract: {
246
210
  warrantyUntil: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodISODate>>>;
247
211
  priceMinor: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
248
212
  currency: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
213
+ photoFileId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodUUID>>>;
249
214
  assetId: z.ZodUUID;
250
215
  }, z.core.$strip>, z.ZodObject<{
251
216
  id: z.ZodUUID;
@@ -257,7 +222,9 @@ export declare const inventoryContract: {
257
222
  status: z.ZodEnum<{
258
223
  in_stock: "in_stock";
259
224
  assigned: "assigned";
225
+ reserved: "reserved";
260
226
  under_repair: "under_repair";
227
+ lost: "lost";
261
228
  retired: "retired";
262
229
  }>;
263
230
  custodianUserId: z.ZodNullable<z.ZodUUID>;
@@ -270,6 +237,7 @@ export declare const inventoryContract: {
270
237
  currency: z.ZodNullable<z.ZodString>;
271
238
  warrantyUntil: z.ZodNullable<z.ZodString>;
272
239
  photoFileId: z.ZodNullable<z.ZodUUID>;
240
+ custom: z.ZodRecord<z.ZodString, z.ZodUnknown>;
273
241
  createdAt: z.ZodString;
274
242
  updatedAt: z.ZodString;
275
243
  archivedAt: z.ZodNullable<z.ZodString>;
@@ -310,7 +278,9 @@ export declare const inventoryContract: {
310
278
  status: z.ZodEnum<{
311
279
  in_stock: "in_stock";
312
280
  assigned: "assigned";
281
+ reserved: "reserved";
313
282
  under_repair: "under_repair";
283
+ lost: "lost";
314
284
  retired: "retired";
315
285
  }>;
316
286
  custodianUserId: z.ZodNullable<z.ZodUUID>;
@@ -323,6 +293,7 @@ export declare const inventoryContract: {
323
293
  currency: z.ZodNullable<z.ZodString>;
324
294
  warrantyUntil: z.ZodNullable<z.ZodString>;
325
295
  photoFileId: z.ZodNullable<z.ZodUUID>;
296
+ custom: z.ZodRecord<z.ZodString, z.ZodUnknown>;
326
297
  createdAt: z.ZodString;
327
298
  updatedAt: z.ZodString;
328
299
  archivedAt: z.ZodNullable<z.ZodString>;
@@ -352,36 +323,4 @@ export declare const inventoryContract: {
352
323
  };
353
324
  };
354
325
  export type InventoryContract = typeof inventoryContract;
355
- /** `<module>.<entity>.<action>`. Anything that emits one declares it here. Payloads carry ids, never rows. */
356
- export declare const inventoryEvents: {
357
- assetCreated: import("@kernhq/contracts").EventDef<"inventory.asset.created", z.ZodObject<{
358
- assetId: z.ZodUUID;
359
- workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
360
- }, z.core.$strip>>;
361
- assetUpdated: import("@kernhq/contracts").EventDef<"inventory.asset.updated", z.ZodObject<{
362
- assetId: z.ZodUUID;
363
- workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
364
- }, z.core.$strip>>;
365
- assetArchived: import("@kernhq/contracts").EventDef<"inventory.asset.archived", z.ZodObject<{
366
- assetId: z.ZodUUID;
367
- workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
368
- }, z.core.$strip>>;
369
- };
370
- /**
371
- * `<module>.<resource>.<action>`, each with the narrowest scope that works and the roles that hold it
372
- * by default. A workspace can add or remove any of them afterwards with a custom role.
373
- */
374
- export declare const inventoryPermissions: readonly [{
375
- readonly key: "inventory.asset.view";
376
- readonly label: "View assets";
377
- readonly scope: "workspace";
378
- readonly defaultRoles: ["owner", "admin", "member", "guest"];
379
- readonly dangerous: false;
380
- }, {
381
- readonly key: "inventory.asset.manage";
382
- readonly label: "Create and edit assets";
383
- readonly scope: "workspace";
384
- readonly defaultRoles: ["owner", "admin", "member"];
385
- readonly dangerous: false;
386
- }];
387
- //# sourceMappingURL=contract.d.ts.map
326
+ //# sourceMappingURL=router.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/contract/router.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsC7B,CAAA;AACD,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAA"}
@@ -0,0 +1,42 @@
1
+ import { baseContract, PageInput, page } from '@kernhq/contracts';
2
+ import { z } from 'zod';
3
+ import { Asset, AssetCreateInput, AssetPatchInput, AssetSort, AssetStatus, ws } from './models.js';
4
+ const t = ['inventory'];
5
+ export const inventoryContract = {
6
+ assets: {
7
+ list: baseContract
8
+ .route({ method: 'GET', path: '/assets', tags: t })
9
+ .input(ws.extend({
10
+ ...PageInput.shape,
11
+ q: z.string().max(200).optional(),
12
+ categoryId: z.uuid().optional(),
13
+ status: AssetStatus.optional(),
14
+ custodianUserId: z.uuid().optional(),
15
+ /**
16
+ * Archived rows are excluded unless asked for. The page used to filter them in the
17
+ * browser, which is wrong the moment there is more than one page of them: the first
18
+ * twenty rows come back, half are dropped, and the list looks short rather than paged.
19
+ */
20
+ archived: z.boolean().default(false),
21
+ sort: AssetSort.default('recent'),
22
+ }))
23
+ .output(page(Asset)),
24
+ get: baseContract
25
+ .route({ method: 'GET', path: '/assets/{assetId}', tags: t })
26
+ .input(ws.extend({ assetId: z.uuid() }))
27
+ .output(Asset),
28
+ create: baseContract
29
+ .route({ method: 'POST', path: '/assets', tags: t })
30
+ .input(ws.extend(AssetCreateInput.shape))
31
+ .output(Asset),
32
+ update: baseContract
33
+ .route({ method: 'PATCH', path: '/assets/{assetId}', tags: t })
34
+ .input(ws.extend({ assetId: z.uuid(), ...AssetPatchInput.shape }))
35
+ .output(Asset),
36
+ archive: baseContract
37
+ .route({ method: 'POST', path: '/assets/{assetId}/archive', tags: t })
38
+ .input(ws.extend({ assetId: z.uuid(), archived: z.boolean().default(true) }))
39
+ .output(Asset),
40
+ },
41
+ };
42
+ //# sourceMappingURL=router.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"router.js","sourceRoot":"","sources":["../../src/contract/router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AACjE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA;AAElG,MAAM,CAAC,GAAG,CAAC,WAAW,CAAU,CAAA;AAEhC,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,MAAM,EAAE;QACN,IAAI,EAAE,YAAY;aACf,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;aAClD,KAAK,CACJ,EAAE,CAAC,MAAM,CAAC;YACR,GAAG,SAAS,CAAC,KAAK;YAClB,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;YACjC,UAAU,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;YAC/B,MAAM,EAAE,WAAW,CAAC,QAAQ,EAAE;YAC9B,eAAe,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;YACpC;;;;eAIG;YACH,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;YACpC,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC;SAClC,CAAC,CACH;aACA,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACtB,GAAG,EAAE,YAAY;aACd,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;aAC5D,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;aACvC,MAAM,CAAC,KAAK,CAAC;QAChB,MAAM,EAAE,YAAY;aACjB,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;aACnD,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;aACxC,MAAM,CAAC,KAAK,CAAC;QAChB,MAAM,EAAE,YAAY;aACjB,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;aAC9D,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,GAAG,eAAe,CAAC,KAAK,EAAE,CAAC,CAAC;aACjE,MAAM,CAAC,KAAK,CAAC;QAChB,OAAO,EAAE,YAAY;aAClB,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,2BAA2B,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;aACrE,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;aAC5E,MAAM,CAAC,KAAK,CAAC;KACjB;CACF,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Workspace-level settings for Inventory.
4
+ *
5
+ * Deliberately small. Nearly everything an administrator configures belongs to a category, a
6
+ * location or a field definition, because those are the things that differ between two kinds of
7
+ * item in the same company. What is left is genuinely workspace-wide.
8
+ *
9
+ * Note what is *not* here: the capability switches. Those live under a reserved `$capabilities` key
10
+ * the platform owns, so turning one off cannot collide with a settings field and cannot be dropped
11
+ * by a settings round-trip.
12
+ */
13
+ export declare const InventorySettings: z.ZodObject<{
14
+ assetCodePrefix: z.ZodDefault<z.ZodString>;
15
+ assetCodePad: z.ZodDefault<z.ZodNumber>;
16
+ }, z.core.$strip>;
17
+ export type InventorySettings = z.infer<typeof InventorySettings>;
18
+ //# sourceMappingURL=settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/contract/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB;;;iBAe5B,CAAA;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA"}
@@ -0,0 +1,29 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Workspace-level settings for Inventory.
4
+ *
5
+ * Deliberately small. Nearly everything an administrator configures belongs to a category, a
6
+ * location or a field definition, because those are the things that differ between two kinds of
7
+ * item in the same company. What is left is genuinely workspace-wide.
8
+ *
9
+ * Note what is *not* here: the capability switches. Those live under a reserved `$capabilities` key
10
+ * the platform owns, so turning one off cannot collide with a settings field and cannot be dropped
11
+ * by a settings round-trip.
12
+ */
13
+ export const InventorySettings = z.object({
14
+ /**
15
+ * What an asset tag looks like. `INV-` and 4 gives `INV-0042`.
16
+ *
17
+ * People read these off a sticker and say them out loud, so a workspace that already labels its
18
+ * laptops `LT-` should not have to keep two numbering systems in its head. The counter itself is a
19
+ * row in `mod_inventory.counters`, not a setting — a number an administrator can edit is a number
20
+ * that produces a duplicate tag.
21
+ */
22
+ assetCodePrefix: z.string().max(8).default('INV-'),
23
+ assetCodePad: z.number().int().min(1).max(10).default(4),
24
+ // `warrantyNoticeDays` used to sit here, describing a warranty sweep that has never existed —
25
+ // no job, no subscription, nothing reading the number. A setting nothing enforces is the same
26
+ // lie as a capability nothing checks: it teaches an administrator that the settings page does
27
+ // not mean anything. It comes back with the sweep.
28
+ });
29
+ //# sourceMappingURL=settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/contract/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC;;;;;;;OAOG;IACH,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IAClD,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IACxD,8FAA8F;IAC9F,8FAA8F;IAC9F,8FAA8F;IAC9F,mDAAmD;CACpD,CAAC,CAAA"}
@@ -1,3 +1,6 @@
1
- export declare const inventoryModule: import("@kernhq/kernel").ServerModule<import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>>;
1
+ export declare const inventoryModule: import("@kernhq/kernel").ServerModule<import("zod").ZodObject<{
2
+ assetCodePrefix: import("zod").ZodDefault<import("zod").ZodString>;
3
+ assetCodePad: import("zod").ZodDefault<import("zod").ZodNumber>;
4
+ }, import("zod/v4/core").$strip>>;
2
5
  export default inventoryModule;
3
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe,2IAyB1B,CAAA;AACF,eAAe,eAAe,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,eAAe;;;iCAqB1B,CAAA;AACF,eAAe,eAAe,CAAA"}
@@ -1,32 +1,28 @@
1
1
  import { dirname, join } from 'node:path';
2
2
  import { fileURLToPath } from 'node:url';
3
- import { inventoryContract, inventoryEvents, inventoryPermissions, MODULE_ID } from '../contract.js';
4
- import { defineModule, defineServerModule, implement_, packageVersion } from './_impl.js';
3
+ import { InventorySettings, inventoryCapabilities, inventoryContract, inventoryEvents, inventoryPermissions, MODULE_ID, } from '../contract/index.js';
4
+ import { defineModule, defineServerModule, inventoryRouter, packageVersion } from './router.js';
5
5
  import { schema } from './schema.js';
6
6
  export const inventoryModule = defineServerModule({
7
7
  definition: defineModule({
8
8
  id: MODULE_ID,
9
9
  name: 'Inventory',
10
10
  version: packageVersion(import.meta.url),
11
- description: 'The asset register: what the company owns, who holds each item, and everything that happened to it',
11
+ description: 'The asset register: what the company owns, item by item — tags, serial numbers, purchase and warranty details',
12
12
  icon: 'briefcase',
13
13
  permissions: inventoryPermissions,
14
+ capabilities: inventoryCapabilities,
14
15
  events: inventoryEvents,
16
+ settings: InventorySettings,
17
+ // `objectTypes` returns with the resolver that turns a mention or a link into an asset and the
18
+ // indexer that puts one in search — declaring the type with neither made both resolve to
19
+ // nothing, which reads to a user as a broken link rather than as a feature not built yet.
15
20
  }),
16
21
  /** Attached so the developer panel can check the router against what was promised. */
17
22
  contract: inventoryContract,
18
23
  schema,
19
24
  migrationsFolder: join(dirname(fileURLToPath(import.meta.url)), '../../migrations'),
20
- router: implement_,
21
- /**
22
- * What this module reacts to. The pattern may be an exact name, `module.*`, or `*`; handlers are
23
- * durable consumers in production, so one that throws is retried rather than lost.
24
- */
25
- subscriptions: {
26
- 'core.workspace.created': async (event, kernel) => {
27
- kernel.log.info({ module: MODULE_ID, event: event.name }, 'a workspace was created');
28
- },
29
- },
25
+ router: inventoryRouter,
30
26
  });
31
27
  export default inventoryModule;
32
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AACpG,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AACzF,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,MAAM,CAAC,MAAM,eAAe,GAAG,kBAAkB,CAAC;IAChD,UAAU,EAAE,YAAY,CAAC;QACvB,EAAE,EAAE,SAAS;QACb,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;QACxC,WAAW,EACT,oGAAoG;QACtG,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,oBAAoB;QACjC,MAAM,EAAE,eAAe;KACxB,CAAC;IACF,sFAAsF;IACtF,QAAQ,EAAE,iBAAiB;IAC3B,MAAM;IACN,gBAAgB,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,kBAAkB,CAAC;IACnF,MAAM,EAAE,UAAU;IAClB;;;OAGG;IACH,aAAa,EAAE;QACb,wBAAwB,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;YAChD,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,EAAE,yBAAyB,CAAC,CAAA;QACtF,CAAC;KACF;CACF,CAAC,CAAA;AACF,eAAe,eAAe,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACpB,SAAS,GACV,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC/F,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,MAAM,CAAC,MAAM,eAAe,GAAG,kBAAkB,CAAC;IAChD,UAAU,EAAE,YAAY,CAAC;QACvB,EAAE,EAAE,SAAS;QACb,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;QACxC,WAAW,EACT,+GAA+G;QACjH,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,oBAAoB;QACjC,YAAY,EAAE,qBAAqB;QACnC,MAAM,EAAE,eAAe;QACvB,QAAQ,EAAE,iBAAiB;QAC3B,+FAA+F;QAC/F,yFAAyF;QACzF,0FAA0F;KAC3F,CAAC;IACF,sFAAsF;IACtF,QAAQ,EAAE,iBAAiB;IAC3B,MAAM;IACN,gBAAgB,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,kBAAkB,CAAC;IACnF,MAAM,EAAE,eAAe;CACxB,CAAC,CAAA;AACF,eAAe,eAAe,CAAA"}
@@ -1,13 +1,17 @@
1
1
  import { defineModule, defineServerModule, type Kernel, packageVersion, type RequestContext } from '@kernhq/kernel';
2
2
  /**
3
- * The router, kept apart from `index.ts` so `module.test.ts` can walk it without booting a kernel.
3
+ * oRPC router for `/api/inventory`.
4
4
  *
5
- * Two middlewares on every procedure, and the test fails if either is missing:
6
- * `workspaceScoped` (a real membership, and the module switched on for that workspace) and
7
- * `requires` (the permission this particular call needs).
5
+ * Deliberately thin: it opens the workspace-bound transaction and hands straight over to a service,
6
+ * which is where the logic lives. Kept apart from `index.ts` so `module.test.ts` can walk it as data
7
+ * without booting a kernel.
8
+ *
9
+ * Two middlewares on every procedure, and the test fails if either is missing: `workspaceScoped`
10
+ * (a real membership, and the module switched on for that workspace) and `requires` (the permission
11
+ * this particular call needs). A capability adds a third, between them.
8
12
  */
9
13
  export { defineModule, defineServerModule, packageVersion };
10
- export declare function implement_(kernel: Kernel): {
14
+ export declare function inventoryRouter(kernel: Kernel): {
11
15
  assets: {
12
16
  list: import("@orpc/server").Procedure<import("@orpc/server").MergedInitialContext<RequestContext & Record<never, never>, RequestContext & Record<never, never> & Omit<RequestContext & Record<never, never>, keyof RequestContext> & Omit<RequestContext & Record<never, never>, "workspaceId" | "kernel" | "principal" | "requestId" | "ip" | "headers">, RequestContext>, Omit<import("@orpc/server").MergedCurrentContext<RequestContext, {
13
17
  workspaceId: string;
@@ -39,9 +43,13 @@ export declare function implement_(kernel: Kernel): {
39
43
  status: import("zod").ZodOptional<import("zod").ZodEnum<{
40
44
  in_stock: "in_stock";
41
45
  assigned: "assigned";
46
+ reserved: "reserved";
42
47
  under_repair: "under_repair";
48
+ lost: "lost";
43
49
  retired: "retired";
44
50
  }>>;
51
+ custodianUserId: import("zod").ZodOptional<import("zod").ZodUUID>;
52
+ archived: import("zod").ZodDefault<import("zod").ZodBoolean>;
45
53
  sort: import("zod").ZodDefault<import("zod").ZodEnum<{
46
54
  code: "code";
47
55
  name: "name";
@@ -60,7 +68,9 @@ export declare function implement_(kernel: Kernel): {
60
68
  status: import("zod").ZodEnum<{
61
69
  in_stock: "in_stock";
62
70
  assigned: "assigned";
71
+ reserved: "reserved";
63
72
  under_repair: "under_repair";
73
+ lost: "lost";
64
74
  retired: "retired";
65
75
  }>;
66
76
  custodianUserId: import("zod").ZodNullable<import("zod").ZodUUID>;
@@ -73,6 +83,7 @@ export declare function implement_(kernel: Kernel): {
73
83
  currency: import("zod").ZodNullable<import("zod").ZodString>;
74
84
  warrantyUntil: import("zod").ZodNullable<import("zod").ZodString>;
75
85
  photoFileId: import("zod").ZodNullable<import("zod").ZodUUID>;
86
+ custom: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
76
87
  createdAt: import("zod").ZodString;
77
88
  updatedAt: import("zod").ZodString;
78
89
  archivedAt: import("zod").ZodNullable<import("zod").ZodString>;
@@ -138,7 +149,9 @@ export declare function implement_(kernel: Kernel): {
138
149
  status: import("zod").ZodEnum<{
139
150
  in_stock: "in_stock";
140
151
  assigned: "assigned";
152
+ reserved: "reserved";
141
153
  under_repair: "under_repair";
154
+ lost: "lost";
142
155
  retired: "retired";
143
156
  }>;
144
157
  custodianUserId: import("zod").ZodNullable<import("zod").ZodUUID>;
@@ -151,6 +164,7 @@ export declare function implement_(kernel: Kernel): {
151
164
  currency: import("zod").ZodNullable<import("zod").ZodString>;
152
165
  warrantyUntil: import("zod").ZodNullable<import("zod").ZodString>;
153
166
  photoFileId: import("zod").ZodNullable<import("zod").ZodUUID>;
167
+ custom: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
154
168
  createdAt: import("zod").ZodString;
155
169
  updatedAt: import("zod").ZodString;
156
170
  archivedAt: import("zod").ZodNullable<import("zod").ZodString>;
@@ -203,7 +217,6 @@ export declare function implement_(kernel: Kernel): {
203
217
  }>, never> & Record<never, never>, import("zod").ZodObject<{
204
218
  workspaceId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "WorkspaceId", "out">;
205
219
  name: import("zod").ZodString;
206
- description: import("zod").ZodDefault<import("zod").ZodString>;
207
220
  categoryId: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodUUID>>;
208
221
  serialNumber: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
209
222
  location: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
@@ -212,6 +225,8 @@ export declare function implement_(kernel: Kernel): {
212
225
  warrantyUntil: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodISODate>>;
213
226
  priceMinor: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
214
227
  currency: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
228
+ photoFileId: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodUUID>>;
229
+ description: import("zod").ZodDefault<import("zod").ZodString>;
215
230
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
216
231
  id: import("zod").ZodUUID;
217
232
  workspaceId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "WorkspaceId", "out">;
@@ -222,7 +237,9 @@ export declare function implement_(kernel: Kernel): {
222
237
  status: import("zod").ZodEnum<{
223
238
  in_stock: "in_stock";
224
239
  assigned: "assigned";
240
+ reserved: "reserved";
225
241
  under_repair: "under_repair";
242
+ lost: "lost";
226
243
  retired: "retired";
227
244
  }>;
228
245
  custodianUserId: import("zod").ZodNullable<import("zod").ZodUUID>;
@@ -235,6 +252,7 @@ export declare function implement_(kernel: Kernel): {
235
252
  currency: import("zod").ZodNullable<import("zod").ZodString>;
236
253
  warrantyUntil: import("zod").ZodNullable<import("zod").ZodString>;
237
254
  photoFileId: import("zod").ZodNullable<import("zod").ZodUUID>;
255
+ custom: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
238
256
  createdAt: import("zod").ZodString;
239
257
  updatedAt: import("zod").ZodString;
240
258
  archivedAt: import("zod").ZodNullable<import("zod").ZodString>;
@@ -287,7 +305,7 @@ export declare function implement_(kernel: Kernel): {
287
305
  }>, never> & Record<never, never>, import("zod").ZodObject<{
288
306
  workspaceId: import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "WorkspaceId", "out">;
289
307
  name: import("zod").ZodOptional<import("zod").ZodString>;
290
- description: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodString>>;
308
+ description: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
291
309
  categoryId: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodUUID>>>;
292
310
  serialNumber: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>>;
293
311
  location: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>>;
@@ -296,6 +314,7 @@ export declare function implement_(kernel: Kernel): {
296
314
  warrantyUntil: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodISODate>>>;
297
315
  priceMinor: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>>;
298
316
  currency: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>>;
317
+ photoFileId: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodUUID>>>;
299
318
  assetId: import("zod").ZodUUID;
300
319
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
301
320
  id: import("zod").ZodUUID;
@@ -307,7 +326,9 @@ export declare function implement_(kernel: Kernel): {
307
326
  status: import("zod").ZodEnum<{
308
327
  in_stock: "in_stock";
309
328
  assigned: "assigned";
329
+ reserved: "reserved";
310
330
  under_repair: "under_repair";
331
+ lost: "lost";
311
332
  retired: "retired";
312
333
  }>;
313
334
  custodianUserId: import("zod").ZodNullable<import("zod").ZodUUID>;
@@ -320,6 +341,7 @@ export declare function implement_(kernel: Kernel): {
320
341
  currency: import("zod").ZodNullable<import("zod").ZodString>;
321
342
  warrantyUntil: import("zod").ZodNullable<import("zod").ZodString>;
322
343
  photoFileId: import("zod").ZodNullable<import("zod").ZodUUID>;
344
+ custom: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
323
345
  createdAt: import("zod").ZodString;
324
346
  updatedAt: import("zod").ZodString;
325
347
  archivedAt: import("zod").ZodNullable<import("zod").ZodString>;
@@ -383,7 +405,9 @@ export declare function implement_(kernel: Kernel): {
383
405
  status: import("zod").ZodEnum<{
384
406
  in_stock: "in_stock";
385
407
  assigned: "assigned";
408
+ reserved: "reserved";
386
409
  under_repair: "under_repair";
410
+ lost: "lost";
387
411
  retired: "retired";
388
412
  }>;
389
413
  custodianUserId: import("zod").ZodNullable<import("zod").ZodUUID>;
@@ -396,6 +420,7 @@ export declare function implement_(kernel: Kernel): {
396
420
  currency: import("zod").ZodNullable<import("zod").ZodString>;
397
421
  warrantyUntil: import("zod").ZodNullable<import("zod").ZodString>;
398
422
  photoFileId: import("zod").ZodNullable<import("zod").ZodUUID>;
423
+ custom: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
399
424
  createdAt: import("zod").ZodString;
400
425
  updatedAt: import("zod").ZodString;
401
426
  archivedAt: import("zod").ZodNullable<import("zod").ZodString>;
@@ -424,4 +449,4 @@ export declare function implement_(kernel: Kernel): {
424
449
  }>>, Record<never, never>>;
425
450
  };
426
451
  };
427
- //# sourceMappingURL=_impl.d.ts.map
452
+ //# sourceMappingURL=router.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"_impl.d.ts","sourceRoot":"","sources":["../../src/server/_impl.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,kBAAkB,EAElB,KAAK,MAAM,EACX,cAAc,EACd,KAAK,cAAc,EAKpB,MAAM,gBAAgB,CAAA;AAMvB;;;;;;GAMG;AACH,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAA;AAkD3D,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwMxC"}
1
+ {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/server/router.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,KAAK,MAAM,EACX,cAAc,EACd,KAAK,cAAc,EAIpB,MAAM,gBAAgB,CAAA;AAMvB;;;;;;;;;;GAUG;AACH,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAA;AAI3D,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsF7C"}