File tree 6 files changed +45
-12
lines changed
packages/ui-extensions/src/surfaces/admin
6 files changed +45
-12
lines changed Original file line number Diff line number Diff line change @@ -9,3 +9,5 @@ export type {ProductDetailsConfigurationApi} from './api/product-configuration/p
9
9
export type { ProductVariantDetailsConfigurationApi } from './api/product-configuration/product-variant-details-configuration' ;
10
10
export type { OrderRoutingRuleApi } from './api/order-routing-rule/order-routing-rule' ;
11
11
export 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 =
65
65
66
66
export type SupportedDefinitionType = ( typeof supportedDefinitionTypes ) [ number ] ;
67
67
export 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 type { ExtensionTarget as AnyExtensionTarget } from '../../extension-targets' ;
3
+ import { ActionExtensionApi } from '../action/action' ;
4
+
5
+ import { ApplyMetafieldsChange } from './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' ;
2
-
3
- interface Metafield {
4
- id ?: string | null ;
5
- key : string ;
6
- value ?: string | null ;
7
- namespace ?: string ;
8
- type ?: SupportedDefinitionType ;
9
- }
1
+ import type { Metafield } from '../custom-data/metafields' ;
10
2
11
3
interface OrderRoutingRule {
12
4
label : string ;
Original file line number Diff line number Diff line change 1
1
import type { StandardApi } from '../standard/standard' ;
2
2
import type { ExtensionTarget as AnyExtensionTarget } from '../../extension-targets' ;
3
3
4
- import { ApplyMetafieldsChange } from './metafields' ;
4
+ import { ApplyMetafieldsChange } from '../custom-data /metafields' ;
5
5
import { Data } from './data' ;
6
6
7
7
export interface OrderRoutingRuleApi < ExtensionTarget extends AnyExtensionTarget >
Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ import type {
11
11
ProductVariantDetailsConfigurationApi ,
12
12
OrderRoutingRuleApi ,
13
13
ValidationSettingsApi ,
14
+ MetaobjectDetailsBlockApi ,
15
+ MetaobjectDetailsActionApi ,
14
16
} from './api' ;
15
17
import { AnyComponentBuilder } from '../../shared' ;
16
18
import { PurchaseOptionsCardConfigurationApi } from './api/purchase-options-card-action/purchase-options-card-action' ;
@@ -185,7 +187,7 @@ export interface ExtensionTargets {
185
187
* See the [list of available components](/docs/api/admin-extensions/components).
186
188
*/
187
189
'admin.metaobject-details.block.render' : RenderExtension <
188
- BlockExtensionApi < 'admin.metaobject-details.block.render' > ,
190
+ MetaobjectDetailsBlockApi < 'admin.metaobject-details.block.render' > ,
189
191
AllComponents | CustomDataComponents
190
192
> ;
191
193
@@ -296,7 +298,7 @@ export interface ExtensionTargets {
296
298
* See the [list of available components](/docs/api/admin-extensions/components).
297
299
*/
298
300
'admin.metaobject-details.action.render' : RenderExtension <
299
- ActionExtensionApi < 'admin.metaobject-details.action.render' > ,
301
+ MetaobjectDetailsActionApi < 'admin.metaobject-details.action.render' > ,
300
302
AllComponents | CustomDataComponents
301
303
> ;
302
304
You can’t perform that action at this time.
0 commit comments