@vindentech/api-client 0.3.0-next.11 → 0.3.0-next.12

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 (98) hide show
  1. package/dist/generated/_all.d.ts +2 -0
  2. package/dist/generated/_all.d.ts.map +1 -1
  3. package/dist/generated/_all.js +2 -0
  4. package/dist/generated/_all.js.map +1 -1
  5. package/dist/generated/_permissions.d.ts +82 -2
  6. package/dist/generated/_permissions.d.ts.map +1 -1
  7. package/dist/generated/_permissions.js +21 -1
  8. package/dist/generated/_permissions.js.map +1 -1
  9. package/dist/generated/account-credits/account-credits.d.ts +2 -2
  10. package/dist/generated/account-credits/account-credits.d.ts.map +1 -1
  11. package/dist/generated/account-credits/account-credits.js.map +1 -1
  12. package/dist/generated/addresses/addresses.d.ts +2 -2
  13. package/dist/generated/addresses/addresses.d.ts.map +1 -1
  14. package/dist/generated/addresses/addresses.js.map +1 -1
  15. package/dist/generated/capacity/capacity.d.ts +3 -3
  16. package/dist/generated/capacity/capacity.d.ts.map +1 -1
  17. package/dist/generated/capacity/capacity.js.map +1 -1
  18. package/dist/generated/carrier-bookings/carrier-bookings.d.ts +2 -2
  19. package/dist/generated/carrier-bookings/carrier-bookings.d.ts.map +1 -1
  20. package/dist/generated/carriers/carriers.d.ts +18 -4
  21. package/dist/generated/carriers/carriers.d.ts.map +1 -1
  22. package/dist/generated/carriers/carriers.js +10 -0
  23. package/dist/generated/carriers/carriers.js.map +1 -1
  24. package/dist/generated/carts/carts.d.ts +14 -0
  25. package/dist/generated/carts/carts.d.ts.map +1 -1
  26. package/dist/generated/carts/carts.js +10 -0
  27. package/dist/generated/carts/carts.js.map +1 -1
  28. package/dist/generated/containers/containers.d.ts +2 -2
  29. package/dist/generated/containers/containers.d.ts.map +1 -1
  30. package/dist/generated/containers/containers.js.map +1 -1
  31. package/dist/generated/coupons/coupons.d.ts +2 -2
  32. package/dist/generated/coupons/coupons.d.ts.map +1 -1
  33. package/dist/generated/coupons/coupons.js.map +1 -1
  34. package/dist/generated/folders/folders.d.ts +10 -10
  35. package/dist/generated/folders/folders.d.ts.map +1 -1
  36. package/dist/generated/folders/folders.js +4 -4
  37. package/dist/generated/folders/folders.js.map +1 -1
  38. package/dist/generated/forklift/forklift.d.ts +212 -0
  39. package/dist/generated/forklift/forklift.d.ts.map +1 -0
  40. package/dist/generated/forklift/forklift.js +89 -0
  41. package/dist/generated/forklift/forklift.js.map +1 -0
  42. package/dist/generated/index.schemas.d.ts +1305 -16
  43. package/dist/generated/index.schemas.d.ts.map +1 -1
  44. package/dist/generated/index.schemas.js +124 -0
  45. package/dist/generated/index.schemas.js.map +1 -1
  46. package/dist/generated/invoices/invoices.d.ts +2 -2
  47. package/dist/generated/invoices/invoices.d.ts.map +1 -1
  48. package/dist/generated/invoices/invoices.js.map +1 -1
  49. package/dist/generated/items/items.d.ts +2 -2
  50. package/dist/generated/items/items.d.ts.map +1 -1
  51. package/dist/generated/items/items.js.map +1 -1
  52. package/dist/generated/lookups/lookups.d.ts +23 -0
  53. package/dist/generated/lookups/lookups.d.ts.map +1 -0
  54. package/dist/generated/lookups/lookups.js +19 -0
  55. package/dist/generated/lookups/lookups.js.map +1 -0
  56. package/dist/generated/orders/orders.d.ts +114 -2
  57. package/dist/generated/orders/orders.d.ts.map +1 -1
  58. package/dist/generated/orders/orders.js +101 -0
  59. package/dist/generated/orders/orders.js.map +1 -1
  60. package/dist/generated/org-contacts/org-contacts.d.ts +2 -2
  61. package/dist/generated/org-contacts/org-contacts.d.ts.map +1 -1
  62. package/dist/generated/org-contacts/org-contacts.js.map +1 -1
  63. package/dist/generated/organizations/organizations.d.ts +2 -2
  64. package/dist/generated/organizations/organizations.d.ts.map +1 -1
  65. package/dist/generated/organizations/organizations.js.map +1 -1
  66. package/dist/generated/pods/pods.d.ts +2 -2
  67. package/dist/generated/pods/pods.d.ts.map +1 -1
  68. package/dist/generated/pods/pods.js.map +1 -1
  69. package/dist/generated/positions/positions.d.ts +2 -2
  70. package/dist/generated/positions/positions.d.ts.map +1 -1
  71. package/dist/generated/positions/positions.js.map +1 -1
  72. package/dist/generated/products/products.d.ts +2 -2
  73. package/dist/generated/products/products.d.ts.map +1 -1
  74. package/dist/generated/products/products.js +7 -0
  75. package/dist/generated/products/products.js.map +1 -1
  76. package/dist/generated/routes/routes.d.ts +2 -2
  77. package/dist/generated/routes/routes.d.ts.map +1 -1
  78. package/dist/generated/routes/routes.js.map +1 -1
  79. package/dist/generated/service-zones/service-zones.d.ts +2 -2
  80. package/dist/generated/service-zones/service-zones.d.ts.map +1 -1
  81. package/dist/generated/service-zones/service-zones.js.map +1 -1
  82. package/dist/generated/slot-configs/slot-configs.d.ts +16 -2
  83. package/dist/generated/slot-configs/slot-configs.d.ts.map +1 -1
  84. package/dist/generated/slot-configs/slot-configs.js +12 -0
  85. package/dist/generated/slot-configs/slot-configs.js.map +1 -1
  86. package/dist/generated/transport-legs/transport-legs.d.ts +2 -2
  87. package/dist/generated/transport-legs/transport-legs.d.ts.map +1 -1
  88. package/dist/generated/transport-legs/transport-legs.js.map +1 -1
  89. package/dist/generated/transport-services/transport-services.d.ts +3 -3
  90. package/dist/generated/transport-services/transport-services.d.ts.map +1 -1
  91. package/dist/generated/transport-services/transport-services.js.map +1 -1
  92. package/dist/generated/warehouse-orders/warehouse-orders.d.ts +2 -2
  93. package/dist/generated/warehouse-orders/warehouse-orders.d.ts.map +1 -1
  94. package/dist/generated/warehouses/warehouses.d.ts +16 -2
  95. package/dist/generated/warehouses/warehouses.d.ts.map +1 -1
  96. package/dist/generated/warehouses/warehouses.js +10 -0
  97. package/dist/generated/warehouses/warehouses.js.map +1 -1
  98. package/package.json +1 -1
@@ -24,6 +24,11 @@ export interface OrderSummaryDto {
24
24
  /** Per-job operational number (tenant sequence). */
25
25
  jobNumber: number;
26
26
  orderGroupId: string;
27
+ /**
28
+ * Dispatch warehouse (NULL for service-only / field jobs).
29
+ * @nullable
30
+ */
31
+ warehouseId: string | null;
27
32
  status: string;
28
33
  type: OrderSummaryDtoType;
29
34
  /** @nullable */
@@ -32,9 +37,45 @@ export interface OrderSummaryDto {
32
37
  editableUntil: string | null;
33
38
  /** @nullable */
34
39
  externalReference: string | null;
40
+ /**
41
+ * Measured volume (cm³), once known.
42
+ * @nullable
43
+ */
44
+ actualVolumeCm3: number | null;
45
+ /**
46
+ * Billed volume (cm³), once priced.
47
+ * @nullable
48
+ */
49
+ billableVolumeCm3: number | null;
35
50
  createdAt: string;
36
51
  updatedAt: string;
37
52
  }
53
+ export interface PaginatedOrdersDto {
54
+ /** The page of rows. */
55
+ items: OrderSummaryDto[];
56
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
57
+ total: number;
58
+ /** Effective max rows applied (after defaults/clamp). */
59
+ limit: number;
60
+ /** Effective rows skipped applied. */
61
+ offset: number;
62
+ }
63
+ export interface OrderWarehouseDto {
64
+ warehouseId: string;
65
+ name: string;
66
+ /** @nullable */
67
+ phone: string | null;
68
+ /** @nullable */
69
+ line1: string | null;
70
+ /** @nullable */
71
+ line2: string | null;
72
+ /** @nullable */
73
+ zipCode: string | null;
74
+ /** @nullable */
75
+ city: string | null;
76
+ /** @nullable */
77
+ countryCode: string | null;
78
+ }
38
79
  export interface OrderProductDto {
39
80
  salesOrderProductId: string;
40
81
  productId: string;
@@ -43,6 +84,16 @@ export interface OrderProductDto {
43
84
  * @nullable
44
85
  */
45
86
  name: string | null;
87
+ /**
88
+ * Storage key of the product's primary image (never base64).
89
+ * @nullable
90
+ */
91
+ primaryImageStorageKey: string | null;
92
+ /**
93
+ * public.category id, if categorised.
94
+ * @nullable
95
+ */
96
+ categoryId: number | null;
46
97
  /** Requested (demand) quantity. */
47
98
  requestedQuantity: number;
48
99
  /** Fulfilled quantity (derived from PICK movements). */
@@ -71,14 +122,47 @@ export interface OrderLegDto {
71
122
  legType: string;
72
123
  legSequence: number;
73
124
  status: string;
125
+ /**
126
+ * Assigned carrier (tenant_carrier_id).
127
+ * @nullable
128
+ */
129
+ tenantCarrierId: string | null;
74
130
  /** @nullable */
75
131
  plannedWindowStart: string | null;
76
132
  /** @nullable */
77
133
  plannedWindowEnd: string | null;
78
134
  /** @nullable */
79
- city: string | null;
135
+ recipientName: string | null;
136
+ /** @nullable */
137
+ recipientPhone: string | null;
138
+ /** @nullable */
139
+ addressLine1: string | null;
140
+ /** @nullable */
141
+ addressLine2: string | null;
80
142
  /** @nullable */
81
143
  zipCode: string | null;
144
+ /** @nullable */
145
+ city: string | null;
146
+ /** @nullable */
147
+ countryCode: string | null;
148
+ /** @nullable */
149
+ floorLevel: number | null;
150
+ /** @nullable */
151
+ elevator: boolean | null;
152
+ /** @nullable */
153
+ doorCode: string | null;
154
+ /** @nullable */
155
+ transportInstructions: string | null;
156
+ /**
157
+ * From the leg's carrier_booking.
158
+ * @nullable
159
+ */
160
+ trackingCode: string | null;
161
+ /**
162
+ * From the leg's carrier_booking.
163
+ * @nullable
164
+ */
165
+ trackingUrl: string | null;
82
166
  }
83
167
  export type OrderDetailDtoType = typeof OrderDetailDtoType[keyof typeof OrderDetailDtoType];
84
168
  export declare const OrderDetailDtoType: {
@@ -90,6 +174,10 @@ export declare const OrderDetailDtoType: {
90
174
  readonly PICKING: "PICKING";
91
175
  readonly MERCHANDISE_SALE: "MERCHANDISE_SALE";
92
176
  };
177
+ /**
178
+ * @nullable
179
+ */
180
+ export type OrderDetailDtoWarehouse = OrderWarehouseDto | null;
93
181
  /**
94
182
  * @nullable
95
183
  */
@@ -99,6 +187,11 @@ export interface OrderDetailDto {
99
187
  /** Per-job operational number (tenant sequence). */
100
188
  jobNumber: number;
101
189
  orderGroupId: string;
190
+ /**
191
+ * Dispatch warehouse (NULL for service-only / field jobs).
192
+ * @nullable
193
+ */
194
+ warehouseId: string | null;
102
195
  status: string;
103
196
  type: OrderDetailDtoType;
104
197
  /** @nullable */
@@ -107,8 +200,25 @@ export interface OrderDetailDto {
107
200
  editableUntil: string | null;
108
201
  /** @nullable */
109
202
  externalReference: string | null;
203
+ /**
204
+ * Measured volume (cm³), once known.
205
+ * @nullable
206
+ */
207
+ actualVolumeCm3: number | null;
208
+ /**
209
+ * Billed volume (cm³), once priced.
210
+ * @nullable
211
+ */
212
+ billableVolumeCm3: number | null;
110
213
  createdAt: string;
111
214
  updatedAt: string;
215
+ /**
216
+ * Originating cart, if any.
217
+ * @nullable
218
+ */
219
+ cartId: string | null;
220
+ /** Whether the job is a picking job. */
221
+ picking: boolean;
112
222
  /** @nullable */
113
223
  comment: string | null;
114
224
  /** @nullable */
@@ -122,11 +232,412 @@ export interface OrderDetailDto {
122
232
  cancelledAt: string | null;
123
233
  /** @nullable */
124
234
  cancellationReason: string | null;
235
+ /** @nullable */
236
+ warehouse: OrderDetailDtoWarehouse;
125
237
  products: OrderProductDto[];
126
238
  /** @nullable */
127
239
  estimate: OrderDetailDtoEstimate;
128
240
  legs: OrderLegDto[];
129
241
  }
242
+ export type OrderTimelineEventDtoKind = typeof OrderTimelineEventDtoKind[keyof typeof OrderTimelineEventDtoKind];
243
+ export declare const OrderTimelineEventDtoKind: {
244
+ readonly STATUS_CHANGE: "STATUS_CHANGE";
245
+ readonly LEG: "LEG";
246
+ readonly APPOINTMENT: "APPOINTMENT";
247
+ readonly RELATIONSHIP: "RELATIONSHIP";
248
+ };
249
+ export type OrderTimelineEventDtoDirection = typeof OrderTimelineEventDtoDirection[keyof typeof OrderTimelineEventDtoDirection];
250
+ export declare const OrderTimelineEventDtoDirection: {
251
+ readonly PARENT: "PARENT";
252
+ readonly CHILD: "CHILD";
253
+ };
254
+ export interface OrderTimelineEventDto {
255
+ kind: OrderTimelineEventDtoKind;
256
+ /** When the event happened (STATUS_CHANGE) or is planned (LEG/RELATIONSHIP). */
257
+ occurredAt: string;
258
+ /** Human-readable one-line label for the event. */
259
+ label: string;
260
+ /** @nullable */
261
+ oldStatus?: string | null;
262
+ newStatus?: string;
263
+ orderTransportLegId?: string;
264
+ legType?: string;
265
+ sequence?: number;
266
+ status?: string;
267
+ /** @nullable */
268
+ plannedWindowStart?: string | null;
269
+ /** @nullable */
270
+ plannedWindowEnd?: string | null;
271
+ relatedSalesOrderId?: string;
272
+ relationshipType?: string;
273
+ direction?: OrderTimelineEventDtoDirection;
274
+ }
275
+ export interface OrderTimelineDto {
276
+ salesOrderId: string;
277
+ jobNumber: number;
278
+ currentStatus: string;
279
+ events: OrderTimelineEventDto[];
280
+ /**
281
+ * Latest planned leg-window end (best-effort completion estimate).
282
+ * @nullable
283
+ */
284
+ estimatedCompletion: string | null;
285
+ }
286
+ /**
287
+ * @nullable
288
+ */
289
+ export type EditOrderRecipientDtoName = {
290
+ [key: string]: unknown;
291
+ } | null;
292
+ /**
293
+ * @nullable
294
+ */
295
+ export type EditOrderRecipientDtoPhone = {
296
+ [key: string]: unknown;
297
+ } | null;
298
+ /**
299
+ * @nullable
300
+ */
301
+ export type EditOrderRecipientDtoEmail = {
302
+ [key: string]: unknown;
303
+ } | null;
304
+ /**
305
+ * @nullable
306
+ */
307
+ export type EditOrderRecipientDtoCompanyName = {
308
+ [key: string]: unknown;
309
+ } | null;
310
+ export interface EditOrderRecipientDto {
311
+ /** @nullable */
312
+ name?: EditOrderRecipientDtoName;
313
+ /** @nullable */
314
+ phone?: EditOrderRecipientDtoPhone;
315
+ /** @nullable */
316
+ email?: EditOrderRecipientDtoEmail;
317
+ /** @nullable */
318
+ companyName?: EditOrderRecipientDtoCompanyName;
319
+ }
320
+ /**
321
+ * @nullable
322
+ */
323
+ export type EditOrderAddressDtoAddressLine1 = {
324
+ [key: string]: unknown;
325
+ } | null;
326
+ /**
327
+ * @nullable
328
+ */
329
+ export type EditOrderAddressDtoAddressLine2 = {
330
+ [key: string]: unknown;
331
+ } | null;
332
+ /**
333
+ * @nullable
334
+ */
335
+ export type EditOrderAddressDtoZipCode = {
336
+ [key: string]: unknown;
337
+ } | null;
338
+ /**
339
+ * @nullable
340
+ */
341
+ export type EditOrderAddressDtoCity = {
342
+ [key: string]: unknown;
343
+ } | null;
344
+ /**
345
+ * @nullable
346
+ */
347
+ export type EditOrderAddressDtoState = {
348
+ [key: string]: unknown;
349
+ } | null;
350
+ /**
351
+ * @nullable
352
+ */
353
+ export type EditOrderAddressDtoCounty = {
354
+ [key: string]: unknown;
355
+ } | null;
356
+ /**
357
+ * ISO 3166-1 alpha-2
358
+ * @nullable
359
+ */
360
+ export type EditOrderAddressDtoCountryCode = {
361
+ [key: string]: unknown;
362
+ } | null;
363
+ /**
364
+ * @nullable
365
+ */
366
+ export type EditOrderAddressDtoFloorLevel = {
367
+ [key: string]: unknown;
368
+ } | null;
369
+ /**
370
+ * @nullable
371
+ */
372
+ export type EditOrderAddressDtoElevator = {
373
+ [key: string]: unknown;
374
+ } | null;
375
+ /**
376
+ * @nullable
377
+ */
378
+ export type EditOrderAddressDtoDoorCode = {
379
+ [key: string]: unknown;
380
+ } | null;
381
+ /**
382
+ * @nullable
383
+ */
384
+ export type EditOrderAddressDtoTransportInstructions = {
385
+ [key: string]: unknown;
386
+ } | null;
387
+ export interface EditOrderAddressDto {
388
+ /** @nullable */
389
+ addressLine1?: EditOrderAddressDtoAddressLine1;
390
+ /** @nullable */
391
+ addressLine2?: EditOrderAddressDtoAddressLine2;
392
+ /** @nullable */
393
+ zipCode?: EditOrderAddressDtoZipCode;
394
+ /** @nullable */
395
+ city?: EditOrderAddressDtoCity;
396
+ /** @nullable */
397
+ state?: EditOrderAddressDtoState;
398
+ /** @nullable */
399
+ county?: EditOrderAddressDtoCounty;
400
+ /**
401
+ * ISO 3166-1 alpha-2
402
+ * @nullable
403
+ */
404
+ countryCode?: EditOrderAddressDtoCountryCode;
405
+ /** @nullable */
406
+ floorLevel?: EditOrderAddressDtoFloorLevel;
407
+ /** @nullable */
408
+ elevator?: EditOrderAddressDtoElevator;
409
+ /** @nullable */
410
+ doorCode?: EditOrderAddressDtoDoorCode;
411
+ /** @nullable */
412
+ transportInstructions?: EditOrderAddressDtoTransportInstructions;
413
+ }
414
+ export interface RescheduleOrderDto {
415
+ /** The cart_component_key of the leg to re-plan (e.g. move:pickup, move:delivery). */
416
+ componentKey: string;
417
+ /** The new transport_slot to book. */
418
+ timeslotId: string;
419
+ /** Overrides the derived transport date; defaults to the new slot's date. */
420
+ preferredDate?: string;
421
+ }
422
+ export interface EditOrderDto {
423
+ recipient?: EditOrderRecipientDto;
424
+ address?: EditOrderAddressDto;
425
+ /** New preferred transport date (does not re-plan capacity by itself). */
426
+ preferredTransportDate?: string;
427
+ reschedule?: RescheduleOrderDto;
428
+ }
429
+ /**
430
+ * Opaque line metadata. Accepted but not persisted — sales_order_product carries no metadata column.
431
+ */
432
+ export type OrderItemInputMetadata = {
433
+ [key: string]: unknown;
434
+ };
435
+ export interface OrderItemInput {
436
+ /** Present = adjust this existing live line; absent = add a new line. */
437
+ salesOrderProductId?: string;
438
+ /** Product reference. On an add it becomes the placeholder product's name (matching placement). */
439
+ productReference: string;
440
+ /**
441
+ * Requested (demand) quantity.
442
+ * @minimum 1
443
+ */
444
+ requestedQuantity: number;
445
+ /** Opaque line metadata. Accepted but not persisted — sales_order_product carries no metadata column. */
446
+ metadata?: OrderItemInputMetadata;
447
+ }
448
+ export interface EditOrderItemsDto {
449
+ /** Full desired set of product lines. Omit a stored line to remove it; an empty array removes all removable lines. */
450
+ items: OrderItemInput[];
451
+ }
452
+ /**
453
+ * Target sales_order status. Must be reachable from the order's current status via sales_order_status_transition. The terminal targets COMPLETED / CANCELLED are rejected here (transition_requires_named_command) — use POST /complete, /deliver-all, or /cancel.
454
+ */
455
+ export type OrderTransitionDtoToStatus = typeof OrderTransitionDtoToStatus[keyof typeof OrderTransitionDtoToStatus];
456
+ export declare const OrderTransitionDtoToStatus: {
457
+ readonly CREATED: "CREATED";
458
+ readonly CONFIRMED: "CONFIRMED";
459
+ readonly REQUESTED: "REQUESTED";
460
+ readonly PROCESSING: "PROCESSING";
461
+ readonly PROCESSED: "PROCESSED";
462
+ readonly IN_TRANSIT: "IN_TRANSIT";
463
+ readonly AT_CUSTOMER: "AT_CUSTOMER";
464
+ readonly RECEIVED: "RECEIVED";
465
+ readonly COMPLETED: "COMPLETED";
466
+ readonly CANCELLED: "CANCELLED";
467
+ readonly FAILED: "FAILED";
468
+ };
469
+ export interface OrderTransitionDto {
470
+ /** Target sales_order status. Must be reachable from the order's current status via sales_order_status_transition. The terminal targets COMPLETED / CANCELLED are rejected here (transition_requires_named_command) — use POST /complete, /deliver-all, or /cancel. */
471
+ toStatus: OrderTransitionDtoToStatus;
472
+ /**
473
+ * Free-text reason, carried on the emitted sales_order.status_changed outbox event only (sales_order_status_change has no reason column).
474
+ * @maxLength 500
475
+ */
476
+ reason?: string;
477
+ }
478
+ /**
479
+ * The status before the transition.
480
+ */
481
+ export type OrderTransitionResultDtoOldStatus = typeof OrderTransitionResultDtoOldStatus[keyof typeof OrderTransitionResultDtoOldStatus];
482
+ export declare const OrderTransitionResultDtoOldStatus: {
483
+ readonly CREATED: "CREATED";
484
+ readonly CONFIRMED: "CONFIRMED";
485
+ readonly REQUESTED: "REQUESTED";
486
+ readonly PROCESSING: "PROCESSING";
487
+ readonly PROCESSED: "PROCESSED";
488
+ readonly IN_TRANSIT: "IN_TRANSIT";
489
+ readonly AT_CUSTOMER: "AT_CUSTOMER";
490
+ readonly RECEIVED: "RECEIVED";
491
+ readonly COMPLETED: "COMPLETED";
492
+ readonly CANCELLED: "CANCELLED";
493
+ readonly FAILED: "FAILED";
494
+ };
495
+ /**
496
+ * The status after the transition.
497
+ */
498
+ export type OrderTransitionResultDtoNewStatus = typeof OrderTransitionResultDtoNewStatus[keyof typeof OrderTransitionResultDtoNewStatus];
499
+ export declare const OrderTransitionResultDtoNewStatus: {
500
+ readonly CREATED: "CREATED";
501
+ readonly CONFIRMED: "CONFIRMED";
502
+ readonly REQUESTED: "REQUESTED";
503
+ readonly PROCESSING: "PROCESSING";
504
+ readonly PROCESSED: "PROCESSED";
505
+ readonly IN_TRANSIT: "IN_TRANSIT";
506
+ readonly AT_CUSTOMER: "AT_CUSTOMER";
507
+ readonly RECEIVED: "RECEIVED";
508
+ readonly COMPLETED: "COMPLETED";
509
+ readonly CANCELLED: "CANCELLED";
510
+ readonly FAILED: "FAILED";
511
+ };
512
+ export interface OrderTransitionResultDto {
513
+ salesOrderId: string;
514
+ /** The status before the transition. */
515
+ oldStatus: OrderTransitionResultDtoOldStatus;
516
+ /** The status after the transition. */
517
+ newStatus: OrderTransitionResultDtoNewStatus;
518
+ transitionedAt: string;
519
+ }
520
+ export interface DeliverAllDto {
521
+ /** An existing file_asset id (kind POD) to link to the leg as proof_of_delivery. */
522
+ proofOfDeliveryFileId?: string;
523
+ /** An existing file_asset id (kind SIGNATURE) to link to the leg as signature. */
524
+ signatureFileId?: string;
525
+ /** Delivery timestamp; defaults to now(). Stamped on the leg and the order. */
526
+ deliveredAt?: string;
527
+ }
528
+ /**
529
+ * Always COMPLETED.
530
+ */
531
+ export type DeliverAllLegDtoStatus = typeof DeliverAllLegDtoStatus[keyof typeof DeliverAllLegDtoStatus];
532
+ export declare const DeliverAllLegDtoStatus: {
533
+ readonly COMPLETED: "COMPLETED";
534
+ };
535
+ export interface DeliverAllLegDto {
536
+ legId: string;
537
+ /** Always COMPLETED. */
538
+ status: DeliverAllLegDtoStatus;
539
+ completedAt: string;
540
+ }
541
+ /**
542
+ * Always DELIVERED.
543
+ */
544
+ export type DeliveredPodDtoStatus = typeof DeliveredPodDtoStatus[keyof typeof DeliveredPodDtoStatus];
545
+ export declare const DeliveredPodDtoStatus: {
546
+ readonly DELIVERED: "DELIVERED";
547
+ };
548
+ export interface DeliveredPodDto {
549
+ podId: string;
550
+ /** Always DELIVERED. */
551
+ status: DeliveredPodDtoStatus;
552
+ }
553
+ /**
554
+ * Always COMPLETED after a successful delivery.
555
+ */
556
+ export type DeliverAllResultDtoStatus = typeof DeliverAllResultDtoStatus[keyof typeof DeliverAllResultDtoStatus];
557
+ export declare const DeliverAllResultDtoStatus: {
558
+ readonly COMPLETED: "COMPLETED";
559
+ };
560
+ export interface DeliverAllResultDto {
561
+ salesOrderId: string;
562
+ /** Always COMPLETED after a successful delivery. */
563
+ status: DeliverAllResultDtoStatus;
564
+ leg: DeliverAllLegDto;
565
+ /** Every pod that was PACKED and is now DELIVERED. */
566
+ deliveredPods: DeliveredPodDto[];
567
+ /** @nullable */
568
+ proofOfDeliveryFileId: string | null;
569
+ /** @nullable */
570
+ signatureFileId: string | null;
571
+ /** True when this response is an idempotent replay. */
572
+ idempotent: boolean;
573
+ }
574
+ export interface CompleteOrderDto {
575
+ /** When true, complete even if some product lines are not HANDLED (records products_missing_info=true). Defaults to false → 409 order_has_missing_info. */
576
+ allowMissingInfo?: boolean;
577
+ }
578
+ /**
579
+ * Always COMPLETED after a successful complete.
580
+ */
581
+ export type CompleteOrderResultDtoStatus = typeof CompleteOrderResultDtoStatus[keyof typeof CompleteOrderResultDtoStatus];
582
+ export declare const CompleteOrderResultDtoStatus: {
583
+ readonly COMPLETED: "COMPLETED";
584
+ };
585
+ export interface CompleteOrderResultDto {
586
+ salesOrderId: string;
587
+ /** Always COMPLETED after a successful complete. */
588
+ status: CompleteOrderResultDtoStatus;
589
+ completedAt: string;
590
+ /** Whether the completed order still had non-HANDLED product lines (mirrors sales_order.metadata.products_missing_info). */
591
+ productsMissingInfo: boolean;
592
+ /** True when this response is an idempotent replay. */
593
+ idempotent: boolean;
594
+ }
595
+ export interface RemoveRemainingDto {
596
+ /**
597
+ * Free-text reason, carried on the emitted sales_order.lines_removed outbox event only.
598
+ * @maxLength 500
599
+ */
600
+ reason?: string;
601
+ }
602
+ export interface RemovedLineDto {
603
+ salesOrderProductId: string;
604
+ productId: string;
605
+ /** Units removed from this line: the whole requested quantity (line soft-deleted) or the unfulfilled remainder (line reduced to its fulfilled quantity). */
606
+ removedQuantity: number;
607
+ }
608
+ export interface RemoveRemainingResultDto {
609
+ salesOrderId: string;
610
+ /** Lines dropped (0 fulfilled → soft-deleted) or reduced (partial → requested lowered to fulfilled). */
611
+ removed: RemovedLineDto[];
612
+ /** Count of live product lines remaining after this call (reduced lines still count). */
613
+ remainingLineCount: number;
614
+ /** True when this was an idempotent replay of a prior call. */
615
+ idempotent: boolean;
616
+ }
617
+ export interface CancelOrderDto {
618
+ /**
619
+ * Free-text cancellation reason, persisted on sales_order.cancellation_reason.
620
+ * @maxLength 500
621
+ */
622
+ reason?: string;
623
+ }
624
+ /**
625
+ * Always CANCELLED after a successful cancel.
626
+ */
627
+ export type CancelOrderResultDtoStatus = typeof CancelOrderResultDtoStatus[keyof typeof CancelOrderResultDtoStatus];
628
+ export declare const CancelOrderResultDtoStatus: {
629
+ readonly CANCELLED: "CANCELLED";
630
+ };
631
+ export interface CancelOrderResultDto {
632
+ salesOrderId: string;
633
+ /** Always CANCELLED after a successful cancel. */
634
+ status: CancelOrderResultDtoStatus;
635
+ cancelledAt: string;
636
+ /** The persisted reason, when supplied. */
637
+ cancellationReason?: string;
638
+ /** Capacity reservations released by this cancel (may be empty). */
639
+ releasedReservationIds: string[];
640
+ }
130
641
  export interface OrderGroupDto {
131
642
  orderGroupId: string;
132
643
  /** Customer-facing booking number (tenant sequence). */
@@ -277,6 +788,16 @@ export interface AddressDto {
277
788
  createdAt: string;
278
789
  updatedAt: string;
279
790
  }
791
+ export interface PaginatedAddressesDto {
792
+ /** The page of rows. */
793
+ items: AddressDto[];
794
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
795
+ total: number;
796
+ /** Effective max rows applied (after defaults/clamp). */
797
+ limit: number;
798
+ /** Effective rows skipped applied. */
799
+ offset: number;
800
+ }
280
801
  export interface CreateAddressDto {
281
802
  /** Target organization — staff-only (create on behalf). An org user's own organization is always taken from the JWT; passing another org is rejected. */
282
803
  organizationId?: string;
@@ -353,6 +874,16 @@ export interface OrgContactDto {
353
874
  createdAt: string;
354
875
  updatedAt: string;
355
876
  }
877
+ export interface PaginatedOrgContactsDto {
878
+ /** The page of rows. */
879
+ items: OrgContactDto[];
880
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
881
+ total: number;
882
+ /** Effective max rows applied (after defaults/clamp). */
883
+ limit: number;
884
+ /** Effective rows skipped applied. */
885
+ offset: number;
886
+ }
356
887
  export interface CreateOrgContactDto {
357
888
  /** Target organization — staff-only (create on behalf). An org user's own organization is always taken from the JWT; passing another org is rejected. */
358
889
  organizationId?: string;
@@ -406,6 +937,16 @@ export interface OrganizationDto {
406
937
  createdAt: string;
407
938
  updatedAt: string;
408
939
  }
940
+ export interface PaginatedOrganizationsDto {
941
+ /** The page of rows. */
942
+ items: OrganizationDto[];
943
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
944
+ total: number;
945
+ /** Effective max rows applied (after defaults/clamp). */
946
+ limit: number;
947
+ /** Effective rows skipped applied. */
948
+ offset: number;
949
+ }
409
950
  export type CreateOrganizationDtoType = typeof CreateOrganizationDtoType[keyof typeof CreateOrganizationDtoType];
410
951
  export declare const CreateOrganizationDtoType: {
411
952
  readonly business: "business";
@@ -605,6 +1146,16 @@ export interface CarrierProviderDto {
605
1146
  defaultTrackingUrlTemplate: string | null;
606
1147
  isActive: boolean;
607
1148
  }
1149
+ export interface PaginatedCarrierProvidersDto {
1150
+ /** The page of rows. */
1151
+ items: CarrierProviderDto[];
1152
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
1153
+ total: number;
1154
+ /** Effective max rows applied (after defaults/clamp). */
1155
+ limit: number;
1156
+ /** Effective rows skipped applied. */
1157
+ offset: number;
1158
+ }
608
1159
  export type TenantCarrierDtoKind = typeof TenantCarrierDtoKind[keyof typeof TenantCarrierDtoKind];
609
1160
  export declare const TenantCarrierDtoKind: {
610
1161
  readonly OWN_FLEET: "OWN_FLEET";
@@ -638,6 +1189,16 @@ export interface TenantCarrierDto {
638
1189
  createdAt: string;
639
1190
  updatedAt: string;
640
1191
  }
1192
+ export interface PaginatedCarriersDto {
1193
+ /** The page of rows. */
1194
+ items: TenantCarrierDto[];
1195
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
1196
+ total: number;
1197
+ /** Effective max rows applied (after defaults/clamp). */
1198
+ limit: number;
1199
+ /** Effective rows skipped applied. */
1200
+ offset: number;
1201
+ }
641
1202
  export type CreateTenantCarrierDtoKind = typeof CreateTenantCarrierDtoKind[keyof typeof CreateTenantCarrierDtoKind];
642
1203
  export declare const CreateTenantCarrierDtoKind: {
643
1204
  readonly OWN_FLEET: "OWN_FLEET";
@@ -718,6 +1279,16 @@ export interface CarrierMethodDto {
718
1279
  bookingSoftware: string | null;
719
1280
  isActive: boolean;
720
1281
  }
1282
+ export interface PaginatedCarrierMethodsDto {
1283
+ /** The page of rows. */
1284
+ items: CarrierMethodDto[];
1285
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
1286
+ total: number;
1287
+ /** Effective max rows applied (after defaults/clamp). */
1288
+ limit: number;
1289
+ /** Effective rows skipped applied. */
1290
+ offset: number;
1291
+ }
721
1292
  export type CreateCarrierMethodDtoSupportedRecipientTypesItem = typeof CreateCarrierMethodDtoSupportedRecipientTypesItem[keyof typeof CreateCarrierMethodDtoSupportedRecipientTypesItem];
722
1293
  export declare const CreateCarrierMethodDtoSupportedRecipientTypesItem: {
723
1294
  readonly business: "business";
@@ -747,6 +1318,18 @@ export interface CreateCarrierMethodDto {
747
1318
  bookingSoftware?: string;
748
1319
  isActive?: boolean;
749
1320
  }
1321
+ export interface DriverDto {
1322
+ /** Keycloak subject identifier of the driver */
1323
+ userSub: string;
1324
+ /**
1325
+ * Driver display name (non-PII)
1326
+ * @nullable
1327
+ */
1328
+ displayName: string | null;
1329
+ /** Assignment role (carrier-driver) */
1330
+ role: string;
1331
+ active: boolean;
1332
+ }
750
1333
  export type UpdateCarrierMethodDtoSupportedRecipientTypesItem = typeof UpdateCarrierMethodDtoSupportedRecipientTypesItem[keyof typeof UpdateCarrierMethodDtoSupportedRecipientTypesItem];
751
1334
  export declare const UpdateCarrierMethodDtoSupportedRecipientTypesItem: {
752
1335
  readonly business: "business";
@@ -781,6 +1364,22 @@ export interface MembershipDto {
781
1364
  /** Fine-grained permissions (resource:action) granted by this org role — drives component visibility when this org is active */
782
1365
  capabilities: string[];
783
1366
  }
1367
+ export interface AssignmentDto {
1368
+ /** Assignment kind: warehouse | carrier | tenant_wide */
1369
+ kind: string;
1370
+ /**
1371
+ * Warehouse (when kind=warehouse)
1372
+ * @nullable
1373
+ */
1374
+ warehouseId: string | null;
1375
+ /**
1376
+ * Tenant carrier (when kind=carrier)
1377
+ * @nullable
1378
+ */
1379
+ tenantCarrierId: string | null;
1380
+ role: string;
1381
+ active: boolean;
1382
+ }
784
1383
  export interface MeResponseDto {
785
1384
  /** Keycloak subject identifier */
786
1385
  sub: string;
@@ -801,6 +1400,15 @@ export interface MeResponseDto {
801
1400
  memberships: MembershipDto[];
802
1401
  /** Cross-cutting permissions (resource:action) from platform/tenant-wide/warehouse/carrier roles for the active context — drives client-side component visibility. Org-scoped permissions are on each membership. */
803
1402
  capabilities: string[];
1403
+ /** Warehouses the caller can act for (JWT warehouse_ids claim; [] if none) — matches what RLS scopes operational reads to. */
1404
+ warehouseIds: string[];
1405
+ /**
1406
+ * Carrier the caller can act for (JWT carrier_id claim; null if none).
1407
+ * @nullable
1408
+ */
1409
+ carrierId: string | null;
1410
+ /** Long-form staff assignments (own rows only) from employee_assignment — the authoritative warehouse/carrier reach behind the warehouseIds/carrierId summary. */
1411
+ assignments: AssignmentDto[];
804
1412
  }
805
1413
  export interface UpdateMeDto {
806
1414
  displayName?: string;
@@ -1420,7 +2028,8 @@ export interface TransportServiceDto {
1420
2028
  name: string;
1421
2029
  salesOrderType: TransportServiceDtoSalesOrderType;
1422
2030
  fulfilmentMode: TransportServiceDtoFulfilmentMode;
1423
- tenantCarrierId: string;
2031
+ /** @nullable */
2032
+ tenantCarrierId: string | null;
1424
2033
  /** @nullable */
1425
2034
  tenantCarrierMethodId: string | null;
1426
2035
  /** @nullable */
@@ -1460,6 +2069,16 @@ export interface TransportSlotDto {
1460
2069
  /** ACTIVE | CLOSED */
1461
2070
  status: string;
1462
2071
  }
2072
+ export interface PaginatedTransportServicesDto {
2073
+ /** The page of rows. */
2074
+ items: TransportServiceDto[];
2075
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
2076
+ total: number;
2077
+ /** Effective max rows applied (after defaults/clamp). */
2078
+ limit: number;
2079
+ /** Effective rows skipped applied. */
2080
+ offset: number;
2081
+ }
1463
2082
  export interface TransportServiceZoneDto {
1464
2083
  transportServiceZoneId: string;
1465
2084
  serviceZoneId: string;
@@ -1546,7 +2165,8 @@ export interface TransportServiceDetailDto {
1546
2165
  name: string;
1547
2166
  salesOrderType: TransportServiceDetailDtoSalesOrderType;
1548
2167
  fulfilmentMode: TransportServiceDetailDtoFulfilmentMode;
1549
- tenantCarrierId: string;
2168
+ /** @nullable */
2169
+ tenantCarrierId: string | null;
1550
2170
  /** @nullable */
1551
2171
  tenantCarrierMethodId: string | null;
1552
2172
  /** @nullable */
@@ -1635,7 +2255,11 @@ export interface CreateTransportServiceDto {
1635
2255
  name: string;
1636
2256
  salesOrderType: CreateTransportServiceDtoSalesOrderType;
1637
2257
  fulfilmentMode: CreateTransportServiceDtoFulfilmentMode;
1638
- tenantCarrierId: string;
2258
+ /**
2259
+ * Carrier-pinned service. Omit or null ⇒ carrier-agnostic (carrier chosen at dispatch).
2260
+ * @nullable
2261
+ */
2262
+ tenantCarrierId?: string | null;
1639
2263
  tenantCarrierMethodId?: string;
1640
2264
  /** NULL = any warehouse */
1641
2265
  originWarehouseId?: string;
@@ -1677,8 +2301,16 @@ export interface UpdateTransportServiceDto {
1677
2301
  name?: string;
1678
2302
  salesOrderType?: UpdateTransportServiceDtoSalesOrderType;
1679
2303
  fulfilmentMode?: UpdateTransportServiceDtoFulfilmentMode;
1680
- tenantCarrierId?: string;
1681
- tenantCarrierMethodId?: string;
2304
+ /**
2305
+ * Set null to make the service carrier-agnostic; a uuid to pin a carrier.
2306
+ * @nullable
2307
+ */
2308
+ tenantCarrierId?: string | null;
2309
+ /**
2310
+ * A method may only be pinned when a carrier is pinned; set null to clear it (auto-cleared when the carrier is cleared).
2311
+ * @nullable
2312
+ */
2313
+ tenantCarrierMethodId?: string | null;
1682
2314
  originWarehouseId?: string;
1683
2315
  billingArticleId?: string;
1684
2316
  customerTypes?: UpdateTransportServiceDtoCustomerTypesItem[];
@@ -1690,6 +2322,16 @@ export interface UpdateTransportServiceDto {
1690
2322
  zones?: TransportServiceZoneInputDto[];
1691
2323
  prices?: TransportServicePriceInputDto[];
1692
2324
  }
2325
+ export interface PaginatedTransportServicePricesDto {
2326
+ /** The page of rows. */
2327
+ items: TransportServicePriceDto[];
2328
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
2329
+ total: number;
2330
+ /** Effective max rows applied (after defaults/clamp). */
2331
+ limit: number;
2332
+ /** Effective rows skipped applied. */
2333
+ offset: number;
2334
+ }
1693
2335
  /**
1694
2336
  * GeoJSON Polygon/MultiPolygon, re-serialised from geography. NULL = zip-only zone.
1695
2337
  * @nullable
@@ -1724,6 +2366,16 @@ export interface ServiceZoneDto {
1724
2366
  createdAt: string;
1725
2367
  updatedAt: string;
1726
2368
  }
2369
+ export interface PaginatedServiceZonesDto {
2370
+ /** The page of rows. */
2371
+ items: ServiceZoneDto[];
2372
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
2373
+ total: number;
2374
+ /** Effective max rows applied (after defaults/clamp). */
2375
+ limit: number;
2376
+ /** Effective rows skipped applied. */
2377
+ offset: number;
2378
+ }
1727
2379
  export interface ServiceZonePostalCodeDto {
1728
2380
  serviceZonePostalCodeId: string;
1729
2381
  /** ISO-3166-1 alpha-2 country code */
@@ -1887,6 +2539,16 @@ export interface SlotConfigDto {
1887
2539
  createdAt: string;
1888
2540
  updatedAt: string;
1889
2541
  }
2542
+ export interface PaginatedSlotConfigsDto {
2543
+ /** The page of rows. */
2544
+ items: SlotConfigDto[];
2545
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
2546
+ total: number;
2547
+ /** Effective max rows applied (after defaults/clamp). */
2548
+ limit: number;
2549
+ /** Effective rows skipped applied. */
2550
+ offset: number;
2551
+ }
1890
2552
  /**
1891
2553
  * NULL = daily-cap-only (no concrete slots).
1892
2554
  */
@@ -1941,6 +2603,22 @@ export interface UpdateSlotConfigDto {
1941
2603
  generateHorizonDays?: number;
1942
2604
  status?: string;
1943
2605
  }
2606
+ export interface GenerateCapacityDto {
2607
+ /** Inclusive start (YYYY-MM-DD). Default: today (UTC). */
2608
+ fromDate?: string;
2609
+ /** Inclusive end (YYYY-MM-DD). Default: today + config.generateHorizonDays. */
2610
+ toDate?: string;
2611
+ /** Regenerate existing days. Never destroys a day that carries live reservations (it is reported under skipped[] instead). */
2612
+ force?: boolean;
2613
+ }
2614
+ export interface GenerateCapacityResultDto {
2615
+ created: number;
2616
+ updated: number;
2617
+ skippedReserved: number;
2618
+ skippedExisting: number;
2619
+ /** true when replayed from a prior Idempotency-Key. */
2620
+ idempotent: boolean;
2621
+ }
1944
2622
  /**
1945
2623
  * { amount, currencyCode }.
1946
2624
  * @nullable
@@ -1979,6 +2657,16 @@ export interface CapacityDayDto {
1979
2657
  createdAt: string;
1980
2658
  updatedAt: string;
1981
2659
  }
2660
+ export interface PaginatedCapacityDaysDto {
2661
+ /** The page of rows. */
2662
+ items: CapacityDayDto[];
2663
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
2664
+ total: number;
2665
+ /** Effective max rows applied (after defaults/clamp). */
2666
+ limit: number;
2667
+ /** Effective rows skipped applied. */
2668
+ offset: number;
2669
+ }
1982
2670
  export interface DayAvailabilityDto {
1983
2671
  /**
1984
2672
  * NULL = unlimited.
@@ -2250,6 +2938,16 @@ export interface CapacityOverrideDto {
2250
2938
  createdByUserSub: string | null;
2251
2939
  createdAt: string;
2252
2940
  }
2941
+ export interface PaginatedCapacityOverridesDto {
2942
+ /** The page of rows. */
2943
+ items: CapacityOverrideDto[];
2944
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
2945
+ total: number;
2946
+ /** Effective max rows applied (after defaults/clamp). */
2947
+ limit: number;
2948
+ /** Effective rows skipped applied. */
2949
+ offset: number;
2950
+ }
2253
2951
  export interface CreateCapacityOverrideDto {
2254
2952
  /** XOR transportCapacityDayId. */
2255
2953
  transportSlotId?: string;
@@ -2308,6 +3006,16 @@ export interface RouteDto {
2308
3006
  createdAt: string;
2309
3007
  updatedAt: string;
2310
3008
  }
3009
+ export interface PaginatedRoutesDto {
3010
+ /** The page of rows. */
3011
+ items: RouteDto[];
3012
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
3013
+ total: number;
3014
+ /** Effective max rows applied (after defaults/clamp). */
3015
+ limit: number;
3016
+ /** Effective rows skipped applied. */
3017
+ offset: number;
3018
+ }
2311
3019
  export interface RouteStopDto {
2312
3020
  routeStopId: string;
2313
3021
  routeId: string;
@@ -2678,6 +3386,16 @@ export interface TransportLegDto {
2678
3386
  carrierBooking?: TransportLegDtoCarrierBooking;
2679
3387
  shipmentUnits?: TransportLegShipmentUnitDto[];
2680
3388
  }
3389
+ export interface PaginatedTransportLegsDto {
3390
+ /** The page of rows. */
3391
+ items: TransportLegDto[];
3392
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
3393
+ total: number;
3394
+ /** Effective max rows applied (after defaults/clamp). */
3395
+ limit: number;
3396
+ /** Effective rows skipped applied. */
3397
+ offset: number;
3398
+ }
2681
3399
  export interface PlanLegDto {
2682
3400
  /**
2683
3401
  * Free-text reason / note.
@@ -2770,9 +3488,14 @@ export interface PatchDoorCodeDto {
2770
3488
  */
2771
3489
  doorCode: string | null;
2772
3490
  }
2773
- export interface CarrierBookingListDto {
3491
+ export interface PaginatedCarrierBookingsDto {
3492
+ /** The page of rows. */
2774
3493
  items: CarrierBookingDto[];
3494
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
3495
+ total: number;
3496
+ /** Effective max rows applied (after defaults/clamp). */
2775
3497
  limit: number;
3498
+ /** Effective rows skipped applied. */
2776
3499
  offset: number;
2777
3500
  }
2778
3501
  export interface ShipmentUnitOverrideDto {
@@ -2949,6 +3672,16 @@ export interface ProductDto {
2949
3672
  createdAt: string;
2950
3673
  updatedAt: string;
2951
3674
  }
3675
+ export interface PaginatedProductsDto {
3676
+ /** The page of rows. */
3677
+ items: ProductDto[];
3678
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
3679
+ total: number;
3680
+ /** Effective max rows applied (after defaults/clamp). */
3681
+ limit: number;
3682
+ /** Effective rows skipped applied. */
3683
+ offset: number;
3684
+ }
2952
3685
  export interface UpdateProductDto {
2953
3686
  /** Catalogued product name */
2954
3687
  name?: string;
@@ -3029,6 +3762,16 @@ export interface ItemDto {
3029
3762
  createdAt: string;
3030
3763
  updatedAt: string;
3031
3764
  }
3765
+ export interface PaginatedItemsDto {
3766
+ /** The page of rows. */
3767
+ items: ItemDto[];
3768
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
3769
+ total: number;
3770
+ /** Effective max rows applied (after defaults/clamp). */
3771
+ limit: number;
3772
+ /** Effective rows skipped applied. */
3773
+ offset: number;
3774
+ }
3032
3775
  export interface UpdateItemDto {
3033
3776
  condition?: string;
3034
3777
  /** Supplier/manufacturing batch id */
@@ -3068,6 +3811,16 @@ export interface PodDto {
3068
3811
  createdAt: string;
3069
3812
  updatedAt: string;
3070
3813
  }
3814
+ export interface PaginatedPodsDto {
3815
+ /** The page of rows. */
3816
+ items: PodDto[];
3817
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
3818
+ total: number;
3819
+ /** Effective max rows applied (after defaults/clamp). */
3820
+ limit: number;
3821
+ /** Effective rows skipped applied. */
3822
+ offset: number;
3823
+ }
3071
3824
  export interface PickStateDto {
3072
3825
  podId: string;
3073
3826
  /** Current on-hand projection */
@@ -3125,10 +3878,30 @@ export interface PositionDto {
3125
3878
  heightMm: number | null;
3126
3879
  /** @nullable */
3127
3880
  depthMm: number | null;
3881
+ /**
3882
+ * Ordering hint for pick sequencing
3883
+ * @nullable
3884
+ */
3885
+ rank: number | null;
3886
+ /**
3887
+ * Physical check/verification number
3888
+ * @nullable
3889
+ */
3890
+ checkNumber: number | null;
3128
3891
  /** True when an active position_blocked row exists */
3129
3892
  isBlocked: boolean;
3130
3893
  createdAt: string;
3131
3894
  }
3895
+ export interface PaginatedPositionsDto {
3896
+ /** The page of rows. */
3897
+ items: PositionDto[];
3898
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
3899
+ total: number;
3900
+ /** Effective max rows applied (after defaults/clamp). */
3901
+ limit: number;
3902
+ /** Effective rows skipped applied. */
3903
+ offset: number;
3904
+ }
3132
3905
  export interface PositionProductDto {
3133
3906
  productId: string;
3134
3907
  /** @nullable */
@@ -3198,6 +3971,16 @@ export interface ContainerDto {
3198
3971
  createdAt: string;
3199
3972
  updatedAt: string;
3200
3973
  }
3974
+ export interface PaginatedContainersDto {
3975
+ /** The page of rows. */
3976
+ items: ContainerDto[];
3977
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
3978
+ total: number;
3979
+ /** Effective max rows applied (after defaults/clamp). */
3980
+ limit: number;
3981
+ /** Effective rows skipped applied. */
3982
+ offset: number;
3983
+ }
3201
3984
  export interface CreateContainerDto {
3202
3985
  warehouseId: string;
3203
3986
  /** container_type lookup value (e.g. EPAL) */
@@ -3271,6 +4054,11 @@ export interface WarehouseOrderSummaryDto {
3271
4054
  status: string;
3272
4055
  /** @nullable */
3273
4056
  externalReference: string | null;
4057
+ /**
4058
+ * Human-readable order name
4059
+ * @nullable
4060
+ */
4061
+ name: string | null;
3274
4062
  /** @nullable */
3275
4063
  plannedArrivalDate: string | null;
3276
4064
  /** @nullable */
@@ -3280,14 +4068,45 @@ export interface WarehouseOrderSummaryDto {
3280
4068
  createdAt: string;
3281
4069
  updatedAt: string;
3282
4070
  }
4071
+ export interface PaginatedWarehouseOrdersDto {
4072
+ /** The page of rows. */
4073
+ items: WarehouseOrderSummaryDto[];
4074
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
4075
+ total: number;
4076
+ /** Effective max rows applied (after defaults/clamp). */
4077
+ limit: number;
4078
+ /** Effective rows skipped applied. */
4079
+ offset: number;
4080
+ }
3283
4081
  export interface WarehouseOrderProductDto {
3284
4082
  woProductId: string;
3285
4083
  productId: string;
4084
+ /**
4085
+ * Per-line ship-to address (public.address). Set on RECEIVE_AND_DISTRIBUTE lines that fan out to a destination; null on plain inbound lines.
4086
+ * @nullable
4087
+ */
4088
+ destinationAddressId: string | null;
3286
4089
  /** Expected quantity. */
3287
4090
  requestedQuantity: number;
3288
4091
  /** Received quantity (derived from RECEIVE movements). */
3289
4092
  quantity: number;
4093
+ /** The line's warehouse_order_product_status value. */
3290
4094
  status: string;
4095
+ /**
4096
+ * Referenced product's catalogue name. Null when the product is not visible in the caller's RLS scope (e.g. a warehouse operator viewing an inbound line for a catalogue product with no goods yet).
4097
+ * @nullable
4098
+ */
4099
+ productName: string | null;
4100
+ /**
4101
+ * Referenced product's primary image storage key (same visibility caveat as productName).
4102
+ * @nullable
4103
+ */
4104
+ productImageStorageKey: string | null;
4105
+ /**
4106
+ * Referenced product's product_status value (same visibility caveat as productName).
4107
+ * @nullable
4108
+ */
4109
+ productStatus: string | null;
3291
4110
  }
3292
4111
  export interface WarehouseOrderContainerDto {
3293
4112
  woContainerId: string;
@@ -3331,6 +4150,11 @@ export interface WarehouseOrderDetailDto {
3331
4150
  status: string;
3332
4151
  /** @nullable */
3333
4152
  externalReference: string | null;
4153
+ /**
4154
+ * Human-readable order name
4155
+ * @nullable
4156
+ */
4157
+ name: string | null;
3334
4158
  /** @nullable */
3335
4159
  plannedArrivalDate: string | null;
3336
4160
  /** @nullable */
@@ -3414,6 +4238,11 @@ export interface WarehouseOrderCommandResultDto {
3414
4238
  status: string;
3415
4239
  /** @nullable */
3416
4240
  externalReference: string | null;
4241
+ /**
4242
+ * Human-readable order name
4243
+ * @nullable
4244
+ */
4245
+ name: string | null;
3417
4246
  /** @nullable */
3418
4247
  plannedArrivalDate: string | null;
3419
4248
  /** @nullable */
@@ -3491,6 +4320,16 @@ export interface FolderDto {
3491
4320
  name: string;
3492
4321
  createdAt: string;
3493
4322
  }
4323
+ export interface PaginatedFoldersDto {
4324
+ /** The page of rows. */
4325
+ items: FolderDto[];
4326
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
4327
+ total: number;
4328
+ /** Effective max rows applied (after defaults/clamp). */
4329
+ limit: number;
4330
+ /** Effective rows skipped applied. */
4331
+ offset: number;
4332
+ }
3494
4333
  export interface CreateFolderDto {
3495
4334
  /**
3496
4335
  * Folder display name.
@@ -3507,14 +4346,53 @@ export interface UpdateFolderDto {
3507
4346
  * New folder display name.
3508
4347
  * @maxLength 200
3509
4348
  */
3510
- name: string;
3511
- }
3512
- export interface MoveFolderDto {
4349
+ name?: string;
3513
4350
  /**
3514
- * New parent folder (same org); null moves the folder to the root.
4351
+ * Re-parent the folder (same org, cycle-checked). Explicit null moves it to the root; omit to leave the parent unchanged.
3515
4352
  * @nullable
3516
4353
  */
3517
- parentFolderId: string | null;
4354
+ parentFolderId?: string | null;
4355
+ }
4356
+ export interface MoveIntoFolderDto {
4357
+ /** Products to move into this folder (product.folder_id ← :id). */
4358
+ productIds?: string[];
4359
+ /** Sub-folders to nest under this folder (folder.parent_folder_id ← :id). */
4360
+ folderIds?: string[];
4361
+ /**
4362
+ * Removed. Single-folder re-parent is now PATCH /v1/folders/:id { parentFolderId }. Sending this returns 400.
4363
+ * @deprecated
4364
+ */
4365
+ parentFolderId?: string;
4366
+ }
4367
+ /**
4368
+ * Why this id was not moved.
4369
+ */
4370
+ export type FolderMoveSkippedDtoReason = typeof FolderMoveSkippedDtoReason[keyof typeof FolderMoveSkippedDtoReason];
4371
+ export declare const FolderMoveSkippedDtoReason: {
4372
+ readonly not_found: "not_found";
4373
+ readonly wrong_organization: "wrong_organization";
4374
+ readonly would_form_cycle: "would_form_cycle";
4375
+ };
4376
+ export interface FolderMoveSkippedDto {
4377
+ id: string;
4378
+ /** Why this id was not moved. */
4379
+ reason: FolderMoveSkippedDtoReason;
4380
+ }
4381
+ export interface MoveIntoFolderResultDto {
4382
+ /** The target folder. */
4383
+ folderId: string;
4384
+ /** Products actually moved. */
4385
+ movedProducts: string[];
4386
+ /** Sub-folders actually nested. */
4387
+ movedFolders: string[];
4388
+ /** Ids skipped, with the reason. */
4389
+ skipped: FolderMoveSkippedDto[];
4390
+ /** Total products + folders moved. */
4391
+ movedCount: number;
4392
+ /** Total ids skipped. */
4393
+ skippedCount: number;
4394
+ /** True when this response replays a previous run of the key. */
4395
+ idempotent: boolean;
3518
4396
  }
3519
4397
  export interface ReceiveCoreCommandDto {
3520
4398
  /** The inbound line being handled. */
@@ -4032,6 +4910,224 @@ export interface DamageReportDto {
4032
4910
  active: boolean;
4033
4911
  createdAt: string;
4034
4912
  }
4913
+ export interface ForkliftPositionRefDto {
4914
+ positionId: string;
4915
+ /** @nullable */
4916
+ section: string | null;
4917
+ /** @nullable */
4918
+ positionNumber: number | null;
4919
+ /** @nullable */
4920
+ level: number | null;
4921
+ /** @nullable */
4922
+ checkNumber: number | null;
4923
+ }
4924
+ /**
4925
+ * @nullable
4926
+ */
4927
+ export type ForkliftQueueItemDtoPosition = ForkliftPositionRefDto | null;
4928
+ export interface ForkliftQueueItemDto {
4929
+ containerId: string;
4930
+ /** container.label_number */
4931
+ containerLabelId: number;
4932
+ /** container_type.value */
4933
+ containerType: string;
4934
+ /** @nullable */
4935
+ position: ForkliftQueueItemDtoPosition;
4936
+ /** Live pods currently in the container. */
4937
+ podCount: number;
4938
+ unhandledSopCount?: number;
4939
+ /** Set for the `transfer` queue. */
4940
+ warehouseOrderContainerId?: string;
4941
+ /** @nullable */
4942
+ dueAt?: string | null;
4943
+ }
4944
+ export type ForkliftQueueDtoMode = typeof ForkliftQueueDtoMode[keyof typeof ForkliftQueueDtoMode];
4945
+ export declare const ForkliftQueueDtoMode: {
4946
+ readonly place: "place";
4947
+ readonly pack: "pack";
4948
+ readonly empty: "empty";
4949
+ readonly transfer: "transfer";
4950
+ readonly downlift: "downlift";
4951
+ readonly replace: "replace";
4952
+ };
4953
+ export interface ForkliftQueueDto {
4954
+ mode: ForkliftQueueDtoMode;
4955
+ warehouseId: string;
4956
+ items: ForkliftQueueItemDto[];
4957
+ }
4958
+ export type ResolvePlacementDtoMode = typeof ResolvePlacementDtoMode[keyof typeof ResolvePlacementDtoMode];
4959
+ export declare const ResolvePlacementDtoMode: {
4960
+ readonly place: "place";
4961
+ readonly downlift: "downlift";
4962
+ readonly replace: "replace";
4963
+ };
4964
+ export interface ResolvePlacementDto {
4965
+ /** One of containerId / containerLabelId. */
4966
+ containerId?: string;
4967
+ /** Container label number (alternative to containerId). */
4968
+ containerLabelId?: string;
4969
+ mode: ResolvePlacementDtoMode;
4970
+ warehouseId: string;
4971
+ /** Prefer slots in this section. */
4972
+ section?: string;
4973
+ /** Position ids to EXCLUDE from the candidate set — the client re-asks after rejecting a slot. */
4974
+ skipPositionIds?: string[];
4975
+ }
4976
+ export interface ResolvePlacementContainerDto {
4977
+ containerId: string;
4978
+ containerLabelId: number;
4979
+ containerType: string;
4980
+ }
4981
+ export interface RecommendedPositionDto {
4982
+ positionId: string;
4983
+ /** @nullable */
4984
+ section: string | null;
4985
+ /** @nullable */
4986
+ positionNumber: number | null;
4987
+ /** @nullable */
4988
+ level: number | null;
4989
+ /**
4990
+ * position_grade.value
4991
+ * @nullable
4992
+ */
4993
+ grade: string | null;
4994
+ /** @nullable */
4995
+ checkNumber: number | null;
4996
+ }
4997
+ /**
4998
+ * null for SEAPAL (manual placement).
4999
+ * @nullable
5000
+ */
5001
+ export type ResolvePlacementResultDtoRecommendedPosition = RecommendedPositionDto | null;
5002
+ export interface ResolvePlacementResultDto {
5003
+ container: ResolvePlacementContainerDto;
5004
+ /**
5005
+ * null for SEAPAL (manual placement).
5006
+ * @nullable
5007
+ */
5008
+ recommendedPosition: ResolvePlacementResultDtoRecommendedPosition;
5009
+ isStaticProduct: boolean;
5010
+ isSeapal: boolean;
5011
+ requiresManualPlacement: boolean;
5012
+ }
5013
+ export interface NeighborPositionDto {
5014
+ positionId: string;
5015
+ section: string;
5016
+ positionNumber: number;
5017
+ level: number;
5018
+ occupied: boolean;
5019
+ /** Signed offset from the origin slot (±2 / ±4). */
5020
+ offset: number;
5021
+ }
5022
+ export interface NeighborPositionsDto {
5023
+ neighbors: NeighborPositionDto[];
5024
+ /** The origin slot is narrower than the container. */
5025
+ forceBlock: boolean;
5026
+ }
5027
+ export interface ForkliftPlaceDto {
5028
+ /** One of containerId / containerLabelId. */
5029
+ containerId?: string;
5030
+ /** Container label number (alternative to containerId). */
5031
+ containerLabelId?: string;
5032
+ /** Destination position. */
5033
+ positionId: string;
5034
+ }
5035
+ export interface ForkliftPlaceResultDto {
5036
+ containerId: string;
5037
+ /** container.label_number */
5038
+ containerLabelId: number;
5039
+ /** The position the container now stands on. */
5040
+ positionId: string;
5041
+ /** Live pods relocated (one MOVE movement each). */
5042
+ movedPods: number;
5043
+ /** True when this response replays a previous run of the key. */
5044
+ idempotent: boolean;
5045
+ }
5046
+ export interface ForkliftEmptyDto {
5047
+ /** One of containerId / containerLabelId. */
5048
+ containerId?: string;
5049
+ /** Container label number (alternative to containerId). */
5050
+ containerLabelId?: string;
5051
+ }
5052
+ export interface ForkliftEmptyResultDto {
5053
+ containerId: string;
5054
+ /** container.label_number */
5055
+ containerLabelId: number;
5056
+ /** Always true — the container is off its position with dimensions reset. */
5057
+ cleared: boolean;
5058
+ /** True when this response replays a previous run of the key. */
5059
+ idempotent: boolean;
5060
+ }
5061
+ export interface ForkliftPackDto {
5062
+ /** One of containerId / containerLabelId. */
5063
+ containerId?: string;
5064
+ /** Container label number (alternative to containerId). */
5065
+ containerLabelId?: string;
5066
+ /** Explicit PACK-type destination (else the warehouse's PACK position is resolved). */
5067
+ positionId?: string;
5068
+ /** Source-pallet verification: the container's current position check_number. */
5069
+ checkNumber?: number;
5070
+ }
5071
+ export interface ForkliftPackContainerDto {
5072
+ containerId: string;
5073
+ /** The PACK position the container now stands on. */
5074
+ positionId: string;
5075
+ /**
5076
+ * Canonical width (NULL when unknown).
5077
+ * @nullable
5078
+ */
5079
+ widthMm: number | null;
5080
+ /**
5081
+ * Canonical depth (NULL when unknown).
5082
+ * @nullable
5083
+ */
5084
+ depthMm: number | null;
5085
+ /** Reset to 0 on pack. */
5086
+ heightMm: number;
5087
+ }
5088
+ export interface ForkliftPackPositionDto {
5089
+ positionId: string;
5090
+ /** @nullable */
5091
+ section: string | null;
5092
+ /** @nullable */
5093
+ positionNumber: number | null;
5094
+ /** @nullable */
5095
+ level: number | null;
5096
+ }
5097
+ export interface ForkliftPackResultDto {
5098
+ container: ForkliftPackContainerDto;
5099
+ packPosition: ForkliftPackPositionDto;
5100
+ /** True when this response replays a previous run of the key. */
5101
+ idempotent: boolean;
5102
+ }
5103
+ export interface ForkliftTransferDto {
5104
+ /** One of containerId / containerLabelId. */
5105
+ containerId?: string;
5106
+ /** Container label number (alternative to containerId). */
5107
+ containerLabelId?: string;
5108
+ }
5109
+ /**
5110
+ * The WOC status after the transfer.
5111
+ */
5112
+ export type ForkliftTransferResultDtoStatus = typeof ForkliftTransferResultDtoStatus[keyof typeof ForkliftTransferResultDtoStatus];
5113
+ export declare const ForkliftTransferResultDtoStatus: {
5114
+ readonly HANDLED: "HANDLED";
5115
+ };
5116
+ export interface ForkliftTransferResultDto {
5117
+ containerId: string;
5118
+ /** container.label_number */
5119
+ containerLabelId: number;
5120
+ /** The warehouse_order_container flipped to HANDLED. */
5121
+ warehouseOrderContainerId: string;
5122
+ /** The destination position the container now stands on. */
5123
+ positionId: string;
5124
+ /** The WOC status after the transfer. */
5125
+ status: ForkliftTransferResultDtoStatus;
5126
+ /** Live pods relocated (one MOVE movement each). */
5127
+ movedPods: number;
5128
+ /** True when this response replays a previous run of the key. */
5129
+ idempotent: boolean;
5130
+ }
4035
5131
  /**
4036
5132
  * Opening-hours JSONB
4037
5133
  * @nullable
@@ -4078,6 +5174,16 @@ export interface WarehouseDto {
4078
5174
  createdAt: string;
4079
5175
  updatedAt: string;
4080
5176
  }
5177
+ export interface PaginatedWarehousesDto {
5178
+ /** The page of rows. */
5179
+ items: WarehouseDto[];
5180
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
5181
+ total: number;
5182
+ /** Effective max rows applied (after defaults/clamp). */
5183
+ limit: number;
5184
+ /** Effective rows skipped applied. */
5185
+ offset: number;
5186
+ }
4081
5187
  /**
4082
5188
  * Weekday → { open, close } opening hours (JSONB)
4083
5189
  */
@@ -4175,6 +5281,25 @@ export interface CreatePositionDto {
4175
5281
  /** @nullable */
4176
5282
  internalComment?: string | null;
4177
5283
  }
5284
+ export interface StatusCountDto {
5285
+ /** The status value (FK into the matching status lookup) */
5286
+ status: string;
5287
+ /** How many rows in this warehouse carry the status */
5288
+ count: number;
5289
+ }
5290
+ export interface WarehouseStatsDto {
5291
+ warehouseId: string;
5292
+ /** Active positions (slots) in the warehouse */
5293
+ positionCount: number;
5294
+ /** Active containers in the warehouse */
5295
+ containerCount: number;
5296
+ /** Active products whose home warehouse is this one */
5297
+ productCount: number;
5298
+ /** Pods in a container at this warehouse, grouped by pod status */
5299
+ podsByStatus: StatusCountDto[];
5300
+ /** Warehouse orders on this warehouse, grouped by status */
5301
+ warehouseOrdersByStatus: StatusCountDto[];
5302
+ }
4178
5303
  export interface ValidateLocationDto {
4179
5304
  /** Latitude (WGS84) */
4180
5305
  latitude: number;
@@ -4186,6 +5311,24 @@ export interface ValidateLocationResultDto {
4186
5311
  inside: boolean;
4187
5312
  warehouseId: string;
4188
5313
  }
5314
+ export interface LookupItemDto {
5315
+ /** The stable code stored on rows (the FK/enum value). */
5316
+ value: string;
5317
+ /** Human-readable label. For table-backed kinds this is the row's English display name; for native-enum kinds (which carry no DB label) it equals the value. */
5318
+ label: string;
5319
+ }
5320
+ /**
5321
+ * The requested lookup kind (echoed back).
5322
+ */
5323
+ export type LookupsResponseDtoKind = {
5324
+ [key: string]: unknown;
5325
+ };
5326
+ export interface LookupsResponseDto {
5327
+ /** The requested lookup kind (echoed back). */
5328
+ kind: LookupsResponseDtoKind;
5329
+ /** The vocabulary, in display order. */
5330
+ items: LookupItemDto[];
5331
+ }
4189
5332
  export type CreateUploadUrlDtoKind = typeof CreateUploadUrlDtoKind[keyof typeof CreateUploadUrlDtoKind];
4190
5333
  export declare const CreateUploadUrlDtoKind: {
4191
5334
  readonly product_image: "product_image";
@@ -4482,6 +5625,16 @@ export interface InvoiceDto {
4482
5625
  /** @nullable */
4483
5626
  snapshotCorporateIdentityNumber: string | null;
4484
5627
  }
5628
+ export interface PaginatedInvoicesDto {
5629
+ /** The page of rows. */
5630
+ items: InvoiceDto[];
5631
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
5632
+ total: number;
5633
+ /** Effective max rows applied (after defaults/clamp). */
5634
+ limit: number;
5635
+ /** Effective rows skipped applied. */
5636
+ offset: number;
5637
+ }
4485
5638
  export interface InvoiceRowDto {
4486
5639
  invoiceRowId: string;
4487
5640
  /** @nullable */
@@ -5092,6 +6245,16 @@ export interface AccountCreditDto {
5092
6245
  createdAt: string;
5093
6246
  updatedAt: string;
5094
6247
  }
6248
+ export interface PaginatedAccountCreditsDto {
6249
+ /** The page of rows. */
6250
+ items: AccountCreditDto[];
6251
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
6252
+ total: number;
6253
+ /** Effective max rows applied (after defaults/clamp). */
6254
+ limit: number;
6255
+ /** Effective rows skipped applied. */
6256
+ offset: number;
6257
+ }
5095
6258
  export interface AccountCreditApplicationDto {
5096
6259
  accountCreditApplicationId: string;
5097
6260
  tenantId: string;
@@ -5355,6 +6518,16 @@ export interface CouponRedemptionDto {
5355
6518
  status: string;
5356
6519
  createdAt: string;
5357
6520
  }
6521
+ export interface PaginatedCouponRedemptionsDto {
6522
+ /** The page of rows. */
6523
+ items: CouponRedemptionDto[];
6524
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
6525
+ total: number;
6526
+ /** Effective max rows applied (after defaults/clamp). */
6527
+ limit: number;
6528
+ /** Effective rows skipped applied. */
6529
+ offset: number;
6530
+ }
5358
6531
  export interface UnitOfMeasureDto {
5359
6532
  unitOfMeasureId: string;
5360
6533
  /**
@@ -5554,10 +6727,22 @@ export type OrdersControllerListV1Params = {
5554
6727
  */
5555
6728
  offset?: number;
5556
6729
  /**
5557
- * Filter by sales_order status (lookup value).
6730
+ * Filter by sales_order status. Repeatable — pass ?status=A&status=B for a set; a single value is accepted too.
5558
6731
  */
5559
- status?: string;
6732
+ status?: string[];
5560
6733
  type?: OrdersControllerListV1Type;
6734
+ /**
6735
+ * Narrow to one organization (within the caller's RLS scope).
6736
+ */
6737
+ organizationId?: string;
6738
+ /**
6739
+ * created_at lower bound, inclusive (ISO-8601).
6740
+ */
6741
+ fromDate?: string;
6742
+ /**
6743
+ * created_at upper bound, inclusive (ISO-8601).
6744
+ */
6745
+ toDate?: string;
5561
6746
  };
5562
6747
  export type OrdersControllerListV1Type = typeof OrdersControllerListV1Type[keyof typeof OrdersControllerListV1Type];
5563
6748
  export declare const OrdersControllerListV1Type: {
@@ -5638,6 +6823,11 @@ export type OrganizationsControllerListV1Params = {
5638
6823
  * Filter by organization type.
5639
6824
  */
5640
6825
  type?: OrganizationsControllerListV1Type;
6826
+ /**
6827
+ * Case-insensitive substring search over organization name and corporate identity number (orgnr) (accelerated by the pg_trgm GIN indexes)
6828
+ * @maxLength 200
6829
+ */
6830
+ search?: string;
5641
6831
  };
5642
6832
  export type OrganizationsControllerListV1Type = typeof OrganizationsControllerListV1Type[keyof typeof OrganizationsControllerListV1Type];
5643
6833
  export declare const OrganizationsControllerListV1Type: {
@@ -5738,6 +6928,10 @@ export type CheckoutControllerAvailableSlotsV1Params = {
5738
6928
  * Inclusive end of the slot-date range
5739
6929
  */
5740
6930
  to: string;
6931
+ /**
6932
+ * The recipient's service zone (from GET /available-services). The v1 checkout flow ALWAYS passes this: slots are then resolved most-specific-wins — an exact-zone slot overrides the pooled (zone-agnostic) slot for the same window (even if full), so callers get one deduped row per window. Omitting it is back-compat only: every slot for the service is listed unfiltered and both pooled + per-zone rows may appear.
6933
+ */
6934
+ serviceZoneId?: string;
5741
6935
  };
5742
6936
  export type TransportServicesControllerListV1Params = {
5743
6937
  /**
@@ -6024,9 +7218,22 @@ export type ProductsControllerListV1Params = {
6024
7218
  */
6025
7219
  folderId?: string;
6026
7220
  /**
6027
- * Filter by product_status value (e.g. IN_STORAGE)
7221
+ * Restrict to a single organization (tenant/warehouse staff; org users are already RLS-scoped to their own org)
6028
7222
  */
6029
- status?: string;
7223
+ organizationId?: string;
7224
+ /**
7225
+ * Filter by one or more product_status values (repeatable — ?status=IN_STORAGE&status=CREATED)
7226
+ */
7227
+ status?: string[];
7228
+ /**
7229
+ * Only top-level products (folder_id IS NULL) — the storage-root view
7230
+ */
7231
+ rootOnly?: boolean;
7232
+ /**
7233
+ * Case-insensitive substring search over product name and external reference (accelerated by the pg_trgm GIN indexes)
7234
+ * @maxLength 200
7235
+ */
7236
+ search?: string;
6030
7237
  };
6031
7238
  export type ItemsControllerListV1Params = {
6032
7239
  /**
@@ -6065,6 +7272,14 @@ export type PodsControllerListV1Params = {
6065
7272
  * Filter by pod_status value
6066
7273
  */
6067
7274
  status?: string;
7275
+ /**
7276
+ * Filter to pods allocated to a single sales order
7277
+ */
7278
+ salesOrderId?: string;
7279
+ /**
7280
+ * Filter to pods in a single container
7281
+ */
7282
+ containerId?: string;
6068
7283
  };
6069
7284
  export type PodsControllerGetPickStateV1Params = {
6070
7285
  /**
@@ -6088,6 +7303,14 @@ export type PositionsControllerListV1Params = {
6088
7303
  * Filter to positions in a single warehouse
6089
7304
  */
6090
7305
  warehouseId?: string;
7306
+ /**
7307
+ * Filter to a single section (exact match).
7308
+ */
7309
+ section?: string;
7310
+ /**
7311
+ * Filter by position_type taxonomy value (e.g. RACK).
7312
+ */
7313
+ type?: string;
6091
7314
  };
6092
7315
  export type ContainersControllerListV1Params = {
6093
7316
  /**
@@ -6109,6 +7332,11 @@ export type ContainersControllerListV1Params = {
6109
7332
  * Filter to containers in a single warehouse
6110
7333
  */
6111
7334
  warehouseId?: string;
7335
+ /**
7336
+ * Exact per-tenant label-number lookup.
7337
+ * @minimum 1
7338
+ */
7339
+ labelNumber?: number;
6112
7340
  };
6113
7341
  export type WarehouseOrdersControllerListV1Params = {
6114
7342
  /**
@@ -6127,6 +7355,22 @@ export type WarehouseOrdersControllerListV1Params = {
6127
7355
  */
6128
7356
  status?: string;
6129
7357
  type?: WarehouseOrdersControllerListV1Type;
7358
+ /**
7359
+ * Filter to orders at a single warehouse.
7360
+ */
7361
+ warehouseId?: string;
7362
+ /**
7363
+ * Filter to a single organization.
7364
+ */
7365
+ organizationId?: string;
7366
+ /**
7367
+ * Planned-arrival range lower bound, inclusive (ISO date YYYY-MM-DD).
7368
+ */
7369
+ arrivalFrom?: string;
7370
+ /**
7371
+ * Planned-arrival range upper bound, inclusive (ISO date YYYY-MM-DD).
7372
+ */
7373
+ arrivalTo?: string;
6130
7374
  };
6131
7375
  export type WarehouseOrdersControllerListV1Type = typeof WarehouseOrdersControllerListV1Type[keyof typeof WarehouseOrdersControllerListV1Type];
6132
7376
  export declare const WarehouseOrdersControllerListV1Type: {
@@ -6157,6 +7401,20 @@ export type FoldersControllerListV1Params = {
6157
7401
  */
6158
7402
  parentFolderId?: string;
6159
7403
  };
7404
+ export type ForkliftControllerGetQueueV1Params = {
7405
+ /**
7406
+ * Warehouse whose work queue to compute.
7407
+ */
7408
+ warehouseId: string;
7409
+ /**
7410
+ * Restrict the queue to one section.
7411
+ */
7412
+ section?: string;
7413
+ };
7414
+ export type ForkliftControllerGetNeighborPositionsV1Params = {
7415
+ containerId: string;
7416
+ positionId: string;
7417
+ };
6160
7418
  export type WarehousesControllerListV1Params = {
6161
7419
  /**
6162
7420
  * Max rows to return (1–100).
@@ -6170,6 +7428,37 @@ export type WarehousesControllerListV1Params = {
6170
7428
  */
6171
7429
  offset?: number;
6172
7430
  };
7431
+ export type LookupsControllerListV1Params = {
7432
+ /**
7433
+ * Which vocabulary to return.
7434
+ */
7435
+ kind: LookupsControllerListV1Kind;
7436
+ };
7437
+ export type LookupsControllerListV1Kind = typeof LookupsControllerListV1Kind[keyof typeof LookupsControllerListV1Kind];
7438
+ export declare const LookupsControllerListV1Kind: {
7439
+ readonly 'position-type': "position-type";
7440
+ readonly 'position-grade': "position-grade";
7441
+ readonly 'container-type': "container-type";
7442
+ readonly 'damage-report-reason': "damage-report-reason";
7443
+ readonly 'damage-report-location': "damage-report-location";
7444
+ readonly 'pod-status': "pod-status";
7445
+ readonly 'cart-status': "cart-status";
7446
+ readonly 'sales-order-status': "sales-order-status";
7447
+ readonly 'product-status': "product-status";
7448
+ readonly 'warehouse-order-status': "warehouse-order-status";
7449
+ readonly 'route-status': "route-status";
7450
+ readonly 'route-stop-status': "route-stop-status";
7451
+ readonly 'transport-leg-status': "transport-leg-status";
7452
+ readonly 'order-relationship-type': "order-relationship-type";
7453
+ readonly 'sales-order-type': "sales-order-type";
7454
+ readonly 'warehouse-order-type': "warehouse-order-type";
7455
+ readonly 'carrier-kind': "carrier-kind";
7456
+ readonly 'fulfilment-mode': "fulfilment-mode";
7457
+ readonly 'shipment-unit-type': "shipment-unit-type";
7458
+ readonly 'transport-leg-type': "transport-leg-type";
7459
+ readonly 'transport-slot-kind': "transport-slot-kind";
7460
+ readonly 'organization-type': "organization-type";
7461
+ };
6173
7462
  export type IntegrationsControllerGetByIdV1200 = StripeAccountDto | FortnoxAccountDto;
6174
7463
  export type BillingAccountsControllerListAccountsV1Params = {
6175
7464
  /**