@final-commerce/command-frame 0.1.49 → 0.1.50

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.
@@ -484,9 +484,10 @@ export interface CFActiveCustomSales {
484
484
  discount?: any;
485
485
  fee?: any;
486
486
  }
487
- /** Non-revenue cart line (e.g. gift card load) — aligned with Render NonRevenueItem */
487
+ /** Non-revenue cart line (e.g. gift card load) — aligned with Render `NonRevenueItem.externalId` (order line id). */
488
488
  export interface CFNonRevenueItem {
489
- id: string;
489
+ /** Unique cart/order line id (Mongo-style id from host). Extension reference is usually `metadata.refId`. */
490
+ externalId: string;
490
491
  amount: number | string;
491
492
  label?: string;
492
493
  metadata?: Record<string, unknown>;
@@ -12,7 +12,7 @@ export const mockAddNonRevenueItem = async (params) => {
12
12
  refId
13
13
  };
14
14
  const row = {
15
- id: lineId,
15
+ externalId: lineId,
16
16
  amount,
17
17
  applyTaxes: params.applyTaxes === true,
18
18
  ...(params.taxTableId ? { taxTableId: params.taxTableId } : {}),
@@ -29,7 +29,7 @@ export const mockAddNonRevenueItem = async (params) => {
29
29
  MOCK_CART.subtotal = (MOCK_CART.subtotal ?? 0) + amount;
30
30
  return {
31
31
  success: true,
32
- id: lineId,
32
+ externalId: lineId,
33
33
  refId,
34
34
  amount,
35
35
  label: params.label,
@@ -22,8 +22,8 @@ export interface AddNonRevenueItemParams {
22
22
  }
23
23
  export interface AddNonRevenueItemResponse {
24
24
  success: true;
25
- /** Unique cart line id (use for remove / correlation) */
26
- id: string;
25
+ /** Unique cart line id (same as `cart.nonRevenueItems[].externalId`; use for remove / correlation). */
26
+ externalId: string;
27
27
  /** Same as request `id` — extension reference */
28
28
  refId: string;
29
29
  amount: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@final-commerce/command-frame",
3
- "version": "0.1.49",
3
+ "version": "0.1.50",
4
4
  "description": "Commands Frame library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",