@vindentech/api-client 0.3.0-next.49 → 0.3.0-next.50

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 (28) hide show
  1. package/dist/generated/_permissions.d.ts +13 -1
  2. package/dist/generated/_permissions.d.ts.map +1 -1
  3. package/dist/generated/_permissions.js +3 -0
  4. package/dist/generated/_permissions.js.map +1 -1
  5. package/dist/generated/index.schemas.d.ts +317 -44
  6. package/dist/generated/index.schemas.d.ts.map +1 -1
  7. package/dist/generated/index.schemas.js +49 -4
  8. package/dist/generated/index.schemas.js.map +1 -1
  9. package/dist/generated/items/items.d.ts.map +1 -1
  10. package/dist/generated/items/items.js +7 -0
  11. package/dist/generated/items/items.js.map +1 -1
  12. package/dist/generated/organization-members/organization-members.d.ts +30 -1
  13. package/dist/generated/organization-members/organization-members.d.ts.map +1 -1
  14. package/dist/generated/organization-members/organization-members.js +11 -0
  15. package/dist/generated/organization-members/organization-members.js.map +1 -1
  16. package/dist/generated/organizations/organizations.d.ts +15 -1
  17. package/dist/generated/organizations/organizations.d.ts.map +1 -1
  18. package/dist/generated/organizations/organizations.js +24 -0
  19. package/dist/generated/organizations/organizations.js.map +1 -1
  20. package/dist/generated/products/products.js +1 -1
  21. package/dist/generated/products/products.js.map +1 -1
  22. package/dist/generated/routes/routes.d.ts +2 -2
  23. package/dist/generated/routes/routes.d.ts.map +1 -1
  24. package/dist/generated/warehouses/warehouses.d.ts +15 -1
  25. package/dist/generated/warehouses/warehouses.d.ts.map +1 -1
  26. package/dist/generated/warehouses/warehouses.js +21 -0
  27. package/dist/generated/warehouses/warehouses.js.map +1 -1
  28. package/package.json +1 -1
@@ -46,6 +46,11 @@ export interface OrderSummaryDto {
46
46
  orderGroupId: string;
47
47
  /** The customer this job belongs to (public.organization). */
48
48
  organizationId: string;
49
+ /**
50
+ * The customer's name (public.organization.name) — mirrors OrderDetailDto.organization.name via the same left join. Null only on the left-join-miss edge case; organization is Shape C and readable tenant-wide, so this is never withheld by scope (BE-1894).
51
+ * @nullable
52
+ */
53
+ organizationName: string | null;
49
54
  /**
50
55
  * Recipient name from the order's primary transport leg — the same snapshot `PATCH /v1/orders/:id` corrects. Null when the leg carries no name, or when the caller's leg scope does not reach it (a carrier reaches only its own booked legs; warehouse staff only legs on an assigned warehouse).
51
56
  * @nullable
@@ -53,8 +58,18 @@ export interface OrderSummaryDto {
53
58
  recipientName: string | null;
54
59
  /** Live product lines on the job (voided and deleted lines excluded). Scoped by the caller's own row visibility, so it matches what `GET /v1/orders/{id}` would show them. */
55
60
  productCount: number;
56
- /** Merchandise lines on the job (public.sales_order_merchandise) — always 0 except on a MERCHANDISE_SALE job, which carries merchandise instead of product lines. Distinct from `productCount`, which never counts these. Scoped by the caller's own row visibility like `productCount`: 0 can mean 'no merchandise' or 'withheld by scope' (no warehouse/carrier read branch exists yet on this table). */
61
+ /** Merchandise lines on the job (public.sales_order_merchandise) — always 0 except on a MERCHANDISE_SALE job, which carries merchandise instead of product lines. Distinct from `productCount`, which never counts these. Scoped by the caller's own row visibility like `productCount`: 0 can mean 'no merchandise' or 'withheld by scope'. */
57
62
  merchandiseCount: number;
63
+ /**
64
+ * The customer's booking-time estimate (public.sales_order_estimate.volume_cm3) — a rough volume figure useful for routing/capacity planning before `actualVolumeCm3` is measured at the warehouse. Distinct from the detail endpoint's nested `estimate.volumeCm3` (BE-1903): that one is never null (the column is NOT NULL once an estimate row exists) because its whole block collapses to `estimate: null` on a miss, while this flat field carries the nullability itself, the same shape as `estimatedItemCount` below. Null when the order carries no estimate, or when the caller's row visibility doesn't reach it: sales_order_estimate has no warehouse read branch (unlike productCount's own table), so a warehouse-staff caller reads null here regardless of whether an estimate exists — org users, tenant-wide staff and carrier staff all reach it.
65
+ * @nullable
66
+ */
67
+ estimatedVolumeCm3: number | null;
68
+ /**
69
+ * The customer's booking-time estimate (public.sales_order_estimate.item_count, mirrors OrderEstimateDto.itemCount) — a meaningful count for a PICKUP/MOVE job before warehouse intake fills in productCount, without a per-row detail fetch. Null when the order carries no estimate, or when the caller's row visibility doesn't reach it: sales_order_estimate has no warehouse read branch (unlike productCount's own table), so a warehouse-staff caller reads null here regardless of whether an estimate exists — org users, tenant-wide staff and carrier staff all reach it.
70
+ * @nullable
71
+ */
72
+ estimatedItemCount: number | null;
58
73
  /**
59
74
  * Dispatch warehouse (NULL for service-only / field jobs).
60
75
  * @nullable
@@ -190,6 +205,13 @@ export interface OrderMerchandiseDto {
190
205
  /** Frozen at placement (ISO 4217). */
191
206
  currencyCode: string;
192
207
  }
208
+ /**
209
+ * Opaque metadata carried verbatim from the originating cart item's metadata (BE-1800/E51) — ≤ 4096 bytes serialized, dropped rather than rejected if the source exceeded that at placement. PROVENANCE/DISPLAY ONLY: never given server semantics — not read for pricing, permission, or any business logic. Null when the line carried none.
210
+ * @nullable
211
+ */
212
+ export type OrderEstimateItemDtoMetadata = {
213
+ [key: string]: unknown;
214
+ } | null;
193
215
  export interface OrderEstimateItemDto {
194
216
  /**
195
217
  * What the customer called it.
@@ -204,6 +226,11 @@ export interface OrderEstimateItemDto {
204
226
  widthMm: number | null;
205
227
  /** @nullable */
206
228
  heightMm: number | null;
229
+ /**
230
+ * Opaque metadata carried verbatim from the originating cart item's metadata (BE-1800/E51) — ≤ 4096 bytes serialized, dropped rather than rejected if the source exceeded that at placement. PROVENANCE/DISPLAY ONLY: never given server semantics — not read for pricing, permission, or any business logic. Null when the line carried none.
231
+ * @nullable
232
+ */
233
+ metadata: OrderEstimateItemDtoMetadata;
207
234
  }
208
235
  export interface OrderEstimateDto {
209
236
  volumeCm3: number;
@@ -252,6 +279,11 @@ export interface OrderLegDto {
252
279
  * @nullable
253
280
  */
254
281
  tenantCarrierId: string | null;
282
+ /**
283
+ * The assigned carrier's display name (public.tenant_carrier.name), left-joined on tenantCarrierId — resolvable here because tenant_carrier is Shape C (any caller in the tenant, including a customer, can already read it under their own RLS). Null when tenantCarrierId is null (no carrier assigned yet).
284
+ * @nullable
285
+ */
286
+ carrierName: string | null;
255
287
  /** @nullable */
256
288
  plannedWindowStart: string | null;
257
289
  /** @nullable */
@@ -339,6 +371,11 @@ export interface OrderDetailDto {
339
371
  orderGroupId: string;
340
372
  /** The customer this job belongs to (public.organization). */
341
373
  organizationId: string;
374
+ /**
375
+ * The customer's name (public.organization.name) — mirrors OrderDetailDto.organization.name via the same left join. Null only on the left-join-miss edge case; organization is Shape C and readable tenant-wide, so this is never withheld by scope (BE-1894).
376
+ * @nullable
377
+ */
378
+ organizationName: string | null;
342
379
  /**
343
380
  * Recipient name from the order's primary transport leg — the same snapshot `PATCH /v1/orders/:id` corrects. Null when the leg carries no name, or when the caller's leg scope does not reach it (a carrier reaches only its own booked legs; warehouse staff only legs on an assigned warehouse).
344
381
  * @nullable
@@ -346,8 +383,18 @@ export interface OrderDetailDto {
346
383
  recipientName: string | null;
347
384
  /** Live product lines on the job (voided and deleted lines excluded). Scoped by the caller's own row visibility, so it matches what `GET /v1/orders/{id}` would show them. */
348
385
  productCount: number;
349
- /** Merchandise lines on the job (public.sales_order_merchandise) — always 0 except on a MERCHANDISE_SALE job, which carries merchandise instead of product lines. Distinct from `productCount`, which never counts these. Scoped by the caller's own row visibility like `productCount`: 0 can mean 'no merchandise' or 'withheld by scope' (no warehouse/carrier read branch exists yet on this table). */
386
+ /** Merchandise lines on the job (public.sales_order_merchandise) — always 0 except on a MERCHANDISE_SALE job, which carries merchandise instead of product lines. Distinct from `productCount`, which never counts these. Scoped by the caller's own row visibility like `productCount`: 0 can mean 'no merchandise' or 'withheld by scope'. */
350
387
  merchandiseCount: number;
388
+ /**
389
+ * The customer's booking-time estimate (public.sales_order_estimate.volume_cm3) — a rough volume figure useful for routing/capacity planning before `actualVolumeCm3` is measured at the warehouse. Distinct from the detail endpoint's nested `estimate.volumeCm3` (BE-1903): that one is never null (the column is NOT NULL once an estimate row exists) because its whole block collapses to `estimate: null` on a miss, while this flat field carries the nullability itself, the same shape as `estimatedItemCount` below. Null when the order carries no estimate, or when the caller's row visibility doesn't reach it: sales_order_estimate has no warehouse read branch (unlike productCount's own table), so a warehouse-staff caller reads null here regardless of whether an estimate exists — org users, tenant-wide staff and carrier staff all reach it.
390
+ * @nullable
391
+ */
392
+ estimatedVolumeCm3: number | null;
393
+ /**
394
+ * The customer's booking-time estimate (public.sales_order_estimate.item_count, mirrors OrderEstimateDto.itemCount) — a meaningful count for a PICKUP/MOVE job before warehouse intake fills in productCount, without a per-row detail fetch. Null when the order carries no estimate, or when the caller's row visibility doesn't reach it: sales_order_estimate has no warehouse read branch (unlike productCount's own table), so a warehouse-staff caller reads null here regardless of whether an estimate exists — org users, tenant-wide staff and carrier staff all reach it.
395
+ * @nullable
396
+ */
397
+ estimatedItemCount: number | null;
351
398
  /**
352
399
  * Dispatch warehouse (NULL for service-only / field jobs).
353
400
  * @nullable
@@ -548,7 +595,7 @@ export interface EditOrderDto {
548
595
  rutDeduction?: boolean;
549
596
  /** Re-plan the named leg onto a new slot. See RescheduleOrderDto.timeslotId for the release/consume atomicity and full-slot error contract. */
550
597
  reschedule?: RescheduleOrderDto;
551
- /** Force this edit through even though it would leave the order's own commitment past its live parent order's deadline (otherwise 409 own_commitment_infeasible — a distinct code from the non-overridable dependency_infeasible a parent edit can raise). Staff-only (platform-admin / tenant-wide staff). Requires overrideReason. Waives every live cross-order violation on this edit, not a single named parent. Recorded as an audit_logs.admin_action row whenever it actually suppresses a rejection. */
598
+ /** Force this edit through even though it would strand a live child_must_precede_parent edge — either this order's own commitment landing past its live parent order's deadline (409 own_commitment_infeasible), or this order's new date stranding a live child order (409 dependency_infeasible). Staff-only (platform-admin / tenant-wide staff). Requires overrideReason. Waives every live cross-order violation on this edit, not a single named parent/child. Recorded as an audit_logs.admin_action row whenever it actually suppresses a rejection. */
552
599
  overrideDependencyGuard?: boolean;
553
600
  /**
554
601
  * Why the cross-order dependency guard is being overridden. Required when overrideDependencyGuard is true.
@@ -608,6 +655,13 @@ export interface SetManualBillingDto {
608
655
  */
609
656
  comment?: string;
610
657
  }
658
+ /**
659
+ * Opaque per-line metadata (JSON object, ≤ 4096 bytes serialized); carried verbatim into OrderEstimateItemDto.metadata, no server semantics. Omit to leave a line with none; PATCH is a full replace, so re-submitting a line without its prior metadata clears it (same rule as every other field here).
660
+ * @nullable
661
+ */
662
+ export type EstimateItemInputDtoMetadata = {
663
+ [key: string]: unknown;
664
+ } | null;
611
665
  export interface EstimateItemInputDto {
612
666
  /** What the customer calls the goods (free text). */
613
667
  reference: string;
@@ -622,6 +676,11 @@ export interface EstimateItemInputDto {
622
676
  widthMm?: number;
623
677
  /** @minimum 1 */
624
678
  heightMm?: number;
679
+ /**
680
+ * Opaque per-line metadata (JSON object, ≤ 4096 bytes serialized); carried verbatim into OrderEstimateItemDto.metadata, no server semantics. Omit to leave a line with none; PATCH is a full replace, so re-submitting a line without its prior metadata clears it (same rule as every other field here).
681
+ * @nullable
682
+ */
683
+ metadata?: EstimateItemInputDtoMetadata;
625
684
  }
626
685
  export interface EditOrderEstimateDto {
627
686
  /** Full desired set of declared expected lines; an empty array clears them (and zeroes the estimate's volume). */
@@ -1190,6 +1249,22 @@ export interface PaginatedOrganizationsDto {
1190
1249
  /** Effective rows skipped applied. */
1191
1250
  offset: number;
1192
1251
  }
1252
+ export type OrganizationTypeCountDtoType = typeof OrganizationTypeCountDtoType[keyof typeof OrganizationTypeCountDtoType];
1253
+ export declare const OrganizationTypeCountDtoType: {
1254
+ readonly business: "business";
1255
+ readonly personal: "personal";
1256
+ };
1257
+ export interface OrganizationTypeCountDto {
1258
+ type: OrganizationTypeCountDtoType;
1259
+ /** Matching organizations of this type. */
1260
+ count: number;
1261
+ }
1262
+ export interface OrganizationStatsDto {
1263
+ /** Organizations matching the filter, RLS-scoped. Equals the sum of `byType`, and the `total` an identically filtered GET /v1/organizations would report. */
1264
+ total: number;
1265
+ /** Matching organizations grouped by type. A type with no matching organization is absent rather than zero. */
1266
+ byType: OrganizationTypeCountDto[];
1267
+ }
1193
1268
  export type CreateOrganizationDtoType = typeof CreateOrganizationDtoType[keyof typeof CreateOrganizationDtoType];
1194
1269
  export declare const CreateOrganizationDtoType: {
1195
1270
  readonly business: "business";
@@ -1248,6 +1323,21 @@ export interface OrganizationMemberDto {
1248
1323
  * @nullable
1249
1324
  */
1250
1325
  email: string | null;
1326
+ /**
1327
+ * Given name (user_profile.first_name). Null until set — by the member via `PATCH /v1/me`, or by staff via `PATCH …/members/:memberId/profile`.
1328
+ * @nullable
1329
+ */
1330
+ firstName: string | null;
1331
+ /**
1332
+ * Family name (user_profile.last_name). Null until set; same two writers as firstName.
1333
+ * @nullable
1334
+ */
1335
+ lastName: string | null;
1336
+ /**
1337
+ * Contact number (user_profile.phone). Null until set; same two writers as firstName.
1338
+ * @nullable
1339
+ */
1340
+ phone: string | null;
1251
1341
  }
1252
1342
  export type AddMemberDtoRole = typeof AddMemberDtoRole[keyof typeof AddMemberDtoRole];
1253
1343
  export declare const AddMemberDtoRole: {
@@ -1292,6 +1382,21 @@ export interface OrganizationMemberSyncResultDto {
1292
1382
  * @nullable
1293
1383
  */
1294
1384
  email: string | null;
1385
+ /**
1386
+ * Given name (user_profile.first_name). Null until set — by the member via `PATCH /v1/me`, or by staff via `PATCH …/members/:memberId/profile`.
1387
+ * @nullable
1388
+ */
1389
+ firstName: string | null;
1390
+ /**
1391
+ * Family name (user_profile.last_name). Null until set; same two writers as firstName.
1392
+ * @nullable
1393
+ */
1394
+ lastName: string | null;
1395
+ /**
1396
+ * Contact number (user_profile.phone). Null until set; same two writers as firstName.
1397
+ * @nullable
1398
+ */
1399
+ phone: string | null;
1295
1400
  /** 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. */
1296
1401
  keycloakSyncStatus: OrganizationMemberSyncResultDtoKeycloakSyncStatus;
1297
1402
  }
@@ -1307,6 +1412,26 @@ export declare const UpdateMemberDtoRole: {
1307
1412
  export interface UpdateMemberDto {
1308
1413
  role?: UpdateMemberDtoRole;
1309
1414
  }
1415
+ export interface UpdateMemberProfileDto {
1416
+ /**
1417
+ * Given name; null clears it.
1418
+ * @maxLength 100
1419
+ * @nullable
1420
+ */
1421
+ firstName?: string | null;
1422
+ /**
1423
+ * Family name; null clears it.
1424
+ * @maxLength 100
1425
+ * @nullable
1426
+ */
1427
+ lastName?: string | null;
1428
+ /**
1429
+ * Self-editable contact number, E.164 (e.g. +46701234567); null clears it. Normalized server-side (whitespace/dashes/parens/dots stripped) before validation — a bare national number without a leading + is rejected, not auto-converted.
1430
+ * @maxLength 50
1431
+ * @nullable
1432
+ */
1433
+ phone?: string | null;
1434
+ }
1310
1435
  export interface OrganizationContractDto {
1311
1436
  organizationContractId: string;
1312
1437
  tenantId: string;
@@ -1898,7 +2023,7 @@ export interface UpdateMeDto {
1898
2023
  */
1899
2024
  lastName?: string | null;
1900
2025
  /**
1901
- * Self-editable contact number; null clears it.
2026
+ * Self-editable contact number, E.164 (e.g. +46701234567); null clears it. Normalized server-side (whitespace/dashes/parens/dots stripped) before validation — a bare national number without a leading + is rejected, not auto-converted.
1902
2027
  * @maxLength 50
1903
2028
  * @nullable
1904
2029
  */
@@ -3016,8 +3141,13 @@ export interface AvailableDayDto {
3016
3141
  export interface AvailableSlotsResponseDto {
3017
3142
  days: AvailableDayDto[];
3018
3143
  }
3019
- export type TransportServiceDtoSalesOrderType = typeof TransportServiceDtoSalesOrderType[keyof typeof TransportServiceDtoSalesOrderType];
3020
- export declare const TransportServiceDtoSalesOrderType: {
3144
+ export interface TransportServiceZoneDto {
3145
+ transportServiceZoneId: string;
3146
+ serviceZoneId: string;
3147
+ serviceZoneCode: string;
3148
+ }
3149
+ export type TransportServiceListItemDtoSalesOrderType = typeof TransportServiceListItemDtoSalesOrderType[keyof typeof TransportServiceListItemDtoSalesOrderType];
3150
+ export declare const TransportServiceListItemDtoSalesOrderType: {
3021
3151
  readonly PICKUP: "PICKUP";
3022
3152
  readonly DELIVERY: "DELIVERY";
3023
3153
  readonly MOVE: "MOVE";
@@ -3026,37 +3156,37 @@ export declare const TransportServiceDtoSalesOrderType: {
3026
3156
  readonly PICKING: "PICKING";
3027
3157
  readonly MERCHANDISE_SALE: "MERCHANDISE_SALE";
3028
3158
  };
3029
- export type TransportServiceDtoFulfilmentMode = typeof TransportServiceDtoFulfilmentMode[keyof typeof TransportServiceDtoFulfilmentMode];
3030
- export declare const TransportServiceDtoFulfilmentMode: {
3159
+ export type TransportServiceListItemDtoFulfilmentMode = typeof TransportServiceListItemDtoFulfilmentMode[keyof typeof TransportServiceListItemDtoFulfilmentMode];
3160
+ export declare const TransportServiceListItemDtoFulfilmentMode: {
3031
3161
  readonly DELIVERY_TIMESLOT: "DELIVERY_TIMESLOT";
3032
3162
  readonly DISPATCH_SLOT: "DISPATCH_SLOT";
3033
3163
  readonly BOOKED: "BOOKED";
3034
3164
  };
3035
- export type TransportServiceDtoCustomerTypesItem = typeof TransportServiceDtoCustomerTypesItem[keyof typeof TransportServiceDtoCustomerTypesItem];
3036
- export declare const TransportServiceDtoCustomerTypesItem: {
3165
+ export type TransportServiceListItemDtoCustomerTypesItem = typeof TransportServiceListItemDtoCustomerTypesItem[keyof typeof TransportServiceListItemDtoCustomerTypesItem];
3166
+ export declare const TransportServiceListItemDtoCustomerTypesItem: {
3037
3167
  readonly business: "business";
3038
3168
  readonly personal: "personal";
3039
3169
  };
3040
3170
  /**
3041
3171
  * Who may be offered this service at checkout. PUBLIC (the default) = every caller, including guest sessions. RESTRICTED = only organizations listed in orgGrants. A RESTRICTED service with no grants is offered to NOBODY — a valid but easily unintended state. Gates booking admission only: revoking access never hides an order already placed.
3042
3172
  */
3043
- export type TransportServiceDtoVisibility = typeof TransportServiceDtoVisibility[keyof typeof TransportServiceDtoVisibility];
3044
- export declare const TransportServiceDtoVisibility: {
3173
+ export type TransportServiceListItemDtoVisibility = typeof TransportServiceListItemDtoVisibility[keyof typeof TransportServiceListItemDtoVisibility];
3174
+ export declare const TransportServiceListItemDtoVisibility: {
3045
3175
  readonly PUBLIC: "PUBLIC";
3046
3176
  readonly RESTRICTED: "RESTRICTED";
3047
3177
  };
3048
3178
  /**
3049
3179
  * @nullable
3050
3180
  */
3051
- export type TransportServiceDtoMetadata = {
3181
+ export type TransportServiceListItemDtoMetadata = {
3052
3182
  [key: string]: unknown;
3053
3183
  } | null;
3054
- export interface TransportServiceDto {
3184
+ export interface TransportServiceListItemDto {
3055
3185
  transportServiceId: string;
3056
3186
  code: string;
3057
3187
  name: string;
3058
- salesOrderType: TransportServiceDtoSalesOrderType;
3059
- fulfilmentMode: TransportServiceDtoFulfilmentMode;
3188
+ salesOrderType: TransportServiceListItemDtoSalesOrderType;
3189
+ fulfilmentMode: TransportServiceListItemDtoFulfilmentMode;
3060
3190
  /** @nullable */
3061
3191
  tenantCarrierId: string | null;
3062
3192
  /** @nullable */
@@ -3065,21 +3195,22 @@ export interface TransportServiceDto {
3065
3195
  originWarehouseId: string | null;
3066
3196
  /** @nullable */
3067
3197
  billingArticleId: string | null;
3068
- customerTypes: TransportServiceDtoCustomerTypesItem[];
3198
+ customerTypes: TransportServiceListItemDtoCustomerTypesItem[];
3069
3199
  minLeadTimeHours: number;
3070
3200
  customerSelectable: boolean;
3071
3201
  /** Who may be offered this service at checkout. PUBLIC (the default) = every caller, including guest sessions. RESTRICTED = only organizations listed in orgGrants. A RESTRICTED service with no grants is offered to NOBODY — a valid but easily unintended state. Gates booking admission only: revoking access never hides an order already placed. */
3072
- visibility: TransportServiceDtoVisibility;
3202
+ visibility: TransportServiceListItemDtoVisibility;
3073
3203
  isActive: boolean;
3074
3204
  displayOrder: number;
3075
3205
  /** @nullable */
3076
- metadata: TransportServiceDtoMetadata;
3206
+ metadata: TransportServiceListItemDtoMetadata;
3077
3207
  createdAt: string;
3078
3208
  updatedAt: string;
3209
+ zones: TransportServiceZoneDto[];
3079
3210
  }
3080
3211
  export interface PaginatedTransportServicesDto {
3081
3212
  /** The page of rows. */
3082
- items: TransportServiceDto[];
3213
+ items: TransportServiceListItemDto[];
3083
3214
  /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
3084
3215
  total: number;
3085
3216
  /** Effective max rows applied (after defaults/clamp). */
@@ -3087,11 +3218,6 @@ export interface PaginatedTransportServicesDto {
3087
3218
  /** Effective rows skipped applied. */
3088
3219
  offset: number;
3089
3220
  }
3090
- export interface TransportServiceZoneDto {
3091
- transportServiceZoneId: string;
3092
- serviceZoneId: string;
3093
- serviceZoneCode: string;
3094
- }
3095
3221
  /**
3096
3222
  * @nullable
3097
3223
  */
@@ -3318,6 +3444,67 @@ export interface CreateTransportServiceDto {
3318
3444
  /** Organizations that may be offered this service when visibility is RESTRICTED. Reconciled like zones[]/prices[]: omit to leave the set unchanged, [] to revoke every grant, or supply the exact set. */
3319
3445
  orgGrants?: TransportServiceOrgGrantInputDto[];
3320
3446
  }
3447
+ export type TransportServiceDtoSalesOrderType = typeof TransportServiceDtoSalesOrderType[keyof typeof TransportServiceDtoSalesOrderType];
3448
+ export declare const TransportServiceDtoSalesOrderType: {
3449
+ readonly PICKUP: "PICKUP";
3450
+ readonly DELIVERY: "DELIVERY";
3451
+ readonly MOVE: "MOVE";
3452
+ readonly DROP_OFF: "DROP_OFF";
3453
+ readonly TRANSFER: "TRANSFER";
3454
+ readonly PICKING: "PICKING";
3455
+ readonly MERCHANDISE_SALE: "MERCHANDISE_SALE";
3456
+ };
3457
+ export type TransportServiceDtoFulfilmentMode = typeof TransportServiceDtoFulfilmentMode[keyof typeof TransportServiceDtoFulfilmentMode];
3458
+ export declare const TransportServiceDtoFulfilmentMode: {
3459
+ readonly DELIVERY_TIMESLOT: "DELIVERY_TIMESLOT";
3460
+ readonly DISPATCH_SLOT: "DISPATCH_SLOT";
3461
+ readonly BOOKED: "BOOKED";
3462
+ };
3463
+ export type TransportServiceDtoCustomerTypesItem = typeof TransportServiceDtoCustomerTypesItem[keyof typeof TransportServiceDtoCustomerTypesItem];
3464
+ export declare const TransportServiceDtoCustomerTypesItem: {
3465
+ readonly business: "business";
3466
+ readonly personal: "personal";
3467
+ };
3468
+ /**
3469
+ * Who may be offered this service at checkout. PUBLIC (the default) = every caller, including guest sessions. RESTRICTED = only organizations listed in orgGrants. A RESTRICTED service with no grants is offered to NOBODY — a valid but easily unintended state. Gates booking admission only: revoking access never hides an order already placed.
3470
+ */
3471
+ export type TransportServiceDtoVisibility = typeof TransportServiceDtoVisibility[keyof typeof TransportServiceDtoVisibility];
3472
+ export declare const TransportServiceDtoVisibility: {
3473
+ readonly PUBLIC: "PUBLIC";
3474
+ readonly RESTRICTED: "RESTRICTED";
3475
+ };
3476
+ /**
3477
+ * @nullable
3478
+ */
3479
+ export type TransportServiceDtoMetadata = {
3480
+ [key: string]: unknown;
3481
+ } | null;
3482
+ export interface TransportServiceDto {
3483
+ transportServiceId: string;
3484
+ code: string;
3485
+ name: string;
3486
+ salesOrderType: TransportServiceDtoSalesOrderType;
3487
+ fulfilmentMode: TransportServiceDtoFulfilmentMode;
3488
+ /** @nullable */
3489
+ tenantCarrierId: string | null;
3490
+ /** @nullable */
3491
+ tenantCarrierMethodId: string | null;
3492
+ /** @nullable */
3493
+ originWarehouseId: string | null;
3494
+ /** @nullable */
3495
+ billingArticleId: string | null;
3496
+ customerTypes: TransportServiceDtoCustomerTypesItem[];
3497
+ minLeadTimeHours: number;
3498
+ customerSelectable: boolean;
3499
+ /** Who may be offered this service at checkout. PUBLIC (the default) = every caller, including guest sessions. RESTRICTED = only organizations listed in orgGrants. A RESTRICTED service with no grants is offered to NOBODY — a valid but easily unintended state. Gates booking admission only: revoking access never hides an order already placed. */
3500
+ visibility: TransportServiceDtoVisibility;
3501
+ isActive: boolean;
3502
+ displayOrder: number;
3503
+ /** @nullable */
3504
+ metadata: TransportServiceDtoMetadata;
3505
+ createdAt: string;
3506
+ updatedAt: string;
3507
+ }
3321
3508
  export type UpdateTransportServiceDtoSalesOrderType = typeof UpdateTransportServiceDtoSalesOrderType[keyof typeof UpdateTransportServiceDtoSalesOrderType];
3322
3509
  export declare const UpdateTransportServiceDtoSalesOrderType: {
3323
3510
  readonly PICKUP: "PICKUP";
@@ -4194,6 +4381,16 @@ export interface RouteDetailDto {
4194
4381
  updatedAt: string;
4195
4382
  stops: RouteStopDto[];
4196
4383
  }
4384
+ export interface PaginatedRouteDetailsDto {
4385
+ /** The page of rows. */
4386
+ items: RouteDetailDto[];
4387
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
4388
+ total: number;
4389
+ /** Effective max rows applied (after defaults/clamp). */
4390
+ limit: number;
4391
+ /** Effective rows skipped applied. */
4392
+ offset: number;
4393
+ }
4197
4394
  export type CreateRouteDtoSource = typeof CreateRouteDtoSource[keyof typeof CreateRouteDtoSource];
4198
4395
  export declare const CreateRouteDtoSource: {
4199
4396
  readonly MANUAL: "MANUAL";
@@ -6917,6 +7114,25 @@ export interface PaginatedWarehousesDto {
6917
7114
  /** Effective rows skipped applied. */
6918
7115
  offset: number;
6919
7116
  }
7117
+ export interface StatusCountDto {
7118
+ /** The status value (FK into the matching status lookup) */
7119
+ status: string;
7120
+ /** How many rows in this warehouse carry the status */
7121
+ count: number;
7122
+ }
7123
+ export interface WarehouseStatsDto {
7124
+ warehouseId: string;
7125
+ /** Active positions (slots) in the warehouse */
7126
+ positionCount: number;
7127
+ /** Active containers in the warehouse */
7128
+ containerCount: number;
7129
+ /** Active products whose home warehouse is this one */
7130
+ productCount: number;
7131
+ /** Pods in a container at this warehouse, grouped by pod status */
7132
+ podsByStatus: StatusCountDto[];
7133
+ /** Warehouse orders on this warehouse, grouped by status */
7134
+ warehouseOrdersByStatus: StatusCountDto[];
7135
+ }
6920
7136
  /**
6921
7137
  * Weekday → { open, close } opening hours (JSONB)
6922
7138
  */
@@ -7014,25 +7230,6 @@ export interface CreatePositionDto {
7014
7230
  /** @nullable */
7015
7231
  internalComment?: string | null;
7016
7232
  }
7017
- export interface StatusCountDto {
7018
- /** The status value (FK into the matching status lookup) */
7019
- status: string;
7020
- /** How many rows in this warehouse carry the status */
7021
- count: number;
7022
- }
7023
- export interface WarehouseStatsDto {
7024
- warehouseId: string;
7025
- /** Active positions (slots) in the warehouse */
7026
- positionCount: number;
7027
- /** Active containers in the warehouse */
7028
- containerCount: number;
7029
- /** Active products whose home warehouse is this one */
7030
- productCount: number;
7031
- /** Pods in a container at this warehouse, grouped by pod status */
7032
- podsByStatus: StatusCountDto[];
7033
- /** Warehouse orders on this warehouse, grouped by status */
7034
- warehouseOrdersByStatus: StatusCountDto[];
7035
- }
7036
7233
  export interface ValidateLocationDto {
7037
7234
  /** Latitude (WGS84) */
7038
7235
  latitude: number;
@@ -9198,6 +9395,16 @@ export interface EmployeeAssignmentDto {
9198
9395
  * @nullable
9199
9396
  */
9200
9397
  email: string | null;
9398
+ /**
9399
+ * Self-editable contact number of the assigned staff member, from their `user_profile` (PATCH /v1/me). Null when they have no profile row yet or have not set one. Same footing as `OrganizationMemberDto.phone` (BE-1897) — a plain, unaudited `:read`-gated projection of a colleague's own contact column for operational use, not the GDPR-export surface (`POST /v1/users/:sub/export`, `user:export`, written reason + `admin_action` row), which is a different, heavier disclosure.
9400
+ * @nullable
9401
+ */
9402
+ phone: string | null;
9403
+ /**
9404
+ * When the assigned staff member last called `/v1/me` (`user_profile.last_seen_at`). Null only when they have no profile row yet — once a profile exists the column is never null.
9405
+ * @nullable
9406
+ */
9407
+ lastActiveAt: string | null;
9201
9408
  }
9202
9409
  export type CreateEmployeeAssignmentDtoKind = typeof CreateEmployeeAssignmentDtoKind[keyof typeof CreateEmployeeAssignmentDtoKind];
9203
9410
  export declare const CreateEmployeeAssignmentDtoKind: {
@@ -9276,6 +9483,16 @@ export interface EmployeeAssignmentSyncResultDto {
9276
9483
  * @nullable
9277
9484
  */
9278
9485
  email: string | null;
9486
+ /**
9487
+ * Self-editable contact number of the assigned staff member, from their `user_profile` (PATCH /v1/me). Null when they have no profile row yet or have not set one. Same footing as `OrganizationMemberDto.phone` (BE-1897) — a plain, unaudited `:read`-gated projection of a colleague's own contact column for operational use, not the GDPR-export surface (`POST /v1/users/:sub/export`, `user:export`, written reason + `admin_action` row), which is a different, heavier disclosure.
9488
+ * @nullable
9489
+ */
9490
+ phone: string | null;
9491
+ /**
9492
+ * When the assigned staff member last called `/v1/me` (`user_profile.last_seen_at`). Null only when they have no profile row yet — once a profile exists the column is never null.
9493
+ * @nullable
9494
+ */
9495
+ lastActiveAt: string | null;
9279
9496
  /** 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. */
9280
9497
  keycloakSyncStatus: EmployeeAssignmentSyncResultDtoKeycloakSyncStatus;
9281
9498
  }
@@ -11292,6 +11509,10 @@ export type OrdersControllerListV1Params = {
11292
11509
  * @maxLength 200
11293
11510
  */
11294
11511
  search?: string;
11512
+ /**
11513
+ * Sort order. Defaults to createdAt:desc, the list's existing (previously implicit) order — passing it explicitly changes nothing.
11514
+ */
11515
+ sort?: OrdersControllerListV1Sort;
11295
11516
  };
11296
11517
  export type OrdersControllerListV1Type = typeof OrdersControllerListV1Type[keyof typeof OrdersControllerListV1Type];
11297
11518
  export declare const OrdersControllerListV1Type: {
@@ -11303,6 +11524,11 @@ export declare const OrdersControllerListV1Type: {
11303
11524
  readonly PICKING: "PICKING";
11304
11525
  readonly MERCHANDISE_SALE: "MERCHANDISE_SALE";
11305
11526
  };
11527
+ export type OrdersControllerListV1Sort = typeof OrdersControllerListV1Sort[keyof typeof OrdersControllerListV1Sort];
11528
+ export declare const OrdersControllerListV1Sort: {
11529
+ readonly 'createdAt:asc': "createdAt:asc";
11530
+ readonly 'createdAt:desc': "createdAt:desc";
11531
+ };
11306
11532
  export type OrdersControllerStatsV1Params = {
11307
11533
  /**
11308
11534
  * Filter by sales_order status. Repeatable — pass ?status=A&status=B for a set; a single value is accepted too.
@@ -11411,12 +11637,32 @@ export type OrganizationsControllerListV1Params = {
11411
11637
  * @maxLength 200
11412
11638
  */
11413
11639
  search?: string;
11640
+ /**
11641
+ * Batch-fetch by id (repeatable — ?ids=a&ids=b, max 100). When present this is the ONLY filter applied (type/search above are ignored) and pagination (limit/offset) is ignored — every matching, RLS-visible organization is returned, in no particular order (callers key by id). An id that doesn't exist, or isn't visible to the caller, is silently omitted rather than causing an error.
11642
+ */
11643
+ ids?: string[];
11414
11644
  };
11415
11645
  export type OrganizationsControllerListV1Type = typeof OrganizationsControllerListV1Type[keyof typeof OrganizationsControllerListV1Type];
11416
11646
  export declare const OrganizationsControllerListV1Type: {
11417
11647
  readonly business: "business";
11418
11648
  readonly personal: "personal";
11419
11649
  };
11650
+ export type OrganizationsControllerStatsV1Params = {
11651
+ /**
11652
+ * Filter by organization type.
11653
+ */
11654
+ type?: OrganizationsControllerStatsV1Type;
11655
+ /**
11656
+ * Case-insensitive substring search over organization name and corporate identity number (orgnr)
11657
+ * @maxLength 200
11658
+ */
11659
+ search?: string;
11660
+ };
11661
+ export type OrganizationsControllerStatsV1Type = typeof OrganizationsControllerStatsV1Type[keyof typeof OrganizationsControllerStatsV1Type];
11662
+ export declare const OrganizationsControllerStatsV1Type: {
11663
+ readonly business: "business";
11664
+ readonly personal: "personal";
11665
+ };
11420
11666
  export type CarriersControllerListProvidersV1Params = {
11421
11667
  /**
11422
11668
  * Max rows to return (1–100).
@@ -11614,6 +11860,10 @@ export type TransportServicesControllerListV1Params = {
11614
11860
  * Filter by active state.
11615
11861
  */
11616
11862
  isActive?: boolean;
11863
+ /**
11864
+ * Only services offered in this service zone (BE-1895) — removes the need to fetch every service's detail just to filter by zone.
11865
+ */
11866
+ serviceZoneId?: string;
11617
11867
  };
11618
11868
  export type TransportServicesControllerListV1SalesOrderType = typeof TransportServicesControllerListV1SalesOrderType[keyof typeof TransportServicesControllerListV1SalesOrderType];
11619
11869
  export declare const TransportServicesControllerListV1SalesOrderType: {
@@ -11814,7 +12064,16 @@ export type RoutesControllerListV1Params = {
11814
12064
  * Filter by route status (lookup value).
11815
12065
  */
11816
12066
  status?: string;
12067
+ /**
12068
+ * When 'stops', each item embeds its ordered stops (RouteDetailDto) instead of the plain RouteDto — avoids one GET /routes/:id per row on a day planner-sized page (BE-1895).
12069
+ */
12070
+ include?: RoutesControllerListV1Include;
11817
12071
  };
12072
+ export type RoutesControllerListV1Include = typeof RoutesControllerListV1Include[keyof typeof RoutesControllerListV1Include];
12073
+ export declare const RoutesControllerListV1Include: {
12074
+ readonly stops: "stops";
12075
+ };
12076
+ export type RoutesControllerListV1200 = PaginatedRoutesDto | PaginatedRouteDetailsDto;
11818
12077
  export type TransportLegsControllerListV1Params = {
11819
12078
  /**
11820
12079
  * Max rows to return (1–100).
@@ -11937,6 +12196,10 @@ export type ProductsControllerListV1Params = {
11937
12196
  * @maxLength 200
11938
12197
  */
11939
12198
  search?: string;
12199
+ /**
12200
+ * Batch-fetch by id (repeatable — ?ids=a&ids=b, max 100). When present this is the ONLY filter applied (folderId/organizationId/status/rootOnly/search above are ignored) and pagination (limit/offset) is ignored — every matching, RLS-visible product is returned, in no particular order (callers key by id). An id that doesn't exist, or isn't visible to the caller, is silently omitted rather than causing an error.
12201
+ */
12202
+ ids?: string[];
11940
12203
  };
11941
12204
  export type ItemsControllerListV1Params = {
11942
12205
  /**
@@ -11954,6 +12217,10 @@ export type ItemsControllerListV1Params = {
11954
12217
  * Filter to items of a single product (org-scoped)
11955
12218
  */
11956
12219
  productId?: string;
12220
+ /**
12221
+ * Batch-fetch by id (repeatable — ?ids=a&ids=b, max 100). When present this is the ONLY filter applied (productId above is ignored) and pagination (limit/offset) is ignored — every matching, RLS-visible item is returned, in no particular order (callers key by id). An id that doesn't exist, or isn't visible to the caller, is silently omitted rather than causing an error.
12222
+ */
12223
+ ids?: string[];
11957
12224
  };
11958
12225
  export type PodsControllerListV1Params = {
11959
12226
  /**
@@ -12160,6 +12427,12 @@ export type WarehousesControllerListV1Params = {
12160
12427
  */
12161
12428
  offset?: number;
12162
12429
  };
12430
+ export type WarehousesControllerStatsForWarehousesV1Params = {
12431
+ /**
12432
+ * Restrict to these warehouses (repeatable — ?ids=a&ids=b, max 100). Omit for every tenant warehouse. An id that doesn't exist, or isn't visible to the caller, is silently omitted rather than causing an error.
12433
+ */
12434
+ ids?: string[];
12435
+ };
12163
12436
  export type LookupsControllerListV1Params = {
12164
12437
  /**
12165
12438
  * Which vocabulary to return.