@hantera/portal-app 20260407.0.0-2026.1.1 → 20260609.0.0-develop.3

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 +283 -98
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -11,6 +11,7 @@ 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';
@@ -92,6 +93,8 @@ declare interface AddActivityLogCommand {
92
93
  messageTemplate: string;
93
94
  /** Dynamic properties to add to the log */
94
95
  dynamic?: Record<string, any>;
96
+ /** Override createdAt to align with external events. If not specified, time will be based on server time. */
97
+ createdAt?: any;
95
98
  }
96
99
 
97
100
  /**
@@ -105,6 +108,8 @@ declare interface AddActivityLogCommand_2 {
105
108
  messageTemplate: string;
106
109
  /** Dynamic properties to add to the log */
107
110
  dynamic?: Record<string, any>;
111
+ /** Override createdAt to align with external events. If not specified, time will be based on server time. */
112
+ createdAt?: any;
108
113
  }
109
114
 
110
115
  /**
@@ -118,6 +123,8 @@ declare interface AddActivityLogCommand_3 {
118
123
  messageTemplate: string;
119
124
  /** Dynamic properties to add to the log */
120
125
  dynamic?: Record<string, any>;
126
+ /** Override createdAt to align with external events. If not specified, time will be based on server time. */
127
+ createdAt?: any;
121
128
  }
122
129
 
123
130
  /**
@@ -131,6 +138,8 @@ declare interface AddActivityLogCommand_4 {
131
138
  messageTemplate: string;
132
139
  /** Dynamic properties to add to the log */
133
140
  dynamic?: Record<string, any>;
141
+ /** Override createdAt to align with external events. If not specified, time will be based on server time. */
142
+ createdAt?: any;
134
143
  }
135
144
 
136
145
  /**
@@ -267,11 +276,12 @@ export declare namespace Asset {
267
276
  GenerateAssetNumberByPrefixCommand,
268
277
  RemoveTagCommand_4 as RemoveTagCommand,
269
278
  SetDynamicFieldsCommand_4 as SetDynamicFieldsCommand,
270
- SetItemDynamicFieldsCommand_2 as SetItemDynamicFieldsCommand
279
+ SetItemDynamicFieldsCommand_2 as SetItemDynamicFieldsCommand,
280
+ SetTagsCommand_4 as SetTagsCommand
271
281
  }
272
282
  }
273
283
 
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;
284
+ 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
285
 
276
286
  export declare const Authorize: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
277
287
 
@@ -374,15 +384,15 @@ declare interface BackOrder_2 {
374
384
 
375
385
  declare interface CalculatedDiscount {
376
386
  calculatedDiscountId: string;
377
- discountId?: string;
378
- promotionId?: string;
387
+ referenceType: 'staticDiscount' | 'promotion';
388
+ referenceId: string;
379
389
  value: default_2;
380
390
  }
381
391
 
382
392
  declare interface CalculatedDiscount_2 {
383
393
  calculatedDiscountId: string
384
- discountId?: string
385
- promotionId?: string
394
+ referenceType: 'staticDiscount' | 'promotion'
395
+ referenceId: string
386
396
  value: Decimal
387
397
  }
388
398
 
@@ -526,44 +536,6 @@ declare interface CreateAuthorizationCommand {
526
536
  authorizationState?: 'pending' | 'successful' | 'failed';
527
537
  }
528
538
 
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
539
  /**
568
540
  * Adds a new Delivery to an Order
569
541
  *
@@ -676,6 +648,40 @@ declare interface CreateOrderLineCommand {
676
648
  skus?: Record<string, Decimal | number>;
677
649
  }
678
650
 
651
+ /**
652
+ * Creates a promotion on an Order with inline Filtrera source
653
+ *
654
+ * @see {@link https://developer.hantera.io/reference/actors/order/commands/create-promotion-by-source/|Hantera Developer Portal}
655
+ */
656
+ declare interface CreatePromotionBySourceCommand {
657
+ type: 'createPromotionBySource';
658
+ promotionId?: string;
659
+ source: string;
660
+ parameters?: Record<string, any>;
661
+ dynamic?: Record<string, any>;
662
+ description?: string;
663
+ promotionGroup: string;
664
+ canOnlyCombineWith?: string[];
665
+ canNotCombineWith?: string[];
666
+ }
667
+
668
+ /**
669
+ * Creates a promotion on an Order based on a component
670
+ *
671
+ * @see {@link https://developer.hantera.io/reference/actors/order/commands/create-promotion/|Hantera Developer Portal}
672
+ */
673
+ declare interface CreatePromotionCommand {
674
+ type: 'createPromotion';
675
+ promotionId?: string;
676
+ componentId: string;
677
+ parameters?: Record<string, any>;
678
+ dynamic?: Record<string, any>;
679
+ description?: string;
680
+ promotionGroup: string;
681
+ canOnlyCombineWith?: string[];
682
+ canNotCombineWith?: string[];
683
+ }
684
+
679
685
  /**
680
686
  * Adds a new graph node relation to a Ticket
681
687
  *
@@ -805,7 +811,7 @@ declare interface Customer_2 {
805
811
  orders: Array<Order_2>;
806
812
  }
807
813
 
808
- declare function date(date: Date | string, format?: string): string;
814
+ declare function date(date: DateOnly | Date | string): string;
809
815
 
810
816
  declare function dateTime(date: Date | string): string;
811
817
 
@@ -823,6 +829,9 @@ declare const _default_2: {
823
829
  timeline: AppSlot<Record<string, any>>;
824
830
  };
825
831
  delivery: {
832
+ header: AppSlot< {
833
+ delivery: Delivery;
834
+ }>;
826
835
  footer: AppSlot< {
827
836
  delivery: Delivery;
828
837
  }>;
@@ -1008,6 +1017,16 @@ declare interface DeleteOrderLineCommand {
1008
1017
  orderLineId: string;
1009
1018
  }
1010
1019
 
1020
+ /**
1021
+ * Deletes a promotion from an Order
1022
+ *
1023
+ * @see {@link https://developer.hantera.io/reference/actors/order/commands/delete-promotion/|Hantera Developer Portal}
1024
+ */
1025
+ declare interface DeletePromotionCommand {
1026
+ type: 'deletePromotion';
1027
+ promotionId: string;
1028
+ }
1029
+
1011
1030
  /**
1012
1031
  * Removes a graph node relation from a Ticket
1013
1032
  *
@@ -1050,8 +1069,6 @@ declare interface Delivery {
1050
1069
  deliveryNumber: string;
1051
1070
  deliveryState: 'open' | 'processing' | 'completed' | 'cancelled' | 'cancelledByOrder';
1052
1071
  deliveryAddress: Address;
1053
- inventoryKey: string;
1054
- inventoryDate?: Date;
1055
1072
  shippingPrice: default_2;
1056
1073
  shippingTaxFactor: default_2;
1057
1074
  shippingTaxTotal: default_2;
@@ -1073,8 +1090,6 @@ declare interface Delivery_2 {
1073
1090
  deliveryNumber: string
1074
1091
  deliveryState: 'open' | 'processing' | 'completed' | 'cancelled' | 'cancelledByOrder'
1075
1092
  deliveryAddress: Address_2
1076
- inventoryKey: string
1077
- inventoryDate?: Date
1078
1093
  shippingPrice: Decimal
1079
1094
  shippingTaxFactor: Decimal
1080
1095
  shippingTaxTotal: Decimal
@@ -1092,6 +1107,8 @@ declare interface Delivery_2 {
1092
1107
  shippingDiscounts: Array<Discount_2>
1093
1108
  }
1094
1109
 
1110
+ export declare type Dialogs = ReturnType<typeof useDialogs>;
1111
+
1095
1112
  declare interface Discount {
1096
1113
  discountId: string;
1097
1114
  discountType: 'percentage' | 'absolute';
@@ -1236,6 +1253,7 @@ export declare namespace Graph {
1236
1253
  Delivery_2 as Delivery,
1237
1254
  Payment_2 as Payment,
1238
1255
  Address_2 as Address,
1256
+ InvoiceRecipient,
1239
1257
  ActivityLog,
1240
1258
  Checkpoint,
1241
1259
  Invoice,
@@ -1256,6 +1274,7 @@ export declare namespace Graph_2 {
1256
1274
  Delivery,
1257
1275
  Payment,
1258
1276
  Address,
1277
+ InvoiceRecipient_2 as InvoiceRecipient,
1259
1278
  ActivityLog_2 as ActivityLog,
1260
1279
  Checkpoint_2 as Checkpoint,
1261
1280
  Invoice_2 as Invoice,
@@ -1496,7 +1515,7 @@ declare interface GraphNodeMeta_2 {
1496
1515
  export declare interface GraphQueryNavigation {
1497
1516
  edge: string;
1498
1517
  limit?: number;
1499
- require?: boolean;
1518
+ require?: GraphQueryRequire;
1500
1519
  count?: boolean | number;
1501
1520
  orderBy?: string;
1502
1521
  filter?: string;
@@ -1508,6 +1527,8 @@ export declare interface GraphQueryNavigation {
1508
1527
  };
1509
1528
  }
1510
1529
 
1530
+ export declare type GraphQueryRequire = 'any' | 'some' | 'none' | boolean;
1531
+
1511
1532
  declare interface GraphValueTypeArray {
1512
1533
  type: 'array'
1513
1534
  itemType: GraphValueTypeMeta
@@ -1647,7 +1668,7 @@ declare interface Invoice {
1647
1668
  invoiceNumber: string
1648
1669
  invoiceTotal: Decimal
1649
1670
  createdAt: Date
1650
- invoiceAddress: Address_2
1671
+ invoiceRecipient: InvoiceRecipient
1651
1672
  invoiceLines: InvoiceLine[]
1652
1673
  invoiceNetTotal: Decimal
1653
1674
  invoiceTaxTotal: Decimal
@@ -1661,7 +1682,7 @@ declare interface Invoice_2 {
1661
1682
  invoiceNumber: string;
1662
1683
  invoiceTotal: default_2;
1663
1684
  createdAt: Date;
1664
- invoiceAddress: Address;
1685
+ invoiceRecipient: InvoiceRecipient_2;
1665
1686
  invoiceLines: InvoiceLine_2[];
1666
1687
  invoiceNetTotal: default_2;
1667
1688
  invoiceTaxTotal: default_2;
@@ -1686,7 +1707,7 @@ declare interface InvoiceLine {
1686
1707
  invoiceLineId: string
1687
1708
  invoiceLineNumber: Decimal
1688
1709
  productNumber: string
1689
- referenceType: 'orderLine' | 'shipping'
1710
+ referenceType: 'orderLine' | 'delivery'
1690
1711
  tax: Decimal
1691
1712
  net: Decimal
1692
1713
  total: Decimal
@@ -1699,7 +1720,7 @@ declare interface InvoiceLine_2 {
1699
1720
  invoiceLineId: string;
1700
1721
  invoiceLineNumber: default_2;
1701
1722
  productNumber: string;
1702
- referenceType: 'orderLine' | 'shipping';
1723
+ referenceType: 'orderLine' | 'delivery';
1703
1724
  tax: default_2;
1704
1725
  net: default_2;
1705
1726
  total: default_2;
@@ -1724,6 +1745,18 @@ declare interface InvoiceLineDiscount_2 {
1724
1745
  description: string;
1725
1746
  }
1726
1747
 
1748
+ declare interface InvoiceRecipient extends Address_2 {
1749
+ taxId?: string
1750
+ taxIdType?: string
1751
+ taxCountryCode?: string
1752
+ }
1753
+
1754
+ declare interface InvoiceRecipient_2 extends Address {
1755
+ taxId?: string;
1756
+ taxIdType?: string;
1757
+ taxCountryCode?: string;
1758
+ }
1759
+
1727
1760
  declare interface JobCompletedData {
1728
1761
  jobId: string;
1729
1762
  jobDefinitionId: string;
@@ -2313,6 +2346,14 @@ declare interface LiveQueryResult<T = unknown> {
2313
2346
  dispose(): void;
2314
2347
  }
2315
2348
 
2349
+ declare function loadLocales(): Promise<LocaleInfo[]>;
2350
+
2351
+ declare interface LocaleInfo {
2352
+ key: string;
2353
+ label: string;
2354
+ language: string;
2355
+ }
2356
+
2316
2357
  declare interface LocalizedLabel {
2317
2358
  default: string
2318
2359
  [languageCode: string]: string
@@ -2417,7 +2458,7 @@ declare interface Order {
2417
2458
  currencyCode: string
2418
2459
  channelKey?: string
2419
2460
  customerNumber?: string
2420
- invoiceAddress: Address_2
2461
+ invoiceRecipient: InvoiceRecipient
2421
2462
  locale: string
2422
2463
  notes?: string
2423
2464
  orderTaxTotal: Decimal
@@ -2446,7 +2487,7 @@ declare interface Order_2 {
2446
2487
  currencyCode: string;
2447
2488
  channelKey?: string;
2448
2489
  customerNumber?: string;
2449
- invoiceAddress: Address;
2490
+ invoiceRecipient: InvoiceRecipient_2;
2450
2491
  locale: string;
2451
2492
  notes?: string;
2452
2493
  orderTaxTotal: default_2;
@@ -2476,16 +2517,17 @@ export declare namespace Order_3 {
2476
2517
  CancelDeliveryCommand,
2477
2518
  CancelInvoiceCommand,
2478
2519
  CompleteDeliveryCommand,
2479
- CreateComputedOrderDiscountBySourceCommand,
2480
- CreateComputedOrderDiscountCommand,
2481
2520
  CreateDeliveryCommand,
2482
2521
  CreateOrderLineCommand,
2522
+ CreatePromotionBySourceCommand,
2523
+ CreatePromotionCommand,
2483
2524
  CreateReturnCommand,
2484
2525
  CreateStaticOrderDiscountCommand,
2485
2526
  CreateStaticOrderLineDiscountCommand,
2486
2527
  CreateStaticShippingDiscountCommand,
2487
2528
  DeleteDiscountCommand,
2488
2529
  DeleteOrderLineCommand,
2530
+ DeletePromotionCommand,
2489
2531
  DeleteReturnCommand,
2490
2532
  GenerateOrderNumberByPrefixCommand,
2491
2533
  InvoiceCommand,
@@ -2500,14 +2542,14 @@ export declare namespace Order_3 {
2500
2542
  RetractOrderLineFromInvoicingCommand,
2501
2543
  RetractShippingFromInvoicingCommand,
2502
2544
  SetChannelKeyCommand,
2503
- SetComputedOrderDiscountParametersCommand,
2504
2545
  SetCustomerNumberCommand,
2505
2546
  SetDeliveryAddressCommand,
2506
2547
  SetDeliveryDynamicFieldsCommand,
2507
- SetDeliveryInventoryCommand,
2548
+ SetDeliveryTagsCommand,
2508
2549
  SetDiscountDescriptionCommand,
2509
2550
  SetDiscountDynamicFieldsCommand,
2510
2551
  SetInvoiceAddressCommand,
2552
+ SetInvoiceRecipientCommand,
2511
2553
  SetLocaleCommand,
2512
2554
  SetNotesCommand,
2513
2555
  SetOrderDynamicFieldsCommand,
@@ -2518,16 +2560,20 @@ export declare namespace Order_3 {
2518
2560
  SetOrderLineTaxCommand,
2519
2561
  SetOrderLineUnitPriceCommand,
2520
2562
  SetOrderStateCommand,
2563
+ SetPromotionDescriptionCommand,
2564
+ SetPromotionDynamicFieldsCommand,
2565
+ SetPromotionParametersCommand,
2521
2566
  SetReturnDynamicFieldsCommand,
2522
2567
  SetShippingPriceCommand,
2523
2568
  SetShippingProductCommand,
2524
2569
  SetShippingTaxCommand,
2525
2570
  SetStaticDiscountValueCommand,
2526
- UnsetDeliveryInventoryCommand
2571
+ SetTagsCommand,
2572
+ SplitOrderLineCommand
2527
2573
  }
2528
2574
  }
2529
2575
 
2530
- 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;
2576
+ 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;
2531
2577
 
2532
2578
  declare interface OrderJournalEntry {
2533
2579
  orderJournalEntryId: string
@@ -2638,6 +2684,23 @@ declare const orderView: {
2638
2684
  contextMenuProvider: AppService< {
2639
2685
  buildDeliveryContextMenu(context: PortalContext, orderViewContext: OrderViewContext, delivery: Models_2.Graph.Delivery): ContextMenuSection;
2640
2686
  }>;
2687
+ /**
2688
+ * Allows services to react to events occurring in the standard order view,
2689
+ * such as the order being saved.
2690
+ */
2691
+ eventsProvider: AppService< {
2692
+ /**
2693
+ * Called after the order has been successfully saved (commands applied and
2694
+ * order state refreshed). `appliedCommands` are the commands that were
2695
+ * committed in this save.
2696
+ */
2697
+ onOrderSaved?(event: {
2698
+ context: PortalContext;
2699
+ orderViewContext: OrderViewContext;
2700
+ order: Models_2.Graph.Order;
2701
+ appliedCommands: OrderCommand[];
2702
+ }): Promise<void>;
2703
+ }>;
2641
2704
  };
2642
2705
 
2643
2706
  declare interface OrderViewContext {
@@ -2668,8 +2731,10 @@ declare interface OrderViewContext {
2668
2731
  redo(): boolean;
2669
2732
  /**
2670
2733
  * Saves pending changes. Automatically refreshes the order state.
2734
+ * Resolves with the list of commands that were committed in this save
2735
+ * (empty if there was nothing to save).
2671
2736
  */
2672
- save(): Promise<void>;
2737
+ save(): Promise<OrderCommand[]>;
2673
2738
  /**
2674
2739
  * Refreshes the order state with the server. If there are pending changes, they will be previewed.
2675
2740
  */
@@ -2748,7 +2813,8 @@ export declare namespace Payment_3 {
2748
2813
  RemoveTagCommand_2 as RemoveTagCommand,
2749
2814
  SetAuthorizationAmountCommand,
2750
2815
  SetAuthorizationStateCommand,
2751
- SetDynamicFieldsCommand
2816
+ SetDynamicFieldsCommand,
2817
+ SetTagsCommand_2 as SetTagsCommand
2752
2818
  }
2753
2819
  }
2754
2820
 
@@ -2784,7 +2850,7 @@ declare interface PaymentCapture_2 {
2784
2850
  }
2785
2851
  }
2786
2852
 
2787
- declare type PaymentCommand = AddActivityLogCommand_2 | AddTagCommand_2 | CreateAuthorizationCommand | GeneratePaymentNumberByPrefixCommand | RemoveTagCommand_2 | SetAuthorizationAmountCommand | SetAuthorizationStateCommand | SetDynamicFieldsCommand;
2853
+ declare type PaymentCommand = AddActivityLogCommand_2 | AddTagCommand_2 | CreateAuthorizationCommand | GeneratePaymentNumberByPrefixCommand | RemoveTagCommand_2 | SetAuthorizationAmountCommand | SetAuthorizationStateCommand | SetDynamicFieldsCommand | SetTagsCommand_2;
2788
2854
 
2789
2855
  declare interface PaymentJournalEntry {
2790
2856
  paymentJournalEntryId: string;
@@ -3060,7 +3126,7 @@ declare interface ReserveCommand {
3060
3126
  inventoryKey: string;
3061
3127
  /** The number of units to reserve. Must be greater than zero. */
3062
3128
  quantity: Decimal | number;
3063
- /** Optional date/time when the reserved stock should be available if the stock is not needed immediately. */
3129
+ /** Optional date when the reserved stock should be available if the stock is not needed immediately. */
3064
3130
  inventoryDate?: any;
3065
3131
  /** Optional list of allocations to use for the reservation. */
3066
3132
  stockAllocations?: string[];
@@ -3100,6 +3166,10 @@ declare interface SearchProduct {
3100
3166
  export declare interface ServiceContext {
3101
3167
  processes: Processes;
3102
3168
  backend: BackendApi;
3169
+ dialogs: Dialogs;
3170
+ localization: {
3171
+ resolveLabel: (label: string | Record<string, string> | null | undefined) => string;
3172
+ };
3103
3173
  }
3104
3174
 
3105
3175
  /**
@@ -3167,17 +3237,6 @@ declare interface SetChannelKeyCommand_2 {
3167
3237
  value: string;
3168
3238
  }
3169
3239
 
3170
- /**
3171
- * Sets a computed order discount's parameters
3172
- *
3173
- * @see {@link https://developer.hantera.io/reference/actors/order/commands/set-computed-order-discount-parameters/|Hantera Developer Portal}
3174
- */
3175
- declare interface SetComputedOrderDiscountParametersCommand {
3176
- type: 'setComputedOrderDiscountParameters';
3177
- discountId: string;
3178
- parameters: Record<string, string>;
3179
- }
3180
-
3181
3240
  /**
3182
3241
  * Sets the customer number of an order.
3183
3242
  *
@@ -3223,16 +3282,16 @@ declare interface SetDeliveryDynamicFieldsCommand {
3223
3282
  }
3224
3283
 
3225
3284
  /**
3226
- * Sets the inventory and inventory date of a Delivery. Stock reservations will be updated if there are any.
3285
+ * Replaces all tags on a Delivery
3227
3286
  *
3228
- * @see {@link https://developer.hantera.io/reference/actors/order/commands/set-delivery-inventory/|Hantera Developer Portal}
3287
+ * @see {@link https://developer.hantera.io/reference/actors/order/commands/set-delivery-tags/|Hantera Developer Portal}
3229
3288
  */
3230
- declare interface SetDeliveryInventoryCommand {
3231
- type: 'setDeliveryInventory';
3232
- /** The ID of the Delivery to set the inventory of */
3289
+ declare interface SetDeliveryTagsCommand {
3290
+ type: 'setDeliveryTags';
3291
+ /** The ID of the Delivery to set tags on */
3233
3292
  deliveryId: string;
3234
- inventoryKey: string;
3235
- inventoryDate: any;
3293
+ /** The tag keys */
3294
+ keys: string[];
3236
3295
  }
3237
3296
 
3238
3297
  /**
@@ -3308,7 +3367,7 @@ declare interface SetIncomingStockCommand {
3308
3367
  reference: string;
3309
3368
  /** The key of the inventory the incoming stock is expected at. */
3310
3369
  inventoryKey: string;
3311
- /** Date of when the incoming stock is expected to be available for outbound shipments. */
3370
+ /** Date when the incoming stock is expected to be available for outbound shipments. */
3312
3371
  expectedOn: any;
3313
3372
  /** The number of units expected */
3314
3373
  quantity: Decimal | number;
@@ -3317,6 +3376,7 @@ declare interface SetIncomingStockCommand {
3317
3376
  /**
3318
3377
  * Sets the invoice address of an Order which will be used for new invoices
3319
3378
  *
3379
+ * @deprecated Use SetInvoiceRecipient command instead
3320
3380
  * @see {@link https://developer.hantera.io/reference/actors/order/commands/set-invoice-address/|Hantera Developer Portal}
3321
3381
  */
3322
3382
  declare interface SetInvoiceAddressCommand {
@@ -3334,6 +3394,29 @@ declare interface SetInvoiceAddressCommand {
3334
3394
  phone?: string;
3335
3395
  }
3336
3396
 
3397
+ /**
3398
+ * Sets the invoice recipient of an Order which will be used for new invoices
3399
+ *
3400
+ * @see {@link https://developer.hantera.io/reference/actors/order/commands/set-invoice-recipient/|Hantera Developer Portal}
3401
+ */
3402
+ declare interface SetInvoiceRecipientCommand {
3403
+ type: 'setInvoiceRecipient';
3404
+ name?: string;
3405
+ careOf?: string;
3406
+ attention?: string;
3407
+ addressLine1?: string;
3408
+ addressLine2?: string;
3409
+ city?: string;
3410
+ state?: string;
3411
+ postalCode?: string;
3412
+ countryCode?: string;
3413
+ email?: string;
3414
+ phone?: string;
3415
+ taxId?: string;
3416
+ taxIdType?: string;
3417
+ taxCountryCode?: string;
3418
+ }
3419
+
3337
3420
  /**
3338
3421
  * Sets dynamic fields of a ticket item. Non specified fields will be left unchanged. Set value to null to remove field.
3339
3422
  *
@@ -3498,6 +3581,39 @@ declare interface SetPhysicalStockCommand {
3498
3581
  relative: boolean;
3499
3582
  }
3500
3583
 
3584
+ /**
3585
+ * Sets the description on a promotion
3586
+ *
3587
+ * @see {@link https://developer.hantera.io/reference/actors/order/commands/set-promotion-description/|Hantera Developer Portal}
3588
+ */
3589
+ declare interface SetPromotionDescriptionCommand {
3590
+ type: 'setPromotionDescription';
3591
+ promotionId: string;
3592
+ description?: string;
3593
+ }
3594
+
3595
+ /**
3596
+ * Sets dynamic fields on a promotion
3597
+ *
3598
+ * @see {@link https://developer.hantera.io/reference/actors/order/commands/set-promotion-dynamic-fields/|Hantera Developer Portal}
3599
+ */
3600
+ declare interface SetPromotionDynamicFieldsCommand {
3601
+ type: 'setPromotionDynamicFields';
3602
+ promotionId: string;
3603
+ fields: Record<string, any>;
3604
+ }
3605
+
3606
+ /**
3607
+ * Sets parameters on a promotion
3608
+ *
3609
+ * @see {@link https://developer.hantera.io/reference/actors/order/commands/set-promotion-parameters/|Hantera Developer Portal}
3610
+ */
3611
+ declare interface SetPromotionParametersCommand {
3612
+ type: 'setPromotionParameters';
3613
+ promotionId: string;
3614
+ parameters: Record<string, any>;
3615
+ }
3616
+
3501
3617
  /**
3502
3618
  * Sets dynamic fields of a return. Non specified fields will be left unchanged. Set value to null to remove field.
3503
3619
  *
@@ -3570,7 +3686,55 @@ declare interface SetStaticDiscountValueCommand {
3570
3686
  value: Decimal | number;
3571
3687
  }
3572
3688
 
3689
+ /**
3690
+ * Replaces all tags on an Order
3691
+ *
3692
+ * @see {@link https://developer.hantera.io/reference/actors/order/commands/set-tags/|Hantera Developer Portal}
3693
+ */
3694
+ declare interface SetTagsCommand {
3695
+ type: 'setTags';
3696
+ /** The tag keys */
3697
+ keys: string[];
3698
+ }
3699
+
3700
+ /**
3701
+ * Replaces all tags on a Payment
3702
+ *
3703
+ * @see {@link https://developer.hantera.io/reference/actors/payment/commands/set-tags/|Hantera Developer Portal}
3704
+ */
3705
+ declare interface SetTagsCommand_2 {
3706
+ type: 'setTags';
3707
+ /** The tag keys */
3708
+ keys: string[];
3709
+ }
3710
+
3711
+ /**
3712
+ * Replaces all tags on a Ticket
3713
+ *
3714
+ * @see {@link https://developer.hantera.io/reference/actors/ticket/commands/set-tags/|Hantera Developer Portal}
3715
+ */
3716
+ declare interface SetTagsCommand_3 {
3717
+ type: 'setTags';
3718
+ /** The tag keys */
3719
+ keys: string[];
3720
+ }
3721
+
3722
+ /**
3723
+ * Replaces all tags on an Asset
3724
+ *
3725
+ * @see {@link https://developer.hantera.io/reference/actors/asset/commands/set-tags/|Hantera Developer Portal}
3726
+ */
3727
+ declare interface SetTagsCommand_4 {
3728
+ type: 'setTags';
3729
+ /** The tag keys */
3730
+ keys: string[];
3731
+ }
3732
+
3573
3733
  declare interface ShippingProduct {
3734
+ /**
3735
+ * Optional unique internal ID, useful if multiple options share the same productNumber.
3736
+ */
3737
+ optionId?: string;
3574
3738
  productNumber: string;
3575
3739
  description: string;
3576
3740
  price: default_2;
@@ -3597,6 +3761,23 @@ export declare namespace Sku {
3597
3761
 
3598
3762
  declare type SkuCommand = ReserveCommand | SetAllocationCommand | SetDynamicFieldsCommand_2 | SetIncomingStockCommand | SetPhysicalStockCommand | UnreserveCommand;
3599
3763
 
3764
+ /**
3765
+ * 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.
3766
+ *
3767
+ * @see {@link https://developer.hantera.io/reference/actors/order/commands/split-order-line/|Hantera Developer Portal}
3768
+ */
3769
+ declare interface SplitOrderLineCommand {
3770
+ type: 'splitOrderLine';
3771
+ /** The ID of the existing Order Line to split. */
3772
+ orderLineId: string;
3773
+ /** Optional. The ID to assign to the new Order Line. A new GUID is generated when omitted. */
3774
+ newOrderLineId?: string;
3775
+ /** 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. */
3776
+ quantity: Decimal | number;
3777
+ /** 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. */
3778
+ newDeliveryId?: string;
3779
+ }
3780
+
3600
3781
  export declare namespace standardServices {
3601
3782
  export {
3602
3783
  ShippingProduct,
@@ -3704,11 +3885,12 @@ export declare namespace Ticket {
3704
3885
  RemoveTagCommand_3 as RemoveTagCommand,
3705
3886
  SetChannelKeyCommand_2 as SetChannelKeyCommand,
3706
3887
  SetDynamicFieldsCommand_3 as SetDynamicFieldsCommand,
3707
- SetItemDynamicFieldsCommand
3888
+ SetItemDynamicFieldsCommand,
3889
+ SetTagsCommand_3 as SetTagsCommand
3708
3890
  }
3709
3891
  }
3710
3892
 
3711
- declare type TicketCommand = AddActivityLogCommand_3 | AddTagCommand_3 | CreateItemCommand | CreateItemRelationCommand | CreateRelationCommand | DeleteItemCommand | DeleteItemRelationCommand | DeleteRelationCommand | GenerateTicketNumberByPrefixCommand | RemoveTagCommand_3 | SetChannelKeyCommand_2 | SetDynamicFieldsCommand_3 | SetItemDynamicFieldsCommand;
3893
+ declare type TicketCommand = AddActivityLogCommand_3 | AddTagCommand_3 | CreateItemCommand | CreateItemRelationCommand | CreateRelationCommand | DeleteItemCommand | DeleteItemRelationCommand | DeleteRelationCommand | GenerateTicketNumberByPrefixCommand | RemoveTagCommand_3 | SetChannelKeyCommand_2 | SetDynamicFieldsCommand_3 | SetItemDynamicFieldsCommand | SetTagsCommand_3;
3712
3894
 
3713
3895
  declare function time(date: Date | string): string;
3714
3896
 
@@ -3728,17 +3910,6 @@ declare interface UnreserveCommand {
3728
3910
  orderLineId: string;
3729
3911
  }
3730
3912
 
3731
- /**
3732
- * Removes the inventory from a Delivery. Stock reservations will be updated if there are any.
3733
- *
3734
- * @see {@link https://developer.hantera.io/reference/actors/order/commands/unset-delivery-inventory/|Hantera Developer Portal}
3735
- */
3736
- declare interface UnsetDeliveryInventoryCommand {
3737
- type: 'unsetDeliveryInventory';
3738
- /** The ID of the Delivery to set the address to */
3739
- deliveryId: string;
3740
- }
3741
-
3742
3913
  export declare function useAppContext(): {
3743
3914
  appId: string;
3744
3915
  getAppViewPath(relativePath: string, appId?: string): string;
@@ -3914,6 +4085,20 @@ export declare function useRegistry(): {
3914
4085
  listChannels(): Promise<Record<string, ChannelEntry_2>>;
3915
4086
  };
3916
4087
 
4088
+ export declare function useResolveLabel(): {
4089
+ resolve: (label: string | Record<string, string> | undefined | null) => string;
4090
+ locales: Ref< {
4091
+ key: string;
4092
+ label: string;
4093
+ language: string;
4094
+ }[], LocaleInfo[] | {
4095
+ key: string;
4096
+ label: string;
4097
+ language: string;
4098
+ }[]>;
4099
+ loadLocales: typeof loadLocales;
4100
+ };
4101
+
3917
4102
  export declare interface ViewContext {
3918
4103
  /**
3919
4104
  * 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": "20260407.0.0-2026.1.1",
3
+ "version": "20260609.0.0-develop.3",
4
4
  "types": "./dist/index.d.ts",
5
5
  "scripts": {
6
6
  "build": "cpx ../../portal/portal-app/dist/**/*.d.ts ./dist -C"