Skip to content

Commit 85e540b

Browse files
committed
Improved descriptions
TypeScript error fix
1 parent e7e3ad6 commit 85e540b

File tree

104 files changed

+697
-564
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+697
-564
lines changed

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

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,15 @@ const generateCodeBlockForActionApi = (title: string, fileName: string) =>
77

88
const data: ReferenceEntityTemplateSchema = {
99
name: 'Action API',
10-
description: `
11-
The Action API allows an action extension to modally present its corresponding modal target.
12-
13-
#### Supporting targets
14-
- ${TargetLink.PosHomeTileRender}
15-
- ${TargetLink.PosPurchasePostActionMenuItemRender}
16-
- ${TargetLink.PosPurchasePostBlockRender}
17-
- ${TargetLink.PosOrderDetailsActionMenuItemRender}
18-
- ${TargetLink.PosOrderDetailsBlockRender}
19-
- ${TargetLink.PosProductDetailsActionMenuItemRender}
20-
- ${TargetLink.PosCustomerDetailsActionMenuItemRender}
21-
- ${TargetLink.PosCustomerDetailsBlockRender}
22-
- ${TargetLink.PosDraftOrderDetailsActionMenuItemRender}
23-
- ${TargetLink.PosDraftOrderDetailsBlockRender}
24-
`,
10+
description:
11+
'The Action API provides modal presentation functionality for POS UI extensions, allowing you to launch full-screen modal interfaces from menu items, tiles, and block targets. The API enables navigation between different targets within your extension.',
2512
isVisualComponent: false,
2613
type: 'APIs',
2714
definitions: [
2815
{
2916
title: 'ActionApi',
30-
description: '',
17+
description:
18+
'The `ActionApi` object provides methods for presenting modal interfaces. Access these methods through `api.action` to launch full-screen modal experiences.',
3119
type: 'ActionApiContent',
3220
},
3321
],

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

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,15 @@ const generateCodeBlockForCartApi = (title: string, fileName: string) =>
77

88
const data: ReferenceEntityTemplateSchema = {
99
name: 'Cart API',
10-
description: `
11-
The Cart API enables UI Extensions to manage and interact with POS cart contents, such as discounts, line items, and customer details. It provides a comprehensive set of functions for adding and removing items, alongside a subscribable object that keeps the UI Extension updated with real-time changes to the cart.
12-
13-
#### Supporting targets
14-
- ${TargetLink.PosHomeTileRender}
15-
- ${TargetLink.PosHomeModalRender}
16-
- ${TargetLink.PosProductDetailsActionMenuItemRender}
17-
- ${TargetLink.PosProductDetailsActionRender}
18-
- ${TargetLink.PosCustomerDetailsActionMenuItemRender}
19-
- ${TargetLink.PosCustomerDetailsActionRender}
20-
- ${TargetLink.PosCustomerDetailsBlockRender}
21-
- ${TargetLink.PosOrderDetailsActionMenuItemRender}
22-
- ${TargetLink.PosOrderDetailsActionRender}
23-
- ${TargetLink.PosOrderDetailsBlockRender}
24-
- ${TargetLink.PosDraftOrderDetailsActionMenuItemRender}
25-
- ${TargetLink.PosDraftOrderDetailsActionRender}
26-
- ${TargetLink.PosDraftOrderDetailsBlockRender}
27-
`,
10+
description:
11+
'The Cart API provides comprehensive access to POS cart management functionality, enabling extensions to read cart state, modify line items, apply discounts, manage customer information, and handle cart properties through a subscribable interface that delivers real-time updates. The API supports both individual and bulk operations for efficient cart manipulation.',
2812
isVisualComponent: false,
2913
type: 'APIs',
3014
definitions: [
3115
{
3216
title: 'CartApi',
33-
description: '',
17+
description:
18+
'The `CartApi` object provides access to cart management methods and subscribable cart state. Access these methods through `api.cart` to build cart-aware extensions that respond to real-time cart updates.',
3419
type: 'CartApiContent',
3520
},
3621
],

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ const generateCodeBlockForConnectivityApi = (title: string, fileName: string) =>
77
const data: ReferenceEntityTemplateSchema = {
88
name: 'Connectivity API',
99
description:
10-
'The Connectivity API enables POS UI extensions to retrieve device connectivity information, such as whether the device has an internet connection.',
10+
'The Connectivity API provides access to device connectivity information, allowing you to monitor Internet connection status and respond to connectivity changes in real-time. The API enables both immediate connectivity checks and dynamic updates when network conditions change.',
1111
isVisualComponent: false,
1212
type: 'APIs',
1313
definitions: [
1414
{
1515
title: 'ConnectivityApi',
16-
description: '',
16+
description:
17+
'The `ConnectivityApi` object provides methods for monitoring network connectivity. Access these methods through `api.connectivity` to check connection status and subscribe to connectivity changes.',
1718
type: 'ConnectivityApiContent',
1819
},
1920
],

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

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,15 @@ const generateCodeBlockForCustomerApi = (title: string, fileName: string) =>
77

88
const data: ReferenceEntityTemplateSchema = {
99
name: 'Customer API',
10-
description: `
11-
The customer API provides an extension with data about the current customer.
12-
13-
#### Supporting targets
14-
- ${TargetLink.PosCustomerDetailsActionMenuItemRender}
15-
- ${TargetLink.PosCustomerDetailsActionRender}
16-
- ${TargetLink.PosCustomerDetailsBlockRender}
17-
`,
10+
description:
11+
'The Customer API provides read-only access to customer data. Use this API to get customer information and build personalized experiences based on the selected customer context. The API offers the customer identifier for linking to customer data and enabling customer-specific features.',
1812
isVisualComponent: false,
1913
type: 'APIs',
2014
definitions: [
2115
{
2216
title: 'CustomerApi',
23-
description: '',
17+
description:
18+
'The `CustomerApi` object provides access to customer data. Access this property through `api.customer` to interact with the current customer context.',
2419
type: 'CustomerApiContent',
2520
},
2621
],

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ const generateCodeBlockForDeviceApi = (title: string, fileName: string) =>
77
const data: ReferenceEntityTemplateSchema = {
88
name: 'Device API',
99
description:
10-
'The Device API allows the UI Extension to retrieve device information including the device name and ID.',
10+
'The Device API provides access to device information and capabilities, allowing you to retrieve device details, check device types, and adapt your extension behavior based on the POS hardware characteristics. The API enables device-aware functionality and responsive design based on device form factors.',
1111
isVisualComponent: false,
1212
type: 'APIs',
1313
definitions: [
1414
{
1515
title: 'DeviceApi',
16-
description: '',
16+
description:
17+
'The `DeviceApi` object provides access to device information and capabilities. Access these properties and methods through `api.device` to retrieve device details and check device characteristics.',
1718
type: 'DeviceApiContent',
1819
},
1920
],

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

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,15 @@ import {generateCodeBlock} from '../helpers/generateCodeBlock';
44

55
const data: ReferenceEntityTemplateSchema = {
66
name: 'Draft Order API',
7-
description: `
8-
The Draft Order API provides an extension with data about the current draft order.
9-
10-
11-
#### Supporting targets
12-
- ${TargetLink.PosDraftOrderDetailsActionMenuItemRender}
13-
- ${TargetLink.PosDraftOrderDetailsActionRender}
14-
- ${TargetLink.PosDraftOrderDetailsBlockRender}
15-
`,
7+
description:
8+
'The Draft Order API provides read-only access to draft order data. Use this API to get draft order information and build contextual experiences based on the selected draft order context. The API offers draft order details for implementing order-specific functionality and workflows.',
169
isVisualComponent: false,
1710
type: 'APIs',
1811
definitions: [
1912
{
2013
title: 'DraftOrderApi',
21-
description: '',
14+
description:
15+
'The `DraftOrderApi` object provides access to draft order data. Access this property through `api.draftOrder` to interact with the current draft order context.',
2216
type: 'DraftOrderApiContent',
2317
},
2418
],

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ const generateCodeBlockForLocaleApi = (title: string, fileName: string) =>
77
const data: ReferenceEntityTemplateSchema = {
88
name: 'Locale API',
99
description:
10-
"The Locale API allows the extension to retrieve the merchant's locale.",
10+
"The Locale API provides access to the merchant's current locale information in [IETF format](https://en.wikipedia.org/wiki/IETF_language_tag), allowing you to internationalize your extension content and respond to locale changes through subscription callbacks. The API provides both immediate locale access and change notifications for dynamic internationalization.",
1111
isVisualComponent: false,
1212
type: 'APIs',
1313
definitions: [
1414
{
1515
title: 'LocaleApi',
16-
description: '',
16+
description:
17+
'The `LocaleApi` object provides access to current locale information and change notifications. Access these properties through `api.locale` to retrieve and monitor locale data.',
1718
type: 'LocaleApiContent',
1819
},
1920
],

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

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,15 @@ const generateCodeBlockForNavigationApi = (title: string, fileName: string) =>
77

88
const data: ReferenceEntityTemplateSchema = {
99
name: 'Navigation API',
10-
description: `
11-
The Navigation API enables POS UI extension to navigate between screens.
12-
13-
#### Supporting targets
14-
- ${TargetLink.PosHomeModalRender}
15-
- ${TargetLink.PosPurchasePostActionRender}
16-
- ${TargetLink.PosProductDetailsActionRender}
17-
- ${TargetLink.PosOrderDetailsActionRender}
18-
- ${TargetLink.PosDraftOrderDetailsActionRender}
19-
- ${TargetLink.PosCustomerDetailsActionRender}
20-
`,
10+
description:
11+
'The Navigation API provides screen-based navigation functionality for POS UI extensions, allowing you to navigate between screens, manage navigation stacks, and dismiss modal interfaces within full-screen modal workflows. The API enables multi-screen experiences with parameter passing and navigation control.',
2112
isVisualComponent: false,
2213
type: 'APIs',
2314
definitions: [
2415
{
2516
title: 'NavigationApi',
26-
description: '',
17+
description:
18+
'The global `navigation` object provides web-standard navigation functionality. Access these properties and methods directly through the global `navigation` object to manage navigation within modal interfaces.',
2719
type: 'NavigationApiContent',
2820
},
2921
],

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

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,15 @@ const generateCodeBlockForOrderApi = (title: string, fileName: string) =>
77

88
const data: ReferenceEntityTemplateSchema = {
99
name: 'Order API',
10-
description: `
11-
The Order API provides an extension with data about the current order.
12-
13-
#### Supporting targets
14-
- ${TargetLink.PosPurchasePostActionMenuItemRender}
15-
- ${TargetLink.PosPurchasePostActionRender}
16-
- ${TargetLink.PosPurchasePostBlockRender}
17-
- ${TargetLink.PosOrderDetailsActionMenuItemRender}
18-
- ${TargetLink.PosOrderDetailsActionRender}
19-
- ${TargetLink.PosOrderDetailsBlockRender}
20-
`,
10+
description:
11+
'The Order API provides read-only access to order data. Use this API to get order information and build contextual experiences based on the selected order context. The API offers order details for implementing order-specific functionality and workflows.',
2112
isVisualComponent: false,
2213
type: 'APIs',
2314
definitions: [
2415
{
2516
title: 'OrderApi',
26-
description: '',
17+
description:
18+
'The `OrderApi` object provides access to order data. Access this property through `api.order` to interact with the current order context.',
2719
type: 'OrderApiContent',
2820
},
2921
],

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,20 @@ const generateCodeBlockForPrintApi = (title: string, fileName: string) =>
99

1010
const data: ReferenceEntityTemplateSchema = {
1111
name: 'Print API',
12-
description: `The Print API enables document printing through the device's native print dialog (such as AirPrint on iOS or the system print dialog on Android). This API is designed for printing documents to standard printers, and does not support direct printing to receipt printers.`,
12+
description:
13+
'The Print API enables document printing functionality in your POS UI extension. Use this API to trigger the native print dialog for your documents.' +
14+
'\n\nSupported document types:' +
15+
'\n\n- **HTML documents** (`.html`, `.htm`) - Best printing experience with full CSS styling, embedded images, and complex layouts. Use for receipts, invoices, and formatted reports.' +
16+
'\n- **Text files** (`.txt`, `.csv`) - Plain text with basic content and tabular data support. Use for simple receipts and data exports.' +
17+
'\n- **Image files** (`.png`, `.jpg`, `.jpeg`, `.gif`, `.bmp`, `.webp`) - Common web formats with format-specific optimizations. Use for logos, charts, QR codes, and barcodes.' +
18+
'\n- **PDF files** (`.pdf`) - Behavior varies by platform: prints directly on iOS/desktop, but downloads to external viewer on Android. Use for complex documents and compliance requirements.',
1319
isVisualComponent: false,
1420
type: 'APIs',
1521
definitions: [
1622
{
1723
title: 'PrintApi',
18-
description: 'Interface for handling print operations',
24+
description:
25+
'The `PrintApi` object provides methods for triggering document printing. Access these methods through `api.print` to initiate print operations with various document types.',
1926
type: 'PrintApiContent',
2027
},
2128
],

0 commit comments

Comments
 (0)