@ -217,6 +217,758 @@ export class AbpApplicationConfigurationServiceProxy extends ServiceProxyBase {
}
}
export class TenantsServiceProxy extends ServiceProxyBase {
private instance : AxiosInstance ;
private baseUrl : string ;
protected jsonParseReviver : ( ( key : string , value : any ) = > any ) | undefined = undefined ;
constructor ( baseUrl? : string , instance? : AxiosInstance ) {
super ( ) ;
this . instance = instance ? instance : axios.create ( ) ;
this . baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : "" ;
}
/ * *
* 通 过 名 称 获 取 租 户 信 息
* @param body ( optional )
* @return Success
* /
find ( body : FindTenantByNameInput | undefined , cancelToken? : CancelToken | undefined ) : Promise < FindTenantResultDto > {
let url_ = this . baseUrl + "/Tenants/find" ;
url_ = url_ . replace ( /[?&]$/ , "" ) ;
const content_ = JSON . stringify ( body ) ;
let options_ = < AxiosRequestConfig > {
data : content_ ,
method : "POST" ,
url : url_ ,
headers : {
"Content-Type" : "application/json" ,
"Accept" : "text/plain"
} ,
cancelToken
} ;
return this . transformOptions ( options_ ) . then ( transformedOptions_ = > {
return this . instance . request ( transformedOptions_ ) ;
} ) . catch ( ( _error : any ) = > {
if ( isAxiosError ( _error ) && _error . response ) {
return _error . response ;
} else {
throw _error ;
}
} ) . then ( ( _response : AxiosResponse ) = > {
return this . transformResult ( url_ , _response , ( _response : AxiosResponse ) = > this . processFind ( _response ) ) ;
} ) ;
}
protected processFind ( response : AxiosResponse ) : Promise < FindTenantResultDto > {
const status = response . status ;
let _headers : any = { } ;
if ( response . headers && typeof response . headers === "object" ) {
for ( let k in response . headers ) {
if ( response . headers . hasOwnProperty ( k ) ) {
_headers [ k ] = response . headers [ k ] ;
}
}
}
if ( status === 200 ) {
const _responseText = response . data ;
let result200 : any = null ;
let resultData200 = _responseText ;
result200 = FindTenantResultDto . fromJS ( resultData200 ) ;
return result200 ;
} else if ( status === 403 ) {
const _responseText = response . data ;
let result403 : any = null ;
let resultData403 = _responseText ;
result403 = RemoteServiceErrorResponse . fromJS ( resultData403 ) ;
return throwException ( "Forbidden" , status , _responseText , _headers , result403 ) ;
} else if ( status === 401 ) {
const _responseText = response . data ;
let result401 : any = null ;
let resultData401 = _responseText ;
result401 = RemoteServiceErrorResponse . fromJS ( resultData401 ) ;
return throwException ( "Unauthorized" , status , _responseText , _headers , result401 ) ;
} else if ( status === 400 ) {
const _responseText = response . data ;
let result400 : any = null ;
let resultData400 = _responseText ;
result400 = RemoteServiceErrorResponse . fromJS ( resultData400 ) ;
return throwException ( "Bad Request" , status , _responseText , _headers , result400 ) ;
} else if ( status === 404 ) {
const _responseText = response . data ;
let result404 : any = null ;
let resultData404 = _responseText ;
result404 = RemoteServiceErrorResponse . fromJS ( resultData404 ) ;
return throwException ( "Not Found" , status , _responseText , _headers , result404 ) ;
} else if ( status === 501 ) {
const _responseText = response . data ;
let result501 : any = null ;
let resultData501 = _responseText ;
result501 = RemoteServiceErrorResponse . fromJS ( resultData501 ) ;
return throwException ( "Server Error" , status , _responseText , _headers , result501 ) ;
} else if ( status === 500 ) {
const _responseText = response . data ;
let result500 : any = null ;
let resultData500 = _responseText ;
result500 = RemoteServiceErrorResponse . fromJS ( resultData500 ) ;
return throwException ( "Server Error" , status , _responseText , _headers , result500 ) ;
} else if ( status !== 200 && status !== 204 ) {
const _responseText = response . data ;
return throwException ( "An unexpected server error occurred." , status , _responseText , _headers ) ;
}
return Promise . resolve < FindTenantResultDto > ( < any > null ) ;
}
/ * *
* 分 页 获 取 租 户 信 息
* @param body ( optional )
* @return Success
* /
page ( body : PagingTenantInput | undefined , cancelToken? : CancelToken | undefined ) : Promise < TenantDtoPagedResultDto > {
let url_ = this . baseUrl + "/Tenants/page" ;
url_ = url_ . replace ( /[?&]$/ , "" ) ;
const content_ = JSON . stringify ( body ) ;
let options_ = < AxiosRequestConfig > {
data : content_ ,
method : "POST" ,
url : url_ ,
headers : {
"Content-Type" : "application/json" ,
"Accept" : "text/plain"
} ,
cancelToken
} ;
return this . transformOptions ( options_ ) . then ( transformedOptions_ = > {
return this . instance . request ( transformedOptions_ ) ;
} ) . catch ( ( _error : any ) = > {
if ( isAxiosError ( _error ) && _error . response ) {
return _error . response ;
} else {
throw _error ;
}
} ) . then ( ( _response : AxiosResponse ) = > {
return this . transformResult ( url_ , _response , ( _response : AxiosResponse ) = > this . processPage ( _response ) ) ;
} ) ;
}
protected processPage ( response : AxiosResponse ) : Promise < TenantDtoPagedResultDto > {
const status = response . status ;
let _headers : any = { } ;
if ( response . headers && typeof response . headers === "object" ) {
for ( let k in response . headers ) {
if ( response . headers . hasOwnProperty ( k ) ) {
_headers [ k ] = response . headers [ k ] ;
}
}
}
if ( status === 200 ) {
const _responseText = response . data ;
let result200 : any = null ;
let resultData200 = _responseText ;
result200 = TenantDtoPagedResultDto . fromJS ( resultData200 ) ;
return result200 ;
} else if ( status === 403 ) {
const _responseText = response . data ;
let result403 : any = null ;
let resultData403 = _responseText ;
result403 = RemoteServiceErrorResponse . fromJS ( resultData403 ) ;
return throwException ( "Forbidden" , status , _responseText , _headers , result403 ) ;
} else if ( status === 401 ) {
const _responseText = response . data ;
let result401 : any = null ;
let resultData401 = _responseText ;
result401 = RemoteServiceErrorResponse . fromJS ( resultData401 ) ;
return throwException ( "Unauthorized" , status , _responseText , _headers , result401 ) ;
} else if ( status === 400 ) {
const _responseText = response . data ;
let result400 : any = null ;
let resultData400 = _responseText ;
result400 = RemoteServiceErrorResponse . fromJS ( resultData400 ) ;
return throwException ( "Bad Request" , status , _responseText , _headers , result400 ) ;
} else if ( status === 404 ) {
const _responseText = response . data ;
let result404 : any = null ;
let resultData404 = _responseText ;
result404 = RemoteServiceErrorResponse . fromJS ( resultData404 ) ;
return throwException ( "Not Found" , status , _responseText , _headers , result404 ) ;
} else if ( status === 501 ) {
const _responseText = response . data ;
let result501 : any = null ;
let resultData501 = _responseText ;
result501 = RemoteServiceErrorResponse . fromJS ( resultData501 ) ;
return throwException ( "Server Error" , status , _responseText , _headers , result501 ) ;
} else if ( status === 500 ) {
const _responseText = response . data ;
let result500 : any = null ;
let resultData500 = _responseText ;
result500 = RemoteServiceErrorResponse . fromJS ( resultData500 ) ;
return throwException ( "Server Error" , status , _responseText , _headers , result500 ) ;
} else if ( status !== 200 && status !== 204 ) {
const _responseText = response . data ;
return throwException ( "An unexpected server error occurred." , status , _responseText , _headers ) ;
}
return Promise . resolve < TenantDtoPagedResultDto > ( < any > null ) ;
}
/ * *
* 创 建 租 户
* @param body ( optional )
* @return Success
* /
create ( body : TenantCreateDto | undefined , cancelToken? : CancelToken | undefined ) : Promise < TenantDto > {
let url_ = this . baseUrl + "/Tenants/create" ;
url_ = url_ . replace ( /[?&]$/ , "" ) ;
const content_ = JSON . stringify ( body ) ;
let options_ = < AxiosRequestConfig > {
data : content_ ,
method : "POST" ,
url : url_ ,
headers : {
"Content-Type" : "application/json" ,
"Accept" : "text/plain"
} ,
cancelToken
} ;
return this . transformOptions ( options_ ) . then ( transformedOptions_ = > {
return this . instance . request ( transformedOptions_ ) ;
} ) . catch ( ( _error : any ) = > {
if ( isAxiosError ( _error ) && _error . response ) {
return _error . response ;
} else {
throw _error ;
}
} ) . then ( ( _response : AxiosResponse ) = > {
return this . transformResult ( url_ , _response , ( _response : AxiosResponse ) = > this . processCreate ( _response ) ) ;
} ) ;
}
protected processCreate ( response : AxiosResponse ) : Promise < TenantDto > {
const status = response . status ;
let _headers : any = { } ;
if ( response . headers && typeof response . headers === "object" ) {
for ( let k in response . headers ) {
if ( response . headers . hasOwnProperty ( k ) ) {
_headers [ k ] = response . headers [ k ] ;
}
}
}
if ( status === 200 ) {
const _responseText = response . data ;
let result200 : any = null ;
let resultData200 = _responseText ;
result200 = TenantDto . fromJS ( resultData200 ) ;
return result200 ;
} else if ( status === 403 ) {
const _responseText = response . data ;
let result403 : any = null ;
let resultData403 = _responseText ;
result403 = RemoteServiceErrorResponse . fromJS ( resultData403 ) ;
return throwException ( "Forbidden" , status , _responseText , _headers , result403 ) ;
} else if ( status === 401 ) {
const _responseText = response . data ;
let result401 : any = null ;
let resultData401 = _responseText ;
result401 = RemoteServiceErrorResponse . fromJS ( resultData401 ) ;
return throwException ( "Unauthorized" , status , _responseText , _headers , result401 ) ;
} else if ( status === 400 ) {
const _responseText = response . data ;
let result400 : any = null ;
let resultData400 = _responseText ;
result400 = RemoteServiceErrorResponse . fromJS ( resultData400 ) ;
return throwException ( "Bad Request" , status , _responseText , _headers , result400 ) ;
} else if ( status === 404 ) {
const _responseText = response . data ;
let result404 : any = null ;
let resultData404 = _responseText ;
result404 = RemoteServiceErrorResponse . fromJS ( resultData404 ) ;
return throwException ( "Not Found" , status , _responseText , _headers , result404 ) ;
} else if ( status === 501 ) {
const _responseText = response . data ;
let result501 : any = null ;
let resultData501 = _responseText ;
result501 = RemoteServiceErrorResponse . fromJS ( resultData501 ) ;
return throwException ( "Server Error" , status , _responseText , _headers , result501 ) ;
} else if ( status === 500 ) {
const _responseText = response . data ;
let result500 : any = null ;
let resultData500 = _responseText ;
result500 = RemoteServiceErrorResponse . fromJS ( resultData500 ) ;
return throwException ( "Server Error" , status , _responseText , _headers , result500 ) ;
} else if ( status !== 200 && status !== 204 ) {
const _responseText = response . data ;
return throwException ( "An unexpected server error occurred." , status , _responseText , _headers ) ;
}
return Promise . resolve < TenantDto > ( < any > null ) ;
}
/ * *
* 更 新 租 户
* @param body ( optional )
* @return Success
* /
update ( body : UpdateTenantInput | undefined , cancelToken? : CancelToken | undefined ) : Promise < TenantDto > {
let url_ = this . baseUrl + "/Tenants/update" ;
url_ = url_ . replace ( /[?&]$/ , "" ) ;
const content_ = JSON . stringify ( body ) ;
let options_ = < AxiosRequestConfig > {
data : content_ ,
method : "POST" ,
url : url_ ,
headers : {
"Content-Type" : "application/json" ,
"Accept" : "text/plain"
} ,
cancelToken
} ;
return this . transformOptions ( options_ ) . then ( transformedOptions_ = > {
return this . instance . request ( transformedOptions_ ) ;
} ) . catch ( ( _error : any ) = > {
if ( isAxiosError ( _error ) && _error . response ) {
return _error . response ;
} else {
throw _error ;
}
} ) . then ( ( _response : AxiosResponse ) = > {
return this . transformResult ( url_ , _response , ( _response : AxiosResponse ) = > this . processUpdate ( _response ) ) ;
} ) ;
}
protected processUpdate ( response : AxiosResponse ) : Promise < TenantDto > {
const status = response . status ;
let _headers : any = { } ;
if ( response . headers && typeof response . headers === "object" ) {
for ( let k in response . headers ) {
if ( response . headers . hasOwnProperty ( k ) ) {
_headers [ k ] = response . headers [ k ] ;
}
}
}
if ( status === 200 ) {
const _responseText = response . data ;
let result200 : any = null ;
let resultData200 = _responseText ;
result200 = TenantDto . fromJS ( resultData200 ) ;
return result200 ;
} else if ( status === 403 ) {
const _responseText = response . data ;
let result403 : any = null ;
let resultData403 = _responseText ;
result403 = RemoteServiceErrorResponse . fromJS ( resultData403 ) ;
return throwException ( "Forbidden" , status , _responseText , _headers , result403 ) ;
} else if ( status === 401 ) {
const _responseText = response . data ;
let result401 : any = null ;
let resultData401 = _responseText ;
result401 = RemoteServiceErrorResponse . fromJS ( resultData401 ) ;
return throwException ( "Unauthorized" , status , _responseText , _headers , result401 ) ;
} else if ( status === 400 ) {
const _responseText = response . data ;
let result400 : any = null ;
let resultData400 = _responseText ;
result400 = RemoteServiceErrorResponse . fromJS ( resultData400 ) ;
return throwException ( "Bad Request" , status , _responseText , _headers , result400 ) ;
} else if ( status === 404 ) {
const _responseText = response . data ;
let result404 : any = null ;
let resultData404 = _responseText ;
result404 = RemoteServiceErrorResponse . fromJS ( resultData404 ) ;
return throwException ( "Not Found" , status , _responseText , _headers , result404 ) ;
} else if ( status === 501 ) {
const _responseText = response . data ;
let result501 : any = null ;
let resultData501 = _responseText ;
result501 = RemoteServiceErrorResponse . fromJS ( resultData501 ) ;
return throwException ( "Server Error" , status , _responseText , _headers , result501 ) ;
} else if ( status === 500 ) {
const _responseText = response . data ;
let result500 : any = null ;
let resultData500 = _responseText ;
result500 = RemoteServiceErrorResponse . fromJS ( resultData500 ) ;
return throwException ( "Server Error" , status , _responseText , _headers , result500 ) ;
} else if ( status !== 200 && status !== 204 ) {
const _responseText = response . data ;
return throwException ( "An unexpected server error occurred." , status , _responseText , _headers ) ;
}
return Promise . resolve < TenantDto > ( < any > null ) ;
}
/ * *
* 删 除 租 户
* @param body ( optional )
* @return Success
* /
delete ( body : IdInput | undefined , cancelToken? : CancelToken | undefined ) : Promise < void > {
let url_ = this . baseUrl + "/Tenants/delete" ;
url_ = url_ . replace ( /[?&]$/ , "" ) ;
const content_ = JSON . stringify ( body ) ;
let options_ = < AxiosRequestConfig > {
data : content_ ,
method : "POST" ,
url : url_ ,
headers : {
"Content-Type" : "application/json" ,
} ,
cancelToken
} ;
return this . transformOptions ( options_ ) . then ( transformedOptions_ = > {
return this . instance . request ( transformedOptions_ ) ;
} ) . catch ( ( _error : any ) = > {
if ( isAxiosError ( _error ) && _error . response ) {
return _error . response ;
} else {
throw _error ;
}
} ) . then ( ( _response : AxiosResponse ) = > {
return this . transformResult ( url_ , _response , ( _response : AxiosResponse ) = > this . processDelete ( _response ) ) ;
} ) ;
}
protected processDelete ( response : AxiosResponse ) : Promise < void > {
const status = response . status ;
let _headers : any = { } ;
if ( response . headers && typeof response . headers === "object" ) {
for ( let k in response . headers ) {
if ( response . headers . hasOwnProperty ( k ) ) {
_headers [ k ] = response . headers [ k ] ;
}
}
}
if ( status === 200 ) {
const _responseText = response . data ;
return Promise . resolve < void > ( < any > null ) ;
} else if ( status === 403 ) {
const _responseText = response . data ;
let result403 : any = null ;
let resultData403 = _responseText ;
result403 = RemoteServiceErrorResponse . fromJS ( resultData403 ) ;
return throwException ( "Forbidden" , status , _responseText , _headers , result403 ) ;
} else if ( status === 401 ) {
const _responseText = response . data ;
let result401 : any = null ;
let resultData401 = _responseText ;
result401 = RemoteServiceErrorResponse . fromJS ( resultData401 ) ;
return throwException ( "Unauthorized" , status , _responseText , _headers , result401 ) ;
} else if ( status === 400 ) {
const _responseText = response . data ;
let result400 : any = null ;
let resultData400 = _responseText ;
result400 = RemoteServiceErrorResponse . fromJS ( resultData400 ) ;
return throwException ( "Bad Request" , status , _responseText , _headers , result400 ) ;
} else if ( status === 404 ) {
const _responseText = response . data ;
let result404 : any = null ;
let resultData404 = _responseText ;
result404 = RemoteServiceErrorResponse . fromJS ( resultData404 ) ;
return throwException ( "Not Found" , status , _responseText , _headers , result404 ) ;
} else if ( status === 501 ) {
const _responseText = response . data ;
let result501 : any = null ;
let resultData501 = _responseText ;
result501 = RemoteServiceErrorResponse . fromJS ( resultData501 ) ;
return throwException ( "Server Error" , status , _responseText , _headers , result501 ) ;
} else if ( status === 500 ) {
const _responseText = response . data ;
let result500 : any = null ;
let resultData500 = _responseText ;
result500 = RemoteServiceErrorResponse . fromJS ( resultData500 ) ;
return throwException ( "Server Error" , status , _responseText , _headers , result500 ) ;
} else if ( status !== 200 && status !== 204 ) {
const _responseText = response . data ;
return throwException ( "An unexpected server error occurred." , status , _responseText , _headers ) ;
}
return Promise . resolve < void > ( < any > null ) ;
}
/ * *
* 获 取 租 户 连 接 字 符 串
* @param body ( optional )
* @return Success
* /
getConnectionString ( body : IdInput | undefined , cancelToken? : CancelToken | undefined ) : Promise < string > {
let url_ = this . baseUrl + "/Tenants/getConnectionString" ;
url_ = url_ . replace ( /[?&]$/ , "" ) ;
const content_ = JSON . stringify ( body ) ;
let options_ = < AxiosRequestConfig > {
data : content_ ,
method : "POST" ,
url : url_ ,
headers : {
"Content-Type" : "application/json" ,
"Accept" : "text/plain"
} ,
cancelToken
} ;
return this . transformOptions ( options_ ) . then ( transformedOptions_ = > {
return this . instance . request ( transformedOptions_ ) ;
} ) . catch ( ( _error : any ) = > {
if ( isAxiosError ( _error ) && _error . response ) {
return _error . response ;
} else {
throw _error ;
}
} ) . then ( ( _response : AxiosResponse ) = > {
return this . transformResult ( url_ , _response , ( _response : AxiosResponse ) = > this . processGetConnectionString ( _response ) ) ;
} ) ;
}
protected processGetConnectionString ( response : AxiosResponse ) : Promise < string > {
const status = response . status ;
let _headers : any = { } ;
if ( response . headers && typeof response . headers === "object" ) {
for ( let k in response . headers ) {
if ( response . headers . hasOwnProperty ( k ) ) {
_headers [ k ] = response . headers [ k ] ;
}
}
}
if ( status === 200 ) {
const _responseText = response . data ;
let result200 : any = null ;
let resultData200 = _responseText ;
result200 = resultData200 !== undefined ? resultData200 : < any > null ;
return result200 ;
} else if ( status === 403 ) {
const _responseText = response . data ;
let result403 : any = null ;
let resultData403 = _responseText ;
result403 = RemoteServiceErrorResponse . fromJS ( resultData403 ) ;
return throwException ( "Forbidden" , status , _responseText , _headers , result403 ) ;
} else if ( status === 401 ) {
const _responseText = response . data ;
let result401 : any = null ;
let resultData401 = _responseText ;
result401 = RemoteServiceErrorResponse . fromJS ( resultData401 ) ;
return throwException ( "Unauthorized" , status , _responseText , _headers , result401 ) ;
} else if ( status === 400 ) {
const _responseText = response . data ;
let result400 : any = null ;
let resultData400 = _responseText ;
result400 = RemoteServiceErrorResponse . fromJS ( resultData400 ) ;
return throwException ( "Bad Request" , status , _responseText , _headers , result400 ) ;
} else if ( status === 404 ) {
const _responseText = response . data ;
let result404 : any = null ;
let resultData404 = _responseText ;
result404 = RemoteServiceErrorResponse . fromJS ( resultData404 ) ;
return throwException ( "Not Found" , status , _responseText , _headers , result404 ) ;
} else if ( status === 501 ) {
const _responseText = response . data ;
let result501 : any = null ;
let resultData501 = _responseText ;
result501 = RemoteServiceErrorResponse . fromJS ( resultData501 ) ;
return throwException ( "Server Error" , status , _responseText , _headers , result501 ) ;
} else if ( status === 500 ) {
const _responseText = response . data ;
let result500 : any = null ;
let resultData500 = _responseText ;
result500 = RemoteServiceErrorResponse . fromJS ( resultData500 ) ;
return throwException ( "Server Error" , status , _responseText , _headers , result500 ) ;
} else if ( status !== 200 && status !== 204 ) {
const _responseText = response . data ;
return throwException ( "An unexpected server error occurred." , status , _responseText , _headers ) ;
}
return Promise . resolve < string > ( < any > null ) ;
}
/ * *
* 更 新 租 户 连 接 字 符 串
* @param body ( optional )
* @return Success
* /
updateConnectionString ( body : UpdateConnectionStringInput | undefined , cancelToken? : CancelToken | undefined ) : Promise < void > {
let url_ = this . baseUrl + "/Tenants/updateConnectionString" ;
url_ = url_ . replace ( /[?&]$/ , "" ) ;
const content_ = JSON . stringify ( body ) ;
let options_ = < AxiosRequestConfig > {
data : content_ ,
method : "POST" ,
url : url_ ,
headers : {
"Content-Type" : "application/json" ,
} ,
cancelToken
} ;
return this . transformOptions ( options_ ) . then ( transformedOptions_ = > {
return this . instance . request ( transformedOptions_ ) ;
} ) . catch ( ( _error : any ) = > {
if ( isAxiosError ( _error ) && _error . response ) {
return _error . response ;
} else {
throw _error ;
}
} ) . then ( ( _response : AxiosResponse ) = > {
return this . transformResult ( url_ , _response , ( _response : AxiosResponse ) = > this . processUpdateConnectionString ( _response ) ) ;
} ) ;
}
protected processUpdateConnectionString ( response : AxiosResponse ) : Promise < void > {
const status = response . status ;
let _headers : any = { } ;
if ( response . headers && typeof response . headers === "object" ) {
for ( let k in response . headers ) {
if ( response . headers . hasOwnProperty ( k ) ) {
_headers [ k ] = response . headers [ k ] ;
}
}
}
if ( status === 200 ) {
const _responseText = response . data ;
return Promise . resolve < void > ( < any > null ) ;
} else if ( status === 403 ) {
const _responseText = response . data ;
let result403 : any = null ;
let resultData403 = _responseText ;
result403 = RemoteServiceErrorResponse . fromJS ( resultData403 ) ;
return throwException ( "Forbidden" , status , _responseText , _headers , result403 ) ;
} else if ( status === 401 ) {
const _responseText = response . data ;
let result401 : any = null ;
let resultData401 = _responseText ;
result401 = RemoteServiceErrorResponse . fromJS ( resultData401 ) ;
return throwException ( "Unauthorized" , status , _responseText , _headers , result401 ) ;
} else if ( status === 400 ) {
const _responseText = response . data ;
let result400 : any = null ;
let resultData400 = _responseText ;
result400 = RemoteServiceErrorResponse . fromJS ( resultData400 ) ;
return throwException ( "Bad Request" , status , _responseText , _headers , result400 ) ;
} else if ( status === 404 ) {
const _responseText = response . data ;
let result404 : any = null ;
let resultData404 = _responseText ;
result404 = RemoteServiceErrorResponse . fromJS ( resultData404 ) ;
return throwException ( "Not Found" , status , _responseText , _headers , result404 ) ;
} else if ( status === 501 ) {
const _responseText = response . data ;
let result501 : any = null ;
let resultData501 = _responseText ;
result501 = RemoteServiceErrorResponse . fromJS ( resultData501 ) ;
return throwException ( "Server Error" , status , _responseText , _headers , result501 ) ;
} else if ( status === 500 ) {
const _responseText = response . data ;
let result500 : any = null ;
let resultData500 = _responseText ;
result500 = RemoteServiceErrorResponse . fromJS ( resultData500 ) ;
return throwException ( "Server Error" , status , _responseText , _headers , result500 ) ;
} else if ( status !== 200 && status !== 204 ) {
const _responseText = response . data ;
return throwException ( "An unexpected server error occurred." , status , _responseText , _headers ) ;
}
return Promise . resolve < void > ( < any > null ) ;
}
/ * *
* 删 除 租 户 连 接 字 符 串
* @param body ( optional )
* @return Success
* /
deleteConnectionString ( body : IdInput | undefined , cancelToken? : CancelToken | undefined ) : Promise < void > {
let url_ = this . baseUrl + "/Tenants/deleteConnectionString" ;
url_ = url_ . replace ( /[?&]$/ , "" ) ;
const content_ = JSON . stringify ( body ) ;
let options_ = < AxiosRequestConfig > {
data : content_ ,
method : "POST" ,
url : url_ ,
headers : {
"Content-Type" : "application/json" ,
} ,
cancelToken
} ;
return this . transformOptions ( options_ ) . then ( transformedOptions_ = > {
return this . instance . request ( transformedOptions_ ) ;
} ) . catch ( ( _error : any ) = > {
if ( isAxiosError ( _error ) && _error . response ) {
return _error . response ;
} else {
throw _error ;
}
} ) . then ( ( _response : AxiosResponse ) = > {
return this . transformResult ( url_ , _response , ( _response : AxiosResponse ) = > this . processDeleteConnectionString ( _response ) ) ;
} ) ;
}
protected processDeleteConnectionString ( response : AxiosResponse ) : Promise < void > {
const status = response . status ;
let _headers : any = { } ;
if ( response . headers && typeof response . headers === "object" ) {
for ( let k in response . headers ) {
if ( response . headers . hasOwnProperty ( k ) ) {
_headers [ k ] = response . headers [ k ] ;
}
}
}
if ( status === 200 ) {
const _responseText = response . data ;
return Promise . resolve < void > ( < any > null ) ;
} else if ( status === 403 ) {
const _responseText = response . data ;
let result403 : any = null ;
let resultData403 = _responseText ;
result403 = RemoteServiceErrorResponse . fromJS ( resultData403 ) ;
return throwException ( "Forbidden" , status , _responseText , _headers , result403 ) ;
} else if ( status === 401 ) {
const _responseText = response . data ;
let result401 : any = null ;
let resultData401 = _responseText ;
result401 = RemoteServiceErrorResponse . fromJS ( resultData401 ) ;
return throwException ( "Unauthorized" , status , _responseText , _headers , result401 ) ;
} else if ( status === 400 ) {
const _responseText = response . data ;
let result400 : any = null ;
let resultData400 = _responseText ;
result400 = RemoteServiceErrorResponse . fromJS ( resultData400 ) ;
return throwException ( "Bad Request" , status , _responseText , _headers , result400 ) ;
} else if ( status === 404 ) {
const _responseText = response . data ;
let result404 : any = null ;
let resultData404 = _responseText ;
result404 = RemoteServiceErrorResponse . fromJS ( resultData404 ) ;
return throwException ( "Not Found" , status , _responseText , _headers , result404 ) ;
} else if ( status === 501 ) {
const _responseText = response . data ;
let result501 : any = null ;
let resultData501 = _responseText ;
result501 = RemoteServiceErrorResponse . fromJS ( resultData501 ) ;
return throwException ( "Server Error" , status , _responseText , _headers , result501 ) ;
} else if ( status === 500 ) {
const _responseText = response . data ;
let result500 : any = null ;
let resultData500 = _responseText ;
result500 = RemoteServiceErrorResponse . fromJS ( resultData500 ) ;
return throwException ( "Server Error" , status , _responseText , _headers , result500 ) ;
} else if ( status !== 200 && status !== 204 ) {
const _responseText = response . data ;
return throwException ( "An unexpected server error occurred." , status , _responseText , _headers ) ;
}
return Promise . resolve < void > ( < any > null ) ;
}
}
export class AccountServiceProxy extends ServiceProxyBase {
private instance : AxiosInstance ;
private baseUrl : string ;
@ -8535,6 +9287,42 @@ export interface IFeatureProviderDto {
key : string | undefined ;
}
export class FindTenantByNameInput implements IFindTenantByNameInput {
name ! : string | undefined ;
constructor ( data? : IFindTenantByNameInput ) {
if ( data ) {
for ( var property in data ) {
if ( data . hasOwnProperty ( property ) )
( < any > this ) [ property ] = ( < any > data ) [ property ] ;
}
}
}
init ( _data? : any ) {
if ( _data ) {
this . name = _data [ "name" ] ;
}
}
static fromJS ( data : any ) : FindTenantByNameInput {
data = typeof data === 'object' ? data : { } ;
let result = new FindTenantByNameInput ( ) ;
result . init ( data ) ;
return result ;
}
toJSON ( data? : any ) {
data = typeof data === 'object' ? data : { } ;
data [ "name" ] = this . name ;
return data ;
}
}
export interface IFindTenantByNameInput {
name : string | undefined ;
}
export class FindTenantResultDto implements IFindTenantResultDto {
success ! : boolean ;
tenantId ! : string | undefined ;
@ -11859,6 +12647,54 @@ export interface IPagingRoleListInput {
filter : string | undefined ;
}
export class PagingTenantInput implements IPagingTenantInput {
pageIndex ! : number ;
pageSize ! : number ;
readonly skipCount ! : number ;
filter ! : string | undefined ;
constructor ( data? : IPagingTenantInput ) {
if ( data ) {
for ( var property in data ) {
if ( data . hasOwnProperty ( property ) )
( < any > this ) [ property ] = ( < any > data ) [ property ] ;
}
}
}
init ( _data? : any ) {
if ( _data ) {
this . pageIndex = _data [ "pageIndex" ] ;
this . pageSize = _data [ "pageSize" ] ;
( < any > this ) . skipCount = _data [ "skipCount" ] ;
this . filter = _data [ "filter" ] ;
}
}
static fromJS ( data : any ) : PagingTenantInput {
data = typeof data === 'object' ? data : { } ;
let result = new PagingTenantInput ( ) ;
result . init ( data ) ;
return result ;
}
toJSON ( data? : any ) {
data = typeof data === 'object' ? data : { } ;
data [ "pageIndex" ] = this . pageIndex ;
data [ "pageSize" ] = this . pageSize ;
data [ "skipCount" ] = this . skipCount ;
data [ "filter" ] = this . filter ;
return data ;
}
}
export interface IPagingTenantInput {
pageIndex : number ;
pageSize : number ;
skipCount : number ;
filter : string | undefined ;
}
export class PagingUserListInput implements IPagingUserListInput {
pageIndex ! : number ;
pageSize ! : number ;
@ -13731,6 +14567,46 @@ export interface IUpdateApiResourceInput {
apiScopes : string [ ] | undefined ;
}
export class UpdateConnectionStringInput implements IUpdateConnectionStringInput {
id ! : string ;
connectionString ! : string ;
constructor ( data? : IUpdateConnectionStringInput ) {
if ( data ) {
for ( var property in data ) {
if ( data . hasOwnProperty ( property ) )
( < any > this ) [ property ] = ( < any > data ) [ property ] ;
}
}
}
init ( _data? : any ) {
if ( _data ) {
this . id = _data [ "id" ] ;
this . connectionString = _data [ "connectionString" ] ;
}
}
static fromJS ( data : any ) : UpdateConnectionStringInput {
data = typeof data === 'object' ? data : { } ;
let result = new UpdateConnectionStringInput ( ) ;
result . init ( data ) ;
return result ;
}
toJSON ( data? : any ) {
data = typeof data === 'object' ? data : { } ;
data [ "id" ] = this . id ;
data [ "connectionString" ] = this . connectionString ;
return data ;
}
}
export interface IUpdateConnectionStringInput {
id : string ;
connectionString : string ;
}
export class UpdateCreateApiScopeInput implements IUpdateCreateApiScopeInput {
enabled ! : boolean ;
name ! : string | undefined ;
@ -14335,6 +15211,46 @@ export interface IUpdateSettingInput {
values : { [ key : string ] : string ; } | undefined ;
}
export class UpdateTenantInput implements IUpdateTenantInput {
id ! : string ;
name ! : string ;
constructor ( data? : IUpdateTenantInput ) {
if ( data ) {
for ( var property in data ) {
if ( data . hasOwnProperty ( property ) )
( < any > this ) [ property ] = ( < any > data ) [ property ] ;
}
}
}
init ( _data? : any ) {
if ( _data ) {
this . id = _data [ "id" ] ;
this . name = _data [ "name" ] ;
}
}
static fromJS ( data : any ) : UpdateTenantInput {
data = typeof data === 'object' ? data : { } ;
let result = new UpdateTenantInput ( ) ;
result . init ( data ) ;
return result ;
}
toJSON ( data? : any ) {
data = typeof data === 'object' ? data : { } ;
data [ "id" ] = this . id ;
data [ "name" ] = this . name ;
return data ;
}
}
export interface IUpdateTenantInput {
id : string ;
name : string ;
}
export class UpdateUserInput implements IUpdateUserInput {
userId ! : string ;
userInfo ! : IdentityUserUpdateDto ;