Browse Source

Merge pull request #753 from colinin/fix-multiple-action-name

use uniqueName to find multiple actions with the same name
pull/761/head
yx lin 3 years ago
committed by GitHub
parent
commit
7413260f56
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 126
      apps/vue/src/api/openiddict/open-iddict-application/index.ts
  2. 95
      apps/vue/src/api/openiddict/open-iddict-application/model/index.ts
  3. 83
      apps/vue/src/api/openiddict/open-iddict-authorization/index.ts
  4. 41
      apps/vue/src/api/openiddict/open-iddict-authorization/model/index.ts
  5. 126
      apps/vue/src/api/openiddict/open-iddict-scope/index.ts
  6. 30
      apps/vue/src/api/openiddict/open-iddict-scope/model/index.ts
  7. 83
      apps/vue/src/api/openiddict/open-iddict-token/index.ts
  8. 57
      apps/vue/src/api/openiddict/open-iddict-token/model/index.ts
  9. 29
      apps/vue/src/api/openiddict/scopes/model/index.ts
  10. 64
      apps/vue/src/api/saas/edition/index.ts
  11. 20
      apps/vue/src/api/saas/edition/model/index.ts
  12. 50
      apps/vue/src/api/saas/editions.ts
  13. 23
      apps/vue/src/api/saas/model/editionsModel.ts
  14. 48
      apps/vue/src/api/saas/model/tenantModel.ts
  15. 75
      apps/vue/src/api/saas/tenant.ts
  16. 127
      apps/vue/src/api/saas/tenant/index.ts
  17. 43
      apps/vue/src/api/saas/tenant/model/index.ts
  18. 17
      apps/vue/src/utils/http/abp/abp.ts
  19. 6
      apps/vue/src/views/openiddict/applications/components/ApplicationTable.vue
  20. 4
      apps/vue/src/views/openiddict/authorizations/components/AuthorizationModal.vue
  21. 6
      apps/vue/src/views/openiddict/authorizations/components/AuthorizationTable.vue
  22. 2
      apps/vue/src/views/openiddict/authorizations/datas/ModalData.ts
  23. 4
      apps/vue/src/views/openiddict/tokens/components/TokenModal.vue
  24. 6
      apps/vue/src/views/openiddict/tokens/components/TokenTable.vue
  25. 6
      apps/vue/src/views/saas/editions/components/EditionModal.vue
  26. 6
      apps/vue/src/views/saas/editions/components/EditionTable.vue
  27. 4
      apps/vue/src/views/saas/tenant/components/ConnectionEditModal.vue
  28. 6
      apps/vue/src/views/saas/tenant/components/ConnectionTableModal.vue
  29. 6
      apps/vue/src/views/saas/tenant/components/TenantModal.vue
  30. 2
      apps/vue/src/views/saas/tenant/datas/ModalData.ts
  31. 6
      apps/vue/src/views/saas/tenant/hooks/useTenantTable.ts
  32. 2
      apps/vue/src/views/webhooks/send-attempts/datas/ModalData.ts
  33. 2
      apps/vue/src/views/webhooks/subscriptions/components/SubscriptionModal.vue
  34. 4
      apps/vue/src/views/webhooks/subscriptions/datas/ModalData.ts
  35. 115
      apps/vue/types/abp.type.d.ts
  36. 2
      aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN.Abp.Cli.csproj
  37. 3
      aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/ServiceProxying/TypeScript/TypeScriptProxyGenerator.cs
  38. 4
      aspnet-core/services/LY.MicroService.AuthServer/LY.MicroService.AuthServer.csproj

126
apps/vue/src/api/openiddict/applications/index.ts → apps/vue/src/api/openiddict/open-iddict-application/index.ts

@ -1,61 +1,65 @@
import { defAbpHttp } from '/@/utils/http/abp'; import { defAbpHttp } from '/@/utils/http/abp';
import { import { OpenIddictApplicationDto,OpenIddictApplicationGetListInput, OpenIddictApplicationCreateDto, OpenIddictApplicationUpdateDto, } from './model';
OpenIddictApplicationDto,
OpenIddictApplicationCreateDto, const remoteServiceName = 'AbpOpenIddict';
OpenIddictApplicationUpdateDto, const controllerName = 'OpenIddictApplication';
OpenIddictApplicationGetListInput,
} from './model'; export const GetAsyncById = (id: string) => {
return defAbpHttp.request<OpenIddictApplicationDto>({
const remoteServiceName = 'AbpOpenIddict'; service: remoteServiceName,
const controllerName = 'OpenIddictApplication'; controller: controllerName,
action: 'GetAsync',
export const getById = (id: string) => { uniqueName: 'GetAsyncById',
return defAbpHttp.request<OpenIddictApplicationDto>({ params: {
service: remoteServiceName, id: id,
controller: controllerName, },
action: 'GetAsync', });
params: { };
id: id,
}, export const GetListAsyncByInput = (input: OpenIddictApplicationGetListInput) => {
}); return defAbpHttp.pagedRequest<OpenIddictApplicationDto>({
}; service: remoteServiceName,
controller: controllerName,
export const getList = (input: OpenIddictApplicationGetListInput) => { action: 'GetListAsync',
return defAbpHttp.pagedRequest<OpenIddictApplicationDto>({ uniqueName: 'GetListAsyncByInput',
service: remoteServiceName, params: {
controller: controllerName, input: input,
action: 'GetListAsync', },
params: { });
input: input, };
},
}); export const CreateAsyncByInput = (input: OpenIddictApplicationCreateDto) => {
}; return defAbpHttp.request<OpenIddictApplicationDto>({
service: remoteServiceName,
export const deleteById = (id: string) => { controller: controllerName,
return defAbpHttp.request<void>({ action: 'CreateAsync',
service: remoteServiceName, uniqueName: 'CreateAsyncByInput',
controller: controllerName, data: input,
action: 'DeleteAsync', });
params: { };
id: id,
}, export const UpdateAsyncByIdAndInput = (id: string, input: OpenIddictApplicationUpdateDto) => {
}); return defAbpHttp.request<OpenIddictApplicationDto>({
}; service: remoteServiceName,
controller: controllerName,
export const create = (input: OpenIddictApplicationCreateDto) => { action: 'UpdateAsync',
return defAbpHttp.request<OpenIddictApplicationDto>({ uniqueName: 'UpdateAsyncByIdAndInput',
service: remoteServiceName, params: {
controller: controllerName, id: id,
action: 'CreateAsync', },
data: input, data: input,
}); });
}; };
export const update = (input: OpenIddictApplicationUpdateDto) => { export const DeleteAsyncById = (id: string) => {
return defAbpHttp.request<OpenIddictApplicationDto>({ return defAbpHttp.request<void>({
service: remoteServiceName, service: remoteServiceName,
controller: controllerName, controller: controllerName,
action: 'UpdateAsync', action: 'DeleteAsync',
data: input, uniqueName: 'DeleteAsyncById',
}); params: {
}; id: id,
},
});
};

95
apps/vue/src/api/openiddict/applications/model/index.ts → apps/vue/src/api/openiddict/open-iddict-application/model/index.ts

@ -1,47 +1,48 @@
import { ExtensibleObject, ExtensibleAuditedEntity, PagedAndSortedResultRequestDto } from '../../../model/baseModel'; export interface OpenIddictApplicationGetListInput extends PagedAndSortedResultRequestDto {
filter?: string;
export interface OpenIddictApplicationDto extends ExtensibleAuditedEntity<string> { }
clientId: string;
clientSecret?: string; export interface OpenIddictApplicationCreateDto extends OpenIddictApplicationCreateOrUpdateDto {
consentType?: string; }
displayName?: string;
displayNames?: {[key: string]: string}; export interface OpenIddictApplicationUpdateDto extends OpenIddictApplicationCreateOrUpdateDto {
endpoints?: string[]; }
grantTypes?: string[];
responseTypes?: string[]; export interface OpenIddictApplicationDto extends ExtensibleAuditedEntityDto<string> {
scopes?: string[]; clientId?: string;
postLogoutRedirectUris?: string[]; clientSecret?: string;
properties?: {[key: string]: string}; consentType?: string;
redirectUris?: string[]; displayName?: string;
requirements?: string[]; displayNames?: Dictionary<string, string>;
type?: string; endpoints?: string[];
clientUri?: string; grantTypes?: string[];
logoUri?: string; responseTypes?: string[];
} scopes?: string[];
postLogoutRedirectUris?: string[];
export interface OpenIddictApplicationGetListInput extends PagedAndSortedResultRequestDto { properties?: Dictionary<string, string>;
filter?: string; redirectUris?: string[];
} requirements?: string[];
type?: string;
interface OpenIddictApplicationCreateOrUpdateDto extends ExtensibleObject { clientUri?: string;
clientId: string; logoUri?: string;
clientSecret?: string; }
consentType?: string;
displayName?: string; export interface OpenIddictApplicationCreateOrUpdateDto extends ExtensibleObject {
displayNames?: {[key: string]: string}; clientId: string;
endpoints?: string[]; clientSecret?: string;
grantTypes?: string[]; consentType?: string;
responseTypes?: string[]; displayName?: string;
scopes?: string[]; displayNames?: Dictionary<string, string>;
postLogoutRedirectUris?: string[]; endpoints?: string[];
properties?: {[key: string]: string}; grantTypes?: string[];
redirectUris?: string[]; responseTypes?: string[];
requirements?: string[]; scopes?: string[];
type?: string; postLogoutRedirectUris?: string[];
clientUri?: string; properties?: Dictionary<string, string>;
logoUri?: string; redirectUris?: string[];
} requirements?: string[];
type?: string;
export type OpenIddictApplicationCreateDto = OpenIddictApplicationCreateOrUpdateDto; clientUri?: string;
logoUri?: string;
export type OpenIddictApplicationUpdateDto = OpenIddictApplicationCreateOrUpdateDto; }

83
apps/vue/src/api/openiddict/authorizations/index.ts → apps/vue/src/api/openiddict/open-iddict-authorization/index.ts

@ -1,41 +1,42 @@
import { defAbpHttp } from '/@/utils/http/abp'; import { defAbpHttp } from '/@/utils/http/abp';
import { import { OpenIddictAuthorizationDto,OpenIddictAuthorizationGetListInput, } from './model';
OpenIddictAuthorizationDto,
OpenIddictAuthorizationGetListInput, const remoteServiceName = 'AbpOpenIddict';
} from './model'; const controllerName = 'OpenIddictAuthorization';
const remoteServiceName = 'AbpOpenIddict'; export const DeleteAsyncById = (id: string) => {
const controllerName = 'OpenIddictAuthorization'; return defAbpHttp.request<void>({
service: remoteServiceName,
export const getById = (id: string) => { controller: controllerName,
return defAbpHttp.request<OpenIddictAuthorizationDto>({ action: 'DeleteAsync',
service: remoteServiceName, uniqueName: 'DeleteAsyncById',
controller: controllerName, params: {
action: 'GetAsync', id: id,
params: { },
id: id, });
}, };
});
}; export const GetAsyncById = (id: string) => {
return defAbpHttp.request<OpenIddictAuthorizationDto>({
export const getList = (input: OpenIddictAuthorizationGetListInput) => { service: remoteServiceName,
return defAbpHttp.pagedRequest<OpenIddictAuthorizationDto>({ controller: controllerName,
service: remoteServiceName, action: 'GetAsync',
controller: controllerName, uniqueName: 'GetAsyncById',
action: 'GetListAsync', params: {
params: { id: id,
input: input, },
}, });
}); };
};
export const GetListAsyncByInput = (input: OpenIddictAuthorizationGetListInput) => {
export const deleteById = (id: string) => { return defAbpHttp.pagedRequest<OpenIddictAuthorizationDto>({
return defAbpHttp.request<void>({ service: remoteServiceName,
service: remoteServiceName, controller: controllerName,
controller: controllerName, action: 'GetListAsync',
action: 'DeleteAsync', uniqueName: 'GetListAsyncByInput',
params: { params: {
id: id, input: input,
}, },
}); });
}; };

41
apps/vue/src/api/openiddict/authorizations/model/index.ts → apps/vue/src/api/openiddict/open-iddict-authorization/model/index.ts

@ -1,21 +1,20 @@
import { ExtensibleAuditedEntity, PagedAndSortedResultRequestDto } from '../../../model/baseModel'; export interface OpenIddictAuthorizationGetListInput extends PagedAndSortedResultRequestDto {
filter?: string;
export interface OpenIddictAuthorizationDto extends ExtensibleAuditedEntity<string> { subject?: string;
applicationId?: string; clientId?: string;
creationDate?: Date; status?: string;
properties?: {[key: string]: string}; type?: string;
scopes?: string[]; beginCreationTime?: string;
type?: string; endCreationTime?: string;
status?: string; }
subject?: string;
} export interface OpenIddictAuthorizationDto extends ExtensibleAuditedEntityDto<string> {
applicationId?: string;
export interface OpenIddictAuthorizationGetListInput extends PagedAndSortedResultRequestDto { creationDate?: string;
filter?: string; properties?: Dictionary<string, string>;
subject?: string; scopes?: string[];
clientId?: string; status?: string;
status?: string; subject?: string;
type?: string; type?: string;
beginCreationTime?: Date; }
endCreationTime?: string;
}

126
apps/vue/src/api/openiddict/scopes/index.ts → apps/vue/src/api/openiddict/open-iddict-scope/index.ts

@ -1,61 +1,65 @@
import { defAbpHttp } from '/@/utils/http/abp'; import { defAbpHttp } from '/@/utils/http/abp';
import { import { OpenIddictScopeCreateDto, OpenIddictScopeDto,OpenIddictScopeGetListInput, OpenIddictScopeUpdateDto, } from './model';
OpenIddictScopeDto,
OpenIddictScopeCreateDto, const remoteServiceName = 'AbpOpenIddict';
OpenIddictScopeUpdateDto, const controllerName = 'OpenIddictScope';
OpenIddictScopeGetListInput,
} from './model'; export const CreateAsyncByInput = (input: OpenIddictScopeCreateDto) => {
return defAbpHttp.request<OpenIddictScopeDto>({
const remoteServiceName = 'AbpOpenIddict'; service: remoteServiceName,
const controllerName = 'OpenIddictScope'; controller: controllerName,
action: 'CreateAsync',
export const getById = (id: string) => { uniqueName: 'CreateAsyncByInput',
return defAbpHttp.request<OpenIddictScopeDto>({ data: input,
service: remoteServiceName, });
controller: controllerName, };
action: 'GetAsync',
params: { export const DeleteAsyncById = (id: string) => {
id: id, return defAbpHttp.request<void>({
}, service: remoteServiceName,
}); controller: controllerName,
}; action: 'DeleteAsync',
uniqueName: 'DeleteAsyncById',
export const getList = (input: OpenIddictScopeGetListInput) => { params: {
return defAbpHttp.pagedRequest<OpenIddictScopeDto>({ id: id,
service: remoteServiceName, },
controller: controllerName, });
action: 'GetListAsync', };
params: {
input: input, export const GetAsyncById = (id: string) => {
}, return defAbpHttp.request<OpenIddictScopeDto>({
}); service: remoteServiceName,
}; controller: controllerName,
action: 'GetAsync',
export const deleteById = (id: string) => { uniqueName: 'GetAsyncById',
return defAbpHttp.request<void>({ params: {
service: remoteServiceName, id: id,
controller: controllerName, },
action: 'DeleteAsync', });
params: { };
id: id,
}, export const GetListAsyncByInput = (input: OpenIddictScopeGetListInput) => {
}); return defAbpHttp.pagedRequest<OpenIddictScopeDto>({
}; service: remoteServiceName,
controller: controllerName,
export const create = (input: OpenIddictScopeCreateDto) => { action: 'GetListAsync',
return defAbpHttp.request<OpenIddictScopeDto>({ uniqueName: 'GetListAsyncByInput',
service: remoteServiceName, params: {
controller: controllerName, input: input,
action: 'CreateAsync', },
data: input, });
}); };
};
export const UpdateAsyncByIdAndInput = (id: string, input: OpenIddictScopeUpdateDto) => {
export const update = (input: OpenIddictScopeUpdateDto) => { return defAbpHttp.request<OpenIddictScopeDto>({
return defAbpHttp.request<OpenIddictScopeDto>({ service: remoteServiceName,
service: remoteServiceName, controller: controllerName,
controller: controllerName, action: 'UpdateAsync',
action: 'UpdateAsync', uniqueName: 'UpdateAsyncByIdAndInput',
data: input, params: {
}); id: id,
}; },
data: input,
});
};

30
apps/vue/src/api/openiddict/open-iddict-scope/model/index.ts

@ -0,0 +1,30 @@
export interface OpenIddictScopeCreateDto extends OpenIddictScopeCreateOrUpdateDto {
}
export interface OpenIddictScopeGetListInput extends PagedAndSortedResultRequestDto {
filter?: string;
}
export interface OpenIddictScopeUpdateDto extends OpenIddictScopeCreateOrUpdateDto {
}
export interface OpenIddictScopeCreateOrUpdateDto extends ExtensibleObject {
description?: string;
descriptions?: Dictionary<string, string>;
displayName?: string;
displayNames?: Dictionary<string, string>;
name: string;
properties?: Dictionary<string, string>;
resources?: string[];
}
export interface OpenIddictScopeDto extends ExtensibleAuditedEntityDto<string> {
description?: string;
descriptions?: Dictionary<string, string>;
displayName?: string;
displayNames?: Dictionary<string, string>;
name?: string;
properties?: Dictionary<string, string>;
resources?: string[];
}

83
apps/vue/src/api/openiddict/tokens/index.ts → apps/vue/src/api/openiddict/open-iddict-token/index.ts

@ -1,41 +1,42 @@
import { defAbpHttp } from '/@/utils/http/abp'; import { defAbpHttp } from '/@/utils/http/abp';
import { import { OpenIddictTokenDto,OpenIddictTokenGetListInput, } from './model';
OpenIddictTokenDto,
OpenIddictTokenGetListInput, const remoteServiceName = 'AbpOpenIddict';
} from './model'; const controllerName = 'OpenIddictToken';
const remoteServiceName = 'AbpOpenIddict'; export const DeleteAsyncById = (id: string) => {
const controllerName = 'OpenIddictToken'; return defAbpHttp.request<void>({
service: remoteServiceName,
export const getById = (id: string) => { controller: controllerName,
return defAbpHttp.request<OpenIddictTokenDto>({ action: 'DeleteAsync',
service: remoteServiceName, uniqueName: 'DeleteAsyncById',
controller: controllerName, params: {
action: 'GetAsync', id: id,
params: { },
id: id, });
}, };
});
}; export const GetAsyncById = (id: string) => {
return defAbpHttp.request<OpenIddictTokenDto>({
export const getList = (input: OpenIddictTokenGetListInput) => { service: remoteServiceName,
return defAbpHttp.pagedRequest<OpenIddictTokenDto>({ controller: controllerName,
service: remoteServiceName, action: 'GetAsync',
controller: controllerName, uniqueName: 'GetAsyncById',
action: 'GetListAsync', params: {
params: { id: id,
input: input, },
}, });
}); };
};
export const GetListAsyncByInput = (input: OpenIddictTokenGetListInput) => {
export const deleteById = (id: string) => { return defAbpHttp.pagedRequest<OpenIddictTokenDto>({
return defAbpHttp.request<void>({ service: remoteServiceName,
service: remoteServiceName, controller: controllerName,
controller: controllerName, action: 'GetListAsync',
action: 'DeleteAsync', uniqueName: 'GetListAsyncByInput',
params: { params: {
id: id, input: input,
}, },
}); });
}; };

57
apps/vue/src/api/openiddict/tokens/model/index.ts → apps/vue/src/api/openiddict/open-iddict-token/model/index.ts

@ -1,29 +1,28 @@
import { ExtensibleAuditedEntity, PagedAndSortedResultRequestDto } from '../../../model/baseModel'; export interface OpenIddictTokenGetListInput extends PagedAndSortedResultRequestDto {
filter?: string;
export interface OpenIddictTokenDto extends ExtensibleAuditedEntity<string> { clientId?: string;
applicationId?: string; authorizationId?: string;
authorizationId?: string; subject?: string;
creationDate?: Date; status?: string;
expirationDate?: Date; type?: string;
payload?: string; referenceId?: string;
properties?: string; beginExpirationDate?: string;
redemptionDate?: Date; endExpirationDate?: string;
referenceId?: string; beginCreationTime?: string;
type?: string; endCreationTime?: string;
status?: string; }
subject?: string;
} export interface OpenIddictTokenDto extends ExtensibleAuditedEntityDto<string> {
applicationId?: string;
export interface OpenIddictTokenGetListInput extends PagedAndSortedResultRequestDto { authorizationId?: string;
filter?: string; creationDate?: string;
clientId?: string; expirationDate?: string;
authorizationId?: string; payload?: string;
subject?: string; properties?: string;
status?: string; redemptionDate?: string;
type?: string; referenceId?: string;
referenceId?: string; status?: string;
beginCreationTime?: Date; subject?: string;
endCreationTime?: string; type?: string;
beginExpirationDate?: Date; }
endExpirationDate?: Date;
}

29
apps/vue/src/api/openiddict/scopes/model/index.ts

@ -1,29 +0,0 @@
import { ExtensibleObject, ExtensibleAuditedEntity, PagedAndSortedResultRequestDto } from '../../../model/baseModel';
export interface OpenIddictScopeDto extends ExtensibleAuditedEntity<string> {
name: string;
displayName?: string;
displayNames?: {[key: string]: string};
description?: string;
descriptions?: {[key: string]: string};
properties?: {[key: string]: string};
resources?: {[key: string]: string};
}
export interface OpenIddictScopeGetListInput extends PagedAndSortedResultRequestDto {
filter?: string;
}
interface OpenIddictScopeCreateOrUpdateDto extends ExtensibleObject {
name: string;
displayName?: string;
displayNames?: {[key: string]: string};
description?: string;
descriptions?: {[key: string]: string};
properties?: {[key: string]: string};
resources?: {[key: string]: string};
}
export type OpenIddictScopeCreateDto = OpenIddictScopeCreateOrUpdateDto;
export type OpenIddictScopeUpdateDto = OpenIddictScopeCreateOrUpdateDto;

64
apps/vue/src/api/saas/edition/index.ts

@ -0,0 +1,64 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { EditionCreateDto, EditionDto,EditionGetListInput, EditionUpdateDto, } from './model';
const remoteServiceName = 'AbpSaas';
const controllerName = 'Edition';
export const CreateAsyncByInput = (input: EditionCreateDto) => {
return defAbpHttp.request<EditionDto>({
service: remoteServiceName,
controller: controllerName,
action: 'CreateAsync',
uniqueName: 'CreateAsyncByInput',
data: input,
});
};
export const DeleteAsyncById = (id: string) => {
return defAbpHttp.request<void>({
service: remoteServiceName,
controller: controllerName,
action: 'DeleteAsync',
uniqueName: 'DeleteAsyncById',
params: {
id: id,
},
});
};
export const GetAsyncById = (id: string) => {
return defAbpHttp.request<EditionDto>({
service: remoteServiceName,
controller: controllerName,
action: 'GetAsync',
uniqueName: 'GetAsyncById',
params: {
id: id,
},
});
};
export const GetListAsyncByInput = (input: EditionGetListInput) => {
return defAbpHttp.pagedRequest<EditionDto>({
service: remoteServiceName,
controller: controllerName,
action: 'GetListAsync',
uniqueName: 'GetListAsyncByInput',
params: {
input: input,
},
});
};
export const UpdateAsyncByIdAndInput = (id: string, input: EditionUpdateDto) => {
return defAbpHttp.request<EditionDto>({
service: remoteServiceName,
controller: controllerName,
action: 'UpdateAsync',
uniqueName: 'UpdateAsyncByIdAndInput',
params: {
id: id,
},
data: input,
});
};

20
apps/vue/src/api/saas/edition/model/index.ts

@ -0,0 +1,20 @@
export interface EditionCreateDto extends EditionCreateOrUpdateBase {
}
export interface EditionGetListInput extends PagedAndSortedResultRequestDto {
filter?: string;
}
export interface EditionUpdateDto extends EditionCreateOrUpdateBase {
concurrencyStamp?: string;
}
export interface EditionCreateOrUpdateBase extends ExtensibleObject {
displayName: string;
}
export interface EditionDto extends ExtensibleAuditedEntityDto<string> {
displayName?: string;
concurrencyStamp?: string;
}

50
apps/vue/src/api/saas/editions.ts

@ -1,50 +0,0 @@
import { defAbpHttp } from '/@/utils/http/abp';
import {
Edition,
EditionCreate,
EditionUpdate,
EditionGetListInput,
} from './model/editionsModel';
import { format } from '/@/utils/strings';
import { PagedResultDto } from '../model/baseModel';
enum Api {
Create = '/api/saas/editions',
DeleteById = '/api/saas/editions/{id}',
GetById = '/api/saas/editions/{id}',
GetList = '/api/saas/editions',
Update = '/api/saas/editions/{id}',
}
export const getById = (id: string) => {
return defAbpHttp.get<Edition>({
url: format(Api.GetById, { id: id }),
});
};
export const getList = (input: EditionGetListInput) => {
return defAbpHttp.get<PagedResultDto<Edition>>({
url: Api.GetList,
params: input,
});
};
export const create = (input: EditionCreate) => {
return defAbpHttp.post<Edition>({
url: Api.Create,
data: input,
});
};
export const deleteById = (id: string) => {
return defAbpHttp.delete<void>({
url: format(Api.GetById, { id: id }),
});
};
export const update = (id: string, input: EditionUpdate) => {
return defAbpHttp.put<Edition>({
url: format(Api.Update, { id: id }),
data: input,
});
};

23
apps/vue/src/api/saas/model/editionsModel.ts

@ -1,23 +0,0 @@
import {
IHasConcurrencyStamp,
AuditedEntityDto,
PagedAndSortedResultRequestDto,
} from '../../model/baseModel';
export interface Edition extends AuditedEntityDto {
id: string;
displayName: string;
}
interface EditionCreateOrUpdate {
displayName: string;
}
export type EditionCreate = EditionCreateOrUpdate;
export interface EditionUpdate extends EditionCreateOrUpdate, IHasConcurrencyStamp {
}
export interface EditionGetListInput extends PagedAndSortedResultRequestDto {
filter?: string;
}

48
apps/vue/src/api/saas/model/tenantModel.ts

@ -1,48 +0,0 @@
import {
AuditedEntityDto,
ListResultDto,
PagedAndSortedResultRequestDto,
PagedResultDto,
} from '../../model/baseModel';
/** 与 multi-tenancy中不同,此为管理tenant api */
export interface Tenant extends AuditedEntityDto {
id: string;
name: string;
editionId?: string;
editionName?: string;
isActive: boolean;
enableTime?: Date;
disableTime?: Date;
}
export interface TenantConnectionString {
name: string;
value: string;
}
export interface CreateTenant {
name: string;
adminEmailAddress: string;
adminPassword: string;
editionId?: string;
isActive: boolean;
enableTime?: Date;
disableTime?: Date;
}
export interface UpdateTenant {
name: string;
editionId?: string;
isActive: boolean;
enableTime?: Date;
disableTime?: Date;
}
export interface GetTenantPagedRequest extends PagedAndSortedResultRequestDto {
filter?: string;
}
export type TenantPagedResult = PagedResultDto<Tenant>;
export type TenantConnectionStringListResult = ListResultDto<TenantConnectionString>;

75
apps/vue/src/api/saas/tenant.ts

@ -1,75 +0,0 @@
import { defAbpHttp } from '/@/utils/http/abp';
import {
Tenant,
CreateTenant,
UpdateTenant,
GetTenantPagedRequest,
TenantPagedResult,
TenantConnectionString,
TenantConnectionStringListResult,
} from './model/tenantModel';
import { format } from '/@/utils/strings';
/** 与 multi-tenancy中不同,此为管理tenant api */
enum Api {
Create = '/api/saas/tenants',
DeleteById = '/api/saas/tenants/{id}',
GetById = '/api/saas/tenants/{id}',
GetList = '/api/saas/tenants',
Update = '/api/saas/tenants/{id}',
GetConnectionStrings = '/api/saas/tenants/{id}/connection-string',
SetConnectionString = '/api/saas/tenants/{id}/connection-string',
DeleteConnectionString = '/api/saas/tenants/{id}/connection-string/{name}',
}
export const getById = (id: string) => {
return defAbpHttp.get<Tenant>({
url: format(Api.GetById, { id: id }),
});
};
export const getList = (input: GetTenantPagedRequest) => {
return defAbpHttp.get<TenantPagedResult>({
url: Api.GetList,
params: input,
});
};
export const create = (input: CreateTenant) => {
return defAbpHttp.post<Tenant>({
url: Api.Create,
data: input,
});
};
export const deleteById = (id: string) => {
return defAbpHttp.delete<void>({
url: format(Api.GetById, { id: id }),
});
};
export const update = (id: string, input: UpdateTenant) => {
return defAbpHttp.put<Tenant>({
url: format(Api.Update, { id: id }),
data: input,
});
};
export const getConnectionStrings = (id: string) => {
return defAbpHttp.get<TenantConnectionStringListResult>({
url: format(Api.GetConnectionStrings, { id: id }),
});
};
export const setConnectionString = (id: string, input: TenantConnectionString) => {
return defAbpHttp.put<void>({
url: format(Api.SetConnectionString, { id: id }),
data: input,
});
};
export const deleteConnectionString = (id: string, name: string) => {
return defAbpHttp.delete<void>({
url: format(Api.DeleteConnectionString, { id: id, name: name }),
});
};

127
apps/vue/src/api/saas/tenant/index.ts

@ -0,0 +1,127 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { TenantDto,TenantGetListInput, TenantCreateDto, TenantUpdateDto, TenantConnectionStringDto,TenantConnectionStringCreateOrUpdate, } from './model';
const remoteServiceName = 'AbpSaas';
const controllerName = 'Tenant';
export const GetAsyncById = (id: string) => {
return defAbpHttp.request<TenantDto>({
service: remoteServiceName,
controller: controllerName,
action: 'GetAsync',
uniqueName: 'GetAsyncById',
params: {
id: id,
},
});
};
export const GetAsyncByName = (name: string) => {
return defAbpHttp.request<TenantDto>({
service: remoteServiceName,
controller: controllerName,
action: 'GetAsync',
uniqueName: 'GetAsyncByName',
params: {
name: name,
},
});
};
export const GetListAsyncByInput = (input: TenantGetListInput) => {
return defAbpHttp.pagedRequest<TenantDto>({
service: remoteServiceName,
controller: controllerName,
action: 'GetListAsync',
uniqueName: 'GetListAsyncByInput',
params: {
input: input,
},
});
};
export const CreateAsyncByInput = (input: TenantCreateDto) => {
return defAbpHttp.request<TenantDto>({
service: remoteServiceName,
controller: controllerName,
action: 'CreateAsync',
uniqueName: 'CreateAsyncByInput',
data: input,
});
};
export const UpdateAsyncByIdAndInput = (id: string, input: TenantUpdateDto) => {
return defAbpHttp.request<TenantDto>({
service: remoteServiceName,
controller: controllerName,
action: 'UpdateAsync',
uniqueName: 'UpdateAsyncByIdAndInput',
params: {
id: id,
},
data: input,
});
};
export const DeleteAsyncById = (id: string) => {
return defAbpHttp.request<void>({
service: remoteServiceName,
controller: controllerName,
action: 'DeleteAsync',
uniqueName: 'DeleteAsyncById',
params: {
id: id,
},
});
};
export const GetConnectionStringAsyncByIdAndName = (id: string, name: string) => {
return defAbpHttp.request<TenantConnectionStringDto>({
service: remoteServiceName,
controller: controllerName,
action: 'GetConnectionStringAsync',
uniqueName: 'GetConnectionStringAsyncByIdAndName',
params: {
id: id,
name: name,
},
});
};
export const GetConnectionStringAsyncById = (id: string) => {
return defAbpHttp.listRequest<TenantConnectionStringDto>({
service: remoteServiceName,
controller: controllerName,
action: 'GetConnectionStringAsync',
uniqueName: 'GetConnectionStringAsyncById',
params: {
id: id,
},
});
};
export const SetConnectionStringAsyncByIdAndInput = (id: string, input: TenantConnectionStringCreateOrUpdate) => {
return defAbpHttp.request<TenantConnectionStringDto>({
service: remoteServiceName,
controller: controllerName,
action: 'SetConnectionStringAsync',
uniqueName: 'SetConnectionStringAsyncByIdAndInput',
params: {
id: id,
},
data: input,
});
};
export const DeleteConnectionStringAsyncByIdAndName = (id: string, name: string) => {
return defAbpHttp.request<void>({
service: remoteServiceName,
controller: controllerName,
action: 'DeleteConnectionStringAsync',
uniqueName: 'DeleteConnectionStringAsyncByIdAndName',
params: {
id: id,
name: name,
},
});
};

43
apps/vue/src/api/saas/tenant/model/index.ts

@ -0,0 +1,43 @@
export interface TenantGetListInput extends PagedAndSortedResultRequestDto {
filter?: string;
}
export interface TenantCreateDto extends TenantCreateOrUpdateBase {
adminEmailAddress: string;
adminPassword: string;
useSharedDatabase?: boolean;
defaultConnectionString?: string;
}
export interface TenantUpdateDto extends TenantCreateOrUpdateBase {
concurrencyStamp?: string;
}
export interface TenantConnectionStringCreateOrUpdate {
name: string;
value: string;
}
export interface TenantDto extends ExtensibleAuditedEntityDto<string> {
name?: string;
editionId?: string;
editionName?: string;
isActive?: boolean;
enableTime?: string;
disableTime?: string;
concurrencyStamp?: string;
}
export interface TenantCreateOrUpdateBase extends ExtensibleObject {
name: string;
isActive?: boolean;
editionId?: string;
enableTime?: string;
disableTime?: string;
}
export interface TenantConnectionStringDto {
name?: string;
value?: string;
}

17
apps/vue/src/utils/http/abp/abp.ts

@ -23,6 +23,7 @@ export class abpRequest {
service: string; service: string;
controller: string; controller: string;
action: string; action: string;
uniqueName?: string;
data?: any; data?: any;
params?: any; params?: any;
}) { }) {
@ -33,6 +34,7 @@ export class abpRequest {
service: string; service: string;
controller: string; controller: string;
action: string; action: string;
uniqueName?: string;
data?: any; data?: any;
params?: any; params?: any;
}) { }) {
@ -63,6 +65,7 @@ export class abpRequest {
service: string; service: string;
controller: string; controller: string;
action: string; action: string;
uniqueName?: string;
data?: any; data?: any;
params?: any; params?: any;
}, requestOptions?: RequestOptions) { }, requestOptions?: RequestOptions) {
@ -75,7 +78,7 @@ export class abpRequest {
const abpStore = useAbpStoreWithOut(); const abpStore = useAbpStoreWithOut();
const module = this.getModule(options.service, abpStore.apidefinition.modules); const module = this.getModule(options.service, abpStore.apidefinition.modules);
const controller = this.getController(options.controller, module.controllers); const controller = this.getController(options.controller, module.controllers);
const action = this.getAction(options.action, controller.actions); const action = this.getAction(options.action, controller.actions, options.uniqueName);
method = action.httpMethod; method = action.httpMethod;
const apiVersion = this.getApiVersionInfo(action); const apiVersion = this.getApiVersionInfo(action);
@ -140,12 +143,18 @@ export class abpRequest {
return controllers[controllerKeys[index]]; return controllers[controllerKeys[index]];
} }
private getAction(actionName: string, actions: { [key: string]: ActionApiDescriptionModel }) { private getAction(actionName: string, actions: { [key: string]: ActionApiDescriptionModel }, uniqueName?: string) {
const actionKeys = Object.keys(actions); const actionKeys = Object.keys(actions);
const index = actionKeys.findIndex((key) => { const index = actionKeys.findIndex((key) => {
const a = actions[key]; const a = actions[key];
if (a.name.toLowerCase() === actionName.toLowerCase()) { if (uniqueName) {
return a; if (a.uniqueName.toLowerCase() === uniqueName.toLowerCase()) {
return a;
}
} else {
if (a.name.toLowerCase() === actionName.toLowerCase()) {
return a;
}
} }
}); });
if (index < 0) { if (index < 0) {

6
apps/vue/src/views/openiddict/applications/components/ApplicationTable.vue

@ -35,7 +35,7 @@
import { useModal } from '/@/components/Modal'; import { useModal } from '/@/components/Modal';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { useLocalization } from '/@/hooks/abp/useLocalization'; import { useLocalization } from '/@/hooks/abp/useLocalization';
import { getList, deleteById } from '/@/api/openiddict/applications'; import { GetListAsyncByInput, DeleteAsyncById } from '/@/api/openiddict/open-iddict-application';
import { formatPagedRequest } from '/@/utils/http/abp/helper'; import { formatPagedRequest } from '/@/utils/http/abp/helper';
import ApplicationModal from './ApplicationModal.vue'; import ApplicationModal from './ApplicationModal.vue';
@ -45,7 +45,7 @@
const [registerTable, { reload }] = useTable({ const [registerTable, { reload }] = useTable({
rowKey: 'id', rowKey: 'id',
title: L('Applications'), title: L('Applications'),
api: getList, api: GetListAsyncByInput,
columns: getDataColumns(), columns: getDataColumns(),
beforeFetch: formatPagedRequest, beforeFetch: formatPagedRequest,
pagination: true, pagination: true,
@ -74,7 +74,7 @@
title: L('AreYouSure'), title: L('AreYouSure'),
content: L('ItemWillBeDeletedMessage'), content: L('ItemWillBeDeletedMessage'),
onOk: () => { onOk: () => {
return deleteById(record.key).then(() => { return DeleteAsyncById(record.key).then(() => {
createMessage.success(L('SuccessfullyDeleted')); createMessage.success(L('SuccessfullyDeleted'));
reload(); reload();
}); });

4
apps/vue/src/views/openiddict/authorizations/components/AuthorizationModal.vue

@ -18,7 +18,7 @@
import { useLocalization } from '/@/hooks/abp/useLocalization'; import { useLocalization } from '/@/hooks/abp/useLocalization';
import { getModalFormSchemas } from '../datas/ModalData'; import { getModalFormSchemas } from '../datas/ModalData';
import { formatToDateTime } from '/@/utils/dateUtil'; import { formatToDateTime } from '/@/utils/dateUtil';
import { getById } from '/@/api/openiddict/authorizations'; import { GetAsyncById } from '/@/api/openiddict/open-iddict-authorization';
const { L } = useLocalization('AbpOpenIddict'); const { L } = useLocalization('AbpOpenIddict');
const [registerForm, { setFieldsValue, resetFields }] = useForm({ const [registerForm, { setFieldsValue, resetFields }] = useForm({
@ -37,7 +37,7 @@
}); });
function fetchToken(id: string) { function fetchToken(id: string) {
getById(id).then((token) => { GetAsyncById(id).then((token) => {
setFieldsValue(token); setFieldsValue(token);
}); });
} }

6
apps/vue/src/views/openiddict/authorizations/components/AuthorizationTable.vue

@ -35,7 +35,7 @@
import { useModal } from '/@/components/Modal'; import { useModal } from '/@/components/Modal';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { useLocalization } from '/@/hooks/abp/useLocalization'; import { useLocalization } from '/@/hooks/abp/useLocalization';
import { getList, deleteById } from '/@/api/openiddict/authorizations'; import { GetListAsyncByInput, DeleteAsyncById } from '/@/api/openiddict/open-iddict-authorization';
import { formatPagedRequest } from '/@/utils/http/abp/helper'; import { formatPagedRequest } from '/@/utils/http/abp/helper';
import AuthorizationModal from './AuthorizationModal.vue'; import AuthorizationModal from './AuthorizationModal.vue';
@ -45,7 +45,7 @@
const [registerTable, { reload }] = useTable({ const [registerTable, { reload }] = useTable({
rowKey: 'id', rowKey: 'id',
title: L('Authorizations'), title: L('Authorizations'),
api: getList, api: GetListAsyncByInput,
columns: getDataColumns(), columns: getDataColumns(),
beforeFetch: formatPagedRequest, beforeFetch: formatPagedRequest,
pagination: true, pagination: true,
@ -74,7 +74,7 @@
title: L('AreYouSure'), title: L('AreYouSure'),
content: L('ItemWillBeDeletedMessage'), content: L('ItemWillBeDeletedMessage'),
onOk: () => { onOk: () => {
return deleteById(record.key).then(() => { return DeleteAsyncById(record.key).then(() => {
createMessage.success(L('SuccessfullyDeleted')); createMessage.success(L('SuccessfullyDeleted'));
reload(); reload();
}); });

2
apps/vue/src/views/openiddict/authorizations/datas/ModalData.ts

@ -1,6 +1,6 @@
import { useLocalization } from '/@/hooks/abp/useLocalization'; import { useLocalization } from '/@/hooks/abp/useLocalization';
import { FormProps, FormSchema } from '/@/components/Form'; import { FormProps, FormSchema } from '/@/components/Form';
import { getList as getApplications } from '/@/api/openiddict/applications'; import { GetListAsyncByInput as getApplications } from '/@/api/openiddict/open-iddict-application';
const { L } = useLocalization(['AbpOpenIddict']); const { L } = useLocalization(['AbpOpenIddict']);

4
apps/vue/src/views/openiddict/tokens/components/TokenModal.vue

@ -18,7 +18,7 @@
import { useLocalization } from '/@/hooks/abp/useLocalization'; import { useLocalization } from '/@/hooks/abp/useLocalization';
import { getModalFormSchemas } from '../datas/ModalData'; import { getModalFormSchemas } from '../datas/ModalData';
import { formatToDateTime } from '/@/utils/dateUtil'; import { formatToDateTime } from '/@/utils/dateUtil';
import { getById } from '/@/api/openiddict/tokens'; import { GetAsyncById } from '/@/api/openiddict/open-iddict-token';
const { L } = useLocalization('AbpOpenIddict'); const { L } = useLocalization('AbpOpenIddict');
const [registerForm, { setFieldsValue, resetFields }] = useForm({ const [registerForm, { setFieldsValue, resetFields }] = useForm({
@ -37,7 +37,7 @@
}); });
function fetchToken(id: string) { function fetchToken(id: string) {
getById(id).then((token) => { GetAsyncById(id).then((token) => {
setFieldsValue(token); setFieldsValue(token);
}); });
} }

6
apps/vue/src/views/openiddict/tokens/components/TokenTable.vue

@ -35,7 +35,7 @@
import { useModal } from '/@/components/Modal'; import { useModal } from '/@/components/Modal';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { useLocalization } from '/@/hooks/abp/useLocalization'; import { useLocalization } from '/@/hooks/abp/useLocalization';
import { getList, deleteById } from '/@/api/openiddict/tokens'; import { GetListAsyncByInput, DeleteAsyncById } from '/@/api/openiddict/open-iddict-token';
import { formatPagedRequest } from '/@/utils/http/abp/helper'; import { formatPagedRequest } from '/@/utils/http/abp/helper';
import TokenModal from './TokenModal.vue'; import TokenModal from './TokenModal.vue';
@ -45,7 +45,7 @@
const [registerTable, { reload }] = useTable({ const [registerTable, { reload }] = useTable({
rowKey: 'id', rowKey: 'id',
title: L('Tokens'), title: L('Tokens'),
api: getList, api: GetListAsyncByInput,
columns: getDataColumns(), columns: getDataColumns(),
beforeFetch: formatPagedRequest, beforeFetch: formatPagedRequest,
pagination: true, pagination: true,
@ -74,7 +74,7 @@
title: L('AreYouSure'), title: L('AreYouSure'),
content: L('ItemWillBeDeletedMessage'), content: L('ItemWillBeDeletedMessage'),
onOk: () => { onOk: () => {
return deleteById(record.id).then(() => { return DeleteAsyncById(record.id).then(() => {
createMessage.success(L('SuccessfullyDeleted')); createMessage.success(L('SuccessfullyDeleted'));
reload(); reload();
}); });

6
apps/vue/src/views/saas/editions/components/EditionModal.vue

@ -23,7 +23,7 @@
import { BasicForm, useForm } from '/@/components/Form'; import { BasicForm, useForm } from '/@/components/Form';
import { BasicModal, useModalInner } from '/@/components/Modal'; import { BasicModal, useModalInner } from '/@/components/Modal';
import { getModalFormSchemas } from '../datas//ModalData'; import { getModalFormSchemas } from '../datas//ModalData';
import { getById, create, update } from '/@/api/saas/editions'; import { GetAsyncById, CreateAsyncByInput, UpdateAsyncByIdAndInput } from '/@/api/saas/edition';
const emits = defineEmits(['change', 'register']); const emits = defineEmits(['change', 'register']);
const { createMessage } = useMessage(); const { createMessage } = useMessage();
@ -51,7 +51,7 @@
}); });
return; return;
} }
getById(editionId).then((edition) => { GetAsyncById(editionId).then((edition) => {
nextTick(() => { nextTick(() => {
setFieldsValue(edition); setFieldsValue(edition);
}); });
@ -61,7 +61,7 @@
function handleSubmit() { function handleSubmit() {
validate().then((input) => { validate().then((input) => {
changeOkLoading(true); changeOkLoading(true);
const api = input.id ? update(input.id, input) : create(input); const api = input.id ? UpdateAsyncByIdAndInput(input.id, input) : CreateAsyncByInput(input);
api.then((edition) => { api.then((edition) => {
createMessage.success(L('Successful')); createMessage.success(L('Successful'));
emits('change', edition); emits('change', edition);

6
apps/vue/src/views/saas/editions/components/EditionTable.vue

@ -51,7 +51,7 @@
import { BasicTable, TableAction, useTable } from '/@/components/Table'; import { BasicTable, TableAction, useTable } from '/@/components/Table';
import { useFeatureModal } from '../hooks/useFeatureModal'; import { useFeatureModal } from '../hooks/useFeatureModal';
import { FeatureModal } from '../../../feature'; import { FeatureModal } from '../../../feature';
import { deleteById, getList } from '../../../../api/saas/editions'; import { DeleteAsyncById, GetListAsyncByInput } from '/@/api/saas/edition';
import { getDataColumns } from '../datas/TableData'; import { getDataColumns } from '../datas/TableData';
import { getSearchFormSchemas } from '../datas//ModalData'; import { getSearchFormSchemas } from '../datas//ModalData';
import { formatPagedRequest } from '/@/utils/http/abp/helper'; import { formatPagedRequest } from '/@/utils/http/abp/helper';
@ -66,7 +66,7 @@
rowKey: 'id', rowKey: 'id',
title: L('Editions'), title: L('Editions'),
columns: getDataColumns(), columns: getDataColumns(),
api: getList, api: GetListAsyncByInput,
beforeFetch: formatPagedRequest, beforeFetch: formatPagedRequest,
pagination: true, pagination: true,
striped: false, striped: false,
@ -100,7 +100,7 @@
content: L('ItemWillBeDeletedMessageWithFormat', record.displayName), content: L('ItemWillBeDeletedMessageWithFormat', record.displayName),
okCancel: true, okCancel: true,
onOk: () => { onOk: () => {
return deleteById(record.id).then(() => { return DeleteAsyncById(record.id).then(() => {
createMessage.success(L('SuccessfullyDeleted')); createMessage.success(L('SuccessfullyDeleted'));
reload(); reload();
}); });

4
apps/vue/src/views/saas/tenant/components/ConnectionEditModal.vue

@ -14,7 +14,7 @@
import { useLocalization } from '/@/hooks/abp/useLocalization'; import { useLocalization } from '/@/hooks/abp/useLocalization';
import { BasicForm, useForm } from '/@/components/Form'; import { BasicForm, useForm } from '/@/components/Form';
import { BasicModal, useModalInner } from '/@/components/Modal'; import { BasicModal, useModalInner } from '/@/components/Modal';
import { setConnectionString } from '/@/api/saas/tenant'; import { SetConnectionStringAsyncByIdAndInput } from '/@/api/saas/tenant';
import { getConnectionFormSchemas } from '../datas//ModalData'; import { getConnectionFormSchemas } from '../datas//ModalData';
const emits = defineEmits(['change', 'register']); const emits = defineEmits(['change', 'register']);
@ -39,7 +39,7 @@
function handleSubmit() { function handleSubmit() {
validate().then((input) => { validate().then((input) => {
changeOkLoading(true); changeOkLoading(true);
setConnectionString(input.id, input).then(() => { SetConnectionStringAsyncByIdAndInput(input.id, input).then(() => {
createMessage.success(L('Successful')); createMessage.success(L('Successful'));
closeModal(); closeModal();
emits('change'); emits('change');

6
apps/vue/src/views/saas/tenant/components/ConnectionTableModal.vue

@ -44,7 +44,7 @@
import { BasicTable, TableAction, useTable } from '/@/components/Table'; import { BasicTable, TableAction, useTable } from '/@/components/Table';
import { BasicModal, useModal, useModalInner } from '/@/components/Modal'; import { BasicModal, useModal, useModalInner } from '/@/components/Modal';
import { getConnectionStringsColumns } from '../datas/TableData'; import { getConnectionStringsColumns } from '../datas/TableData';
import { deleteConnectionString, getConnectionStrings } from '/@/api/saas/tenant'; import { DeleteConnectionStringAsyncByIdAndName, GetConnectionStringAsyncById } from '/@/api/saas/tenant';
import ConnectionEditModal from './ConnectionEditModal.vue'; import ConnectionEditModal from './ConnectionEditModal.vue';
defineEmits(['register']); defineEmits(['register']);
@ -86,7 +86,7 @@
content: L('TenantDeletionConfirmationMessage', [record.name]), content: L('TenantDeletionConfirmationMessage', [record.name]),
okCancel: true, okCancel: true,
onOk: () => { onOk: () => {
return deleteConnectionString(unref(tenantIdRef), record.name).then(() => { return DeleteConnectionStringAsyncByIdAndName(unref(tenantIdRef), record.name).then(() => {
createMessage.success(L('SuccessfullyDeleted')); createMessage.success(L('SuccessfullyDeleted'));
handleReloadTable(); handleReloadTable();
}); });
@ -97,7 +97,7 @@
function handleReloadTable() { function handleReloadTable() {
const tenantId = unref(tenantIdRef); const tenantId = unref(tenantIdRef);
if (tenantId) { if (tenantId) {
getConnectionStrings(tenantId).then((res) => { GetConnectionStringAsyncById(tenantId).then((res) => {
connectionsRef.value = res.items; connectionsRef.value = res.items;
}); });
} }

6
apps/vue/src/views/saas/tenant/components/TenantModal.vue

@ -23,7 +23,7 @@
import { BasicForm, useForm } from '/@/components/Form'; import { BasicForm, useForm } from '/@/components/Form';
import { BasicModal, useModalInner } from '/@/components/Modal'; import { BasicModal, useModalInner } from '/@/components/Modal';
import { getModalFormSchemas } from '../datas//ModalData'; import { getModalFormSchemas } from '../datas//ModalData';
import { getById, create, update } from '/@/api/saas/tenant'; import { GetAsyncById, CreateAsyncByInput, UpdateAsyncByIdAndInput } from '/@/api/saas/tenant';
const emits = defineEmits(['change', 'register']); const emits = defineEmits(['change', 'register']);
@ -46,7 +46,7 @@
title.value = L('Edit'); title.value = L('Edit');
resetFields(); resetFields();
if (id) { if (id) {
getById(id).then((res) => { GetAsyncById(id).then((res) => {
setFieldsValue(res); setFieldsValue(res);
title.value = L('NewTenant'); title.value = L('NewTenant');
}); });
@ -56,7 +56,7 @@
function handleSubmit() { function handleSubmit() {
validate().then((input) => { validate().then((input) => {
loading.value = true; loading.value = true;
const api = input.id ? update(input.id, input) : create(input); const api = input.id ? UpdateAsyncByIdAndInput(input.id, input) : CreateAsyncByInput(input);
api.then(() => { api.then(() => {
createMessage.success(L('Successful')); createMessage.success(L('Successful'));
emits('change'); emits('change');

2
apps/vue/src/views/saas/tenant/datas/ModalData.ts

@ -2,7 +2,7 @@ import { useLocalization } from '/@/hooks/abp/useLocalization';
import { useValidation } from '/@/hooks/abp/useValidation'; import { useValidation } from '/@/hooks/abp/useValidation';
import { usePasswordValidator } from '/@/hooks/security/usePasswordValidator'; import { usePasswordValidator } from '/@/hooks/security/usePasswordValidator';
import { FormProps, FormSchema } from '/@/components/Form'; import { FormProps, FormSchema } from '/@/components/Form';
import { getList as getEditions } from '/@/api/saas/editions'; import { GetListAsyncByInput as getEditions } from '/@/api/saas/edition';
const { L } = useLocalization('AbpSaas'); const { L } = useLocalization('AbpSaas');
const { ruleCreator } = useValidation(); const { ruleCreator } = useValidation();

6
apps/vue/src/views/saas/tenant/hooks/useTenantTable.ts

@ -6,7 +6,7 @@ import { useLocalization } from '/@/hooks/abp/useLocalization';
import { TableActionType, useTable } from '/@/components/Table'; import { TableActionType, useTable } from '/@/components/Table';
import { getDataColumns } from '../datas/TableData'; import { getDataColumns } from '../datas/TableData';
import { getSearchFormSchemas } from '../datas//ModalData'; import { getSearchFormSchemas } from '../datas//ModalData';
import { deleteById, getList } from '/@/api/saas/tenant'; import { DeleteAsyncById, GetListAsyncByInput } from '/@/api/saas/tenant';
import { formatPagedRequest } from '/@/utils/http/abp/helper'; import { formatPagedRequest } from '/@/utils/http/abp/helper';
interface UseTenantTable { interface UseTenantTable {
@ -20,7 +20,7 @@ export function useTenantTable({ tableElRef }: UseTenantTable) {
rowKey: 'id', rowKey: 'id',
title: L('Tenants'), title: L('Tenants'),
columns: getDataColumns(), columns: getDataColumns(),
api: getList, api: GetListAsyncByInput,
beforeFetch: formatPagedRequest, beforeFetch: formatPagedRequest,
pagination: true, pagination: true,
striped: false, striped: false,
@ -46,7 +46,7 @@ export function useTenantTable({ tableElRef }: UseTenantTable) {
content: L('ItemWillBeDeletedMessageWithFormat', [record.name]), content: L('ItemWillBeDeletedMessageWithFormat', [record.name]),
okCancel: true, okCancel: true,
onOk: () => { onOk: () => {
return deleteById(record.id).then(() => { return DeleteAsyncById(record.id).then(() => {
createMessage.success(L('SuccessfullyDeleted')); createMessage.success(L('SuccessfullyDeleted'));
handleReload(); handleReload();
}); });

2
apps/vue/src/views/webhooks/send-attempts/datas/ModalData.ts

@ -1,6 +1,6 @@
import { useLocalization } from '/@/hooks/abp/useLocalization'; import { useLocalization } from '/@/hooks/abp/useLocalization';
import { FormProps } from '/@/components/Form'; import { FormProps } from '/@/components/Form';
import { getList as getTenants } from '/@/api/saas/tenant'; import { GetListAsyncByInput as getTenants } from '/@/api/saas/tenant';
import { getList as getSubscriptions } from '/@/api/webhooks/subscriptions'; import { getList as getSubscriptions } from '/@/api/webhooks/subscriptions';
import { httpStatusOptions } from '../../typing'; import { httpStatusOptions } from '../../typing';

2
apps/vue/src/views/webhooks/subscriptions/components/SubscriptionModal.vue

@ -71,7 +71,7 @@
import { CodeEditorX, MODE } from '/@/components/CodeEditor'; import { CodeEditorX, MODE } from '/@/components/CodeEditor';
import { BasicModal, useModalInner } from '/@/components/Modal'; import { BasicModal, useModalInner } from '/@/components/Modal';
import { Tenant } from '/@/api/saas/model/tenantModel'; import { Tenant } from '/@/api/saas/model/tenantModel';
import { getList as getTenants } from '/@/api/saas/tenant'; import { GetListAsyncByInput as getTenants } from '/@/api/saas/tenant';
import { getById, create, update, getAllAvailableWebhooks } from '/@/api/webhooks/subscriptions'; import { getById, create, update, getAllAvailableWebhooks } from '/@/api/webhooks/subscriptions';
import { import {
WebhookSubscription, WebhookSubscription,

4
apps/vue/src/views/webhooks/subscriptions/datas/ModalData.ts

@ -1,6 +1,6 @@
import { useLocalization } from '/@/hooks/abp/useLocalization'; import { useLocalization } from '/@/hooks/abp/useLocalization';
import { FormProps } from '/@/components/Form'; import { FormProps } from '/@/components/Form';
import { getList } from '/@/api/saas/tenant'; import { GetListAsyncByInput } from '/@/api/saas/tenant';
import { getAllAvailableWebhooks } from '/@/api/webhooks/subscriptions'; import { getAllAvailableWebhooks } from '/@/api/webhooks/subscriptions';
const { L } = useLocalization(['WebhooksManagement', 'AbpUi']); const { L } = useLocalization(['WebhooksManagement', 'AbpUi']);
@ -32,7 +32,7 @@ export function getSearchFormSchemas(): Partial<FormProps> {
label: L('DisplayName:TenantId'), label: L('DisplayName:TenantId'),
colProps: { span: 6 }, colProps: { span: 6 },
componentProps: { componentProps: {
api: getList, api: GetListAsyncByInput,
params: { params: {
skipCount: 0, skipCount: 0,
maxResultCount: 1000, maxResultCount: 1000,

115
apps/vue/types/abp.type.d.ts

@ -0,0 +1,115 @@
declare interface ExtensibleObject {
extraProperties: ExtraPropertyDictionary;
}
declare interface EntityDto<TPrimaryKey> {
id: TPrimaryKey;
}
declare interface CreationAuditedEntityDto<TPrimaryKey> extends EntityDto<TPrimaryKey> {
creationTime: Date;
creatorId?: string;
}
declare interface CreationAuditedEntityWithUserDto<TPrimaryKey, TUserDto>
extends CreationAuditedEntityDto<TPrimaryKey> {
creator: TUserDto;
}
declare interface AuditedEntityDto<TPrimaryKey> extends CreationAuditedEntityDto<TPrimaryKey> {
lastModificationTime?: Date;
lastModifierId?: string;
}
declare interface AuditedEntityWithUserDto<TPrimaryKey, TUserDto>
extends AuditedEntityDto<TPrimaryKey> {
creator: TUserDto;
lastModifier: TUserDto;
}
declare interface ExtensibleEntityDto<TKey> extends ExtensibleObject {
id: TKey;
}
declare interface ExtensibleCreationAuditedEntityDto<TPrimaryKey>
extends ExtensibleEntityDto<TPrimaryKey> {
creationTime: Date;
creatorId?: string;
}
declare interface ExtensibleCreationAuditedEntityWithUserDto<TPrimaryKey, TUserDto>
extends ExtensibleCreationAuditedEntityDto<TPrimaryKey> {
creator: TUserDto;
}
declare interface ExtensibleAuditedEntityDto<TPrimaryKey>
extends ExtensibleCreationAuditedEntityDto<TPrimaryKey> {
lastModificationTime?: Date;
lastModifierId?: string;
}
declare interface ExtensibleAuditedEntityWithUserDto<TPrimaryKey, TUserDto>
extends ExtensibleAuditedEntityDto<TPrimaryKey> {
creator: TUserDto;
lastModifier: TUserDto;
}
declare interface ExtensibleFullAuditedEntityDto<TPrimaryKey>
extends ExtensibleAuditedEntityDto<TPrimaryKey> {
isDeleted: boolean;
deleterId?: string;
deletionTime?: Date;
}
declare interface ExtensibleFullAuditedEntityWithUserDto<TPrimaryKey, TUserDto>
extends ExtensibleFullAuditedEntityDto<TPrimaryKey> {
creator: TUserDto;
lastModifier: TUserDto;
deleter: TUserDto;
}
declare interface FullAuditedEntityDto<TPrimaryKey> extends AuditedEntityDto<TPrimaryKey> {
isDeleted: boolean;
deleterId?: string;
deletionTime?: Date;
}
declare interface FullAuditedEntityWithUserDto<TUserDto> extends FullAuditedEntityDto<TPrimaryKey> {
creator: TUserDto;
lastModifier: TUserDto;
deleter: TUserDto;
}
declare interface LimitedResultRequestDto {
maxResultCount?: number;
}
declare interface ExtensibleLimitedResultRequestDto
extends LimitedResultRequestDto,
ExtensibleObject {}
declare interface ListResultDto<T> {
items: T[];
}
declare interface ExtensibleListResultDto<T> extends ListResultDto<T>, ExtensibleObject {}
declare interface PagedResultDto<T> extends ListResultDto<T> {
totalCount: number;
}
declare interface ExtensiblePagedResultDto<T> extends PagedResultDto<T>, ExtensibleObject {}
declare interface PagedAndSortedResultRequestDto extends PagedResultRequestDto {
sorting?: string;
}
declare interface ExtensiblePagedAndSortedResultRequestDto
extends PagedAndSortedResultRequestDto,
ExtensibleObject {}
declare interface PagedResultRequestDto extends LimitedResultRequestDto {
skipCount?: number;
}
declare interface ExtensiblePagedResultRequestDto extends PagedResultRequestDto, ExtensibleObject {}

2
aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN.Abp.Cli.csproj

@ -5,7 +5,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<Version>6.0.1</Version> <Version>6.0.2</Version>
<Copyright>colin</Copyright> <Copyright>colin</Copyright>
<Description>Use LINGYUN.MicroService.Templates command line</Description> <Description>Use LINGYUN.MicroService.Templates command line</Description>
<PackAsTool>true</PackAsTool> <PackAsTool>true</PackAsTool>

3
aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/ServiceProxying/TypeScript/TypeScriptProxyGenerator.cs

@ -268,6 +268,8 @@ public class TypeScriptProxyGenerator : ITypeScriptProxyGenerator, ITransientDep
apiScriptBuilder.AppendLine(" controller: controllerName,"); apiScriptBuilder.AppendLine(" controller: controllerName,");
apiScriptBuilder.AppendFormat(" action: '{0}',", action.Value.Name); apiScriptBuilder.AppendFormat(" action: '{0}',", action.Value.Name);
apiScriptBuilder.AppendLine(""); apiScriptBuilder.AppendLine("");
apiScriptBuilder.AppendFormat(" uniqueName: '{0}',", action.Value.UniqueName);
apiScriptBuilder.AppendLine("");
if (DataInParamMethods.Contains(action.Value.HttpMethod)) if (DataInParamMethods.Contains(action.Value.HttpMethod))
{ {
@ -321,7 +323,6 @@ public class TypeScriptProxyGenerator : ITypeScriptProxyGenerator, ITransientDep
apiScriptBuilder.AppendLine(" });"); apiScriptBuilder.AppendLine(" });");
apiScriptBuilder.AppendLine("};"); apiScriptBuilder.AppendLine("};");
apiScriptBuilder.AppendLine("");
} }
return apiScriptBuilder.ToString(); return apiScriptBuilder.ToString();

4
aspnet-core/services/LY.MicroService.AuthServer/LY.MicroService.AuthServer.csproj

@ -67,4 +67,8 @@
<ProjectReference Include="..\..\modules\tenants\LINGYUN.Abp.MultiTenancy\LINGYUN.Abp.MultiTenancy.csproj" /> <ProjectReference Include="..\..\modules\tenants\LINGYUN.Abp.MultiTenancy\LINGYUN.Abp.MultiTenancy.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="Migrations\" />
</ItemGroup>
</Project> </Project>

Loading…
Cancel
Save