Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Admin Extension Docs] Add resourcePicker to Action Extension Api docs #2477

Open
wants to merge 3 commits into
base: unstable
Choose a base branch
from
Open
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
12 changes: 12 additions & 0 deletions packages/ui-extensions/src/surfaces/admin/api/action/action.ts
Original file line number Diff line number Diff line change
@@ -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<ExtensionTarget extends AnyExtensionTarget>
extends StandardApi<ExtensionTarget> {
Expand All @@ -13,4 +15,14 @@ export interface ActionExtensionApi<ExtensionTarget extends AnyExtensionTarget>
* 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;
MitchLillie marked this conversation as resolved.
Show resolved Hide resolved

/**
* Renders a custom [Picker](picker) dialog allowing users to select values from a list.
*/
picker: PickerApi;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
Loading