File tree Expand file tree Collapse file tree 6 files changed +45
-11
lines changed
packages/ui-extensions/src/surfaces/admin Expand file tree Collapse file tree 6 files changed +45
-11
lines changed Original file line number Diff line number Diff line change @@ -9,3 +9,5 @@ export type {ProductDetailsConfigurationApi} from './api/product-configuration/p
99export type { ProductVariantDetailsConfigurationApi } from './api/product-configuration/product-variant-details-configuration' ;
1010export type { OrderRoutingRuleApi } from './api/order-routing-rule/order-routing-rule' ;
1111export type { ValidationSettingsApi } from './api/checkout-rules/validation-settings' ;
12+ export type { MetaobjectDetailsBlockApi } from './api/custom-data/metaobject-details' ;
13+ export type { MetaobjectDetailsActionApi } from './api/custom-data/metaobject-details' ;
Original file line number Diff line number Diff line change @@ -65,3 +65,11 @@ type MetafieldsChange =
6565
6666export type SupportedDefinitionType = ( typeof supportedDefinitionTypes ) [ number ] ;
6767export type ApplyMetafieldsChange = ( changes : MetafieldsChange [ ] ) => void ;
68+
69+ export interface Metafield {
70+ id ?: string | null ;
71+ key : string ;
72+ value ?: string | null ;
73+ namespace ?: string ;
74+ type ?: SupportedDefinitionType ;
75+ }
Original file line number Diff line number Diff line change 1+ import { BlockExtensionApi } from '../block/block' ;
2+ import { ActionExtensionApi } from '../action/action' ;
3+ import type { ExtensionTarget as AnyExtensionTarget } from '../../extension-targets' ;
4+
5+ import { ApplyMetafieldsChange } from '../custom-data/metafields' ;
6+
7+ export interface MetaobjectDetailsBlockApi <
8+ ExtensionTarget extends AnyExtensionTarget ,
9+ > extends BlockExtensionApi < ExtensionTarget > {
10+ applyMetafieldsChange : ApplyMetafieldsChange ;
11+ data : {
12+ selected : {
13+ id : string ;
14+ definitionType : string ;
15+ } [ ] ;
16+ } ;
17+ }
18+
19+ export interface MetaobjectDetailsActionApi <
20+ ExtensionTarget extends AnyExtensionTarget ,
21+ > extends ActionExtensionApi < ExtensionTarget > {
22+ applyMetafieldsChange : ApplyMetafieldsChange ;
23+ data : {
24+ selected : {
25+ id : string ;
26+ definitionType : string ;
27+ } [ ] ;
28+ } ;
29+ }
Original file line number Diff line number Diff line change 1- import type { SupportedDefinitionType } from './metafields' ;
1+ import type { Metafield } from '../custom-data /metafields' ;
22
3- interface Metafield {
4- id ?: string | null ;
5- key : string ;
6- value ?: string | null ;
7- namespace ?: string ;
8- type ?: SupportedDefinitionType ;
9- }
103
114interface OrderRoutingRule {
125 label : string ;
Original file line number Diff line number Diff line change 11import type { StandardApi } from '../standard/standard' ;
22import type { ExtensionTarget as AnyExtensionTarget } from '../../extension-targets' ;
33
4- import { ApplyMetafieldsChange } from './metafields' ;
4+ import { ApplyMetafieldsChange } from '../custom-data /metafields' ;
55import { Data } from './data' ;
66
77export interface OrderRoutingRuleApi < ExtensionTarget extends AnyExtensionTarget >
Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ import type {
1111 ProductVariantDetailsConfigurationApi ,
1212 OrderRoutingRuleApi ,
1313 ValidationSettingsApi ,
14+ MetaobjectDetailsBlockApi ,
15+ MetaobjectDetailsActionApi
1416} from './api' ;
1517import { AnyComponentBuilder } from '../../shared' ;
1618import { PurchaseOptionsCardConfigurationApi } from './api/purchase-options-card-action/purchase-options-card-action' ;
@@ -185,7 +187,7 @@ export interface ExtensionTargets {
185187 * See the [list of available components](/docs/api/admin-extensions/components).
186188 */
187189 'admin.metaobject-details.block.render' : RenderExtension <
188- BlockExtensionApi < 'admin.metaobject-details.block.render' > ,
190+ MetaobjectDetailsBlockApi < 'admin.metaobject-details.block.render' > ,
189191 AllComponents | CustomDataComponents
190192 > ;
191193
@@ -296,7 +298,7 @@ export interface ExtensionTargets {
296298 * See the [list of available components](/docs/api/admin-extensions/components).
297299 */
298300 'admin.metaobject-details.action.render' : RenderExtension <
299- ActionExtensionApi < 'admin.metaobject-details.action.render' > ,
301+ MetaobjectDetailsActionApi < 'admin.metaobject-details.action.render' > ,
300302 AllComponents | CustomDataComponents
301303 > ;
302304
You can’t perform that action at this time.
0 commit comments