@vindentech/api-client 0.3.0-next.31 → 0.3.0-next.34

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 (44) hide show
  1. package/dist/generated/_all.d.ts +2 -0
  2. package/dist/generated/_all.d.ts.map +1 -1
  3. package/dist/generated/_all.js +2 -0
  4. package/dist/generated/_all.js.map +1 -1
  5. package/dist/generated/_permissions.d.ts +53 -1
  6. package/dist/generated/_permissions.d.ts.map +1 -1
  7. package/dist/generated/_permissions.js +13 -0
  8. package/dist/generated/_permissions.js.map +1 -1
  9. package/dist/generated/index.schemas.d.ts +294 -2
  10. package/dist/generated/index.schemas.d.ts.map +1 -1
  11. package/dist/generated/index.schemas.js +17 -0
  12. package/dist/generated/index.schemas.js.map +1 -1
  13. package/dist/generated/invoice-details/invoice-details.d.ts +5 -1
  14. package/dist/generated/invoice-details/invoice-details.d.ts.map +1 -1
  15. package/dist/generated/invoice-details/invoice-details.js.map +1 -1
  16. package/dist/generated/merchandise/merchandise.d.ts +65 -1
  17. package/dist/generated/merchandise/merchandise.d.ts.map +1 -1
  18. package/dist/generated/merchandise/merchandise.js +32 -0
  19. package/dist/generated/merchandise/merchandise.js.map +1 -1
  20. package/dist/generated/merchandise-checkout/merchandise-checkout.d.ts +15 -1
  21. package/dist/generated/merchandise-checkout/merchandise-checkout.d.ts.map +1 -1
  22. package/dist/generated/merchandise-checkout/merchandise-checkout.js +12 -0
  23. package/dist/generated/merchandise-checkout/merchandise-checkout.js.map +1 -1
  24. package/dist/generated/merchandise-estimate-rules/merchandise-estimate-rules.d.ts +83 -0
  25. package/dist/generated/merchandise-estimate-rules/merchandise-estimate-rules.d.ts.map +1 -0
  26. package/dist/generated/merchandise-estimate-rules/merchandise-estimate-rules.js +51 -0
  27. package/dist/generated/merchandise-estimate-rules/merchandise-estimate-rules.js.map +1 -0
  28. package/dist/generated/orders/orders.d.ts +16 -2
  29. package/dist/generated/orders/orders.d.ts.map +1 -1
  30. package/dist/generated/orders/orders.js +12 -0
  31. package/dist/generated/orders/orders.js.map +1 -1
  32. package/dist/generated/payment-instruments/payment-instruments.d.ts +25 -0
  33. package/dist/generated/payment-instruments/payment-instruments.d.ts.map +1 -1
  34. package/dist/generated/payment-instruments/payment-instruments.js +9 -0
  35. package/dist/generated/payment-instruments/payment-instruments.js.map +1 -1
  36. package/dist/generated/tenant-maintenance/tenant-maintenance.d.ts +37 -0
  37. package/dist/generated/tenant-maintenance/tenant-maintenance.d.ts.map +1 -0
  38. package/dist/generated/tenant-maintenance/tenant-maintenance.js +24 -0
  39. package/dist/generated/tenant-maintenance/tenant-maintenance.js.map +1 -0
  40. package/dist/generated/warehouse-orders/warehouse-orders.d.ts +15 -1
  41. package/dist/generated/warehouse-orders/warehouse-orders.d.ts.map +1 -1
  42. package/dist/generated/warehouse-orders/warehouse-orders.js +10 -0
  43. package/dist/generated/warehouse-orders/warehouse-orders.js.map +1 -1
  44. package/package.json +1 -1
@@ -330,6 +330,16 @@ export interface OrderDetailDto {
330
330
  cancelledAt: string | null;
331
331
  /** @nullable */
332
332
  cancellationReason: string | null;
333
+ /**
334
+ * Whether the order is excluded from automatic billing (staff-only — null when the caller cannot see it, e.g. an org/warehouse/carrier caller).
335
+ * @nullable
336
+ */
337
+ manualBilling?: boolean | null;
338
+ /**
339
+ * Why the order is excluded from automatic billing (staff-only — null when the caller cannot see it, or when the order isn't flagged).
340
+ * @nullable
341
+ */
342
+ manualBillingComment?: string | null;
333
343
  /** @nullable */
334
344
  warehouse: OrderDetailDtoWarehouse;
335
345
  /** @nullable */
@@ -444,7 +454,7 @@ export interface EditOrderAddressDto {
444
454
  export interface RescheduleOrderDto {
445
455
  /** The cart_component_key of the leg to re-plan (e.g. move:pickup, move:delivery). */
446
456
  componentKey: string;
447
- /** The new transport_slot to book. */
457
+ /** The new transport_slot to book. Releasing the old slot's capacity and consuming the new slot's happens atomically, in the same transaction as the rest of this edit — nothing changes if the new slot can't be booked. A destination slot with no room left fails the whole edit with 422 capacity_unavailable (not a 409); overbooking past a slot's cap is not possible. */
448
458
  timeslotId: string;
449
459
  /** Overrides the derived transport date; defaults to the new slot's date. */
450
460
  preferredDate?: string;
@@ -462,6 +472,7 @@ export interface EditOrderDto {
462
472
  couponCode?: string | null;
463
473
  /** 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). */
464
474
  rutDeduction?: boolean;
475
+ /** Re-plan the named leg onto a new slot. See RescheduleOrderDto.timeslotId for the release/consume atomicity and full-slot error contract. */
465
476
  reschedule?: RescheduleOrderDto;
466
477
  }
467
478
  export interface AssignOrderWarehouseDto {
@@ -494,6 +505,15 @@ export interface EditOrderItemsDto {
494
505
  /** Full desired set of product lines. Omit a stored line to remove it; an empty array removes all removable lines. */
495
506
  items: OrderItemInput[];
496
507
  }
508
+ export interface SetManualBillingDto {
509
+ /** Whether the order is excluded from automatic billing. */
510
+ manualBilling: boolean;
511
+ /**
512
+ * Why the order is excluded from automatic billing. Required when manualBilling is true.
513
+ * @maxLength 2000
514
+ */
515
+ comment?: string;
516
+ }
497
517
  export interface EstimateItemInputDto {
498
518
  /** What the customer calls the goods (free text). */
499
519
  reference: string;
@@ -757,6 +777,10 @@ export interface CancelOrderResultDto {
757
777
  cancellationReason?: string;
758
778
  /** Capacity reservations released by this cancel (may be empty). */
759
779
  releasedReservationIds: string[];
780
+ /** Other orders this cancel also cancelled, by cascade — a dependent job whose relationship type declares cancel_with_parent (today: the MERCHANDISE_SALE job of a checkout that carried a basket). Empty for an order with no such dependents. Present for the same reason as releasedReservationIds: the caller asked to cancel one order and has no other way to learn that a second one went with it. */
781
+ cascadeCancelledSalesOrderIds: string[];
782
+ /** This order's own transport legs cancelled by this call, plus any from a cancel_with_parent child (e.g. a separately-ordered material:delivery leg). Excludes a leg already COMPLETED/CANCELLED/FAILED. Empty for an order with no live legs. */
783
+ cancelledLegIds: string[];
760
784
  }
761
785
  export interface OrderGroupDto {
762
786
  orderGroupId: string;
@@ -2589,6 +2613,14 @@ export interface CartServiceInputDto {
2589
2613
  /** @nullable */
2590
2614
  metadata?: CartServiceInputDtoMetadata;
2591
2615
  }
2616
+ /**
2617
+ * Where the line came from: CUSTOMER picked it out of the catalogue, ESTIMATOR means it came from a suggested basket the customer accepted or edited. PROVENANCE ONLY — analytics, not a fact. A client can claim either value, so it must never feed price or permission. Omitted on a resubmission leaves the stored value alone.
2618
+ */
2619
+ export type CartMerchandiseInputDtoSource = typeof CartMerchandiseInputDtoSource[keyof typeof CartMerchandiseInputDtoSource];
2620
+ export declare const CartMerchandiseInputDtoSource: {
2621
+ readonly CUSTOMER: "CUSTOMER";
2622
+ readonly ESTIMATOR: "ESTIMATOR";
2623
+ };
2592
2624
  export interface CartMerchandiseInputDto {
2593
2625
  /** A SKU from GET /v1/checkout/available-merchandise. */
2594
2626
  tenantGoodsId: string;
@@ -2598,6 +2630,8 @@ export interface CartMerchandiseInputDto {
2598
2630
  * @maximum 1000
2599
2631
  */
2600
2632
  quantity: number;
2633
+ /** Where the line came from: CUSTOMER picked it out of the catalogue, ESTIMATOR means it came from a suggested basket the customer accepted or edited. PROVENANCE ONLY — analytics, not a fact. A client can claim either value, so it must never feed price or permission. Omitted on a resubmission leaves the stored value alone. */
2634
+ source?: CartMerchandiseInputDtoSource;
2601
2635
  }
2602
2636
  export type UpdateCartDtoCustomerType = typeof UpdateCartDtoCustomerType[keyof typeof UpdateCartDtoCustomerType];
2603
2637
  export declare const UpdateCartDtoCustomerType: {
@@ -2779,7 +2813,7 @@ export interface TransportSlotDto {
2779
2813
  /** @nullable */
2780
2814
  expressSurchargeExVat: string | null;
2781
2815
  /**
2782
- * Orders still bookable in this slot; null = unlimited
2816
+ * Orders still bookable in this slot; null = unlimited. Computed live from confirmed and unexpired held reservations, so it's a point-in-time figure, not a hold — a booking or reschedule re-checks capacity when it runs, not against a previously-read value.
2783
2817
  * @nullable
2784
2818
  */
2785
2819
  remainingOrders: number | null;
@@ -4212,6 +4246,11 @@ export interface TransportLegDto {
4212
4246
  /** @nullable */
4213
4247
  carrierBooking?: TransportLegDtoCarrierBooking;
4214
4248
  shipmentUnits?: TransportLegShipmentUnitDto[];
4249
+ /**
4250
+ * The route this leg is currently a live stop on, or null if unrouted (within the caller's own route-scope visibility — a warehouse/carrier-scoped caller may see null for a leg routed outside their scope). Populated on list/detail reads.
4251
+ * @nullable
4252
+ */
4253
+ routeId?: string | null;
4215
4254
  }
4216
4255
  export interface PaginatedTransportLegsDto {
4217
4256
  /** The page of rows. */
@@ -5426,6 +5465,23 @@ export interface DisposalRequestResultDto {
5426
5465
  /** True when this response replays a previous run of the key. */
5427
5466
  idempotent: boolean;
5428
5467
  }
5468
+ export interface DisposalHandlingFeeDto {
5469
+ /**
5470
+ * Fee amount ex-VAT, integer minor units (e.g. öre/cents). Null when not yet priced for this tenant.
5471
+ * @nullable
5472
+ */
5473
+ amountExVatMinor: number | null;
5474
+ /**
5475
+ * VAT rate as a percentage (25 = 25%). Null when not yet priced for this tenant.
5476
+ * @nullable
5477
+ */
5478
+ vatRate: number | null;
5479
+ /**
5480
+ * ISO 4217. Null when not yet priced for this tenant.
5481
+ * @nullable
5482
+ */
5483
+ currencyCode: string | null;
5484
+ }
5429
5485
  export interface CancelDisposalRequestDto {
5430
5486
  /**
5431
5487
  * Why the request is being withdrawn.
@@ -10150,6 +10206,62 @@ export interface UpdateTenantGoodsDto {
10150
10206
  /** Recorded on the pricing rule when the price changes. */
10151
10207
  changeReason?: string;
10152
10208
  }
10209
+ /**
10210
+ * Free-text note (e.g. a delivery note id).
10211
+ * @nullable
10212
+ */
10213
+ export type ReceiveStockDtoReason = {
10214
+ [key: string]: unknown;
10215
+ } | null;
10216
+ export interface ReceiveStockDto {
10217
+ /** Warehouse the stock arrived at. Must be one the caller is assigned to. */
10218
+ warehouseId: string;
10219
+ /**
10220
+ * Units received. Unsigned — a receive can only add.
10221
+ * @minimum 1
10222
+ * @maximum 1000000
10223
+ */
10224
+ quantity: number;
10225
+ /**
10226
+ * Free-text note (e.g. a delivery note id).
10227
+ * @nullable
10228
+ */
10229
+ reason?: ReceiveStockDtoReason;
10230
+ }
10231
+ export type StockMovementResultDtoMovementType = typeof StockMovementResultDtoMovementType[keyof typeof StockMovementResultDtoMovementType];
10232
+ export declare const StockMovementResultDtoMovementType: {
10233
+ readonly RECEIVE: "RECEIVE";
10234
+ readonly SELL: "SELL";
10235
+ readonly ADJUST: "ADJUST";
10236
+ };
10237
+ export interface StockMovementResultDto {
10238
+ tenantGoodsStockMovementId: string;
10239
+ warehouseId: string;
10240
+ movementType: StockMovementResultDtoMovementType;
10241
+ /** Signed delta as recorded on the ledger. */
10242
+ quantityDelta: number;
10243
+ /** The warehouse's level after this movement. May be negative — see the adjust delta description. */
10244
+ quantityAfter: number;
10245
+ /** True when this call replayed a prior result for the same Idempotency-Key. */
10246
+ idempotent: boolean;
10247
+ }
10248
+ export interface AdjustStockDto {
10249
+ warehouseId: string;
10250
+ /**
10251
+ * Signed correction. Negative is allowed and may take the level below zero — merchandise stock is bookkeeping that never gates checkout, so a negative level is a real state ops resolve with a further adjustment, not an error.
10252
+ * @minimum -1000000
10253
+ * @maximum 1000000
10254
+ */
10255
+ delta: number;
10256
+ /** Why the level changed. Required — a correction must explain itself. */
10257
+ reason: string;
10258
+ }
10259
+ export interface StockLevelDto {
10260
+ warehouseId: string;
10261
+ /** Σ of the ledger's movements for this SKU/warehouse. */
10262
+ quantity: number;
10263
+ updatedAt: string;
10264
+ }
10153
10265
  export interface CheckoutMerchandiseDto {
10154
10266
  /** Pass this as `tenantGoodsId` when basketing. */
10155
10267
  tenantGoodsId: string;
@@ -10168,6 +10280,130 @@ export interface CheckoutMerchandiseDto {
10168
10280
  /** @nullable */
10169
10281
  category?: string | null;
10170
10282
  }
10283
+ export interface MerchandiseEstimateItemDto {
10284
+ /**
10285
+ * A `public.category` id from GET /v1/categories — the taxonomy of the customer's BELONGINGS (what is being moved), not the tenant's merchandise grouping. A category no rule mentions simply contributes nothing.
10286
+ * @minimum 1
10287
+ * @maximum 2147483647
10288
+ */
10289
+ categoryId: number;
10290
+ /**
10291
+ * How many items of this kind the customer is moving.
10292
+ * @minimum 1
10293
+ * @maximum 999
10294
+ */
10295
+ quantity: number;
10296
+ }
10297
+ export interface MerchandiseEstimateRequestDto {
10298
+ /** One entry per kind of belongings, at most 100. The same category twice is folded into one entry with the summed quantity. */
10299
+ items: MerchandiseEstimateItemDto[];
10300
+ }
10301
+ export interface MerchandiseEstimateLineDto {
10302
+ /** Pass this as `tenantGoodsId` when basketing. */
10303
+ tenantGoodsId: string;
10304
+ /** Tenant-unique SKU code, e.g. BOX-L. */
10305
+ code: string;
10306
+ name: string;
10307
+ /** @nullable */
10308
+ description?: string | null;
10309
+ /**
10310
+ * Display price ex VAT (numeric column → string).
10311
+ * @nullable
10312
+ */
10313
+ retailPriceExVat?: string | null;
10314
+ /** @nullable */
10315
+ currencyCode?: string | null;
10316
+ /** @nullable */
10317
+ category?: string | null;
10318
+ /**
10319
+ * Suggested units of this SKU, always at least 1. Editable — the customer may change or remove it before the basket is saved.
10320
+ * @minimum 1
10321
+ */
10322
+ suggestedQuantity: number;
10323
+ }
10324
+ export interface MerchandiseEstimateRuleDto {
10325
+ tenantGoodsEstimateRuleId: string;
10326
+ /** `public.category` id — the customer's belongings. */
10327
+ sourceCategoryId: number;
10328
+ /** The merchandise SKU the rule suggests. */
10329
+ tenantGoodsId: string;
10330
+ /** Units of the SKU per item of the source category (numeric → string). */
10331
+ quantityPerUnit: string;
10332
+ /** Once-per-category baseline, added on top of the per-unit term. */
10333
+ flatQuantity: number;
10334
+ /** @nullable */
10335
+ minQuantity?: number | null;
10336
+ /** @nullable */
10337
+ maxQuantity?: number | null;
10338
+ createdAt: string;
10339
+ updatedAt: string;
10340
+ }
10341
+ export interface CreateMerchandiseEstimateRuleDto {
10342
+ /**
10343
+ * A `public.category` id — the kind of belongings that triggers the suggestion. Keyed on the shared taxonomy the apps already send as `categoryId`, not on the tenant's free-text merchandise grouping.
10344
+ * @minimum 1
10345
+ * @maximum 2147483647
10346
+ */
10347
+ sourceCategoryId: number;
10348
+ /** The merchandise SKU to suggest. */
10349
+ tenantGoodsId: string;
10350
+ /**
10351
+ * Units of the SKU per item of the source category, up to 4 decimals. Fractions are the ordinary case (half a roll of tape per sofa) — the rounding happens once, over the whole suggestion for the SKU.
10352
+ * @minimum 0
10353
+ * @maximum 999999.9999
10354
+ */
10355
+ quantityPerUnit: number;
10356
+ /**
10357
+ * Once-per-category baseline. Together with quantityPerUnit this expresses both shapes the tenant needs: `x boxes → x + y boxes` is perUnit 1 with flat y, and `a sofa → n rolls` is perUnit n with flat 0. Defaults to 0.
10358
+ * @minimum 0
10359
+ * @maximum 10000
10360
+ */
10361
+ flatQuantity?: number;
10362
+ /**
10363
+ * Never suggest fewer than this when the category is present at all. Applied AFTER the arithmetic, so it also lifts a suggestion that resolved to zero. Omit for no floor.
10364
+ * @minimum 0
10365
+ * @maximum 10000
10366
+ */
10367
+ minQuantity?: number;
10368
+ /**
10369
+ * Never suggest more than this. Omit for no cap. When several matched rules disagree the strictest wins — the highest floor and the lowest cap.
10370
+ * @minimum 0
10371
+ * @maximum 10000
10372
+ */
10373
+ maxQuantity?: number;
10374
+ }
10375
+ export interface UpdateMerchandiseEstimateRuleDto {
10376
+ /**
10377
+ * @minimum 1
10378
+ * @maximum 2147483647
10379
+ */
10380
+ sourceCategoryId?: number;
10381
+ tenantGoodsId?: string;
10382
+ /**
10383
+ * @minimum 0
10384
+ * @maximum 999999.9999
10385
+ */
10386
+ quantityPerUnit?: number;
10387
+ /**
10388
+ * @minimum 0
10389
+ * @maximum 10000
10390
+ */
10391
+ flatQuantity?: number;
10392
+ /**
10393
+ * Send null to remove the floor.
10394
+ * @minimum 0
10395
+ * @maximum 10000
10396
+ * @nullable
10397
+ */
10398
+ minQuantity?: number | null;
10399
+ /**
10400
+ * Send null to remove the cap.
10401
+ * @minimum 0
10402
+ * @maximum 10000
10403
+ * @nullable
10404
+ */
10405
+ maxQuantity?: number | null;
10406
+ }
10171
10407
  export interface ClientConfigKeycloakDto {
10172
10408
  /** Base URL of the Keycloak deployment serving this tenant. */
10173
10409
  url: string;
@@ -10195,6 +10431,15 @@ export interface ClientVersionDto {
10195
10431
  /** When true the app must block until the user upgrades. */
10196
10432
  forceUpgrade: boolean;
10197
10433
  }
10434
+ export interface ClientConfigMaintenanceDto {
10435
+ /** Whether this client is currently in maintenance mode. */
10436
+ enabled: boolean;
10437
+ /**
10438
+ * Operator message shown while in maintenance. Null when unset. This route is @Public() — world-readable, never an internal note.
10439
+ * @nullable
10440
+ */
10441
+ message: string | null;
10442
+ }
10198
10443
  /**
10199
10444
  * The client this document was resolved for.
10200
10445
  */
@@ -10220,6 +10465,40 @@ export interface ClientConfigDto {
10220
10465
  * @nullable
10221
10466
  */
10222
10467
  clientVersion: ClientConfigDtoClientVersion;
10468
+ /**
10469
+ * Stripe publishable key for this tenant's account. Null when not configured.
10470
+ * @nullable
10471
+ */
10472
+ stripePublishableKey: string | null;
10473
+ /** This client's maintenance state. */
10474
+ maintenance: ClientConfigMaintenanceDto;
10475
+ }
10476
+ export type TenantMaintenanceDtoClient = typeof TenantMaintenanceDtoClient[keyof typeof TenantMaintenanceDtoClient];
10477
+ export declare const TenantMaintenanceDtoClient: {
10478
+ readonly customer_web: "customer_web";
10479
+ readonly customer_app: "customer_app";
10480
+ readonly admin_web: "admin_web";
10481
+ };
10482
+ export interface TenantMaintenanceDto {
10483
+ client: TenantMaintenanceDtoClient;
10484
+ /** Whether this client is currently in maintenance mode. */
10485
+ enabled: boolean;
10486
+ /**
10487
+ * Operator message shown to the client while in maintenance. Null when unset. Rendered on the public GET /v1/config bootstrap — world-readable, not an internal note.
10488
+ * @nullable
10489
+ */
10490
+ message: string | null;
10491
+ }
10492
+ export interface SetTenantMaintenanceModeDto {
10493
+ /** Put this client into (true) or out of (false) maintenance mode. */
10494
+ enabled: boolean;
10495
+ /**
10496
+ * Operator message shown to the client while in maintenance. Served on the public, unauthenticated GET /v1/config — do not put anything here a customer should not read.
10497
+ * @nullable
10498
+ */
10499
+ message?: string | null;
10500
+ /** Why this client is moving into or out of maintenance. Recorded in the admin action. */
10501
+ reason: string;
10223
10502
  }
10224
10503
  export type OrdersControllerListV1Params = {
10225
10504
  /**
@@ -11649,6 +11928,19 @@ export type MerchandiseCheckoutControllerAvailableMerchandiseV1Params = {
11649
11928
  */
11650
11929
  offset?: number;
11651
11930
  };
11931
+ export type MerchandiseEstimateRulesControllerListV1Params = {
11932
+ /**
11933
+ * Max rows to return (1–100).
11934
+ * @minimum 1
11935
+ * @maximum 100
11936
+ */
11937
+ limit?: number;
11938
+ /**
11939
+ * Rows to skip.
11940
+ * @minimum 0
11941
+ */
11942
+ offset?: number;
11943
+ };
11652
11944
  export type ClientConfigControllerGetV1Params = {
11653
11945
  /**
11654
11946
  * Which client is bootstrapping. Selects the Keycloak client id and version policy.