Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/pos-resolution-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/ui-extensions': minor
---

Add the POS Resolution API types.
4 changes: 4 additions & 0 deletions packages/ui-extensions/src/surfaces/point-of-sale/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ export type {
ExtensionApiContent,
} from './api/extension-api/extension-api';
export type {ActionTargetApi} from './api/action-target-api/action-target-api';
export type {
ResolutionApi,
ResolutionApiContent,
} from './api/resolution-api/resolution-api';
export type {DataTargetApi} from './api/data-target-api/data-target-api';
export type {
TransactionCompleteEvent,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import type {ReadonlySignalLike} from '../../../../shared';
import type {ShopifyInterceptMap} from '../../events';

/**
* Provides access to the intercepted workflow that initiated a resolution flow.
*
* @private
*/
export interface ResolutionApiContent {
/** The intercepted workflow event being resolved. */
event: ReadonlySignalLike<ShopifyInterceptMap[keyof ShopifyInterceptMap]>;
}

/**
* Provides access to the current resolution context.
*
* @private
*/
export interface ResolutionApi {
resolution: ResolutionApiContent;
}
Loading