@hantera/portal-app 20260617.0.0-develop.1 → 20260803.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 +73 -6
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -249,6 +249,7 @@ export declare namespace apps {
249
249
  _default_3 as legacySlots,
250
250
  _default_4 as inventoryEditorSlots,
251
251
  _default_5 as channelEditorSlots,
252
+ _default_6 as appSettingsSlots,
252
253
  AppSlot,
253
254
  AppService,
254
255
  standardServices
@@ -259,6 +260,13 @@ declare interface AppService<T> {
259
260
  key: string;
260
261
  }
261
262
 
263
+ declare interface AppSettingsSlotContext {
264
+ appId: string;
265
+ values: Readonly<Record<string, any>>;
266
+ setValue: (key: string, value: any) => void;
267
+ refresh: () => Promise<void>;
268
+ }
269
+
262
270
  declare interface AppSlot<T> {
263
271
  key: string;
264
272
  }
@@ -728,6 +736,8 @@ declare interface CreateReturnCommand {
728
736
  refundFactor: Decimal | number;
729
737
  }
730
738
 
739
+ declare function createReviver(options?: DeserializeOptions): (key: string, value: unknown) => unknown;
740
+
731
741
  /**
732
742
  * Creates a static discount on an Order. An order discount value is distributed across all order lines and shipping fees proportionally to their value.
733
743
  *
@@ -940,6 +950,10 @@ declare const _default_5: {
940
950
  };
941
951
  };
942
952
 
953
+ declare const _default_6: {
954
+ settings: AppSlot<AppSettingsSlotContext>;
955
+ };
956
+
943
957
  declare function defineService<T>(key: string): AppService<T>;
944
958
 
945
959
  declare function defineSlot<T extends Record<string, any>>(key: string): AppSlot<T>;
@@ -1071,8 +1085,8 @@ declare interface Delivery {
1071
1085
  deliveryState: 'open' | 'processing' | 'completed' | 'cancelled' | 'cancelledByOrder';
1072
1086
  deliveryAddress: Address;
1073
1087
  shippingPrice: default_2;
1074
- shippingTaxFactor: default_2;
1075
- shippingTaxTotal: default_2;
1088
+ shippingTaxFactor?: default_2;
1089
+ shippingTax: default_2;
1076
1090
  shippingTotal: default_2;
1077
1091
  shippingProductNumber: string;
1078
1092
  shippingDescription: string;
@@ -1092,9 +1106,10 @@ declare interface Delivery_2 {
1092
1106
  deliveryState: 'open' | 'processing' | 'completed' | 'cancelled' | 'cancelledByOrder'
1093
1107
  deliveryAddress: Address_2
1094
1108
  shippingPrice: Decimal
1095
- shippingTaxFactor: Decimal
1096
- shippingTaxTotal: Decimal
1109
+ shippingTaxFactor?: Decimal
1110
+ shippingTax: Decimal
1097
1111
  shippingTotal: Decimal
1112
+
1098
1113
  shippingProductNumber: string
1099
1114
  shippingDescription: string
1100
1115
  tags: Array<string>
@@ -1108,6 +1123,16 @@ declare interface Delivery_2 {
1108
1123
  shippingDiscounts: Array<Discount_2>
1109
1124
  }
1110
1125
 
1126
+ declare function deserialize(json: string, options?: DeserializeOptions): any;
1127
+
1128
+ export declare interface DeserializeOptions {
1129
+ /**
1130
+ * When true, objects containing an array property named "nodes" are replaced
1131
+ * by that array, flattening graph query responses for easier consumption.
1132
+ */
1133
+ graph?: boolean;
1134
+ }
1135
+
1111
1136
  export declare type Dialogs = ReturnType<typeof useDialogs>;
1112
1137
 
1113
1138
  declare interface Discount {
@@ -1530,6 +1555,11 @@ export declare interface GraphQueryNavigation {
1530
1555
 
1531
1556
  export declare type GraphQueryRequire = 'any' | 'some' | 'none' | boolean;
1532
1557
 
1558
+ export declare interface GraphQueryWarning {
1559
+ code: string;
1560
+ message: string;
1561
+ }
1562
+
1533
1563
  declare interface GraphValueTypeArray {
1534
1564
  type: 'array'
1535
1565
  itemType: GraphValueTypeMeta
@@ -1594,6 +1624,15 @@ declare interface GraphValueTypeScalar_2 {
1594
1624
  scalarType: 'string' | 'instant' | 'decimal' | 'boolean' | 'uuid' | 'any';
1595
1625
  }
1596
1626
 
1627
+ export declare namespace HanteraJson {
1628
+ export {
1629
+ serialize,
1630
+ deserialize,
1631
+ createReviver,
1632
+ DeserializeOptions
1633
+ }
1634
+ }
1635
+
1597
1636
  export declare interface Host {
1598
1637
  /**
1599
1638
  * Send a message to the portal host
@@ -1803,6 +1842,7 @@ export declare interface JsonTableResponse {
1803
1842
  totalCount?: default_2;
1804
1843
  headers: string[];
1805
1844
  rows: Array<Array<unknown>>;
1845
+ warnings?: GraphQueryWarning[];
1806
1846
  }
1807
1847
 
1808
1848
  export declare interface LegacyActivityLog {
@@ -2602,7 +2642,7 @@ declare interface OrderLine {
2602
2642
  reservedQuantity: default_2;
2603
2643
  salesQuantity: default_2;
2604
2644
  unitPrice: default_2;
2605
- taxFactor: default_2;
2645
+ taxFactor?: default_2;
2606
2646
  taxTotal: default_2;
2607
2647
  orderLineTotal: default_2;
2608
2648
  dynamic: Record<string, any>;
@@ -2624,8 +2664,9 @@ declare interface OrderLine_2 {
2624
2664
  reservedQuantity: Decimal
2625
2665
  salesQuantity: Decimal
2626
2666
  unitPrice: Decimal
2627
- taxFactor: Decimal
2667
+ taxFactor?: Decimal
2628
2668
  taxTotal: Decimal
2669
+
2629
2670
  orderLineTotal: Decimal
2630
2671
  dynamic: Record<string, any>
2631
2672
  releasedToInvoice: boolean
@@ -2665,7 +2706,30 @@ declare interface OrderProduct {
2665
2706
  taxFactor?: default_2;
2666
2707
  }
2667
2708
 
2709
+ /**
2710
+ * Append-only extension of a graph query node, used by apps to add fields and
2711
+ * navigations to the foundational order view query. Apps can only add; existing
2712
+ * fields and navigations are never removed.
2713
+ */
2714
+ declare interface OrderQueryNodeExtension {
2715
+ fields?: string[];
2716
+ navigate?: {
2717
+ edge: string;
2718
+ node: OrderQueryNodeExtension;
2719
+ }[];
2720
+ }
2721
+
2668
2722
  declare const orderView: {
2723
+ /**
2724
+ * Allows services to extend the foundational order view graph query with
2725
+ * additional fields and navigations. Extensions are append-only: existing
2726
+ * fields and navigations are never removed. This lets apps surface their own
2727
+ * typed fields (including registry-defined dynamic fields) on the order view
2728
+ * state instead of reading and coercing values from the dynamic bag manually.
2729
+ */
2730
+ queryExtensionProvider: AppService< {
2731
+ extendOrderQuery(): OrderQueryNodeExtension;
2732
+ }>;
2669
2733
  /**
2670
2734
  * Allows services to extend the details tabs of the standard order view
2671
2735
  */
@@ -3193,6 +3257,8 @@ declare interface SearchProduct {
3193
3257
  dynamic?: Record<string, any>;
3194
3258
  }
3195
3259
 
3260
+ declare function serialize(value: unknown): string;
3261
+
3196
3262
  export declare interface ServiceContext {
3197
3263
  processes: Processes;
3198
3264
  backend: BackendApi;
@@ -3814,6 +3880,7 @@ export declare namespace standardServices {
3814
3880
  OrderProduct,
3815
3881
  SearchProduct,
3816
3882
  shippingProductsService,
3883
+ OrderQueryNodeExtension,
3817
3884
  productsService,
3818
3885
  orderView,
3819
3886
  legacyOrderView
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hantera/portal-app",
3
- "version": "20260617.0.0-develop.1",
3
+ "version": "20260803.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"