committed by
GitHub
38 changed files with 765 additions and 568 deletions
@ -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, |
|
||||
OpenIddictApplicationUpdateDto, |
|
||||
OpenIddictApplicationGetListInput, |
|
||||
} from './model'; |
|
||||
|
|
||||
const remoteServiceName = 'AbpOpenIddict'; |
const remoteServiceName = 'AbpOpenIddict'; |
||||
const controllerName = 'OpenIddictApplication'; |
const controllerName = 'OpenIddictApplication'; |
||||
|
|
||||
export const getById = (id: string) => { |
export const GetAsyncById = (id: string) => { |
||||
return defAbpHttp.request<OpenIddictApplicationDto>({ |
return defAbpHttp.request<OpenIddictApplicationDto>({ |
||||
service: remoteServiceName, |
service: remoteServiceName, |
||||
controller: controllerName, |
controller: controllerName, |
||||
action: 'GetAsync', |
action: 'GetAsync', |
||||
|
uniqueName: 'GetAsyncById', |
||||
params: { |
params: { |
||||
id: id, |
id: id, |
||||
}, |
}, |
||||
}); |
}); |
||||
}; |
}; |
||||
|
|
||||
export const getList = (input: OpenIddictApplicationGetListInput) => { |
export const GetListAsyncByInput = (input: OpenIddictApplicationGetListInput) => { |
||||
return defAbpHttp.pagedRequest<OpenIddictApplicationDto>({ |
return defAbpHttp.pagedRequest<OpenIddictApplicationDto>({ |
||||
service: remoteServiceName, |
service: remoteServiceName, |
||||
controller: controllerName, |
controller: controllerName, |
||||
action: 'GetListAsync', |
action: 'GetListAsync', |
||||
|
uniqueName: 'GetListAsyncByInput', |
||||
params: { |
params: { |
||||
input: input, |
input: input, |
||||
}, |
}, |
||||
}); |
}); |
||||
}; |
}; |
||||
|
|
||||
export const deleteById = (id: string) => { |
export const CreateAsyncByInput = (input: OpenIddictApplicationCreateDto) => { |
||||
return defAbpHttp.request<void>({ |
return defAbpHttp.request<OpenIddictApplicationDto>({ |
||||
service: remoteServiceName, |
service: remoteServiceName, |
||||
controller: controllerName, |
controller: controllerName, |
||||
action: 'DeleteAsync', |
action: 'CreateAsync', |
||||
params: { |
uniqueName: 'CreateAsyncByInput', |
||||
id: id, |
data: input, |
||||
}, |
|
||||
}); |
}); |
||||
}; |
}; |
||||
|
|
||||
export const create = (input: OpenIddictApplicationCreateDto) => { |
export const UpdateAsyncByIdAndInput = (id: string, input: OpenIddictApplicationUpdateDto) => { |
||||
return defAbpHttp.request<OpenIddictApplicationDto>({ |
return defAbpHttp.request<OpenIddictApplicationDto>({ |
||||
service: remoteServiceName, |
service: remoteServiceName, |
||||
controller: controllerName, |
controller: controllerName, |
||||
action: 'CreateAsync', |
action: 'UpdateAsync', |
||||
|
uniqueName: 'UpdateAsyncByIdAndInput', |
||||
|
params: { |
||||
|
id: id, |
||||
|
}, |
||||
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, |
||||
|
}, |
||||
}); |
}); |
||||
}; |
}; |
||||
|
|
||||
@ -1,41 +1,42 @@ |
|||||
import { defAbpHttp } from '/@/utils/http/abp'; |
import { defAbpHttp } from '/@/utils/http/abp'; |
||||
import { |
import { OpenIddictAuthorizationDto,OpenIddictAuthorizationGetListInput, } from './model'; |
||||
OpenIddictAuthorizationDto, |
|
||||
OpenIddictAuthorizationGetListInput, |
|
||||
} from './model'; |
|
||||
|
|
||||
const remoteServiceName = 'AbpOpenIddict'; |
const remoteServiceName = 'AbpOpenIddict'; |
||||
const controllerName = 'OpenIddictAuthorization'; |
const controllerName = 'OpenIddictAuthorization'; |
||||
|
|
||||
export const getById = (id: string) => { |
export const DeleteAsyncById = (id: string) => { |
||||
return defAbpHttp.request<OpenIddictAuthorizationDto>({ |
return defAbpHttp.request<void>({ |
||||
service: remoteServiceName, |
service: remoteServiceName, |
||||
controller: controllerName, |
controller: controllerName, |
||||
action: 'GetAsync', |
action: 'DeleteAsync', |
||||
|
uniqueName: 'DeleteAsyncById', |
||||
params: { |
params: { |
||||
id: id, |
id: id, |
||||
}, |
}, |
||||
}); |
}); |
||||
}; |
}; |
||||
|
|
||||
export const getList = (input: OpenIddictAuthorizationGetListInput) => { |
export const GetAsyncById = (id: string) => { |
||||
return defAbpHttp.pagedRequest<OpenIddictAuthorizationDto>({ |
return defAbpHttp.request<OpenIddictAuthorizationDto>({ |
||||
service: remoteServiceName, |
service: remoteServiceName, |
||||
controller: controllerName, |
controller: controllerName, |
||||
action: 'GetListAsync', |
action: 'GetAsync', |
||||
|
uniqueName: 'GetAsyncById', |
||||
params: { |
params: { |
||||
input: input, |
id: id, |
||||
}, |
}, |
||||
}); |
}); |
||||
}; |
}; |
||||
|
|
||||
export const deleteById = (id: string) => { |
export const GetListAsyncByInput = (input: OpenIddictAuthorizationGetListInput) => { |
||||
return defAbpHttp.request<void>({ |
return defAbpHttp.pagedRequest<OpenIddictAuthorizationDto>({ |
||||
service: remoteServiceName, |
service: remoteServiceName, |
||||
controller: controllerName, |
controller: controllerName, |
||||
action: 'DeleteAsync', |
action: 'GetListAsync', |
||||
|
uniqueName: 'GetListAsyncByInput', |
||||
params: { |
params: { |
||||
id: id, |
input: input, |
||||
}, |
}, |
||||
}); |
}); |
||||
}; |
}; |
||||
|
|
||||
@ -1,21 +1,20 @@ |
|||||
import { ExtensibleAuditedEntity, PagedAndSortedResultRequestDto } from '../../../model/baseModel'; |
|
||||
|
|
||||
export interface OpenIddictAuthorizationDto extends ExtensibleAuditedEntity<string> { |
|
||||
applicationId?: string; |
|
||||
creationDate?: Date; |
|
||||
properties?: {[key: string]: string}; |
|
||||
scopes?: string[]; |
|
||||
type?: string; |
|
||||
status?: string; |
|
||||
subject?: string; |
|
||||
} |
|
||||
|
|
||||
export interface OpenIddictAuthorizationGetListInput extends PagedAndSortedResultRequestDto { |
export interface OpenIddictAuthorizationGetListInput extends PagedAndSortedResultRequestDto { |
||||
filter?: string; |
filter?: string; |
||||
subject?: string; |
subject?: string; |
||||
clientId?: string; |
clientId?: string; |
||||
status?: string; |
status?: string; |
||||
type?: string; |
type?: string; |
||||
beginCreationTime?: Date; |
beginCreationTime?: string; |
||||
endCreationTime?: string; |
endCreationTime?: string; |
||||
} |
} |
||||
|
|
||||
|
export interface OpenIddictAuthorizationDto extends ExtensibleAuditedEntityDto<string> { |
||||
|
applicationId?: string; |
||||
|
creationDate?: string; |
||||
|
properties?: Dictionary<string, string>; |
||||
|
scopes?: string[]; |
||||
|
status?: string; |
||||
|
subject?: string; |
||||
|
type?: string; |
||||
|
} |
||||
|
|
||||
@ -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, |
|
||||
OpenIddictScopeUpdateDto, |
|
||||
OpenIddictScopeGetListInput, |
|
||||
} from './model'; |
|
||||
|
|
||||
const remoteServiceName = 'AbpOpenIddict'; |
const remoteServiceName = 'AbpOpenIddict'; |
||||
const controllerName = 'OpenIddictScope'; |
const controllerName = 'OpenIddictScope'; |
||||
|
|
||||
export const getById = (id: string) => { |
export const CreateAsyncByInput = (input: OpenIddictScopeCreateDto) => { |
||||
return defAbpHttp.request<OpenIddictScopeDto>({ |
return defAbpHttp.request<OpenIddictScopeDto>({ |
||||
service: remoteServiceName, |
service: remoteServiceName, |
||||
controller: controllerName, |
controller: controllerName, |
||||
action: 'GetAsync', |
action: 'CreateAsync', |
||||
params: { |
uniqueName: 'CreateAsyncByInput', |
||||
id: id, |
data: input, |
||||
}, |
|
||||
}); |
}); |
||||
}; |
}; |
||||
|
|
||||
export const getList = (input: OpenIddictScopeGetListInput) => { |
export const DeleteAsyncById = (id: string) => { |
||||
return defAbpHttp.pagedRequest<OpenIddictScopeDto>({ |
return defAbpHttp.request<void>({ |
||||
service: remoteServiceName, |
service: remoteServiceName, |
||||
controller: controllerName, |
controller: controllerName, |
||||
action: 'GetListAsync', |
action: 'DeleteAsync', |
||||
|
uniqueName: 'DeleteAsyncById', |
||||
params: { |
params: { |
||||
input: input, |
id: id, |
||||
}, |
}, |
||||
}); |
}); |
||||
}; |
}; |
||||
|
|
||||
export const deleteById = (id: string) => { |
export const GetAsyncById = (id: string) => { |
||||
return defAbpHttp.request<void>({ |
return defAbpHttp.request<OpenIddictScopeDto>({ |
||||
service: remoteServiceName, |
service: remoteServiceName, |
||||
controller: controllerName, |
controller: controllerName, |
||||
action: 'DeleteAsync', |
action: 'GetAsync', |
||||
|
uniqueName: 'GetAsyncById', |
||||
params: { |
params: { |
||||
id: id, |
id: id, |
||||
}, |
}, |
||||
}); |
}); |
||||
}; |
}; |
||||
|
|
||||
export const create = (input: OpenIddictScopeCreateDto) => { |
export const GetListAsyncByInput = (input: OpenIddictScopeGetListInput) => { |
||||
return defAbpHttp.request<OpenIddictScopeDto>({ |
return defAbpHttp.pagedRequest<OpenIddictScopeDto>({ |
||||
service: remoteServiceName, |
service: remoteServiceName, |
||||
controller: controllerName, |
controller: controllerName, |
||||
action: 'CreateAsync', |
action: 'GetListAsync', |
||||
data: input, |
uniqueName: 'GetListAsyncByInput', |
||||
|
params: { |
||||
|
input: input, |
||||
|
}, |
||||
}); |
}); |
||||
}; |
}; |
||||
|
|
||||
export const update = (input: OpenIddictScopeUpdateDto) => { |
export const UpdateAsyncByIdAndInput = (id: string, input: OpenIddictScopeUpdateDto) => { |
||||
return defAbpHttp.request<OpenIddictScopeDto>({ |
return defAbpHttp.request<OpenIddictScopeDto>({ |
||||
service: remoteServiceName, |
service: remoteServiceName, |
||||
controller: controllerName, |
controller: controllerName, |
||||
action: 'UpdateAsync', |
action: 'UpdateAsync', |
||||
|
uniqueName: 'UpdateAsyncByIdAndInput', |
||||
|
params: { |
||||
|
id: id, |
||||
|
}, |
||||
data: input, |
data: input, |
||||
}); |
}); |
||||
}; |
}; |
||||
|
|
||||
@ -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[]; |
||||
|
} |
||||
|
|
||||
@ -1,41 +1,42 @@ |
|||||
import { defAbpHttp } from '/@/utils/http/abp'; |
import { defAbpHttp } from '/@/utils/http/abp'; |
||||
import { |
import { OpenIddictTokenDto,OpenIddictTokenGetListInput, } from './model'; |
||||
OpenIddictTokenDto, |
|
||||
OpenIddictTokenGetListInput, |
|
||||
} from './model'; |
|
||||
|
|
||||
const remoteServiceName = 'AbpOpenIddict'; |
const remoteServiceName = 'AbpOpenIddict'; |
||||
const controllerName = 'OpenIddictToken'; |
const controllerName = 'OpenIddictToken'; |
||||
|
|
||||
export const getById = (id: string) => { |
export const DeleteAsyncById = (id: string) => { |
||||
return defAbpHttp.request<OpenIddictTokenDto>({ |
return defAbpHttp.request<void>({ |
||||
service: remoteServiceName, |
service: remoteServiceName, |
||||
controller: controllerName, |
controller: controllerName, |
||||
action: 'GetAsync', |
action: 'DeleteAsync', |
||||
|
uniqueName: 'DeleteAsyncById', |
||||
params: { |
params: { |
||||
id: id, |
id: id, |
||||
}, |
}, |
||||
}); |
}); |
||||
}; |
}; |
||||
|
|
||||
export const getList = (input: OpenIddictTokenGetListInput) => { |
export const GetAsyncById = (id: string) => { |
||||
return defAbpHttp.pagedRequest<OpenIddictTokenDto>({ |
return defAbpHttp.request<OpenIddictTokenDto>({ |
||||
service: remoteServiceName, |
service: remoteServiceName, |
||||
controller: controllerName, |
controller: controllerName, |
||||
action: 'GetListAsync', |
action: 'GetAsync', |
||||
|
uniqueName: 'GetAsyncById', |
||||
params: { |
params: { |
||||
input: input, |
id: id, |
||||
}, |
}, |
||||
}); |
}); |
||||
}; |
}; |
||||
|
|
||||
export const deleteById = (id: string) => { |
export const GetListAsyncByInput = (input: OpenIddictTokenGetListInput) => { |
||||
return defAbpHttp.request<void>({ |
return defAbpHttp.pagedRequest<OpenIddictTokenDto>({ |
||||
service: remoteServiceName, |
service: remoteServiceName, |
||||
controller: controllerName, |
controller: controllerName, |
||||
action: 'DeleteAsync', |
action: 'GetListAsync', |
||||
|
uniqueName: 'GetListAsyncByInput', |
||||
params: { |
params: { |
||||
id: id, |
input: input, |
||||
}, |
}, |
||||
}); |
}); |
||||
}; |
}; |
||||
|
|
||||
@ -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; |
|
||||
@ -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, |
||||
|
}); |
||||
|
}; |
||||
@ -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; |
||||
|
} |
||||
|
|
||||
@ -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, |
|
||||
}); |
|
||||
}; |
|
||||
@ -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; |
|
||||
} |
|
||||
@ -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>; |
|
||||
@ -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 }), |
|
||||
}); |
|
||||
}; |
|
||||
@ -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, |
||||
|
}, |
||||
|
}); |
||||
|
}; |
||||
@ -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; |
||||
|
} |
||||
|
|
||||
@ -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 {} |
||||
Loading…
Reference in new issue