@@ -121,6 +121,66 @@ export class AccountServiceProxy {
121
121
}
122
122
}
123
123
124
+ @Injectable ( )
125
+ export class ConfigurationServiceProxy {
126
+ private http : Http = null ;
127
+ private baseUrl : string = undefined ;
128
+ protected jsonParseReviver : ( key : string , value : any ) => any = undefined ;
129
+
130
+ constructor ( @Inject ( Http ) http : Http , @Optional ( ) @Inject ( API_BASE_URL ) baseUrl ?: string ) {
131
+ this . http = http ;
132
+ this . baseUrl = baseUrl ? baseUrl : "" ;
133
+ }
134
+
135
+ /**
136
+ * @return Success
137
+ */
138
+ changeUiTheme ( input : ChangeUiThemeInput ) : Observable < void > {
139
+ let url_ = this . baseUrl + "/api/services/app/Configuration/ChangeUiTheme" ;
140
+
141
+ const content_ = JSON . stringify ( input ? input . toJS ( ) : null ) ;
142
+
143
+ return this . http . request ( url_ , {
144
+ body : content_ ,
145
+ method : "post" ,
146
+ headers : new Headers ( {
147
+ "Content-Type" : "application/json; charset=UTF-8" ,
148
+ "Accept" : "application/json; charset=UTF-8"
149
+ } )
150
+ } ) . map ( ( response ) => {
151
+ return this . processChangeUiTheme ( response ) ;
152
+ } ) . catch ( ( response : any , caught : any ) => {
153
+ if ( response instanceof Response ) {
154
+ try {
155
+ return Observable . of ( this . processChangeUiTheme ( response ) ) ;
156
+ } catch ( e ) {
157
+ return < Observable < void > > < any > Observable . throw ( e ) ;
158
+ }
159
+ } else
160
+ return < Observable < void > > < any > Observable . throw ( response ) ;
161
+ } ) ;
162
+ }
163
+
164
+ protected processChangeUiTheme ( response : Response ) : void {
165
+ const responseText = response . text ( ) ;
166
+ const status = response . status ;
167
+
168
+ if ( status === 200 ) {
169
+ return null ;
170
+ } else if ( status !== 200 && status !== 204 ) {
171
+ this . throwException ( "An unexpected server error occurred." , status , responseText ) ;
172
+ }
173
+ return null ;
174
+ }
175
+
176
+ protected throwException ( message : string , status : number , response : string , result ?: any ) : any {
177
+ if ( result !== null && result !== undefined )
178
+ throw result ;
179
+ else
180
+ throw new SwaggerException ( message , status , response ) ;
181
+ }
182
+ }
183
+
124
184
@Injectable ( )
125
185
export class RoleServiceProxy {
126
186
private http : Http = null ;
@@ -826,6 +886,34 @@ export class RegisterOutput {
826
886
}
827
887
}
828
888
889
+ export class ChangeUiThemeInput {
890
+ theme : string ;
891
+ constructor ( data ?: any ) {
892
+ if ( data !== undefined ) {
893
+ this . theme = data [ "theme" ] !== undefined ? data [ "theme" ] : null ;
894
+ }
895
+ }
896
+
897
+ static fromJS ( data : any ) : ChangeUiThemeInput {
898
+ return new ChangeUiThemeInput ( data ) ;
899
+ }
900
+
901
+ toJS ( data ?: any ) {
902
+ data = data === undefined ? { } : data ;
903
+ data [ "theme" ] = this . theme !== undefined ? this . theme : null ;
904
+ return data ;
905
+ }
906
+
907
+ toJSON ( ) {
908
+ return JSON . stringify ( this . toJS ( ) ) ;
909
+ }
910
+
911
+ clone ( ) {
912
+ const json = this . toJSON ( ) ;
913
+ return new ChangeUiThemeInput ( JSON . parse ( json ) ) ;
914
+ }
915
+ }
916
+
829
917
export class UpdateRolePermissionsInput {
830
918
roleId : number ;
831
919
grantedPermissionNames : string [ ] = [ ] ;
0 commit comments