Skip to content

Commit 5bc3052

Browse files
authored
Add executedAt, returnId, exchangeId to transaction complete event target (#2943)
* add `executedAt`, `returnId`, `exchangeId` to transaction complete event target. * add changeset.
1 parent 6923208 commit 5bc3052

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

.changeset/gold-students-remember.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/ui-extensions': minor
3+
---
4+
5+
add `executedAt`, `exchangeId`, `returnId` to transaction complete event interface.

packages/ui-extensions/docs/surfaces/point-of-sale/staticPages/pages/versions.doc.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ Refer to the [migration guide](/docs/api/pos-ui-extensions/migrating) for more i
6161
6262
- Added required \`posVersion\` property to \`Session\` interface.
6363
- Added optional \`currency\` property to \`Discount\` interface.
64+
- Added \`executedAt\` property to \`BaseTransactionComplete\` interface.
65+
- Added optional \`exchangeId\` and \`returnId\` property to \`ReturnTransactionData\` interface.
6466
6567
`,
6668
},

packages/ui-extensions/src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@ import {LineItem} from '../../types/cart';
33

44
export interface ReturnTransactionData extends BaseTransactionComplete {
55
transactionType: 'Return';
6+
returnId?: number;
7+
exchangeId?: number;
68
lineItems: LineItem[];
79
}

packages/ui-extensions/src/surfaces/point-of-sale/types/base-transaction-complete.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ export interface BaseTransactionComplete {
1717
balanceDue: Money;
1818
shippingLines?: ShippingLine[];
1919
taxLines?: TaxLine[];
20+
executedAt: string;
2021
}

0 commit comments

Comments
 (0)