@happyvertical/smrt-inventory 0.51.9 → 0.51.10

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.
@@ -3,12 +3,12 @@
3
3
  "sensitiveFieldsExcluded": true,
4
4
  "generatedAt": "1970-01-01T00:00:00.000Z",
5
5
  "packageName": "@happyvertical/smrt-inventory",
6
- "packageVersion": "0.51.9",
6
+ "packageVersion": "0.51.10",
7
7
  "sourceManifestPath": "dist/manifest.json",
8
8
  "agentDocPath": "AGENTS.md",
9
9
  "sourceHashes": {
10
- "manifest": "dffd2d1d534400f894145987b98f44859217af50df54b9035152d847e2ce4497",
11
- "packageJson": "91bdbca896a32694596c3b94891ef40475b790f23bf5e613b318a472ba7b3f52",
10
+ "manifest": "7558fdc40da8d260b579d67c6b111866906cb368fc0775d831b666962ec136a9",
11
+ "packageJson": "7d9ab0a2943f2ec3dc18a12a6f34d8f050b1fe7575568b02efc873eb37eef1b4",
12
12
  "agents": "a771bf16d21cabbe43a77d5cb87ca7dedbf2e68d1928cf804cf4fefaad7a765f"
13
13
  },
14
14
  "exports": [
@@ -51,140 +51,134 @@
51
51
  ],
52
52
  "objects": [
53
53
  {
54
- "name": "InventoryLocation",
55
- "qualifiedName": "@happyvertical/smrt-inventory:InventoryLocation",
54
+ "name": "InventoryLocationCollection",
55
+ "qualifiedName": "@happyvertical/smrt-inventory:InventoryLocationCollection",
56
56
  "collection": "inventorylocations",
57
57
  "tableName": "inventory_locations",
58
58
  "packageName": "@happyvertical/smrt-inventory",
59
- "extends": "SmrtObject",
60
- "fields": [
61
- {
62
- "name": "tenantId",
63
- "type": "text",
64
- "required": false,
65
- "columnType": "UUID"
66
- },
67
- {
68
- "name": "code",
69
- "type": "text",
70
- "required": true,
71
- "columnType": "TEXT",
72
- "default": ""
73
- },
59
+ "extends": "SmrtCollection",
60
+ "fields": [],
61
+ "relationships": [],
62
+ "methods": [
63
+ "findActive",
64
+ "findByCode",
65
+ "findByKind",
66
+ "findByPlace"
67
+ ],
68
+ "methodSignatures": [
74
69
  {
75
- "name": "name",
76
- "type": "text",
77
- "required": false,
78
- "columnType": "TEXT",
79
- "default": ""
70
+ "name": "findActive",
71
+ "async": true,
72
+ "params": [
73
+ "kind?: InventoryLocationKind"
74
+ ],
75
+ "returns": "Promise<InventoryLocation[]>"
80
76
  },
81
77
  {
82
- "name": "kind",
83
- "type": "text",
84
- "required": false,
85
- "columnType": "TEXT",
86
- "default": "warehouse"
78
+ "name": "findByCode",
79
+ "async": true,
80
+ "params": [
81
+ "code: string"
82
+ ],
83
+ "returns": "Promise<InventoryLocation | null>"
87
84
  },
88
85
  {
89
- "name": "placeId",
90
- "type": "text",
91
- "required": false,
92
- "columnType": "TEXT",
93
- "default": ""
86
+ "name": "findByKind",
87
+ "async": true,
88
+ "params": [
89
+ "kind: InventoryLocationKind"
90
+ ],
91
+ "returns": "Promise<InventoryLocation[]>"
94
92
  },
95
93
  {
96
- "name": "active",
97
- "type": "boolean",
98
- "required": false,
99
- "columnType": "BOOLEAN",
100
- "default": true
94
+ "name": "findByPlace",
95
+ "async": true,
96
+ "params": [
97
+ "placeId: string"
98
+ ],
99
+ "returns": "Promise<InventoryLocation[]>"
101
100
  }
102
101
  ],
103
- "relationships": [],
104
- "methods": [],
105
- "tenant": {
106
- "scoped": true,
107
- "mode": "optional",
108
- "field": "tenantId"
109
- },
110
- "conflictColumns": [
111
- "code",
112
- "tenant_id"
113
- ],
114
102
  "surfaces": [
115
103
  {
116
104
  "kind": "api",
117
- "name": "inventorylocations.list",
118
- "operation": "list",
119
- "objectName": "@happyvertical/smrt-inventory:InventoryLocation",
120
- "path": "/inventorylocations",
121
- "method": "GET"
105
+ "name": "inventorylocations.findByCode",
106
+ "operation": "findByCode",
107
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocationCollection",
108
+ "path": "/inventorylocations/findByCode",
109
+ "method": "POST"
122
110
  },
123
111
  {
124
112
  "kind": "api",
125
- "name": "inventorylocations.get",
126
- "operation": "get",
127
- "objectName": "@happyvertical/smrt-inventory:InventoryLocation",
128
- "path": "/inventorylocations/[id]",
129
- "method": "GET"
113
+ "name": "inventorylocations.findByKind",
114
+ "operation": "findByKind",
115
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocationCollection",
116
+ "path": "/inventorylocations/findByKind",
117
+ "method": "POST"
130
118
  },
131
119
  {
132
120
  "kind": "api",
133
- "name": "inventorylocations.create",
134
- "operation": "create",
135
- "objectName": "@happyvertical/smrt-inventory:InventoryLocation",
136
- "path": "/inventorylocations",
121
+ "name": "inventorylocations.findByPlace",
122
+ "operation": "findByPlace",
123
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocationCollection",
124
+ "path": "/inventorylocations/findByPlace",
137
125
  "method": "POST"
138
126
  },
139
127
  {
140
128
  "kind": "api",
141
- "name": "inventorylocations.update",
142
- "operation": "update",
143
- "objectName": "@happyvertical/smrt-inventory:InventoryLocation",
144
- "path": "/inventorylocations/[id]",
145
- "method": "PATCH"
129
+ "name": "inventorylocations.findActive",
130
+ "operation": "findActive",
131
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocationCollection",
132
+ "path": "/inventorylocations/findActive",
133
+ "method": "POST"
146
134
  },
147
135
  {
148
136
  "kind": "cli",
149
- "name": "inventorylocation_list",
150
- "operation": "list",
151
- "objectName": "@happyvertical/smrt-inventory:InventoryLocation"
137
+ "name": "inventorylocationcollection_findByCode",
138
+ "operation": "findByCode",
139
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocationCollection"
152
140
  },
153
141
  {
154
142
  "kind": "cli",
155
- "name": "inventorylocation_get",
156
- "operation": "get",
157
- "objectName": "@happyvertical/smrt-inventory:InventoryLocation"
143
+ "name": "inventorylocationcollection_findByKind",
144
+ "operation": "findByKind",
145
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocationCollection"
158
146
  },
159
147
  {
160
148
  "kind": "cli",
161
- "name": "inventorylocation_create",
162
- "operation": "create",
163
- "objectName": "@happyvertical/smrt-inventory:InventoryLocation"
149
+ "name": "inventorylocationcollection_findByPlace",
150
+ "operation": "findByPlace",
151
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocationCollection"
164
152
  },
165
153
  {
166
154
  "kind": "cli",
167
- "name": "inventorylocation_update",
168
- "operation": "update",
169
- "objectName": "@happyvertical/smrt-inventory:InventoryLocation"
155
+ "name": "inventorylocationcollection_findActive",
156
+ "operation": "findActive",
157
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocationCollection"
170
158
  },
171
159
  {
172
- "kind": "cli",
173
- "name": "inventorylocation_delete",
174
- "operation": "delete",
175
- "objectName": "@happyvertical/smrt-inventory:InventoryLocation"
160
+ "kind": "mcp",
161
+ "name": "inventorylocationcollection_findbycode",
162
+ "operation": "findByCode",
163
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocationCollection"
176
164
  },
177
165
  {
178
166
  "kind": "mcp",
179
- "name": "inventorylocation_list",
180
- "operation": "list",
181
- "objectName": "@happyvertical/smrt-inventory:InventoryLocation"
167
+ "name": "inventorylocationcollection_findbykind",
168
+ "operation": "findByKind",
169
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocationCollection"
182
170
  },
183
171
  {
184
172
  "kind": "mcp",
185
- "name": "inventorylocation_get",
186
- "operation": "get",
187
- "objectName": "@happyvertical/smrt-inventory:InventoryLocation"
173
+ "name": "inventorylocationcollection_findbyplace",
174
+ "operation": "findByPlace",
175
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocationCollection"
176
+ },
177
+ {
178
+ "kind": "mcp",
179
+ "name": "inventorylocationcollection_findactive",
180
+ "operation": "findActive",
181
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocationCollection"
188
182
  }
189
183
  ],
190
184
  "relationshipFeatures": [
@@ -194,239 +188,167 @@
194
188
  "risks": []
195
189
  },
196
190
  {
197
- "name": "StockLevel",
198
- "qualifiedName": "@happyvertical/smrt-inventory:StockLevel",
191
+ "name": "StockLevelCollection",
192
+ "qualifiedName": "@happyvertical/smrt-inventory:StockLevelCollection",
199
193
  "collection": "stocklevels",
200
194
  "tableName": "inventory_stock_levels",
201
195
  "packageName": "@happyvertical/smrt-inventory",
202
- "extends": "SmrtObject",
203
- "fields": [
196
+ "extends": "SmrtCollection",
197
+ "fields": [],
198
+ "relationships": [],
199
+ "methods": [
200
+ "findByLocation",
201
+ "findBySku",
202
+ "getLevel",
203
+ "totalForLocation",
204
+ "totalForSku"
205
+ ],
206
+ "methodSignatures": [
204
207
  {
205
- "name": "tenantId",
206
- "type": "text",
207
- "required": false,
208
- "columnType": "UUID"
208
+ "name": "findByLocation",
209
+ "async": true,
210
+ "params": [
211
+ "locationId: string"
212
+ ],
213
+ "returns": "Promise<StockLevel[]>"
209
214
  },
210
215
  {
211
- "name": "skuId",
212
- "type": "text",
213
- "required": true,
214
- "columnType": "TEXT",
215
- "default": ""
216
+ "name": "findBySku",
217
+ "async": true,
218
+ "params": [
219
+ "skuId: string"
220
+ ],
221
+ "returns": "Promise<StockLevel[]>"
216
222
  },
217
223
  {
218
- "name": "locationId",
219
- "type": "text",
220
- "required": true,
221
- "columnType": "TEXT",
222
- "default": ""
224
+ "name": "getLevel",
225
+ "async": true,
226
+ "params": [
227
+ "skuId: string",
228
+ "locationId: string",
229
+ "state?: StockState"
230
+ ],
231
+ "returns": "Promise<StockLevel | null>"
223
232
  },
224
233
  {
225
- "name": "state",
226
- "type": "text",
227
- "required": true,
228
- "columnType": "TEXT",
229
- "default": "available"
234
+ "name": "totalForLocation",
235
+ "async": true,
236
+ "params": [
237
+ "locationId: string",
238
+ "state?: StockState"
239
+ ],
240
+ "returns": "Promise<number>"
230
241
  },
231
242
  {
232
- "name": "qty",
233
- "type": "decimal",
234
- "required": false,
235
- "columnType": "REAL"
243
+ "name": "totalForSku",
244
+ "async": true,
245
+ "params": [
246
+ "skuId: string",
247
+ "state?: StockState"
248
+ ],
249
+ "returns": "Promise<number>"
236
250
  }
237
251
  ],
238
- "relationships": [],
239
- "methods": [],
240
- "tenant": {
241
- "scoped": true,
242
- "mode": "optional",
243
- "field": "tenantId"
244
- },
245
- "conflictColumns": [
246
- "sku_id",
247
- "location_id",
248
- "state",
249
- "tenant_id"
250
- ],
251
252
  "surfaces": [
252
253
  {
253
254
  "kind": "api",
254
- "name": "stocklevels.list",
255
- "operation": "list",
256
- "objectName": "@happyvertical/smrt-inventory:StockLevel",
257
- "path": "/stocklevels",
258
- "method": "GET"
255
+ "name": "stocklevels.getLevel",
256
+ "operation": "getLevel",
257
+ "objectName": "@happyvertical/smrt-inventory:StockLevelCollection",
258
+ "path": "/stocklevels/getLevel",
259
+ "method": "POST"
259
260
  },
260
261
  {
261
262
  "kind": "api",
262
- "name": "stocklevels.get",
263
- "operation": "get",
264
- "objectName": "@happyvertical/smrt-inventory:StockLevel",
265
- "path": "/stocklevels/[id]",
266
- "method": "GET"
267
- },
268
- {
269
- "kind": "cli",
270
- "name": "stocklevel_list",
271
- "operation": "list",
272
- "objectName": "@happyvertical/smrt-inventory:StockLevel"
273
- },
274
- {
275
- "kind": "cli",
276
- "name": "stocklevel_get",
277
- "operation": "get",
278
- "objectName": "@happyvertical/smrt-inventory:StockLevel"
279
- },
280
- {
281
- "kind": "mcp",
282
- "name": "stocklevel_list",
283
- "operation": "list",
284
- "objectName": "@happyvertical/smrt-inventory:StockLevel"
285
- },
286
- {
287
- "kind": "mcp",
288
- "name": "stocklevel_get",
289
- "operation": "get",
290
- "objectName": "@happyvertical/smrt-inventory:StockLevel"
291
- }
292
- ],
293
- "relationshipFeatures": [
294
- "uuidColumns"
295
- ],
296
- "tags": [],
297
- "risks": []
298
- },
299
- {
300
- "name": "StockMovement",
301
- "qualifiedName": "@happyvertical/smrt-inventory:StockMovement",
302
- "collection": "stockmovements",
303
- "tableName": "inventory_stock_movements",
304
- "packageName": "@happyvertical/smrt-inventory",
305
- "extends": "SmrtObject",
306
- "fields": [
307
- {
308
- "name": "tenantId",
309
- "type": "text",
310
- "required": false,
311
- "columnType": "UUID"
312
- },
313
- {
314
- "name": "skuId",
315
- "type": "text",
316
- "required": true,
317
- "columnType": "TEXT",
318
- "default": ""
319
- },
320
- {
321
- "name": "locationId",
322
- "type": "text",
323
- "required": true,
324
- "columnType": "TEXT",
325
- "default": ""
263
+ "name": "stocklevels.findBySku",
264
+ "operation": "findBySku",
265
+ "objectName": "@happyvertical/smrt-inventory:StockLevelCollection",
266
+ "path": "/stocklevels/findBySku",
267
+ "method": "POST"
326
268
  },
327
269
  {
328
- "name": "fromState",
329
- "type": "text",
330
- "required": false,
331
- "columnType": "TEXT"
270
+ "kind": "api",
271
+ "name": "stocklevels.findByLocation",
272
+ "operation": "findByLocation",
273
+ "objectName": "@happyvertical/smrt-inventory:StockLevelCollection",
274
+ "path": "/stocklevels/findByLocation",
275
+ "method": "POST"
332
276
  },
333
277
  {
334
- "name": "toState",
335
- "type": "text",
336
- "required": false,
337
- "columnType": "TEXT"
278
+ "kind": "api",
279
+ "name": "stocklevels.totalForSku",
280
+ "operation": "totalForSku",
281
+ "objectName": "@happyvertical/smrt-inventory:StockLevelCollection",
282
+ "path": "/stocklevels/totalForSku",
283
+ "method": "POST"
338
284
  },
339
285
  {
340
- "name": "qty",
341
- "type": "decimal",
342
- "required": false,
343
- "columnType": "REAL"
286
+ "kind": "api",
287
+ "name": "stocklevels.totalForLocation",
288
+ "operation": "totalForLocation",
289
+ "objectName": "@happyvertical/smrt-inventory:StockLevelCollection",
290
+ "path": "/stocklevels/totalForLocation",
291
+ "method": "POST"
344
292
  },
345
293
  {
346
- "name": "reasonCode",
347
- "type": "text",
348
- "required": true,
349
- "columnType": "TEXT",
350
- "default": "adjustment"
294
+ "kind": "cli",
295
+ "name": "stocklevelcollection_getLevel",
296
+ "operation": "getLevel",
297
+ "objectName": "@happyvertical/smrt-inventory:StockLevelCollection"
351
298
  },
352
299
  {
353
- "name": "sourceType",
354
- "type": "text",
355
- "required": false,
356
- "columnType": "TEXT",
357
- "default": ""
300
+ "kind": "cli",
301
+ "name": "stocklevelcollection_findBySku",
302
+ "operation": "findBySku",
303
+ "objectName": "@happyvertical/smrt-inventory:StockLevelCollection"
358
304
  },
359
305
  {
360
- "name": "sourceId",
361
- "type": "text",
362
- "required": false,
363
- "columnType": "TEXT",
364
- "default": ""
306
+ "kind": "cli",
307
+ "name": "stocklevelcollection_findByLocation",
308
+ "operation": "findByLocation",
309
+ "objectName": "@happyvertical/smrt-inventory:StockLevelCollection"
365
310
  },
366
311
  {
367
- "name": "note",
368
- "type": "text",
369
- "required": false,
370
- "columnType": "TEXT",
371
- "default": ""
312
+ "kind": "cli",
313
+ "name": "stocklevelcollection_totalForSku",
314
+ "operation": "totalForSku",
315
+ "objectName": "@happyvertical/smrt-inventory:StockLevelCollection"
372
316
  },
373
317
  {
374
- "name": "occurredAt",
375
- "type": "datetime",
376
- "required": false,
377
- "columnType": "TIMESTAMP"
378
- }
379
- ],
380
- "relationships": [],
381
- "methods": [],
382
- "tenant": {
383
- "scoped": true,
384
- "mode": "optional",
385
- "field": "tenantId"
386
- },
387
- "conflictColumns": [
388
- "id"
389
- ],
390
- "surfaces": [
391
- {
392
- "kind": "api",
393
- "name": "stockmovements.list",
394
- "operation": "list",
395
- "objectName": "@happyvertical/smrt-inventory:StockMovement",
396
- "path": "/stockmovements",
397
- "method": "GET"
318
+ "kind": "cli",
319
+ "name": "stocklevelcollection_totalForLocation",
320
+ "operation": "totalForLocation",
321
+ "objectName": "@happyvertical/smrt-inventory:StockLevelCollection"
398
322
  },
399
323
  {
400
- "kind": "api",
401
- "name": "stockmovements.get",
402
- "operation": "get",
403
- "objectName": "@happyvertical/smrt-inventory:StockMovement",
404
- "path": "/stockmovements/[id]",
405
- "method": "GET"
324
+ "kind": "mcp",
325
+ "name": "stocklevelcollection_getlevel",
326
+ "operation": "getLevel",
327
+ "objectName": "@happyvertical/smrt-inventory:StockLevelCollection"
406
328
  },
407
329
  {
408
- "kind": "cli",
409
- "name": "stockmovement_list",
410
- "operation": "list",
411
- "objectName": "@happyvertical/smrt-inventory:StockMovement"
330
+ "kind": "mcp",
331
+ "name": "stocklevelcollection_findbysku",
332
+ "operation": "findBySku",
333
+ "objectName": "@happyvertical/smrt-inventory:StockLevelCollection"
412
334
  },
413
335
  {
414
- "kind": "cli",
415
- "name": "stockmovement_get",
416
- "operation": "get",
417
- "objectName": "@happyvertical/smrt-inventory:StockMovement"
336
+ "kind": "mcp",
337
+ "name": "stocklevelcollection_findbylocation",
338
+ "operation": "findByLocation",
339
+ "objectName": "@happyvertical/smrt-inventory:StockLevelCollection"
418
340
  },
419
341
  {
420
342
  "kind": "mcp",
421
- "name": "stockmovement_list",
422
- "operation": "list",
423
- "objectName": "@happyvertical/smrt-inventory:StockMovement"
343
+ "name": "stocklevelcollection_totalforsku",
344
+ "operation": "totalForSku",
345
+ "objectName": "@happyvertical/smrt-inventory:StockLevelCollection"
424
346
  },
425
347
  {
426
348
  "kind": "mcp",
427
- "name": "stockmovement_get",
428
- "operation": "get",
429
- "objectName": "@happyvertical/smrt-inventory:StockMovement"
349
+ "name": "stocklevelcollection_totalforlocation",
350
+ "operation": "totalForLocation",
351
+ "objectName": "@happyvertical/smrt-inventory:StockLevelCollection"
430
352
  }
431
353
  ],
432
354
  "relationshipFeatures": [
@@ -436,134 +358,135 @@
436
358
  "risks": []
437
359
  },
438
360
  {
439
- "name": "InventoryLocationCollection",
440
- "qualifiedName": "@happyvertical/smrt-inventory:InventoryLocationCollection",
441
- "collection": "inventorylocations",
442
- "tableName": "inventory_locations",
361
+ "name": "StockMovementCollection",
362
+ "qualifiedName": "@happyvertical/smrt-inventory:StockMovementCollection",
363
+ "collection": "stockmovements",
364
+ "tableName": "inventory_stock_movements",
443
365
  "packageName": "@happyvertical/smrt-inventory",
444
366
  "extends": "SmrtCollection",
445
367
  "fields": [],
446
368
  "relationships": [],
447
369
  "methods": [
448
- "findActive",
449
- "findByCode",
450
- "findByKind",
451
- "findByPlace"
370
+ "findByLocation",
371
+ "findByReason",
372
+ "findBySku",
373
+ "findBySource"
452
374
  ],
453
375
  "methodSignatures": [
454
376
  {
455
- "name": "findActive",
377
+ "name": "findByLocation",
456
378
  "async": true,
457
379
  "params": [
458
- "kind?: InventoryLocationKind"
380
+ "locationId: string"
459
381
  ],
460
- "returns": "Promise<InventoryLocation[]>"
382
+ "returns": "Promise<StockMovement[]>"
461
383
  },
462
384
  {
463
- "name": "findByCode",
385
+ "name": "findByReason",
464
386
  "async": true,
465
387
  "params": [
466
- "code: string"
388
+ "reasonCode: StockMovementReason"
467
389
  ],
468
- "returns": "Promise<InventoryLocation | null>"
390
+ "returns": "Promise<StockMovement[]>"
469
391
  },
470
392
  {
471
- "name": "findByKind",
393
+ "name": "findBySku",
472
394
  "async": true,
473
395
  "params": [
474
- "kind: InventoryLocationKind"
396
+ "skuId: string"
475
397
  ],
476
- "returns": "Promise<InventoryLocation[]>"
398
+ "returns": "Promise<StockMovement[]>"
477
399
  },
478
400
  {
479
- "name": "findByPlace",
401
+ "name": "findBySource",
480
402
  "async": true,
481
403
  "params": [
482
- "placeId: string"
404
+ "sourceType: string",
405
+ "sourceId: string"
483
406
  ],
484
- "returns": "Promise<InventoryLocation[]>"
407
+ "returns": "Promise<StockMovement[]>"
485
408
  }
486
409
  ],
487
410
  "surfaces": [
488
411
  {
489
412
  "kind": "api",
490
- "name": "inventorylocations.findByCode",
491
- "operation": "findByCode",
492
- "objectName": "@happyvertical/smrt-inventory:InventoryLocationCollection",
493
- "path": "/inventorylocations/findByCode",
413
+ "name": "stockmovements.findBySku",
414
+ "operation": "findBySku",
415
+ "objectName": "@happyvertical/smrt-inventory:StockMovementCollection",
416
+ "path": "/stockmovements/findBySku",
494
417
  "method": "POST"
495
418
  },
496
419
  {
497
420
  "kind": "api",
498
- "name": "inventorylocations.findByKind",
499
- "operation": "findByKind",
500
- "objectName": "@happyvertical/smrt-inventory:InventoryLocationCollection",
501
- "path": "/inventorylocations/findByKind",
421
+ "name": "stockmovements.findByLocation",
422
+ "operation": "findByLocation",
423
+ "objectName": "@happyvertical/smrt-inventory:StockMovementCollection",
424
+ "path": "/stockmovements/findByLocation",
502
425
  "method": "POST"
503
426
  },
504
427
  {
505
428
  "kind": "api",
506
- "name": "inventorylocations.findByPlace",
507
- "operation": "findByPlace",
508
- "objectName": "@happyvertical/smrt-inventory:InventoryLocationCollection",
509
- "path": "/inventorylocations/findByPlace",
429
+ "name": "stockmovements.findBySource",
430
+ "operation": "findBySource",
431
+ "objectName": "@happyvertical/smrt-inventory:StockMovementCollection",
432
+ "path": "/stockmovements/findBySource",
510
433
  "method": "POST"
511
434
  },
512
435
  {
513
436
  "kind": "api",
514
- "name": "inventorylocations.findActive",
515
- "operation": "findActive",
516
- "objectName": "@happyvertical/smrt-inventory:InventoryLocationCollection",
517
- "path": "/inventorylocations/findActive",
437
+ "name": "stockmovements.findByReason",
438
+ "operation": "findByReason",
439
+ "objectName": "@happyvertical/smrt-inventory:StockMovementCollection",
440
+ "path": "/stockmovements/findByReason",
518
441
  "method": "POST"
519
442
  },
520
443
  {
521
444
  "kind": "cli",
522
- "name": "inventorylocationcollection_findByCode",
523
- "operation": "findByCode",
524
- "objectName": "@happyvertical/smrt-inventory:InventoryLocationCollection"
445
+ "name": "stockmovementcollection_findBySku",
446
+ "operation": "findBySku",
447
+ "objectName": "@happyvertical/smrt-inventory:StockMovementCollection"
525
448
  },
526
449
  {
527
450
  "kind": "cli",
528
- "name": "inventorylocationcollection_findByKind",
529
- "operation": "findByKind",
530
- "objectName": "@happyvertical/smrt-inventory:InventoryLocationCollection"
451
+ "name": "stockmovementcollection_findByLocation",
452
+ "operation": "findByLocation",
453
+ "objectName": "@happyvertical/smrt-inventory:StockMovementCollection"
531
454
  },
532
455
  {
533
456
  "kind": "cli",
534
- "name": "inventorylocationcollection_findByPlace",
535
- "operation": "findByPlace",
536
- "objectName": "@happyvertical/smrt-inventory:InventoryLocationCollection"
457
+ "name": "stockmovementcollection_findBySource",
458
+ "operation": "findBySource",
459
+ "objectName": "@happyvertical/smrt-inventory:StockMovementCollection"
537
460
  },
538
461
  {
539
462
  "kind": "cli",
540
- "name": "inventorylocationcollection_findActive",
541
- "operation": "findActive",
542
- "objectName": "@happyvertical/smrt-inventory:InventoryLocationCollection"
463
+ "name": "stockmovementcollection_findByReason",
464
+ "operation": "findByReason",
465
+ "objectName": "@happyvertical/smrt-inventory:StockMovementCollection"
543
466
  },
544
467
  {
545
468
  "kind": "mcp",
546
- "name": "inventorylocationcollection_findbycode",
547
- "operation": "findByCode",
548
- "objectName": "@happyvertical/smrt-inventory:InventoryLocationCollection"
469
+ "name": "stockmovementcollection_findbysku",
470
+ "operation": "findBySku",
471
+ "objectName": "@happyvertical/smrt-inventory:StockMovementCollection"
549
472
  },
550
473
  {
551
474
  "kind": "mcp",
552
- "name": "inventorylocationcollection_findbykind",
553
- "operation": "findByKind",
554
- "objectName": "@happyvertical/smrt-inventory:InventoryLocationCollection"
475
+ "name": "stockmovementcollection_findbylocation",
476
+ "operation": "findByLocation",
477
+ "objectName": "@happyvertical/smrt-inventory:StockMovementCollection"
555
478
  },
556
479
  {
557
480
  "kind": "mcp",
558
- "name": "inventorylocationcollection_findbyplace",
559
- "operation": "findByPlace",
560
- "objectName": "@happyvertical/smrt-inventory:InventoryLocationCollection"
481
+ "name": "stockmovementcollection_findbysource",
482
+ "operation": "findBySource",
483
+ "objectName": "@happyvertical/smrt-inventory:StockMovementCollection"
561
484
  },
562
485
  {
563
486
  "kind": "mcp",
564
- "name": "inventorylocationcollection_findactive",
565
- "operation": "findActive",
566
- "objectName": "@happyvertical/smrt-inventory:InventoryLocationCollection"
487
+ "name": "stockmovementcollection_findbyreason",
488
+ "operation": "findByReason",
489
+ "objectName": "@happyvertical/smrt-inventory:StockMovementCollection"
567
490
  }
568
491
  ],
569
492
  "relationshipFeatures": [
@@ -573,167 +496,140 @@
573
496
  "risks": []
574
497
  },
575
498
  {
576
- "name": "StockLevelCollection",
577
- "qualifiedName": "@happyvertical/smrt-inventory:StockLevelCollection",
578
- "collection": "stocklevels",
579
- "tableName": "inventory_stock_levels",
499
+ "name": "InventoryLocation",
500
+ "qualifiedName": "@happyvertical/smrt-inventory:InventoryLocation",
501
+ "collection": "inventorylocations",
502
+ "tableName": "inventory_locations",
580
503
  "packageName": "@happyvertical/smrt-inventory",
581
- "extends": "SmrtCollection",
582
- "fields": [],
583
- "relationships": [],
584
- "methods": [
585
- "findByLocation",
586
- "findBySku",
587
- "getLevel",
588
- "totalForLocation",
589
- "totalForSku"
590
- ],
591
- "methodSignatures": [
504
+ "extends": "SmrtObject",
505
+ "fields": [
592
506
  {
593
- "name": "findByLocation",
594
- "async": true,
595
- "params": [
596
- "locationId: string"
597
- ],
598
- "returns": "Promise<StockLevel[]>"
507
+ "name": "tenantId",
508
+ "type": "text",
509
+ "required": false,
510
+ "columnType": "UUID"
599
511
  },
600
512
  {
601
- "name": "findBySku",
602
- "async": true,
603
- "params": [
604
- "skuId: string"
605
- ],
606
- "returns": "Promise<StockLevel[]>"
513
+ "name": "code",
514
+ "type": "text",
515
+ "required": true,
516
+ "columnType": "TEXT",
517
+ "default": ""
607
518
  },
608
519
  {
609
- "name": "getLevel",
610
- "async": true,
611
- "params": [
612
- "skuId: string",
613
- "locationId: string",
614
- "state?: StockState"
615
- ],
616
- "returns": "Promise<StockLevel | null>"
520
+ "name": "name",
521
+ "type": "text",
522
+ "required": false,
523
+ "columnType": "TEXT",
524
+ "default": ""
617
525
  },
618
526
  {
619
- "name": "totalForLocation",
620
- "async": true,
621
- "params": [
622
- "locationId: string",
623
- "state?: StockState"
624
- ],
625
- "returns": "Promise<number>"
527
+ "name": "kind",
528
+ "type": "text",
529
+ "required": false,
530
+ "columnType": "TEXT",
531
+ "default": "warehouse"
626
532
  },
627
533
  {
628
- "name": "totalForSku",
629
- "async": true,
630
- "params": [
631
- "skuId: string",
632
- "state?: StockState"
633
- ],
634
- "returns": "Promise<number>"
534
+ "name": "placeId",
535
+ "type": "text",
536
+ "required": false,
537
+ "columnType": "TEXT",
538
+ "default": ""
539
+ },
540
+ {
541
+ "name": "active",
542
+ "type": "boolean",
543
+ "required": false,
544
+ "columnType": "BOOLEAN",
545
+ "default": true
635
546
  }
636
547
  ],
548
+ "relationships": [],
549
+ "methods": [],
550
+ "tenant": {
551
+ "scoped": true,
552
+ "mode": "optional",
553
+ "field": "tenantId"
554
+ },
555
+ "conflictColumns": [
556
+ "code",
557
+ "tenant_id"
558
+ ],
637
559
  "surfaces": [
638
560
  {
639
561
  "kind": "api",
640
- "name": "stocklevels.getLevel",
641
- "operation": "getLevel",
642
- "objectName": "@happyvertical/smrt-inventory:StockLevelCollection",
643
- "path": "/stocklevels/getLevel",
644
- "method": "POST"
562
+ "name": "inventorylocations.list",
563
+ "operation": "list",
564
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocation",
565
+ "path": "/inventorylocations",
566
+ "method": "GET"
645
567
  },
646
568
  {
647
569
  "kind": "api",
648
- "name": "stocklevels.findBySku",
649
- "operation": "findBySku",
650
- "objectName": "@happyvertical/smrt-inventory:StockLevelCollection",
651
- "path": "/stocklevels/findBySku",
652
- "method": "POST"
570
+ "name": "inventorylocations.get",
571
+ "operation": "get",
572
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocation",
573
+ "path": "/inventorylocations/[id]",
574
+ "method": "GET"
653
575
  },
654
576
  {
655
577
  "kind": "api",
656
- "name": "stocklevels.findByLocation",
657
- "operation": "findByLocation",
658
- "objectName": "@happyvertical/smrt-inventory:StockLevelCollection",
659
- "path": "/stocklevels/findByLocation",
578
+ "name": "inventorylocations.create",
579
+ "operation": "create",
580
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocation",
581
+ "path": "/inventorylocations",
660
582
  "method": "POST"
661
583
  },
662
584
  {
663
585
  "kind": "api",
664
- "name": "stocklevels.totalForSku",
665
- "operation": "totalForSku",
666
- "objectName": "@happyvertical/smrt-inventory:StockLevelCollection",
667
- "path": "/stocklevels/totalForSku",
668
- "method": "POST"
586
+ "name": "inventorylocations.update",
587
+ "operation": "update",
588
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocation",
589
+ "path": "/inventorylocations/[id]",
590
+ "method": "PATCH"
669
591
  },
670
592
  {
671
- "kind": "api",
672
- "name": "stocklevels.totalForLocation",
673
- "operation": "totalForLocation",
674
- "objectName": "@happyvertical/smrt-inventory:StockLevelCollection",
675
- "path": "/stocklevels/totalForLocation",
676
- "method": "POST"
593
+ "kind": "cli",
594
+ "name": "inventorylocation_list",
595
+ "operation": "list",
596
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocation"
677
597
  },
678
598
  {
679
599
  "kind": "cli",
680
- "name": "stocklevelcollection_getLevel",
681
- "operation": "getLevel",
682
- "objectName": "@happyvertical/smrt-inventory:StockLevelCollection"
600
+ "name": "inventorylocation_get",
601
+ "operation": "get",
602
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocation"
683
603
  },
684
604
  {
685
605
  "kind": "cli",
686
- "name": "stocklevelcollection_findBySku",
687
- "operation": "findBySku",
688
- "objectName": "@happyvertical/smrt-inventory:StockLevelCollection"
606
+ "name": "inventorylocation_create",
607
+ "operation": "create",
608
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocation"
689
609
  },
690
610
  {
691
611
  "kind": "cli",
692
- "name": "stocklevelcollection_findByLocation",
693
- "operation": "findByLocation",
694
- "objectName": "@happyvertical/smrt-inventory:StockLevelCollection"
612
+ "name": "inventorylocation_update",
613
+ "operation": "update",
614
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocation"
695
615
  },
696
616
  {
697
617
  "kind": "cli",
698
- "name": "stocklevelcollection_totalForSku",
699
- "operation": "totalForSku",
700
- "objectName": "@happyvertical/smrt-inventory:StockLevelCollection"
618
+ "name": "inventorylocation_delete",
619
+ "operation": "delete",
620
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocation"
701
621
  },
702
622
  {
703
- "kind": "cli",
704
- "name": "stocklevelcollection_totalForLocation",
705
- "operation": "totalForLocation",
706
- "objectName": "@happyvertical/smrt-inventory:StockLevelCollection"
623
+ "kind": "mcp",
624
+ "name": "inventorylocation_list",
625
+ "operation": "list",
626
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocation"
707
627
  },
708
628
  {
709
629
  "kind": "mcp",
710
- "name": "stocklevelcollection_getlevel",
711
- "operation": "getLevel",
712
- "objectName": "@happyvertical/smrt-inventory:StockLevelCollection"
713
- },
714
- {
715
- "kind": "mcp",
716
- "name": "stocklevelcollection_findbysku",
717
- "operation": "findBySku",
718
- "objectName": "@happyvertical/smrt-inventory:StockLevelCollection"
719
- },
720
- {
721
- "kind": "mcp",
722
- "name": "stocklevelcollection_findbylocation",
723
- "operation": "findByLocation",
724
- "objectName": "@happyvertical/smrt-inventory:StockLevelCollection"
725
- },
726
- {
727
- "kind": "mcp",
728
- "name": "stocklevelcollection_totalforsku",
729
- "operation": "totalForSku",
730
- "objectName": "@happyvertical/smrt-inventory:StockLevelCollection"
731
- },
732
- {
733
- "kind": "mcp",
734
- "name": "stocklevelcollection_totalforlocation",
735
- "operation": "totalForLocation",
736
- "objectName": "@happyvertical/smrt-inventory:StockLevelCollection"
630
+ "name": "inventorylocation_get",
631
+ "operation": "get",
632
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocation"
737
633
  }
738
634
  ],
739
635
  "relationshipFeatures": [
@@ -743,135 +639,100 @@
743
639
  "risks": []
744
640
  },
745
641
  {
746
- "name": "StockMovementCollection",
747
- "qualifiedName": "@happyvertical/smrt-inventory:StockMovementCollection",
748
- "collection": "stockmovements",
749
- "tableName": "inventory_stock_movements",
642
+ "name": "StockLevel",
643
+ "qualifiedName": "@happyvertical/smrt-inventory:StockLevel",
644
+ "collection": "stocklevels",
645
+ "tableName": "inventory_stock_levels",
750
646
  "packageName": "@happyvertical/smrt-inventory",
751
- "extends": "SmrtCollection",
752
- "fields": [],
753
- "relationships": [],
754
- "methods": [
755
- "findByLocation",
756
- "findByReason",
757
- "findBySku",
758
- "findBySource"
759
- ],
760
- "methodSignatures": [
647
+ "extends": "SmrtObject",
648
+ "fields": [
761
649
  {
762
- "name": "findByLocation",
763
- "async": true,
764
- "params": [
765
- "locationId: string"
766
- ],
767
- "returns": "Promise<StockMovement[]>"
650
+ "name": "tenantId",
651
+ "type": "text",
652
+ "required": false,
653
+ "columnType": "UUID"
768
654
  },
769
655
  {
770
- "name": "findByReason",
771
- "async": true,
772
- "params": [
773
- "reasonCode: StockMovementReason"
774
- ],
775
- "returns": "Promise<StockMovement[]>"
656
+ "name": "skuId",
657
+ "type": "text",
658
+ "required": true,
659
+ "columnType": "TEXT",
660
+ "default": ""
776
661
  },
777
662
  {
778
- "name": "findBySku",
779
- "async": true,
780
- "params": [
781
- "skuId: string"
782
- ],
783
- "returns": "Promise<StockMovement[]>"
663
+ "name": "locationId",
664
+ "type": "text",
665
+ "required": true,
666
+ "columnType": "TEXT",
667
+ "default": ""
784
668
  },
785
669
  {
786
- "name": "findBySource",
787
- "async": true,
788
- "params": [
789
- "sourceType: string",
790
- "sourceId: string"
791
- ],
792
- "returns": "Promise<StockMovement[]>"
670
+ "name": "state",
671
+ "type": "text",
672
+ "required": true,
673
+ "columnType": "TEXT",
674
+ "default": "available"
675
+ },
676
+ {
677
+ "name": "qty",
678
+ "type": "decimal",
679
+ "required": false,
680
+ "columnType": "REAL"
793
681
  }
794
682
  ],
683
+ "relationships": [],
684
+ "methods": [],
685
+ "tenant": {
686
+ "scoped": true,
687
+ "mode": "optional",
688
+ "field": "tenantId"
689
+ },
690
+ "conflictColumns": [
691
+ "sku_id",
692
+ "location_id",
693
+ "state",
694
+ "tenant_id"
695
+ ],
795
696
  "surfaces": [
796
697
  {
797
698
  "kind": "api",
798
- "name": "stockmovements.findBySku",
799
- "operation": "findBySku",
800
- "objectName": "@happyvertical/smrt-inventory:StockMovementCollection",
801
- "path": "/stockmovements/findBySku",
802
- "method": "POST"
803
- },
804
- {
805
- "kind": "api",
806
- "name": "stockmovements.findByLocation",
807
- "operation": "findByLocation",
808
- "objectName": "@happyvertical/smrt-inventory:StockMovementCollection",
809
- "path": "/stockmovements/findByLocation",
810
- "method": "POST"
811
- },
812
- {
813
- "kind": "api",
814
- "name": "stockmovements.findBySource",
815
- "operation": "findBySource",
816
- "objectName": "@happyvertical/smrt-inventory:StockMovementCollection",
817
- "path": "/stockmovements/findBySource",
818
- "method": "POST"
699
+ "name": "stocklevels.list",
700
+ "operation": "list",
701
+ "objectName": "@happyvertical/smrt-inventory:StockLevel",
702
+ "path": "/stocklevels",
703
+ "method": "GET"
819
704
  },
820
705
  {
821
706
  "kind": "api",
822
- "name": "stockmovements.findByReason",
823
- "operation": "findByReason",
824
- "objectName": "@happyvertical/smrt-inventory:StockMovementCollection",
825
- "path": "/stockmovements/findByReason",
826
- "method": "POST"
827
- },
828
- {
829
- "kind": "cli",
830
- "name": "stockmovementcollection_findBySku",
831
- "operation": "findBySku",
832
- "objectName": "@happyvertical/smrt-inventory:StockMovementCollection"
833
- },
834
- {
835
- "kind": "cli",
836
- "name": "stockmovementcollection_findByLocation",
837
- "operation": "findByLocation",
838
- "objectName": "@happyvertical/smrt-inventory:StockMovementCollection"
707
+ "name": "stocklevels.get",
708
+ "operation": "get",
709
+ "objectName": "@happyvertical/smrt-inventory:StockLevel",
710
+ "path": "/stocklevels/[id]",
711
+ "method": "GET"
839
712
  },
840
713
  {
841
714
  "kind": "cli",
842
- "name": "stockmovementcollection_findBySource",
843
- "operation": "findBySource",
844
- "objectName": "@happyvertical/smrt-inventory:StockMovementCollection"
715
+ "name": "stocklevel_list",
716
+ "operation": "list",
717
+ "objectName": "@happyvertical/smrt-inventory:StockLevel"
845
718
  },
846
719
  {
847
720
  "kind": "cli",
848
- "name": "stockmovementcollection_findByReason",
849
- "operation": "findByReason",
850
- "objectName": "@happyvertical/smrt-inventory:StockMovementCollection"
851
- },
852
- {
853
- "kind": "mcp",
854
- "name": "stockmovementcollection_findbysku",
855
- "operation": "findBySku",
856
- "objectName": "@happyvertical/smrt-inventory:StockMovementCollection"
857
- },
858
- {
859
- "kind": "mcp",
860
- "name": "stockmovementcollection_findbylocation",
861
- "operation": "findByLocation",
862
- "objectName": "@happyvertical/smrt-inventory:StockMovementCollection"
721
+ "name": "stocklevel_get",
722
+ "operation": "get",
723
+ "objectName": "@happyvertical/smrt-inventory:StockLevel"
863
724
  },
864
725
  {
865
726
  "kind": "mcp",
866
- "name": "stockmovementcollection_findbysource",
867
- "operation": "findBySource",
868
- "objectName": "@happyvertical/smrt-inventory:StockMovementCollection"
727
+ "name": "stocklevel_list",
728
+ "operation": "list",
729
+ "objectName": "@happyvertical/smrt-inventory:StockLevel"
869
730
  },
870
731
  {
871
732
  "kind": "mcp",
872
- "name": "stockmovementcollection_findbyreason",
873
- "operation": "findByReason",
874
- "objectName": "@happyvertical/smrt-inventory:StockMovementCollection"
733
+ "name": "stocklevel_get",
734
+ "operation": "get",
735
+ "objectName": "@happyvertical/smrt-inventory:StockLevel"
875
736
  }
876
737
  ],
877
738
  "relationshipFeatures": [
@@ -879,163 +740,148 @@
879
740
  ],
880
741
  "tags": [],
881
742
  "risks": []
882
- }
883
- ],
884
- "surfaces": [
885
- {
886
- "kind": "api",
887
- "name": "inventorylocations.list",
888
- "operation": "list",
889
- "objectName": "@happyvertical/smrt-inventory:InventoryLocation",
890
- "path": "/inventorylocations",
891
- "method": "GET"
892
- },
893
- {
894
- "kind": "api",
895
- "name": "inventorylocations.get",
896
- "operation": "get",
897
- "objectName": "@happyvertical/smrt-inventory:InventoryLocation",
898
- "path": "/inventorylocations/[id]",
899
- "method": "GET"
900
- },
901
- {
902
- "kind": "api",
903
- "name": "inventorylocations.create",
904
- "operation": "create",
905
- "objectName": "@happyvertical/smrt-inventory:InventoryLocation",
906
- "path": "/inventorylocations",
907
- "method": "POST"
908
- },
909
- {
910
- "kind": "api",
911
- "name": "inventorylocations.update",
912
- "operation": "update",
913
- "objectName": "@happyvertical/smrt-inventory:InventoryLocation",
914
- "path": "/inventorylocations/[id]",
915
- "method": "PATCH"
916
- },
917
- {
918
- "kind": "cli",
919
- "name": "inventorylocation_list",
920
- "operation": "list",
921
- "objectName": "@happyvertical/smrt-inventory:InventoryLocation"
922
- },
923
- {
924
- "kind": "cli",
925
- "name": "inventorylocation_get",
926
- "operation": "get",
927
- "objectName": "@happyvertical/smrt-inventory:InventoryLocation"
928
- },
929
- {
930
- "kind": "cli",
931
- "name": "inventorylocation_create",
932
- "operation": "create",
933
- "objectName": "@happyvertical/smrt-inventory:InventoryLocation"
934
743
  },
935
744
  {
936
- "kind": "cli",
937
- "name": "inventorylocation_update",
938
- "operation": "update",
939
- "objectName": "@happyvertical/smrt-inventory:InventoryLocation"
940
- },
941
- {
942
- "kind": "cli",
943
- "name": "inventorylocation_delete",
944
- "operation": "delete",
945
- "objectName": "@happyvertical/smrt-inventory:InventoryLocation"
946
- },
947
- {
948
- "kind": "mcp",
949
- "name": "inventorylocation_list",
950
- "operation": "list",
951
- "objectName": "@happyvertical/smrt-inventory:InventoryLocation"
952
- },
953
- {
954
- "kind": "mcp",
955
- "name": "inventorylocation_get",
956
- "operation": "get",
957
- "objectName": "@happyvertical/smrt-inventory:InventoryLocation"
958
- },
959
- {
960
- "kind": "api",
961
- "name": "stocklevels.list",
962
- "operation": "list",
963
- "objectName": "@happyvertical/smrt-inventory:StockLevel",
964
- "path": "/stocklevels",
965
- "method": "GET"
966
- },
967
- {
968
- "kind": "api",
969
- "name": "stocklevels.get",
970
- "operation": "get",
971
- "objectName": "@happyvertical/smrt-inventory:StockLevel",
972
- "path": "/stocklevels/[id]",
973
- "method": "GET"
974
- },
975
- {
976
- "kind": "cli",
977
- "name": "stocklevel_list",
978
- "operation": "list",
979
- "objectName": "@happyvertical/smrt-inventory:StockLevel"
980
- },
981
- {
982
- "kind": "cli",
983
- "name": "stocklevel_get",
984
- "operation": "get",
985
- "objectName": "@happyvertical/smrt-inventory:StockLevel"
986
- },
987
- {
988
- "kind": "mcp",
989
- "name": "stocklevel_list",
990
- "operation": "list",
991
- "objectName": "@happyvertical/smrt-inventory:StockLevel"
992
- },
993
- {
994
- "kind": "mcp",
995
- "name": "stocklevel_get",
996
- "operation": "get",
997
- "objectName": "@happyvertical/smrt-inventory:StockLevel"
998
- },
999
- {
1000
- "kind": "api",
1001
- "name": "stockmovements.list",
1002
- "operation": "list",
1003
- "objectName": "@happyvertical/smrt-inventory:StockMovement",
1004
- "path": "/stockmovements",
1005
- "method": "GET"
1006
- },
1007
- {
1008
- "kind": "api",
1009
- "name": "stockmovements.get",
1010
- "operation": "get",
1011
- "objectName": "@happyvertical/smrt-inventory:StockMovement",
1012
- "path": "/stockmovements/[id]",
1013
- "method": "GET"
1014
- },
1015
- {
1016
- "kind": "cli",
1017
- "name": "stockmovement_list",
1018
- "operation": "list",
1019
- "objectName": "@happyvertical/smrt-inventory:StockMovement"
1020
- },
1021
- {
1022
- "kind": "cli",
1023
- "name": "stockmovement_get",
1024
- "operation": "get",
1025
- "objectName": "@happyvertical/smrt-inventory:StockMovement"
1026
- },
1027
- {
1028
- "kind": "mcp",
1029
- "name": "stockmovement_list",
1030
- "operation": "list",
1031
- "objectName": "@happyvertical/smrt-inventory:StockMovement"
1032
- },
1033
- {
1034
- "kind": "mcp",
1035
- "name": "stockmovement_get",
1036
- "operation": "get",
1037
- "objectName": "@happyvertical/smrt-inventory:StockMovement"
1038
- },
745
+ "name": "StockMovement",
746
+ "qualifiedName": "@happyvertical/smrt-inventory:StockMovement",
747
+ "collection": "stockmovements",
748
+ "tableName": "inventory_stock_movements",
749
+ "packageName": "@happyvertical/smrt-inventory",
750
+ "extends": "SmrtObject",
751
+ "fields": [
752
+ {
753
+ "name": "tenantId",
754
+ "type": "text",
755
+ "required": false,
756
+ "columnType": "UUID"
757
+ },
758
+ {
759
+ "name": "skuId",
760
+ "type": "text",
761
+ "required": true,
762
+ "columnType": "TEXT",
763
+ "default": ""
764
+ },
765
+ {
766
+ "name": "locationId",
767
+ "type": "text",
768
+ "required": true,
769
+ "columnType": "TEXT",
770
+ "default": ""
771
+ },
772
+ {
773
+ "name": "fromState",
774
+ "type": "text",
775
+ "required": false,
776
+ "columnType": "TEXT"
777
+ },
778
+ {
779
+ "name": "toState",
780
+ "type": "text",
781
+ "required": false,
782
+ "columnType": "TEXT"
783
+ },
784
+ {
785
+ "name": "qty",
786
+ "type": "decimal",
787
+ "required": false,
788
+ "columnType": "REAL"
789
+ },
790
+ {
791
+ "name": "reasonCode",
792
+ "type": "text",
793
+ "required": true,
794
+ "columnType": "TEXT",
795
+ "default": "adjustment"
796
+ },
797
+ {
798
+ "name": "sourceType",
799
+ "type": "text",
800
+ "required": false,
801
+ "columnType": "TEXT",
802
+ "default": ""
803
+ },
804
+ {
805
+ "name": "sourceId",
806
+ "type": "text",
807
+ "required": false,
808
+ "columnType": "TEXT",
809
+ "default": ""
810
+ },
811
+ {
812
+ "name": "note",
813
+ "type": "text",
814
+ "required": false,
815
+ "columnType": "TEXT",
816
+ "default": ""
817
+ },
818
+ {
819
+ "name": "occurredAt",
820
+ "type": "datetime",
821
+ "required": false,
822
+ "columnType": "TIMESTAMP"
823
+ }
824
+ ],
825
+ "relationships": [],
826
+ "methods": [],
827
+ "tenant": {
828
+ "scoped": true,
829
+ "mode": "optional",
830
+ "field": "tenantId"
831
+ },
832
+ "conflictColumns": [
833
+ "id"
834
+ ],
835
+ "surfaces": [
836
+ {
837
+ "kind": "api",
838
+ "name": "stockmovements.list",
839
+ "operation": "list",
840
+ "objectName": "@happyvertical/smrt-inventory:StockMovement",
841
+ "path": "/stockmovements",
842
+ "method": "GET"
843
+ },
844
+ {
845
+ "kind": "api",
846
+ "name": "stockmovements.get",
847
+ "operation": "get",
848
+ "objectName": "@happyvertical/smrt-inventory:StockMovement",
849
+ "path": "/stockmovements/[id]",
850
+ "method": "GET"
851
+ },
852
+ {
853
+ "kind": "cli",
854
+ "name": "stockmovement_list",
855
+ "operation": "list",
856
+ "objectName": "@happyvertical/smrt-inventory:StockMovement"
857
+ },
858
+ {
859
+ "kind": "cli",
860
+ "name": "stockmovement_get",
861
+ "operation": "get",
862
+ "objectName": "@happyvertical/smrt-inventory:StockMovement"
863
+ },
864
+ {
865
+ "kind": "mcp",
866
+ "name": "stockmovement_list",
867
+ "operation": "list",
868
+ "objectName": "@happyvertical/smrt-inventory:StockMovement"
869
+ },
870
+ {
871
+ "kind": "mcp",
872
+ "name": "stockmovement_get",
873
+ "operation": "get",
874
+ "objectName": "@happyvertical/smrt-inventory:StockMovement"
875
+ }
876
+ ],
877
+ "relationshipFeatures": [
878
+ "uuidColumns"
879
+ ],
880
+ "tags": [],
881
+ "risks": []
882
+ }
883
+ ],
884
+ "surfaces": [
1039
885
  {
1040
886
  "kind": "api",
1041
887
  "name": "inventorylocations.findByCode",
@@ -1295,6 +1141,160 @@
1295
1141
  "name": "stockmovementcollection_findbyreason",
1296
1142
  "operation": "findByReason",
1297
1143
  "objectName": "@happyvertical/smrt-inventory:StockMovementCollection"
1144
+ },
1145
+ {
1146
+ "kind": "api",
1147
+ "name": "inventorylocations.list",
1148
+ "operation": "list",
1149
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocation",
1150
+ "path": "/inventorylocations",
1151
+ "method": "GET"
1152
+ },
1153
+ {
1154
+ "kind": "api",
1155
+ "name": "inventorylocations.get",
1156
+ "operation": "get",
1157
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocation",
1158
+ "path": "/inventorylocations/[id]",
1159
+ "method": "GET"
1160
+ },
1161
+ {
1162
+ "kind": "api",
1163
+ "name": "inventorylocations.create",
1164
+ "operation": "create",
1165
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocation",
1166
+ "path": "/inventorylocations",
1167
+ "method": "POST"
1168
+ },
1169
+ {
1170
+ "kind": "api",
1171
+ "name": "inventorylocations.update",
1172
+ "operation": "update",
1173
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocation",
1174
+ "path": "/inventorylocations/[id]",
1175
+ "method": "PATCH"
1176
+ },
1177
+ {
1178
+ "kind": "cli",
1179
+ "name": "inventorylocation_list",
1180
+ "operation": "list",
1181
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocation"
1182
+ },
1183
+ {
1184
+ "kind": "cli",
1185
+ "name": "inventorylocation_get",
1186
+ "operation": "get",
1187
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocation"
1188
+ },
1189
+ {
1190
+ "kind": "cli",
1191
+ "name": "inventorylocation_create",
1192
+ "operation": "create",
1193
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocation"
1194
+ },
1195
+ {
1196
+ "kind": "cli",
1197
+ "name": "inventorylocation_update",
1198
+ "operation": "update",
1199
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocation"
1200
+ },
1201
+ {
1202
+ "kind": "cli",
1203
+ "name": "inventorylocation_delete",
1204
+ "operation": "delete",
1205
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocation"
1206
+ },
1207
+ {
1208
+ "kind": "mcp",
1209
+ "name": "inventorylocation_list",
1210
+ "operation": "list",
1211
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocation"
1212
+ },
1213
+ {
1214
+ "kind": "mcp",
1215
+ "name": "inventorylocation_get",
1216
+ "operation": "get",
1217
+ "objectName": "@happyvertical/smrt-inventory:InventoryLocation"
1218
+ },
1219
+ {
1220
+ "kind": "api",
1221
+ "name": "stocklevels.list",
1222
+ "operation": "list",
1223
+ "objectName": "@happyvertical/smrt-inventory:StockLevel",
1224
+ "path": "/stocklevels",
1225
+ "method": "GET"
1226
+ },
1227
+ {
1228
+ "kind": "api",
1229
+ "name": "stocklevels.get",
1230
+ "operation": "get",
1231
+ "objectName": "@happyvertical/smrt-inventory:StockLevel",
1232
+ "path": "/stocklevels/[id]",
1233
+ "method": "GET"
1234
+ },
1235
+ {
1236
+ "kind": "cli",
1237
+ "name": "stocklevel_list",
1238
+ "operation": "list",
1239
+ "objectName": "@happyvertical/smrt-inventory:StockLevel"
1240
+ },
1241
+ {
1242
+ "kind": "cli",
1243
+ "name": "stocklevel_get",
1244
+ "operation": "get",
1245
+ "objectName": "@happyvertical/smrt-inventory:StockLevel"
1246
+ },
1247
+ {
1248
+ "kind": "mcp",
1249
+ "name": "stocklevel_list",
1250
+ "operation": "list",
1251
+ "objectName": "@happyvertical/smrt-inventory:StockLevel"
1252
+ },
1253
+ {
1254
+ "kind": "mcp",
1255
+ "name": "stocklevel_get",
1256
+ "operation": "get",
1257
+ "objectName": "@happyvertical/smrt-inventory:StockLevel"
1258
+ },
1259
+ {
1260
+ "kind": "api",
1261
+ "name": "stockmovements.list",
1262
+ "operation": "list",
1263
+ "objectName": "@happyvertical/smrt-inventory:StockMovement",
1264
+ "path": "/stockmovements",
1265
+ "method": "GET"
1266
+ },
1267
+ {
1268
+ "kind": "api",
1269
+ "name": "stockmovements.get",
1270
+ "operation": "get",
1271
+ "objectName": "@happyvertical/smrt-inventory:StockMovement",
1272
+ "path": "/stockmovements/[id]",
1273
+ "method": "GET"
1274
+ },
1275
+ {
1276
+ "kind": "cli",
1277
+ "name": "stockmovement_list",
1278
+ "operation": "list",
1279
+ "objectName": "@happyvertical/smrt-inventory:StockMovement"
1280
+ },
1281
+ {
1282
+ "kind": "cli",
1283
+ "name": "stockmovement_get",
1284
+ "operation": "get",
1285
+ "objectName": "@happyvertical/smrt-inventory:StockMovement"
1286
+ },
1287
+ {
1288
+ "kind": "mcp",
1289
+ "name": "stockmovement_list",
1290
+ "operation": "list",
1291
+ "objectName": "@happyvertical/smrt-inventory:StockMovement"
1292
+ },
1293
+ {
1294
+ "kind": "mcp",
1295
+ "name": "stockmovement_get",
1296
+ "operation": "get",
1297
+ "objectName": "@happyvertical/smrt-inventory:StockMovement"
1298
1298
  }
1299
1299
  ],
1300
1300
  "prompts": [],