@ -3315,6 +3315,386 @@ export class IdentityResourceServiceProxy extends ServiceProxyBase {
}
}
export class NotificationServiceProxy 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
* /
text ( body : PagingNotificationListInput | undefined , cancelToken? : CancelToken | undefined ) : Promise < PagingNotificationListOutputPagedResultDto > {
let url_ = this . baseUrl + "/Notification/Text" ;
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 . processText ( _response ) ) ;
} ) ;
}
protected processText ( response : AxiosResponse ) : Promise < PagingNotificationListOutputPagedResultDto > {
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 = PagingNotificationListOutputPagedResultDto . 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 < PagingNotificationListOutputPagedResultDto > ( < any > null ) ;
}
/ * *
* 分 页 查 询 广 播 消 息
* @param body ( optional )
* @return Success
* /
broadCast ( body : PagingNotificationListInput | undefined , cancelToken? : CancelToken | undefined ) : Promise < PagingNotificationListOutputPagedResultDto > {
let url_ = this . baseUrl + "/Notification/BroadCast" ;
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 . processBroadCast ( _response ) ) ;
} ) ;
}
protected processBroadCast ( response : AxiosResponse ) : Promise < PagingNotificationListOutputPagedResultDto > {
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 = PagingNotificationListOutputPagedResultDto . 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 < PagingNotificationListOutputPagedResultDto > ( < any > null ) ;
}
/ * *
* 消 息 设 置 为 已 读
* @param body ( optional )
* @return Success
* /
read ( body : SetReadInput | undefined , cancelToken? : CancelToken | undefined ) : Promise < void > {
let url_ = this . baseUrl + "/Notification/Read" ;
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 . processRead ( _response ) ) ;
} ) ;
}
protected processRead ( 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
* /
create ( body : CreateNotificationInput | undefined , cancelToken? : CancelToken | undefined ) : Promise < void > {
let url_ = this . baseUrl + "/Notification/Create" ;
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 . processCreate ( _response ) ) ;
} ) ;
}
protected processCreate ( 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 PermissionsServiceProxy extends ServiceProxyBase {
private instance : AxiosInstance ;
private baseUrl : string ;
@ -6650,6 +7030,62 @@ export interface ICreateIdentityResourceInput {
showInDiscoveryDocument : boolean ;
}
export class CreateNotificationInput implements ICreateNotificationInput {
title ! : string | undefined ;
content ! : string | undefined ;
messageType ! : MessageType ;
receiveIds ! : string [ ] | undefined ;
constructor ( data? : ICreateNotificationInput ) {
if ( data ) {
for ( var property in data ) {
if ( data . hasOwnProperty ( property ) )
( < any > this ) [ property ] = ( < any > data ) [ property ] ;
}
}
}
init ( _data? : any ) {
if ( _data ) {
this . title = _data [ "title" ] ;
this . content = _data [ "content" ] ;
this . messageType = _data [ "messageType" ] ;
if ( Array . isArray ( _data [ "receiveIds" ] ) ) {
this . receiveIds = [ ] as any ;
for ( let item of _data [ "receiveIds" ] )
this . receiveIds ! . push ( item ) ;
}
}
}
static fromJS ( data : any ) : CreateNotificationInput {
data = typeof data === 'object' ? data : { } ;
let result = new CreateNotificationInput ( ) ;
result . init ( data ) ;
return result ;
}
toJSON ( data? : any ) {
data = typeof data === 'object' ? data : { } ;
data [ "title" ] = this . title ;
data [ "content" ] = this . content ;
data [ "messageType" ] = this . messageType ;
if ( Array . isArray ( this . receiveIds ) ) {
data [ "receiveIds" ] = [ ] ;
for ( let item of this . receiveIds )
data [ "receiveIds" ] . push ( item ) ;
}
return data ;
}
}
export interface ICreateNotificationInput {
title : string | undefined ;
content : string | undefined ;
messageType : MessageType ;
receiveIds : string [ ] | undefined ;
}
export class CurrentCultureDto implements ICurrentCultureDto {
displayName ! : string | undefined ;
englishName ! : string | undefined ;
@ -9293,6 +9729,11 @@ export enum LoginResultType {
RequiresTwoFactor = 5 ,
}
export enum MessageType {
BroadCast = 10 ,
Text = 20 ,
}
export class MethodParameterApiDescriptionModel implements IMethodParameterApiDescriptionModel {
name ! : string | undefined ;
typeAsString ! : string | undefined ;
@ -10769,6 +11210,150 @@ export interface IPagingIdentityResourceListOutputPagedResultDto {
totalCount : number ;
}
export class PagingNotificationListInput implements IPagingNotificationListInput {
pageIndex ! : number ;
pageSize ! : number ;
readonly skipCount ! : number ;
constructor ( data? : IPagingNotificationListInput ) {
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" ] ;
}
}
static fromJS ( data : any ) : PagingNotificationListInput {
data = typeof data === 'object' ? data : { } ;
let result = new PagingNotificationListInput ( ) ;
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 ;
return data ;
}
}
export interface IPagingNotificationListInput {
pageIndex : number ;
pageSize : number ;
skipCount : number ;
}
export class PagingNotificationListOutput implements IPagingNotificationListOutput {
id ! : string ;
title ! : string | undefined ;
content ! : string | undefined ;
creationTime ! : moment . Moment ;
read ! : boolean ;
constructor ( data? : IPagingNotificationListOutput ) {
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 . title = _data [ "title" ] ;
this . content = _data [ "content" ] ;
this . creationTime = _data [ "creationTime" ] ? moment ( _data [ "creationTime" ] . toString ( ) ) : < any > undefined ;
this . read = _data [ "read" ] ;
}
}
static fromJS ( data : any ) : PagingNotificationListOutput {
data = typeof data === 'object' ? data : { } ;
let result = new PagingNotificationListOutput ( ) ;
result . init ( data ) ;
return result ;
}
toJSON ( data? : any ) {
data = typeof data === 'object' ? data : { } ;
data [ "id" ] = this . id ;
data [ "title" ] = this . title ;
data [ "content" ] = this . content ;
data [ "creationTime" ] = this . creationTime ? this . creationTime . toISOString ( ) : < any > undefined ;
data [ "read" ] = this . read ;
return data ;
}
}
export interface IPagingNotificationListOutput {
id : string ;
title : string | undefined ;
content : string | undefined ;
creationTime : moment.Moment ;
read : boolean ;
}
export class PagingNotificationListOutputPagedResultDto implements IPagingNotificationListOutputPagedResultDto {
items ! : PagingNotificationListOutput [ ] | undefined ;
totalCount ! : number ;
constructor ( data? : IPagingNotificationListOutputPagedResultDto ) {
if ( data ) {
for ( var property in data ) {
if ( data . hasOwnProperty ( property ) )
( < any > this ) [ property ] = ( < any > data ) [ property ] ;
}
}
}
init ( _data? : any ) {
if ( _data ) {
if ( Array . isArray ( _data [ "items" ] ) ) {
this . items = [ ] as any ;
for ( let item of _data [ "items" ] )
this . items ! . push ( PagingNotificationListOutput . fromJS ( item ) ) ;
}
this . totalCount = _data [ "totalCount" ] ;
}
}
static fromJS ( data : any ) : PagingNotificationListOutputPagedResultDto {
data = typeof data === 'object' ? data : { } ;
let result = new PagingNotificationListOutputPagedResultDto ( ) ;
result . init ( data ) ;
return result ;
}
toJSON ( data? : any ) {
data = typeof data === 'object' ? data : { } ;
if ( Array . isArray ( this . items ) ) {
data [ "items" ] = [ ] ;
for ( let item of this . items )
data [ "items" ] . push ( item . toJSON ( ) ) ;
}
data [ "totalCount" ] = this . totalCount ;
return data ;
}
}
export interface IPagingNotificationListOutputPagedResultDto {
items : PagingNotificationListOutput [ ] | undefined ;
totalCount : number ;
}
export class PagingRoleListInput implements IPagingRoleListInput {
pageIndex ! : number ;
pageSize ! : number ;
@ -11869,6 +12454,46 @@ export interface ISetDataDictinaryDetailInput {
isEnabled : boolean ;
}
export class SetReadInput implements ISetReadInput {
id ! : string ;
receiveId ! : string ;
constructor ( data? : ISetReadInput ) {
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 . receiveId = _data [ "receiveId" ] ;
}
}
static fromJS ( data : any ) : SetReadInput {
data = typeof data === 'object' ? data : { } ;
let result = new SetReadInput ( ) ;
result . init ( data ) ;
return result ;
}
toJSON ( data? : any ) {
data = typeof data === 'object' ? data : { } ;
data [ "id" ] = this . id ;
data [ "receiveId" ] = this . receiveId ;
return data ;
}
}
export interface ISetReadInput {
id : string ;
receiveId : string ;
}
export class StringStringFromSelector implements IStringStringFromSelector {
readonly value ! : string | undefined ;
readonly label ! : string | undefined ;