@hantera/portal-app 20260609.0.0-develop.3 → 20260625.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 +55 -2
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -16,6 +16,7 @@ import Decimal from 'decimal.js';
16
16
  import { DeepReadonly } from 'vue';
17
17
  import { default as default_2 } from 'decimal.js';
18
18
  import { DefineComponent } from 'vue';
19
+ import { IconName } from '@hantera/design-system';
19
20
  import { InjectionKey } from 'vue';
20
21
  import { LabelTagDefinition } from '@hantera/design-system';
21
22
  import { PublicProps } from 'vue';
@@ -727,6 +728,8 @@ declare interface CreateReturnCommand {
727
728
  refundFactor: Decimal | number;
728
729
  }
729
730
 
731
+ declare function createReviver(options?: DeserializeOptions): (key: string, value: unknown) => unknown;
732
+
730
733
  /**
731
734
  * Creates a static discount on an Order. An order discount value is distributed across all order lines and shipping fees proportionally to their value.
732
735
  *
@@ -1107,6 +1110,16 @@ declare interface Delivery_2 {
1107
1110
  shippingDiscounts: Array<Discount_2>
1108
1111
  }
1109
1112
 
1113
+ declare function deserialize(json: string, options?: DeserializeOptions): any;
1114
+
1115
+ export declare interface DeserializeOptions {
1116
+ /**
1117
+ * When true, objects containing an array property named "nodes" are replaced
1118
+ * by that array, flattening graph query responses for easier consumption.
1119
+ */
1120
+ graph?: boolean;
1121
+ }
1122
+
1110
1123
  export declare type Dialogs = ReturnType<typeof useDialogs>;
1111
1124
 
1112
1125
  declare interface Discount {
@@ -1593,6 +1606,15 @@ declare interface GraphValueTypeScalar_2 {
1593
1606
  scalarType: 'string' | 'instant' | 'decimal' | 'boolean' | 'uuid' | 'any';
1594
1607
  }
1595
1608
 
1609
+ export declare namespace HanteraJson {
1610
+ export {
1611
+ serialize,
1612
+ deserialize,
1613
+ createReviver,
1614
+ DeserializeOptions
1615
+ }
1616
+ }
1617
+
1596
1618
  export declare interface Host {
1597
1619
  /**
1598
1620
  * Send a message to the portal host
@@ -2343,6 +2365,7 @@ declare interface LiveQueryResult<T = unknown> {
2343
2365
  loading: DeepReadonly<Ref<boolean>>;
2344
2366
  totalCount: DeepReadonly<Ref<number | null>>;
2345
2367
  capped: DeepReadonly<Ref<boolean>>;
2368
+ revision: DeepReadonly<Ref<number>>;
2346
2369
  dispose(): void;
2347
2370
  }
2348
2371
 
@@ -2679,10 +2702,12 @@ declare const orderView: {
2679
2702
  }[];
2680
2703
  }>;
2681
2704
  /**
2682
- * Allows services to contribute context menu items to delivery panels in the order view
2705
+ * Allows services to contribute context menu items to delivery and payment
2706
+ * panels in the order view. Implement only the methods relevant to the app.
2683
2707
  */
2684
2708
  contextMenuProvider: AppService< {
2685
- buildDeliveryContextMenu(context: PortalContext, orderViewContext: OrderViewContext, delivery: Models_2.Graph.Delivery): ContextMenuSection;
2709
+ buildDeliveryContextMenu?(context: PortalContext, orderViewContext: OrderViewContext, delivery: Models_2.Graph.Delivery): ContextMenuSection;
2710
+ buildPaymentContextMenu?(context: PortalContext, orderViewContext: OrderViewContext, payment: Models_2.Graph.Payment): ContextMenuSection;
2686
2711
  }>;
2687
2712
  /**
2688
2713
  * Allows services to react to events occurring in the standard order view,
@@ -2701,6 +2726,19 @@ declare const orderView: {
2701
2726
  appliedCommands: OrderCommand[];
2702
2727
  }): Promise<void>;
2703
2728
  }>;
2729
+ /**
2730
+ * Allows services to contribute options to the "New payment" dropdown in the
2731
+ * payments tab of the order view.
2732
+ */
2733
+ paymentActionsProvider: AppService< {
2734
+ buildNewPaymentOptions(context: PortalContext, orderViewContext: OrderViewContext): {
2735
+ id: string;
2736
+ label: string | ComputedRef<string>;
2737
+ icon?: IconName;
2738
+ disabled?: boolean;
2739
+ onClick: () => void;
2740
+ }[];
2741
+ }>;
2704
2742
  };
2705
2743
 
2706
2744
  declare interface OrderViewContext {
@@ -2739,6 +2777,16 @@ declare interface OrderViewContext {
2739
2777
  * Refreshes the order state with the server. If there are pending changes, they will be previewed.
2740
2778
  */
2741
2779
  refresh(): Promise<void>;
2780
+ /**
2781
+ * Subscribes to live updates of the order. When there are no pending changes or active timetravel,
2782
+ * incoming updates are bound directly to the state. Otherwise, updates trigger a preview refresh.
2783
+ * Requires the order state to be loaded first (call refresh before this).
2784
+ */
2785
+ startLiveUpdates(): void;
2786
+ /**
2787
+ * Disposes live update subscriptions and pending timers. Call when the view is torn down.
2788
+ */
2789
+ dispose(): void;
2742
2790
  /**
2743
2791
  * Adds a pending changeset to the current instance. Call refresh to update preview.
2744
2792
  *
@@ -2774,6 +2822,7 @@ declare interface Payment {
2774
2822
  paymentId: string;
2775
2823
  paymentNumber: string;
2776
2824
  externalReference?: string;
2825
+ channelKey?: string;
2777
2826
  authorizedAmount: default_2;
2778
2827
  providerKey: string;
2779
2828
  tags: Array<string>;
@@ -2790,8 +2839,10 @@ declare interface Payment_2 {
2790
2839
  paymentId: string
2791
2840
  paymentNumber: string
2792
2841
  externalReference?: string
2842
+ channelKey?: string
2793
2843
  authorizedAmount: Decimal
2794
2844
  providerKey: string
2845
+
2795
2846
  tags: Array<string>
2796
2847
  capturedBalance: Decimal
2797
2848
  creditBalance: Decimal
@@ -3163,6 +3214,8 @@ declare interface SearchProduct {
3163
3214
  dynamic?: Record<string, any>;
3164
3215
  }
3165
3216
 
3217
+ declare function serialize(value: unknown): string;
3218
+
3166
3219
  export declare interface ServiceContext {
3167
3220
  processes: Processes;
3168
3221
  backend: BackendApi;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hantera/portal-app",
3
- "version": "20260609.0.0-develop.3",
3
+ "version": "20260625.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"