mirror of https://github.com/abpframework/abp.git
Browse Source
Strengthen TypeScript model typings across several ABP proxy models: make many previously-optional fields required, replace nullable union types with stricter types (remove | null in many places), convert nullable arrays/objects to concrete arrays/records, and normalize a few property types (e.g. LocalizableString.resource). Updated files: application-configurations/object-extending/models.ts, asp-net-core/mvc/multi-tenancy/models.ts, http/modeling/models.ts. Also added an export for './lib/proxy/volo/abp/multi-tenancy' to public-api.ts so the multi-tenancy proxies are publicly available.pull/25051/head
4 changed files with 208 additions and 236 deletions
@ -1,109 +1,87 @@ |
|||
|
|||
export interface EntityExtensionDto { |
|||
properties?: Record<string, ExtensionPropertyDto>; |
|||
configuration?: Record<string, object>; |
|||
} |
|||
|
|||
export interface ExtensionEnumDto { |
|||
fields?: ExtensionEnumFieldDto[]; |
|||
localizationResource?: string | null; |
|||
} |
|||
|
|||
export interface ExtensionEnumFieldDto { |
|||
name?: string | null; |
|||
value?: object | null; |
|||
} |
|||
|
|||
export interface ExtensionPropertyApiCreateDto { |
|||
isAvailable?: boolean; |
|||
} |
|||
|
|||
export interface ExtensionPropertyApiDto { |
|||
onGet?: ExtensionPropertyApiGetDto; |
|||
onCreate?: ExtensionPropertyApiCreateDto; |
|||
onUpdate?: ExtensionPropertyApiUpdateDto; |
|||
} |
|||
|
|||
export interface ExtensionPropertyApiGetDto { |
|||
isAvailable?: boolean; |
|||
} |
|||
|
|||
export interface ExtensionPropertyApiUpdateDto { |
|||
isAvailable?: boolean; |
|||
} |
|||
|
|||
export interface ExtensionPropertyAttributeDto { |
|||
typeSimple?: string; |
|||
config?: Record<string, object>; |
|||
} |
|||
|
|||
export interface ExtensionPropertyDto { |
|||
type?: string; |
|||
typeSimple?: string; |
|||
displayName?: LocalizableStringDto | null; |
|||
api?: ExtensionPropertyApiDto; |
|||
ui?: ExtensionPropertyUiDto; |
|||
policy?: ExtensionPropertyPolicyDto; |
|||
attributes?: ExtensionPropertyAttributeDto[]; |
|||
configuration?: Record<string, object>; |
|||
defaultValue?: object | null; |
|||
} |
|||
|
|||
export interface ExtensionPropertyFeaturePolicyDto { |
|||
features?: string[]; |
|||
requiresAll?: boolean; |
|||
} |
|||
|
|||
export interface ExtensionPropertyGlobalFeaturePolicyDto { |
|||
features?: string[]; |
|||
requiresAll?: boolean; |
|||
} |
|||
|
|||
export interface ExtensionPropertyPermissionPolicyDto { |
|||
permissionNames?: string[]; |
|||
requiresAll?: boolean; |
|||
} |
|||
|
|||
export interface ExtensionPropertyPolicyDto { |
|||
globalFeatures?: ExtensionPropertyGlobalFeaturePolicyDto; |
|||
features?: ExtensionPropertyFeaturePolicyDto; |
|||
permissions?: ExtensionPropertyPermissionPolicyDto; |
|||
} |
|||
|
|||
export interface ExtensionPropertyUiDto { |
|||
onTable?: ExtensionPropertyUiTableDto; |
|||
onCreateForm?: ExtensionPropertyUiFormDto; |
|||
onEditForm?: ExtensionPropertyUiFormDto; |
|||
lookup?: ExtensionPropertyUiLookupDto; |
|||
} |
|||
|
|||
export interface ExtensionPropertyUiFormDto { |
|||
isVisible?: boolean; |
|||
} |
|||
|
|||
export interface ExtensionPropertyUiLookupDto { |
|||
url?: string; |
|||
resultListPropertyName?: string; |
|||
displayPropertyName?: string; |
|||
valuePropertyName?: string; |
|||
filterParamName?: string; |
|||
} |
|||
|
|||
export interface ExtensionPropertyUiTableDto { |
|||
isVisible?: boolean; |
|||
} |
|||
|
|||
export interface LocalizableStringDto { |
|||
name?: string; |
|||
resource?: string | null; |
|||
} |
|||
|
|||
export interface ModuleExtensionDto { |
|||
entities?: Record<string, EntityExtensionDto>; |
|||
configuration?: Record<string, object>; |
|||
} |
|||
|
|||
export interface ObjectExtensionsDto { |
|||
modules?: Record<string, ModuleExtensionDto>; |
|||
enums?: Record<string, ExtensionEnumDto>; |
|||
} |
|||
|
|||
export interface EntityExtensionDto { |
|||
properties: Record<string, ExtensionPropertyDto>; |
|||
configuration: Record<string, object>; |
|||
} |
|||
|
|||
export interface ExtensionEnumDto { |
|||
fields: ExtensionEnumFieldDto[]; |
|||
localizationResource?: string; |
|||
} |
|||
|
|||
export interface ExtensionEnumFieldDto { |
|||
name?: string; |
|||
value: object; |
|||
} |
|||
|
|||
export interface ExtensionPropertyApiCreateDto { |
|||
isAvailable: boolean; |
|||
} |
|||
|
|||
export interface ExtensionPropertyApiDto { |
|||
onGet: ExtensionPropertyApiGetDto; |
|||
onCreate: ExtensionPropertyApiCreateDto; |
|||
onUpdate: ExtensionPropertyApiUpdateDto; |
|||
} |
|||
|
|||
export interface ExtensionPropertyApiGetDto { |
|||
isAvailable: boolean; |
|||
} |
|||
|
|||
export interface ExtensionPropertyApiUpdateDto { |
|||
isAvailable: boolean; |
|||
} |
|||
|
|||
export interface ExtensionPropertyAttributeDto { |
|||
typeSimple?: string; |
|||
config: Record<string, object>; |
|||
} |
|||
|
|||
export interface ExtensionPropertyDto { |
|||
type?: string; |
|||
typeSimple?: string; |
|||
displayName: LocalizableStringDto; |
|||
api: ExtensionPropertyApiDto; |
|||
ui: ExtensionPropertyUiDto; |
|||
attributes: ExtensionPropertyAttributeDto[]; |
|||
configuration: Record<string, object>; |
|||
defaultValue: object; |
|||
} |
|||
|
|||
export interface ExtensionPropertyUiDto { |
|||
onTable: ExtensionPropertyUiTableDto; |
|||
onCreateForm: ExtensionPropertyUiFormDto; |
|||
onEditForm: ExtensionPropertyUiFormDto; |
|||
lookup: ExtensionPropertyUiLookupDto; |
|||
} |
|||
|
|||
export interface ExtensionPropertyUiFormDto { |
|||
isVisible: boolean; |
|||
} |
|||
|
|||
export interface ExtensionPropertyUiLookupDto { |
|||
url?: string; |
|||
resultListPropertyName?: string; |
|||
displayPropertyName?: string; |
|||
valuePropertyName?: string; |
|||
filterParamName?: string; |
|||
} |
|||
|
|||
export interface ExtensionPropertyUiTableDto { |
|||
isVisible: boolean; |
|||
} |
|||
|
|||
export interface LocalizableStringDto { |
|||
name?: string; |
|||
resource?: string; |
|||
} |
|||
|
|||
export interface ModuleExtensionDto { |
|||
entities: Record<string, EntityExtensionDto>; |
|||
configuration: Record<string, object>; |
|||
} |
|||
|
|||
export interface ObjectExtensionsDto { |
|||
modules: Record<string, ModuleExtensionDto>; |
|||
enums: Record<string, ExtensionEnumDto>; |
|||
} |
|||
|
|||
@ -1,20 +1,20 @@ |
|||
import type { TenantUserSharingStrategy } from '../../../multi-tenancy/tenant-user-sharing-strategy.enum'; |
|||
|
|||
export interface FindTenantResultDto { |
|||
success?: boolean; |
|||
tenantId?: string | null; |
|||
name?: string | null; |
|||
normalizedName?: string | null; |
|||
isActive?: boolean; |
|||
} |
|||
|
|||
export interface CurrentTenantDto { |
|||
id?: string | null; |
|||
name?: string | null; |
|||
isAvailable?: boolean; |
|||
} |
|||
|
|||
export interface MultiTenancyInfoDto { |
|||
isEnabled?: boolean; |
|||
userSharingStrategy?: TenantUserSharingStrategy; |
|||
} |
|||
import type { TenantUserSharingStrategy } from '../../../multi-tenancy/tenant-user-sharing-strategy.enum'; |
|||
|
|||
export interface FindTenantResultDto { |
|||
success: boolean; |
|||
tenantId?: string; |
|||
name?: string; |
|||
normalizedName?: string; |
|||
isActive: boolean; |
|||
} |
|||
|
|||
export interface CurrentTenantDto { |
|||
id?: string; |
|||
name?: string; |
|||
isAvailable: boolean; |
|||
} |
|||
|
|||
export interface MultiTenancyInfoDto { |
|||
isEnabled: boolean; |
|||
userSharingStrategy?: TenantUserSharingStrategy; |
|||
} |
|||
|
|||
@ -1,107 +1,100 @@ |
|||
|
|||
export interface ActionApiDescriptionModel { |
|||
uniqueName?: string; |
|||
name?: string; |
|||
httpMethod?: string | null; |
|||
url?: string; |
|||
supportedVersions?: string[] | null; |
|||
parametersOnMethod?: MethodParameterApiDescriptionModel[]; |
|||
parameters?: ParameterApiDescriptionModel[]; |
|||
returnValue?: ReturnValueApiDescriptionModel; |
|||
allowAnonymous?: boolean | null; |
|||
authorizeDatas?: AuthorizeDataApiDescriptionModel[]; |
|||
implementFrom?: string | null; |
|||
} |
|||
|
|||
export interface ApplicationApiDescriptionModel { |
|||
modules?: Record<string, ModuleApiDescriptionModel>; |
|||
types?: Record<string, TypeApiDescriptionModel>; |
|||
} |
|||
|
|||
export interface ApplicationApiDescriptionModelRequestDto { |
|||
includeTypes?: boolean; |
|||
} |
|||
|
|||
export interface AuthorizeDataApiDescriptionModel { |
|||
policy?: string | null; |
|||
roles?: string | null; |
|||
} |
|||
|
|||
export interface ControllerApiDescriptionModel { |
|||
controllerName?: string; |
|||
controllerGroupName?: string | null; |
|||
isRemoteService?: boolean; |
|||
isIntegrationService?: boolean; |
|||
apiVersion?: string | null; |
|||
type?: string; |
|||
interfaces?: ControllerInterfaceApiDescriptionModel[]; |
|||
actions?: Record<string, ActionApiDescriptionModel>; |
|||
} |
|||
|
|||
export interface ControllerInterfaceApiDescriptionModel { |
|||
type?: string; |
|||
name?: string; |
|||
methods?: InterfaceMethodApiDescriptionModel[]; |
|||
} |
|||
|
|||
export interface InterfaceMethodApiDescriptionModel { |
|||
name?: string; |
|||
parametersOnMethod?: MethodParameterApiDescriptionModel[]; |
|||
returnValue?: ReturnValueApiDescriptionModel; |
|||
} |
|||
|
|||
export interface MethodParameterApiDescriptionModel { |
|||
name?: string; |
|||
typeAsString?: string; |
|||
type?: string; |
|||
typeSimple?: string; |
|||
isOptional?: boolean; |
|||
defaultValue?: object | null; |
|||
} |
|||
|
|||
export interface ModuleApiDescriptionModel { |
|||
rootPath?: string; |
|||
remoteServiceName?: string; |
|||
controllers?: Record<string, ControllerApiDescriptionModel>; |
|||
} |
|||
|
|||
export interface ParameterApiDescriptionModel { |
|||
nameOnMethod?: string; |
|||
name?: string; |
|||
jsonName?: string | null; |
|||
type?: string | null; |
|||
typeSimple?: string | null; |
|||
isOptional?: boolean; |
|||
defaultValue?: object | null; |
|||
constraintTypes?: string[] | null; |
|||
bindingSourceId?: string | null; |
|||
descriptorName?: string | null; |
|||
} |
|||
|
|||
export interface PropertyApiDescriptionModel { |
|||
name?: string; |
|||
jsonName?: string | null; |
|||
type?: string; |
|||
typeSimple?: string; |
|||
isRequired?: boolean; |
|||
minLength?: number | null; |
|||
maxLength?: number | null; |
|||
minimum?: string | null; |
|||
maximum?: string | null; |
|||
regex?: string | null; |
|||
isNullable?: boolean; |
|||
} |
|||
|
|||
export interface ReturnValueApiDescriptionModel { |
|||
type?: string; |
|||
typeSimple?: string; |
|||
} |
|||
|
|||
export interface TypeApiDescriptionModel { |
|||
baseType?: string | null; |
|||
isEnum?: boolean; |
|||
enumNames?: string[] | null; |
|||
enumValues?: object[] | null; |
|||
genericArguments?: string[] | null; |
|||
properties?: PropertyApiDescriptionModel[] | null; |
|||
} |
|||
|
|||
export interface ActionApiDescriptionModel { |
|||
uniqueName?: string; |
|||
name?: string; |
|||
httpMethod?: string; |
|||
url?: string; |
|||
supportedVersions: string[]; |
|||
parametersOnMethod: MethodParameterApiDescriptionModel[]; |
|||
parameters: ParameterApiDescriptionModel[]; |
|||
returnValue: ReturnValueApiDescriptionModel; |
|||
allowAnonymous?: boolean; |
|||
implementFrom?: string; |
|||
} |
|||
|
|||
export interface ApplicationApiDescriptionModel { |
|||
modules: Record<string, ModuleApiDescriptionModel>; |
|||
types: Record<string, TypeApiDescriptionModel>; |
|||
} |
|||
|
|||
export interface ApplicationApiDescriptionModelRequestDto { |
|||
includeTypes: boolean; |
|||
} |
|||
|
|||
export interface ControllerApiDescriptionModel { |
|||
controllerName?: string; |
|||
controllerGroupName?: string; |
|||
isRemoteService: boolean; |
|||
isIntegrationService: boolean; |
|||
apiVersion?: string; |
|||
type?: string; |
|||
interfaces: ControllerInterfaceApiDescriptionModel[]; |
|||
actions: Record<string, ActionApiDescriptionModel>; |
|||
} |
|||
|
|||
export interface ControllerInterfaceApiDescriptionModel { |
|||
type?: string; |
|||
name?: string; |
|||
methods: InterfaceMethodApiDescriptionModel[]; |
|||
} |
|||
|
|||
export interface InterfaceMethodApiDescriptionModel { |
|||
name?: string; |
|||
parametersOnMethod: MethodParameterApiDescriptionModel[]; |
|||
returnValue: ReturnValueApiDescriptionModel; |
|||
} |
|||
|
|||
export interface MethodParameterApiDescriptionModel { |
|||
name?: string; |
|||
typeAsString?: string; |
|||
type?: string; |
|||
typeSimple?: string; |
|||
isOptional: boolean; |
|||
defaultValue: object; |
|||
} |
|||
|
|||
export interface ModuleApiDescriptionModel { |
|||
rootPath?: string; |
|||
remoteServiceName?: string; |
|||
controllers: Record<string, ControllerApiDescriptionModel>; |
|||
} |
|||
|
|||
export interface ParameterApiDescriptionModel { |
|||
nameOnMethod?: string; |
|||
name?: string; |
|||
jsonName?: string; |
|||
type?: string; |
|||
typeSimple?: string; |
|||
isOptional: boolean; |
|||
defaultValue: object; |
|||
constraintTypes: string[]; |
|||
bindingSourceId?: string; |
|||
descriptorName?: string; |
|||
} |
|||
|
|||
export interface PropertyApiDescriptionModel { |
|||
name?: string; |
|||
jsonName?: string; |
|||
type?: string; |
|||
typeSimple?: string; |
|||
isRequired: boolean; |
|||
minLength?: number; |
|||
maxLength?: number; |
|||
minimum?: string; |
|||
maximum?: string; |
|||
regex?: string; |
|||
} |
|||
|
|||
export interface ReturnValueApiDescriptionModel { |
|||
type?: string; |
|||
typeSimple?: string; |
|||
} |
|||
|
|||
export interface TypeApiDescriptionModel { |
|||
baseType?: string; |
|||
isEnum: boolean; |
|||
enumNames: string[]; |
|||
enumValues: object[]; |
|||
genericArguments: string[]; |
|||
properties: PropertyApiDescriptionModel[]; |
|||
} |
|||
|
|||
Loading…
Reference in new issue