diff --git a/packages/ui-extensions/src/surfaces/admin/api/action/action.ts b/packages/ui-extensions/src/surfaces/admin/api/action/action.ts index ac4675c7ec..12fae510fc 100644 --- a/packages/ui-extensions/src/surfaces/admin/api/action/action.ts +++ b/packages/ui-extensions/src/surfaces/admin/api/action/action.ts @@ -1,6 +1,8 @@ import type {StandardApi} from '../standard/standard'; import type {ExtensionTarget as AnyExtensionTarget} from '../../extension-targets'; import type {Data} from '../shared'; +import type {ResourcePickerApi} from '../resource-picker/resource-picker'; +import type {PickerApi} from '../picker/picker'; export interface ActionExtensionApi extends StandardApi { @@ -13,4 +15,14 @@ export interface ActionExtensionApi * Information about the currently viewed or selected items. */ data: Data; + + /** + * Renders the [Resource Picker](resource-picker), allowing users to select a resource for the extension to use as part of its flow. + */ + resourcePicker: ResourcePickerApi; + + /** + * Renders a custom [Picker](picker) dialog allowing users to select values from a list. + */ + picker: PickerApi; } diff --git a/packages/ui-extensions/src/surfaces/admin/api/picker/picker.doc.ts b/packages/ui-extensions/src/surfaces/admin/api/picker/picker.doc.ts index fc8221df48..615078173e 100644 --- a/packages/ui-extensions/src/surfaces/admin/api/picker/picker.doc.ts +++ b/packages/ui-extensions/src/surfaces/admin/api/picker/picker.doc.ts @@ -11,7 +11,7 @@ const data: ReferenceEntityTemplateSchema = { category: 'API', thumbnail: 'picker.png', requires: - 'an [Admin block extension](/docs/api/admin-extensions/unstable/extension-targets#block-locations)', + 'an Admin [block](/docs/api/admin-extensions/unstable/extension-targets#block-locations), [action](/docs/api/admin-extensions/unstable/extension-targets#action-locations), or [print](/docs/api/admin-extensions/unstable/extension-targets#print-locations) extension.', defaultExample: { image: 'picker.png', codeblock: { diff --git a/packages/ui-extensions/src/surfaces/admin/api/print-action/print-action.ts b/packages/ui-extensions/src/surfaces/admin/api/print-action/print-action.ts index 34eba6b516..c3f393afc8 100644 --- a/packages/ui-extensions/src/surfaces/admin/api/print-action/print-action.ts +++ b/packages/ui-extensions/src/surfaces/admin/api/print-action/print-action.ts @@ -1,6 +1,8 @@ import type {StandardApi} from '../standard/standard'; import type {ExtensionTarget as AnyExtensionTarget} from '../../extension-targets'; import type {Data} from '../shared'; +import type {ResourcePickerApi} from '../resource-picker/resource-picker'; +import type {PickerApi} from '../picker/picker'; export interface PrintActionExtensionApi< ExtensionTarget extends AnyExtensionTarget, @@ -9,4 +11,14 @@ export interface PrintActionExtensionApi< * Information about the currently viewed or selected items. */ data: Data; + + /** + * Renders the [Resource Picker](resource-picker), allowing users to select a resource for the extension to use as part of its flow. + */ + resourcePicker: ResourcePickerApi; + + /** + * Renders a custom [Picker](picker) dialog allowing users to select values from a list. + */ + picker: PickerApi; } diff --git a/packages/ui-extensions/src/surfaces/admin/api/resource-picker/resource-picker.doc.ts b/packages/ui-extensions/src/surfaces/admin/api/resource-picker/resource-picker.doc.ts index f6a0e6a569..b139be0620 100644 --- a/packages/ui-extensions/src/surfaces/admin/api/resource-picker/resource-picker.doc.ts +++ b/packages/ui-extensions/src/surfaces/admin/api/resource-picker/resource-picker.doc.ts @@ -12,7 +12,7 @@ const data: ReferenceEntityTemplateSchema = { category: 'API', thumbnail: 'resource-picker.png', requires: - 'an [Admin block extension](/docs/api/admin-extensions/unstable/extension-targets#block-locations)', + 'an Admin [block](/docs/api/admin-extensions/unstable/extension-targets#block-locations), [action](/docs/api/admin-extensions/unstable/extension-targets#action-locations), or [print](/docs/api/admin-extensions/unstable/extension-targets#print-locations) extension.', defaultExample: { image: 'resource-picker.png', codeblock: {