@@ -3,12 +3,17 @@ import type { CollectionBulkActionPermissionConditionConfig } from '../../collec
33import type { SwitchConditionConfig } from './switch.condition.js' ;
44import type { UmbConditionConfigBase } from '@umbraco-cms/backoffice/extension-api' ;
55
6- export type ConditionTypes =
6+ export type UmbCoreConditionConfigs =
77 | CollectionAliasConditionConfig
88 | CollectionBulkActionPermissionConditionConfig
99 | SwitchConditionConfig
1010 | UmbConditionConfigBase ;
1111
12+ /**
13+ * @deprecated instead use global UmbExtensionConditionConfig
14+ */
15+ export type ConditionTypes = UmbCoreConditionConfigs ;
16+
1217type UnionOfProperties < T > = T extends object ? T [ keyof T ] : never ;
1318
1419declare global {
@@ -17,27 +22,27 @@ declare global {
1722 * @example
1823 ```js
1924 declare global {
20- interface UmbExtensionConditionMap {
25+ interface UmbExtensionConditionConfigMap {
2126 My_UNIQUE_CONDITION_NAME: MyExtensionConditionType;
2227 }
2328 }
2429 ```
2530 If you have multiple types, you can declare them in this way:
2631 ```js
2732 declare global {
28- interface UmbExtensionConditionMap {
33+ interface UmbExtensionConditionConfigMap {
2934 My_UNIQUE_CONDITION_NAME: MyExtensionConditionTypeA | MyExtensionConditionTypeB;
3035 }
3136 }
3237 ```
3338 */
34- interface UmbExtensionConditionMap {
35- UMB_CORE : ConditionTypes ;
39+ interface UmbExtensionConditionConfigMap {
40+ UMB_CORE : UmbCoreConditionConfigs ;
3641 }
3742
3843 /**
3944 * This global type provides a union of all declared manifest types.
4045 * If this is a local package that declares additional Manifest Types, then these will also be included in this union.
4146 */
42- type UmbExtensionCondition = UnionOfProperties < UmbExtensionConditionMap > ;
47+ type UmbExtensionConditionConfig = UnionOfProperties < UmbExtensionConditionConfigMap > ;
4348}
0 commit comments