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

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 (114) hide show
  1. package/dist/generated/_all.d.ts +5 -0
  2. package/dist/generated/_all.d.ts.map +1 -1
  3. package/dist/generated/_all.js +5 -0
  4. package/dist/generated/_all.js.map +1 -1
  5. package/dist/generated/_permissions.d.ts +133 -2
  6. package/dist/generated/_permissions.d.ts.map +1 -1
  7. package/dist/generated/_permissions.js +34 -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/employee-assignments/employee-assignments.d.ts +127 -0
  35. package/dist/generated/employee-assignments/employee-assignments.d.ts.map +1 -0
  36. package/dist/generated/employee-assignments/employee-assignments.js +61 -0
  37. package/dist/generated/employee-assignments/employee-assignments.js.map +1 -0
  38. package/dist/generated/folders/folders.d.ts +10 -10
  39. package/dist/generated/folders/folders.d.ts.map +1 -1
  40. package/dist/generated/folders/folders.js +4 -4
  41. package/dist/generated/folders/folders.js.map +1 -1
  42. package/dist/generated/forklift/forklift.d.ts +212 -0
  43. package/dist/generated/forklift/forklift.d.ts.map +1 -0
  44. package/dist/generated/forklift/forklift.js +89 -0
  45. package/dist/generated/forklift/forklift.js.map +1 -0
  46. package/dist/generated/index.schemas.d.ts +1672 -67
  47. package/dist/generated/index.schemas.d.ts.map +1 -1
  48. package/dist/generated/index.schemas.js +206 -0
  49. package/dist/generated/index.schemas.js.map +1 -1
  50. package/dist/generated/invoices/invoices.d.ts +2 -2
  51. package/dist/generated/invoices/invoices.d.ts.map +1 -1
  52. package/dist/generated/invoices/invoices.js.map +1 -1
  53. package/dist/generated/items/items.d.ts +2 -2
  54. package/dist/generated/items/items.d.ts.map +1 -1
  55. package/dist/generated/items/items.js.map +1 -1
  56. package/dist/generated/lookups/lookups.d.ts +23 -0
  57. package/dist/generated/lookups/lookups.d.ts.map +1 -0
  58. package/dist/generated/lookups/lookups.js +19 -0
  59. package/dist/generated/lookups/lookups.js.map +1 -0
  60. package/dist/generated/me/me.d.ts +30 -1
  61. package/dist/generated/me/me.d.ts.map +1 -1
  62. package/dist/generated/me/me.js +11 -0
  63. package/dist/generated/me/me.js.map +1 -1
  64. package/dist/generated/orders/orders.d.ts +114 -2
  65. package/dist/generated/orders/orders.d.ts.map +1 -1
  66. package/dist/generated/orders/orders.js +101 -0
  67. package/dist/generated/orders/orders.js.map +1 -1
  68. package/dist/generated/org-contacts/org-contacts.d.ts +2 -2
  69. package/dist/generated/org-contacts/org-contacts.d.ts.map +1 -1
  70. package/dist/generated/org-contacts/org-contacts.js.map +1 -1
  71. package/dist/generated/organization-members/organization-members.d.ts +134 -0
  72. package/dist/generated/organization-members/organization-members.d.ts.map +1 -0
  73. package/dist/generated/organization-members/organization-members.js +51 -0
  74. package/dist/generated/organization-members/organization-members.js.map +1 -0
  75. package/dist/generated/organizations/organizations.d.ts +2 -2
  76. package/dist/generated/organizations/organizations.d.ts.map +1 -1
  77. package/dist/generated/organizations/organizations.js.map +1 -1
  78. package/dist/generated/pods/pods.d.ts +2 -2
  79. package/dist/generated/pods/pods.d.ts.map +1 -1
  80. package/dist/generated/pods/pods.js.map +1 -1
  81. package/dist/generated/positions/positions.d.ts +2 -2
  82. package/dist/generated/positions/positions.d.ts.map +1 -1
  83. package/dist/generated/positions/positions.js.map +1 -1
  84. package/dist/generated/products/products.d.ts +2 -2
  85. package/dist/generated/products/products.d.ts.map +1 -1
  86. package/dist/generated/products/products.js +7 -0
  87. package/dist/generated/products/products.js.map +1 -1
  88. package/dist/generated/routes/routes.d.ts +2 -2
  89. package/dist/generated/routes/routes.d.ts.map +1 -1
  90. package/dist/generated/routes/routes.js.map +1 -1
  91. package/dist/generated/service-zones/service-zones.d.ts +2 -2
  92. package/dist/generated/service-zones/service-zones.d.ts.map +1 -1
  93. package/dist/generated/service-zones/service-zones.js.map +1 -1
  94. package/dist/generated/slot-configs/slot-configs.d.ts +16 -2
  95. package/dist/generated/slot-configs/slot-configs.d.ts.map +1 -1
  96. package/dist/generated/slot-configs/slot-configs.js +12 -0
  97. package/dist/generated/slot-configs/slot-configs.js.map +1 -1
  98. package/dist/generated/transport-legs/transport-legs.d.ts +2 -2
  99. package/dist/generated/transport-legs/transport-legs.d.ts.map +1 -1
  100. package/dist/generated/transport-legs/transport-legs.js.map +1 -1
  101. package/dist/generated/transport-services/transport-services.d.ts +3 -3
  102. package/dist/generated/transport-services/transport-services.d.ts.map +1 -1
  103. package/dist/generated/transport-services/transport-services.js.map +1 -1
  104. package/dist/generated/users/users.d.ts +59 -0
  105. package/dist/generated/users/users.d.ts.map +1 -0
  106. package/dist/generated/users/users.js +24 -0
  107. package/dist/generated/users/users.js.map +1 -0
  108. package/dist/generated/warehouse-orders/warehouse-orders.d.ts +2 -2
  109. package/dist/generated/warehouse-orders/warehouse-orders.d.ts.map +1 -1
  110. package/dist/generated/warehouses/warehouses.d.ts +16 -2
  111. package/dist/generated/warehouses/warehouses.d.ts.map +1 -1
  112. package/dist/generated/warehouses/warehouses.js +10 -0
  113. package/dist/generated/warehouses/warehouses.js.map +1 -1
  114. 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";
@@ -446,6 +987,83 @@ export interface UpdateOrganizationDto {
446
987
  preferredWarehouseId?: string;
447
988
  metadata?: UpdateOrganizationDtoMetadata;
448
989
  }
990
+ export interface OrganizationMemberDto {
991
+ /** Keycloak subject of the member. Within one organization this identifies the membership — it is the `memberId` path segment on the member routes. */
992
+ sub: string;
993
+ organizationId: string;
994
+ /** Role the user holds in this organization. New memberships carry one of the organization roles; rows bootstrapped by `/v1/me` can carry any client role the token held. */
995
+ role: string;
996
+ /** When the membership was created (organization_member.created_at). */
997
+ joinedAt: string;
998
+ /**
999
+ * From the member's user_profile row — null until their first `/v1/me` call creates it (an invited user has no profile yet).
1000
+ * @nullable
1001
+ */
1002
+ displayName: string | null;
1003
+ /**
1004
+ * From the member's user_profile row — null until their first `/v1/me` call creates it.
1005
+ * @nullable
1006
+ */
1007
+ email: string | null;
1008
+ }
1009
+ export type AddMemberDtoRole = typeof AddMemberDtoRole[keyof typeof AddMemberDtoRole];
1010
+ export declare const AddMemberDtoRole: {
1011
+ readonly 'org-admin': "org-admin";
1012
+ readonly 'org-orders': "org-orders";
1013
+ readonly 'org-billing': "org-billing";
1014
+ readonly 'org-viewer': "org-viewer";
1015
+ readonly owner: "owner";
1016
+ readonly member: "member";
1017
+ };
1018
+ export interface AddMemberDto {
1019
+ /** Keycloak subject of an EXISTING user to bind to this organization. Mutually exclusive with `email`. */
1020
+ userSub?: string;
1021
+ /** Email address to invite. An existing realm user with this address is bound; otherwise a disabled-until-activated user is created and emailed an invite link. Mutually exclusive with `userSub`. */
1022
+ email?: string;
1023
+ role: AddMemberDtoRole;
1024
+ }
1025
+ /**
1026
+ * Outcome of the best-effort Keycloak push made after the database commit. `synced` — the Keycloak side was updated by this call. `failed` — the push was attempted and failed; the database change stands, and re-running the command re-attempts the push. `not_configured` — no push was attempted because no Keycloak sync client is provisioned for the tenant.
1027
+ */
1028
+ export type OrganizationMemberSyncResultDtoKeycloakSyncStatus = typeof OrganizationMemberSyncResultDtoKeycloakSyncStatus[keyof typeof OrganizationMemberSyncResultDtoKeycloakSyncStatus];
1029
+ export declare const OrganizationMemberSyncResultDtoKeycloakSyncStatus: {
1030
+ readonly synced: "synced";
1031
+ readonly failed: "failed";
1032
+ readonly not_configured: "not_configured";
1033
+ };
1034
+ export interface OrganizationMemberSyncResultDto {
1035
+ /** Keycloak subject of the member. Within one organization this identifies the membership — it is the `memberId` path segment on the member routes. */
1036
+ sub: string;
1037
+ organizationId: string;
1038
+ /** Role the user holds in this organization. New memberships carry one of the organization roles; rows bootstrapped by `/v1/me` can carry any client role the token held. */
1039
+ role: string;
1040
+ /** When the membership was created (organization_member.created_at). */
1041
+ joinedAt: string;
1042
+ /**
1043
+ * From the member's user_profile row — null until their first `/v1/me` call creates it (an invited user has no profile yet).
1044
+ * @nullable
1045
+ */
1046
+ displayName: string | null;
1047
+ /**
1048
+ * From the member's user_profile row — null until their first `/v1/me` call creates it.
1049
+ * @nullable
1050
+ */
1051
+ email: string | null;
1052
+ /** Outcome of the best-effort Keycloak push made after the database commit. `synced` — the Keycloak side was updated by this call. `failed` — the push was attempted and failed; the database change stands, and re-running the command re-attempts the push. `not_configured` — no push was attempted because no Keycloak sync client is provisioned for the tenant. */
1053
+ keycloakSyncStatus: OrganizationMemberSyncResultDtoKeycloakSyncStatus;
1054
+ }
1055
+ export type UpdateMemberDtoRole = typeof UpdateMemberDtoRole[keyof typeof UpdateMemberDtoRole];
1056
+ export declare const UpdateMemberDtoRole: {
1057
+ readonly 'org-admin': "org-admin";
1058
+ readonly 'org-orders': "org-orders";
1059
+ readonly 'org-billing': "org-billing";
1060
+ readonly 'org-viewer': "org-viewer";
1061
+ readonly owner: "owner";
1062
+ readonly member: "member";
1063
+ };
1064
+ export interface UpdateMemberDto {
1065
+ role?: UpdateMemberDtoRole;
1066
+ }
449
1067
  export type OrganizationSettingDtoServiceType = typeof OrganizationSettingDtoServiceType[keyof typeof OrganizationSettingDtoServiceType];
450
1068
  export declare const OrganizationSettingDtoServiceType: {
451
1069
  readonly STORAGE: "STORAGE";
@@ -605,6 +1223,16 @@ export interface CarrierProviderDto {
605
1223
  defaultTrackingUrlTemplate: string | null;
606
1224
  isActive: boolean;
607
1225
  }
1226
+ export interface PaginatedCarrierProvidersDto {
1227
+ /** The page of rows. */
1228
+ items: CarrierProviderDto[];
1229
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
1230
+ total: number;
1231
+ /** Effective max rows applied (after defaults/clamp). */
1232
+ limit: number;
1233
+ /** Effective rows skipped applied. */
1234
+ offset: number;
1235
+ }
608
1236
  export type TenantCarrierDtoKind = typeof TenantCarrierDtoKind[keyof typeof TenantCarrierDtoKind];
609
1237
  export declare const TenantCarrierDtoKind: {
610
1238
  readonly OWN_FLEET: "OWN_FLEET";
@@ -638,6 +1266,16 @@ export interface TenantCarrierDto {
638
1266
  createdAt: string;
639
1267
  updatedAt: string;
640
1268
  }
1269
+ export interface PaginatedCarriersDto {
1270
+ /** The page of rows. */
1271
+ items: TenantCarrierDto[];
1272
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
1273
+ total: number;
1274
+ /** Effective max rows applied (after defaults/clamp). */
1275
+ limit: number;
1276
+ /** Effective rows skipped applied. */
1277
+ offset: number;
1278
+ }
641
1279
  export type CreateTenantCarrierDtoKind = typeof CreateTenantCarrierDtoKind[keyof typeof CreateTenantCarrierDtoKind];
642
1280
  export declare const CreateTenantCarrierDtoKind: {
643
1281
  readonly OWN_FLEET: "OWN_FLEET";
@@ -718,6 +1356,16 @@ export interface CarrierMethodDto {
718
1356
  bookingSoftware: string | null;
719
1357
  isActive: boolean;
720
1358
  }
1359
+ export interface PaginatedCarrierMethodsDto {
1360
+ /** The page of rows. */
1361
+ items: CarrierMethodDto[];
1362
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
1363
+ total: number;
1364
+ /** Effective max rows applied (after defaults/clamp). */
1365
+ limit: number;
1366
+ /** Effective rows skipped applied. */
1367
+ offset: number;
1368
+ }
721
1369
  export type CreateCarrierMethodDtoSupportedRecipientTypesItem = typeof CreateCarrierMethodDtoSupportedRecipientTypesItem[keyof typeof CreateCarrierMethodDtoSupportedRecipientTypesItem];
722
1370
  export declare const CreateCarrierMethodDtoSupportedRecipientTypesItem: {
723
1371
  readonly business: "business";
@@ -747,6 +1395,18 @@ export interface CreateCarrierMethodDto {
747
1395
  bookingSoftware?: string;
748
1396
  isActive?: boolean;
749
1397
  }
1398
+ export interface DriverDto {
1399
+ /** Keycloak subject identifier of the driver */
1400
+ userSub: string;
1401
+ /**
1402
+ * Driver display name (non-PII)
1403
+ * @nullable
1404
+ */
1405
+ displayName: string | null;
1406
+ /** Assignment role (carrier-driver) */
1407
+ role: string;
1408
+ active: boolean;
1409
+ }
750
1410
  export type UpdateCarrierMethodDtoSupportedRecipientTypesItem = typeof UpdateCarrierMethodDtoSupportedRecipientTypesItem[keyof typeof UpdateCarrierMethodDtoSupportedRecipientTypesItem];
751
1411
  export declare const UpdateCarrierMethodDtoSupportedRecipientTypesItem: {
752
1412
  readonly business: "business";
@@ -778,9 +1438,32 @@ export interface UpdateCarrierMethodDto {
778
1438
  export interface MembershipDto {
779
1439
  organizationId: string;
780
1440
  role: string;
781
- /** Fine-grained permissions (resource:action) granted by this org role — drives component visibility when this org is active */
782
- capabilities: string[];
1441
+ /** Fine-grained permissions (resource:action) granted by this org role — drives component visibility when this org is active */
1442
+ capabilities: string[];
1443
+ }
1444
+ export interface AssignmentDto {
1445
+ /** Assignment kind: warehouse | carrier | tenant_wide */
1446
+ kind: string;
1447
+ /**
1448
+ * Warehouse (when kind=warehouse)
1449
+ * @nullable
1450
+ */
1451
+ warehouseId: string | null;
1452
+ /**
1453
+ * Tenant carrier (when kind=carrier)
1454
+ * @nullable
1455
+ */
1456
+ tenantCarrierId: string | null;
1457
+ role: string;
1458
+ active: boolean;
783
1459
  }
1460
+ /**
1461
+ * Opaque per-user preferences object (0079); null when unset.
1462
+ * @nullable
1463
+ */
1464
+ export type MeResponseDtoPreferences = {
1465
+ [key: string]: unknown;
1466
+ } | null;
784
1467
  export interface MeResponseDto {
785
1468
  /** Keycloak subject identifier */
786
1469
  sub: string;
@@ -798,12 +1481,54 @@ export interface MeResponseDto {
798
1481
  email: string | null;
799
1482
  /** @nullable */
800
1483
  displayName: string | null;
1484
+ /**
1485
+ * Self-editable contact number (0079).
1486
+ * @nullable
1487
+ */
1488
+ phone: string | null;
1489
+ /**
1490
+ * Opaque per-user preferences object (0079); null when unset.
1491
+ * @nullable
1492
+ */
1493
+ preferences: MeResponseDtoPreferences;
801
1494
  memberships: MembershipDto[];
802
1495
  /** 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
1496
  capabilities: string[];
1497
+ /** Warehouses the caller can act for (JWT warehouse_ids claim; [] if none) — matches what RLS scopes operational reads to. */
1498
+ warehouseIds: string[];
1499
+ /**
1500
+ * Carrier the caller can act for (JWT carrier_id claim; null if none).
1501
+ * @nullable
1502
+ */
1503
+ carrierId: string | null;
1504
+ /** Long-form staff assignments (own rows only) from employee_assignment — the authoritative warehouse/carrier reach behind the warehouseIds/carrierId summary. */
1505
+ assignments: AssignmentDto[];
804
1506
  }
1507
+ /**
1508
+ * Opaque per-user preferences object (JSON object, ≤ 16 KB serialized); null clears it.
1509
+ * @nullable
1510
+ */
1511
+ export type UpdateMeDtoPreferences = {
1512
+ [key: string]: unknown;
1513
+ } | null;
805
1514
  export interface UpdateMeDto {
806
- displayName?: string;
1515
+ /** @nullable */
1516
+ displayName?: string | null;
1517
+ /**
1518
+ * Self-editable contact number; null clears it.
1519
+ * @maxLength 50
1520
+ * @nullable
1521
+ */
1522
+ phone?: string | null;
1523
+ /**
1524
+ * Opaque per-user preferences object (JSON object, ≤ 16 KB serialized); null clears it.
1525
+ * @nullable
1526
+ */
1527
+ preferences?: UpdateMeDtoPreferences;
1528
+ }
1529
+ export interface UpdateIdentityNumberDto {
1530
+ /** Swedish personal identity number — YYMMDDNNNN, YYMMDD-NNNN, YYMMDD+NNNN, YYYYMMDDNNNN or YYYYMMDD-NNNN, with a valid Luhn check digit. Stored digits-only. Never returned by any endpoint. */
1531
+ personalIdentityNumber: string;
807
1532
  }
808
1533
  export interface AnonymousSessionDto {
809
1534
  /** Opaque bearer token for the anonymous session. Send it as the X-Session-Token header on guest-capable endpoints. Shown once — it is stored only as a hash. */
@@ -1420,7 +2145,8 @@ export interface TransportServiceDto {
1420
2145
  name: string;
1421
2146
  salesOrderType: TransportServiceDtoSalesOrderType;
1422
2147
  fulfilmentMode: TransportServiceDtoFulfilmentMode;
1423
- tenantCarrierId: string;
2148
+ /** @nullable */
2149
+ tenantCarrierId: string | null;
1424
2150
  /** @nullable */
1425
2151
  tenantCarrierMethodId: string | null;
1426
2152
  /** @nullable */
@@ -1460,6 +2186,16 @@ export interface TransportSlotDto {
1460
2186
  /** ACTIVE | CLOSED */
1461
2187
  status: string;
1462
2188
  }
2189
+ export interface PaginatedTransportServicesDto {
2190
+ /** The page of rows. */
2191
+ items: TransportServiceDto[];
2192
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
2193
+ total: number;
2194
+ /** Effective max rows applied (after defaults/clamp). */
2195
+ limit: number;
2196
+ /** Effective rows skipped applied. */
2197
+ offset: number;
2198
+ }
1463
2199
  export interface TransportServiceZoneDto {
1464
2200
  transportServiceZoneId: string;
1465
2201
  serviceZoneId: string;
@@ -1546,7 +2282,8 @@ export interface TransportServiceDetailDto {
1546
2282
  name: string;
1547
2283
  salesOrderType: TransportServiceDetailDtoSalesOrderType;
1548
2284
  fulfilmentMode: TransportServiceDetailDtoFulfilmentMode;
1549
- tenantCarrierId: string;
2285
+ /** @nullable */
2286
+ tenantCarrierId: string | null;
1550
2287
  /** @nullable */
1551
2288
  tenantCarrierMethodId: string | null;
1552
2289
  /** @nullable */
@@ -1635,7 +2372,11 @@ export interface CreateTransportServiceDto {
1635
2372
  name: string;
1636
2373
  salesOrderType: CreateTransportServiceDtoSalesOrderType;
1637
2374
  fulfilmentMode: CreateTransportServiceDtoFulfilmentMode;
1638
- tenantCarrierId: string;
2375
+ /**
2376
+ * Carrier-pinned service. Omit or null ⇒ carrier-agnostic (carrier chosen at dispatch).
2377
+ * @nullable
2378
+ */
2379
+ tenantCarrierId?: string | null;
1639
2380
  tenantCarrierMethodId?: string;
1640
2381
  /** NULL = any warehouse */
1641
2382
  originWarehouseId?: string;
@@ -1677,8 +2418,16 @@ export interface UpdateTransportServiceDto {
1677
2418
  name?: string;
1678
2419
  salesOrderType?: UpdateTransportServiceDtoSalesOrderType;
1679
2420
  fulfilmentMode?: UpdateTransportServiceDtoFulfilmentMode;
1680
- tenantCarrierId?: string;
1681
- tenantCarrierMethodId?: string;
2421
+ /**
2422
+ * Set null to make the service carrier-agnostic; a uuid to pin a carrier.
2423
+ * @nullable
2424
+ */
2425
+ tenantCarrierId?: string | null;
2426
+ /**
2427
+ * A method may only be pinned when a carrier is pinned; set null to clear it (auto-cleared when the carrier is cleared).
2428
+ * @nullable
2429
+ */
2430
+ tenantCarrierMethodId?: string | null;
1682
2431
  originWarehouseId?: string;
1683
2432
  billingArticleId?: string;
1684
2433
  customerTypes?: UpdateTransportServiceDtoCustomerTypesItem[];
@@ -1690,6 +2439,16 @@ export interface UpdateTransportServiceDto {
1690
2439
  zones?: TransportServiceZoneInputDto[];
1691
2440
  prices?: TransportServicePriceInputDto[];
1692
2441
  }
2442
+ export interface PaginatedTransportServicePricesDto {
2443
+ /** The page of rows. */
2444
+ items: TransportServicePriceDto[];
2445
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
2446
+ total: number;
2447
+ /** Effective max rows applied (after defaults/clamp). */
2448
+ limit: number;
2449
+ /** Effective rows skipped applied. */
2450
+ offset: number;
2451
+ }
1693
2452
  /**
1694
2453
  * GeoJSON Polygon/MultiPolygon, re-serialised from geography. NULL = zip-only zone.
1695
2454
  * @nullable
@@ -1724,6 +2483,16 @@ export interface ServiceZoneDto {
1724
2483
  createdAt: string;
1725
2484
  updatedAt: string;
1726
2485
  }
2486
+ export interface PaginatedServiceZonesDto {
2487
+ /** The page of rows. */
2488
+ items: ServiceZoneDto[];
2489
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
2490
+ total: number;
2491
+ /** Effective max rows applied (after defaults/clamp). */
2492
+ limit: number;
2493
+ /** Effective rows skipped applied. */
2494
+ offset: number;
2495
+ }
1727
2496
  export interface ServiceZonePostalCodeDto {
1728
2497
  serviceZonePostalCodeId: string;
1729
2498
  /** ISO-3166-1 alpha-2 country code */
@@ -1887,6 +2656,16 @@ export interface SlotConfigDto {
1887
2656
  createdAt: string;
1888
2657
  updatedAt: string;
1889
2658
  }
2659
+ export interface PaginatedSlotConfigsDto {
2660
+ /** The page of rows. */
2661
+ items: SlotConfigDto[];
2662
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
2663
+ total: number;
2664
+ /** Effective max rows applied (after defaults/clamp). */
2665
+ limit: number;
2666
+ /** Effective rows skipped applied. */
2667
+ offset: number;
2668
+ }
1890
2669
  /**
1891
2670
  * NULL = daily-cap-only (no concrete slots).
1892
2671
  */
@@ -1941,6 +2720,22 @@ export interface UpdateSlotConfigDto {
1941
2720
  generateHorizonDays?: number;
1942
2721
  status?: string;
1943
2722
  }
2723
+ export interface GenerateCapacityDto {
2724
+ /** Inclusive start (YYYY-MM-DD). Default: today (UTC). */
2725
+ fromDate?: string;
2726
+ /** Inclusive end (YYYY-MM-DD). Default: today + config.generateHorizonDays. */
2727
+ toDate?: string;
2728
+ /** Regenerate existing days. Never destroys a day that carries live reservations (it is reported under skipped[] instead). */
2729
+ force?: boolean;
2730
+ }
2731
+ export interface GenerateCapacityResultDto {
2732
+ created: number;
2733
+ updated: number;
2734
+ skippedReserved: number;
2735
+ skippedExisting: number;
2736
+ /** true when replayed from a prior Idempotency-Key. */
2737
+ idempotent: boolean;
2738
+ }
1944
2739
  /**
1945
2740
  * { amount, currencyCode }.
1946
2741
  * @nullable
@@ -1979,6 +2774,16 @@ export interface CapacityDayDto {
1979
2774
  createdAt: string;
1980
2775
  updatedAt: string;
1981
2776
  }
2777
+ export interface PaginatedCapacityDaysDto {
2778
+ /** The page of rows. */
2779
+ items: CapacityDayDto[];
2780
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
2781
+ total: number;
2782
+ /** Effective max rows applied (after defaults/clamp). */
2783
+ limit: number;
2784
+ /** Effective rows skipped applied. */
2785
+ offset: number;
2786
+ }
1982
2787
  export interface DayAvailabilityDto {
1983
2788
  /**
1984
2789
  * NULL = unlimited.
@@ -2250,6 +3055,16 @@ export interface CapacityOverrideDto {
2250
3055
  createdByUserSub: string | null;
2251
3056
  createdAt: string;
2252
3057
  }
3058
+ export interface PaginatedCapacityOverridesDto {
3059
+ /** The page of rows. */
3060
+ items: CapacityOverrideDto[];
3061
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
3062
+ total: number;
3063
+ /** Effective max rows applied (after defaults/clamp). */
3064
+ limit: number;
3065
+ /** Effective rows skipped applied. */
3066
+ offset: number;
3067
+ }
2253
3068
  export interface CreateCapacityOverrideDto {
2254
3069
  /** XOR transportCapacityDayId. */
2255
3070
  transportSlotId?: string;
@@ -2308,6 +3123,16 @@ export interface RouteDto {
2308
3123
  createdAt: string;
2309
3124
  updatedAt: string;
2310
3125
  }
3126
+ export interface PaginatedRoutesDto {
3127
+ /** The page of rows. */
3128
+ items: RouteDto[];
3129
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
3130
+ total: number;
3131
+ /** Effective max rows applied (after defaults/clamp). */
3132
+ limit: number;
3133
+ /** Effective rows skipped applied. */
3134
+ offset: number;
3135
+ }
2311
3136
  export interface RouteStopDto {
2312
3137
  routeStopId: string;
2313
3138
  routeId: string;
@@ -2678,6 +3503,16 @@ export interface TransportLegDto {
2678
3503
  carrierBooking?: TransportLegDtoCarrierBooking;
2679
3504
  shipmentUnits?: TransportLegShipmentUnitDto[];
2680
3505
  }
3506
+ export interface PaginatedTransportLegsDto {
3507
+ /** The page of rows. */
3508
+ items: TransportLegDto[];
3509
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
3510
+ total: number;
3511
+ /** Effective max rows applied (after defaults/clamp). */
3512
+ limit: number;
3513
+ /** Effective rows skipped applied. */
3514
+ offset: number;
3515
+ }
2681
3516
  export interface PlanLegDto {
2682
3517
  /**
2683
3518
  * Free-text reason / note.
@@ -2770,9 +3605,14 @@ export interface PatchDoorCodeDto {
2770
3605
  */
2771
3606
  doorCode: string | null;
2772
3607
  }
2773
- export interface CarrierBookingListDto {
3608
+ export interface PaginatedCarrierBookingsDto {
3609
+ /** The page of rows. */
2774
3610
  items: CarrierBookingDto[];
3611
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
3612
+ total: number;
3613
+ /** Effective max rows applied (after defaults/clamp). */
2775
3614
  limit: number;
3615
+ /** Effective rows skipped applied. */
2776
3616
  offset: number;
2777
3617
  }
2778
3618
  export interface ShipmentUnitOverrideDto {
@@ -2949,6 +3789,16 @@ export interface ProductDto {
2949
3789
  createdAt: string;
2950
3790
  updatedAt: string;
2951
3791
  }
3792
+ export interface PaginatedProductsDto {
3793
+ /** The page of rows. */
3794
+ items: ProductDto[];
3795
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
3796
+ total: number;
3797
+ /** Effective max rows applied (after defaults/clamp). */
3798
+ limit: number;
3799
+ /** Effective rows skipped applied. */
3800
+ offset: number;
3801
+ }
2952
3802
  export interface UpdateProductDto {
2953
3803
  /** Catalogued product name */
2954
3804
  name?: string;
@@ -3029,6 +3879,16 @@ export interface ItemDto {
3029
3879
  createdAt: string;
3030
3880
  updatedAt: string;
3031
3881
  }
3882
+ export interface PaginatedItemsDto {
3883
+ /** The page of rows. */
3884
+ items: ItemDto[];
3885
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
3886
+ total: number;
3887
+ /** Effective max rows applied (after defaults/clamp). */
3888
+ limit: number;
3889
+ /** Effective rows skipped applied. */
3890
+ offset: number;
3891
+ }
3032
3892
  export interface UpdateItemDto {
3033
3893
  condition?: string;
3034
3894
  /** Supplier/manufacturing batch id */
@@ -3068,6 +3928,16 @@ export interface PodDto {
3068
3928
  createdAt: string;
3069
3929
  updatedAt: string;
3070
3930
  }
3931
+ export interface PaginatedPodsDto {
3932
+ /** The page of rows. */
3933
+ items: PodDto[];
3934
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
3935
+ total: number;
3936
+ /** Effective max rows applied (after defaults/clamp). */
3937
+ limit: number;
3938
+ /** Effective rows skipped applied. */
3939
+ offset: number;
3940
+ }
3071
3941
  export interface PickStateDto {
3072
3942
  podId: string;
3073
3943
  /** Current on-hand projection */
@@ -3125,10 +3995,30 @@ export interface PositionDto {
3125
3995
  heightMm: number | null;
3126
3996
  /** @nullable */
3127
3997
  depthMm: number | null;
3998
+ /**
3999
+ * Ordering hint for pick sequencing
4000
+ * @nullable
4001
+ */
4002
+ rank: number | null;
4003
+ /**
4004
+ * Physical check/verification number
4005
+ * @nullable
4006
+ */
4007
+ checkNumber: number | null;
3128
4008
  /** True when an active position_blocked row exists */
3129
4009
  isBlocked: boolean;
3130
4010
  createdAt: string;
3131
4011
  }
4012
+ export interface PaginatedPositionsDto {
4013
+ /** The page of rows. */
4014
+ items: PositionDto[];
4015
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
4016
+ total: number;
4017
+ /** Effective max rows applied (after defaults/clamp). */
4018
+ limit: number;
4019
+ /** Effective rows skipped applied. */
4020
+ offset: number;
4021
+ }
3132
4022
  export interface PositionProductDto {
3133
4023
  productId: string;
3134
4024
  /** @nullable */
@@ -3198,6 +4088,16 @@ export interface ContainerDto {
3198
4088
  createdAt: string;
3199
4089
  updatedAt: string;
3200
4090
  }
4091
+ export interface PaginatedContainersDto {
4092
+ /** The page of rows. */
4093
+ items: ContainerDto[];
4094
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
4095
+ total: number;
4096
+ /** Effective max rows applied (after defaults/clamp). */
4097
+ limit: number;
4098
+ /** Effective rows skipped applied. */
4099
+ offset: number;
4100
+ }
3201
4101
  export interface CreateContainerDto {
3202
4102
  warehouseId: string;
3203
4103
  /** container_type lookup value (e.g. EPAL) */
@@ -3271,6 +4171,11 @@ export interface WarehouseOrderSummaryDto {
3271
4171
  status: string;
3272
4172
  /** @nullable */
3273
4173
  externalReference: string | null;
4174
+ /**
4175
+ * Human-readable order name
4176
+ * @nullable
4177
+ */
4178
+ name: string | null;
3274
4179
  /** @nullable */
3275
4180
  plannedArrivalDate: string | null;
3276
4181
  /** @nullable */
@@ -3280,14 +4185,45 @@ export interface WarehouseOrderSummaryDto {
3280
4185
  createdAt: string;
3281
4186
  updatedAt: string;
3282
4187
  }
4188
+ export interface PaginatedWarehouseOrdersDto {
4189
+ /** The page of rows. */
4190
+ items: WarehouseOrderSummaryDto[];
4191
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
4192
+ total: number;
4193
+ /** Effective max rows applied (after defaults/clamp). */
4194
+ limit: number;
4195
+ /** Effective rows skipped applied. */
4196
+ offset: number;
4197
+ }
3283
4198
  export interface WarehouseOrderProductDto {
3284
4199
  woProductId: string;
3285
4200
  productId: string;
4201
+ /**
4202
+ * Per-line ship-to address (public.address). Set on RECEIVE_AND_DISTRIBUTE lines that fan out to a destination; null on plain inbound lines.
4203
+ * @nullable
4204
+ */
4205
+ destinationAddressId: string | null;
3286
4206
  /** Expected quantity. */
3287
4207
  requestedQuantity: number;
3288
4208
  /** Received quantity (derived from RECEIVE movements). */
3289
4209
  quantity: number;
4210
+ /** The line's warehouse_order_product_status value. */
3290
4211
  status: string;
4212
+ /**
4213
+ * 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).
4214
+ * @nullable
4215
+ */
4216
+ productName: string | null;
4217
+ /**
4218
+ * Referenced product's primary image storage key (same visibility caveat as productName).
4219
+ * @nullable
4220
+ */
4221
+ productImageStorageKey: string | null;
4222
+ /**
4223
+ * Referenced product's product_status value (same visibility caveat as productName).
4224
+ * @nullable
4225
+ */
4226
+ productStatus: string | null;
3291
4227
  }
3292
4228
  export interface WarehouseOrderContainerDto {
3293
4229
  woContainerId: string;
@@ -3331,6 +4267,11 @@ export interface WarehouseOrderDetailDto {
3331
4267
  status: string;
3332
4268
  /** @nullable */
3333
4269
  externalReference: string | null;
4270
+ /**
4271
+ * Human-readable order name
4272
+ * @nullable
4273
+ */
4274
+ name: string | null;
3334
4275
  /** @nullable */
3335
4276
  plannedArrivalDate: string | null;
3336
4277
  /** @nullable */
@@ -3414,6 +4355,11 @@ export interface WarehouseOrderCommandResultDto {
3414
4355
  status: string;
3415
4356
  /** @nullable */
3416
4357
  externalReference: string | null;
4358
+ /**
4359
+ * Human-readable order name
4360
+ * @nullable
4361
+ */
4362
+ name: string | null;
3417
4363
  /** @nullable */
3418
4364
  plannedArrivalDate: string | null;
3419
4365
  /** @nullable */
@@ -3491,6 +4437,16 @@ export interface FolderDto {
3491
4437
  name: string;
3492
4438
  createdAt: string;
3493
4439
  }
4440
+ export interface PaginatedFoldersDto {
4441
+ /** The page of rows. */
4442
+ items: FolderDto[];
4443
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
4444
+ total: number;
4445
+ /** Effective max rows applied (after defaults/clamp). */
4446
+ limit: number;
4447
+ /** Effective rows skipped applied. */
4448
+ offset: number;
4449
+ }
3494
4450
  export interface CreateFolderDto {
3495
4451
  /**
3496
4452
  * Folder display name.
@@ -3507,14 +4463,53 @@ export interface UpdateFolderDto {
3507
4463
  * New folder display name.
3508
4464
  * @maxLength 200
3509
4465
  */
3510
- name: string;
3511
- }
3512
- export interface MoveFolderDto {
4466
+ name?: string;
3513
4467
  /**
3514
- * New parent folder (same org); null moves the folder to the root.
4468
+ * Re-parent the folder (same org, cycle-checked). Explicit null moves it to the root; omit to leave the parent unchanged.
3515
4469
  * @nullable
3516
4470
  */
3517
- parentFolderId: string | null;
4471
+ parentFolderId?: string | null;
4472
+ }
4473
+ export interface MoveIntoFolderDto {
4474
+ /** Products to move into this folder (product.folder_id ← :id). */
4475
+ productIds?: string[];
4476
+ /** Sub-folders to nest under this folder (folder.parent_folder_id ← :id). */
4477
+ folderIds?: string[];
4478
+ /**
4479
+ * Removed. Single-folder re-parent is now PATCH /v1/folders/:id { parentFolderId }. Sending this returns 400.
4480
+ * @deprecated
4481
+ */
4482
+ parentFolderId?: string;
4483
+ }
4484
+ /**
4485
+ * Why this id was not moved.
4486
+ */
4487
+ export type FolderMoveSkippedDtoReason = typeof FolderMoveSkippedDtoReason[keyof typeof FolderMoveSkippedDtoReason];
4488
+ export declare const FolderMoveSkippedDtoReason: {
4489
+ readonly not_found: "not_found";
4490
+ readonly wrong_organization: "wrong_organization";
4491
+ readonly would_form_cycle: "would_form_cycle";
4492
+ };
4493
+ export interface FolderMoveSkippedDto {
4494
+ id: string;
4495
+ /** Why this id was not moved. */
4496
+ reason: FolderMoveSkippedDtoReason;
4497
+ }
4498
+ export interface MoveIntoFolderResultDto {
4499
+ /** The target folder. */
4500
+ folderId: string;
4501
+ /** Products actually moved. */
4502
+ movedProducts: string[];
4503
+ /** Sub-folders actually nested. */
4504
+ movedFolders: string[];
4505
+ /** Ids skipped, with the reason. */
4506
+ skipped: FolderMoveSkippedDto[];
4507
+ /** Total products + folders moved. */
4508
+ movedCount: number;
4509
+ /** Total ids skipped. */
4510
+ skippedCount: number;
4511
+ /** True when this response replays a previous run of the key. */
4512
+ idempotent: boolean;
3518
4513
  }
3519
4514
  export interface ReceiveCoreCommandDto {
3520
4515
  /** The inbound line being handled. */
@@ -3969,68 +4964,286 @@ export interface UnidentifyCommandDto {
3969
4964
  /** The pod created by identify. */
3970
4965
  podId: string;
3971
4966
  /**
3972
- * Recorded as void_reason on the identify-born path.
3973
- * @maxLength 500
4967
+ * Recorded as void_reason on the identify-born path.
4968
+ * @maxLength 500
4969
+ */
4970
+ reason?: string;
4971
+ }
4972
+ export interface UnidentifiedSalesOrderProductDto {
4973
+ salesOrderProductId: string;
4974
+ /** The line's status (pre-void status on the voided path). */
4975
+ status: string;
4976
+ /** True when the identify-born line was voided (cart-born lines reset instead). */
4977
+ voided: boolean;
4978
+ }
4979
+ export interface UnidentifyResultDto {
4980
+ /** The reversing ADJUST ledger movement. */
4981
+ movementId: string;
4982
+ /** The soft-deleted pod. */
4983
+ podId: string;
4984
+ salesOrderProduct: UnidentifiedSalesOrderProductDto;
4985
+ /** True when this response replays a previous run of the key. */
4986
+ idempotent: boolean;
4987
+ }
4988
+ export interface CreateDamageReportDto {
4989
+ /** The item the condition lives on (G1). */
4990
+ itemId: string;
4991
+ salesOrderId?: string;
4992
+ /** @maxLength 255 */
4993
+ title: string;
4994
+ description: string;
4995
+ /** Condition value → damage_report.condition + item.condition. */
4996
+ condition: string;
4997
+ /** damage_report_reason.value (resolved via UNIQUE (tenant_id, value)). */
4998
+ reason?: string;
4999
+ /** damage_report_location.value (resolved via UNIQUE (tenant_id, value)). */
5000
+ location?: string;
5001
+ /** Storage keys for the report photos (never base64). */
5002
+ imageStorageKeys: string[];
5003
+ }
5004
+ export interface DamageReportImageDto {
5005
+ damageReportImageId: string;
5006
+ uploaded: boolean;
5007
+ }
5008
+ export interface DamageReportDto {
5009
+ damageReportId: string;
5010
+ itemId: string;
5011
+ /** @nullable */
5012
+ salesOrderId: string | null;
5013
+ title: string;
5014
+ /** @nullable */
5015
+ condition: string | null;
5016
+ /**
5017
+ * Lookup value, translated from the FK.
5018
+ * @nullable
5019
+ */
5020
+ reason: string | null;
5021
+ /**
5022
+ * Lookup value, translated from the FK.
5023
+ * @nullable
5024
+ */
5025
+ location: string | null;
5026
+ images: DamageReportImageDto[];
5027
+ active: boolean;
5028
+ createdAt: string;
5029
+ }
5030
+ export interface ForkliftPositionRefDto {
5031
+ positionId: string;
5032
+ /** @nullable */
5033
+ section: string | null;
5034
+ /** @nullable */
5035
+ positionNumber: number | null;
5036
+ /** @nullable */
5037
+ level: number | null;
5038
+ /** @nullable */
5039
+ checkNumber: number | null;
5040
+ }
5041
+ /**
5042
+ * @nullable
5043
+ */
5044
+ export type ForkliftQueueItemDtoPosition = ForkliftPositionRefDto | null;
5045
+ export interface ForkliftQueueItemDto {
5046
+ containerId: string;
5047
+ /** container.label_number */
5048
+ containerLabelId: number;
5049
+ /** container_type.value */
5050
+ containerType: string;
5051
+ /** @nullable */
5052
+ position: ForkliftQueueItemDtoPosition;
5053
+ /** Live pods currently in the container. */
5054
+ podCount: number;
5055
+ unhandledSopCount?: number;
5056
+ /** Set for the `transfer` queue. */
5057
+ warehouseOrderContainerId?: string;
5058
+ /** @nullable */
5059
+ dueAt?: string | null;
5060
+ }
5061
+ export type ForkliftQueueDtoMode = typeof ForkliftQueueDtoMode[keyof typeof ForkliftQueueDtoMode];
5062
+ export declare const ForkliftQueueDtoMode: {
5063
+ readonly place: "place";
5064
+ readonly pack: "pack";
5065
+ readonly empty: "empty";
5066
+ readonly transfer: "transfer";
5067
+ readonly downlift: "downlift";
5068
+ readonly replace: "replace";
5069
+ };
5070
+ export interface ForkliftQueueDto {
5071
+ mode: ForkliftQueueDtoMode;
5072
+ warehouseId: string;
5073
+ items: ForkliftQueueItemDto[];
5074
+ }
5075
+ export type ResolvePlacementDtoMode = typeof ResolvePlacementDtoMode[keyof typeof ResolvePlacementDtoMode];
5076
+ export declare const ResolvePlacementDtoMode: {
5077
+ readonly place: "place";
5078
+ readonly downlift: "downlift";
5079
+ readonly replace: "replace";
5080
+ };
5081
+ export interface ResolvePlacementDto {
5082
+ /** One of containerId / containerLabelId. */
5083
+ containerId?: string;
5084
+ /** Container label number (alternative to containerId). */
5085
+ containerLabelId?: string;
5086
+ mode: ResolvePlacementDtoMode;
5087
+ warehouseId: string;
5088
+ /** Prefer slots in this section. */
5089
+ section?: string;
5090
+ /** Position ids to EXCLUDE from the candidate set — the client re-asks after rejecting a slot. */
5091
+ skipPositionIds?: string[];
5092
+ }
5093
+ export interface ResolvePlacementContainerDto {
5094
+ containerId: string;
5095
+ containerLabelId: number;
5096
+ containerType: string;
5097
+ }
5098
+ export interface RecommendedPositionDto {
5099
+ positionId: string;
5100
+ /** @nullable */
5101
+ section: string | null;
5102
+ /** @nullable */
5103
+ positionNumber: number | null;
5104
+ /** @nullable */
5105
+ level: number | null;
5106
+ /**
5107
+ * position_grade.value
5108
+ * @nullable
5109
+ */
5110
+ grade: string | null;
5111
+ /** @nullable */
5112
+ checkNumber: number | null;
5113
+ }
5114
+ /**
5115
+ * null for SEAPAL (manual placement).
5116
+ * @nullable
5117
+ */
5118
+ export type ResolvePlacementResultDtoRecommendedPosition = RecommendedPositionDto | null;
5119
+ export interface ResolvePlacementResultDto {
5120
+ container: ResolvePlacementContainerDto;
5121
+ /**
5122
+ * null for SEAPAL (manual placement).
5123
+ * @nullable
3974
5124
  */
3975
- reason?: string;
5125
+ recommendedPosition: ResolvePlacementResultDtoRecommendedPosition;
5126
+ isStaticProduct: boolean;
5127
+ isSeapal: boolean;
5128
+ requiresManualPlacement: boolean;
3976
5129
  }
3977
- export interface UnidentifiedSalesOrderProductDto {
3978
- salesOrderProductId: string;
3979
- /** The line's status (pre-void status on the voided path). */
3980
- status: string;
3981
- /** True when the identify-born line was voided (cart-born lines reset instead). */
3982
- voided: boolean;
5130
+ export interface NeighborPositionDto {
5131
+ positionId: string;
5132
+ section: string;
5133
+ positionNumber: number;
5134
+ level: number;
5135
+ occupied: boolean;
5136
+ /** Signed offset from the origin slot (±2 / ±4). */
5137
+ offset: number;
3983
5138
  }
3984
- export interface UnidentifyResultDto {
3985
- /** The reversing ADJUST ledger movement. */
3986
- movementId: string;
3987
- /** The soft-deleted pod. */
3988
- podId: string;
3989
- salesOrderProduct: UnidentifiedSalesOrderProductDto;
5139
+ export interface NeighborPositionsDto {
5140
+ neighbors: NeighborPositionDto[];
5141
+ /** The origin slot is narrower than the container. */
5142
+ forceBlock: boolean;
5143
+ }
5144
+ export interface ForkliftPlaceDto {
5145
+ /** One of containerId / containerLabelId. */
5146
+ containerId?: string;
5147
+ /** Container label number (alternative to containerId). */
5148
+ containerLabelId?: string;
5149
+ /** Destination position. */
5150
+ positionId: string;
5151
+ }
5152
+ export interface ForkliftPlaceResultDto {
5153
+ containerId: string;
5154
+ /** container.label_number */
5155
+ containerLabelId: number;
5156
+ /** The position the container now stands on. */
5157
+ positionId: string;
5158
+ /** Live pods relocated (one MOVE movement each). */
5159
+ movedPods: number;
3990
5160
  /** True when this response replays a previous run of the key. */
3991
5161
  idempotent: boolean;
3992
5162
  }
3993
- export interface CreateDamageReportDto {
3994
- /** The item the condition lives on (G1). */
3995
- itemId: string;
3996
- salesOrderId?: string;
3997
- /** @maxLength 255 */
3998
- title: string;
3999
- description: string;
4000
- /** Condition value → damage_report.condition + item.condition. */
4001
- condition: string;
4002
- /** damage_report_reason.value (resolved via UNIQUE (tenant_id, value)). */
4003
- reason?: string;
4004
- /** damage_report_location.value (resolved via UNIQUE (tenant_id, value)). */
4005
- location?: string;
4006
- /** Storage keys for the report photos (never base64). */
4007
- imageStorageKeys: string[];
5163
+ export interface ForkliftEmptyDto {
5164
+ /** One of containerId / containerLabelId. */
5165
+ containerId?: string;
5166
+ /** Container label number (alternative to containerId). */
5167
+ containerLabelId?: string;
4008
5168
  }
4009
- export interface DamageReportImageDto {
4010
- damageReportImageId: string;
4011
- uploaded: boolean;
5169
+ export interface ForkliftEmptyResultDto {
5170
+ containerId: string;
5171
+ /** container.label_number */
5172
+ containerLabelId: number;
5173
+ /** Always true — the container is off its position with dimensions reset. */
5174
+ cleared: boolean;
5175
+ /** True when this response replays a previous run of the key. */
5176
+ idempotent: boolean;
4012
5177
  }
4013
- export interface DamageReportDto {
4014
- damageReportId: string;
4015
- itemId: string;
4016
- /** @nullable */
4017
- salesOrderId: string | null;
4018
- title: string;
4019
- /** @nullable */
4020
- condition: string | null;
5178
+ export interface ForkliftPackDto {
5179
+ /** One of containerId / containerLabelId. */
5180
+ containerId?: string;
5181
+ /** Container label number (alternative to containerId). */
5182
+ containerLabelId?: string;
5183
+ /** Explicit PACK-type destination (else the warehouse's PACK position is resolved). */
5184
+ positionId?: string;
5185
+ /** Source-pallet verification: the container's current position check_number. */
5186
+ checkNumber?: number;
5187
+ }
5188
+ export interface ForkliftPackContainerDto {
5189
+ containerId: string;
5190
+ /** The PACK position the container now stands on. */
5191
+ positionId: string;
4021
5192
  /**
4022
- * Lookup value, translated from the FK.
5193
+ * Canonical width (NULL when unknown).
4023
5194
  * @nullable
4024
5195
  */
4025
- reason: string | null;
5196
+ widthMm: number | null;
4026
5197
  /**
4027
- * Lookup value, translated from the FK.
5198
+ * Canonical depth (NULL when unknown).
4028
5199
  * @nullable
4029
5200
  */
4030
- location: string | null;
4031
- images: DamageReportImageDto[];
4032
- active: boolean;
4033
- createdAt: string;
5201
+ depthMm: number | null;
5202
+ /** Reset to 0 on pack. */
5203
+ heightMm: number;
5204
+ }
5205
+ export interface ForkliftPackPositionDto {
5206
+ positionId: string;
5207
+ /** @nullable */
5208
+ section: string | null;
5209
+ /** @nullable */
5210
+ positionNumber: number | null;
5211
+ /** @nullable */
5212
+ level: number | null;
5213
+ }
5214
+ export interface ForkliftPackResultDto {
5215
+ container: ForkliftPackContainerDto;
5216
+ packPosition: ForkliftPackPositionDto;
5217
+ /** True when this response replays a previous run of the key. */
5218
+ idempotent: boolean;
5219
+ }
5220
+ export interface ForkliftTransferDto {
5221
+ /** One of containerId / containerLabelId. */
5222
+ containerId?: string;
5223
+ /** Container label number (alternative to containerId). */
5224
+ containerLabelId?: string;
5225
+ }
5226
+ /**
5227
+ * The WOC status after the transfer.
5228
+ */
5229
+ export type ForkliftTransferResultDtoStatus = typeof ForkliftTransferResultDtoStatus[keyof typeof ForkliftTransferResultDtoStatus];
5230
+ export declare const ForkliftTransferResultDtoStatus: {
5231
+ readonly HANDLED: "HANDLED";
5232
+ };
5233
+ export interface ForkliftTransferResultDto {
5234
+ containerId: string;
5235
+ /** container.label_number */
5236
+ containerLabelId: number;
5237
+ /** The warehouse_order_container flipped to HANDLED. */
5238
+ warehouseOrderContainerId: string;
5239
+ /** The destination position the container now stands on. */
5240
+ positionId: string;
5241
+ /** The WOC status after the transfer. */
5242
+ status: ForkliftTransferResultDtoStatus;
5243
+ /** Live pods relocated (one MOVE movement each). */
5244
+ movedPods: number;
5245
+ /** True when this response replays a previous run of the key. */
5246
+ idempotent: boolean;
4034
5247
  }
4035
5248
  /**
4036
5249
  * Opening-hours JSONB
@@ -4078,6 +5291,16 @@ export interface WarehouseDto {
4078
5291
  createdAt: string;
4079
5292
  updatedAt: string;
4080
5293
  }
5294
+ export interface PaginatedWarehousesDto {
5295
+ /** The page of rows. */
5296
+ items: WarehouseDto[];
5297
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
5298
+ total: number;
5299
+ /** Effective max rows applied (after defaults/clamp). */
5300
+ limit: number;
5301
+ /** Effective rows skipped applied. */
5302
+ offset: number;
5303
+ }
4081
5304
  /**
4082
5305
  * Weekday → { open, close } opening hours (JSONB)
4083
5306
  */
@@ -4175,6 +5398,25 @@ export interface CreatePositionDto {
4175
5398
  /** @nullable */
4176
5399
  internalComment?: string | null;
4177
5400
  }
5401
+ export interface StatusCountDto {
5402
+ /** The status value (FK into the matching status lookup) */
5403
+ status: string;
5404
+ /** How many rows in this warehouse carry the status */
5405
+ count: number;
5406
+ }
5407
+ export interface WarehouseStatsDto {
5408
+ warehouseId: string;
5409
+ /** Active positions (slots) in the warehouse */
5410
+ positionCount: number;
5411
+ /** Active containers in the warehouse */
5412
+ containerCount: number;
5413
+ /** Active products whose home warehouse is this one */
5414
+ productCount: number;
5415
+ /** Pods in a container at this warehouse, grouped by pod status */
5416
+ podsByStatus: StatusCountDto[];
5417
+ /** Warehouse orders on this warehouse, grouped by status */
5418
+ warehouseOrdersByStatus: StatusCountDto[];
5419
+ }
4178
5420
  export interface ValidateLocationDto {
4179
5421
  /** Latitude (WGS84) */
4180
5422
  latitude: number;
@@ -4186,6 +5428,24 @@ export interface ValidateLocationResultDto {
4186
5428
  inside: boolean;
4187
5429
  warehouseId: string;
4188
5430
  }
5431
+ export interface LookupItemDto {
5432
+ /** The stable code stored on rows (the FK/enum value). */
5433
+ value: string;
5434
+ /** 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. */
5435
+ label: string;
5436
+ }
5437
+ /**
5438
+ * The requested lookup kind (echoed back).
5439
+ */
5440
+ export type LookupsResponseDtoKind = {
5441
+ [key: string]: unknown;
5442
+ };
5443
+ export interface LookupsResponseDto {
5444
+ /** The requested lookup kind (echoed back). */
5445
+ kind: LookupsResponseDtoKind;
5446
+ /** The vocabulary, in display order. */
5447
+ items: LookupItemDto[];
5448
+ }
4189
5449
  export type CreateUploadUrlDtoKind = typeof CreateUploadUrlDtoKind[keyof typeof CreateUploadUrlDtoKind];
4190
5450
  export declare const CreateUploadUrlDtoKind: {
4191
5451
  readonly product_image: "product_image";
@@ -4482,6 +5742,16 @@ export interface InvoiceDto {
4482
5742
  /** @nullable */
4483
5743
  snapshotCorporateIdentityNumber: string | null;
4484
5744
  }
5745
+ export interface PaginatedInvoicesDto {
5746
+ /** The page of rows. */
5747
+ items: InvoiceDto[];
5748
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
5749
+ total: number;
5750
+ /** Effective max rows applied (after defaults/clamp). */
5751
+ limit: number;
5752
+ /** Effective rows skipped applied. */
5753
+ offset: number;
5754
+ }
4485
5755
  export interface InvoiceRowDto {
4486
5756
  invoiceRowId: string;
4487
5757
  /** @nullable */
@@ -5092,6 +6362,16 @@ export interface AccountCreditDto {
5092
6362
  createdAt: string;
5093
6363
  updatedAt: string;
5094
6364
  }
6365
+ export interface PaginatedAccountCreditsDto {
6366
+ /** The page of rows. */
6367
+ items: AccountCreditDto[];
6368
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
6369
+ total: number;
6370
+ /** Effective max rows applied (after defaults/clamp). */
6371
+ limit: number;
6372
+ /** Effective rows skipped applied. */
6373
+ offset: number;
6374
+ }
5095
6375
  export interface AccountCreditApplicationDto {
5096
6376
  accountCreditApplicationId: string;
5097
6377
  tenantId: string;
@@ -5355,6 +6635,16 @@ export interface CouponRedemptionDto {
5355
6635
  status: string;
5356
6636
  createdAt: string;
5357
6637
  }
6638
+ export interface PaginatedCouponRedemptionsDto {
6639
+ /** The page of rows. */
6640
+ items: CouponRedemptionDto[];
6641
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
6642
+ total: number;
6643
+ /** Effective max rows applied (after defaults/clamp). */
6644
+ limit: number;
6645
+ /** Effective rows skipped applied. */
6646
+ offset: number;
6647
+ }
5358
6648
  export interface UnitOfMeasureDto {
5359
6649
  unitOfMeasureId: string;
5360
6650
  /**
@@ -5541,6 +6831,177 @@ export interface BillableEventsWebhookAckDto {
5541
6831
  /** Events rejected before enqueue, with a reason (e.g. unknown event_type). */
5542
6832
  skipped: BillableEventsWebhookAckDtoSkippedItem[];
5543
6833
  }
6834
+ export interface DeactivateUserDto {
6835
+ /**
6836
+ * Optional free-text reason, recorded on the admin_action audit row.
6837
+ * @maxLength 2000
6838
+ */
6839
+ reason?: string;
6840
+ }
6841
+ /**
6842
+ * Outcome of the best-effort Keycloak push made after the database commit. `synced` — the Keycloak side was updated by this call. `failed` — the push was attempted and failed; the database change stands, and re-running the command re-attempts the push. `not_configured` — no push was attempted because no Keycloak sync client is provisioned for the tenant.
6843
+ */
6844
+ export type DeactivateUserResultDtoKeycloakSyncStatus = typeof DeactivateUserResultDtoKeycloakSyncStatus[keyof typeof DeactivateUserResultDtoKeycloakSyncStatus];
6845
+ export declare const DeactivateUserResultDtoKeycloakSyncStatus: {
6846
+ readonly synced: "synced";
6847
+ readonly failed: "failed";
6848
+ readonly not_configured: "not_configured";
6849
+ };
6850
+ export interface DeactivateUserResultDto {
6851
+ /** The deactivated user's Keycloak subject. */
6852
+ sub: string;
6853
+ /** When the account was tombstoned. */
6854
+ deactivatedAt: string;
6855
+ /** Outcome of the best-effort Keycloak push made after the database commit. `synced` — the Keycloak side was updated by this call. `failed` — the push was attempted and failed; the database change stands, and re-running the command re-attempts the push. `not_configured` — no push was attempted because no Keycloak sync client is provisioned for the tenant. */
6856
+ keycloakSyncStatus: DeactivateUserResultDtoKeycloakSyncStatus;
6857
+ /** True when this call replayed a prior deactivation (same Idempotency-Key, or an already-deactivated target) with no new mutation. */
6858
+ idempotent: boolean;
6859
+ }
6860
+ export interface ForgetUserDto {
6861
+ /**
6862
+ * Required free-text reason for the erasure, recorded on the admin_action audit row.
6863
+ * @maxLength 2000
6864
+ */
6865
+ reason: string;
6866
+ }
6867
+ /**
6868
+ * Outcome of the best-effort Keycloak push made after the database commit. `synced` — the Keycloak side was updated by this call. `failed` — the push was attempted and failed; the database change stands, and re-running the command re-attempts the push. `not_configured` — no push was attempted because no Keycloak sync client is provisioned for the tenant.
6869
+ */
6870
+ export type ForgetUserResultDtoKeycloakSyncStatus = typeof ForgetUserResultDtoKeycloakSyncStatus[keyof typeof ForgetUserResultDtoKeycloakSyncStatus];
6871
+ export declare const ForgetUserResultDtoKeycloakSyncStatus: {
6872
+ readonly synced: "synced";
6873
+ readonly failed: "failed";
6874
+ readonly not_configured: "not_configured";
6875
+ };
6876
+ export interface ForgetUserResultDto {
6877
+ /** The forgotten user's Keycloak subject. */
6878
+ sub: string;
6879
+ /** When the erasure scrub completed (user_profile.forgotten_at). */
6880
+ forgottenAt: string;
6881
+ /** Outcome of the best-effort Keycloak push made after the database commit. `synced` — the Keycloak side was updated by this call. `failed` — the push was attempted and failed; the database change stands, and re-running the command re-attempts the push. `not_configured` — no push was attempted because no Keycloak sync client is provisioned for the tenant. */
6882
+ keycloakSyncStatus: ForgetUserResultDtoKeycloakSyncStatus;
6883
+ /** True when this call replayed a prior forget (same Idempotency-Key, or an already-forgotten target) with no new mutation. */
6884
+ idempotent: boolean;
6885
+ }
6886
+ export type EmployeeAssignmentDtoKind = typeof EmployeeAssignmentDtoKind[keyof typeof EmployeeAssignmentDtoKind];
6887
+ export declare const EmployeeAssignmentDtoKind: {
6888
+ readonly warehouse: "warehouse";
6889
+ readonly carrier: "carrier";
6890
+ readonly tenant_wide: "tenant_wide";
6891
+ };
6892
+ export interface EmployeeAssignmentDto {
6893
+ employeeAssignmentId: string;
6894
+ /** Keycloak subject of the assigned staff member. */
6895
+ userSub: string;
6896
+ kind: EmployeeAssignmentDtoKind;
6897
+ /**
6898
+ * Set for `kind=warehouse`, null otherwise.
6899
+ * @nullable
6900
+ */
6901
+ warehouseId: string | null;
6902
+ /**
6903
+ * The `tenant_carrier` this assignment scopes to. Set for `kind=carrier`, null otherwise.
6904
+ * @nullable
6905
+ */
6906
+ tenantCarrierId: string | null;
6907
+ /** Staff role the assignment grants. Rows created here carry one of the assignment roles; rows imported or seeded elsewhere can carry any client role. */
6908
+ role: string;
6909
+ /** False once the assignment has been offboarded. Only active assignments contribute to the Keycloak claims. */
6910
+ active: boolean;
6911
+ /** @nullable */
6912
+ startedAt: string | null;
6913
+ /** @nullable */
6914
+ endedAt: string | null;
6915
+ }
6916
+ export type CreateEmployeeAssignmentDtoKind = typeof CreateEmployeeAssignmentDtoKind[keyof typeof CreateEmployeeAssignmentDtoKind];
6917
+ export declare const CreateEmployeeAssignmentDtoKind: {
6918
+ readonly warehouse: "warehouse";
6919
+ readonly carrier: "carrier";
6920
+ readonly tenant_wide: "tenant_wide";
6921
+ };
6922
+ export type CreateEmployeeAssignmentDtoRole = typeof CreateEmployeeAssignmentDtoRole[keyof typeof CreateEmployeeAssignmentDtoRole];
6923
+ export declare const CreateEmployeeAssignmentDtoRole: {
6924
+ readonly 'operations-manager': "operations-manager";
6925
+ readonly 'warehouse-admin': "warehouse-admin";
6926
+ readonly 'warehouse-operator': "warehouse-operator";
6927
+ readonly 'carrier-admin': "carrier-admin";
6928
+ readonly 'carrier-driver': "carrier-driver";
6929
+ };
6930
+ export interface CreateEmployeeAssignmentDto {
6931
+ /** Keycloak subject of the staff member to hire. They must already exist as a user (their `user_profile` row is created by their first `/v1/me` call). */
6932
+ userSub: string;
6933
+ kind: CreateEmployeeAssignmentDtoKind;
6934
+ role: CreateEmployeeAssignmentDtoRole;
6935
+ /** Required for `kind=warehouse`, rejected for any other kind. */
6936
+ warehouseId?: string;
6937
+ /** Required for `kind=carrier` (drivers are `kind=carrier`), rejected for any other kind. */
6938
+ tenantCarrierId?: string;
6939
+ /** First day of the assignment; defaults to today. */
6940
+ startedAt?: string;
6941
+ }
6942
+ export type EmployeeAssignmentSyncResultDtoKind = typeof EmployeeAssignmentSyncResultDtoKind[keyof typeof EmployeeAssignmentSyncResultDtoKind];
6943
+ export declare const EmployeeAssignmentSyncResultDtoKind: {
6944
+ readonly warehouse: "warehouse";
6945
+ readonly carrier: "carrier";
6946
+ readonly tenant_wide: "tenant_wide";
6947
+ };
6948
+ /**
6949
+ * Outcome of the best-effort Keycloak push made after the database commit. `synced` — the Keycloak side was updated by this call. `failed` — the push was attempted and failed; the database change stands, and re-running the command re-attempts the push. `not_configured` — no push was attempted because no Keycloak sync client is provisioned for the tenant.
6950
+ */
6951
+ export type EmployeeAssignmentSyncResultDtoKeycloakSyncStatus = typeof EmployeeAssignmentSyncResultDtoKeycloakSyncStatus[keyof typeof EmployeeAssignmentSyncResultDtoKeycloakSyncStatus];
6952
+ export declare const EmployeeAssignmentSyncResultDtoKeycloakSyncStatus: {
6953
+ readonly synced: "synced";
6954
+ readonly failed: "failed";
6955
+ readonly not_configured: "not_configured";
6956
+ };
6957
+ export interface EmployeeAssignmentSyncResultDto {
6958
+ employeeAssignmentId: string;
6959
+ /** Keycloak subject of the assigned staff member. */
6960
+ userSub: string;
6961
+ kind: EmployeeAssignmentSyncResultDtoKind;
6962
+ /**
6963
+ * Set for `kind=warehouse`, null otherwise.
6964
+ * @nullable
6965
+ */
6966
+ warehouseId: string | null;
6967
+ /**
6968
+ * The `tenant_carrier` this assignment scopes to. Set for `kind=carrier`, null otherwise.
6969
+ * @nullable
6970
+ */
6971
+ tenantCarrierId: string | null;
6972
+ /** Staff role the assignment grants. Rows created here carry one of the assignment roles; rows imported or seeded elsewhere can carry any client role. */
6973
+ role: string;
6974
+ /** False once the assignment has been offboarded. Only active assignments contribute to the Keycloak claims. */
6975
+ active: boolean;
6976
+ /** @nullable */
6977
+ startedAt: string | null;
6978
+ /** @nullable */
6979
+ endedAt: string | null;
6980
+ /** Outcome of the best-effort Keycloak push made after the database commit. `synced` — the Keycloak side was updated by this call. `failed` — the push was attempted and failed; the database change stands, and re-running the command re-attempts the push. `not_configured` — no push was attempted because no Keycloak sync client is provisioned for the tenant. */
6981
+ keycloakSyncStatus: EmployeeAssignmentSyncResultDtoKeycloakSyncStatus;
6982
+ }
6983
+ export type UpdateEmployeeAssignmentDtoRole = typeof UpdateEmployeeAssignmentDtoRole[keyof typeof UpdateEmployeeAssignmentDtoRole];
6984
+ export declare const UpdateEmployeeAssignmentDtoRole: {
6985
+ readonly 'operations-manager': "operations-manager";
6986
+ readonly 'warehouse-admin': "warehouse-admin";
6987
+ readonly 'warehouse-operator': "warehouse-operator";
6988
+ readonly 'carrier-admin': "carrier-admin";
6989
+ readonly 'carrier-driver': "carrier-driver";
6990
+ };
6991
+ export interface UpdateEmployeeAssignmentDto {
6992
+ role?: UpdateEmployeeAssignmentDtoRole;
6993
+ /** Move a `kind=warehouse` assignment to another warehouse. */
6994
+ warehouseId?: string;
6995
+ /** Move a `kind=carrier` assignment to another carrier. */
6996
+ tenantCarrierId?: string;
6997
+ startedAt?: string;
6998
+ }
6999
+ export interface OffboardEmployeeDto {
7000
+ /** Last day of the assignment; defaults to today. */
7001
+ endedAt?: string;
7002
+ /** Free-text reason, recorded in the service log for ops follow-up. `employee_assignment` has no column for it, so it is not stored on the row or echoed back. */
7003
+ reason?: string;
7004
+ }
5544
7005
  export type OrdersControllerListV1Params = {
5545
7006
  /**
5546
7007
  * Max rows to return (1–100).
@@ -5554,10 +7015,22 @@ export type OrdersControllerListV1Params = {
5554
7015
  */
5555
7016
  offset?: number;
5556
7017
  /**
5557
- * Filter by sales_order status (lookup value).
7018
+ * Filter by sales_order status. Repeatable — pass ?status=A&status=B for a set; a single value is accepted too.
5558
7019
  */
5559
- status?: string;
7020
+ status?: string[];
5560
7021
  type?: OrdersControllerListV1Type;
7022
+ /**
7023
+ * Narrow to one organization (within the caller's RLS scope).
7024
+ */
7025
+ organizationId?: string;
7026
+ /**
7027
+ * created_at lower bound, inclusive (ISO-8601).
7028
+ */
7029
+ fromDate?: string;
7030
+ /**
7031
+ * created_at upper bound, inclusive (ISO-8601).
7032
+ */
7033
+ toDate?: string;
5561
7034
  };
5562
7035
  export type OrdersControllerListV1Type = typeof OrdersControllerListV1Type[keyof typeof OrdersControllerListV1Type];
5563
7036
  export declare const OrdersControllerListV1Type: {
@@ -5638,6 +7111,11 @@ export type OrganizationsControllerListV1Params = {
5638
7111
  * Filter by organization type.
5639
7112
  */
5640
7113
  type?: OrganizationsControllerListV1Type;
7114
+ /**
7115
+ * Case-insensitive substring search over organization name and corporate identity number (orgnr) (accelerated by the pg_trgm GIN indexes)
7116
+ * @maxLength 200
7117
+ */
7118
+ search?: string;
5641
7119
  };
5642
7120
  export type OrganizationsControllerListV1Type = typeof OrganizationsControllerListV1Type[keyof typeof OrganizationsControllerListV1Type];
5643
7121
  export declare const OrganizationsControllerListV1Type: {
@@ -5738,6 +7216,10 @@ export type CheckoutControllerAvailableSlotsV1Params = {
5738
7216
  * Inclusive end of the slot-date range
5739
7217
  */
5740
7218
  to: string;
7219
+ /**
7220
+ * 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.
7221
+ */
7222
+ serviceZoneId?: string;
5741
7223
  };
5742
7224
  export type TransportServicesControllerListV1Params = {
5743
7225
  /**
@@ -6024,9 +7506,22 @@ export type ProductsControllerListV1Params = {
6024
7506
  */
6025
7507
  folderId?: string;
6026
7508
  /**
6027
- * Filter by product_status value (e.g. IN_STORAGE)
7509
+ * Restrict to a single organization (tenant/warehouse staff; org users are already RLS-scoped to their own org)
6028
7510
  */
6029
- status?: string;
7511
+ organizationId?: string;
7512
+ /**
7513
+ * Filter by one or more product_status values (repeatable — ?status=IN_STORAGE&status=CREATED)
7514
+ */
7515
+ status?: string[];
7516
+ /**
7517
+ * Only top-level products (folder_id IS NULL) — the storage-root view
7518
+ */
7519
+ rootOnly?: boolean;
7520
+ /**
7521
+ * Case-insensitive substring search over product name and external reference (accelerated by the pg_trgm GIN indexes)
7522
+ * @maxLength 200
7523
+ */
7524
+ search?: string;
6030
7525
  };
6031
7526
  export type ItemsControllerListV1Params = {
6032
7527
  /**
@@ -6065,6 +7560,14 @@ export type PodsControllerListV1Params = {
6065
7560
  * Filter by pod_status value
6066
7561
  */
6067
7562
  status?: string;
7563
+ /**
7564
+ * Filter to pods allocated to a single sales order
7565
+ */
7566
+ salesOrderId?: string;
7567
+ /**
7568
+ * Filter to pods in a single container
7569
+ */
7570
+ containerId?: string;
6068
7571
  };
6069
7572
  export type PodsControllerGetPickStateV1Params = {
6070
7573
  /**
@@ -6088,6 +7591,14 @@ export type PositionsControllerListV1Params = {
6088
7591
  * Filter to positions in a single warehouse
6089
7592
  */
6090
7593
  warehouseId?: string;
7594
+ /**
7595
+ * Filter to a single section (exact match).
7596
+ */
7597
+ section?: string;
7598
+ /**
7599
+ * Filter by position_type taxonomy value (e.g. RACK).
7600
+ */
7601
+ type?: string;
6091
7602
  };
6092
7603
  export type ContainersControllerListV1Params = {
6093
7604
  /**
@@ -6109,6 +7620,11 @@ export type ContainersControllerListV1Params = {
6109
7620
  * Filter to containers in a single warehouse
6110
7621
  */
6111
7622
  warehouseId?: string;
7623
+ /**
7624
+ * Exact per-tenant label-number lookup.
7625
+ * @minimum 1
7626
+ */
7627
+ labelNumber?: number;
6112
7628
  };
6113
7629
  export type WarehouseOrdersControllerListV1Params = {
6114
7630
  /**
@@ -6127,6 +7643,22 @@ export type WarehouseOrdersControllerListV1Params = {
6127
7643
  */
6128
7644
  status?: string;
6129
7645
  type?: WarehouseOrdersControllerListV1Type;
7646
+ /**
7647
+ * Filter to orders at a single warehouse.
7648
+ */
7649
+ warehouseId?: string;
7650
+ /**
7651
+ * Filter to a single organization.
7652
+ */
7653
+ organizationId?: string;
7654
+ /**
7655
+ * Planned-arrival range lower bound, inclusive (ISO date YYYY-MM-DD).
7656
+ */
7657
+ arrivalFrom?: string;
7658
+ /**
7659
+ * Planned-arrival range upper bound, inclusive (ISO date YYYY-MM-DD).
7660
+ */
7661
+ arrivalTo?: string;
6130
7662
  };
6131
7663
  export type WarehouseOrdersControllerListV1Type = typeof WarehouseOrdersControllerListV1Type[keyof typeof WarehouseOrdersControllerListV1Type];
6132
7664
  export declare const WarehouseOrdersControllerListV1Type: {
@@ -6157,6 +7689,20 @@ export type FoldersControllerListV1Params = {
6157
7689
  */
6158
7690
  parentFolderId?: string;
6159
7691
  };
7692
+ export type ForkliftControllerGetQueueV1Params = {
7693
+ /**
7694
+ * Warehouse whose work queue to compute.
7695
+ */
7696
+ warehouseId: string;
7697
+ /**
7698
+ * Restrict the queue to one section.
7699
+ */
7700
+ section?: string;
7701
+ };
7702
+ export type ForkliftControllerGetNeighborPositionsV1Params = {
7703
+ containerId: string;
7704
+ positionId: string;
7705
+ };
6160
7706
  export type WarehousesControllerListV1Params = {
6161
7707
  /**
6162
7708
  * Max rows to return (1–100).
@@ -6170,6 +7716,37 @@ export type WarehousesControllerListV1Params = {
6170
7716
  */
6171
7717
  offset?: number;
6172
7718
  };
7719
+ export type LookupsControllerListV1Params = {
7720
+ /**
7721
+ * Which vocabulary to return.
7722
+ */
7723
+ kind: LookupsControllerListV1Kind;
7724
+ };
7725
+ export type LookupsControllerListV1Kind = typeof LookupsControllerListV1Kind[keyof typeof LookupsControllerListV1Kind];
7726
+ export declare const LookupsControllerListV1Kind: {
7727
+ readonly 'position-type': "position-type";
7728
+ readonly 'position-grade': "position-grade";
7729
+ readonly 'container-type': "container-type";
7730
+ readonly 'damage-report-reason': "damage-report-reason";
7731
+ readonly 'damage-report-location': "damage-report-location";
7732
+ readonly 'pod-status': "pod-status";
7733
+ readonly 'cart-status': "cart-status";
7734
+ readonly 'sales-order-status': "sales-order-status";
7735
+ readonly 'product-status': "product-status";
7736
+ readonly 'warehouse-order-status': "warehouse-order-status";
7737
+ readonly 'route-status': "route-status";
7738
+ readonly 'route-stop-status': "route-stop-status";
7739
+ readonly 'transport-leg-status': "transport-leg-status";
7740
+ readonly 'order-relationship-type': "order-relationship-type";
7741
+ readonly 'sales-order-type': "sales-order-type";
7742
+ readonly 'warehouse-order-type': "warehouse-order-type";
7743
+ readonly 'carrier-kind': "carrier-kind";
7744
+ readonly 'fulfilment-mode': "fulfilment-mode";
7745
+ readonly 'shipment-unit-type': "shipment-unit-type";
7746
+ readonly 'transport-leg-type': "transport-leg-type";
7747
+ readonly 'transport-slot-kind': "transport-slot-kind";
7748
+ readonly 'organization-type': "organization-type";
7749
+ };
6173
7750
  export type IntegrationsControllerGetByIdV1200 = StripeAccountDto | FortnoxAccountDto;
6174
7751
  export type BillingAccountsControllerListAccountsV1Params = {
6175
7752
  /**
@@ -6376,4 +7953,32 @@ export type PricingRulesControllerListPricingRulesV1Params = {
6376
7953
  */
6377
7954
  offset?: number;
6378
7955
  };
7956
+ export type EmployeeAssignmentsControllerListV1Params = {
7957
+ /**
7958
+ * Filter by scope family.
7959
+ */
7960
+ kind?: EmployeeAssignmentsControllerListV1Kind;
7961
+ /**
7962
+ * Filter to one warehouse's staff.
7963
+ */
7964
+ warehouseId?: string;
7965
+ /**
7966
+ * Filter to one carrier's staff (matches `tenantCarrierId`).
7967
+ */
7968
+ carrierId?: string;
7969
+ /**
7970
+ * Filter by active state; omit for both.
7971
+ */
7972
+ active?: boolean;
7973
+ /**
7974
+ * Filter to one staff member's assignments.
7975
+ */
7976
+ userSub?: string;
7977
+ };
7978
+ export type EmployeeAssignmentsControllerListV1Kind = typeof EmployeeAssignmentsControllerListV1Kind[keyof typeof EmployeeAssignmentsControllerListV1Kind];
7979
+ export declare const EmployeeAssignmentsControllerListV1Kind: {
7980
+ readonly warehouse: "warehouse";
7981
+ readonly carrier: "carrier";
7982
+ readonly tenant_wide: "tenant_wide";
7983
+ };
6379
7984
  //# sourceMappingURL=index.schemas.d.ts.map