mirror of https://github.com/abpframework/abp.git
19 changed files with 706 additions and 644 deletions
@ -0,0 +1,7 @@ |
|||
{ |
|||
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json", |
|||
"dest": "../../../dist/packages/tenant-management/proxy", |
|||
"lib": { |
|||
"entryFile": "src/public-api.ts" |
|||
} |
|||
} |
|||
@ -0,0 +1,2 @@ |
|||
export * from './proxy'; |
|||
|
|||
File diff suppressed because it is too large
@ -0,0 +1,74 @@ |
|||
import type { GetTenantsInput, TenantCreateDto, TenantDto, TenantUpdateDto } from './models'; |
|||
import { RestService } from '@abp/ng.core'; |
|||
import type { PagedResultDto } from '@abp/ng.core'; |
|||
import { Injectable } from '@angular/core'; |
|||
|
|||
@Injectable({ |
|||
providedIn: 'root', |
|||
}) |
|||
export class TenantService { |
|||
apiName = 'AbpTenantManagement'; |
|||
|
|||
create = (input: TenantCreateDto) => |
|||
this.restService.request<any, TenantDto>({ |
|||
method: 'POST', |
|||
url: '/api/multi-tenancy/tenants', |
|||
body: input, |
|||
}, |
|||
{ apiName: this.apiName }); |
|||
|
|||
delete = (id: string) => |
|||
this.restService.request<any, void>({ |
|||
method: 'DELETE', |
|||
url: `/api/multi-tenancy/tenants/${id}`, |
|||
}, |
|||
{ apiName: this.apiName }); |
|||
|
|||
deleteDefaultConnectionString = (id: string) => |
|||
this.restService.request<any, void>({ |
|||
method: 'DELETE', |
|||
url: `/api/multi-tenancy/tenants/${id}/default-connection-string`, |
|||
}, |
|||
{ apiName: this.apiName }); |
|||
|
|||
get = (id: string) => |
|||
this.restService.request<any, TenantDto>({ |
|||
method: 'GET', |
|||
url: `/api/multi-tenancy/tenants/${id}`, |
|||
}, |
|||
{ apiName: this.apiName }); |
|||
|
|||
getDefaultConnectionString = (id: string) => |
|||
this.restService.request<any, string>({ |
|||
method: 'GET', |
|||
responseType: 'text', |
|||
url: `/api/multi-tenancy/tenants/${id}/default-connection-string`, |
|||
}, |
|||
{ apiName: this.apiName }); |
|||
|
|||
getList = (input: GetTenantsInput) => |
|||
this.restService.request<any, PagedResultDto<TenantDto>>({ |
|||
method: 'GET', |
|||
url: '/api/multi-tenancy/tenants', |
|||
params: { filter: input.filter, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount }, |
|||
}, |
|||
{ apiName: this.apiName }); |
|||
|
|||
update = (id: string, input: TenantUpdateDto) => |
|||
this.restService.request<any, TenantDto>({ |
|||
method: 'PUT', |
|||
url: `/api/multi-tenancy/tenants/${id}`, |
|||
body: input, |
|||
}, |
|||
{ apiName: this.apiName }); |
|||
|
|||
updateDefaultConnectionString = (id: string, defaultConnectionString: string) => |
|||
this.restService.request<any, void>({ |
|||
method: 'PUT', |
|||
url: `/api/multi-tenancy/tenants/${id}/default-connection-string`, |
|||
params: { defaultConnectionString }, |
|||
}, |
|||
{ apiName: this.apiName }); |
|||
|
|||
constructor(private restService: RestService) {} |
|||
} |
|||
@ -0,0 +1 @@ |
|||
export * from './lib'; |
|||
@ -1,95 +0,0 @@ |
|||
import type { PagedResultDto } from '@abp/ng.core'; |
|||
import { RestService } from '@abp/ng.core'; |
|||
import { Injectable } from '@angular/core'; |
|||
import type { GetTenantsInput, TenantCreateDto, TenantDto, TenantUpdateDto } from './models'; |
|||
|
|||
@Injectable({ |
|||
providedIn: 'root', |
|||
}) |
|||
export class TenantService { |
|||
apiName = 'AbpTenantManagement'; |
|||
|
|||
create = (input: TenantCreateDto) => |
|||
this.restService.request<any, TenantDto>( |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/multi-tenancy/tenants', |
|||
body: input, |
|||
}, |
|||
{ apiName: this.apiName }, |
|||
); |
|||
|
|||
delete = (id: string) => |
|||
this.restService.request<any, void>( |
|||
{ |
|||
method: 'DELETE', |
|||
url: `/api/multi-tenancy/tenants/${id}`, |
|||
}, |
|||
{ apiName: this.apiName }, |
|||
); |
|||
|
|||
deleteDefaultConnectionString = (id: string) => |
|||
this.restService.request<any, void>( |
|||
{ |
|||
method: 'DELETE', |
|||
url: `/api/multi-tenancy/tenants/${id}/default-connection-string`, |
|||
}, |
|||
{ apiName: this.apiName }, |
|||
); |
|||
|
|||
get = (id: string) => |
|||
this.restService.request<any, TenantDto>( |
|||
{ |
|||
method: 'GET', |
|||
url: `/api/multi-tenancy/tenants/${id}`, |
|||
}, |
|||
{ apiName: this.apiName }, |
|||
); |
|||
|
|||
getDefaultConnectionString = (id: string) => |
|||
this.restService.request<any, string>( |
|||
{ |
|||
method: 'GET', |
|||
responseType: 'text', |
|||
url: `/api/multi-tenancy/tenants/${id}/default-connection-string`, |
|||
}, |
|||
{ apiName: this.apiName }, |
|||
); |
|||
|
|||
getList = (input: GetTenantsInput) => |
|||
this.restService.request<any, PagedResultDto<TenantDto>>( |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/multi-tenancy/tenants', |
|||
params: { |
|||
filter: input.filter, |
|||
sorting: input.sorting, |
|||
skipCount: input.skipCount, |
|||
maxResultCount: input.maxResultCount, |
|||
}, |
|||
}, |
|||
{ apiName: this.apiName }, |
|||
); |
|||
|
|||
update = (id: string, input: TenantUpdateDto) => |
|||
this.restService.request<any, TenantDto>( |
|||
{ |
|||
method: 'PUT', |
|||
url: `/api/multi-tenancy/tenants/${id}`, |
|||
body: input, |
|||
}, |
|||
{ apiName: this.apiName }, |
|||
); |
|||
|
|||
updateDefaultConnectionString = (id: string, defaultConnectionString: string) => |
|||
this.restService.request<any, void>( |
|||
{ |
|||
method: 'PUT', |
|||
url: `/api/multi-tenancy/tenants/${id}/default-connection-string`, |
|||
params: { defaultConnectionString }, |
|||
}, |
|||
{ apiName: this.apiName }, |
|||
); |
|||
|
|||
constructor(private restService: RestService) {} |
|||
} |
|||
Loading…
Reference in new issue