Skip to content

Commit 8e96f10

Browse files
authored
Update POS post-exchange and post-return target examples (#3022)
* fix post-exchange and post-return code examples. * update storage api description.
1 parent a545724 commit 8e96f10

File tree

8 files changed

+9
-7
lines changed

8 files changed

+9
-7
lines changed

packages/ui-extensions/docs/surfaces/point-of-sale/reference/apis/storage-api.doc.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ const generateCodeBlockForStorageApi = (title: string, fileName: string) =>
88
const data: ReferenceEntityTemplateSchema = {
99
name: 'Storage API',
1010
description: `The Storage API allows fetching, setting, updating, and clearing an extension's data from the POS local storage.
11+
- An extension can store up to 100 entries.
12+
- The maximum size for a key is ~1 KB, and for a value is ~1 MB.
1113
- If a target (such as \`pos.home.tile.render\`) is disabled or removed, the extension data remains.
1214
- All stored extension data that has not been updated for a month is cleared automatically after that period.
1315

packages/ui-extensions/docs/surfaces/point-of-sale/reference/examples/targets/pos-exchange-post-action-render.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const ExchangeAction = () => {
1515
<Navigator>
1616
<Screen name="ExchangeDetails" title="Exchange Details">
1717
<ScrollView>
18-
<Text>{`Exchange ID: ${api.exchange.id}`}</Text>
18+
<Text>{`Order ID: ${api.order.id}`}</Text>
1919
</ScrollView>
2020
</Screen>
2121
</Navigator>

packages/ui-extensions/docs/surfaces/point-of-sale/reference/examples/targets/pos-exchange-post-block-render.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default extension('pos.exchange.post.block.render', (root, api) => {
1414
mainText.append('Exchange block extension');
1515

1616
const subtitleText = root.createComponent(Text);
17-
subtitleText.append(`Exchange ID: ${api.exchange.id}`);
17+
subtitleText.append(`Order ID: ${api.order.id}`);
1818

1919
const blockMainRow = root.createComponent(POSBlockRow);
2020
blockMainRow.append(mainText);

packages/ui-extensions/docs/surfaces/point-of-sale/reference/examples/targets/pos-exchange-post-block-render.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const ExchangeBlock = () => {
1919
>
2020
<POSBlockRow>
2121
<Text>{'Exchange block extension'}</Text>
22-
<Text>{`Exchange ID: ${api.exchange.id}`}</Text>
22+
<Text>{`Order ID: ${api.order.id}`}</Text>
2323
</POSBlockRow>
2424
</POSBlock>
2525
);

packages/ui-extensions/docs/surfaces/point-of-sale/reference/examples/targets/pos-return-post-action-render.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default extension('pos.return.post.action.render', (root, api) => {
1515
const scrollView = root.createComponent(ScrollView);
1616
const text = root.createComponent(Text);
1717

18-
text.append(`Return ID: ${api.return.id}`);
18+
text.append(`Order ID: ${api.order.id}`);
1919
scrollView.append(text);
2020
screen.append(scrollView);
2121
navigator.append(screen);

packages/ui-extensions/docs/surfaces/point-of-sale/reference/examples/targets/pos-return-post-action-render.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const ReturnAction = () => {
1515
<Navigator>
1616
<Screen name="ReturnDetails" title="Return Details">
1717
<ScrollView>
18-
<Text>{`Return ID: ${api.return.id}`}</Text>
18+
<Text>{`Order ID: ${api.order.id}`}</Text>
1919
</ScrollView>
2020
</Screen>
2121
</Navigator>

packages/ui-extensions/docs/surfaces/point-of-sale/reference/examples/targets/pos-return-post-block-render.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default extension('pos.return.post.block.render', (root, api) => {
1414
mainText.append('Return block extension');
1515

1616
const subtitleText = root.createComponent(Text);
17-
subtitleText.append(`Return ID: ${api.return.id}`);
17+
subtitleText.append(`Order ID: ${api.order.id}`);
1818

1919
const blockMainRow = root.createComponent(POSBlockRow);
2020
blockMainRow.append(mainText);

packages/ui-extensions/docs/surfaces/point-of-sale/reference/examples/targets/pos-return-post-block-render.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const ReturnBlock = () => {
1616
>
1717
<POSBlockRow>
1818
<Text>{'Return block extension'}</Text>
19-
<Text>{`Return ID: ${api.return.id}`}</Text>
19+
<Text>{`Order ID: ${api.order.id}`}</Text>
2020
</POSBlockRow>
2121
</POSBlock>
2222
);

0 commit comments

Comments
 (0)