@vindentech/api-client 0.3.0-next.23 → 0.3.0-next.25

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 (37) hide show
  1. package/dist/generated/_permissions.d.ts +29 -1
  2. package/dist/generated/_permissions.d.ts.map +1 -1
  3. package/dist/generated/_permissions.js +8 -1
  4. package/dist/generated/_permissions.js.map +1 -1
  5. package/dist/generated/carriers/carriers.d.ts +3 -3
  6. package/dist/generated/checkout/checkout.d.ts +2 -2
  7. package/dist/generated/checkout/checkout.d.ts.map +1 -1
  8. package/dist/generated/containers/containers.d.ts +14 -0
  9. package/dist/generated/containers/containers.d.ts.map +1 -1
  10. package/dist/generated/containers/containers.js +10 -0
  11. package/dist/generated/containers/containers.js.map +1 -1
  12. package/dist/generated/index.schemas.d.ts +311 -153
  13. package/dist/generated/index.schemas.d.ts.map +1 -1
  14. package/dist/generated/index.schemas.js +34 -0
  15. package/dist/generated/index.schemas.js.map +1 -1
  16. package/dist/generated/notification-templates/notification-templates.d.ts +47 -1
  17. package/dist/generated/notification-templates/notification-templates.d.ts.map +1 -1
  18. package/dist/generated/notification-templates/notification-templates.js +18 -0
  19. package/dist/generated/notification-templates/notification-templates.js.map +1 -1
  20. package/dist/generated/orders/orders.d.ts +15 -1
  21. package/dist/generated/orders/orders.d.ts.map +1 -1
  22. package/dist/generated/orders/orders.js +12 -0
  23. package/dist/generated/orders/orders.js.map +1 -1
  24. package/dist/generated/payment-instruments/payment-instruments.d.ts +15 -1
  25. package/dist/generated/payment-instruments/payment-instruments.d.ts.map +1 -1
  26. package/dist/generated/payment-instruments/payment-instruments.js +10 -0
  27. package/dist/generated/payment-instruments/payment-instruments.js.map +1 -1
  28. package/dist/generated/pods/pods.d.ts +17 -3
  29. package/dist/generated/pods/pods.d.ts.map +1 -1
  30. package/dist/generated/pods/pods.js +12 -0
  31. package/dist/generated/pods/pods.js.map +1 -1
  32. package/dist/generated/sync-dimensions/sync-dimensions.d.ts +1 -1
  33. package/dist/generated/transport-services/transport-services.d.ts +15 -1
  34. package/dist/generated/transport-services/transport-services.d.ts.map +1 -1
  35. package/dist/generated/transport-services/transport-services.js +10 -0
  36. package/dist/generated/transport-services/transport-services.js.map +1 -1
  37. package/package.json +1 -1
@@ -373,133 +373,58 @@ export interface OrderTimelineDto {
373
373
  */
374
374
  estimatedCompletion: string | null;
375
375
  }
376
- /**
377
- * @nullable
378
- */
379
- export type EditOrderRecipientDtoName = {
380
- [key: string]: unknown;
381
- } | null;
382
- /**
383
- * @nullable
384
- */
385
- export type EditOrderRecipientDtoPhone = {
386
- [key: string]: unknown;
387
- } | null;
388
- /**
389
- * @nullable
390
- */
391
- export type EditOrderRecipientDtoEmail = {
392
- [key: string]: unknown;
393
- } | null;
394
- /**
395
- * @nullable
396
- */
397
- export type EditOrderRecipientDtoCompanyName = {
398
- [key: string]: unknown;
399
- } | null;
400
376
  export interface EditOrderRecipientDto {
401
377
  /** @nullable */
402
- name?: EditOrderRecipientDtoName;
378
+ name?: string | null;
403
379
  /** @nullable */
404
- phone?: EditOrderRecipientDtoPhone;
380
+ phone?: string | null;
405
381
  /** @nullable */
406
- email?: EditOrderRecipientDtoEmail;
382
+ email?: string | null;
407
383
  /** @nullable */
408
- companyName?: EditOrderRecipientDtoCompanyName;
384
+ companyName?: string | null;
409
385
  }
410
386
  /**
387
+ * Which kind of elevator the address has (`public.elevator_type`). Distinct from `elevator`, which only says whether there is one: crews plan a move differently for a SMALL cabin than a LARGE or FREIGHT one. Null clears it.
411
388
  * @nullable
412
389
  */
413
- export type EditOrderAddressDtoAddressLine1 = {
414
- [key: string]: unknown;
415
- } | null;
416
- /**
417
- * @nullable
418
- */
419
- export type EditOrderAddressDtoAddressLine2 = {
420
- [key: string]: unknown;
421
- } | null;
422
- /**
423
- * @nullable
424
- */
425
- export type EditOrderAddressDtoZipCode = {
426
- [key: string]: unknown;
427
- } | null;
428
- /**
429
- * @nullable
430
- */
431
- export type EditOrderAddressDtoCity = {
432
- [key: string]: unknown;
433
- } | null;
434
- /**
435
- * @nullable
436
- */
437
- export type EditOrderAddressDtoState = {
438
- [key: string]: unknown;
439
- } | null;
440
- /**
441
- * @nullable
442
- */
443
- export type EditOrderAddressDtoCounty = {
444
- [key: string]: unknown;
445
- } | null;
446
- /**
447
- * ISO 3166-1 alpha-2
448
- * @nullable
449
- */
450
- export type EditOrderAddressDtoCountryCode = {
451
- [key: string]: unknown;
452
- } | null;
453
- /**
454
- * @nullable
455
- */
456
- export type EditOrderAddressDtoFloorLevel = {
457
- [key: string]: unknown;
458
- } | null;
459
- /**
460
- * @nullable
461
- */
462
- export type EditOrderAddressDtoElevator = {
463
- [key: string]: unknown;
464
- } | null;
465
- /**
466
- * @nullable
467
- */
468
- export type EditOrderAddressDtoDoorCode = {
469
- [key: string]: unknown;
470
- } | null;
471
- /**
472
- * @nullable
473
- */
474
- export type EditOrderAddressDtoTransportInstructions = {
475
- [key: string]: unknown;
476
- } | null;
390
+ export type EditOrderAddressDtoElevatorType = typeof EditOrderAddressDtoElevatorType[keyof typeof EditOrderAddressDtoElevatorType] | null;
391
+ export declare const EditOrderAddressDtoElevatorType: {
392
+ readonly NONE: "NONE";
393
+ readonly SMALL: "SMALL";
394
+ readonly LARGE: "LARGE";
395
+ readonly FREIGHT: "FREIGHT";
396
+ };
477
397
  export interface EditOrderAddressDto {
478
398
  /** @nullable */
479
- addressLine1?: EditOrderAddressDtoAddressLine1;
399
+ addressLine1?: string | null;
480
400
  /** @nullable */
481
- addressLine2?: EditOrderAddressDtoAddressLine2;
401
+ addressLine2?: string | null;
482
402
  /** @nullable */
483
- zipCode?: EditOrderAddressDtoZipCode;
403
+ zipCode?: string | null;
484
404
  /** @nullable */
485
- city?: EditOrderAddressDtoCity;
405
+ city?: string | null;
486
406
  /** @nullable */
487
- state?: EditOrderAddressDtoState;
407
+ state?: string | null;
488
408
  /** @nullable */
489
- county?: EditOrderAddressDtoCounty;
409
+ county?: string | null;
490
410
  /**
491
411
  * ISO 3166-1 alpha-2
492
412
  * @nullable
493
413
  */
494
- countryCode?: EditOrderAddressDtoCountryCode;
414
+ countryCode?: string | null;
495
415
  /** @nullable */
496
- floorLevel?: EditOrderAddressDtoFloorLevel;
416
+ floorLevel?: number | null;
497
417
  /** @nullable */
498
- elevator?: EditOrderAddressDtoElevator;
418
+ elevator?: boolean | null;
419
+ /**
420
+ * Which kind of elevator the address has (`public.elevator_type`). Distinct from `elevator`, which only says whether there is one: crews plan a move differently for a SMALL cabin than a LARGE or FREIGHT one. Null clears it.
421
+ * @nullable
422
+ */
423
+ elevatorType?: EditOrderAddressDtoElevatorType;
499
424
  /** @nullable */
500
- doorCode?: EditOrderAddressDtoDoorCode;
425
+ doorCode?: string | null;
501
426
  /** @nullable */
502
- transportInstructions?: EditOrderAddressDtoTransportInstructions;
427
+ transportInstructions?: string | null;
503
428
  }
504
429
  export interface RescheduleOrderDto {
505
430
  /** The cart_component_key of the leg to re-plan (e.g. move:pickup, move:delivery). */
@@ -514,8 +439,23 @@ export interface EditOrderDto {
514
439
  address?: EditOrderAddressDto;
515
440
  /** New preferred transport date (does not re-plan capacity by itself). */
516
441
  preferredTransportDate?: string;
442
+ /**
443
+ * Discount code carried on the order; null removes it. Stored as a label, not redeemed here — the code is resolved against the coupon catalogue when the order is priced, and one that is unknown or out of its window simply yields no discount. An unchanged code may therefore be re-sent on every save without the edit failing.
444
+ * @maxLength 100
445
+ * @nullable
446
+ */
447
+ couponCode?: string | null;
448
+ /** Whether the order claims a RUT deduction. The identity number the claim is filed against is frozen at placement and has no edit path, so enabling RUT on an order placed without one leaves the claim without an identity number; disabling it leaves any stored number in place (removal belongs to the personal-data erasure path, not to this toggle). */
449
+ rutDeduction?: boolean;
517
450
  reschedule?: RescheduleOrderDto;
518
451
  }
452
+ export interface AssignOrderWarehouseDto {
453
+ /**
454
+ * The warehouse the job belongs to; null clears the assignment. Placement infers this from the booked transport service's origin warehouse when the booked legs name exactly one — services configured for any warehouse, and legs running from different sites, leave it unset for this command to fill in.
455
+ * @nullable
456
+ */
457
+ warehouseId: string | null;
458
+ }
519
459
  /**
520
460
  * Opaque line metadata. Accepted but not persisted — sales_order_product carries no metadata column.
521
461
  */
@@ -2139,10 +2079,15 @@ export interface QuoteLineDto {
2139
2079
  reference: string | null;
2140
2080
  description: string;
2141
2081
  quantity: number;
2142
- /** Unit price ex-VAT, integer minor units of the quote currency */
2082
+ /** Unit price ex-VAT, integer minor units of the quote currency. This is the catalogue price BEFORE any binding discount — with one applied it no longer multiplies out to `lineTotalExVatMinor` (a 100% start-fee waiver leaves a priced unit against a zero line). Sum `lineTotalExVatMinor`, never unit × quantity, or the result contradicts `totals`. */
2143
2083
  unitPriceExVatMinor: number;
2144
- /** Line total ex-VAT, integer minor units */
2084
+ /** Line total ex-VAT, integer minor units, AFTER any binding discount — the amount that reaches `totals` */
2145
2085
  lineTotalExVatMinor: number;
2086
+ /**
2087
+ * How much the binding plan took off this line, integer minor units. Null when no discount applied.
2088
+ * @nullable
2089
+ */
2090
+ discountExVatMinor: number | null;
2146
2091
  /** VAT rate as a percentage, per the platform-wide NUMERIC(6,4) convention (25 = 25%) */
2147
2092
  vatRate: number;
2148
2093
  /** Whether this line qualifies for the RUT labour deduction */
@@ -2177,18 +2122,22 @@ export interface QuoteDiscountDto {
2177
2122
  /** binding_period | campaign | contract | ... */
2178
2123
  ruleType: string;
2179
2124
  /**
2180
- * Article code the rate applies to; null = every article
2125
+ * Article code the rule applies to; null = every article priced on this quote
2181
2126
  * @nullable
2182
2127
  */
2183
2128
  articleCode: string | null;
2129
+ /** percentage | fixed_amount | replacement_price */
2130
+ discountType: string;
2184
2131
  /**
2185
- * Basis points (1000 = 10.00%)
2132
+ * Basis points (1000 = 10.00%); null for a money-valued rule
2186
2133
  * @nullable
2187
2134
  */
2188
2135
  discountPercentBps: number | null;
2136
+ /** What this rule took off, ex-VAT, integer minor units */
2137
+ discountExVatMinor: number;
2189
2138
  }
2190
2139
  export interface QuoteTotalsDto {
2191
- /** Sum of line totals ex-VAT, minor units */
2140
+ /** Sum of line totals ex-VAT after binding discounts, minor units */
2192
2141
  exVatMinor: number;
2193
2142
  /** Total VAT, minor units */
2194
2143
  vatMinor: number;
@@ -2196,6 +2145,25 @@ export interface QuoteTotalsDto {
2196
2145
  incVatMinor: number;
2197
2146
  /** What the customer pays: incVat − coupon discount − RUT deduction, minor units */
2198
2147
  payableMinor: number;
2148
+ /** What the binding plan took off, ex-VAT, minor units. The number to compare options by: `payableMinor` also carries the coupon and the RUT deduction, both of which floor at zero and can make two options look identical. */
2149
+ discountExVatMinor: number;
2150
+ }
2151
+ export interface QuoteBindingOptionDto {
2152
+ bindingPlanId: string;
2153
+ code: string;
2154
+ displayName: string;
2155
+ /**
2156
+ * Null or 0 = flexible, no binding
2157
+ * @nullable
2158
+ */
2159
+ durationMonths: number | null;
2160
+ /** The plan a customer who picks nothing gets */
2161
+ isDefault: boolean;
2162
+ /** True for the plan this quote's own `lines` and `totals` are priced against. Nothing is selected when `binding` is null. */
2163
+ selected: boolean;
2164
+ discounts: QuoteDiscountDto[];
2165
+ /** This cart, priced under this plan */
2166
+ totals: QuoteTotalsDto;
2199
2167
  }
2200
2168
  /**
2201
2169
  * @nullable
@@ -2220,15 +2188,19 @@ export interface QuoteResponseDto {
2220
2188
  * @nullable
2221
2189
  */
2222
2190
  binding: QuoteResponseDtoBinding;
2223
- /** The in-force binding plan's rate matrix — display data, NOT reflected in `totals` (see QuoteDiscountDto and the BINDING_DISCOUNT entry in `deferred`) */
2191
+ /** The in-force binding plan's discounts, as applied to `lines` and `totals`. Empty when no plan is in force. */
2224
2192
  discounts: QuoteDiscountDto[];
2193
+ /** Every active binding plan of the tenant, each priced against this cart — the duration step's options. Always present; see `bindingOptionsSelectable` for whether picking one would change anything. */
2194
+ bindingOptions: QuoteBindingOptionDto[];
2195
+ /** Whether setting `bindingId` on this cart would change the plan in force. False when the organization already holds a contract, because placement never rewrites an in-force binding — the options are then informational only. */
2196
+ bindingOptionsSelectable: boolean;
2225
2197
  /**
2226
2198
  * Total RUT labour deduction in minor units. Null when RUT does not apply, and also when every RUT-eligible line was priced from a source that carries no post-deduction price to derive it from (see TRANSPORT_RUT in `deferred`) — null means 'not computed', never 'zero saving'.
2227
2199
  * @nullable
2228
2200
  */
2229
2201
  rutDeductionMinor: number | null;
2230
2202
  totals: QuoteTotalsDto;
2231
- /** Components present on the cart that this quote did not price, or reductions it did not apply. Their absence from `totals` is intentional, never a zero charge. Values: GOODS, SERVICE, START_FEE, TRANSPORT (no configured article, price row, or computable rate — no line is emitted at all), INSURANCE (no plan catalogue exists yet), TRANSPORT_PARTIAL (a transport line IS priced from the rate card but excludes a component the cart carries no quantity for — a per-hour rate with no `estimatedHours`, or a per-unit rate with no shipment manifest — so the transport amount is a floor, not the final charge), TRANSPORT_RUT (the line is RUT-eligible but its price source carries no post-deduction price to derive the amount from), BINDING_DISCOUNT (the plan carries rates in `discounts` that invoicing does not yet honour, so the totals exclude them), MATERIAL_DELIVERY (the cart holds a material:delivery timeslot; its underlying slot may carry a real price, but materials pricing is not yet designed, so it is excluded from `totals` rather than priced as ordinary transport). */
2203
+ /** Components present on the cart that this quote did not price, or reductions it did not apply. Their absence from `totals` is intentional, never a zero charge. Values: GOODS, SERVICE, START_FEE, TRANSPORT (no configured article, price row, or computable rate — no line is emitted at all), INSURANCE (no plan catalogue exists yet), TRANSPORT_PARTIAL (a transport line IS priced from the rate card but excludes a component the cart carries no quantity for — a per-hour rate with no `estimatedHours`, or a per-unit rate with no shipment manifest — so the transport amount is a floor, not the final charge), TRANSPORT_RUT (the line is RUT-eligible but its price source carries no post-deduction price to derive the amount from), MATERIAL_DELIVERY (the cart holds a material:delivery timeslot; its underlying slot may carry a real price, but materials pricing is not yet designed, so it is excluded from `totals` rather than priced as ordinary transport). */
2232
2204
  deferred: string[];
2233
2205
  }
2234
2206
  /**
@@ -2714,6 +2686,39 @@ export interface PlaceOrderResultDto {
2714
2686
  orderNumber: number;
2715
2687
  salesOrders: PlacedSalesOrderDto[];
2716
2688
  }
2689
+ export interface CheckoutTransportServiceDto {
2690
+ transportServiceId: string;
2691
+ name: string;
2692
+ /** PICKUP | DELIVERY | MOVE | DROP_OFF | TRANSFER | PICKING | MERCHANDISE_SALE */
2693
+ salesOrderType: string;
2694
+ /** DELIVERY_TIMESLOT | DISPATCH_SLOT | BOOKED */
2695
+ fulfilmentMode: string;
2696
+ /** The zone that matched the queried zip code */
2697
+ serviceZoneId: string;
2698
+ }
2699
+ export interface TransportSlotDto {
2700
+ slotId: string;
2701
+ slotDate: string;
2702
+ windowStart: string;
2703
+ windowEnd: string;
2704
+ /** @nullable */
2705
+ orderCutoffAt: string | null;
2706
+ /** @nullable */
2707
+ priceExVat: string | null;
2708
+ /** @nullable */
2709
+ priceIncRut: string | null;
2710
+ /** @nullable */
2711
+ vatRate: string | null;
2712
+ /** @nullable */
2713
+ expressSurchargeExVat: string | null;
2714
+ /**
2715
+ * Orders still bookable in this slot; null = unlimited
2716
+ * @nullable
2717
+ */
2718
+ remainingOrders: number | null;
2719
+ /** ACTIVE | CLOSED */
2720
+ status: string;
2721
+ }
2717
2722
  export type TransportServiceDtoSalesOrderType = typeof TransportServiceDtoSalesOrderType[keyof typeof TransportServiceDtoSalesOrderType];
2718
2723
  export declare const TransportServiceDtoSalesOrderType: {
2719
2724
  readonly PICKUP: "PICKUP";
@@ -2735,6 +2740,14 @@ export declare const TransportServiceDtoCustomerTypesItem: {
2735
2740
  readonly business: "business";
2736
2741
  readonly personal: "personal";
2737
2742
  };
2743
+ /**
2744
+ * 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.
2745
+ */
2746
+ export type TransportServiceDtoVisibility = typeof TransportServiceDtoVisibility[keyof typeof TransportServiceDtoVisibility];
2747
+ export declare const TransportServiceDtoVisibility: {
2748
+ readonly PUBLIC: "PUBLIC";
2749
+ readonly RESTRICTED: "RESTRICTED";
2750
+ };
2738
2751
  /**
2739
2752
  * @nullable
2740
2753
  */
@@ -2758,6 +2771,8 @@ export interface TransportServiceDto {
2758
2771
  customerTypes: TransportServiceDtoCustomerTypesItem[];
2759
2772
  minLeadTimeHours: number;
2760
2773
  customerSelectable: boolean;
2774
+ /** 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. */
2775
+ visibility: TransportServiceDtoVisibility;
2761
2776
  isActive: boolean;
2762
2777
  displayOrder: number;
2763
2778
  /** @nullable */
@@ -2765,29 +2780,6 @@ export interface TransportServiceDto {
2765
2780
  createdAt: string;
2766
2781
  updatedAt: string;
2767
2782
  }
2768
- export interface TransportSlotDto {
2769
- slotId: string;
2770
- slotDate: string;
2771
- windowStart: string;
2772
- windowEnd: string;
2773
- /** @nullable */
2774
- orderCutoffAt: string | null;
2775
- /** @nullable */
2776
- priceExVat: string | null;
2777
- /** @nullable */
2778
- priceIncRut: string | null;
2779
- /** @nullable */
2780
- vatRate: string | null;
2781
- /** @nullable */
2782
- expressSurchargeExVat: string | null;
2783
- /**
2784
- * Orders still bookable in this slot; null = unlimited
2785
- * @nullable
2786
- */
2787
- remainingOrders: number | null;
2788
- /** ACTIVE | CLOSED */
2789
- status: string;
2790
- }
2791
2783
  export interface PaginatedTransportServicesDto {
2792
2784
  /** The page of rows. */
2793
2785
  items: TransportServiceDto[];
@@ -2851,6 +2843,15 @@ export interface TransportServicePriceDto {
2851
2843
  isActive: boolean;
2852
2844
  createdAt: string;
2853
2845
  }
2846
+ export interface TransportServiceOrgGrantDto {
2847
+ transportServiceOrgGrantId: string;
2848
+ organizationId: string;
2849
+ /** The granted organization's display name */
2850
+ organizationName: string;
2851
+ createdAt: string;
2852
+ /** Last change to the grant — including when a revoked grant was re-granted. */
2853
+ updatedAt: string;
2854
+ }
2854
2855
  export type TransportServiceDetailDtoSalesOrderType = typeof TransportServiceDetailDtoSalesOrderType[keyof typeof TransportServiceDetailDtoSalesOrderType];
2855
2856
  export declare const TransportServiceDetailDtoSalesOrderType: {
2856
2857
  readonly PICKUP: "PICKUP";
@@ -2872,6 +2873,14 @@ export declare const TransportServiceDetailDtoCustomerTypesItem: {
2872
2873
  readonly business: "business";
2873
2874
  readonly personal: "personal";
2874
2875
  };
2876
+ /**
2877
+ * 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.
2878
+ */
2879
+ export type TransportServiceDetailDtoVisibility = typeof TransportServiceDetailDtoVisibility[keyof typeof TransportServiceDetailDtoVisibility];
2880
+ export declare const TransportServiceDetailDtoVisibility: {
2881
+ readonly PUBLIC: "PUBLIC";
2882
+ readonly RESTRICTED: "RESTRICTED";
2883
+ };
2875
2884
  /**
2876
2885
  * @nullable
2877
2886
  */
@@ -2895,6 +2904,8 @@ export interface TransportServiceDetailDto {
2895
2904
  customerTypes: TransportServiceDetailDtoCustomerTypesItem[];
2896
2905
  minLeadTimeHours: number;
2897
2906
  customerSelectable: boolean;
2907
+ /** 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. */
2908
+ visibility: TransportServiceDetailDtoVisibility;
2898
2909
  isActive: boolean;
2899
2910
  displayOrder: number;
2900
2911
  /** @nullable */
@@ -2903,6 +2914,8 @@ export interface TransportServiceDetailDto {
2903
2914
  updatedAt: string;
2904
2915
  zones: TransportServiceZoneDto[];
2905
2916
  activePrices: TransportServicePriceDto[];
2917
+ /** Organizations that may be offered this service. Meaningful only when visibility is RESTRICTED; always empty for a PUBLIC service unless grants were authored ahead of the flip. */
2918
+ orgGrants: TransportServiceOrgGrantDto[];
2906
2919
  }
2907
2920
  export interface TransportServiceZoneInputDto {
2908
2921
  transportServiceZoneId?: string;
@@ -2945,6 +2958,10 @@ export interface TransportServicePriceInputDto {
2945
2958
  effectiveUntil?: string;
2946
2959
  isActive?: boolean;
2947
2960
  }
2961
+ export interface TransportServiceOrgGrantInputDto {
2962
+ /** The organization to grant this service to. */
2963
+ organizationId: string;
2964
+ }
2948
2965
  export type CreateTransportServiceDtoSalesOrderType = typeof CreateTransportServiceDtoSalesOrderType[keyof typeof CreateTransportServiceDtoSalesOrderType];
2949
2966
  export declare const CreateTransportServiceDtoSalesOrderType: {
2950
2967
  readonly PICKUP: "PICKUP";
@@ -2966,6 +2983,14 @@ export declare const CreateTransportServiceDtoCustomerTypesItem: {
2966
2983
  readonly business: "business";
2967
2984
  readonly personal: "personal";
2968
2985
  };
2986
+ /**
2987
+ * 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.
2988
+ */
2989
+ export type CreateTransportServiceDtoVisibility = typeof CreateTransportServiceDtoVisibility[keyof typeof CreateTransportServiceDtoVisibility];
2990
+ export declare const CreateTransportServiceDtoVisibility: {
2991
+ readonly PUBLIC: "PUBLIC";
2992
+ readonly RESTRICTED: "RESTRICTED";
2993
+ };
2969
2994
  export type CreateTransportServiceDtoMetadata = {
2970
2995
  [key: string]: unknown;
2971
2996
  };
@@ -2986,11 +3011,15 @@ export interface CreateTransportServiceDto {
2986
3011
  customerTypes?: CreateTransportServiceDtoCustomerTypesItem[];
2987
3012
  minLeadTimeHours?: number;
2988
3013
  customerSelectable?: boolean;
3014
+ /** 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. */
3015
+ visibility?: CreateTransportServiceDtoVisibility;
2989
3016
  isActive?: boolean;
2990
3017
  displayOrder?: number;
2991
3018
  metadata?: CreateTransportServiceDtoMetadata;
2992
3019
  zones?: TransportServiceZoneInputDto[];
2993
3020
  prices?: TransportServicePriceInputDto[];
3021
+ /** 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. */
3022
+ orgGrants?: TransportServiceOrgGrantInputDto[];
2994
3023
  }
2995
3024
  export type UpdateTransportServiceDtoSalesOrderType = typeof UpdateTransportServiceDtoSalesOrderType[keyof typeof UpdateTransportServiceDtoSalesOrderType];
2996
3025
  export declare const UpdateTransportServiceDtoSalesOrderType: {
@@ -3013,6 +3042,14 @@ export declare const UpdateTransportServiceDtoCustomerTypesItem: {
3013
3042
  readonly business: "business";
3014
3043
  readonly personal: "personal";
3015
3044
  };
3045
+ /**
3046
+ * 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.
3047
+ */
3048
+ export type UpdateTransportServiceDtoVisibility = typeof UpdateTransportServiceDtoVisibility[keyof typeof UpdateTransportServiceDtoVisibility];
3049
+ export declare const UpdateTransportServiceDtoVisibility: {
3050
+ readonly PUBLIC: "PUBLIC";
3051
+ readonly RESTRICTED: "RESTRICTED";
3052
+ };
3016
3053
  export type UpdateTransportServiceDtoMetadata = {
3017
3054
  [key: string]: unknown;
3018
3055
  };
@@ -3035,11 +3072,15 @@ export interface UpdateTransportServiceDto {
3035
3072
  customerTypes?: UpdateTransportServiceDtoCustomerTypesItem[];
3036
3073
  minLeadTimeHours?: number;
3037
3074
  customerSelectable?: boolean;
3075
+ /** 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. */
3076
+ visibility?: UpdateTransportServiceDtoVisibility;
3038
3077
  isActive?: boolean;
3039
3078
  displayOrder?: number;
3040
3079
  metadata?: UpdateTransportServiceDtoMetadata;
3041
3080
  zones?: TransportServiceZoneInputDto[];
3042
3081
  prices?: TransportServicePriceInputDto[];
3082
+ /** Organizations that may be offered this service when visibility is RESTRICTED. Omit to leave the set unchanged; [] revokes every grant; a supplied array is reconciled to exactly that set. */
3083
+ orgGrants?: TransportServiceOrgGrantInputDto[];
3043
3084
  }
3044
3085
  export interface PaginatedTransportServicePricesDto {
3045
3086
  /** The page of rows. */
@@ -4157,6 +4198,16 @@ export interface FailLegDto {
4157
4198
  /** When the event occurred (client clock). */
4158
4199
  occurredAt?: string;
4159
4200
  }
4201
+ /**
4202
+ * Which kind of elevator the address has (`public.elevator_type`). Distinct from `elevator`, which only says whether there is one.
4203
+ */
4204
+ export type PatchLegSnapshotDtoElevatorType = typeof PatchLegSnapshotDtoElevatorType[keyof typeof PatchLegSnapshotDtoElevatorType];
4205
+ export declare const PatchLegSnapshotDtoElevatorType: {
4206
+ readonly NONE: "NONE";
4207
+ readonly SMALL: "SMALL";
4208
+ readonly LARGE: "LARGE";
4209
+ readonly FREIGHT: "FREIGHT";
4210
+ };
4160
4211
  export interface PatchLegSnapshotDto {
4161
4212
  /**
4162
4213
  * Why the snapshot is being corrected (audited).
@@ -4192,6 +4243,8 @@ export interface PatchLegSnapshotDto {
4192
4243
  doorCode?: string;
4193
4244
  floorLevel?: number;
4194
4245
  elevator?: boolean;
4246
+ /** Which kind of elevator the address has (`public.elevator_type`). Distinct from `elevator`, which only says whether there is one. */
4247
+ elevatorType?: PatchLegSnapshotDtoElevatorType;
4195
4248
  latitude?: number;
4196
4249
  longitude?: number;
4197
4250
  /** @maxLength 2000 */
@@ -4566,7 +4619,7 @@ export interface UpdateItemDto {
4566
4619
  /** Why the unit is quarantined. Staff-only — 403 for organization callers */
4567
4620
  blockReason?: string;
4568
4621
  }
4569
- export interface PodDto {
4622
+ export interface PodDetailDto {
4570
4623
  podId: string;
4571
4624
  organizationId: string;
4572
4625
  itemId: string;
@@ -4595,10 +4648,35 @@ export interface PodDto {
4595
4648
  volumeCm3: number | null;
4596
4649
  createdAt: string;
4597
4650
  updatedAt: string;
4651
+ /**
4652
+ * The catalogue product these goods belong to, via the pod's item
4653
+ * @nullable
4654
+ */
4655
+ productId: string | null;
4656
+ /**
4657
+ * Catalogue name (null on placeholders)
4658
+ * @nullable
4659
+ */
4660
+ productName: string | null;
4661
+ /**
4662
+ * Name captured before identification, when the product has no catalogue name
4663
+ * @nullable
4664
+ */
4665
+ productPlaceholderName: string | null;
4666
+ /**
4667
+ * Primary image storage key
4668
+ * @nullable
4669
+ */
4670
+ productImageStorageKey: string | null;
4671
+ /**
4672
+ * product_status value
4673
+ * @nullable
4674
+ */
4675
+ productStatus: string | null;
4598
4676
  }
4599
4677
  export interface PaginatedPodsDto {
4600
4678
  /** The page of rows. */
4601
- items: PodDto[];
4679
+ items: PodDetailDto[];
4602
4680
  /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
4603
4681
  total: number;
4604
4682
  /** Effective max rows applied (after defaults/clamp). */
@@ -4642,6 +4720,66 @@ export interface UpdatePodDto {
4642
4720
  */
4643
4721
  labelId?: string;
4644
4722
  }
4723
+ export interface PodDto {
4724
+ podId: string;
4725
+ organizationId: string;
4726
+ itemId: string;
4727
+ /** @nullable */
4728
+ containerId: string | null;
4729
+ /** @nullable */
4730
+ warehouseOrderId: string | null;
4731
+ /** @nullable */
4732
+ salesOrderId: string | null;
4733
+ /**
4734
+ * Physical label id (barcode)
4735
+ * @nullable
4736
+ */
4737
+ labelId: string | null;
4738
+ /** pod_status value */
4739
+ status: string;
4740
+ /** Unit width (mm) */
4741
+ unitWidthMm: number;
4742
+ unitHeightMm: number;
4743
+ unitDepthMm: number;
4744
+ quantity: number;
4745
+ /**
4746
+ * Volume in cm³ (generated projection)
4747
+ * @nullable
4748
+ */
4749
+ volumeCm3: number | null;
4750
+ createdAt: string;
4751
+ updatedAt: string;
4752
+ }
4753
+ export interface MarkDamagedDto {
4754
+ /**
4755
+ * Units lost to damage.
4756
+ * @minimum 1
4757
+ */
4758
+ quantity: number;
4759
+ /**
4760
+ * Mandatory reason recorded on the movement.
4761
+ * @minLength 3
4762
+ */
4763
+ reason: string;
4764
+ }
4765
+ export interface AdjustedPodDto {
4766
+ podId: string;
4767
+ /** Units on the pod after the adjustment. */
4768
+ quantity: number;
4769
+ /** Units on the pod before the adjustment. */
4770
+ previousQuantity: number;
4771
+ status: string;
4772
+ }
4773
+ export interface MarkDamagedResultDto {
4774
+ /** The DAMAGE ledger movement. */
4775
+ movementId: string;
4776
+ /** The pod after the write-off. `quantity` is 0 when the whole pod was lost — the pod row is then retired (soft-deleted), because pod.quantity has a CHECK (> 0) and cannot hold zero. */
4777
+ pod: AdjustedPodDto;
4778
+ /** Units written off. */
4779
+ quantityDamaged: number;
4780
+ /** True when this response replays a previous run of the key. */
4781
+ idempotent: boolean;
4782
+ }
4645
4783
  export interface PositionDto {
4646
4784
  positionId: string;
4647
4785
  warehouseId: string;
@@ -4675,6 +4813,10 @@ export interface PositionDto {
4675
4813
  checkNumber: number | null;
4676
4814
  /** True when an active position_blocked row exists */
4677
4815
  isBlocked: boolean;
4816
+ /** Live containers currently sitting on this slot (occupancy) */
4817
+ containerCount: number;
4818
+ /** Live pods inside those containers — distinguishes an occupied-but-empty slot from a full one. RLS-scoped, so a caller who cannot see the goods reads 0. */
4819
+ podCount: number;
4678
4820
  createdAt: string;
4679
4821
  }
4680
4822
  export interface PaginatedPositionsDto {
@@ -5538,14 +5680,6 @@ export interface AdjustCommandDto {
5538
5680
  */
5539
5681
  reason: string;
5540
5682
  }
5541
- export interface AdjustedPodDto {
5542
- podId: string;
5543
- /** Units on the pod after the adjustment. */
5544
- quantity: number;
5545
- /** Units on the pod before the adjustment. */
5546
- previousQuantity: number;
5547
- status: string;
5548
- }
5549
5683
  export interface AdjustResultDto {
5550
5684
  /** The ADJUST ledger movement. */
5551
5685
  movementId: string;
@@ -7719,6 +7853,21 @@ export interface PaymentInstrumentDto {
7719
7853
  isDefault: boolean;
7720
7854
  createdAt: string;
7721
7855
  }
7856
+ export interface PaymentDetailsRequirementDto {
7857
+ /** True when the checkout should collect card details: the resolved payment method charges automatically and the organization has no live payment instrument. */
7858
+ detailsRequired: boolean;
7859
+ /**
7860
+ * Code of the resolved payment method — the account's own, or the tenant default it inherits when it pins none. Null when neither resolves.
7861
+ * @nullable
7862
+ */
7863
+ paymentMethodCode: string | null;
7864
+ /** Whether the resolved payment method charges the customer automatically. */
7865
+ isAutoChargeable: boolean;
7866
+ /** Whether the organization has at least one payment instrument that has not been removed. Card expiry is deliberately not considered — the provider keeps charging a card past its printed expiry once its updater has refreshed it. */
7867
+ hasPaymentInstrument: boolean;
7868
+ /** False means the organization has no billing account, which is an anomaly (one is provisioned on organization sync) rather than a normal state. Reported rather than raised: a 404 here would send the caller to setup-intent, which fails on the same missing row. */
7869
+ hasBillingAccount: boolean;
7870
+ }
7722
7871
  export interface SetupIntentResponseDto {
7723
7872
  /** Stripe SetupIntent client secret — confirm the card with Stripe.js (PaymentElement). */
7724
7873
  clientSecret: string;
@@ -8446,12 +8595,6 @@ export interface UpdateNotificationTemplateDto {
8446
8595
  /** The only mutable field: event, channel, locale and organization are the template's identity. */
8447
8596
  name: string;
8448
8597
  }
8449
- export interface CreateTemplateVersionDto {
8450
- /** Start from this version's content. Cloning an ARCHIVED version is the rollback-with-edits path; the archived row itself is never mutated. */
8451
- cloneFromVersionId?: string;
8452
- /** The contract version to author against. Defaults to the cloned version's, else the event's active version. */
8453
- eventVersion?: number;
8454
- }
8455
8598
  export type TemplateVersionDtoLifecycleStatus = typeof TemplateVersionDtoLifecycleStatus[keyof typeof TemplateVersionDtoLifecycleStatus];
8456
8599
  export declare const TemplateVersionDtoLifecycleStatus: {
8457
8600
  readonly draft: "draft";
@@ -8491,6 +8634,12 @@ export interface TemplateVersionDto {
8491
8634
  /** @nullable */
8492
8635
  replyTo: string | null;
8493
8636
  }
8637
+ export interface CreateTemplateVersionDto {
8638
+ /** Start from this version's content. Cloning an ARCHIVED version is the rollback-with-edits path; the archived row itself is never mutated. */
8639
+ cloneFromVersionId?: string;
8640
+ /** The contract version to author against. Defaults to the cloned version's, else the event's active version. */
8641
+ eventVersion?: number;
8642
+ }
8494
8643
  /**
8495
8644
  * Sample payload for preview and test-send — contract-validated against eventVersion.
8496
8645
  */
@@ -9862,6 +10011,10 @@ export type CheckoutControllerAvailableServicesV1Params = {
9862
10011
  * ISO 3166-1 alpha-2; defaults to the tenant's country
9863
10012
  */
9864
10013
  countryCode?: string;
10014
+ /**
10015
+ * Staff-only: scope the result to this customer's visibility grants instead of the caller's. Ignored when it equals the caller's own organization; 403 for a non-staff caller naming any other organization.
10016
+ */
10017
+ organizationId?: string;
9865
10018
  };
9866
10019
  export type CheckoutControllerAvailableSlotsV1Params = {
9867
10020
  /**
@@ -9880,6 +10033,10 @@ export type CheckoutControllerAvailableSlotsV1Params = {
9880
10033
  * 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.
9881
10034
  */
9882
10035
  serviceZoneId?: string;
10036
+ /**
10037
+ * Staff-only: scope the result to this customer's visibility grants instead of the caller's. Ignored when it equals the caller's own organization; 403 for a non-staff caller naming any other organization.
10038
+ */
10039
+ organizationId?: string;
9883
10040
  };
9884
10041
  export type TransportServicesControllerListV1Params = {
9885
10042
  /**
@@ -10237,9 +10394,9 @@ export type PodsControllerGetPickStateV1Params = {
10237
10394
  };
10238
10395
  export type PositionsControllerListV1Params = {
10239
10396
  /**
10240
- * Max rows to return (1–100).
10397
+ * Max rows to return (1–500).
10241
10398
  * @minimum 1
10242
- * @maximum 100
10399
+ * @maximum 500
10243
10400
  */
10244
10401
  limit?: number;
10245
10402
  /**
@@ -10262,9 +10419,9 @@ export type PositionsControllerListV1Params = {
10262
10419
  };
10263
10420
  export type ContainersControllerListV1Params = {
10264
10421
  /**
10265
- * Max rows to return (1–100).
10422
+ * Max rows to return (1–500).
10266
10423
  * @minimum 1
10267
- * @maximum 100
10424
+ * @maximum 500
10268
10425
  */
10269
10426
  limit?: number;
10270
10427
  /**
@@ -10283,6 +10440,7 @@ export type ContainersControllerListV1Params = {
10283
10440
  /**
10284
10441
  * Exact per-tenant label-number lookup.
10285
10442
  * @minimum 1
10443
+ * @maximum 9007199254740991
10286
10444
  */
10287
10445
  labelNumber?: number;
10288
10446
  };