@hantera/portal-app 20260428.0.0-develop.1 → 20260617.0.0-develop.1

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 (2) hide show
  1. package/dist/index.d.ts +310 -97
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -11,10 +11,12 @@ import { DataColumnValuesEnumSet } from '@hantera/design-system';
11
11
  import { DataColumnValuesEnumValue } from '@hantera/design-system';
12
12
  import { DataProvider } from '@hantera/design-system';
13
13
  import { DataRow } from '@hantera/design-system';
14
+ import { DateOnly } from '@hantera/design-system';
14
15
  import Decimal from 'decimal.js';
15
16
  import { DeepReadonly } from 'vue';
16
17
  import { default as default_2 } from 'decimal.js';
17
18
  import { DefineComponent } from 'vue';
19
+ import { IconName } from '@hantera/design-system';
18
20
  import { InjectionKey } from 'vue';
19
21
  import { LabelTagDefinition } from '@hantera/design-system';
20
22
  import { PublicProps } from 'vue';
@@ -92,6 +94,8 @@ declare interface AddActivityLogCommand {
92
94
  messageTemplate: string;
93
95
  /** Dynamic properties to add to the log */
94
96
  dynamic?: Record<string, any>;
97
+ /** Override createdAt to align with external events. If not specified, time will be based on server time. */
98
+ createdAt?: any;
95
99
  }
96
100
 
97
101
  /**
@@ -105,6 +109,8 @@ declare interface AddActivityLogCommand_2 {
105
109
  messageTemplate: string;
106
110
  /** Dynamic properties to add to the log */
107
111
  dynamic?: Record<string, any>;
112
+ /** Override createdAt to align with external events. If not specified, time will be based on server time. */
113
+ createdAt?: any;
108
114
  }
109
115
 
110
116
  /**
@@ -118,6 +124,8 @@ declare interface AddActivityLogCommand_3 {
118
124
  messageTemplate: string;
119
125
  /** Dynamic properties to add to the log */
120
126
  dynamic?: Record<string, any>;
127
+ /** Override createdAt to align with external events. If not specified, time will be based on server time. */
128
+ createdAt?: any;
121
129
  }
122
130
 
123
131
  /**
@@ -131,6 +139,8 @@ declare interface AddActivityLogCommand_4 {
131
139
  messageTemplate: string;
132
140
  /** Dynamic properties to add to the log */
133
141
  dynamic?: Record<string, any>;
142
+ /** Override createdAt to align with external events. If not specified, time will be based on server time. */
143
+ createdAt?: any;
134
144
  }
135
145
 
136
146
  /**
@@ -267,11 +277,12 @@ export declare namespace Asset {
267
277
  GenerateAssetNumberByPrefixCommand,
268
278
  RemoveTagCommand_4 as RemoveTagCommand,
269
279
  SetDynamicFieldsCommand_4 as SetDynamicFieldsCommand,
270
- SetItemDynamicFieldsCommand_2 as SetItemDynamicFieldsCommand
280
+ SetItemDynamicFieldsCommand_2 as SetItemDynamicFieldsCommand,
281
+ SetTagsCommand_4 as SetTagsCommand
271
282
  }
272
283
  }
273
284
 
274
- declare type AssetCommand = AddActivityLogCommand_4 | AddTagCommand_4 | CreateItemCommand_2 | CreateItemRelationCommand_2 | CreateRelationCommand_2 | DeleteItemCommand_2 | DeleteItemRelationCommand_2 | DeleteRelationCommand_2 | GenerateAssetNumberByPrefixCommand | RemoveTagCommand_4 | SetDynamicFieldsCommand_4 | SetItemDynamicFieldsCommand_2;
285
+ declare type AssetCommand = AddActivityLogCommand_4 | AddTagCommand_4 | CreateItemCommand_2 | CreateItemRelationCommand_2 | CreateRelationCommand_2 | DeleteItemCommand_2 | DeleteItemRelationCommand_2 | DeleteRelationCommand_2 | GenerateAssetNumberByPrefixCommand | RemoveTagCommand_4 | SetDynamicFieldsCommand_4 | SetItemDynamicFieldsCommand_2 | SetTagsCommand_4;
275
286
 
276
287
  export declare const Authorize: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
277
288
 
@@ -374,15 +385,15 @@ declare interface BackOrder_2 {
374
385
 
375
386
  declare interface CalculatedDiscount {
376
387
  calculatedDiscountId: string;
377
- discountId?: string;
378
- promotionId?: string;
388
+ referenceType: 'staticDiscount' | 'promotion';
389
+ referenceId: string;
379
390
  value: default_2;
380
391
  }
381
392
 
382
393
  declare interface CalculatedDiscount_2 {
383
394
  calculatedDiscountId: string
384
- discountId?: string
385
- promotionId?: string
395
+ referenceType: 'staticDiscount' | 'promotion'
396
+ referenceId: string
386
397
  value: Decimal
387
398
  }
388
399
 
@@ -526,44 +537,6 @@ declare interface CreateAuthorizationCommand {
526
537
  authorizationState?: 'pending' | 'successful' | 'failed';
527
538
  }
528
539
 
529
- /**
530
- * Adds a new computed Order Discount to an Order using an embedded source code for the logic
531
- *
532
- * @see {@link https://developer.hantera.io/reference/actors/order/commands/create-computed-order-discount-by-source/|Hantera Developer Portal}
533
- */
534
- declare interface CreateComputedOrderDiscountBySourceCommand {
535
- type: 'createComputedOrderDiscountBySource';
536
- /** Optional Id. Must be unique. */
537
- discountId?: string;
538
- /** The source code for the discount logic */
539
- source: string;
540
- /** Additional parameters to pass to the discount logic, values must be in filtrera format */
541
- parameters?: Record<string, string>;
542
- /** Dynamic fields for metadata */
543
- dynamic?: Record<string, any>;
544
- /** Description/Name of discount. Should be meaningful to the customer as it's used on invoices and customer communication. */
545
- description?: string;
546
- }
547
-
548
- /**
549
- * Adds a new computed Order Discount to an Order based on a component
550
- *
551
- * @see {@link https://developer.hantera.io/reference/actors/order/commands/create-computed-order-discount/|Hantera Developer Portal}
552
- */
553
- declare interface CreateComputedOrderDiscountCommand {
554
- type: 'createComputedOrderDiscount';
555
- /** Optional Id. Must be unique. */
556
- discountId?: string;
557
- /** The component to use for the discount logic */
558
- componentId: string;
559
- /** Additional parameters to pass to the discount logic, values must be in filtrera format */
560
- parameters?: Record<string, string>;
561
- /** Dynamic fields for metadata */
562
- dynamic?: Record<string, any>;
563
- /** Description/Name of discount. Should be meaningful to the customer as it's used on invoices and customer communication. */
564
- description?: string;
565
- }
566
-
567
540
  /**
568
541
  * Adds a new Delivery to an Order
569
542
  *
@@ -676,6 +649,40 @@ declare interface CreateOrderLineCommand {
676
649
  skus?: Record<string, Decimal | number>;
677
650
  }
678
651
 
652
+ /**
653
+ * Creates a promotion on an Order with inline Filtrera source
654
+ *
655
+ * @see {@link https://developer.hantera.io/reference/actors/order/commands/create-promotion-by-source/|Hantera Developer Portal}
656
+ */
657
+ declare interface CreatePromotionBySourceCommand {
658
+ type: 'createPromotionBySource';
659
+ promotionId?: string;
660
+ source: string;
661
+ parameters?: Record<string, any>;
662
+ dynamic?: Record<string, any>;
663
+ description?: string;
664
+ promotionGroup: string;
665
+ canOnlyCombineWith?: string[];
666
+ canNotCombineWith?: string[];
667
+ }
668
+
669
+ /**
670
+ * Creates a promotion on an Order based on a component
671
+ *
672
+ * @see {@link https://developer.hantera.io/reference/actors/order/commands/create-promotion/|Hantera Developer Portal}
673
+ */
674
+ declare interface CreatePromotionCommand {
675
+ type: 'createPromotion';
676
+ promotionId?: string;
677
+ componentId: string;
678
+ parameters?: Record<string, any>;
679
+ dynamic?: Record<string, any>;
680
+ description?: string;
681
+ promotionGroup: string;
682
+ canOnlyCombineWith?: string[];
683
+ canNotCombineWith?: string[];
684
+ }
685
+
679
686
  /**
680
687
  * Adds a new graph node relation to a Ticket
681
688
  *
@@ -805,7 +812,7 @@ declare interface Customer_2 {
805
812
  orders: Array<Order_2>;
806
813
  }
807
814
 
808
- declare function date(date: Date | string, format?: string): string;
815
+ declare function date(date: DateOnly | Date | string): string;
809
816
 
810
817
  declare function dateTime(date: Date | string): string;
811
818
 
@@ -823,6 +830,9 @@ declare const _default_2: {
823
830
  timeline: AppSlot<Record<string, any>>;
824
831
  };
825
832
  delivery: {
833
+ header: AppSlot< {
834
+ delivery: Delivery;
835
+ }>;
826
836
  footer: AppSlot< {
827
837
  delivery: Delivery;
828
838
  }>;
@@ -1008,6 +1018,16 @@ declare interface DeleteOrderLineCommand {
1008
1018
  orderLineId: string;
1009
1019
  }
1010
1020
 
1021
+ /**
1022
+ * Deletes a promotion from an Order
1023
+ *
1024
+ * @see {@link https://developer.hantera.io/reference/actors/order/commands/delete-promotion/|Hantera Developer Portal}
1025
+ */
1026
+ declare interface DeletePromotionCommand {
1027
+ type: 'deletePromotion';
1028
+ promotionId: string;
1029
+ }
1030
+
1011
1031
  /**
1012
1032
  * Removes a graph node relation from a Ticket
1013
1033
  *
@@ -1050,8 +1070,6 @@ declare interface Delivery {
1050
1070
  deliveryNumber: string;
1051
1071
  deliveryState: 'open' | 'processing' | 'completed' | 'cancelled' | 'cancelledByOrder';
1052
1072
  deliveryAddress: Address;
1053
- inventoryKey: string;
1054
- inventoryDate?: Date;
1055
1073
  shippingPrice: default_2;
1056
1074
  shippingTaxFactor: default_2;
1057
1075
  shippingTaxTotal: default_2;
@@ -1073,8 +1091,6 @@ declare interface Delivery_2 {
1073
1091
  deliveryNumber: string
1074
1092
  deliveryState: 'open' | 'processing' | 'completed' | 'cancelled' | 'cancelledByOrder'
1075
1093
  deliveryAddress: Address_2
1076
- inventoryKey: string
1077
- inventoryDate?: Date
1078
1094
  shippingPrice: Decimal
1079
1095
  shippingTaxFactor: Decimal
1080
1096
  shippingTaxTotal: Decimal
@@ -1092,6 +1108,8 @@ declare interface Delivery_2 {
1092
1108
  shippingDiscounts: Array<Discount_2>
1093
1109
  }
1094
1110
 
1111
+ export declare type Dialogs = ReturnType<typeof useDialogs>;
1112
+
1095
1113
  declare interface Discount {
1096
1114
  discountId: string;
1097
1115
  discountType: 'percentage' | 'absolute';
@@ -1236,6 +1254,7 @@ export declare namespace Graph {
1236
1254
  Delivery_2 as Delivery,
1237
1255
  Payment_2 as Payment,
1238
1256
  Address_2 as Address,
1257
+ InvoiceRecipient,
1239
1258
  ActivityLog,
1240
1259
  Checkpoint,
1241
1260
  Invoice,
@@ -1256,6 +1275,7 @@ export declare namespace Graph_2 {
1256
1275
  Delivery,
1257
1276
  Payment,
1258
1277
  Address,
1278
+ InvoiceRecipient_2 as InvoiceRecipient,
1259
1279
  ActivityLog_2 as ActivityLog,
1260
1280
  Checkpoint_2 as Checkpoint,
1261
1281
  Invoice_2 as Invoice,
@@ -1649,7 +1669,7 @@ declare interface Invoice {
1649
1669
  invoiceNumber: string
1650
1670
  invoiceTotal: Decimal
1651
1671
  createdAt: Date
1652
- invoiceAddress: Address_2
1672
+ invoiceRecipient: InvoiceRecipient
1653
1673
  invoiceLines: InvoiceLine[]
1654
1674
  invoiceNetTotal: Decimal
1655
1675
  invoiceTaxTotal: Decimal
@@ -1663,7 +1683,7 @@ declare interface Invoice_2 {
1663
1683
  invoiceNumber: string;
1664
1684
  invoiceTotal: default_2;
1665
1685
  createdAt: Date;
1666
- invoiceAddress: Address;
1686
+ invoiceRecipient: InvoiceRecipient_2;
1667
1687
  invoiceLines: InvoiceLine_2[];
1668
1688
  invoiceNetTotal: default_2;
1669
1689
  invoiceTaxTotal: default_2;
@@ -1726,6 +1746,18 @@ declare interface InvoiceLineDiscount_2 {
1726
1746
  description: string;
1727
1747
  }
1728
1748
 
1749
+ declare interface InvoiceRecipient extends Address_2 {
1750
+ taxId?: string
1751
+ taxIdType?: string
1752
+ taxCountryCode?: string
1753
+ }
1754
+
1755
+ declare interface InvoiceRecipient_2 extends Address {
1756
+ taxId?: string;
1757
+ taxIdType?: string;
1758
+ taxCountryCode?: string;
1759
+ }
1760
+
1729
1761
  declare interface JobCompletedData {
1730
1762
  jobId: string;
1731
1763
  jobDefinitionId: string;
@@ -2312,9 +2344,18 @@ declare interface LiveQueryResult<T = unknown> {
2312
2344
  loading: DeepReadonly<Ref<boolean>>;
2313
2345
  totalCount: DeepReadonly<Ref<number | null>>;
2314
2346
  capped: DeepReadonly<Ref<boolean>>;
2347
+ revision: DeepReadonly<Ref<number>>;
2315
2348
  dispose(): void;
2316
2349
  }
2317
2350
 
2351
+ declare function loadLocales(): Promise<LocaleInfo[]>;
2352
+
2353
+ declare interface LocaleInfo {
2354
+ key: string;
2355
+ label: string;
2356
+ language: string;
2357
+ }
2358
+
2318
2359
  declare interface LocalizedLabel {
2319
2360
  default: string
2320
2361
  [languageCode: string]: string
@@ -2419,7 +2460,7 @@ declare interface Order {
2419
2460
  currencyCode: string
2420
2461
  channelKey?: string
2421
2462
  customerNumber?: string
2422
- invoiceAddress: Address_2
2463
+ invoiceRecipient: InvoiceRecipient
2423
2464
  locale: string
2424
2465
  notes?: string
2425
2466
  orderTaxTotal: Decimal
@@ -2448,7 +2489,7 @@ declare interface Order_2 {
2448
2489
  currencyCode: string;
2449
2490
  channelKey?: string;
2450
2491
  customerNumber?: string;
2451
- invoiceAddress: Address;
2492
+ invoiceRecipient: InvoiceRecipient_2;
2452
2493
  locale: string;
2453
2494
  notes?: string;
2454
2495
  orderTaxTotal: default_2;
@@ -2478,16 +2519,17 @@ export declare namespace Order_3 {
2478
2519
  CancelDeliveryCommand,
2479
2520
  CancelInvoiceCommand,
2480
2521
  CompleteDeliveryCommand,
2481
- CreateComputedOrderDiscountBySourceCommand,
2482
- CreateComputedOrderDiscountCommand,
2483
2522
  CreateDeliveryCommand,
2484
2523
  CreateOrderLineCommand,
2524
+ CreatePromotionBySourceCommand,
2525
+ CreatePromotionCommand,
2485
2526
  CreateReturnCommand,
2486
2527
  CreateStaticOrderDiscountCommand,
2487
2528
  CreateStaticOrderLineDiscountCommand,
2488
2529
  CreateStaticShippingDiscountCommand,
2489
2530
  DeleteDiscountCommand,
2490
2531
  DeleteOrderLineCommand,
2532
+ DeletePromotionCommand,
2491
2533
  DeleteReturnCommand,
2492
2534
  GenerateOrderNumberByPrefixCommand,
2493
2535
  InvoiceCommand,
@@ -2502,14 +2544,14 @@ export declare namespace Order_3 {
2502
2544
  RetractOrderLineFromInvoicingCommand,
2503
2545
  RetractShippingFromInvoicingCommand,
2504
2546
  SetChannelKeyCommand,
2505
- SetComputedOrderDiscountParametersCommand,
2506
2547
  SetCustomerNumberCommand,
2507
2548
  SetDeliveryAddressCommand,
2508
2549
  SetDeliveryDynamicFieldsCommand,
2509
- SetDeliveryInventoryCommand,
2550
+ SetDeliveryTagsCommand,
2510
2551
  SetDiscountDescriptionCommand,
2511
2552
  SetDiscountDynamicFieldsCommand,
2512
2553
  SetInvoiceAddressCommand,
2554
+ SetInvoiceRecipientCommand,
2513
2555
  SetLocaleCommand,
2514
2556
  SetNotesCommand,
2515
2557
  SetOrderDynamicFieldsCommand,
@@ -2520,16 +2562,20 @@ export declare namespace Order_3 {
2520
2562
  SetOrderLineTaxCommand,
2521
2563
  SetOrderLineUnitPriceCommand,
2522
2564
  SetOrderStateCommand,
2565
+ SetPromotionDescriptionCommand,
2566
+ SetPromotionDynamicFieldsCommand,
2567
+ SetPromotionParametersCommand,
2523
2568
  SetReturnDynamicFieldsCommand,
2524
2569
  SetShippingPriceCommand,
2525
2570
  SetShippingProductCommand,
2526
2571
  SetShippingTaxCommand,
2527
2572
  SetStaticDiscountValueCommand,
2528
- UnsetDeliveryInventoryCommand
2573
+ SetTagsCommand,
2574
+ SplitOrderLineCommand
2529
2575
  }
2530
2576
  }
2531
2577
 
2532
- declare type OrderCommand = AddActivityLogCommand | AddDeliveryTagCommand | AddTagCommand | CancelDeliveryCommand | CancelInvoiceCommand | CompleteDeliveryCommand | CreateComputedOrderDiscountBySourceCommand | CreateComputedOrderDiscountCommand | CreateDeliveryCommand | CreateOrderLineCommand | CreateReturnCommand | CreateStaticOrderDiscountCommand | CreateStaticOrderLineDiscountCommand | CreateStaticShippingDiscountCommand | DeleteDiscountCommand | DeleteOrderLineCommand | DeleteReturnCommand | GenerateOrderNumberByPrefixCommand | InvoiceCommand | LinkPaymentCommand | MoveOrderLineToDeliveryCommand | OpenDeliveryCommand | ReleaseDeliveryCommand | ReleaseOrderLineToInvoicingCommand | ReleaseShippingToInvoicingCommand | RemoveDeliveryTagCommand | RemoveTagCommand | RetractOrderLineFromInvoicingCommand | RetractShippingFromInvoicingCommand | SetChannelKeyCommand | SetComputedOrderDiscountParametersCommand | SetCustomerNumberCommand | SetDeliveryAddressCommand | SetDeliveryDynamicFieldsCommand | SetDeliveryInventoryCommand | SetDiscountDescriptionCommand | SetDiscountDynamicFieldsCommand | SetInvoiceAddressCommand | SetLocaleCommand | SetNotesCommand | SetOrderDynamicFieldsCommand | SetOrderLineDynamicFieldsCommand | SetOrderLineProductCommand | SetOrderLineQuantityCommand | SetOrderLineSkusCommand | SetOrderLineTaxCommand | SetOrderLineUnitPriceCommand | SetOrderStateCommand | SetReturnDynamicFieldsCommand | SetShippingPriceCommand | SetShippingProductCommand | SetShippingTaxCommand | SetStaticDiscountValueCommand | UnsetDeliveryInventoryCommand;
2578
+ declare type OrderCommand = AddActivityLogCommand | AddDeliveryTagCommand | AddTagCommand | CancelDeliveryCommand | CancelInvoiceCommand | CompleteDeliveryCommand | CreateDeliveryCommand | CreateOrderLineCommand | CreatePromotionBySourceCommand | CreatePromotionCommand | CreateReturnCommand | CreateStaticOrderDiscountCommand | CreateStaticOrderLineDiscountCommand | CreateStaticShippingDiscountCommand | DeleteDiscountCommand | DeleteOrderLineCommand | DeletePromotionCommand | DeleteReturnCommand | GenerateOrderNumberByPrefixCommand | InvoiceCommand | LinkPaymentCommand | MoveOrderLineToDeliveryCommand | OpenDeliveryCommand | ReleaseDeliveryCommand | ReleaseOrderLineToInvoicingCommand | ReleaseShippingToInvoicingCommand | RemoveDeliveryTagCommand | RemoveTagCommand | RetractOrderLineFromInvoicingCommand | RetractShippingFromInvoicingCommand | SetChannelKeyCommand | SetCustomerNumberCommand | SetDeliveryAddressCommand | SetDeliveryDynamicFieldsCommand | SetDeliveryTagsCommand | SetDiscountDescriptionCommand | SetDiscountDynamicFieldsCommand | SetInvoiceAddressCommand | SetInvoiceRecipientCommand | SetLocaleCommand | SetNotesCommand | SetOrderDynamicFieldsCommand | SetOrderLineDynamicFieldsCommand | SetOrderLineProductCommand | SetOrderLineQuantityCommand | SetOrderLineSkusCommand | SetOrderLineTaxCommand | SetOrderLineUnitPriceCommand | SetOrderStateCommand | SetPromotionDescriptionCommand | SetPromotionDynamicFieldsCommand | SetPromotionParametersCommand | SetReturnDynamicFieldsCommand | SetShippingPriceCommand | SetShippingProductCommand | SetShippingTaxCommand | SetStaticDiscountValueCommand | SetTagsCommand | SplitOrderLineCommand;
2533
2579
 
2534
2580
  declare interface OrderJournalEntry {
2535
2581
  orderJournalEntryId: string
@@ -2635,10 +2681,42 @@ declare const orderView: {
2635
2681
  }[];
2636
2682
  }>;
2637
2683
  /**
2638
- * Allows services to contribute context menu items to delivery panels in the order view
2684
+ * Allows services to contribute context menu items to delivery and payment
2685
+ * panels in the order view. Implement only the methods relevant to the app.
2639
2686
  */
2640
2687
  contextMenuProvider: AppService< {
2641
- buildDeliveryContextMenu(context: PortalContext, orderViewContext: OrderViewContext, delivery: Models_2.Graph.Delivery): ContextMenuSection;
2688
+ buildDeliveryContextMenu?(context: PortalContext, orderViewContext: OrderViewContext, delivery: Models_2.Graph.Delivery): ContextMenuSection;
2689
+ buildPaymentContextMenu?(context: PortalContext, orderViewContext: OrderViewContext, payment: Models_2.Graph.Payment): ContextMenuSection;
2690
+ }>;
2691
+ /**
2692
+ * Allows services to react to events occurring in the standard order view,
2693
+ * such as the order being saved.
2694
+ */
2695
+ eventsProvider: AppService< {
2696
+ /**
2697
+ * Called after the order has been successfully saved (commands applied and
2698
+ * order state refreshed). `appliedCommands` are the commands that were
2699
+ * committed in this save.
2700
+ */
2701
+ onOrderSaved?(event: {
2702
+ context: PortalContext;
2703
+ orderViewContext: OrderViewContext;
2704
+ order: Models_2.Graph.Order;
2705
+ appliedCommands: OrderCommand[];
2706
+ }): Promise<void>;
2707
+ }>;
2708
+ /**
2709
+ * Allows services to contribute options to the "New payment" dropdown in the
2710
+ * payments tab of the order view.
2711
+ */
2712
+ paymentActionsProvider: AppService< {
2713
+ buildNewPaymentOptions(context: PortalContext, orderViewContext: OrderViewContext): {
2714
+ id: string;
2715
+ label: string | ComputedRef<string>;
2716
+ icon?: IconName;
2717
+ disabled?: boolean;
2718
+ onClick: () => void;
2719
+ }[];
2642
2720
  }>;
2643
2721
  };
2644
2722
 
@@ -2670,12 +2748,24 @@ declare interface OrderViewContext {
2670
2748
  redo(): boolean;
2671
2749
  /**
2672
2750
  * Saves pending changes. Automatically refreshes the order state.
2751
+ * Resolves with the list of commands that were committed in this save
2752
+ * (empty if there was nothing to save).
2673
2753
  */
2674
- save(): Promise<void>;
2754
+ save(): Promise<OrderCommand[]>;
2675
2755
  /**
2676
2756
  * Refreshes the order state with the server. If there are pending changes, they will be previewed.
2677
2757
  */
2678
2758
  refresh(): Promise<void>;
2759
+ /**
2760
+ * Subscribes to live updates of the order. When there are no pending changes or active timetravel,
2761
+ * incoming updates are bound directly to the state. Otherwise, updates trigger a preview refresh.
2762
+ * Requires the order state to be loaded first (call refresh before this).
2763
+ */
2764
+ startLiveUpdates(): void;
2765
+ /**
2766
+ * Disposes live update subscriptions and pending timers. Call when the view is torn down.
2767
+ */
2768
+ dispose(): void;
2679
2769
  /**
2680
2770
  * Adds a pending changeset to the current instance. Call refresh to update preview.
2681
2771
  *
@@ -2711,6 +2801,7 @@ declare interface Payment {
2711
2801
  paymentId: string;
2712
2802
  paymentNumber: string;
2713
2803
  externalReference?: string;
2804
+ channelKey?: string;
2714
2805
  authorizedAmount: default_2;
2715
2806
  providerKey: string;
2716
2807
  tags: Array<string>;
@@ -2727,8 +2818,10 @@ declare interface Payment_2 {
2727
2818
  paymentId: string
2728
2819
  paymentNumber: string
2729
2820
  externalReference?: string
2821
+ channelKey?: string
2730
2822
  authorizedAmount: Decimal
2731
2823
  providerKey: string
2824
+
2732
2825
  tags: Array<string>
2733
2826
  capturedBalance: Decimal
2734
2827
  creditBalance: Decimal
@@ -2750,7 +2843,8 @@ export declare namespace Payment_3 {
2750
2843
  RemoveTagCommand_2 as RemoveTagCommand,
2751
2844
  SetAuthorizationAmountCommand,
2752
2845
  SetAuthorizationStateCommand,
2753
- SetDynamicFieldsCommand
2846
+ SetDynamicFieldsCommand,
2847
+ SetTagsCommand_2 as SetTagsCommand
2754
2848
  }
2755
2849
  }
2756
2850
 
@@ -2786,7 +2880,7 @@ declare interface PaymentCapture_2 {
2786
2880
  }
2787
2881
  }
2788
2882
 
2789
- declare type PaymentCommand = AddActivityLogCommand_2 | AddTagCommand_2 | CreateAuthorizationCommand | GeneratePaymentNumberByPrefixCommand | RemoveTagCommand_2 | SetAuthorizationAmountCommand | SetAuthorizationStateCommand | SetDynamicFieldsCommand;
2883
+ declare type PaymentCommand = AddActivityLogCommand_2 | AddTagCommand_2 | CreateAuthorizationCommand | GeneratePaymentNumberByPrefixCommand | RemoveTagCommand_2 | SetAuthorizationAmountCommand | SetAuthorizationStateCommand | SetDynamicFieldsCommand | SetTagsCommand_2;
2790
2884
 
2791
2885
  declare interface PaymentJournalEntry {
2792
2886
  paymentJournalEntryId: string;
@@ -3062,7 +3156,7 @@ declare interface ReserveCommand {
3062
3156
  inventoryKey: string;
3063
3157
  /** The number of units to reserve. Must be greater than zero. */
3064
3158
  quantity: Decimal | number;
3065
- /** Optional date/time when the reserved stock should be available if the stock is not needed immediately. */
3159
+ /** Optional date when the reserved stock should be available if the stock is not needed immediately. */
3066
3160
  inventoryDate?: any;
3067
3161
  /** Optional list of allocations to use for the reservation. */
3068
3162
  stockAllocations?: string[];
@@ -3102,6 +3196,10 @@ declare interface SearchProduct {
3102
3196
  export declare interface ServiceContext {
3103
3197
  processes: Processes;
3104
3198
  backend: BackendApi;
3199
+ dialogs: Dialogs;
3200
+ localization: {
3201
+ resolveLabel: (label: string | Record<string, string> | null | undefined) => string;
3202
+ };
3105
3203
  }
3106
3204
 
3107
3205
  /**
@@ -3169,17 +3267,6 @@ declare interface SetChannelKeyCommand_2 {
3169
3267
  value: string;
3170
3268
  }
3171
3269
 
3172
- /**
3173
- * Sets a computed order discount's parameters
3174
- *
3175
- * @see {@link https://developer.hantera.io/reference/actors/order/commands/set-computed-order-discount-parameters/|Hantera Developer Portal}
3176
- */
3177
- declare interface SetComputedOrderDiscountParametersCommand {
3178
- type: 'setComputedOrderDiscountParameters';
3179
- discountId: string;
3180
- parameters: Record<string, string>;
3181
- }
3182
-
3183
3270
  /**
3184
3271
  * Sets the customer number of an order.
3185
3272
  *
@@ -3225,16 +3312,16 @@ declare interface SetDeliveryDynamicFieldsCommand {
3225
3312
  }
3226
3313
 
3227
3314
  /**
3228
- * Sets the inventory and inventory date of a Delivery. Stock reservations will be updated if there are any.
3315
+ * Replaces all tags on a Delivery
3229
3316
  *
3230
- * @see {@link https://developer.hantera.io/reference/actors/order/commands/set-delivery-inventory/|Hantera Developer Portal}
3317
+ * @see {@link https://developer.hantera.io/reference/actors/order/commands/set-delivery-tags/|Hantera Developer Portal}
3231
3318
  */
3232
- declare interface SetDeliveryInventoryCommand {
3233
- type: 'setDeliveryInventory';
3234
- /** The ID of the Delivery to set the inventory of */
3319
+ declare interface SetDeliveryTagsCommand {
3320
+ type: 'setDeliveryTags';
3321
+ /** The ID of the Delivery to set tags on */
3235
3322
  deliveryId: string;
3236
- inventoryKey: string;
3237
- inventoryDate: any;
3323
+ /** The tag keys */
3324
+ keys: string[];
3238
3325
  }
3239
3326
 
3240
3327
  /**
@@ -3310,7 +3397,7 @@ declare interface SetIncomingStockCommand {
3310
3397
  reference: string;
3311
3398
  /** The key of the inventory the incoming stock is expected at. */
3312
3399
  inventoryKey: string;
3313
- /** Date of when the incoming stock is expected to be available for outbound shipments. */
3400
+ /** Date when the incoming stock is expected to be available for outbound shipments. */
3314
3401
  expectedOn: any;
3315
3402
  /** The number of units expected */
3316
3403
  quantity: Decimal | number;
@@ -3319,6 +3406,7 @@ declare interface SetIncomingStockCommand {
3319
3406
  /**
3320
3407
  * Sets the invoice address of an Order which will be used for new invoices
3321
3408
  *
3409
+ * @deprecated Use SetInvoiceRecipient command instead
3322
3410
  * @see {@link https://developer.hantera.io/reference/actors/order/commands/set-invoice-address/|Hantera Developer Portal}
3323
3411
  */
3324
3412
  declare interface SetInvoiceAddressCommand {
@@ -3336,6 +3424,29 @@ declare interface SetInvoiceAddressCommand {
3336
3424
  phone?: string;
3337
3425
  }
3338
3426
 
3427
+ /**
3428
+ * Sets the invoice recipient of an Order which will be used for new invoices
3429
+ *
3430
+ * @see {@link https://developer.hantera.io/reference/actors/order/commands/set-invoice-recipient/|Hantera Developer Portal}
3431
+ */
3432
+ declare interface SetInvoiceRecipientCommand {
3433
+ type: 'setInvoiceRecipient';
3434
+ name?: string;
3435
+ careOf?: string;
3436
+ attention?: string;
3437
+ addressLine1?: string;
3438
+ addressLine2?: string;
3439
+ city?: string;
3440
+ state?: string;
3441
+ postalCode?: string;
3442
+ countryCode?: string;
3443
+ email?: string;
3444
+ phone?: string;
3445
+ taxId?: string;
3446
+ taxIdType?: string;
3447
+ taxCountryCode?: string;
3448
+ }
3449
+
3339
3450
  /**
3340
3451
  * Sets dynamic fields of a ticket item. Non specified fields will be left unchanged. Set value to null to remove field.
3341
3452
  *
@@ -3500,6 +3611,39 @@ declare interface SetPhysicalStockCommand {
3500
3611
  relative: boolean;
3501
3612
  }
3502
3613
 
3614
+ /**
3615
+ * Sets the description on a promotion
3616
+ *
3617
+ * @see {@link https://developer.hantera.io/reference/actors/order/commands/set-promotion-description/|Hantera Developer Portal}
3618
+ */
3619
+ declare interface SetPromotionDescriptionCommand {
3620
+ type: 'setPromotionDescription';
3621
+ promotionId: string;
3622
+ description?: string;
3623
+ }
3624
+
3625
+ /**
3626
+ * Sets dynamic fields on a promotion
3627
+ *
3628
+ * @see {@link https://developer.hantera.io/reference/actors/order/commands/set-promotion-dynamic-fields/|Hantera Developer Portal}
3629
+ */
3630
+ declare interface SetPromotionDynamicFieldsCommand {
3631
+ type: 'setPromotionDynamicFields';
3632
+ promotionId: string;
3633
+ fields: Record<string, any>;
3634
+ }
3635
+
3636
+ /**
3637
+ * Sets parameters on a promotion
3638
+ *
3639
+ * @see {@link https://developer.hantera.io/reference/actors/order/commands/set-promotion-parameters/|Hantera Developer Portal}
3640
+ */
3641
+ declare interface SetPromotionParametersCommand {
3642
+ type: 'setPromotionParameters';
3643
+ promotionId: string;
3644
+ parameters: Record<string, any>;
3645
+ }
3646
+
3503
3647
  /**
3504
3648
  * Sets dynamic fields of a return. Non specified fields will be left unchanged. Set value to null to remove field.
3505
3649
  *
@@ -3572,7 +3716,55 @@ declare interface SetStaticDiscountValueCommand {
3572
3716
  value: Decimal | number;
3573
3717
  }
3574
3718
 
3719
+ /**
3720
+ * Replaces all tags on an Order
3721
+ *
3722
+ * @see {@link https://developer.hantera.io/reference/actors/order/commands/set-tags/|Hantera Developer Portal}
3723
+ */
3724
+ declare interface SetTagsCommand {
3725
+ type: 'setTags';
3726
+ /** The tag keys */
3727
+ keys: string[];
3728
+ }
3729
+
3730
+ /**
3731
+ * Replaces all tags on a Payment
3732
+ *
3733
+ * @see {@link https://developer.hantera.io/reference/actors/payment/commands/set-tags/|Hantera Developer Portal}
3734
+ */
3735
+ declare interface SetTagsCommand_2 {
3736
+ type: 'setTags';
3737
+ /** The tag keys */
3738
+ keys: string[];
3739
+ }
3740
+
3741
+ /**
3742
+ * Replaces all tags on a Ticket
3743
+ *
3744
+ * @see {@link https://developer.hantera.io/reference/actors/ticket/commands/set-tags/|Hantera Developer Portal}
3745
+ */
3746
+ declare interface SetTagsCommand_3 {
3747
+ type: 'setTags';
3748
+ /** The tag keys */
3749
+ keys: string[];
3750
+ }
3751
+
3752
+ /**
3753
+ * Replaces all tags on an Asset
3754
+ *
3755
+ * @see {@link https://developer.hantera.io/reference/actors/asset/commands/set-tags/|Hantera Developer Portal}
3756
+ */
3757
+ declare interface SetTagsCommand_4 {
3758
+ type: 'setTags';
3759
+ /** The tag keys */
3760
+ keys: string[];
3761
+ }
3762
+
3575
3763
  declare interface ShippingProduct {
3764
+ /**
3765
+ * Optional unique internal ID, useful if multiple options share the same productNumber.
3766
+ */
3767
+ optionId?: string;
3576
3768
  productNumber: string;
3577
3769
  description: string;
3578
3770
  price: default_2;
@@ -3599,6 +3791,23 @@ export declare namespace Sku {
3599
3791
 
3600
3792
  declare type SkuCommand = ReserveCommand | SetAllocationCommand | SetDynamicFieldsCommand_2 | SetIncomingStockCommand | SetPhysicalStockCommand | UnreserveCommand;
3601
3793
 
3794
+ /**
3795
+ * Splits an existing order line into two by moving a portion of its quantity onto a new order line. The new line inherits product, price, dynamic fields and per-unit SKU composition from the original. Discounts and totals are left to be recomputed by the order pipeline.
3796
+ *
3797
+ * @see {@link https://developer.hantera.io/reference/actors/order/commands/split-order-line/|Hantera Developer Portal}
3798
+ */
3799
+ declare interface SplitOrderLineCommand {
3800
+ type: 'splitOrderLine';
3801
+ /** The ID of the existing Order Line to split. */
3802
+ orderLineId: string;
3803
+ /** Optional. The ID to assign to the new Order Line. A new GUID is generated when omitted. */
3804
+ newOrderLineId?: string;
3805
+ /** The quantity to move from the original Order Line onto the new one. Must be greater than 0 and less than the original line's quantity. */
3806
+ quantity: Decimal | number;
3807
+ /** Optional. The ID of an existing Delivery to place the new Order Line in. The new line stays in the original line's Delivery when omitted. */
3808
+ newDeliveryId?: string;
3809
+ }
3810
+
3602
3811
  export declare namespace standardServices {
3603
3812
  export {
3604
3813
  ShippingProduct,
@@ -3706,11 +3915,12 @@ export declare namespace Ticket {
3706
3915
  RemoveTagCommand_3 as RemoveTagCommand,
3707
3916
  SetChannelKeyCommand_2 as SetChannelKeyCommand,
3708
3917
  SetDynamicFieldsCommand_3 as SetDynamicFieldsCommand,
3709
- SetItemDynamicFieldsCommand
3918
+ SetItemDynamicFieldsCommand,
3919
+ SetTagsCommand_3 as SetTagsCommand
3710
3920
  }
3711
3921
  }
3712
3922
 
3713
- declare type TicketCommand = AddActivityLogCommand_3 | AddTagCommand_3 | CreateItemCommand | CreateItemRelationCommand | CreateRelationCommand | DeleteItemCommand | DeleteItemRelationCommand | DeleteRelationCommand | GenerateTicketNumberByPrefixCommand | RemoveTagCommand_3 | SetChannelKeyCommand_2 | SetDynamicFieldsCommand_3 | SetItemDynamicFieldsCommand;
3923
+ declare type TicketCommand = AddActivityLogCommand_3 | AddTagCommand_3 | CreateItemCommand | CreateItemRelationCommand | CreateRelationCommand | DeleteItemCommand | DeleteItemRelationCommand | DeleteRelationCommand | GenerateTicketNumberByPrefixCommand | RemoveTagCommand_3 | SetChannelKeyCommand_2 | SetDynamicFieldsCommand_3 | SetItemDynamicFieldsCommand | SetTagsCommand_3;
3714
3924
 
3715
3925
  declare function time(date: Date | string): string;
3716
3926
 
@@ -3730,17 +3940,6 @@ declare interface UnreserveCommand {
3730
3940
  orderLineId: string;
3731
3941
  }
3732
3942
 
3733
- /**
3734
- * Removes the inventory from a Delivery. Stock reservations will be updated if there are any.
3735
- *
3736
- * @see {@link https://developer.hantera.io/reference/actors/order/commands/unset-delivery-inventory/|Hantera Developer Portal}
3737
- */
3738
- declare interface UnsetDeliveryInventoryCommand {
3739
- type: 'unsetDeliveryInventory';
3740
- /** The ID of the Delivery to set the address to */
3741
- deliveryId: string;
3742
- }
3743
-
3744
3943
  export declare function useAppContext(): {
3745
3944
  appId: string;
3746
3945
  getAppViewPath(relativePath: string, appId?: string): string;
@@ -3916,6 +4115,20 @@ export declare function useRegistry(): {
3916
4115
  listChannels(): Promise<Record<string, ChannelEntry_2>>;
3917
4116
  };
3918
4117
 
4118
+ export declare function useResolveLabel(): {
4119
+ resolve: (label: string | Record<string, string> | undefined | null) => string;
4120
+ locales: Ref< {
4121
+ key: string;
4122
+ label: string;
4123
+ language: string;
4124
+ }[], LocaleInfo[] | {
4125
+ key: string;
4126
+ label: string;
4127
+ language: string;
4128
+ }[]>;
4129
+ loadLocales: typeof loadLocales;
4130
+ };
4131
+
3919
4132
  export declare interface ViewContext {
3920
4133
  /**
3921
4134
  * A unique ID identifying this view instance
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hantera/portal-app",
3
- "version": "20260428.0.0-develop.1",
3
+ "version": "20260617.0.0-develop.1",
4
4
  "types": "./dist/index.d.ts",
5
5
  "scripts": {
6
6
  "build": "cpx ../../portal/portal-app/dist/**/*.d.ts ./dist -C"