Skip to content

Commit 2b48834

Browse files
committed
Extend ABP proxy JSON & add multi-tenancy exports
Update generated proxy metadata and related ABP exports. The generate-proxy.json was extended with many Account endpoints (email/phone confirmation, two-factor, profile picture upload/download, security logs, confirmation checks, etc.), added authorizeDatas fields, and switched Account contract type references to the Pro.Public.Application.Contracts package while changing the account remoteServiceName to AbpAccountPublic. Also add multi-tenancy index and tenant-user-sharing-strategy enum exports and update several Volo.Abp model/index files to reflect these API and model changes to support ABP Pro public account and multi-tenancy features.
1 parent 82eced3 commit 2b48834

7 files changed

Lines changed: 48410 additions & 3845 deletions

File tree

npm/ng-packs/packages/core/src/lib/proxy/generate-proxy.json

Lines changed: 48284 additions & 3754 deletions
Large diffs are not rendered by default.
Lines changed: 52 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,84 @@
11

22
export interface EntityExtensionDto {
3-
properties: Record<string, ExtensionPropertyDto>;
4-
configuration: Record<string, object>;
3+
properties?: Record<string, ExtensionPropertyDto>;
4+
configuration?: Record<string, object>;
55
}
66

77
export interface ExtensionEnumDto {
8-
fields: ExtensionEnumFieldDto[];
9-
localizationResource?: string;
8+
fields?: ExtensionEnumFieldDto[];
9+
localizationResource?: string | null;
1010
}
1111

1212
export interface ExtensionEnumFieldDto {
13-
name?: string;
14-
value: object;
13+
name?: string | null;
14+
value?: object | null;
1515
}
1616

1717
export interface ExtensionPropertyApiCreateDto {
18-
isAvailable: boolean;
18+
isAvailable?: boolean;
1919
}
2020

2121
export interface ExtensionPropertyApiDto {
22-
onGet: ExtensionPropertyApiGetDto;
23-
onCreate: ExtensionPropertyApiCreateDto;
24-
onUpdate: ExtensionPropertyApiUpdateDto;
22+
onGet?: ExtensionPropertyApiGetDto;
23+
onCreate?: ExtensionPropertyApiCreateDto;
24+
onUpdate?: ExtensionPropertyApiUpdateDto;
2525
}
2626

2727
export interface ExtensionPropertyApiGetDto {
28-
isAvailable: boolean;
28+
isAvailable?: boolean;
2929
}
3030

3131
export interface ExtensionPropertyApiUpdateDto {
32-
isAvailable: boolean;
32+
isAvailable?: boolean;
3333
}
3434

3535
export interface ExtensionPropertyAttributeDto {
3636
typeSimple?: string;
37-
config: Record<string, object>;
37+
config?: Record<string, object>;
3838
}
3939

4040
export interface ExtensionPropertyDto {
4141
type?: string;
4242
typeSimple?: string;
43-
displayName: LocalizableStringDto;
44-
api: ExtensionPropertyApiDto;
45-
ui: ExtensionPropertyUiDto;
46-
attributes: ExtensionPropertyAttributeDto[];
47-
configuration: Record<string, object>;
48-
defaultValue: object;
43+
displayName?: LocalizableStringDto | null;
44+
api?: ExtensionPropertyApiDto;
45+
ui?: ExtensionPropertyUiDto;
46+
policy?: ExtensionPropertyPolicyDto;
47+
attributes?: ExtensionPropertyAttributeDto[];
48+
configuration?: Record<string, object>;
49+
defaultValue?: object | null;
50+
}
51+
52+
export interface ExtensionPropertyFeaturePolicyDto {
53+
features?: string[];
54+
requiresAll?: boolean;
55+
}
56+
57+
export interface ExtensionPropertyGlobalFeaturePolicyDto {
58+
features?: string[];
59+
requiresAll?: boolean;
60+
}
61+
62+
export interface ExtensionPropertyPermissionPolicyDto {
63+
permissionNames?: string[];
64+
requiresAll?: boolean;
65+
}
66+
67+
export interface ExtensionPropertyPolicyDto {
68+
globalFeatures?: ExtensionPropertyGlobalFeaturePolicyDto;
69+
features?: ExtensionPropertyFeaturePolicyDto;
70+
permissions?: ExtensionPropertyPermissionPolicyDto;
4971
}
5072

5173
export interface ExtensionPropertyUiDto {
52-
onTable: ExtensionPropertyUiTableDto;
53-
onCreateForm: ExtensionPropertyUiFormDto;
54-
onEditForm: ExtensionPropertyUiFormDto;
55-
lookup: ExtensionPropertyUiLookupDto;
74+
onTable?: ExtensionPropertyUiTableDto;
75+
onCreateForm?: ExtensionPropertyUiFormDto;
76+
onEditForm?: ExtensionPropertyUiFormDto;
77+
lookup?: ExtensionPropertyUiLookupDto;
5678
}
5779

5880
export interface ExtensionPropertyUiFormDto {
59-
isVisible: boolean;
81+
isVisible?: boolean;
6082
}
6183

6284
export interface ExtensionPropertyUiLookupDto {
@@ -68,20 +90,20 @@ export interface ExtensionPropertyUiLookupDto {
6890
}
6991

7092
export interface ExtensionPropertyUiTableDto {
71-
isVisible: boolean;
93+
isVisible?: boolean;
7294
}
7395

7496
export interface LocalizableStringDto {
7597
name?: string;
76-
resource?: string;
98+
resource?: string | null;
7799
}
78100

79101
export interface ModuleExtensionDto {
80-
entities: Record<string, EntityExtensionDto>;
81-
configuration: Record<string, object>;
102+
entities?: Record<string, EntityExtensionDto>;
103+
configuration?: Record<string, object>;
82104
}
83105

84106
export interface ObjectExtensionsDto {
85-
modules: Record<string, ModuleExtensionDto>;
86-
enums: Record<string, ExtensionEnumDto>;
107+
modules?: Record<string, ModuleExtensionDto>;
108+
enums?: Record<string, ExtensionEnumDto>;
87109
}
Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
1+
import type { TenantUserSharingStrategy } from '../../../multi-tenancy/tenant-user-sharing-strategy.enum';
12

23
export interface FindTenantResultDto {
3-
success: boolean;
4-
tenantId?: string;
5-
name?: string;
6-
normalizedName?: string;
7-
isActive: boolean;
4+
success?: boolean;
5+
tenantId?: string | null;
6+
name?: string | null;
7+
normalizedName?: string | null;
8+
isActive?: boolean;
89
}
910

1011
export interface CurrentTenantDto {
11-
id?: string;
12-
name?: string;
13-
isAvailable: boolean;
12+
id?: string | null;
13+
name?: string | null;
14+
isAvailable?: boolean;
1415
}
1516

16-
export enum TenantUserSharingStrategy {
17-
Isolated = 0,
18-
Shared = 1,
19-
}
20-
21-
export interface MultiTenancyInfoDto {
22-
isEnabled: boolean;
23-
userSharingStrategy?: TenantUserSharingStrategy;
24-
}
17+
export interface MultiTenancyInfoDto {
18+
isEnabled?: boolean;
19+
userSharingStrategy?: TenantUserSharingStrategy;
20+
}

npm/ng-packs/packages/core/src/lib/proxy/volo/abp/http/modeling/models.ts

Lines changed: 50 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2,87 +2,94 @@
22
export interface ActionApiDescriptionModel {
33
uniqueName?: string;
44
name?: string;
5-
httpMethod?: string;
5+
httpMethod?: string | null;
66
url?: string;
7-
supportedVersions: string[];
8-
parametersOnMethod: MethodParameterApiDescriptionModel[];
9-
parameters: ParameterApiDescriptionModel[];
10-
returnValue: ReturnValueApiDescriptionModel;
11-
allowAnonymous?: boolean;
12-
implementFrom?: string;
7+
supportedVersions?: string[] | null;
8+
parametersOnMethod?: MethodParameterApiDescriptionModel[];
9+
parameters?: ParameterApiDescriptionModel[];
10+
returnValue?: ReturnValueApiDescriptionModel;
11+
allowAnonymous?: boolean | null;
12+
authorizeDatas?: AuthorizeDataApiDescriptionModel[];
13+
implementFrom?: string | null;
1314
}
1415

1516
export interface ApplicationApiDescriptionModel {
16-
modules: Record<string, ModuleApiDescriptionModel>;
17-
types: Record<string, TypeApiDescriptionModel>;
17+
modules?: Record<string, ModuleApiDescriptionModel>;
18+
types?: Record<string, TypeApiDescriptionModel>;
1819
}
1920

2021
export interface ApplicationApiDescriptionModelRequestDto {
21-
includeTypes: boolean;
22+
includeTypes?: boolean;
23+
}
24+
25+
export interface AuthorizeDataApiDescriptionModel {
26+
policy?: string | null;
27+
roles?: string | null;
2228
}
2329

2430
export interface ControllerApiDescriptionModel {
2531
controllerName?: string;
26-
controllerGroupName?: string;
27-
isRemoteService: boolean;
28-
isIntegrationService: boolean;
29-
apiVersion?: string;
32+
controllerGroupName?: string | null;
33+
isRemoteService?: boolean;
34+
isIntegrationService?: boolean;
35+
apiVersion?: string | null;
3036
type?: string;
31-
interfaces: ControllerInterfaceApiDescriptionModel[];
32-
actions: Record<string, ActionApiDescriptionModel>;
37+
interfaces?: ControllerInterfaceApiDescriptionModel[];
38+
actions?: Record<string, ActionApiDescriptionModel>;
3339
}
3440

3541
export interface ControllerInterfaceApiDescriptionModel {
3642
type?: string;
3743
name?: string;
38-
methods: InterfaceMethodApiDescriptionModel[];
44+
methods?: InterfaceMethodApiDescriptionModel[];
3945
}
4046

4147
export interface InterfaceMethodApiDescriptionModel {
4248
name?: string;
43-
parametersOnMethod: MethodParameterApiDescriptionModel[];
44-
returnValue: ReturnValueApiDescriptionModel;
49+
parametersOnMethod?: MethodParameterApiDescriptionModel[];
50+
returnValue?: ReturnValueApiDescriptionModel;
4551
}
4652

4753
export interface MethodParameterApiDescriptionModel {
4854
name?: string;
4955
typeAsString?: string;
5056
type?: string;
5157
typeSimple?: string;
52-
isOptional: boolean;
53-
defaultValue: object;
58+
isOptional?: boolean;
59+
defaultValue?: object | null;
5460
}
5561

5662
export interface ModuleApiDescriptionModel {
5763
rootPath?: string;
5864
remoteServiceName?: string;
59-
controllers: Record<string, ControllerApiDescriptionModel>;
65+
controllers?: Record<string, ControllerApiDescriptionModel>;
6066
}
6167

6268
export interface ParameterApiDescriptionModel {
6369
nameOnMethod?: string;
6470
name?: string;
65-
jsonName?: string;
66-
type?: string;
67-
typeSimple?: string;
68-
isOptional: boolean;
69-
defaultValue: object;
70-
constraintTypes: string[];
71-
bindingSourceId?: string;
72-
descriptorName?: string;
71+
jsonName?: string | null;
72+
type?: string | null;
73+
typeSimple?: string | null;
74+
isOptional?: boolean;
75+
defaultValue?: object | null;
76+
constraintTypes?: string[] | null;
77+
bindingSourceId?: string | null;
78+
descriptorName?: string | null;
7379
}
7480

7581
export interface PropertyApiDescriptionModel {
7682
name?: string;
77-
jsonName?: string;
83+
jsonName?: string | null;
7884
type?: string;
7985
typeSimple?: string;
80-
isRequired: boolean;
81-
minLength?: number;
82-
maxLength?: number;
83-
minimum?: string;
84-
maximum?: string;
85-
regex?: string;
86+
isRequired?: boolean;
87+
minLength?: number | null;
88+
maxLength?: number | null;
89+
minimum?: string | null;
90+
maximum?: string | null;
91+
regex?: string | null;
92+
isNullable?: boolean;
8693
}
8794

8895
export interface ReturnValueApiDescriptionModel {
@@ -91,10 +98,10 @@ export interface ReturnValueApiDescriptionModel {
9198
}
9299

93100
export interface TypeApiDescriptionModel {
94-
baseType?: string;
95-
isEnum: boolean;
96-
enumNames: string[];
97-
enumValues: object[];
98-
genericArguments: string[];
99-
properties: PropertyApiDescriptionModel[];
101+
baseType?: string | null;
102+
isEnum?: boolean;
103+
enumNames?: string[] | null;
104+
enumValues?: object[] | null;
105+
genericArguments?: string[] | null;
106+
properties?: PropertyApiDescriptionModel[] | null;
100107
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as AspNetCore from './asp-net-core';
22
import * as Http from './http';
33
import * as Localization from './localization';
4+
import * as MultiTenancy from './multi-tenancy';
45
export * from './models';
5-
export { AspNetCore, Http, Localization };
6+
export { AspNetCore, Http, Localization, MultiTenancy };
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './tenant-user-sharing-strategy.enum';
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { mapEnumToOptions } from '@abp/ng.core';
2+
3+
export enum TenantUserSharingStrategy {
4+
Isolated = 0,
5+
Shared = 1,
6+
}
7+
8+
export const tenantUserSharingStrategyOptions = mapEnumToOptions(TenantUserSharingStrategy);

0 commit comments

Comments
 (0)