Created
December 19, 2017 09:46
-
-
Save LAITRUNGMINHDUC/05448072b9c430af545ef677e66cb90f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* tslint:disable */ | |
//---------------------- | |
// <auto-generated> | |
// Generated using the NSwag toolchain v11.12.7.0 (NJsonSchema v9.10.6.0 (Newtonsoft.Json v9.0.0.0)) (http://NSwag.org) | |
// </auto-generated> | |
//---------------------- | |
// ReSharper disable InconsistentNaming | |
import 'rxjs/add/observable/fromPromise'; | |
import 'rxjs/add/observable/of'; | |
import 'rxjs/add/observable/throw'; | |
import 'rxjs/add/operator/map'; | |
import 'rxjs/add/operator/toPromise'; | |
import 'rxjs/add/operator/mergeMap'; | |
import 'rxjs/add/operator/catch'; | |
import { Observable } from 'rxjs/Observable'; | |
import { Injectable, Inject, Optional, InjectionToken } from '@angular/core'; | |
import { Http, Headers, ResponseContentType, Response } from '@angular/http'; | |
import * as moment from 'moment'; | |
export const API_BASE_URL = new InjectionToken<string>('API_BASE_URL'); | |
@Injectable() | |
export class AccountServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
isTenantAvailable(input: IsTenantAvailableInput): Observable<IsTenantAvailableOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Account/IsTenantAvailable"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processIsTenantAvailable(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processIsTenantAvailable(response_); | |
} catch (e) { | |
return <Observable<IsTenantAvailableOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<IsTenantAvailableOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processIsTenantAvailable(response: Response): Observable<IsTenantAvailableOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? IsTenantAvailableOutput.fromJS(resultData200) : new IsTenantAvailableOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<IsTenantAvailableOutput>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
register(input: RegisterInput): Observable<RegisterOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Account/Register"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processRegister(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processRegister(response_); | |
} catch (e) { | |
return <Observable<RegisterOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<RegisterOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processRegister(response: Response): Observable<RegisterOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? RegisterOutput.fromJS(resultData200) : new RegisterOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<RegisterOutput>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
sendPasswordResetCode(input: SendPasswordResetCodeInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Account/SendPasswordResetCode"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processSendPasswordResetCode(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processSendPasswordResetCode(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processSendPasswordResetCode(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
resetPassword(input: ResetPasswordInput): Observable<ResetPasswordOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Account/ResetPassword"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processResetPassword(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processResetPassword(response_); | |
} catch (e) { | |
return <Observable<ResetPasswordOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<ResetPasswordOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processResetPassword(response: Response): Observable<ResetPasswordOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? ResetPasswordOutput.fromJS(resultData200) : new ResetPasswordOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<ResetPasswordOutput>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
sendEmailActivationLink(input: SendEmailActivationLinkInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Account/SendEmailActivationLink"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processSendEmailActivationLink(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processSendEmailActivationLink(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processSendEmailActivationLink(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
activateEmail(input: ActivateEmailInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Account/ActivateEmail"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processActivateEmail(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processActivateEmail(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processActivateEmail(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
impersonate(input: ImpersonateInput): Observable<ImpersonateOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Account/Impersonate"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processImpersonate(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processImpersonate(response_); | |
} catch (e) { | |
return <Observable<ImpersonateOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<ImpersonateOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processImpersonate(response: Response): Observable<ImpersonateOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? ImpersonateOutput.fromJS(resultData200) : new ImpersonateOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<ImpersonateOutput>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
backToImpersonator(): Observable<ImpersonateOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Account/BackToImpersonator"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processBackToImpersonator(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processBackToImpersonator(response_); | |
} catch (e) { | |
return <Observable<ImpersonateOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<ImpersonateOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processBackToImpersonator(response: Response): Observable<ImpersonateOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? ImpersonateOutput.fromJS(resultData200) : new ImpersonateOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<ImpersonateOutput>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
switchToLinkedAccount(input: SwitchToLinkedAccountInput): Observable<SwitchToLinkedAccountOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Account/SwitchToLinkedAccount"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processSwitchToLinkedAccount(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processSwitchToLinkedAccount(response_); | |
} catch (e) { | |
return <Observable<SwitchToLinkedAccountOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<SwitchToLinkedAccountOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processSwitchToLinkedAccount(response: Response): Observable<SwitchToLinkedAccountOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? SwitchToLinkedAccountOutput.fromJS(resultData200) : new SwitchToLinkedAccountOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<SwitchToLinkedAccountOutput>(<any>null); | |
} | |
} | |
@Injectable() | |
export class AuditLogServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @userName (optional) | |
* @serviceName (optional) | |
* @methodName (optional) | |
* @browserInfo (optional) | |
* @hasException (optional) | |
* @minExecutionDuration (optional) | |
* @maxExecutionDuration (optional) | |
* @sorting (optional) | |
* @return Success | |
*/ | |
getAuditLogs(startDate: moment.Moment, endDate: moment.Moment, userName: string, serviceName: string, methodName: string, browserInfo: string, hasException: boolean, minExecutionDuration: number, maxExecutionDuration: number, sorting: string, maxResultCount: number, skipCount: number): Observable<PagedResultDto`1OfOfAuditLogListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
let url_ = this.baseUrl + "/api/services/app/AuditLog/GetAuditLogs?"; | |
if (startDate === undefined || startDate === null) | |
throw new Error("The parameter 'startDate' must be defined and cannot be null."); | |
else | |
url_ += "StartDate=" + encodeURIComponent(startDate ? "" + startDate.toJSON() : "") + "&"; | |
if (endDate === undefined || endDate === null) | |
throw new Error("The parameter 'endDate' must be defined and cannot be null."); | |
else | |
url_ += "EndDate=" + encodeURIComponent(endDate ? "" + endDate.toJSON() : "") + "&"; | |
if (userName !== undefined) | |
url_ += "UserName=" + encodeURIComponent("" + userName) + "&"; | |
if (serviceName !== undefined) | |
url_ += "ServiceName=" + encodeURIComponent("" + serviceName) + "&"; | |
if (methodName !== undefined) | |
url_ += "MethodName=" + encodeURIComponent("" + methodName) + "&"; | |
if (browserInfo !== undefined) | |
url_ += "BrowserInfo=" + encodeURIComponent("" + browserInfo) + "&"; | |
if (hasException !== undefined) | |
url_ += "HasException=" + encodeURIComponent("" + hasException) + "&"; | |
if (minExecutionDuration !== undefined) | |
url_ += "MinExecutionDuration=" + encodeURIComponent("" + minExecutionDuration) + "&"; | |
if (maxExecutionDuration !== undefined) | |
url_ += "MaxExecutionDuration=" + encodeURIComponent("" + maxExecutionDuration) + "&"; | |
if (sorting !== undefined) | |
url_ += "Sorting=" + encodeURIComponent("" + sorting) + "&"; | |
if (maxResultCount === undefined || maxResultCount === null) | |
throw new Error("The parameter 'maxResultCount' must be defined and cannot be null."); | |
else | |
url_ += "MaxResultCount=" + encodeURIComponent("" + maxResultCount) + "&"; | |
if (skipCount === undefined || skipCount === null) | |
throw new Error("The parameter 'skipCount' must be defined and cannot be null."); | |
else | |
url_ += "SkipCount=" + encodeURIComponent("" + skipCount) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetAuditLogs(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetAuditLogs(response_); | |
} catch (e) { | |
return <Observable<PagedResultDto`1OfOfAuditLogListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<PagedResultDto`1OfOfAuditLogListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetAuditLogs(response: Response): Observable<PagedResultDto`1OfOfAuditLogListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? PagedResultDto`1OfOfAuditLogListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null.fromJS(resultData200) : new PagedResultDto`1OfOfAuditLogListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<PagedResultDto`1OfOfAuditLogListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>(<any>null); | |
} | |
/** | |
* @userName (optional) | |
* @serviceName (optional) | |
* @methodName (optional) | |
* @browserInfo (optional) | |
* @hasException (optional) | |
* @minExecutionDuration (optional) | |
* @maxExecutionDuration (optional) | |
* @sorting (optional) | |
* @return Success | |
*/ | |
getAuditLogsToExcel(startDate: moment.Moment, endDate: moment.Moment, userName: string, serviceName: string, methodName: string, browserInfo: string, hasException: boolean, minExecutionDuration: number, maxExecutionDuration: number, sorting: string, maxResultCount: number, skipCount: number): Observable<FileDto> { | |
let url_ = this.baseUrl + "/api/services/app/AuditLog/GetAuditLogsToExcel?"; | |
if (startDate === undefined || startDate === null) | |
throw new Error("The parameter 'startDate' must be defined and cannot be null."); | |
else | |
url_ += "StartDate=" + encodeURIComponent(startDate ? "" + startDate.toJSON() : "") + "&"; | |
if (endDate === undefined || endDate === null) | |
throw new Error("The parameter 'endDate' must be defined and cannot be null."); | |
else | |
url_ += "EndDate=" + encodeURIComponent(endDate ? "" + endDate.toJSON() : "") + "&"; | |
if (userName !== undefined) | |
url_ += "UserName=" + encodeURIComponent("" + userName) + "&"; | |
if (serviceName !== undefined) | |
url_ += "ServiceName=" + encodeURIComponent("" + serviceName) + "&"; | |
if (methodName !== undefined) | |
url_ += "MethodName=" + encodeURIComponent("" + methodName) + "&"; | |
if (browserInfo !== undefined) | |
url_ += "BrowserInfo=" + encodeURIComponent("" + browserInfo) + "&"; | |
if (hasException !== undefined) | |
url_ += "HasException=" + encodeURIComponent("" + hasException) + "&"; | |
if (minExecutionDuration !== undefined) | |
url_ += "MinExecutionDuration=" + encodeURIComponent("" + minExecutionDuration) + "&"; | |
if (maxExecutionDuration !== undefined) | |
url_ += "MaxExecutionDuration=" + encodeURIComponent("" + maxExecutionDuration) + "&"; | |
if (sorting !== undefined) | |
url_ += "Sorting=" + encodeURIComponent("" + sorting) + "&"; | |
if (maxResultCount === undefined || maxResultCount === null) | |
throw new Error("The parameter 'maxResultCount' must be defined and cannot be null."); | |
else | |
url_ += "MaxResultCount=" + encodeURIComponent("" + maxResultCount) + "&"; | |
if (skipCount === undefined || skipCount === null) | |
throw new Error("The parameter 'skipCount' must be defined and cannot be null."); | |
else | |
url_ += "SkipCount=" + encodeURIComponent("" + skipCount) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetAuditLogsToExcel(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetAuditLogsToExcel(response_); | |
} catch (e) { | |
return <Observable<FileDto>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<FileDto>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetAuditLogsToExcel(response: Response): Observable<FileDto> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? FileDto.fromJS(resultData200) : new FileDto(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<FileDto>(<any>null); | |
} | |
} | |
@Injectable() | |
export class CachingServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @return Success | |
*/ | |
getAllCaches(): Observable<ListResultDto`1OfOfCacheDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
let url_ = this.baseUrl + "/api/services/app/Caching/GetAllCaches"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetAllCaches(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetAllCaches(response_); | |
} catch (e) { | |
return <Observable<ListResultDto`1OfOfCacheDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<ListResultDto`1OfOfCacheDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetAllCaches(response: Response): Observable<ListResultDto`1OfOfCacheDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? ListResultDto`1OfOfCacheDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null.fromJS(resultData200) : new ListResultDto`1OfOfCacheDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<ListResultDto`1OfOfCacheDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
clearCache(input: EntityDto`1OfOfStringAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Caching/ClearCache"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processClearCache(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processClearCache(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processClearCache(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
clearAllCaches(): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Caching/ClearAllCaches"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processClearAllCaches(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processClearAllCaches(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processClearAllCaches(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
} | |
@Injectable() | |
export class ChatServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @return Success | |
*/ | |
getUserChatFriendsWithSettings(): Observable<GetUserChatFriendsWithSettingsOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Chat/GetUserChatFriendsWithSettings"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetUserChatFriendsWithSettings(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetUserChatFriendsWithSettings(response_); | |
} catch (e) { | |
return <Observable<GetUserChatFriendsWithSettingsOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<GetUserChatFriendsWithSettingsOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetUserChatFriendsWithSettings(response: Response): Observable<GetUserChatFriendsWithSettingsOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? GetUserChatFriendsWithSettingsOutput.fromJS(resultData200) : new GetUserChatFriendsWithSettingsOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<GetUserChatFriendsWithSettingsOutput>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @minMessageId (optional) | |
* @return Success | |
*/ | |
getUserChatMessages(tenantId: number, userId: number, minMessageId: number): Observable<ListResultDto`1OfOfChatMessageDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
let url_ = this.baseUrl + "/api/services/app/Chat/GetUserChatMessages?"; | |
if (tenantId !== undefined) | |
url_ += "TenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (userId === undefined || userId === null) | |
throw new Error("The parameter 'userId' must be defined and cannot be null."); | |
else | |
url_ += "UserId=" + encodeURIComponent("" + userId) + "&"; | |
if (minMessageId !== undefined) | |
url_ += "MinMessageId=" + encodeURIComponent("" + minMessageId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetUserChatMessages(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetUserChatMessages(response_); | |
} catch (e) { | |
return <Observable<ListResultDto`1OfOfChatMessageDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<ListResultDto`1OfOfChatMessageDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetUserChatMessages(response: Response): Observable<ListResultDto`1OfOfChatMessageDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? ListResultDto`1OfOfChatMessageDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null.fromJS(resultData200) : new ListResultDto`1OfOfChatMessageDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<ListResultDto`1OfOfChatMessageDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
markAllUnreadMessagesOfUserAsRead(input: MarkAllUnreadMessagesOfUserAsReadInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Chat/MarkAllUnreadMessagesOfUserAsRead"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processMarkAllUnreadMessagesOfUserAsRead(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processMarkAllUnreadMessagesOfUserAsRead(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processMarkAllUnreadMessagesOfUserAsRead(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
} | |
@Injectable() | |
export class CommonLookupServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @return Success | |
*/ | |
getEditionsForCombobox(onlyFreeItems: boolean): Observable<ListResultDto`1OfOfSubscribableEditionComboboxItemDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
let url_ = this.baseUrl + "/api/services/app/CommonLookup/GetEditionsForCombobox?"; | |
if (onlyFreeItems === undefined || onlyFreeItems === null) | |
throw new Error("The parameter 'onlyFreeItems' must be defined and cannot be null."); | |
else | |
url_ += "onlyFreeItems=" + encodeURIComponent("" + onlyFreeItems) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetEditionsForCombobox(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetEditionsForCombobox(response_); | |
} catch (e) { | |
return <Observable<ListResultDto`1OfOfSubscribableEditionComboboxItemDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<ListResultDto`1OfOfSubscribableEditionComboboxItemDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetEditionsForCombobox(response: Response): Observable<ListResultDto`1OfOfSubscribableEditionComboboxItemDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? ListResultDto`1OfOfSubscribableEditionComboboxItemDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null.fromJS(resultData200) : new ListResultDto`1OfOfSubscribableEditionComboboxItemDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<ListResultDto`1OfOfSubscribableEditionComboboxItemDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
findUsers(input: FindUsersInput): Observable<PagedResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
let url_ = this.baseUrl + "/api/services/app/CommonLookup/FindUsers"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processFindUsers(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processFindUsers(response_); | |
} catch (e) { | |
return <Observable<PagedResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<PagedResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(response_); | |
}); | |
} | |
protected processFindUsers(response: Response): Observable<PagedResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? PagedResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null.fromJS(resultData200) : new PagedResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<PagedResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
getDefaultEditionName(): Observable<GetDefaultEditionNameOutput> { | |
let url_ = this.baseUrl + "/api/services/app/CommonLookup/GetDefaultEditionName"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetDefaultEditionName(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetDefaultEditionName(response_); | |
} catch (e) { | |
return <Observable<GetDefaultEditionNameOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<GetDefaultEditionNameOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetDefaultEditionName(response: Response): Observable<GetDefaultEditionNameOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? GetDefaultEditionNameOutput.fromJS(resultData200) : new GetDefaultEditionNameOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<GetDefaultEditionNameOutput>(<any>null); | |
} | |
} | |
@Injectable() | |
export class DemoUiComponentsServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @date (optional) | |
* @return Success | |
*/ | |
sendAndGetDate(date: moment.Moment): Observable<DateToStringOutput> { | |
let url_ = this.baseUrl + "/api/services/app/DemoUiComponents/SendAndGetDate?"; | |
if (date !== undefined) | |
url_ += "date=" + encodeURIComponent(date ? "" + date.toJSON() : "") + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processSendAndGetDate(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processSendAndGetDate(response_); | |
} catch (e) { | |
return <Observable<DateToStringOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<DateToStringOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processSendAndGetDate(response: Response): Observable<DateToStringOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? DateToStringOutput.fromJS(resultData200) : new DateToStringOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<DateToStringOutput>(<any>null); | |
} | |
/** | |
* @date (optional) | |
* @return Success | |
*/ | |
sendAndGetDateTime(date: moment.Moment): Observable<DateToStringOutput> { | |
let url_ = this.baseUrl + "/api/services/app/DemoUiComponents/SendAndGetDateTime?"; | |
if (date !== undefined) | |
url_ += "date=" + encodeURIComponent(date ? "" + date.toJSON() : "") + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processSendAndGetDateTime(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processSendAndGetDateTime(response_); | |
} catch (e) { | |
return <Observable<DateToStringOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<DateToStringOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processSendAndGetDateTime(response: Response): Observable<DateToStringOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? DateToStringOutput.fromJS(resultData200) : new DateToStringOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<DateToStringOutput>(<any>null); | |
} | |
/** | |
* @startDate (optional) | |
* @endDate (optional) | |
* @return Success | |
*/ | |
sendAndGetDateRange(startDate: moment.Moment, endDate: moment.Moment): Observable<DateToStringOutput> { | |
let url_ = this.baseUrl + "/api/services/app/DemoUiComponents/SendAndGetDateRange?"; | |
if (startDate !== undefined) | |
url_ += "startDate=" + encodeURIComponent(startDate ? "" + startDate.toJSON() : "") + "&"; | |
if (endDate !== undefined) | |
url_ += "endDate=" + encodeURIComponent(endDate ? "" + endDate.toJSON() : "") + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processSendAndGetDateRange(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processSendAndGetDateRange(response_); | |
} catch (e) { | |
return <Observable<DateToStringOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<DateToStringOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processSendAndGetDateRange(response: Response): Observable<DateToStringOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? DateToStringOutput.fromJS(resultData200) : new DateToStringOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<DateToStringOutput>(<any>null); | |
} | |
/** | |
* @searchTerm (optional) | |
* @return Success | |
*/ | |
getCountries(searchTerm: string): Observable<NameValue`1OfOfStringAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e[]> { | |
let url_ = this.baseUrl + "/api/services/app/DemoUiComponents/GetCountries?"; | |
if (searchTerm !== undefined) | |
url_ += "searchTerm=" + encodeURIComponent("" + searchTerm) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetCountries(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetCountries(response_); | |
} catch (e) { | |
return <Observable<NameValue`1OfOfStringAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e[]>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<NameValue`1OfOfStringAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e[]>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetCountries(response: Response): Observable<NameValue`1OfOfStringAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e[]> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
if (resultData200 && resultData200.constructor === Array) { | |
result200 = []; | |
for (let item of resultData200) | |
result200.push(NameValue`1OfOfStringAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e.fromJS(item)); | |
} | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<NameValue`1OfOfStringAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e[]>(<any>null); | |
} | |
/** | |
* @selectedCountries (optional) | |
* @return Success | |
*/ | |
sendAndGetSelectedCountries(selectedCountries: NameValue`1OfOfStringAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e[]): Observable<NameValue`1OfOfStringAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e[]> { | |
let url_ = this.baseUrl + "/api/services/app/DemoUiComponents/SendAndGetSelectedCountries"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(selectedCountries); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processSendAndGetSelectedCountries(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processSendAndGetSelectedCountries(response_); | |
} catch (e) { | |
return <Observable<NameValue`1OfOfStringAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e[]>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<NameValue`1OfOfStringAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e[]>><any>Observable.throw(response_); | |
}); | |
} | |
protected processSendAndGetSelectedCountries(response: Response): Observable<NameValue`1OfOfStringAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e[]> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
if (resultData200 && resultData200.constructor === Array) { | |
result200 = []; | |
for (let item of resultData200) | |
result200.push(NameValue`1OfOfStringAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e.fromJS(item)); | |
} | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<NameValue`1OfOfStringAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e[]>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
sendAndGetValue(input: string): Observable<StringOutput> { | |
let url_ = this.baseUrl + "/api/services/app/DemoUiComponents/SendAndGetValue?"; | |
if (input !== undefined) | |
url_ += "input=" + encodeURIComponent("" + input) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processSendAndGetValue(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processSendAndGetValue(response_); | |
} catch (e) { | |
return <Observable<StringOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<StringOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processSendAndGetValue(response: Response): Observable<StringOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? StringOutput.fromJS(resultData200) : new StringOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<StringOutput>(<any>null); | |
} | |
} | |
@Injectable() | |
export class EditionServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @return Success | |
*/ | |
getEditions(): Observable<ListResultDto`1OfOfEditionListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
let url_ = this.baseUrl + "/api/services/app/Edition/GetEditions"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetEditions(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetEditions(response_); | |
} catch (e) { | |
return <Observable<ListResultDto`1OfOfEditionListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<ListResultDto`1OfOfEditionListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetEditions(response: Response): Observable<ListResultDto`1OfOfEditionListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? ListResultDto`1OfOfEditionListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null.fromJS(resultData200) : new ListResultDto`1OfOfEditionListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<ListResultDto`1OfOfEditionListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>(<any>null); | |
} | |
/** | |
* @id (optional) | |
* @return Success | |
*/ | |
getEditionForEdit(id: number): Observable<GetEditionEditOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Edition/GetEditionForEdit?"; | |
if (id !== undefined) | |
url_ += "Id=" + encodeURIComponent("" + id) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetEditionForEdit(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetEditionForEdit(response_); | |
} catch (e) { | |
return <Observable<GetEditionEditOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<GetEditionEditOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetEditionForEdit(response: Response): Observable<GetEditionEditOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? GetEditionEditOutput.fromJS(resultData200) : new GetEditionEditOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<GetEditionEditOutput>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
createOrUpdateEdition(input: CreateOrUpdateEditionDto): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Edition/CreateOrUpdateEdition"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processCreateOrUpdateEdition(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processCreateOrUpdateEdition(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processCreateOrUpdateEdition(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
deleteEdition(id: number): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Edition/DeleteEdition?"; | |
if (id === undefined || id === null) | |
throw new Error("The parameter 'id' must be defined and cannot be null."); | |
else | |
url_ += "Id=" + encodeURIComponent("" + id) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "delete", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processDeleteEdition(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processDeleteEdition(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processDeleteEdition(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @selectedEditionId (optional) | |
* @return Success | |
*/ | |
getEditionComboboxItems(selectedEditionId: number, addAllItem: boolean, onlyFreeItems: boolean): Observable<SubscribableEditionComboboxItemDto[]> { | |
let url_ = this.baseUrl + "/api/services/app/Edition/GetEditionComboboxItems?"; | |
if (selectedEditionId !== undefined) | |
url_ += "selectedEditionId=" + encodeURIComponent("" + selectedEditionId) + "&"; | |
if (addAllItem === undefined || addAllItem === null) | |
throw new Error("The parameter 'addAllItem' must be defined and cannot be null."); | |
else | |
url_ += "addAllItem=" + encodeURIComponent("" + addAllItem) + "&"; | |
if (onlyFreeItems === undefined || onlyFreeItems === null) | |
throw new Error("The parameter 'onlyFreeItems' must be defined and cannot be null."); | |
else | |
url_ += "onlyFreeItems=" + encodeURIComponent("" + onlyFreeItems) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetEditionComboboxItems(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetEditionComboboxItems(response_); | |
} catch (e) { | |
return <Observable<SubscribableEditionComboboxItemDto[]>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<SubscribableEditionComboboxItemDto[]>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetEditionComboboxItems(response: Response): Observable<SubscribableEditionComboboxItemDto[]> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
if (resultData200 && resultData200.constructor === Array) { | |
result200 = []; | |
for (let item of resultData200) | |
result200.push(SubscribableEditionComboboxItemDto.fromJS(item)); | |
} | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<SubscribableEditionComboboxItemDto[]>(<any>null); | |
} | |
} | |
@Injectable() | |
export class FriendshipServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
createFriendshipRequest(input: CreateFriendshipRequestInput): Observable<FriendDto> { | |
let url_ = this.baseUrl + "/api/services/app/Friendship/CreateFriendshipRequest"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processCreateFriendshipRequest(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processCreateFriendshipRequest(response_); | |
} catch (e) { | |
return <Observable<FriendDto>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<FriendDto>><any>Observable.throw(response_); | |
}); | |
} | |
protected processCreateFriendshipRequest(response: Response): Observable<FriendDto> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? FriendDto.fromJS(resultData200) : new FriendDto(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<FriendDto>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
createFriendshipRequestByUserName(input: CreateFriendshipRequestByUserNameInput): Observable<FriendDto> { | |
let url_ = this.baseUrl + "/api/services/app/Friendship/CreateFriendshipRequestByUserName"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processCreateFriendshipRequestByUserName(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processCreateFriendshipRequestByUserName(response_); | |
} catch (e) { | |
return <Observable<FriendDto>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<FriendDto>><any>Observable.throw(response_); | |
}); | |
} | |
protected processCreateFriendshipRequestByUserName(response: Response): Observable<FriendDto> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? FriendDto.fromJS(resultData200) : new FriendDto(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<FriendDto>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
blockUser(input: BlockUserInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Friendship/BlockUser"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processBlockUser(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processBlockUser(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processBlockUser(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
unblockUser(input: UnblockUserInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Friendship/UnblockUser"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processUnblockUser(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processUnblockUser(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processUnblockUser(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
acceptFriendshipRequest(input: AcceptFriendshipRequestInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Friendship/AcceptFriendshipRequest"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processAcceptFriendshipRequest(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processAcceptFriendshipRequest(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processAcceptFriendshipRequest(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
} | |
@Injectable() | |
export class HostDashboardServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @return Success | |
*/ | |
getDashboardStatisticsData(incomeStatisticsDateInterval: IncomeStatisticsDateInterval, startDate: moment.Moment, endDate: moment.Moment): Observable<HostDashboardData> { | |
let url_ = this.baseUrl + "/api/services/app/HostDashboard/GetDashboardStatisticsData?"; | |
if (incomeStatisticsDateInterval === undefined || incomeStatisticsDateInterval === null) | |
throw new Error("The parameter 'incomeStatisticsDateInterval' must be defined and cannot be null."); | |
else | |
url_ += "IncomeStatisticsDateInterval=" + encodeURIComponent("" + incomeStatisticsDateInterval) + "&"; | |
if (startDate === undefined || startDate === null) | |
throw new Error("The parameter 'startDate' must be defined and cannot be null."); | |
else | |
url_ += "StartDate=" + encodeURIComponent(startDate ? "" + startDate.toJSON() : "") + "&"; | |
if (endDate === undefined || endDate === null) | |
throw new Error("The parameter 'endDate' must be defined and cannot be null."); | |
else | |
url_ += "EndDate=" + encodeURIComponent(endDate ? "" + endDate.toJSON() : "") + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetDashboardStatisticsData(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetDashboardStatisticsData(response_); | |
} catch (e) { | |
return <Observable<HostDashboardData>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<HostDashboardData>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetDashboardStatisticsData(response: Response): Observable<HostDashboardData> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? HostDashboardData.fromJS(resultData200) : new HostDashboardData(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<HostDashboardData>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
getIncomeStatistics(incomeStatisticsDateInterval: IncomeStatisticsDateInterval2, startDate: moment.Moment, endDate: moment.Moment): Observable<GetIncomeStatisticsDataOutput> { | |
let url_ = this.baseUrl + "/api/services/app/HostDashboard/GetIncomeStatistics?"; | |
if (incomeStatisticsDateInterval === undefined || incomeStatisticsDateInterval === null) | |
throw new Error("The parameter 'incomeStatisticsDateInterval' must be defined and cannot be null."); | |
else | |
url_ += "IncomeStatisticsDateInterval=" + encodeURIComponent("" + incomeStatisticsDateInterval) + "&"; | |
if (startDate === undefined || startDate === null) | |
throw new Error("The parameter 'startDate' must be defined and cannot be null."); | |
else | |
url_ += "StartDate=" + encodeURIComponent(startDate ? "" + startDate.toJSON() : "") + "&"; | |
if (endDate === undefined || endDate === null) | |
throw new Error("The parameter 'endDate' must be defined and cannot be null."); | |
else | |
url_ += "EndDate=" + encodeURIComponent(endDate ? "" + endDate.toJSON() : "") + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetIncomeStatistics(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetIncomeStatistics(response_); | |
} catch (e) { | |
return <Observable<GetIncomeStatisticsDataOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<GetIncomeStatisticsDataOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetIncomeStatistics(response: Response): Observable<GetIncomeStatisticsDataOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? GetIncomeStatisticsDataOutput.fromJS(resultData200) : new GetIncomeStatisticsDataOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<GetIncomeStatisticsDataOutput>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
getEditionTenantStatistics(startDate: moment.Moment, endDate: moment.Moment): Observable<GetEditionTenantStatisticsOutput> { | |
let url_ = this.baseUrl + "/api/services/app/HostDashboard/GetEditionTenantStatistics?"; | |
if (startDate === undefined || startDate === null) | |
throw new Error("The parameter 'startDate' must be defined and cannot be null."); | |
else | |
url_ += "StartDate=" + encodeURIComponent(startDate ? "" + startDate.toJSON() : "") + "&"; | |
if (endDate === undefined || endDate === null) | |
throw new Error("The parameter 'endDate' must be defined and cannot be null."); | |
else | |
url_ += "EndDate=" + encodeURIComponent(endDate ? "" + endDate.toJSON() : "") + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetEditionTenantStatistics(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetEditionTenantStatistics(response_); | |
} catch (e) { | |
return <Observable<GetEditionTenantStatisticsOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<GetEditionTenantStatisticsOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetEditionTenantStatistics(response: Response): Observable<GetEditionTenantStatisticsOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? GetEditionTenantStatisticsOutput.fromJS(resultData200) : new GetEditionTenantStatisticsOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<GetEditionTenantStatisticsOutput>(<any>null); | |
} | |
} | |
@Injectable() | |
export class HostSettingsServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @return Success | |
*/ | |
getAllSettings(): Observable<HostSettingsEditDto> { | |
let url_ = this.baseUrl + "/api/services/app/HostSettings/GetAllSettings"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetAllSettings(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetAllSettings(response_); | |
} catch (e) { | |
return <Observable<HostSettingsEditDto>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<HostSettingsEditDto>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetAllSettings(response: Response): Observable<HostSettingsEditDto> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? HostSettingsEditDto.fromJS(resultData200) : new HostSettingsEditDto(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<HostSettingsEditDto>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
updateAllSettings(input: HostSettingsEditDto): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/HostSettings/UpdateAllSettings"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "put", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processUpdateAllSettings(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processUpdateAllSettings(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processUpdateAllSettings(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
sendTestEmail(input: SendTestEmailInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/HostSettings/SendTestEmail"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processSendTestEmail(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processSendTestEmail(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processSendTestEmail(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
} | |
@Injectable() | |
export class InstallServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
setup(input: InstallDto): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Install/Setup"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processSetup(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processSetup(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processSetup(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
getAppSettingsJson(): Observable<AppSettingsJsonDto> { | |
let url_ = this.baseUrl + "/api/services/app/Install/GetAppSettingsJson"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetAppSettingsJson(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetAppSettingsJson(response_); | |
} catch (e) { | |
return <Observable<AppSettingsJsonDto>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<AppSettingsJsonDto>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetAppSettingsJson(response: Response): Observable<AppSettingsJsonDto> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? AppSettingsJsonDto.fromJS(resultData200) : new AppSettingsJsonDto(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<AppSettingsJsonDto>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
checkDatabase(): Observable<CheckDatabaseOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Install/CheckDatabase"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processCheckDatabase(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processCheckDatabase(response_); | |
} catch (e) { | |
return <Observable<CheckDatabaseOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<CheckDatabaseOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processCheckDatabase(response: Response): Observable<CheckDatabaseOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? CheckDatabaseOutput.fromJS(resultData200) : new CheckDatabaseOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<CheckDatabaseOutput>(<any>null); | |
} | |
} | |
@Injectable() | |
export class InvoiceServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @return Success | |
*/ | |
getInvoiceInfo(id: number): Observable<InvoiceDto> { | |
let url_ = this.baseUrl + "/api/services/app/Invoice/GetInvoiceInfo?"; | |
if (id === undefined || id === null) | |
throw new Error("The parameter 'id' must be defined and cannot be null."); | |
else | |
url_ += "Id=" + encodeURIComponent("" + id) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetInvoiceInfo(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetInvoiceInfo(response_); | |
} catch (e) { | |
return <Observable<InvoiceDto>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<InvoiceDto>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetInvoiceInfo(response: Response): Observable<InvoiceDto> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? InvoiceDto.fromJS(resultData200) : new InvoiceDto(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<InvoiceDto>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
createInvoice(input: CreateInvoiceDto): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Invoice/CreateInvoice"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processCreateInvoice(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processCreateInvoice(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processCreateInvoice(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
} | |
@Injectable() | |
export class LanguageServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @return Success | |
*/ | |
getLanguages(): Observable<GetLanguagesOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Language/GetLanguages"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetLanguages(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetLanguages(response_); | |
} catch (e) { | |
return <Observable<GetLanguagesOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<GetLanguagesOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetLanguages(response: Response): Observable<GetLanguagesOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? GetLanguagesOutput.fromJS(resultData200) : new GetLanguagesOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<GetLanguagesOutput>(<any>null); | |
} | |
/** | |
* @id (optional) | |
* @return Success | |
*/ | |
getLanguageForEdit(id: number): Observable<GetLanguageForEditOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Language/GetLanguageForEdit?"; | |
if (id !== undefined) | |
url_ += "Id=" + encodeURIComponent("" + id) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetLanguageForEdit(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetLanguageForEdit(response_); | |
} catch (e) { | |
return <Observable<GetLanguageForEditOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<GetLanguageForEditOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetLanguageForEdit(response: Response): Observable<GetLanguageForEditOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? GetLanguageForEditOutput.fromJS(resultData200) : new GetLanguageForEditOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<GetLanguageForEditOutput>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
createOrUpdateLanguage(input: CreateOrUpdateLanguageInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Language/CreateOrUpdateLanguage"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processCreateOrUpdateLanguage(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processCreateOrUpdateLanguage(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processCreateOrUpdateLanguage(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
deleteLanguage(id: number): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Language/DeleteLanguage?"; | |
if (id === undefined || id === null) | |
throw new Error("The parameter 'id' must be defined and cannot be null."); | |
else | |
url_ += "Id=" + encodeURIComponent("" + id) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "delete", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processDeleteLanguage(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processDeleteLanguage(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processDeleteLanguage(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
setDefaultLanguage(input: SetDefaultLanguageInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Language/SetDefaultLanguage"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processSetDefaultLanguage(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processSetDefaultLanguage(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processSetDefaultLanguage(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @sorting (optional) | |
* @baseLanguageName (optional) | |
* @targetValueFilter (optional) | |
* @filterText (optional) | |
* @return Success | |
*/ | |
getLanguageTexts(maxResultCount: number, skipCount: number, sorting: string, sourceName: string, baseLanguageName: string, targetLanguageName: string, targetValueFilter: string, filterText: string): Observable<PagedResultDto`1OfOfLanguageTextListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
let url_ = this.baseUrl + "/api/services/app/Language/GetLanguageTexts?"; | |
if (maxResultCount === undefined || maxResultCount === null) | |
throw new Error("The parameter 'maxResultCount' must be defined and cannot be null."); | |
else | |
url_ += "MaxResultCount=" + encodeURIComponent("" + maxResultCount) + "&"; | |
if (skipCount === undefined || skipCount === null) | |
throw new Error("The parameter 'skipCount' must be defined and cannot be null."); | |
else | |
url_ += "SkipCount=" + encodeURIComponent("" + skipCount) + "&"; | |
if (sorting !== undefined) | |
url_ += "Sorting=" + encodeURIComponent("" + sorting) + "&"; | |
if (sourceName === undefined || sourceName === null) | |
throw new Error("The parameter 'sourceName' must be defined and cannot be null."); | |
else | |
url_ += "SourceName=" + encodeURIComponent("" + sourceName) + "&"; | |
if (baseLanguageName !== undefined) | |
url_ += "BaseLanguageName=" + encodeURIComponent("" + baseLanguageName) + "&"; | |
if (targetLanguageName === undefined || targetLanguageName === null) | |
throw new Error("The parameter 'targetLanguageName' must be defined and cannot be null."); | |
else | |
url_ += "TargetLanguageName=" + encodeURIComponent("" + targetLanguageName) + "&"; | |
if (targetValueFilter !== undefined) | |
url_ += "TargetValueFilter=" + encodeURIComponent("" + targetValueFilter) + "&"; | |
if (filterText !== undefined) | |
url_ += "FilterText=" + encodeURIComponent("" + filterText) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetLanguageTexts(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetLanguageTexts(response_); | |
} catch (e) { | |
return <Observable<PagedResultDto`1OfOfLanguageTextListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<PagedResultDto`1OfOfLanguageTextListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetLanguageTexts(response: Response): Observable<PagedResultDto`1OfOfLanguageTextListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? PagedResultDto`1OfOfLanguageTextListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null.fromJS(resultData200) : new PagedResultDto`1OfOfLanguageTextListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<PagedResultDto`1OfOfLanguageTextListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
updateLanguageText(input: UpdateLanguageTextInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Language/UpdateLanguageText"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "put", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processUpdateLanguageText(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processUpdateLanguageText(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processUpdateLanguageText(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
} | |
@Injectable() | |
export class LibraryServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @tenantId (optional) | |
* @language (optional) | |
* @buildingId (optional) | |
* @return Success | |
*/ | |
apiCategoryGetAllAsync(tenantId: string, language: string, buildingId: string): Observable<CategoryOutputWithLanguage[]> { | |
let url_ = this.baseUrl + "/api/services/app/Library/ApiCategoryGetAllAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (language !== undefined) | |
url_ += "language=" + encodeURIComponent("" + language) + "&"; | |
if (buildingId !== undefined) | |
url_ += "buildingId=" + encodeURIComponent("" + buildingId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiCategoryGetAllAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiCategoryGetAllAsync(response_); | |
} catch (e) { | |
return <Observable<CategoryOutputWithLanguage[]>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<CategoryOutputWithLanguage[]>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiCategoryGetAllAsync(response: Response): Observable<CategoryOutputWithLanguage[]> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
if (resultData200 && resultData200.constructor === Array) { | |
result200 = []; | |
for (let item of resultData200) | |
result200.push(CategoryOutputWithLanguage.fromJS(item)); | |
} | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<CategoryOutputWithLanguage[]>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @entityInput (optional) | |
* @return Success | |
*/ | |
apiCategoryPostAsync(tenantId: string, entityInput: CategoryInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Library/ApiCategoryPostAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(entityInput); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiCategoryPostAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiCategoryPostAsync(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiCategoryPostAsync(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @categoryId (optional) | |
* @tenantId (optional) | |
* @language (optional) | |
* @return Success | |
*/ | |
apiCategoryGetAsync(categoryId: string, tenantId: string, language: string): Observable<CategoryOutputWithLanguage> { | |
let url_ = this.baseUrl + "/api/services/app/Library/ApiCategoryGetAsync?"; | |
if (categoryId !== undefined) | |
url_ += "categoryId=" + encodeURIComponent("" + categoryId) + "&"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (language !== undefined) | |
url_ += "language=" + encodeURIComponent("" + language) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiCategoryGetAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiCategoryGetAsync(response_); | |
} catch (e) { | |
return <Observable<CategoryOutputWithLanguage>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<CategoryOutputWithLanguage>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiCategoryGetAsync(response: Response): Observable<CategoryOutputWithLanguage> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? CategoryOutputWithLanguage.fromJS(resultData200) : new CategoryOutputWithLanguage(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<CategoryOutputWithLanguage>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @categoryId (optional) | |
* @entityInput (optional) | |
* @return Success | |
*/ | |
apiCategoryPutAsync(tenantId: string, categoryId: string, entityInput: CategoryInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Library/ApiCategoryPutAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (categoryId !== undefined) | |
url_ += "categoryId=" + encodeURIComponent("" + categoryId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(entityInput); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiCategoryPutAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiCategoryPutAsync(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiCategoryPutAsync(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @categoryId (optional) | |
* @return Success | |
*/ | |
apiCategoryDeleteAsync(tenantId: string, categoryId: string): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Library/ApiCategoryDeleteAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (categoryId !== undefined) | |
url_ += "categoryId=" + encodeURIComponent("" + categoryId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiCategoryDeleteAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiCategoryDeleteAsync(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiCategoryDeleteAsync(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @categoryId (optional) | |
* @tenantId (optional) | |
* @return Success | |
*/ | |
apiCategoryDetailAsync(categoryId: string, tenantId: string): Observable<CategoryOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Library/ApiCategoryDetailAsync?"; | |
if (categoryId !== undefined) | |
url_ += "categoryId=" + encodeURIComponent("" + categoryId) + "&"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiCategoryDetailAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiCategoryDetailAsync(response_); | |
} catch (e) { | |
return <Observable<CategoryOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<CategoryOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiCategoryDetailAsync(response: Response): Observable<CategoryOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? CategoryOutput.fromJS(resultData200) : new CategoryOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<CategoryOutput>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @categoryId (optional) | |
* @language (optional) | |
* @return Success | |
*/ | |
apiDocumentGetAllAsync(tenantId: string, categoryId: string, language: string): Observable<DocumentOutputWithLanguage[]> { | |
let url_ = this.baseUrl + "/api/services/app/Library/ApiDocumentGetAllAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (categoryId !== undefined) | |
url_ += "categoryId=" + encodeURIComponent("" + categoryId) + "&"; | |
if (language !== undefined) | |
url_ += "language=" + encodeURIComponent("" + language) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiDocumentGetAllAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiDocumentGetAllAsync(response_); | |
} catch (e) { | |
return <Observable<DocumentOutputWithLanguage[]>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<DocumentOutputWithLanguage[]>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiDocumentGetAllAsync(response: Response): Observable<DocumentOutputWithLanguage[]> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
if (resultData200 && resultData200.constructor === Array) { | |
result200 = []; | |
for (let item of resultData200) | |
result200.push(DocumentOutputWithLanguage.fromJS(item)); | |
} | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<DocumentOutputWithLanguage[]>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @entityInput (optional) | |
* @return Success | |
*/ | |
apiDocumentPostAsync(tenantId: string, entityInput: DocumentInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Library/ApiDocumentPostAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(entityInput); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiDocumentPostAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiDocumentPostAsync(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiDocumentPostAsync(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @documentId (optional) | |
* @tenantId (optional) | |
* @language (optional) | |
* @return Success | |
*/ | |
apiDocumentGetAsync(documentId: string, tenantId: string, language: string): Observable<DocumentOutputWithLanguage> { | |
let url_ = this.baseUrl + "/api/services/app/Library/ApiDocumentGetAsync?"; | |
if (documentId !== undefined) | |
url_ += "documentId=" + encodeURIComponent("" + documentId) + "&"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (language !== undefined) | |
url_ += "language=" + encodeURIComponent("" + language) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiDocumentGetAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiDocumentGetAsync(response_); | |
} catch (e) { | |
return <Observable<DocumentOutputWithLanguage>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<DocumentOutputWithLanguage>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiDocumentGetAsync(response: Response): Observable<DocumentOutputWithLanguage> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? DocumentOutputWithLanguage.fromJS(resultData200) : new DocumentOutputWithLanguage(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<DocumentOutputWithLanguage>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @documentId (optional) | |
* @entityInput (optional) | |
* @return Success | |
*/ | |
apiDocumentPutAsync(tenantId: string, documentId: string, entityInput: DocumentInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Library/ApiDocumentPutAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (documentId !== undefined) | |
url_ += "documentId=" + encodeURIComponent("" + documentId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(entityInput); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiDocumentPutAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiDocumentPutAsync(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiDocumentPutAsync(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @documentId (optional) | |
* @return Success | |
*/ | |
apiDocumentDeleteAsync(tenantId: string, documentId: string): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Library/ApiDocumentDeleteAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (documentId !== undefined) | |
url_ += "documentId=" + encodeURIComponent("" + documentId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiDocumentDeleteAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiDocumentDeleteAsync(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiDocumentDeleteAsync(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @documentId (optional) | |
* @tenantId (optional) | |
* @return Success | |
*/ | |
apiDocumentDetailAsync(documentId: string, tenantId: string): Observable<DocumentOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Library/ApiDocumentDetailAsync?"; | |
if (documentId !== undefined) | |
url_ += "documentId=" + encodeURIComponent("" + documentId) + "&"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiDocumentDetailAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiDocumentDetailAsync(response_); | |
} catch (e) { | |
return <Observable<DocumentOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<DocumentOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiDocumentDetailAsync(response: Response): Observable<DocumentOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? DocumentOutput.fromJS(resultData200) : new DocumentOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<DocumentOutput>(<any>null); | |
} | |
} | |
@Injectable() | |
export class NotificationServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @state (optional) | |
* @return Success | |
*/ | |
getUserNotifications(state: State, maxResultCount: number, skipCount: number): Observable<GetNotificationsOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Notification/GetUserNotifications?"; | |
if (state !== undefined) | |
url_ += "State=" + encodeURIComponent("" + state) + "&"; | |
if (maxResultCount === undefined || maxResultCount === null) | |
throw new Error("The parameter 'maxResultCount' must be defined and cannot be null."); | |
else | |
url_ += "MaxResultCount=" + encodeURIComponent("" + maxResultCount) + "&"; | |
if (skipCount === undefined || skipCount === null) | |
throw new Error("The parameter 'skipCount' must be defined and cannot be null."); | |
else | |
url_ += "SkipCount=" + encodeURIComponent("" + skipCount) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetUserNotifications(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetUserNotifications(response_); | |
} catch (e) { | |
return <Observable<GetNotificationsOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<GetNotificationsOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetUserNotifications(response: Response): Observable<GetNotificationsOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? GetNotificationsOutput.fromJS(resultData200) : new GetNotificationsOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<GetNotificationsOutput>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
setAllNotificationsAsRead(): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Notification/SetAllNotificationsAsRead"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processSetAllNotificationsAsRead(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processSetAllNotificationsAsRead(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processSetAllNotificationsAsRead(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
setNotificationAsRead(input: EntityDto`1OfOfGuidAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Notification/SetNotificationAsRead"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processSetNotificationAsRead(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processSetNotificationAsRead(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processSetNotificationAsRead(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
getNotificationSettings(): Observable<GetNotificationSettingsOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Notification/GetNotificationSettings"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetNotificationSettings(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetNotificationSettings(response_); | |
} catch (e) { | |
return <Observable<GetNotificationSettingsOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<GetNotificationSettingsOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetNotificationSettings(response: Response): Observable<GetNotificationSettingsOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? GetNotificationSettingsOutput.fromJS(resultData200) : new GetNotificationSettingsOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<GetNotificationSettingsOutput>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
updateNotificationSettings(input: UpdateNotificationSettingsInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Notification/UpdateNotificationSettings"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "put", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processUpdateNotificationSettings(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processUpdateNotificationSettings(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processUpdateNotificationSettings(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
} | |
@Injectable() | |
export class OrganizationUnitServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @return Success | |
*/ | |
getOrganizationUnits(): Observable<ListResultDto`1OfOfOrganizationUnitDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
let url_ = this.baseUrl + "/api/services/app/OrganizationUnit/GetOrganizationUnits"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetOrganizationUnits(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetOrganizationUnits(response_); | |
} catch (e) { | |
return <Observable<ListResultDto`1OfOfOrganizationUnitDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<ListResultDto`1OfOfOrganizationUnitDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetOrganizationUnits(response: Response): Observable<ListResultDto`1OfOfOrganizationUnitDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? ListResultDto`1OfOfOrganizationUnitDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null.fromJS(resultData200) : new ListResultDto`1OfOfOrganizationUnitDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<ListResultDto`1OfOfOrganizationUnitDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>(<any>null); | |
} | |
/** | |
* @sorting (optional) | |
* @return Success | |
*/ | |
getOrganizationUnitUsers(id: number, sorting: string, maxResultCount: number, skipCount: number): Observable<PagedResultDto`1OfOfOrganizationUnitUserListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
let url_ = this.baseUrl + "/api/services/app/OrganizationUnit/GetOrganizationUnitUsers?"; | |
if (id === undefined || id === null) | |
throw new Error("The parameter 'id' must be defined and cannot be null."); | |
else | |
url_ += "Id=" + encodeURIComponent("" + id) + "&"; | |
if (sorting !== undefined) | |
url_ += "Sorting=" + encodeURIComponent("" + sorting) + "&"; | |
if (maxResultCount === undefined || maxResultCount === null) | |
throw new Error("The parameter 'maxResultCount' must be defined and cannot be null."); | |
else | |
url_ += "MaxResultCount=" + encodeURIComponent("" + maxResultCount) + "&"; | |
if (skipCount === undefined || skipCount === null) | |
throw new Error("The parameter 'skipCount' must be defined and cannot be null."); | |
else | |
url_ += "SkipCount=" + encodeURIComponent("" + skipCount) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetOrganizationUnitUsers(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetOrganizationUnitUsers(response_); | |
} catch (e) { | |
return <Observable<PagedResultDto`1OfOfOrganizationUnitUserListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<PagedResultDto`1OfOfOrganizationUnitUserListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetOrganizationUnitUsers(response: Response): Observable<PagedResultDto`1OfOfOrganizationUnitUserListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? PagedResultDto`1OfOfOrganizationUnitUserListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null.fromJS(resultData200) : new PagedResultDto`1OfOfOrganizationUnitUserListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<PagedResultDto`1OfOfOrganizationUnitUserListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
createOrganizationUnit(input: CreateOrganizationUnitInput): Observable<OrganizationUnitDto> { | |
let url_ = this.baseUrl + "/api/services/app/OrganizationUnit/CreateOrganizationUnit"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processCreateOrganizationUnit(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processCreateOrganizationUnit(response_); | |
} catch (e) { | |
return <Observable<OrganizationUnitDto>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<OrganizationUnitDto>><any>Observable.throw(response_); | |
}); | |
} | |
protected processCreateOrganizationUnit(response: Response): Observable<OrganizationUnitDto> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? OrganizationUnitDto.fromJS(resultData200) : new OrganizationUnitDto(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<OrganizationUnitDto>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
updateOrganizationUnit(input: UpdateOrganizationUnitInput): Observable<OrganizationUnitDto> { | |
let url_ = this.baseUrl + "/api/services/app/OrganizationUnit/UpdateOrganizationUnit"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "put", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processUpdateOrganizationUnit(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processUpdateOrganizationUnit(response_); | |
} catch (e) { | |
return <Observable<OrganizationUnitDto>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<OrganizationUnitDto>><any>Observable.throw(response_); | |
}); | |
} | |
protected processUpdateOrganizationUnit(response: Response): Observable<OrganizationUnitDto> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? OrganizationUnitDto.fromJS(resultData200) : new OrganizationUnitDto(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<OrganizationUnitDto>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
moveOrganizationUnit(input: MoveOrganizationUnitInput): Observable<OrganizationUnitDto> { | |
let url_ = this.baseUrl + "/api/services/app/OrganizationUnit/MoveOrganizationUnit"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processMoveOrganizationUnit(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processMoveOrganizationUnit(response_); | |
} catch (e) { | |
return <Observable<OrganizationUnitDto>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<OrganizationUnitDto>><any>Observable.throw(response_); | |
}); | |
} | |
protected processMoveOrganizationUnit(response: Response): Observable<OrganizationUnitDto> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? OrganizationUnitDto.fromJS(resultData200) : new OrganizationUnitDto(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<OrganizationUnitDto>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
deleteOrganizationUnit(id: number): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/OrganizationUnit/DeleteOrganizationUnit?"; | |
if (id === undefined || id === null) | |
throw new Error("The parameter 'id' must be defined and cannot be null."); | |
else | |
url_ += "Id=" + encodeURIComponent("" + id) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "delete", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processDeleteOrganizationUnit(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processDeleteOrganizationUnit(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processDeleteOrganizationUnit(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
removeUserFromOrganizationUnit(userId: number, organizationUnitId: number): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/OrganizationUnit/RemoveUserFromOrganizationUnit?"; | |
if (userId === undefined || userId === null) | |
throw new Error("The parameter 'userId' must be defined and cannot be null."); | |
else | |
url_ += "UserId=" + encodeURIComponent("" + userId) + "&"; | |
if (organizationUnitId === undefined || organizationUnitId === null) | |
throw new Error("The parameter 'organizationUnitId' must be defined and cannot be null."); | |
else | |
url_ += "OrganizationUnitId=" + encodeURIComponent("" + organizationUnitId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "delete", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processRemoveUserFromOrganizationUnit(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processRemoveUserFromOrganizationUnit(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processRemoveUserFromOrganizationUnit(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
addUsersToOrganizationUnit(input: UsersToOrganizationUnitInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/OrganizationUnit/AddUsersToOrganizationUnit"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processAddUsersToOrganizationUnit(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processAddUsersToOrganizationUnit(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processAddUsersToOrganizationUnit(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
findUsers(input: FindOrganizationUnitUsersInput): Observable<PagedResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
let url_ = this.baseUrl + "/api/services/app/OrganizationUnit/FindUsers"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processFindUsers(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processFindUsers(response_); | |
} catch (e) { | |
return <Observable<PagedResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<PagedResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(response_); | |
}); | |
} | |
protected processFindUsers(response: Response): Observable<PagedResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? PagedResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null.fromJS(resultData200) : new PagedResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<PagedResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null>(<any>null); | |
} | |
} | |
@Injectable() | |
export class PaymentServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @upgradeEditionId (optional) | |
* @return Success | |
*/ | |
getPaymentInfo(upgradeEditionId: number): Observable<PaymentInfoDto> { | |
let url_ = this.baseUrl + "/api/services/app/Payment/GetPaymentInfo?"; | |
if (upgradeEditionId !== undefined) | |
url_ += "UpgradeEditionId=" + encodeURIComponent("" + upgradeEditionId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetPaymentInfo(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetPaymentInfo(response_); | |
} catch (e) { | |
return <Observable<PaymentInfoDto>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<PaymentInfoDto>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetPaymentInfo(response: Response): Observable<PaymentInfoDto> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? PaymentInfoDto.fromJS(resultData200) : new PaymentInfoDto(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<PaymentInfoDto>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
createPayment(input: CreatePaymentDto): Observable<any> { | |
let url_ = this.baseUrl + "/api/services/app/Payment/CreatePayment"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processCreatePayment(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processCreatePayment(response_); | |
} catch (e) { | |
return <Observable<any>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<any>><any>Observable.throw(response_); | |
}); | |
} | |
protected processCreatePayment(response: Response): Observable<any> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
if (resultData200) { | |
result200 = {}; | |
for (let key in resultData200) { | |
if (resultData200.hasOwnProperty(key)) | |
result200[key] = resultData200[key]; | |
} | |
} | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<any>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
executePayment(input: ExecutePaymentDto): Observable<any> { | |
let url_ = this.baseUrl + "/api/services/app/Payment/ExecutePayment"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processExecutePayment(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processExecutePayment(response_); | |
} catch (e) { | |
return <Observable<any>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<any>><any>Observable.throw(response_); | |
}); | |
} | |
protected processExecutePayment(response: Response): Observable<any> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
if (resultData200) { | |
result200 = {}; | |
for (let key in resultData200) { | |
if (resultData200.hasOwnProperty(key)) | |
result200[key] = resultData200[key]; | |
} | |
} | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<any>(<any>null); | |
} | |
/** | |
* @sorting (optional) | |
* @return Success | |
*/ | |
getPaymentHistory(sorting: string, maxResultCount: number, skipCount: number): Observable<PagedResultDto`1OfOfSubscriptionPaymentListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
let url_ = this.baseUrl + "/api/services/app/Payment/GetPaymentHistory?"; | |
if (sorting !== undefined) | |
url_ += "Sorting=" + encodeURIComponent("" + sorting) + "&"; | |
if (maxResultCount === undefined || maxResultCount === null) | |
throw new Error("The parameter 'maxResultCount' must be defined and cannot be null."); | |
else | |
url_ += "MaxResultCount=" + encodeURIComponent("" + maxResultCount) + "&"; | |
if (skipCount === undefined || skipCount === null) | |
throw new Error("The parameter 'skipCount' must be defined and cannot be null."); | |
else | |
url_ += "SkipCount=" + encodeURIComponent("" + skipCount) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetPaymentHistory(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetPaymentHistory(response_); | |
} catch (e) { | |
return <Observable<PagedResultDto`1OfOfSubscriptionPaymentListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<PagedResultDto`1OfOfSubscriptionPaymentListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetPaymentHistory(response: Response): Observable<PagedResultDto`1OfOfSubscriptionPaymentListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? PagedResultDto`1OfOfSubscriptionPaymentListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null.fromJS(resultData200) : new PagedResultDto`1OfOfSubscriptionPaymentListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<PagedResultDto`1OfOfSubscriptionPaymentListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>(<any>null); | |
} | |
} | |
@Injectable() | |
export class PermissionServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @return Success | |
*/ | |
getAllPermissions(): Observable<ListResultDto`1OfOfFlatPermissionWithLevelDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
let url_ = this.baseUrl + "/api/services/app/Permission/GetAllPermissions"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetAllPermissions(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetAllPermissions(response_); | |
} catch (e) { | |
return <Observable<ListResultDto`1OfOfFlatPermissionWithLevelDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<ListResultDto`1OfOfFlatPermissionWithLevelDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetAllPermissions(response: Response): Observable<ListResultDto`1OfOfFlatPermissionWithLevelDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? ListResultDto`1OfOfFlatPermissionWithLevelDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null.fromJS(resultData200) : new ListResultDto`1OfOfFlatPermissionWithLevelDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<ListResultDto`1OfOfFlatPermissionWithLevelDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>(<any>null); | |
} | |
} | |
@Injectable() | |
export class ProfileServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @return Success | |
*/ | |
getCurrentUserProfileForEdit(): Observable<CurrentUserProfileEditDto> { | |
let url_ = this.baseUrl + "/api/services/app/Profile/GetCurrentUserProfileForEdit"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetCurrentUserProfileForEdit(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetCurrentUserProfileForEdit(response_); | |
} catch (e) { | |
return <Observable<CurrentUserProfileEditDto>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<CurrentUserProfileEditDto>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetCurrentUserProfileForEdit(response: Response): Observable<CurrentUserProfileEditDto> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? CurrentUserProfileEditDto.fromJS(resultData200) : new CurrentUserProfileEditDto(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<CurrentUserProfileEditDto>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
updateGoogleAuthenticatorKey(): Observable<UpdateGoogleAuthenticatorKeyOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Profile/UpdateGoogleAuthenticatorKey"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "put", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processUpdateGoogleAuthenticatorKey(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processUpdateGoogleAuthenticatorKey(response_); | |
} catch (e) { | |
return <Observable<UpdateGoogleAuthenticatorKeyOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<UpdateGoogleAuthenticatorKeyOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processUpdateGoogleAuthenticatorKey(response: Response): Observable<UpdateGoogleAuthenticatorKeyOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? UpdateGoogleAuthenticatorKeyOutput.fromJS(resultData200) : new UpdateGoogleAuthenticatorKeyOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<UpdateGoogleAuthenticatorKeyOutput>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
sendVerificationSms(): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Profile/SendVerificationSms"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processSendVerificationSms(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processSendVerificationSms(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processSendVerificationSms(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
verifySmsCode(input: VerifySmsCodeInputDto): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Profile/VerifySmsCode"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processVerifySmsCode(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processVerifySmsCode(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processVerifySmsCode(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
updateCurrentUserProfile(input: CurrentUserProfileEditDto): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Profile/UpdateCurrentUserProfile"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "put", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processUpdateCurrentUserProfile(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processUpdateCurrentUserProfile(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processUpdateCurrentUserProfile(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
changePassword(input: ChangePasswordInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Profile/ChangePassword"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processChangePassword(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processChangePassword(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processChangePassword(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
updateProfilePicture(input: UpdateProfilePictureInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Profile/UpdateProfilePicture"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "put", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processUpdateProfilePicture(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processUpdateProfilePicture(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processUpdateProfilePicture(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
getPasswordComplexitySetting(): Observable<GetPasswordComplexitySettingOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Profile/GetPasswordComplexitySetting"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetPasswordComplexitySetting(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetPasswordComplexitySetting(response_); | |
} catch (e) { | |
return <Observable<GetPasswordComplexitySettingOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<GetPasswordComplexitySettingOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetPasswordComplexitySetting(response: Response): Observable<GetPasswordComplexitySettingOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? GetPasswordComplexitySettingOutput.fromJS(resultData200) : new GetPasswordComplexitySettingOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<GetPasswordComplexitySettingOutput>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
getProfilePicture(): Observable<GetProfilePictureOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Profile/GetProfilePicture"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetProfilePicture(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetProfilePicture(response_); | |
} catch (e) { | |
return <Observable<GetProfilePictureOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<GetProfilePictureOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetProfilePicture(response: Response): Observable<GetProfilePictureOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? GetProfilePictureOutput.fromJS(resultData200) : new GetProfilePictureOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<GetProfilePictureOutput>(<any>null); | |
} | |
/** | |
* @profilePictureId (optional) | |
* @tenantId (optional) | |
* @return Success | |
*/ | |
getFriendProfilePictureById(profilePictureId: string, userId: number, tenantId: number): Observable<GetProfilePictureOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Profile/GetFriendProfilePictureById?"; | |
if (profilePictureId !== undefined) | |
url_ += "ProfilePictureId=" + encodeURIComponent("" + profilePictureId) + "&"; | |
if (userId === undefined || userId === null) | |
throw new Error("The parameter 'userId' must be defined and cannot be null."); | |
else | |
url_ += "UserId=" + encodeURIComponent("" + userId) + "&"; | |
if (tenantId !== undefined) | |
url_ += "TenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetFriendProfilePictureById(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetFriendProfilePictureById(response_); | |
} catch (e) { | |
return <Observable<GetProfilePictureOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<GetProfilePictureOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetFriendProfilePictureById(response: Response): Observable<GetProfilePictureOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? GetProfilePictureOutput.fromJS(resultData200) : new GetProfilePictureOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<GetProfilePictureOutput>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
getProfilePictureById(profilePictureId: string): Observable<GetProfilePictureOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Profile/GetProfilePictureById?"; | |
if (profilePictureId === undefined || profilePictureId === null) | |
throw new Error("The parameter 'profilePictureId' must be defined and cannot be null."); | |
else | |
url_ += "profilePictureId=" + encodeURIComponent("" + profilePictureId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetProfilePictureById(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetProfilePictureById(response_); | |
} catch (e) { | |
return <Observable<GetProfilePictureOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<GetProfilePictureOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetProfilePictureById(response: Response): Observable<GetProfilePictureOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? GetProfilePictureOutput.fromJS(resultData200) : new GetProfilePictureOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<GetProfilePictureOutput>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
changeLanguage(input: ChangeUserLanguageDto): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Profile/ChangeLanguage"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processChangeLanguage(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processChangeLanguage(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processChangeLanguage(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
} | |
@Injectable() | |
export class RoleServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @permission (optional) | |
* @return Success | |
*/ | |
getRoles(permission: string): Observable<ListResultDto`1OfOfRoleListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
let url_ = this.baseUrl + "/api/services/app/Role/GetRoles?"; | |
if (permission !== undefined) | |
url_ += "Permission=" + encodeURIComponent("" + permission) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetRoles(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetRoles(response_); | |
} catch (e) { | |
return <Observable<ListResultDto`1OfOfRoleListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<ListResultDto`1OfOfRoleListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetRoles(response: Response): Observable<ListResultDto`1OfOfRoleListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? ListResultDto`1OfOfRoleListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null.fromJS(resultData200) : new ListResultDto`1OfOfRoleListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<ListResultDto`1OfOfRoleListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>(<any>null); | |
} | |
/** | |
* @id (optional) | |
* @return Success | |
*/ | |
getRoleForEdit(id: number): Observable<GetRoleForEditOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Role/GetRoleForEdit?"; | |
if (id !== undefined) | |
url_ += "Id=" + encodeURIComponent("" + id) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetRoleForEdit(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetRoleForEdit(response_); | |
} catch (e) { | |
return <Observable<GetRoleForEditOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<GetRoleForEditOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetRoleForEdit(response: Response): Observable<GetRoleForEditOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? GetRoleForEditOutput.fromJS(resultData200) : new GetRoleForEditOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<GetRoleForEditOutput>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
createOrUpdateRole(input: CreateOrUpdateRoleInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Role/CreateOrUpdateRole"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processCreateOrUpdateRole(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processCreateOrUpdateRole(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processCreateOrUpdateRole(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
deleteRole(id: number): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Role/DeleteRole?"; | |
if (id === undefined || id === null) | |
throw new Error("The parameter 'id' must be defined and cannot be null."); | |
else | |
url_ += "Id=" + encodeURIComponent("" + id) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "delete", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processDeleteRole(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processDeleteRole(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processDeleteRole(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
} | |
@Injectable() | |
export class SessionServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @return Success | |
*/ | |
getCurrentLoginInformations(): Observable<GetCurrentLoginInformationsOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Session/GetCurrentLoginInformations"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetCurrentLoginInformations(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetCurrentLoginInformations(response_); | |
} catch (e) { | |
return <Observable<GetCurrentLoginInformationsOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<GetCurrentLoginInformationsOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetCurrentLoginInformations(response: Response): Observable<GetCurrentLoginInformationsOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? GetCurrentLoginInformationsOutput.fromJS(resultData200) : new GetCurrentLoginInformationsOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<GetCurrentLoginInformationsOutput>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
updateUserSignInToken(): Observable<UpdateUserSignInTokenOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Session/UpdateUserSignInToken"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "put", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processUpdateUserSignInToken(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processUpdateUserSignInToken(response_); | |
} catch (e) { | |
return <Observable<UpdateUserSignInTokenOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<UpdateUserSignInTokenOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processUpdateUserSignInToken(response: Response): Observable<UpdateUserSignInTokenOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? UpdateUserSignInTokenOutput.fromJS(resultData200) : new UpdateUserSignInTokenOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<UpdateUserSignInTokenOutput>(<any>null); | |
} | |
} | |
@Injectable() | |
export class SubscriptionServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @return Success | |
*/ | |
upgradeTenantToEquivalentEdition(upgradeEditionId: number): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Subscription/UpgradeTenantToEquivalentEdition?"; | |
if (upgradeEditionId === undefined || upgradeEditionId === null) | |
throw new Error("The parameter 'upgradeEditionId' must be defined and cannot be null."); | |
else | |
url_ += "upgradeEditionId=" + encodeURIComponent("" + upgradeEditionId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processUpgradeTenantToEquivalentEdition(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processUpgradeTenantToEquivalentEdition(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processUpgradeTenantToEquivalentEdition(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
} | |
@Injectable() | |
export class TenantServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @filter (optional) | |
* @subscriptionEndDateStart (optional) | |
* @subscriptionEndDateEnd (optional) | |
* @creationDateStart (optional) | |
* @creationDateEnd (optional) | |
* @editionId (optional) | |
* @sorting (optional) | |
* @return Success | |
*/ | |
getTenants(filter: string, subscriptionEndDateStart: moment.Moment, subscriptionEndDateEnd: moment.Moment, creationDateStart: moment.Moment, creationDateEnd: moment.Moment, editionId: number, editionIdSpecified: boolean, sorting: string, maxResultCount: number, skipCount: number): Observable<PagedResultDto`1OfOfTenantListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
let url_ = this.baseUrl + "/api/services/app/Tenant/GetTenants?"; | |
if (filter !== undefined) | |
url_ += "Filter=" + encodeURIComponent("" + filter) + "&"; | |
if (subscriptionEndDateStart !== undefined) | |
url_ += "SubscriptionEndDateStart=" + encodeURIComponent(subscriptionEndDateStart ? "" + subscriptionEndDateStart.toJSON() : "") + "&"; | |
if (subscriptionEndDateEnd !== undefined) | |
url_ += "SubscriptionEndDateEnd=" + encodeURIComponent(subscriptionEndDateEnd ? "" + subscriptionEndDateEnd.toJSON() : "") + "&"; | |
if (creationDateStart !== undefined) | |
url_ += "CreationDateStart=" + encodeURIComponent(creationDateStart ? "" + creationDateStart.toJSON() : "") + "&"; | |
if (creationDateEnd !== undefined) | |
url_ += "CreationDateEnd=" + encodeURIComponent(creationDateEnd ? "" + creationDateEnd.toJSON() : "") + "&"; | |
if (editionId !== undefined) | |
url_ += "EditionId=" + encodeURIComponent("" + editionId) + "&"; | |
if (editionIdSpecified === undefined || editionIdSpecified === null) | |
throw new Error("The parameter 'editionIdSpecified' must be defined and cannot be null."); | |
else | |
url_ += "EditionIdSpecified=" + encodeURIComponent("" + editionIdSpecified) + "&"; | |
if (sorting !== undefined) | |
url_ += "Sorting=" + encodeURIComponent("" + sorting) + "&"; | |
if (maxResultCount === undefined || maxResultCount === null) | |
throw new Error("The parameter 'maxResultCount' must be defined and cannot be null."); | |
else | |
url_ += "MaxResultCount=" + encodeURIComponent("" + maxResultCount) + "&"; | |
if (skipCount === undefined || skipCount === null) | |
throw new Error("The parameter 'skipCount' must be defined and cannot be null."); | |
else | |
url_ += "SkipCount=" + encodeURIComponent("" + skipCount) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetTenants(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetTenants(response_); | |
} catch (e) { | |
return <Observable<PagedResultDto`1OfOfTenantListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<PagedResultDto`1OfOfTenantListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetTenants(response: Response): Observable<PagedResultDto`1OfOfTenantListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? PagedResultDto`1OfOfTenantListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null.fromJS(resultData200) : new PagedResultDto`1OfOfTenantListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<PagedResultDto`1OfOfTenantListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
createTenant(input: CreateTenantInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Tenant/CreateTenant"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processCreateTenant(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processCreateTenant(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processCreateTenant(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
getTenantForEdit(id: number): Observable<TenantEditDto> { | |
let url_ = this.baseUrl + "/api/services/app/Tenant/GetTenantForEdit?"; | |
if (id === undefined || id === null) | |
throw new Error("The parameter 'id' must be defined and cannot be null."); | |
else | |
url_ += "Id=" + encodeURIComponent("" + id) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetTenantForEdit(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetTenantForEdit(response_); | |
} catch (e) { | |
return <Observable<TenantEditDto>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<TenantEditDto>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetTenantForEdit(response: Response): Observable<TenantEditDto> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? TenantEditDto.fromJS(resultData200) : new TenantEditDto(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<TenantEditDto>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
updateTenant(input: TenantEditDto): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Tenant/UpdateTenant"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "put", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processUpdateTenant(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processUpdateTenant(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processUpdateTenant(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
deleteTenant(id: number): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Tenant/DeleteTenant?"; | |
if (id === undefined || id === null) | |
throw new Error("The parameter 'id' must be defined and cannot be null."); | |
else | |
url_ += "Id=" + encodeURIComponent("" + id) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "delete", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processDeleteTenant(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processDeleteTenant(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processDeleteTenant(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
getTenantFeaturesForEdit(id: number): Observable<GetTenantFeaturesEditOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Tenant/GetTenantFeaturesForEdit?"; | |
if (id === undefined || id === null) | |
throw new Error("The parameter 'id' must be defined and cannot be null."); | |
else | |
url_ += "Id=" + encodeURIComponent("" + id) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetTenantFeaturesForEdit(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetTenantFeaturesForEdit(response_); | |
} catch (e) { | |
return <Observable<GetTenantFeaturesEditOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<GetTenantFeaturesEditOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetTenantFeaturesForEdit(response: Response): Observable<GetTenantFeaturesEditOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? GetTenantFeaturesEditOutput.fromJS(resultData200) : new GetTenantFeaturesEditOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<GetTenantFeaturesEditOutput>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
updateTenantFeatures(input: UpdateTenantFeaturesInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Tenant/UpdateTenantFeatures"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "put", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processUpdateTenantFeatures(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processUpdateTenantFeatures(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processUpdateTenantFeatures(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
resetTenantSpecificFeatures(input: EntityDto): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Tenant/ResetTenantSpecificFeatures"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processResetTenantSpecificFeatures(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processResetTenantSpecificFeatures(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processResetTenantSpecificFeatures(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
unlockTenantAdmin(input: EntityDto): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Tenant/UnlockTenantAdmin"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processUnlockTenantAdmin(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processUnlockTenantAdmin(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processUnlockTenantAdmin(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
} | |
@Injectable() | |
export class TenantDashboardServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @return Success | |
*/ | |
getMemberActivity(): Observable<GetMemberActivityOutput> { | |
let url_ = this.baseUrl + "/api/services/app/TenantDashboard/GetMemberActivity"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetMemberActivity(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetMemberActivity(response_); | |
} catch (e) { | |
return <Observable<GetMemberActivityOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<GetMemberActivityOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetMemberActivity(response: Response): Observable<GetMemberActivityOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? GetMemberActivityOutput.fromJS(resultData200) : new GetMemberActivityOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<GetMemberActivityOutput>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
getDashboardData(salesSummaryDatePeriod: SalesSummaryDatePeriod): Observable<GetDashboardDataOutput> { | |
let url_ = this.baseUrl + "/api/services/app/TenantDashboard/GetDashboardData?"; | |
if (salesSummaryDatePeriod === undefined || salesSummaryDatePeriod === null) | |
throw new Error("The parameter 'salesSummaryDatePeriod' must be defined and cannot be null."); | |
else | |
url_ += "SalesSummaryDatePeriod=" + encodeURIComponent("" + salesSummaryDatePeriod) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetDashboardData(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetDashboardData(response_); | |
} catch (e) { | |
return <Observable<GetDashboardDataOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<GetDashboardDataOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetDashboardData(response: Response): Observable<GetDashboardDataOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? GetDashboardDataOutput.fromJS(resultData200) : new GetDashboardDataOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<GetDashboardDataOutput>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
getSalesSummary(salesSummaryDatePeriod: SalesSummaryDatePeriod2): Observable<GetSalesSummaryOutput> { | |
let url_ = this.baseUrl + "/api/services/app/TenantDashboard/GetSalesSummary?"; | |
if (salesSummaryDatePeriod === undefined || salesSummaryDatePeriod === null) | |
throw new Error("The parameter 'salesSummaryDatePeriod' must be defined and cannot be null."); | |
else | |
url_ += "SalesSummaryDatePeriod=" + encodeURIComponent("" + salesSummaryDatePeriod) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetSalesSummary(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetSalesSummary(response_); | |
} catch (e) { | |
return <Observable<GetSalesSummaryOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<GetSalesSummaryOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetSalesSummary(response: Response): Observable<GetSalesSummaryOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? GetSalesSummaryOutput.fromJS(resultData200) : new GetSalesSummaryOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<GetSalesSummaryOutput>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
getWorldMap(input: any): Observable<GetWorldMapOutput> { | |
let url_ = this.baseUrl + "/api/services/app/TenantDashboard/GetWorldMap?"; | |
if (input !== undefined) | |
url_ += "input=" + encodeURIComponent("" + input) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetWorldMap(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetWorldMap(response_); | |
} catch (e) { | |
return <Observable<GetWorldMapOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<GetWorldMapOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetWorldMap(response: Response): Observable<GetWorldMapOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? GetWorldMapOutput.fromJS(resultData200) : new GetWorldMapOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<GetWorldMapOutput>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
getGeneralStats(input: any): Observable<GetGeneralStatsOutput> { | |
let url_ = this.baseUrl + "/api/services/app/TenantDashboard/GetGeneralStats?"; | |
if (input !== undefined) | |
url_ += "input=" + encodeURIComponent("" + input) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetGeneralStats(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetGeneralStats(response_); | |
} catch (e) { | |
return <Observable<GetGeneralStatsOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<GetGeneralStatsOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetGeneralStats(response: Response): Observable<GetGeneralStatsOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? GetGeneralStatsOutput.fromJS(resultData200) : new GetGeneralStatsOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<GetGeneralStatsOutput>(<any>null); | |
} | |
} | |
@Injectable() | |
export class TenantRegistrationServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
registerTenant(input: RegisterTenantInput): Observable<RegisterTenantOutput> { | |
let url_ = this.baseUrl + "/api/services/app/TenantRegistration/RegisterTenant"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processRegisterTenant(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processRegisterTenant(response_); | |
} catch (e) { | |
return <Observable<RegisterTenantOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<RegisterTenantOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processRegisterTenant(response: Response): Observable<RegisterTenantOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? RegisterTenantOutput.fromJS(resultData200) : new RegisterTenantOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<RegisterTenantOutput>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
getEditionsForSelect(): Observable<EditionsSelectOutput> { | |
let url_ = this.baseUrl + "/api/services/app/TenantRegistration/GetEditionsForSelect"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetEditionsForSelect(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetEditionsForSelect(response_); | |
} catch (e) { | |
return <Observable<EditionsSelectOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<EditionsSelectOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetEditionsForSelect(response: Response): Observable<EditionsSelectOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? EditionsSelectOutput.fromJS(resultData200) : new EditionsSelectOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<EditionsSelectOutput>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
getEdition(editionId: number): Observable<EditionSelectDto> { | |
let url_ = this.baseUrl + "/api/services/app/TenantRegistration/GetEdition?"; | |
if (editionId === undefined || editionId === null) | |
throw new Error("The parameter 'editionId' must be defined and cannot be null."); | |
else | |
url_ += "editionId=" + encodeURIComponent("" + editionId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetEdition(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetEdition(response_); | |
} catch (e) { | |
return <Observable<EditionSelectDto>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<EditionSelectDto>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetEdition(response: Response): Observable<EditionSelectDto> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? EditionSelectDto.fromJS(resultData200) : new EditionSelectDto(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<EditionSelectDto>(<any>null); | |
} | |
} | |
@Injectable() | |
export class TenantSettingsServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @return Success | |
*/ | |
getAllSettings(): Observable<TenantSettingsEditDto> { | |
let url_ = this.baseUrl + "/api/services/app/TenantSettings/GetAllSettings"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetAllSettings(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetAllSettings(response_); | |
} catch (e) { | |
return <Observable<TenantSettingsEditDto>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<TenantSettingsEditDto>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetAllSettings(response: Response): Observable<TenantSettingsEditDto> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? TenantSettingsEditDto.fromJS(resultData200) : new TenantSettingsEditDto(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<TenantSettingsEditDto>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
updateAllSettings(input: TenantSettingsEditDto): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/TenantSettings/UpdateAllSettings"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "put", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processUpdateAllSettings(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processUpdateAllSettings(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processUpdateAllSettings(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
clearLogo(): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/TenantSettings/ClearLogo"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processClearLogo(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processClearLogo(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processClearLogo(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
clearCustomCss(): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/TenantSettings/ClearCustomCss"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processClearCustomCss(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processClearCustomCss(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processClearCustomCss(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
sendTestEmail(input: SendTestEmailInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/TenantSettings/SendTestEmail"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processSendTestEmail(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processSendTestEmail(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processSendTestEmail(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
} | |
@Injectable() | |
export class TimingServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @return Success | |
*/ | |
getTimezones(defaultTimezoneScope: DefaultTimezoneScope): Observable<ListResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
let url_ = this.baseUrl + "/api/services/app/Timing/GetTimezones?"; | |
if (defaultTimezoneScope === undefined || defaultTimezoneScope === null) | |
throw new Error("The parameter 'defaultTimezoneScope' must be defined and cannot be null."); | |
else | |
url_ += "DefaultTimezoneScope=" + encodeURIComponent("" + defaultTimezoneScope) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetTimezones(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetTimezones(response_); | |
} catch (e) { | |
return <Observable<ListResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<ListResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetTimezones(response: Response): Observable<ListResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? ListResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null.fromJS(resultData200) : new ListResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<ListResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null>(<any>null); | |
} | |
/** | |
* @selectedTimezoneId (optional) | |
* @return Success | |
*/ | |
getTimezoneComboboxItems(selectedTimezoneId: string): Observable<ComboboxItemDto[]> { | |
let url_ = this.baseUrl + "/api/services/app/Timing/GetTimezoneComboboxItems?"; | |
if (selectedTimezoneId !== undefined) | |
url_ += "SelectedTimezoneId=" + encodeURIComponent("" + selectedTimezoneId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetTimezoneComboboxItems(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetTimezoneComboboxItems(response_); | |
} catch (e) { | |
return <Observable<ComboboxItemDto[]>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<ComboboxItemDto[]>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetTimezoneComboboxItems(response: Response): Observable<ComboboxItemDto[]> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
if (resultData200 && resultData200.constructor === Array) { | |
result200 = []; | |
for (let item of resultData200) | |
result200.push(ComboboxItemDto.fromJS(item)); | |
} | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<ComboboxItemDto[]>(<any>null); | |
} | |
} | |
@Injectable() | |
export class TokenAuthServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @model (optional) | |
* @return Success | |
*/ | |
authenticate(model: AuthenticateModel): Observable<AuthenticateResultModel> { | |
let url_ = this.baseUrl + "/api/TokenAuth/Authenticate"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(model); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processAuthenticate(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processAuthenticate(response_); | |
} catch (e) { | |
return <Observable<AuthenticateResultModel>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<AuthenticateResultModel>><any>Observable.throw(response_); | |
}); | |
} | |
protected processAuthenticate(response: Response): Observable<AuthenticateResultModel> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? AuthenticateResultModel.fromJS(resultData200) : new AuthenticateResultModel(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<AuthenticateResultModel>(<any>null); | |
} | |
/** | |
* @model (optional) | |
* @return Success | |
*/ | |
sendTwoFactorAuthCode(model: SendTwoFactorAuthCodeModel): Observable<void> { | |
let url_ = this.baseUrl + "/api/TokenAuth/SendTwoFactorAuthCode"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(model); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processSendTwoFactorAuthCode(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processSendTwoFactorAuthCode(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processSendTwoFactorAuthCode(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @impersonationToken (optional) | |
* @return Success | |
*/ | |
impersonatedAuthenticate(impersonationToken: string): Observable<ImpersonatedAuthenticateResultModel> { | |
let url_ = this.baseUrl + "/api/TokenAuth/ImpersonatedAuthenticate?"; | |
if (impersonationToken !== undefined) | |
url_ += "impersonationToken=" + encodeURIComponent("" + impersonationToken) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processImpersonatedAuthenticate(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processImpersonatedAuthenticate(response_); | |
} catch (e) { | |
return <Observable<ImpersonatedAuthenticateResultModel>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<ImpersonatedAuthenticateResultModel>><any>Observable.throw(response_); | |
}); | |
} | |
protected processImpersonatedAuthenticate(response: Response): Observable<ImpersonatedAuthenticateResultModel> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? ImpersonatedAuthenticateResultModel.fromJS(resultData200) : new ImpersonatedAuthenticateResultModel(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<ImpersonatedAuthenticateResultModel>(<any>null); | |
} | |
/** | |
* @switchAccountToken (optional) | |
* @return Success | |
*/ | |
linkedAccountAuthenticate(switchAccountToken: string): Observable<SwitchedAccountAuthenticateResultModel> { | |
let url_ = this.baseUrl + "/api/TokenAuth/LinkedAccountAuthenticate?"; | |
if (switchAccountToken !== undefined) | |
url_ += "switchAccountToken=" + encodeURIComponent("" + switchAccountToken) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processLinkedAccountAuthenticate(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processLinkedAccountAuthenticate(response_); | |
} catch (e) { | |
return <Observable<SwitchedAccountAuthenticateResultModel>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<SwitchedAccountAuthenticateResultModel>><any>Observable.throw(response_); | |
}); | |
} | |
protected processLinkedAccountAuthenticate(response: Response): Observable<SwitchedAccountAuthenticateResultModel> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? SwitchedAccountAuthenticateResultModel.fromJS(resultData200) : new SwitchedAccountAuthenticateResultModel(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<SwitchedAccountAuthenticateResultModel>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
getExternalAuthenticationProviders(): Observable<ExternalLoginProviderInfoModel[]> { | |
let url_ = this.baseUrl + "/api/TokenAuth/GetExternalAuthenticationProviders"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetExternalAuthenticationProviders(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetExternalAuthenticationProviders(response_); | |
} catch (e) { | |
return <Observable<ExternalLoginProviderInfoModel[]>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<ExternalLoginProviderInfoModel[]>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetExternalAuthenticationProviders(response: Response): Observable<ExternalLoginProviderInfoModel[]> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
if (resultData200 && resultData200.constructor === Array) { | |
result200 = []; | |
for (let item of resultData200) | |
result200.push(ExternalLoginProviderInfoModel.fromJS(item)); | |
} | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<ExternalLoginProviderInfoModel[]>(<any>null); | |
} | |
/** | |
* @model (optional) | |
* @return Success | |
*/ | |
externalAuthenticate(model: ExternalAuthenticateModel): Observable<ExternalAuthenticateResultModel> { | |
let url_ = this.baseUrl + "/api/TokenAuth/ExternalAuthenticate"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(model); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processExternalAuthenticate(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processExternalAuthenticate(response_); | |
} catch (e) { | |
return <Observable<ExternalAuthenticateResultModel>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<ExternalAuthenticateResultModel>><any>Observable.throw(response_); | |
}); | |
} | |
protected processExternalAuthenticate(response: Response): Observable<ExternalAuthenticateResultModel> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? ExternalAuthenticateResultModel.fromJS(resultData200) : new ExternalAuthenticateResultModel(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<ExternalAuthenticateResultModel>(<any>null); | |
} | |
/** | |
* @message (optional) | |
* @severity (optional) | |
* @return Success | |
*/ | |
testNotification(message: string, severity: string): Observable<void> { | |
let url_ = this.baseUrl + "/api/TokenAuth/TestNotification?"; | |
if (message !== undefined) | |
url_ += "message=" + encodeURIComponent("" + message) + "&"; | |
if (severity !== undefined) | |
url_ += "severity=" + encodeURIComponent("" + severity) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processTestNotification(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processTestNotification(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processTestNotification(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
} | |
@Injectable() | |
export class UiCustomizationSettingsServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @return Success | |
*/ | |
getUiManagementSettings(): Observable<UiCustomizationSettingsEditDto> { | |
let url_ = this.baseUrl + "/api/services/app/UiCustomizationSettings/GetUiManagementSettings"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetUiManagementSettings(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetUiManagementSettings(response_); | |
} catch (e) { | |
return <Observable<UiCustomizationSettingsEditDto>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<UiCustomizationSettingsEditDto>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetUiManagementSettings(response: Response): Observable<UiCustomizationSettingsEditDto> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? UiCustomizationSettingsEditDto.fromJS(resultData200) : new UiCustomizationSettingsEditDto(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<UiCustomizationSettingsEditDto>(<any>null); | |
} | |
/** | |
* @settings (optional) | |
* @return Success | |
*/ | |
updateUiManagementSettings(settings: UiCustomizationSettingsEditDto): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/UiCustomizationSettings/UpdateUiManagementSettings"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(settings); | |
let options_ : any = { | |
body: content_, | |
method: "put", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processUpdateUiManagementSettings(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processUpdateUiManagementSettings(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processUpdateUiManagementSettings(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @settings (optional) | |
* @return Success | |
*/ | |
updateDefaultUiManagementSettings(settings: UiCustomizationSettingsEditDto): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/UiCustomizationSettings/UpdateDefaultUiManagementSettings"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(settings); | |
let options_ : any = { | |
body: content_, | |
method: "put", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processUpdateDefaultUiManagementSettings(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processUpdateDefaultUiManagementSettings(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processUpdateDefaultUiManagementSettings(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
useSystemDefaultSettings(): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/UiCustomizationSettings/UseSystemDefaultSettings"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processUseSystemDefaultSettings(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processUseSystemDefaultSettings(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processUseSystemDefaultSettings(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
} | |
@Injectable() | |
export class UnitsServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @tenantId (optional) | |
* @language (optional) | |
* @return Success | |
*/ | |
apiByTenantIdBuildingGetAsync(tenantId: string, language: string): Observable<BuildingReadOutput[]> { | |
let url_ = this.baseUrl + "/api/services/app/Units/ApiByTenantIdBuildingGetAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (language !== undefined) | |
url_ += "language=" + encodeURIComponent("" + language) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiByTenantIdBuildingGetAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiByTenantIdBuildingGetAsync(response_); | |
} catch (e) { | |
return <Observable<BuildingReadOutput[]>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<BuildingReadOutput[]>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiByTenantIdBuildingGetAsync(response: Response): Observable<BuildingReadOutput[]> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
if (resultData200 && resultData200.constructor === Array) { | |
result200 = []; | |
for (let item of resultData200) | |
result200.push(BuildingReadOutput.fromJS(item)); | |
} | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<BuildingReadOutput[]>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @input (optional) | |
* @return Success | |
*/ | |
apiByTenantIdBuildingPostAsync(tenantId: string, input: BuildingCreateInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Units/ApiByTenantIdBuildingPostAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiByTenantIdBuildingPostAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiByTenantIdBuildingPostAsync(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiByTenantIdBuildingPostAsync(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @language (optional) | |
* @return Success | |
*/ | |
apiByTenantIdBuildingByBuildingIdGetAsync(tenantId: string, buildingId: number, language: string): Observable<BuildingReadOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Units/ApiByTenantIdBuildingByBuildingIdGetAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (buildingId === undefined || buildingId === null) | |
throw new Error("The parameter 'buildingId' must be defined and cannot be null."); | |
else | |
url_ += "buildingId=" + encodeURIComponent("" + buildingId) + "&"; | |
if (language !== undefined) | |
url_ += "language=" + encodeURIComponent("" + language) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiByTenantIdBuildingByBuildingIdGetAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiByTenantIdBuildingByBuildingIdGetAsync(response_); | |
} catch (e) { | |
return <Observable<BuildingReadOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<BuildingReadOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiByTenantIdBuildingByBuildingIdGetAsync(response: Response): Observable<BuildingReadOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? BuildingReadOutput.fromJS(resultData200) : new BuildingReadOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<BuildingReadOutput>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @input (optional) | |
* @return Success | |
*/ | |
apiByTenantIdBuildingByBuildingIdPutAsync(tenantId: string, buildingId: number, input: BuildingUpdateInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Units/ApiByTenantIdBuildingByBuildingIdPutAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (buildingId === undefined || buildingId === null) | |
throw new Error("The parameter 'buildingId' must be defined and cannot be null."); | |
else | |
url_ += "buildingId=" + encodeURIComponent("" + buildingId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiByTenantIdBuildingByBuildingIdPutAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiByTenantIdBuildingByBuildingIdPutAsync(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiByTenantIdBuildingByBuildingIdPutAsync(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @return Success | |
*/ | |
apiByTenantIdBuildingByBuildingIdDetailGetAsync(tenantId: string, buildingId: number): Observable<BuildingUpdateOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Units/ApiByTenantIdBuildingByBuildingIdDetailGetAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (buildingId === undefined || buildingId === null) | |
throw new Error("The parameter 'buildingId' must be defined and cannot be null."); | |
else | |
url_ += "buildingId=" + encodeURIComponent("" + buildingId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiByTenantIdBuildingByBuildingIdDetailGetAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiByTenantIdBuildingByBuildingIdDetailGetAsync(response_); | |
} catch (e) { | |
return <Observable<BuildingUpdateOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<BuildingUpdateOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiByTenantIdBuildingByBuildingIdDetailGetAsync(response: Response): Observable<BuildingUpdateOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? BuildingUpdateOutput.fromJS(resultData200) : new BuildingUpdateOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<BuildingUpdateOutput>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @language (optional) | |
* @return Success | |
*/ | |
apiByTenantIdEmployeeGetAsync(tenantId: string, language: string): Observable<EmployeeReadOutput[]> { | |
let url_ = this.baseUrl + "/api/services/app/Units/ApiByTenantIdEmployeeGetAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (language !== undefined) | |
url_ += "language=" + encodeURIComponent("" + language) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiByTenantIdEmployeeGetAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiByTenantIdEmployeeGetAsync(response_); | |
} catch (e) { | |
return <Observable<EmployeeReadOutput[]>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<EmployeeReadOutput[]>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiByTenantIdEmployeeGetAsync(response: Response): Observable<EmployeeReadOutput[]> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
if (resultData200 && resultData200.constructor === Array) { | |
result200 = []; | |
for (let item of resultData200) | |
result200.push(EmployeeReadOutput.fromJS(item)); | |
} | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<EmployeeReadOutput[]>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @input (optional) | |
* @return Success | |
*/ | |
apiByTenantIdEmployeePostAsync(tenantId: string, input: EmployeeCreateInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Units/ApiByTenantIdEmployeePostAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiByTenantIdEmployeePostAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiByTenantIdEmployeePostAsync(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiByTenantIdEmployeePostAsync(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @language (optional) | |
* @return Success | |
*/ | |
apiByTenantIdEmployeeByEmployeeIdGetAsync(tenantId: string, employeeId: number, language: string): Observable<EmployeeReadOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Units/ApiByTenantIdEmployeeByEmployeeIdGetAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (employeeId === undefined || employeeId === null) | |
throw new Error("The parameter 'employeeId' must be defined and cannot be null."); | |
else | |
url_ += "employeeId=" + encodeURIComponent("" + employeeId) + "&"; | |
if (language !== undefined) | |
url_ += "language=" + encodeURIComponent("" + language) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiByTenantIdEmployeeByEmployeeIdGetAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiByTenantIdEmployeeByEmployeeIdGetAsync(response_); | |
} catch (e) { | |
return <Observable<EmployeeReadOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<EmployeeReadOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiByTenantIdEmployeeByEmployeeIdGetAsync(response: Response): Observable<EmployeeReadOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? EmployeeReadOutput.fromJS(resultData200) : new EmployeeReadOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<EmployeeReadOutput>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @input (optional) | |
* @return Success | |
*/ | |
apiByTenantIdEmployeeByEmployeeIdPutAsync(tenantId: string, employeeId: number, input: EmployeeUpdateInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Units/ApiByTenantIdEmployeeByEmployeeIdPutAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (employeeId === undefined || employeeId === null) | |
throw new Error("The parameter 'employeeId' must be defined and cannot be null."); | |
else | |
url_ += "employeeId=" + encodeURIComponent("" + employeeId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiByTenantIdEmployeeByEmployeeIdPutAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiByTenantIdEmployeeByEmployeeIdPutAsync(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiByTenantIdEmployeeByEmployeeIdPutAsync(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @employee (optional) | |
* @language (optional) | |
* @return Success | |
*/ | |
apiByTenantIdEmployeeByEmployeeDetailGetAsync(tenantId: string, employeeId: number, employee: string, language: string): Observable<EmployeeUpdateOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Units/ApiByTenantIdEmployeeByEmployeeDetailGetAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (employeeId === undefined || employeeId === null) | |
throw new Error("The parameter 'employeeId' must be defined and cannot be null."); | |
else | |
url_ += "employeeId=" + encodeURIComponent("" + employeeId) + "&"; | |
if (employee !== undefined) | |
url_ += "employee=" + encodeURIComponent("" + employee) + "&"; | |
if (language !== undefined) | |
url_ += "language=" + encodeURIComponent("" + language) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiByTenantIdEmployeeByEmployeeDetailGetAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiByTenantIdEmployeeByEmployeeDetailGetAsync(response_); | |
} catch (e) { | |
return <Observable<EmployeeUpdateOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<EmployeeUpdateOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiByTenantIdEmployeeByEmployeeDetailGetAsync(response: Response): Observable<EmployeeUpdateOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? EmployeeUpdateOutput.fromJS(resultData200) : new EmployeeUpdateOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<EmployeeUpdateOutput>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @language (optional) | |
* @return Success | |
*/ | |
apiByTenantIdByBuildingIdFloorGetAsync(tenantId: string, buildingId: number, language: string): Observable<FloorReadOutput[]> { | |
let url_ = this.baseUrl + "/api/services/app/Units/ApiByTenantIdByBuildingIdFloorGetAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (buildingId === undefined || buildingId === null) | |
throw new Error("The parameter 'buildingId' must be defined and cannot be null."); | |
else | |
url_ += "buildingId=" + encodeURIComponent("" + buildingId) + "&"; | |
if (language !== undefined) | |
url_ += "language=" + encodeURIComponent("" + language) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiByTenantIdByBuildingIdFloorGetAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiByTenantIdByBuildingIdFloorGetAsync(response_); | |
} catch (e) { | |
return <Observable<FloorReadOutput[]>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<FloorReadOutput[]>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiByTenantIdByBuildingIdFloorGetAsync(response: Response): Observable<FloorReadOutput[]> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
if (resultData200 && resultData200.constructor === Array) { | |
result200 = []; | |
for (let item of resultData200) | |
result200.push(FloorReadOutput.fromJS(item)); | |
} | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<FloorReadOutput[]>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @input (optional) | |
* @return Success | |
*/ | |
apiByTenantIdByBuildingIdFloorPostAsync(tenantId: string, buildingId: number, input: FloorCreateInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Units/ApiByTenantIdByBuildingIdFloorPostAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (buildingId === undefined || buildingId === null) | |
throw new Error("The parameter 'buildingId' must be defined and cannot be null."); | |
else | |
url_ += "buildingId=" + encodeURIComponent("" + buildingId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiByTenantIdByBuildingIdFloorPostAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiByTenantIdByBuildingIdFloorPostAsync(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiByTenantIdByBuildingIdFloorPostAsync(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @language (optional) | |
* @return Success | |
*/ | |
apiByTenantIdByBuildingIdFloorByFloorIdGetAsync(tenantId: string, buildingId: number, floorId: number, language: string): Observable<FloorReadOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Units/ApiByTenantIdByBuildingIdFloorByFloorIdGetAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (buildingId === undefined || buildingId === null) | |
throw new Error("The parameter 'buildingId' must be defined and cannot be null."); | |
else | |
url_ += "buildingId=" + encodeURIComponent("" + buildingId) + "&"; | |
if (floorId === undefined || floorId === null) | |
throw new Error("The parameter 'floorId' must be defined and cannot be null."); | |
else | |
url_ += "floorId=" + encodeURIComponent("" + floorId) + "&"; | |
if (language !== undefined) | |
url_ += "language=" + encodeURIComponent("" + language) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiByTenantIdByBuildingIdFloorByFloorIdGetAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiByTenantIdByBuildingIdFloorByFloorIdGetAsync(response_); | |
} catch (e) { | |
return <Observable<FloorReadOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<FloorReadOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiByTenantIdByBuildingIdFloorByFloorIdGetAsync(response: Response): Observable<FloorReadOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? FloorReadOutput.fromJS(resultData200) : new FloorReadOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<FloorReadOutput>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @input (optional) | |
* @return Success | |
*/ | |
apiByTenantIdByBuildingIdFloorByFloorIdPutAsync(tenantId: string, buildingId: number, floorId: number, input: FloorUpdateInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Units/ApiByTenantIdByBuildingIdFloorByFloorIdPutAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (buildingId === undefined || buildingId === null) | |
throw new Error("The parameter 'buildingId' must be defined and cannot be null."); | |
else | |
url_ += "buildingId=" + encodeURIComponent("" + buildingId) + "&"; | |
if (floorId === undefined || floorId === null) | |
throw new Error("The parameter 'floorId' must be defined and cannot be null."); | |
else | |
url_ += "floorId=" + encodeURIComponent("" + floorId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiByTenantIdByBuildingIdFloorByFloorIdPutAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiByTenantIdByBuildingIdFloorByFloorIdPutAsync(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiByTenantIdByBuildingIdFloorByFloorIdPutAsync(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @return Success | |
*/ | |
apiByTenantIdByBuildingIdFloorByFloorIdDetailGetAsync(tenantId: string, buildingId: number, floorId: number): Observable<FloorUpdateOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Units/ApiByTenantIdByBuildingIdFloorByFloorIdDetailGetAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (buildingId === undefined || buildingId === null) | |
throw new Error("The parameter 'buildingId' must be defined and cannot be null."); | |
else | |
url_ += "buildingId=" + encodeURIComponent("" + buildingId) + "&"; | |
if (floorId === undefined || floorId === null) | |
throw new Error("The parameter 'floorId' must be defined and cannot be null."); | |
else | |
url_ += "floorId=" + encodeURIComponent("" + floorId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiByTenantIdByBuildingIdFloorByFloorIdDetailGetAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiByTenantIdByBuildingIdFloorByFloorIdDetailGetAsync(response_); | |
} catch (e) { | |
return <Observable<FloorUpdateOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<FloorUpdateOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiByTenantIdByBuildingIdFloorByFloorIdDetailGetAsync(response: Response): Observable<FloorUpdateOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? FloorUpdateOutput.fromJS(resultData200) : new FloorUpdateOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<FloorUpdateOutput>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @language (optional) | |
* @return Success | |
*/ | |
apiByTenantIdMemberGetAsync(tenantId: string, language: string): Observable<MemberReadOutput[]> { | |
let url_ = this.baseUrl + "/api/services/app/Units/ApiByTenantIdMemberGetAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (language !== undefined) | |
url_ += "language=" + encodeURIComponent("" + language) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiByTenantIdMemberGetAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiByTenantIdMemberGetAsync(response_); | |
} catch (e) { | |
return <Observable<MemberReadOutput[]>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<MemberReadOutput[]>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiByTenantIdMemberGetAsync(response: Response): Observable<MemberReadOutput[]> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
if (resultData200 && resultData200.constructor === Array) { | |
result200 = []; | |
for (let item of resultData200) | |
result200.push(MemberReadOutput.fromJS(item)); | |
} | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<MemberReadOutput[]>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @input (optional) | |
* @return Success | |
*/ | |
apiByTenantIdMemberPostAsync(tenantId: string, input: MemberCreateInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Units/ApiByTenantIdMemberPostAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiByTenantIdMemberPostAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiByTenantIdMemberPostAsync(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiByTenantIdMemberPostAsync(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @language (optional) | |
* @return Success | |
*/ | |
apiByTenantIdMemberByMemberIdGetAsync(tenantId: string, memberId: number, language: string): Observable<MemberReadOutput[]> { | |
let url_ = this.baseUrl + "/api/services/app/Units/ApiByTenantIdMemberByMemberIdGetAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (memberId === undefined || memberId === null) | |
throw new Error("The parameter 'memberId' must be defined and cannot be null."); | |
else | |
url_ += "memberId=" + encodeURIComponent("" + memberId) + "&"; | |
if (language !== undefined) | |
url_ += "language=" + encodeURIComponent("" + language) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiByTenantIdMemberByMemberIdGetAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiByTenantIdMemberByMemberIdGetAsync(response_); | |
} catch (e) { | |
return <Observable<MemberReadOutput[]>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<MemberReadOutput[]>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiByTenantIdMemberByMemberIdGetAsync(response: Response): Observable<MemberReadOutput[]> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
if (resultData200 && resultData200.constructor === Array) { | |
result200 = []; | |
for (let item of resultData200) | |
result200.push(MemberReadOutput.fromJS(item)); | |
} | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<MemberReadOutput[]>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @input (optional) | |
* @return Success | |
*/ | |
apiByTenantIdMemberByMemberIdPutAsync(tenantId: string, memberId: number, input: MemberUpdateInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Units/ApiByTenantIdMemberByMemberIdPutAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (memberId === undefined || memberId === null) | |
throw new Error("The parameter 'memberId' must be defined and cannot be null."); | |
else | |
url_ += "memberId=" + encodeURIComponent("" + memberId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiByTenantIdMemberByMemberIdPutAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiByTenantIdMemberByMemberIdPutAsync(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiByTenantIdMemberByMemberIdPutAsync(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @member (optional) | |
* @language (optional) | |
* @return Success | |
*/ | |
apiByTenantIdMemberByMemberDetailGetAsync(tenantId: string, memberId: number, member: string, language: string): Observable<MemberUpdateOutput[]> { | |
let url_ = this.baseUrl + "/api/services/app/Units/ApiByTenantIdMemberByMemberDetailGetAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (memberId === undefined || memberId === null) | |
throw new Error("The parameter 'memberId' must be defined and cannot be null."); | |
else | |
url_ += "memberId=" + encodeURIComponent("" + memberId) + "&"; | |
if (member !== undefined) | |
url_ += "member=" + encodeURIComponent("" + member) + "&"; | |
if (language !== undefined) | |
url_ += "language=" + encodeURIComponent("" + language) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiByTenantIdMemberByMemberDetailGetAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiByTenantIdMemberByMemberDetailGetAsync(response_); | |
} catch (e) { | |
return <Observable<MemberUpdateOutput[]>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<MemberUpdateOutput[]>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiByTenantIdMemberByMemberDetailGetAsync(response: Response): Observable<MemberUpdateOutput[]> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
if (resultData200 && resultData200.constructor === Array) { | |
result200 = []; | |
for (let item of resultData200) | |
result200.push(MemberUpdateOutput.fromJS(item)); | |
} | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<MemberUpdateOutput[]>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @language (optional) | |
* @return Success | |
*/ | |
apiByTenantIdByBuildingIdByFloorIdUnitGetAsync(tenantId: string, buildingId: number, floorId: number, language: string): Observable<UnitReadOutput[]> { | |
let url_ = this.baseUrl + "/api/services/app/Units/ApiByTenantIdByBuildingIdByFloorIdUnitGetAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (buildingId === undefined || buildingId === null) | |
throw new Error("The parameter 'buildingId' must be defined and cannot be null."); | |
else | |
url_ += "buildingId=" + encodeURIComponent("" + buildingId) + "&"; | |
if (floorId === undefined || floorId === null) | |
throw new Error("The parameter 'floorId' must be defined and cannot be null."); | |
else | |
url_ += "floorId=" + encodeURIComponent("" + floorId) + "&"; | |
if (language !== undefined) | |
url_ += "language=" + encodeURIComponent("" + language) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiByTenantIdByBuildingIdByFloorIdUnitGetAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiByTenantIdByBuildingIdByFloorIdUnitGetAsync(response_); | |
} catch (e) { | |
return <Observable<UnitReadOutput[]>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<UnitReadOutput[]>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiByTenantIdByBuildingIdByFloorIdUnitGetAsync(response: Response): Observable<UnitReadOutput[]> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
if (resultData200 && resultData200.constructor === Array) { | |
result200 = []; | |
for (let item of resultData200) | |
result200.push(UnitReadOutput.fromJS(item)); | |
} | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<UnitReadOutput[]>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @input (optional) | |
* @return Success | |
*/ | |
apiByTenantIdByBuildingIdByFloorIdUnitPostAsync(tenantId: string, buildingId: number, floorId: number, input: UnitCreateInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Units/ApiByTenantIdByBuildingIdByFloorIdUnitPostAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (buildingId === undefined || buildingId === null) | |
throw new Error("The parameter 'buildingId' must be defined and cannot be null."); | |
else | |
url_ += "buildingId=" + encodeURIComponent("" + buildingId) + "&"; | |
if (floorId === undefined || floorId === null) | |
throw new Error("The parameter 'floorId' must be defined and cannot be null."); | |
else | |
url_ += "floorId=" + encodeURIComponent("" + floorId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiByTenantIdByBuildingIdByFloorIdUnitPostAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiByTenantIdByBuildingIdByFloorIdUnitPostAsync(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiByTenantIdByBuildingIdByFloorIdUnitPostAsync(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @language (optional) | |
* @return Success | |
*/ | |
apiByTenantIdByBuildingIdByFloorIdUnitByUnitIdGetAsync(tenantId: string, buildingId: number, floorId: number, unitId: number, language: string): Observable<UnitReadOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Units/ApiByTenantIdByBuildingIdByFloorIdUnitByUnitIdGetAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (buildingId === undefined || buildingId === null) | |
throw new Error("The parameter 'buildingId' must be defined and cannot be null."); | |
else | |
url_ += "buildingId=" + encodeURIComponent("" + buildingId) + "&"; | |
if (floorId === undefined || floorId === null) | |
throw new Error("The parameter 'floorId' must be defined and cannot be null."); | |
else | |
url_ += "floorId=" + encodeURIComponent("" + floorId) + "&"; | |
if (unitId === undefined || unitId === null) | |
throw new Error("The parameter 'unitId' must be defined and cannot be null."); | |
else | |
url_ += "unitId=" + encodeURIComponent("" + unitId) + "&"; | |
if (language !== undefined) | |
url_ += "language=" + encodeURIComponent("" + language) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiByTenantIdByBuildingIdByFloorIdUnitByUnitIdGetAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiByTenantIdByBuildingIdByFloorIdUnitByUnitIdGetAsync(response_); | |
} catch (e) { | |
return <Observable<UnitReadOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<UnitReadOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiByTenantIdByBuildingIdByFloorIdUnitByUnitIdGetAsync(response: Response): Observable<UnitReadOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? UnitReadOutput.fromJS(resultData200) : new UnitReadOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<UnitReadOutput>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @input (optional) | |
* @return Success | |
*/ | |
apiByTenantIdByBuildingIdByFloorIdUnitByUnitIdPutAsync(tenantId: string, buildingId: number, floorId: number, unitId: number, input: UnitUpdateInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/Units/ApiByTenantIdByBuildingIdByFloorIdUnitByUnitIdPutAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (buildingId === undefined || buildingId === null) | |
throw new Error("The parameter 'buildingId' must be defined and cannot be null."); | |
else | |
url_ += "buildingId=" + encodeURIComponent("" + buildingId) + "&"; | |
if (floorId === undefined || floorId === null) | |
throw new Error("The parameter 'floorId' must be defined and cannot be null."); | |
else | |
url_ += "floorId=" + encodeURIComponent("" + floorId) + "&"; | |
if (unitId === undefined || unitId === null) | |
throw new Error("The parameter 'unitId' must be defined and cannot be null."); | |
else | |
url_ += "unitId=" + encodeURIComponent("" + unitId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiByTenantIdByBuildingIdByFloorIdUnitByUnitIdPutAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiByTenantIdByBuildingIdByFloorIdUnitByUnitIdPutAsync(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiByTenantIdByBuildingIdByFloorIdUnitByUnitIdPutAsync(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @tenantId (optional) | |
* @return Success | |
*/ | |
apiByTenantIdByBuildingIdByFloorIdUnitByUnitIdDetailGetAsync(tenantId: string, buildingId: number, floorId: number, unitId: number): Observable<BuildingUpdateOutput> { | |
let url_ = this.baseUrl + "/api/services/app/Units/ApiByTenantIdByBuildingIdByFloorIdUnitByUnitIdDetailGetAsync?"; | |
if (tenantId !== undefined) | |
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&"; | |
if (buildingId === undefined || buildingId === null) | |
throw new Error("The parameter 'buildingId' must be defined and cannot be null."); | |
else | |
url_ += "buildingId=" + encodeURIComponent("" + buildingId) + "&"; | |
if (floorId === undefined || floorId === null) | |
throw new Error("The parameter 'floorId' must be defined and cannot be null."); | |
else | |
url_ += "floorId=" + encodeURIComponent("" + floorId) + "&"; | |
if (unitId === undefined || unitId === null) | |
throw new Error("The parameter 'unitId' must be defined and cannot be null."); | |
else | |
url_ += "unitId=" + encodeURIComponent("" + unitId) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processApiByTenantIdByBuildingIdByFloorIdUnitByUnitIdDetailGetAsync(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processApiByTenantIdByBuildingIdByFloorIdUnitByUnitIdDetailGetAsync(response_); | |
} catch (e) { | |
return <Observable<BuildingUpdateOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<BuildingUpdateOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processApiByTenantIdByBuildingIdByFloorIdUnitByUnitIdDetailGetAsync(response: Response): Observable<BuildingUpdateOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? BuildingUpdateOutput.fromJS(resultData200) : new BuildingUpdateOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<BuildingUpdateOutput>(<any>null); | |
} | |
} | |
@Injectable() | |
export class UserServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @filter (optional) | |
* @permission (optional) | |
* @role (optional) | |
* @sorting (optional) | |
* @return Success | |
*/ | |
getUsers(filter: string, permission: string, role: number, sorting: string, maxResultCount: number, skipCount: number): Observable<PagedResultDto`1OfOfUserListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
let url_ = this.baseUrl + "/api/services/app/User/GetUsers?"; | |
if (filter !== undefined) | |
url_ += "Filter=" + encodeURIComponent("" + filter) + "&"; | |
if (permission !== undefined) | |
url_ += "Permission=" + encodeURIComponent("" + permission) + "&"; | |
if (role !== undefined) | |
url_ += "Role=" + encodeURIComponent("" + role) + "&"; | |
if (sorting !== undefined) | |
url_ += "Sorting=" + encodeURIComponent("" + sorting) + "&"; | |
if (maxResultCount === undefined || maxResultCount === null) | |
throw new Error("The parameter 'maxResultCount' must be defined and cannot be null."); | |
else | |
url_ += "MaxResultCount=" + encodeURIComponent("" + maxResultCount) + "&"; | |
if (skipCount === undefined || skipCount === null) | |
throw new Error("The parameter 'skipCount' must be defined and cannot be null."); | |
else | |
url_ += "SkipCount=" + encodeURIComponent("" + skipCount) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetUsers(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetUsers(response_); | |
} catch (e) { | |
return <Observable<PagedResultDto`1OfOfUserListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<PagedResultDto`1OfOfUserListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetUsers(response: Response): Observable<PagedResultDto`1OfOfUserListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? PagedResultDto`1OfOfUserListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null.fromJS(resultData200) : new PagedResultDto`1OfOfUserListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<PagedResultDto`1OfOfUserListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
getUsersToExcel(): Observable<FileDto> { | |
let url_ = this.baseUrl + "/api/services/app/User/GetUsersToExcel"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetUsersToExcel(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetUsersToExcel(response_); | |
} catch (e) { | |
return <Observable<FileDto>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<FileDto>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetUsersToExcel(response: Response): Observable<FileDto> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? FileDto.fromJS(resultData200) : new FileDto(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<FileDto>(<any>null); | |
} | |
/** | |
* @id (optional) | |
* @return Success | |
*/ | |
getUserForEdit(id: number): Observable<GetUserForEditOutput> { | |
let url_ = this.baseUrl + "/api/services/app/User/GetUserForEdit?"; | |
if (id !== undefined) | |
url_ += "Id=" + encodeURIComponent("" + id) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetUserForEdit(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetUserForEdit(response_); | |
} catch (e) { | |
return <Observable<GetUserForEditOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<GetUserForEditOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetUserForEdit(response: Response): Observable<GetUserForEditOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? GetUserForEditOutput.fromJS(resultData200) : new GetUserForEditOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<GetUserForEditOutput>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
getUserPermissionsForEdit(id: number): Observable<GetUserPermissionsForEditOutput> { | |
let url_ = this.baseUrl + "/api/services/app/User/GetUserPermissionsForEdit?"; | |
if (id === undefined || id === null) | |
throw new Error("The parameter 'id' must be defined and cannot be null."); | |
else | |
url_ += "Id=" + encodeURIComponent("" + id) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetUserPermissionsForEdit(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetUserPermissionsForEdit(response_); | |
} catch (e) { | |
return <Observable<GetUserPermissionsForEditOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<GetUserPermissionsForEditOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetUserPermissionsForEdit(response: Response): Observable<GetUserPermissionsForEditOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? GetUserPermissionsForEditOutput.fromJS(resultData200) : new GetUserPermissionsForEditOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<GetUserPermissionsForEditOutput>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
resetUserSpecificPermissions(input: EntityDto`1OfOfInt64AndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/User/ResetUserSpecificPermissions"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processResetUserSpecificPermissions(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processResetUserSpecificPermissions(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processResetUserSpecificPermissions(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
updateUserPermissions(input: UpdateUserPermissionsInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/User/UpdateUserPermissions"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "put", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processUpdateUserPermissions(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processUpdateUserPermissions(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processUpdateUserPermissions(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
createOrUpdateUser(input: CreateOrUpdateUserInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/User/CreateOrUpdateUser"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processCreateOrUpdateUser(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processCreateOrUpdateUser(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processCreateOrUpdateUser(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
deleteUser(id: number): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/User/DeleteUser?"; | |
if (id === undefined || id === null) | |
throw new Error("The parameter 'id' must be defined and cannot be null."); | |
else | |
url_ += "Id=" + encodeURIComponent("" + id) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "delete", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processDeleteUser(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processDeleteUser(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processDeleteUser(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
unlockUser(input: EntityDto`1OfOfInt64AndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/User/UnlockUser"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processUnlockUser(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processUnlockUser(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processUnlockUser(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
} | |
@Injectable() | |
export class UserLinkServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
linkToUser(input: LinkToUserInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/UserLink/LinkToUser"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processLinkToUser(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processLinkToUser(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processLinkToUser(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
/** | |
* @sorting (optional) | |
* @return Success | |
*/ | |
getLinkedUsers(maxResultCount: number, skipCount: number, sorting: string): Observable<PagedResultDto`1OfOfLinkedUserDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
let url_ = this.baseUrl + "/api/services/app/UserLink/GetLinkedUsers?"; | |
if (maxResultCount === undefined || maxResultCount === null) | |
throw new Error("The parameter 'maxResultCount' must be defined and cannot be null."); | |
else | |
url_ += "MaxResultCount=" + encodeURIComponent("" + maxResultCount) + "&"; | |
if (skipCount === undefined || skipCount === null) | |
throw new Error("The parameter 'skipCount' must be defined and cannot be null."); | |
else | |
url_ += "SkipCount=" + encodeURIComponent("" + skipCount) + "&"; | |
if (sorting !== undefined) | |
url_ += "Sorting=" + encodeURIComponent("" + sorting) + "&"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetLinkedUsers(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetLinkedUsers(response_); | |
} catch (e) { | |
return <Observable<PagedResultDto`1OfOfLinkedUserDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<PagedResultDto`1OfOfLinkedUserDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetLinkedUsers(response: Response): Observable<PagedResultDto`1OfOfLinkedUserDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? PagedResultDto`1OfOfLinkedUserDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null.fromJS(resultData200) : new PagedResultDto`1OfOfLinkedUserDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<PagedResultDto`1OfOfLinkedUserDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
getRecentlyUsedLinkedUsers(): Observable<ListResultDto`1OfOfLinkedUserDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
let url_ = this.baseUrl + "/api/services/app/UserLink/GetRecentlyUsedLinkedUsers"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetRecentlyUsedLinkedUsers(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetRecentlyUsedLinkedUsers(response_); | |
} catch (e) { | |
return <Observable<ListResultDto`1OfOfLinkedUserDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<ListResultDto`1OfOfLinkedUserDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetRecentlyUsedLinkedUsers(response: Response): Observable<ListResultDto`1OfOfLinkedUserDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? ListResultDto`1OfOfLinkedUserDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null.fromJS(resultData200) : new ListResultDto`1OfOfLinkedUserDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<ListResultDto`1OfOfLinkedUserDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>(<any>null); | |
} | |
/** | |
* @input (optional) | |
* @return Success | |
*/ | |
unlinkUser(input: UnlinkUserInput): Observable<void> { | |
let url_ = this.baseUrl + "/api/services/app/UserLink/UnlinkUser"; | |
url_ = url_.replace(/[?&]$/, ""); | |
const content_ = JSON.stringify(input); | |
let options_ : any = { | |
body: content_, | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processUnlinkUser(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processUnlinkUser(response_); | |
} catch (e) { | |
return <Observable<void>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<void>><any>Observable.throw(response_); | |
}); | |
} | |
protected processUnlinkUser(response: Response): Observable<void> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
return Observable.of<void>(<any>null); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<void>(<any>null); | |
} | |
} | |
@Injectable() | |
export class UserLoginServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @return Success | |
*/ | |
getRecentUserLoginAttempts(): Observable<ListResultDto`1OfOfUserLoginAttemptDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
let url_ = this.baseUrl + "/api/services/app/UserLogin/GetRecentUserLoginAttempts"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetRecentUserLoginAttempts(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetRecentUserLoginAttempts(response_); | |
} catch (e) { | |
return <Observable<ListResultDto`1OfOfUserLoginAttemptDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<ListResultDto`1OfOfUserLoginAttemptDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetRecentUserLoginAttempts(response: Response): Observable<ListResultDto`1OfOfUserLoginAttemptDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? ListResultDto`1OfOfUserLoginAttemptDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null.fromJS(resultData200) : new ListResultDto`1OfOfUserLoginAttemptDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<ListResultDto`1OfOfUserLoginAttemptDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>(<any>null); | |
} | |
} | |
@Injectable() | |
export class WebLogServiceProxy { | |
private http: Http; | |
private baseUrl: string; | |
protected jsonParseReviver: (key: string, value: any) => any = undefined; | |
constructor(@Inject(Http) http: Http, @Optional() @Inject(API_BASE_URL) baseUrl?: string) { | |
this.http = http; | |
this.baseUrl = baseUrl ? baseUrl : ""; | |
} | |
/** | |
* @return Success | |
*/ | |
getLatestWebLogs(): Observable<GetLatestWebLogsOutput> { | |
let url_ = this.baseUrl + "/api/services/app/WebLog/GetLatestWebLogs"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "get", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processGetLatestWebLogs(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processGetLatestWebLogs(response_); | |
} catch (e) { | |
return <Observable<GetLatestWebLogsOutput>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<GetLatestWebLogsOutput>><any>Observable.throw(response_); | |
}); | |
} | |
protected processGetLatestWebLogs(response: Response): Observable<GetLatestWebLogsOutput> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? GetLatestWebLogsOutput.fromJS(resultData200) : new GetLatestWebLogsOutput(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<GetLatestWebLogsOutput>(<any>null); | |
} | |
/** | |
* @return Success | |
*/ | |
downloadWebLogs(): Observable<FileDto> { | |
let url_ = this.baseUrl + "/api/services/app/WebLog/DownloadWebLogs"; | |
url_ = url_.replace(/[?&]$/, ""); | |
let options_ : any = { | |
method: "post", | |
headers: new Headers({ | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
}) | |
}; | |
return this.http.request(url_, options_).flatMap((response_ : any) => { | |
return this.processDownloadWebLogs(response_); | |
}).catch((response_: any) => { | |
if (response_ instanceof Response) { | |
try { | |
return this.processDownloadWebLogs(response_); | |
} catch (e) { | |
return <Observable<FileDto>><any>Observable.throw(e); | |
} | |
} else | |
return <Observable<FileDto>><any>Observable.throw(response_); | |
}); | |
} | |
protected processDownloadWebLogs(response: Response): Observable<FileDto> { | |
const status = response.status; | |
let _headers: any = response.headers ? response.headers.toJSON() : {}; | |
if (status === 200) { | |
const _responseText = response.text(); | |
let result200: any = null; | |
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver); | |
result200 = resultData200 ? FileDto.fromJS(resultData200) : new FileDto(); | |
return Observable.of(result200); | |
} else if (status !== 200 && status !== 204) { | |
const _responseText = response.text(); | |
return throwException("An unexpected server error occurred.", status, _responseText, _headers); | |
} | |
return Observable.of<FileDto>(<any>null); | |
} | |
} | |
export class IsTenantAvailableInput implements IIsTenantAvailableInput { | |
tenancyName: string; | |
constructor(data?: IIsTenantAvailableInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.tenancyName = data["tenancyName"]; | |
} | |
} | |
static fromJS(data: any): IsTenantAvailableInput { | |
let result = new IsTenantAvailableInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["tenancyName"] = this.tenancyName; | |
return data; | |
} | |
} | |
export interface IIsTenantAvailableInput { | |
tenancyName: string; | |
} | |
export class IsTenantAvailableOutput implements IIsTenantAvailableOutput { | |
state: IsTenantAvailableOutputState; | |
tenantId: number; | |
serverRootAddress: string; | |
constructor(data?: IIsTenantAvailableOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.state = data["state"]; | |
this.tenantId = data["tenantId"]; | |
this.serverRootAddress = data["serverRootAddress"]; | |
} | |
} | |
static fromJS(data: any): IsTenantAvailableOutput { | |
let result = new IsTenantAvailableOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["state"] = this.state; | |
data["tenantId"] = this.tenantId; | |
data["serverRootAddress"] = this.serverRootAddress; | |
return data; | |
} | |
} | |
export interface IIsTenantAvailableOutput { | |
state: IsTenantAvailableOutputState; | |
tenantId: number; | |
serverRootAddress: string; | |
} | |
export class RegisterInput implements IRegisterInput { | |
name: string; | |
surname: string; | |
userName: string; | |
emailAddress: string; | |
password: string; | |
captchaResponse: string; | |
constructor(data?: IRegisterInput) { | |
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"]; | |
this.surname = data["surname"]; | |
this.userName = data["userName"]; | |
this.emailAddress = data["emailAddress"]; | |
this.password = data["password"]; | |
this.captchaResponse = data["captchaResponse"]; | |
} | |
} | |
static fromJS(data: any): RegisterInput { | |
let result = new RegisterInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["name"] = this.name; | |
data["surname"] = this.surname; | |
data["userName"] = this.userName; | |
data["emailAddress"] = this.emailAddress; | |
data["password"] = this.password; | |
data["captchaResponse"] = this.captchaResponse; | |
return data; | |
} | |
} | |
export interface IRegisterInput { | |
name: string; | |
surname: string; | |
userName: string; | |
emailAddress: string; | |
password: string; | |
captchaResponse: string; | |
} | |
export class RegisterOutput implements IRegisterOutput { | |
canLogin: boolean; | |
constructor(data?: IRegisterOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.canLogin = data["canLogin"]; | |
} | |
} | |
static fromJS(data: any): RegisterOutput { | |
let result = new RegisterOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["canLogin"] = this.canLogin; | |
return data; | |
} | |
} | |
export interface IRegisterOutput { | |
canLogin: boolean; | |
} | |
export class SendPasswordResetCodeInput implements ISendPasswordResetCodeInput { | |
emailAddress: string; | |
constructor(data?: ISendPasswordResetCodeInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.emailAddress = data["emailAddress"]; | |
} | |
} | |
static fromJS(data: any): SendPasswordResetCodeInput { | |
let result = new SendPasswordResetCodeInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["emailAddress"] = this.emailAddress; | |
return data; | |
} | |
} | |
export interface ISendPasswordResetCodeInput { | |
emailAddress: string; | |
} | |
export class ResetPasswordInput implements IResetPasswordInput { | |
userId: number; | |
resetCode: string; | |
password: string; | |
returnUrl: string; | |
singleSignIn: string; | |
constructor(data?: IResetPasswordInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.userId = data["userId"]; | |
this.resetCode = data["resetCode"]; | |
this.password = data["password"]; | |
this.returnUrl = data["returnUrl"]; | |
this.singleSignIn = data["singleSignIn"]; | |
} | |
} | |
static fromJS(data: any): ResetPasswordInput { | |
let result = new ResetPasswordInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["userId"] = this.userId; | |
data["resetCode"] = this.resetCode; | |
data["password"] = this.password; | |
data["returnUrl"] = this.returnUrl; | |
data["singleSignIn"] = this.singleSignIn; | |
return data; | |
} | |
} | |
export interface IResetPasswordInput { | |
userId: number; | |
resetCode: string; | |
password: string; | |
returnUrl: string; | |
singleSignIn: string; | |
} | |
export class ResetPasswordOutput implements IResetPasswordOutput { | |
canLogin: boolean; | |
userName: string; | |
constructor(data?: IResetPasswordOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.canLogin = data["canLogin"]; | |
this.userName = data["userName"]; | |
} | |
} | |
static fromJS(data: any): ResetPasswordOutput { | |
let result = new ResetPasswordOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["canLogin"] = this.canLogin; | |
data["userName"] = this.userName; | |
return data; | |
} | |
} | |
export interface IResetPasswordOutput { | |
canLogin: boolean; | |
userName: string; | |
} | |
export class SendEmailActivationLinkInput implements ISendEmailActivationLinkInput { | |
emailAddress: string; | |
constructor(data?: ISendEmailActivationLinkInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.emailAddress = data["emailAddress"]; | |
} | |
} | |
static fromJS(data: any): SendEmailActivationLinkInput { | |
let result = new SendEmailActivationLinkInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["emailAddress"] = this.emailAddress; | |
return data; | |
} | |
} | |
export interface ISendEmailActivationLinkInput { | |
emailAddress: string; | |
} | |
export class ActivateEmailInput implements IActivateEmailInput { | |
userId: number; | |
confirmationCode: string; | |
constructor(data?: IActivateEmailInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.userId = data["userId"]; | |
this.confirmationCode = data["confirmationCode"]; | |
} | |
} | |
static fromJS(data: any): ActivateEmailInput { | |
let result = new ActivateEmailInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["userId"] = this.userId; | |
data["confirmationCode"] = this.confirmationCode; | |
return data; | |
} | |
} | |
export interface IActivateEmailInput { | |
userId: number; | |
confirmationCode: string; | |
} | |
export class ImpersonateInput implements IImpersonateInput { | |
tenantId: number; | |
userId: number; | |
constructor(data?: IImpersonateInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.tenantId = data["tenantId"]; | |
this.userId = data["userId"]; | |
} | |
} | |
static fromJS(data: any): ImpersonateInput { | |
let result = new ImpersonateInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["tenantId"] = this.tenantId; | |
data["userId"] = this.userId; | |
return data; | |
} | |
} | |
export interface IImpersonateInput { | |
tenantId: number; | |
userId: number; | |
} | |
export class ImpersonateOutput implements IImpersonateOutput { | |
impersonationToken: string; | |
tenancyName: string; | |
constructor(data?: IImpersonateOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.impersonationToken = data["impersonationToken"]; | |
this.tenancyName = data["tenancyName"]; | |
} | |
} | |
static fromJS(data: any): ImpersonateOutput { | |
let result = new ImpersonateOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["impersonationToken"] = this.impersonationToken; | |
data["tenancyName"] = this.tenancyName; | |
return data; | |
} | |
} | |
export interface IImpersonateOutput { | |
impersonationToken: string; | |
tenancyName: string; | |
} | |
export class SwitchToLinkedAccountInput implements ISwitchToLinkedAccountInput { | |
targetTenantId: number; | |
targetUserId: number; | |
constructor(data?: ISwitchToLinkedAccountInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.targetTenantId = data["targetTenantId"]; | |
this.targetUserId = data["targetUserId"]; | |
} | |
} | |
static fromJS(data: any): SwitchToLinkedAccountInput { | |
let result = new SwitchToLinkedAccountInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["targetTenantId"] = this.targetTenantId; | |
data["targetUserId"] = this.targetUserId; | |
return data; | |
} | |
} | |
export interface ISwitchToLinkedAccountInput { | |
targetTenantId: number; | |
targetUserId: number; | |
} | |
export class SwitchToLinkedAccountOutput implements ISwitchToLinkedAccountOutput { | |
switchAccountToken: string; | |
tenancyName: string; | |
constructor(data?: ISwitchToLinkedAccountOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.switchAccountToken = data["switchAccountToken"]; | |
this.tenancyName = data["tenancyName"]; | |
} | |
} | |
static fromJS(data: any): SwitchToLinkedAccountOutput { | |
let result = new SwitchToLinkedAccountOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["switchAccountToken"] = this.switchAccountToken; | |
data["tenancyName"] = this.tenancyName; | |
return data; | |
} | |
} | |
export interface ISwitchToLinkedAccountOutput { | |
switchAccountToken: string; | |
tenancyName: string; | |
} | |
export class PagedResultDto`1OfOfAuditLogListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null implements IPagedResultDto`1OfOfAuditLogListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
totalCount: number; | |
items: AuditLogListDto[]; | |
constructor(data?: IPagedResultDto`1OfOfAuditLogListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.totalCount = data["totalCount"]; | |
if (data["items"] && data["items"].constructor === Array) { | |
this.items = []; | |
for (let item of data["items"]) | |
this.items.push(AuditLogListDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): PagedResultDto`1OfOfAuditLogListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
let result = new PagedResultDto`1OfOfAuditLogListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["totalCount"] = this.totalCount; | |
if (this.items && this.items.constructor === Array) { | |
data["items"] = []; | |
for (let item of this.items) | |
data["items"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IPagedResultDto`1OfOfAuditLogListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
totalCount: number; | |
items: AuditLogListDto[]; | |
} | |
export class AuditLogListDto implements IAuditLogListDto { | |
userId: number; | |
userName: string; | |
impersonatorTenantId: number; | |
impersonatorUserId: number; | |
serviceName: string; | |
methodName: string; | |
parameters: string; | |
executionTime: moment.Moment; | |
executionDuration: number; | |
clientIpAddress: string; | |
clientName: string; | |
browserInfo: string; | |
exception: string; | |
customData: string; | |
id: number; | |
constructor(data?: IAuditLogListDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.userId = data["userId"]; | |
this.userName = data["userName"]; | |
this.impersonatorTenantId = data["impersonatorTenantId"]; | |
this.impersonatorUserId = data["impersonatorUserId"]; | |
this.serviceName = data["serviceName"]; | |
this.methodName = data["methodName"]; | |
this.parameters = data["parameters"]; | |
this.executionTime = data["executionTime"] ? moment(data["executionTime"].toString()) : <any>undefined; | |
this.executionDuration = data["executionDuration"]; | |
this.clientIpAddress = data["clientIpAddress"]; | |
this.clientName = data["clientName"]; | |
this.browserInfo = data["browserInfo"]; | |
this.exception = data["exception"]; | |
this.customData = data["customData"]; | |
this.id = data["id"]; | |
} | |
} | |
static fromJS(data: any): AuditLogListDto { | |
let result = new AuditLogListDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["userId"] = this.userId; | |
data["userName"] = this.userName; | |
data["impersonatorTenantId"] = this.impersonatorTenantId; | |
data["impersonatorUserId"] = this.impersonatorUserId; | |
data["serviceName"] = this.serviceName; | |
data["methodName"] = this.methodName; | |
data["parameters"] = this.parameters; | |
data["executionTime"] = this.executionTime ? this.executionTime.toISOString() : <any>undefined; | |
data["executionDuration"] = this.executionDuration; | |
data["clientIpAddress"] = this.clientIpAddress; | |
data["clientName"] = this.clientName; | |
data["browserInfo"] = this.browserInfo; | |
data["exception"] = this.exception; | |
data["customData"] = this.customData; | |
data["id"] = this.id; | |
return data; | |
} | |
} | |
export interface IAuditLogListDto { | |
userId: number; | |
userName: string; | |
impersonatorTenantId: number; | |
impersonatorUserId: number; | |
serviceName: string; | |
methodName: string; | |
parameters: string; | |
executionTime: moment.Moment; | |
executionDuration: number; | |
clientIpAddress: string; | |
clientName: string; | |
browserInfo: string; | |
exception: string; | |
customData: string; | |
id: number; | |
} | |
export class FileDto implements IFileDto { | |
fileName: string; | |
fileType: string; | |
fileToken: string; | |
constructor(data?: IFileDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.fileName = data["fileName"]; | |
this.fileType = data["fileType"]; | |
this.fileToken = data["fileToken"]; | |
} | |
} | |
static fromJS(data: any): FileDto { | |
let result = new FileDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["fileName"] = this.fileName; | |
data["fileType"] = this.fileType; | |
data["fileToken"] = this.fileToken; | |
return data; | |
} | |
} | |
export interface IFileDto { | |
fileName: string; | |
fileType: string; | |
fileToken: string; | |
} | |
export class ListResultDto`1OfOfCacheDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null implements IListResultDto`1OfOfCacheDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
items: CacheDto[]; | |
constructor(data?: IListResultDto`1OfOfCacheDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
if (data["items"] && data["items"].constructor === Array) { | |
this.items = []; | |
for (let item of data["items"]) | |
this.items.push(CacheDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): ListResultDto`1OfOfCacheDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
let result = new ListResultDto`1OfOfCacheDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
if (this.items && this.items.constructor === Array) { | |
data["items"] = []; | |
for (let item of this.items) | |
data["items"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IListResultDto`1OfOfCacheDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
items: CacheDto[]; | |
} | |
export class CacheDto implements ICacheDto { | |
name: string; | |
constructor(data?: ICacheDto) { | |
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): CacheDto { | |
let result = new CacheDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["name"] = this.name; | |
return data; | |
} | |
} | |
export interface ICacheDto { | |
name: string; | |
} | |
export class EntityDto`1OfOfStringAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e implements IEntityDto`1OfOfStringAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e { | |
id: string; | |
constructor(data?: IEntityDto`1OfOfStringAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e) { | |
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"]; | |
} | |
} | |
static fromJS(data: any): EntityDto`1OfOfStringAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e { | |
let result = new EntityDto`1OfOfStringAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["id"] = this.id; | |
return data; | |
} | |
} | |
export interface IEntityDto`1OfOfStringAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e { | |
id: string; | |
} | |
export class GetUserChatFriendsWithSettingsOutput implements IGetUserChatFriendsWithSettingsOutput { | |
serverTime: moment.Moment; | |
friends: FriendDto[]; | |
constructor(data?: IGetUserChatFriendsWithSettingsOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.serverTime = data["serverTime"] ? moment(data["serverTime"].toString()) : <any>undefined; | |
if (data["friends"] && data["friends"].constructor === Array) { | |
this.friends = []; | |
for (let item of data["friends"]) | |
this.friends.push(FriendDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): GetUserChatFriendsWithSettingsOutput { | |
let result = new GetUserChatFriendsWithSettingsOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["serverTime"] = this.serverTime ? this.serverTime.toISOString() : <any>undefined; | |
if (this.friends && this.friends.constructor === Array) { | |
data["friends"] = []; | |
for (let item of this.friends) | |
data["friends"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IGetUserChatFriendsWithSettingsOutput { | |
serverTime: moment.Moment; | |
friends: FriendDto[]; | |
} | |
export class FriendDto implements IFriendDto { | |
friendUserId: number; | |
friendTenantId: number; | |
friendUserName: string; | |
friendTenancyName: string; | |
friendProfilePictureId: string; | |
unreadMessageCount: number; | |
isOnline: boolean; | |
state: FriendDtoState; | |
constructor(data?: IFriendDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.friendUserId = data["friendUserId"]; | |
this.friendTenantId = data["friendTenantId"]; | |
this.friendUserName = data["friendUserName"]; | |
this.friendTenancyName = data["friendTenancyName"]; | |
this.friendProfilePictureId = data["friendProfilePictureId"]; | |
this.unreadMessageCount = data["unreadMessageCount"]; | |
this.isOnline = data["isOnline"]; | |
this.state = data["state"]; | |
} | |
} | |
static fromJS(data: any): FriendDto { | |
let result = new FriendDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["friendUserId"] = this.friendUserId; | |
data["friendTenantId"] = this.friendTenantId; | |
data["friendUserName"] = this.friendUserName; | |
data["friendTenancyName"] = this.friendTenancyName; | |
data["friendProfilePictureId"] = this.friendProfilePictureId; | |
data["unreadMessageCount"] = this.unreadMessageCount; | |
data["isOnline"] = this.isOnline; | |
data["state"] = this.state; | |
return data; | |
} | |
} | |
export interface IFriendDto { | |
friendUserId: number; | |
friendTenantId: number; | |
friendUserName: string; | |
friendTenancyName: string; | |
friendProfilePictureId: string; | |
unreadMessageCount: number; | |
isOnline: boolean; | |
state: FriendDtoState; | |
} | |
export class ListResultDto`1OfOfChatMessageDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null implements IListResultDto`1OfOfChatMessageDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
items: ChatMessageDto[]; | |
constructor(data?: IListResultDto`1OfOfChatMessageDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
if (data["items"] && data["items"].constructor === Array) { | |
this.items = []; | |
for (let item of data["items"]) | |
this.items.push(ChatMessageDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): ListResultDto`1OfOfChatMessageDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
let result = new ListResultDto`1OfOfChatMessageDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
if (this.items && this.items.constructor === Array) { | |
data["items"] = []; | |
for (let item of this.items) | |
data["items"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IListResultDto`1OfOfChatMessageDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
items: ChatMessageDto[]; | |
} | |
export class ChatMessageDto implements IChatMessageDto { | |
userId: number; | |
tenantId: number; | |
targetUserId: number; | |
targetTenantId: number; | |
side: ChatMessageDtoSide; | |
readState: ChatMessageDtoReadState; | |
receiverReadState: ChatMessageDtoReceiverReadState; | |
message: string; | |
creationTime: moment.Moment; | |
sharedMessageId: string; | |
id: number; | |
constructor(data?: IChatMessageDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.userId = data["userId"]; | |
this.tenantId = data["tenantId"]; | |
this.targetUserId = data["targetUserId"]; | |
this.targetTenantId = data["targetTenantId"]; | |
this.side = data["side"]; | |
this.readState = data["readState"]; | |
this.receiverReadState = data["receiverReadState"]; | |
this.message = data["message"]; | |
this.creationTime = data["creationTime"] ? moment(data["creationTime"].toString()) : <any>undefined; | |
this.sharedMessageId = data["sharedMessageId"]; | |
this.id = data["id"]; | |
} | |
} | |
static fromJS(data: any): ChatMessageDto { | |
let result = new ChatMessageDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["userId"] = this.userId; | |
data["tenantId"] = this.tenantId; | |
data["targetUserId"] = this.targetUserId; | |
data["targetTenantId"] = this.targetTenantId; | |
data["side"] = this.side; | |
data["readState"] = this.readState; | |
data["receiverReadState"] = this.receiverReadState; | |
data["message"] = this.message; | |
data["creationTime"] = this.creationTime ? this.creationTime.toISOString() : <any>undefined; | |
data["sharedMessageId"] = this.sharedMessageId; | |
data["id"] = this.id; | |
return data; | |
} | |
} | |
export interface IChatMessageDto { | |
userId: number; | |
tenantId: number; | |
targetUserId: number; | |
targetTenantId: number; | |
side: ChatMessageDtoSide; | |
readState: ChatMessageDtoReadState; | |
receiverReadState: ChatMessageDtoReceiverReadState; | |
message: string; | |
creationTime: moment.Moment; | |
sharedMessageId: string; | |
id: number; | |
} | |
export class MarkAllUnreadMessagesOfUserAsReadInput implements IMarkAllUnreadMessagesOfUserAsReadInput { | |
tenantId: number; | |
userId: number; | |
constructor(data?: IMarkAllUnreadMessagesOfUserAsReadInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.tenantId = data["tenantId"]; | |
this.userId = data["userId"]; | |
} | |
} | |
static fromJS(data: any): MarkAllUnreadMessagesOfUserAsReadInput { | |
let result = new MarkAllUnreadMessagesOfUserAsReadInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["tenantId"] = this.tenantId; | |
data["userId"] = this.userId; | |
return data; | |
} | |
} | |
export interface IMarkAllUnreadMessagesOfUserAsReadInput { | |
tenantId: number; | |
userId: number; | |
} | |
export class ListResultDto`1OfOfSubscribableEditionComboboxItemDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null implements IListResultDto`1OfOfSubscribableEditionComboboxItemDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
items: SubscribableEditionComboboxItemDto[]; | |
constructor(data?: IListResultDto`1OfOfSubscribableEditionComboboxItemDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
if (data["items"] && data["items"].constructor === Array) { | |
this.items = []; | |
for (let item of data["items"]) | |
this.items.push(SubscribableEditionComboboxItemDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): ListResultDto`1OfOfSubscribableEditionComboboxItemDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
let result = new ListResultDto`1OfOfSubscribableEditionComboboxItemDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
if (this.items && this.items.constructor === Array) { | |
data["items"] = []; | |
for (let item of this.items) | |
data["items"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IListResultDto`1OfOfSubscribableEditionComboboxItemDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
items: SubscribableEditionComboboxItemDto[]; | |
} | |
export class SubscribableEditionComboboxItemDto implements ISubscribableEditionComboboxItemDto { | |
isFree: boolean; | |
value: string; | |
displayText: string; | |
isSelected: boolean; | |
constructor(data?: ISubscribableEditionComboboxItemDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.isFree = data["isFree"]; | |
this.value = data["value"]; | |
this.displayText = data["displayText"]; | |
this.isSelected = data["isSelected"]; | |
} | |
} | |
static fromJS(data: any): SubscribableEditionComboboxItemDto { | |
let result = new SubscribableEditionComboboxItemDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["isFree"] = this.isFree; | |
data["value"] = this.value; | |
data["displayText"] = this.displayText; | |
data["isSelected"] = this.isSelected; | |
return data; | |
} | |
} | |
export interface ISubscribableEditionComboboxItemDto { | |
isFree: boolean; | |
value: string; | |
displayText: string; | |
isSelected: boolean; | |
} | |
export class FindUsersInput implements IFindUsersInput { | |
tenantId: number; | |
maxResultCount: number; | |
skipCount: number; | |
filter: string; | |
constructor(data?: IFindUsersInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.tenantId = data["tenantId"]; | |
this.maxResultCount = data["maxResultCount"]; | |
this.skipCount = data["skipCount"]; | |
this.filter = data["filter"]; | |
} | |
} | |
static fromJS(data: any): FindUsersInput { | |
let result = new FindUsersInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["tenantId"] = this.tenantId; | |
data["maxResultCount"] = this.maxResultCount; | |
data["skipCount"] = this.skipCount; | |
data["filter"] = this.filter; | |
return data; | |
} | |
} | |
export interface IFindUsersInput { | |
tenantId: number; | |
maxResultCount: number; | |
skipCount: number; | |
filter: string; | |
} | |
export class PagedResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null implements IPagedResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
totalCount: number; | |
items: NameValueDto[]; | |
constructor(data?: IPagedResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.totalCount = data["totalCount"]; | |
if (data["items"] && data["items"].constructor === Array) { | |
this.items = []; | |
for (let item of data["items"]) | |
this.items.push(NameValueDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): PagedResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
let result = new PagedResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["totalCount"] = this.totalCount; | |
if (this.items && this.items.constructor === Array) { | |
data["items"] = []; | |
for (let item of this.items) | |
data["items"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IPagedResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
totalCount: number; | |
items: NameValueDto[]; | |
} | |
export class NameValueDto implements INameValueDto { | |
name: string; | |
value: string; | |
constructor(data?: INameValueDto) { | |
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"]; | |
this.value = data["value"]; | |
} | |
} | |
static fromJS(data: any): NameValueDto { | |
let result = new NameValueDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["name"] = this.name; | |
data["value"] = this.value; | |
return data; | |
} | |
} | |
export interface INameValueDto { | |
name: string; | |
value: string; | |
} | |
export class GetDefaultEditionNameOutput implements IGetDefaultEditionNameOutput { | |
name: string; | |
constructor(data?: IGetDefaultEditionNameOutput) { | |
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): GetDefaultEditionNameOutput { | |
let result = new GetDefaultEditionNameOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["name"] = this.name; | |
return data; | |
} | |
} | |
export interface IGetDefaultEditionNameOutput { | |
name: string; | |
} | |
export class DateToStringOutput implements IDateToStringOutput { | |
dateString: string; | |
constructor(data?: IDateToStringOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.dateString = data["dateString"]; | |
} | |
} | |
static fromJS(data: any): DateToStringOutput { | |
let result = new DateToStringOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["dateString"] = this.dateString; | |
return data; | |
} | |
} | |
export interface IDateToStringOutput { | |
dateString: string; | |
} | |
export class NameValue`1OfOfStringAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e implements INameValue`1OfOfStringAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e { | |
name: string; | |
value: string; | |
constructor(data?: INameValue`1OfOfStringAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e) { | |
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"]; | |
this.value = data["value"]; | |
} | |
} | |
static fromJS(data: any): NameValue`1OfOfStringAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e { | |
let result = new NameValue`1OfOfStringAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["name"] = this.name; | |
data["value"] = this.value; | |
return data; | |
} | |
} | |
export interface INameValue`1OfOfStringAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e { | |
name: string; | |
value: string; | |
} | |
export class StringOutput implements IStringOutput { | |
output: string; | |
constructor(data?: IStringOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.output = data["output"]; | |
} | |
} | |
static fromJS(data: any): StringOutput { | |
let result = new StringOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["output"] = this.output; | |
return data; | |
} | |
} | |
export interface IStringOutput { | |
output: string; | |
} | |
export class ListResultDto`1OfOfEditionListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null implements IListResultDto`1OfOfEditionListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
items: EditionListDto[]; | |
constructor(data?: IListResultDto`1OfOfEditionListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
if (data["items"] && data["items"].constructor === Array) { | |
this.items = []; | |
for (let item of data["items"]) | |
this.items.push(EditionListDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): ListResultDto`1OfOfEditionListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
let result = new ListResultDto`1OfOfEditionListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
if (this.items && this.items.constructor === Array) { | |
data["items"] = []; | |
for (let item of this.items) | |
data["items"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IListResultDto`1OfOfEditionListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
items: EditionListDto[]; | |
} | |
export class EditionListDto implements IEditionListDto { | |
name: string; | |
displayName: string; | |
creationTime: moment.Moment; | |
id: number; | |
constructor(data?: IEditionListDto) { | |
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"]; | |
this.displayName = data["displayName"]; | |
this.creationTime = data["creationTime"] ? moment(data["creationTime"].toString()) : <any>undefined; | |
this.id = data["id"]; | |
} | |
} | |
static fromJS(data: any): EditionListDto { | |
let result = new EditionListDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["name"] = this.name; | |
data["displayName"] = this.displayName; | |
data["creationTime"] = this.creationTime ? this.creationTime.toISOString() : <any>undefined; | |
data["id"] = this.id; | |
return data; | |
} | |
} | |
export interface IEditionListDto { | |
name: string; | |
displayName: string; | |
creationTime: moment.Moment; | |
id: number; | |
} | |
export class GetEditionEditOutput implements IGetEditionEditOutput { | |
edition: EditionEditDto; | |
featureValues: NameValueDto[]; | |
features: FlatFeatureDto[]; | |
constructor(data?: IGetEditionEditOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.edition = data["edition"] ? EditionEditDto.fromJS(data["edition"]) : <any>undefined; | |
if (data["featureValues"] && data["featureValues"].constructor === Array) { | |
this.featureValues = []; | |
for (let item of data["featureValues"]) | |
this.featureValues.push(NameValueDto.fromJS(item)); | |
} | |
if (data["features"] && data["features"].constructor === Array) { | |
this.features = []; | |
for (let item of data["features"]) | |
this.features.push(FlatFeatureDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): GetEditionEditOutput { | |
let result = new GetEditionEditOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["edition"] = this.edition ? this.edition.toJSON() : <any>undefined; | |
if (this.featureValues && this.featureValues.constructor === Array) { | |
data["featureValues"] = []; | |
for (let item of this.featureValues) | |
data["featureValues"].push(item.toJSON()); | |
} | |
if (this.features && this.features.constructor === Array) { | |
data["features"] = []; | |
for (let item of this.features) | |
data["features"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IGetEditionEditOutput { | |
edition: EditionEditDto; | |
featureValues: NameValueDto[]; | |
features: FlatFeatureDto[]; | |
} | |
export class EditionEditDto implements IEditionEditDto { | |
id: number; | |
displayName: string; | |
monthlyPrice: number; | |
annualPrice: number; | |
trialDayCount: number; | |
waitingDayAfterExpire: number; | |
expiringEditionId: number; | |
constructor(data?: IEditionEditDto) { | |
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.displayName = data["displayName"]; | |
this.monthlyPrice = data["monthlyPrice"]; | |
this.annualPrice = data["annualPrice"]; | |
this.trialDayCount = data["trialDayCount"]; | |
this.waitingDayAfterExpire = data["waitingDayAfterExpire"]; | |
this.expiringEditionId = data["expiringEditionId"]; | |
} | |
} | |
static fromJS(data: any): EditionEditDto { | |
let result = new EditionEditDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["id"] = this.id; | |
data["displayName"] = this.displayName; | |
data["monthlyPrice"] = this.monthlyPrice; | |
data["annualPrice"] = this.annualPrice; | |
data["trialDayCount"] = this.trialDayCount; | |
data["waitingDayAfterExpire"] = this.waitingDayAfterExpire; | |
data["expiringEditionId"] = this.expiringEditionId; | |
return data; | |
} | |
} | |
export interface IEditionEditDto { | |
id: number; | |
displayName: string; | |
monthlyPrice: number; | |
annualPrice: number; | |
trialDayCount: number; | |
waitingDayAfterExpire: number; | |
expiringEditionId: number; | |
} | |
export class FlatFeatureDto implements IFlatFeatureDto { | |
parentName: string; | |
name: string; | |
displayName: string; | |
description: string; | |
defaultValue: string; | |
inputType: FeatureInputTypeDto; | |
constructor(data?: IFlatFeatureDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.parentName = data["parentName"]; | |
this.name = data["name"]; | |
this.displayName = data["displayName"]; | |
this.description = data["description"]; | |
this.defaultValue = data["defaultValue"]; | |
this.inputType = data["inputType"] ? FeatureInputTypeDto.fromJS(data["inputType"]) : <any>undefined; | |
} | |
} | |
static fromJS(data: any): FlatFeatureDto { | |
let result = new FlatFeatureDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["parentName"] = this.parentName; | |
data["name"] = this.name; | |
data["displayName"] = this.displayName; | |
data["description"] = this.description; | |
data["defaultValue"] = this.defaultValue; | |
data["inputType"] = this.inputType ? this.inputType.toJSON() : <any>undefined; | |
return data; | |
} | |
} | |
export interface IFlatFeatureDto { | |
parentName: string; | |
name: string; | |
displayName: string; | |
description: string; | |
defaultValue: string; | |
inputType: FeatureInputTypeDto; | |
} | |
export class FeatureInputTypeDto implements IFeatureInputTypeDto { | |
name: string; | |
attributes: { [key: string] : any; }; | |
validator: IValueValidator; | |
itemSource: LocalizableComboboxItemSourceDto; | |
constructor(data?: IFeatureInputTypeDto) { | |
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"]; | |
if (data["attributes"]) { | |
this.attributes = {}; | |
for (let key in data["attributes"]) { | |
if (data["attributes"].hasOwnProperty(key)) | |
this.attributes[key] = data["attributes"][key]; | |
} | |
} | |
this.validator = data["validator"] ? IValueValidator.fromJS(data["validator"]) : <any>undefined; | |
this.itemSource = data["itemSource"] ? LocalizableComboboxItemSourceDto.fromJS(data["itemSource"]) : <any>undefined; | |
} | |
} | |
static fromJS(data: any): FeatureInputTypeDto { | |
let result = new FeatureInputTypeDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["name"] = this.name; | |
if (this.attributes) { | |
data["attributes"] = {}; | |
for (let key in this.attributes) { | |
if (this.attributes.hasOwnProperty(key)) | |
data["attributes"][key] = this.attributes[key]; | |
} | |
} | |
data["validator"] = this.validator ? this.validator.toJSON() : <any>undefined; | |
data["itemSource"] = this.itemSource ? this.itemSource.toJSON() : <any>undefined; | |
return data; | |
} | |
} | |
export interface IFeatureInputTypeDto { | |
name: string; | |
attributes: { [key: string] : any; }; | |
validator: IValueValidator; | |
itemSource: LocalizableComboboxItemSourceDto; | |
} | |
export class IValueValidator implements IIValueValidator { | |
name: string; | |
attributes: { [key: string] : any; }; | |
constructor(data?: IIValueValidator) { | |
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"]; | |
if (data["attributes"]) { | |
this.attributes = {}; | |
for (let key in data["attributes"]) { | |
if (data["attributes"].hasOwnProperty(key)) | |
this.attributes[key] = data["attributes"][key]; | |
} | |
} | |
} | |
} | |
static fromJS(data: any): IValueValidator { | |
let result = new IValueValidator(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["name"] = this.name; | |
if (this.attributes) { | |
data["attributes"] = {}; | |
for (let key in this.attributes) { | |
if (this.attributes.hasOwnProperty(key)) | |
data["attributes"][key] = this.attributes[key]; | |
} | |
} | |
return data; | |
} | |
} | |
export interface IIValueValidator { | |
name: string; | |
attributes: { [key: string] : any; }; | |
} | |
export class LocalizableComboboxItemSourceDto implements ILocalizableComboboxItemSourceDto { | |
items: LocalizableComboboxItemDto[]; | |
constructor(data?: ILocalizableComboboxItemSourceDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
if (data["items"] && data["items"].constructor === Array) { | |
this.items = []; | |
for (let item of data["items"]) | |
this.items.push(LocalizableComboboxItemDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): LocalizableComboboxItemSourceDto { | |
let result = new LocalizableComboboxItemSourceDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
if (this.items && this.items.constructor === Array) { | |
data["items"] = []; | |
for (let item of this.items) | |
data["items"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface ILocalizableComboboxItemSourceDto { | |
items: LocalizableComboboxItemDto[]; | |
} | |
export class LocalizableComboboxItemDto implements ILocalizableComboboxItemDto { | |
value: string; | |
displayText: string; | |
constructor(data?: ILocalizableComboboxItemDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.value = data["value"]; | |
this.displayText = data["displayText"]; | |
} | |
} | |
static fromJS(data: any): LocalizableComboboxItemDto { | |
let result = new LocalizableComboboxItemDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["value"] = this.value; | |
data["displayText"] = this.displayText; | |
return data; | |
} | |
} | |
export interface ILocalizableComboboxItemDto { | |
value: string; | |
displayText: string; | |
} | |
export class CreateOrUpdateEditionDto implements ICreateOrUpdateEditionDto { | |
edition: EditionEditDto = new EditionEditDto(); | |
featureValues: NameValueDto[] = []; | |
constructor(data?: ICreateOrUpdateEditionDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.edition = data["edition"] ? EditionEditDto.fromJS(data["edition"]) : new EditionEditDto(); | |
if (data["featureValues"] && data["featureValues"].constructor === Array) { | |
this.featureValues = []; | |
for (let item of data["featureValues"]) | |
this.featureValues.push(NameValueDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): CreateOrUpdateEditionDto { | |
let result = new CreateOrUpdateEditionDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["edition"] = this.edition ? this.edition.toJSON() : <any>undefined; | |
if (this.featureValues && this.featureValues.constructor === Array) { | |
data["featureValues"] = []; | |
for (let item of this.featureValues) | |
data["featureValues"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface ICreateOrUpdateEditionDto { | |
edition: EditionEditDto; | |
featureValues: NameValueDto[]; | |
} | |
export class CreateFriendshipRequestInput implements ICreateFriendshipRequestInput { | |
userId: number; | |
tenantId: number; | |
constructor(data?: ICreateFriendshipRequestInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.userId = data["userId"]; | |
this.tenantId = data["tenantId"]; | |
} | |
} | |
static fromJS(data: any): CreateFriendshipRequestInput { | |
let result = new CreateFriendshipRequestInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["userId"] = this.userId; | |
data["tenantId"] = this.tenantId; | |
return data; | |
} | |
} | |
export interface ICreateFriendshipRequestInput { | |
userId: number; | |
tenantId: number; | |
} | |
export class CreateFriendshipRequestByUserNameInput implements ICreateFriendshipRequestByUserNameInput { | |
tenancyName: string; | |
userName: string; | |
constructor(data?: ICreateFriendshipRequestByUserNameInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.tenancyName = data["tenancyName"]; | |
this.userName = data["userName"]; | |
} | |
} | |
static fromJS(data: any): CreateFriendshipRequestByUserNameInput { | |
let result = new CreateFriendshipRequestByUserNameInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["tenancyName"] = this.tenancyName; | |
data["userName"] = this.userName; | |
return data; | |
} | |
} | |
export interface ICreateFriendshipRequestByUserNameInput { | |
tenancyName: string; | |
userName: string; | |
} | |
export class BlockUserInput implements IBlockUserInput { | |
userId: number; | |
tenantId: number; | |
constructor(data?: IBlockUserInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.userId = data["userId"]; | |
this.tenantId = data["tenantId"]; | |
} | |
} | |
static fromJS(data: any): BlockUserInput { | |
let result = new BlockUserInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["userId"] = this.userId; | |
data["tenantId"] = this.tenantId; | |
return data; | |
} | |
} | |
export interface IBlockUserInput { | |
userId: number; | |
tenantId: number; | |
} | |
export class UnblockUserInput implements IUnblockUserInput { | |
userId: number; | |
tenantId: number; | |
constructor(data?: IUnblockUserInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.userId = data["userId"]; | |
this.tenantId = data["tenantId"]; | |
} | |
} | |
static fromJS(data: any): UnblockUserInput { | |
let result = new UnblockUserInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["userId"] = this.userId; | |
data["tenantId"] = this.tenantId; | |
return data; | |
} | |
} | |
export interface IUnblockUserInput { | |
userId: number; | |
tenantId: number; | |
} | |
export class AcceptFriendshipRequestInput implements IAcceptFriendshipRequestInput { | |
userId: number; | |
tenantId: number; | |
constructor(data?: IAcceptFriendshipRequestInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.userId = data["userId"]; | |
this.tenantId = data["tenantId"]; | |
} | |
} | |
static fromJS(data: any): AcceptFriendshipRequestInput { | |
let result = new AcceptFriendshipRequestInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["userId"] = this.userId; | |
data["tenantId"] = this.tenantId; | |
return data; | |
} | |
} | |
export interface IAcceptFriendshipRequestInput { | |
userId: number; | |
tenantId: number; | |
} | |
export class HostDashboardData implements IHostDashboardData { | |
newTenantsCount: number; | |
newSubscriptionAmount: number; | |
dashboardPlaceholder1: number; | |
dashboardPlaceholder2: number; | |
incomeStatistics: IncomeStastistic[]; | |
editionStatistics: TenantEdition[]; | |
expiringTenants: ExpiringTenant[]; | |
recentTenants: RecentTenant[]; | |
maxExpiringTenantsShownCount: number; | |
maxRecentTenantsShownCount: number; | |
subscriptionEndAlertDayCount: number; | |
recentTenantsDayCount: number; | |
subscriptionEndDateStart: moment.Moment; | |
subscriptionEndDateEnd: moment.Moment; | |
tenantCreationStartDate: moment.Moment; | |
constructor(data?: IHostDashboardData) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.newTenantsCount = data["newTenantsCount"]; | |
this.newSubscriptionAmount = data["newSubscriptionAmount"]; | |
this.dashboardPlaceholder1 = data["dashboardPlaceholder1"]; | |
this.dashboardPlaceholder2 = data["dashboardPlaceholder2"]; | |
if (data["incomeStatistics"] && data["incomeStatistics"].constructor === Array) { | |
this.incomeStatistics = []; | |
for (let item of data["incomeStatistics"]) | |
this.incomeStatistics.push(IncomeStastistic.fromJS(item)); | |
} | |
if (data["editionStatistics"] && data["editionStatistics"].constructor === Array) { | |
this.editionStatistics = []; | |
for (let item of data["editionStatistics"]) | |
this.editionStatistics.push(TenantEdition.fromJS(item)); | |
} | |
if (data["expiringTenants"] && data["expiringTenants"].constructor === Array) { | |
this.expiringTenants = []; | |
for (let item of data["expiringTenants"]) | |
this.expiringTenants.push(ExpiringTenant.fromJS(item)); | |
} | |
if (data["recentTenants"] && data["recentTenants"].constructor === Array) { | |
this.recentTenants = []; | |
for (let item of data["recentTenants"]) | |
this.recentTenants.push(RecentTenant.fromJS(item)); | |
} | |
this.maxExpiringTenantsShownCount = data["maxExpiringTenantsShownCount"]; | |
this.maxRecentTenantsShownCount = data["maxRecentTenantsShownCount"]; | |
this.subscriptionEndAlertDayCount = data["subscriptionEndAlertDayCount"]; | |
this.recentTenantsDayCount = data["recentTenantsDayCount"]; | |
this.subscriptionEndDateStart = data["subscriptionEndDateStart"] ? moment(data["subscriptionEndDateStart"].toString()) : <any>undefined; | |
this.subscriptionEndDateEnd = data["subscriptionEndDateEnd"] ? moment(data["subscriptionEndDateEnd"].toString()) : <any>undefined; | |
this.tenantCreationStartDate = data["tenantCreationStartDate"] ? moment(data["tenantCreationStartDate"].toString()) : <any>undefined; | |
} | |
} | |
static fromJS(data: any): HostDashboardData { | |
let result = new HostDashboardData(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["newTenantsCount"] = this.newTenantsCount; | |
data["newSubscriptionAmount"] = this.newSubscriptionAmount; | |
data["dashboardPlaceholder1"] = this.dashboardPlaceholder1; | |
data["dashboardPlaceholder2"] = this.dashboardPlaceholder2; | |
if (this.incomeStatistics && this.incomeStatistics.constructor === Array) { | |
data["incomeStatistics"] = []; | |
for (let item of this.incomeStatistics) | |
data["incomeStatistics"].push(item.toJSON()); | |
} | |
if (this.editionStatistics && this.editionStatistics.constructor === Array) { | |
data["editionStatistics"] = []; | |
for (let item of this.editionStatistics) | |
data["editionStatistics"].push(item.toJSON()); | |
} | |
if (this.expiringTenants && this.expiringTenants.constructor === Array) { | |
data["expiringTenants"] = []; | |
for (let item of this.expiringTenants) | |
data["expiringTenants"].push(item.toJSON()); | |
} | |
if (this.recentTenants && this.recentTenants.constructor === Array) { | |
data["recentTenants"] = []; | |
for (let item of this.recentTenants) | |
data["recentTenants"].push(item.toJSON()); | |
} | |
data["maxExpiringTenantsShownCount"] = this.maxExpiringTenantsShownCount; | |
data["maxRecentTenantsShownCount"] = this.maxRecentTenantsShownCount; | |
data["subscriptionEndAlertDayCount"] = this.subscriptionEndAlertDayCount; | |
data["recentTenantsDayCount"] = this.recentTenantsDayCount; | |
data["subscriptionEndDateStart"] = this.subscriptionEndDateStart ? this.subscriptionEndDateStart.toISOString() : <any>undefined; | |
data["subscriptionEndDateEnd"] = this.subscriptionEndDateEnd ? this.subscriptionEndDateEnd.toISOString() : <any>undefined; | |
data["tenantCreationStartDate"] = this.tenantCreationStartDate ? this.tenantCreationStartDate.toISOString() : <any>undefined; | |
return data; | |
} | |
} | |
export interface IHostDashboardData { | |
newTenantsCount: number; | |
newSubscriptionAmount: number; | |
dashboardPlaceholder1: number; | |
dashboardPlaceholder2: number; | |
incomeStatistics: IncomeStastistic[]; | |
editionStatistics: TenantEdition[]; | |
expiringTenants: ExpiringTenant[]; | |
recentTenants: RecentTenant[]; | |
maxExpiringTenantsShownCount: number; | |
maxRecentTenantsShownCount: number; | |
subscriptionEndAlertDayCount: number; | |
recentTenantsDayCount: number; | |
subscriptionEndDateStart: moment.Moment; | |
subscriptionEndDateEnd: moment.Moment; | |
tenantCreationStartDate: moment.Moment; | |
} | |
export class IncomeStastistic implements IIncomeStastistic { | |
label: string; | |
date: moment.Moment; | |
amount: number; | |
constructor(data?: IIncomeStastistic) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.label = data["label"]; | |
this.date = data["date"] ? moment(data["date"].toString()) : <any>undefined; | |
this.amount = data["amount"]; | |
} | |
} | |
static fromJS(data: any): IncomeStastistic { | |
let result = new IncomeStastistic(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["label"] = this.label; | |
data["date"] = this.date ? this.date.toISOString() : <any>undefined; | |
data["amount"] = this.amount; | |
return data; | |
} | |
} | |
export interface IIncomeStastistic { | |
label: string; | |
date: moment.Moment; | |
amount: number; | |
} | |
export class TenantEdition implements ITenantEdition { | |
label: string; | |
value: number; | |
constructor(data?: ITenantEdition) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.label = data["label"]; | |
this.value = data["value"]; | |
} | |
} | |
static fromJS(data: any): TenantEdition { | |
let result = new TenantEdition(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["label"] = this.label; | |
data["value"] = this.value; | |
return data; | |
} | |
} | |
export interface ITenantEdition { | |
label: string; | |
value: number; | |
} | |
export class ExpiringTenant implements IExpiringTenant { | |
tenantName: string; | |
remainingDayCount: number; | |
constructor(data?: IExpiringTenant) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.tenantName = data["tenantName"]; | |
this.remainingDayCount = data["remainingDayCount"]; | |
} | |
} | |
static fromJS(data: any): ExpiringTenant { | |
let result = new ExpiringTenant(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["tenantName"] = this.tenantName; | |
data["remainingDayCount"] = this.remainingDayCount; | |
return data; | |
} | |
} | |
export interface IExpiringTenant { | |
tenantName: string; | |
remainingDayCount: number; | |
} | |
export class RecentTenant implements IRecentTenant { | |
id: number; | |
name: string; | |
creationTime: moment.Moment; | |
constructor(data?: IRecentTenant) { | |
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"]; | |
this.creationTime = data["creationTime"] ? moment(data["creationTime"].toString()) : <any>undefined; | |
} | |
} | |
static fromJS(data: any): RecentTenant { | |
let result = new RecentTenant(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["id"] = this.id; | |
data["name"] = this.name; | |
data["creationTime"] = this.creationTime ? this.creationTime.toISOString() : <any>undefined; | |
return data; | |
} | |
} | |
export interface IRecentTenant { | |
id: number; | |
name: string; | |
creationTime: moment.Moment; | |
} | |
export class GetIncomeStatisticsDataOutput implements IGetIncomeStatisticsDataOutput { | |
incomeStatistics: IncomeStastistic[]; | |
constructor(data?: IGetIncomeStatisticsDataOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
if (data["incomeStatistics"] && data["incomeStatistics"].constructor === Array) { | |
this.incomeStatistics = []; | |
for (let item of data["incomeStatistics"]) | |
this.incomeStatistics.push(IncomeStastistic.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): GetIncomeStatisticsDataOutput { | |
let result = new GetIncomeStatisticsDataOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
if (this.incomeStatistics && this.incomeStatistics.constructor === Array) { | |
data["incomeStatistics"] = []; | |
for (let item of this.incomeStatistics) | |
data["incomeStatistics"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IGetIncomeStatisticsDataOutput { | |
incomeStatistics: IncomeStastistic[]; | |
} | |
export class GetEditionTenantStatisticsOutput implements IGetEditionTenantStatisticsOutput { | |
editionStatistics: TenantEdition[]; | |
constructor(data?: IGetEditionTenantStatisticsOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
if (data["editionStatistics"] && data["editionStatistics"].constructor === Array) { | |
this.editionStatistics = []; | |
for (let item of data["editionStatistics"]) | |
this.editionStatistics.push(TenantEdition.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): GetEditionTenantStatisticsOutput { | |
let result = new GetEditionTenantStatisticsOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
if (this.editionStatistics && this.editionStatistics.constructor === Array) { | |
data["editionStatistics"] = []; | |
for (let item of this.editionStatistics) | |
data["editionStatistics"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IGetEditionTenantStatisticsOutput { | |
editionStatistics: TenantEdition[]; | |
} | |
export class HostSettingsEditDto implements IHostSettingsEditDto { | |
general: GeneralSettingsEditDto = new GeneralSettingsEditDto(); | |
userManagement: HostUserManagementSettingsEditDto = new HostUserManagementSettingsEditDto(); | |
email: EmailSettingsEditDto = new EmailSettingsEditDto(); | |
tenantManagement: TenantManagementSettingsEditDto = new TenantManagementSettingsEditDto(); | |
security: SecuritySettingsEditDto = new SecuritySettingsEditDto(); | |
billing: HostBillingSettingsEditDto; | |
constructor(data?: IHostSettingsEditDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.general = data["general"] ? GeneralSettingsEditDto.fromJS(data["general"]) : new GeneralSettingsEditDto(); | |
this.userManagement = data["userManagement"] ? HostUserManagementSettingsEditDto.fromJS(data["userManagement"]) : new HostUserManagementSettingsEditDto(); | |
this.email = data["email"] ? EmailSettingsEditDto.fromJS(data["email"]) : new EmailSettingsEditDto(); | |
this.tenantManagement = data["tenantManagement"] ? TenantManagementSettingsEditDto.fromJS(data["tenantManagement"]) : new TenantManagementSettingsEditDto(); | |
this.security = data["security"] ? SecuritySettingsEditDto.fromJS(data["security"]) : new SecuritySettingsEditDto(); | |
this.billing = data["billing"] ? HostBillingSettingsEditDto.fromJS(data["billing"]) : <any>undefined; | |
} | |
} | |
static fromJS(data: any): HostSettingsEditDto { | |
let result = new HostSettingsEditDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["general"] = this.general ? this.general.toJSON() : <any>undefined; | |
data["userManagement"] = this.userManagement ? this.userManagement.toJSON() : <any>undefined; | |
data["email"] = this.email ? this.email.toJSON() : <any>undefined; | |
data["tenantManagement"] = this.tenantManagement ? this.tenantManagement.toJSON() : <any>undefined; | |
data["security"] = this.security ? this.security.toJSON() : <any>undefined; | |
data["billing"] = this.billing ? this.billing.toJSON() : <any>undefined; | |
return data; | |
} | |
} | |
export interface IHostSettingsEditDto { | |
general: GeneralSettingsEditDto; | |
userManagement: HostUserManagementSettingsEditDto; | |
email: EmailSettingsEditDto; | |
tenantManagement: TenantManagementSettingsEditDto; | |
security: SecuritySettingsEditDto; | |
billing: HostBillingSettingsEditDto; | |
} | |
export class GeneralSettingsEditDto implements IGeneralSettingsEditDto { | |
timezone: string; | |
timezoneForComparison: string; | |
constructor(data?: IGeneralSettingsEditDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.timezone = data["timezone"]; | |
this.timezoneForComparison = data["timezoneForComparison"]; | |
} | |
} | |
static fromJS(data: any): GeneralSettingsEditDto { | |
let result = new GeneralSettingsEditDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["timezone"] = this.timezone; | |
data["timezoneForComparison"] = this.timezoneForComparison; | |
return data; | |
} | |
} | |
export interface IGeneralSettingsEditDto { | |
timezone: string; | |
timezoneForComparison: string; | |
} | |
export class HostUserManagementSettingsEditDto implements IHostUserManagementSettingsEditDto { | |
isEmailConfirmationRequiredForLogin: boolean; | |
smsVerificationEnabled: boolean; | |
constructor(data?: IHostUserManagementSettingsEditDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.isEmailConfirmationRequiredForLogin = data["isEmailConfirmationRequiredForLogin"]; | |
this.smsVerificationEnabled = data["smsVerificationEnabled"]; | |
} | |
} | |
static fromJS(data: any): HostUserManagementSettingsEditDto { | |
let result = new HostUserManagementSettingsEditDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["isEmailConfirmationRequiredForLogin"] = this.isEmailConfirmationRequiredForLogin; | |
data["smsVerificationEnabled"] = this.smsVerificationEnabled; | |
return data; | |
} | |
} | |
export interface IHostUserManagementSettingsEditDto { | |
isEmailConfirmationRequiredForLogin: boolean; | |
smsVerificationEnabled: boolean; | |
} | |
export class EmailSettingsEditDto implements IEmailSettingsEditDto { | |
defaultFromAddress: string; | |
defaultFromDisplayName: string; | |
smtpHost: string; | |
smtpPort: number; | |
smtpUserName: string; | |
smtpPassword: string; | |
smtpDomain: string; | |
smtpEnableSsl: boolean; | |
smtpUseDefaultCredentials: boolean; | |
constructor(data?: IEmailSettingsEditDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.defaultFromAddress = data["defaultFromAddress"]; | |
this.defaultFromDisplayName = data["defaultFromDisplayName"]; | |
this.smtpHost = data["smtpHost"]; | |
this.smtpPort = data["smtpPort"]; | |
this.smtpUserName = data["smtpUserName"]; | |
this.smtpPassword = data["smtpPassword"]; | |
this.smtpDomain = data["smtpDomain"]; | |
this.smtpEnableSsl = data["smtpEnableSsl"]; | |
this.smtpUseDefaultCredentials = data["smtpUseDefaultCredentials"]; | |
} | |
} | |
static fromJS(data: any): EmailSettingsEditDto { | |
let result = new EmailSettingsEditDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["defaultFromAddress"] = this.defaultFromAddress; | |
data["defaultFromDisplayName"] = this.defaultFromDisplayName; | |
data["smtpHost"] = this.smtpHost; | |
data["smtpPort"] = this.smtpPort; | |
data["smtpUserName"] = this.smtpUserName; | |
data["smtpPassword"] = this.smtpPassword; | |
data["smtpDomain"] = this.smtpDomain; | |
data["smtpEnableSsl"] = this.smtpEnableSsl; | |
data["smtpUseDefaultCredentials"] = this.smtpUseDefaultCredentials; | |
return data; | |
} | |
} | |
export interface IEmailSettingsEditDto { | |
defaultFromAddress: string; | |
defaultFromDisplayName: string; | |
smtpHost: string; | |
smtpPort: number; | |
smtpUserName: string; | |
smtpPassword: string; | |
smtpDomain: string; | |
smtpEnableSsl: boolean; | |
smtpUseDefaultCredentials: boolean; | |
} | |
export class TenantManagementSettingsEditDto implements ITenantManagementSettingsEditDto { | |
allowSelfRegistration: boolean; | |
isNewRegisteredTenantActiveByDefault: boolean; | |
useCaptchaOnRegistration: boolean; | |
defaultEditionId: number; | |
constructor(data?: ITenantManagementSettingsEditDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.allowSelfRegistration = data["allowSelfRegistration"]; | |
this.isNewRegisteredTenantActiveByDefault = data["isNewRegisteredTenantActiveByDefault"]; | |
this.useCaptchaOnRegistration = data["useCaptchaOnRegistration"]; | |
this.defaultEditionId = data["defaultEditionId"]; | |
} | |
} | |
static fromJS(data: any): TenantManagementSettingsEditDto { | |
let result = new TenantManagementSettingsEditDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["allowSelfRegistration"] = this.allowSelfRegistration; | |
data["isNewRegisteredTenantActiveByDefault"] = this.isNewRegisteredTenantActiveByDefault; | |
data["useCaptchaOnRegistration"] = this.useCaptchaOnRegistration; | |
data["defaultEditionId"] = this.defaultEditionId; | |
return data; | |
} | |
} | |
export interface ITenantManagementSettingsEditDto { | |
allowSelfRegistration: boolean; | |
isNewRegisteredTenantActiveByDefault: boolean; | |
useCaptchaOnRegistration: boolean; | |
defaultEditionId: number; | |
} | |
export class SecuritySettingsEditDto implements ISecuritySettingsEditDto { | |
useDefaultPasswordComplexitySettings: boolean; | |
passwordComplexity: PasswordComplexitySetting; | |
defaultPasswordComplexity: PasswordComplexitySetting; | |
userLockOut: UserLockOutSettingsEditDto; | |
twoFactorLogin: TwoFactorLoginSettingsEditDto; | |
constructor(data?: ISecuritySettingsEditDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.useDefaultPasswordComplexitySettings = data["useDefaultPasswordComplexitySettings"]; | |
this.passwordComplexity = data["passwordComplexity"] ? PasswordComplexitySetting.fromJS(data["passwordComplexity"]) : <any>undefined; | |
this.defaultPasswordComplexity = data["defaultPasswordComplexity"] ? PasswordComplexitySetting.fromJS(data["defaultPasswordComplexity"]) : <any>undefined; | |
this.userLockOut = data["userLockOut"] ? UserLockOutSettingsEditDto.fromJS(data["userLockOut"]) : <any>undefined; | |
this.twoFactorLogin = data["twoFactorLogin"] ? TwoFactorLoginSettingsEditDto.fromJS(data["twoFactorLogin"]) : <any>undefined; | |
} | |
} | |
static fromJS(data: any): SecuritySettingsEditDto { | |
let result = new SecuritySettingsEditDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["useDefaultPasswordComplexitySettings"] = this.useDefaultPasswordComplexitySettings; | |
data["passwordComplexity"] = this.passwordComplexity ? this.passwordComplexity.toJSON() : <any>undefined; | |
data["defaultPasswordComplexity"] = this.defaultPasswordComplexity ? this.defaultPasswordComplexity.toJSON() : <any>undefined; | |
data["userLockOut"] = this.userLockOut ? this.userLockOut.toJSON() : <any>undefined; | |
data["twoFactorLogin"] = this.twoFactorLogin ? this.twoFactorLogin.toJSON() : <any>undefined; | |
return data; | |
} | |
} | |
export interface ISecuritySettingsEditDto { | |
useDefaultPasswordComplexitySettings: boolean; | |
passwordComplexity: PasswordComplexitySetting; | |
defaultPasswordComplexity: PasswordComplexitySetting; | |
userLockOut: UserLockOutSettingsEditDto; | |
twoFactorLogin: TwoFactorLoginSettingsEditDto; | |
} | |
export class HostBillingSettingsEditDto implements IHostBillingSettingsEditDto { | |
legalName: string; | |
address: string; | |
constructor(data?: IHostBillingSettingsEditDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.legalName = data["legalName"]; | |
this.address = data["address"]; | |
} | |
} | |
static fromJS(data: any): HostBillingSettingsEditDto { | |
let result = new HostBillingSettingsEditDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["legalName"] = this.legalName; | |
data["address"] = this.address; | |
return data; | |
} | |
} | |
export interface IHostBillingSettingsEditDto { | |
legalName: string; | |
address: string; | |
} | |
export class PasswordComplexitySetting implements IPasswordComplexitySetting { | |
requireDigit: boolean; | |
requireLowercase: boolean; | |
requireNonAlphanumeric: boolean; | |
requireUppercase: boolean; | |
requiredLength: number; | |
constructor(data?: IPasswordComplexitySetting) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.requireDigit = data["requireDigit"]; | |
this.requireLowercase = data["requireLowercase"]; | |
this.requireNonAlphanumeric = data["requireNonAlphanumeric"]; | |
this.requireUppercase = data["requireUppercase"]; | |
this.requiredLength = data["requiredLength"]; | |
} | |
} | |
static fromJS(data: any): PasswordComplexitySetting { | |
let result = new PasswordComplexitySetting(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["requireDigit"] = this.requireDigit; | |
data["requireLowercase"] = this.requireLowercase; | |
data["requireNonAlphanumeric"] = this.requireNonAlphanumeric; | |
data["requireUppercase"] = this.requireUppercase; | |
data["requiredLength"] = this.requiredLength; | |
return data; | |
} | |
} | |
export interface IPasswordComplexitySetting { | |
requireDigit: boolean; | |
requireLowercase: boolean; | |
requireNonAlphanumeric: boolean; | |
requireUppercase: boolean; | |
requiredLength: number; | |
} | |
export class UserLockOutSettingsEditDto implements IUserLockOutSettingsEditDto { | |
isEnabled: boolean; | |
maxFailedAccessAttemptsBeforeLockout: number; | |
defaultAccountLockoutSeconds: number; | |
constructor(data?: IUserLockOutSettingsEditDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.isEnabled = data["isEnabled"]; | |
this.maxFailedAccessAttemptsBeforeLockout = data["maxFailedAccessAttemptsBeforeLockout"]; | |
this.defaultAccountLockoutSeconds = data["defaultAccountLockoutSeconds"]; | |
} | |
} | |
static fromJS(data: any): UserLockOutSettingsEditDto { | |
let result = new UserLockOutSettingsEditDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["isEnabled"] = this.isEnabled; | |
data["maxFailedAccessAttemptsBeforeLockout"] = this.maxFailedAccessAttemptsBeforeLockout; | |
data["defaultAccountLockoutSeconds"] = this.defaultAccountLockoutSeconds; | |
return data; | |
} | |
} | |
export interface IUserLockOutSettingsEditDto { | |
isEnabled: boolean; | |
maxFailedAccessAttemptsBeforeLockout: number; | |
defaultAccountLockoutSeconds: number; | |
} | |
export class TwoFactorLoginSettingsEditDto implements ITwoFactorLoginSettingsEditDto { | |
isEnabledForApplication: boolean; | |
isEnabled: boolean; | |
isEmailProviderEnabled: boolean; | |
isSmsProviderEnabled: boolean; | |
isRememberBrowserEnabled: boolean; | |
isGoogleAuthenticatorEnabled: boolean; | |
constructor(data?: ITwoFactorLoginSettingsEditDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.isEnabledForApplication = data["isEnabledForApplication"]; | |
this.isEnabled = data["isEnabled"]; | |
this.isEmailProviderEnabled = data["isEmailProviderEnabled"]; | |
this.isSmsProviderEnabled = data["isSmsProviderEnabled"]; | |
this.isRememberBrowserEnabled = data["isRememberBrowserEnabled"]; | |
this.isGoogleAuthenticatorEnabled = data["isGoogleAuthenticatorEnabled"]; | |
} | |
} | |
static fromJS(data: any): TwoFactorLoginSettingsEditDto { | |
let result = new TwoFactorLoginSettingsEditDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["isEnabledForApplication"] = this.isEnabledForApplication; | |
data["isEnabled"] = this.isEnabled; | |
data["isEmailProviderEnabled"] = this.isEmailProviderEnabled; | |
data["isSmsProviderEnabled"] = this.isSmsProviderEnabled; | |
data["isRememberBrowserEnabled"] = this.isRememberBrowserEnabled; | |
data["isGoogleAuthenticatorEnabled"] = this.isGoogleAuthenticatorEnabled; | |
return data; | |
} | |
} | |
export interface ITwoFactorLoginSettingsEditDto { | |
isEnabledForApplication: boolean; | |
isEnabled: boolean; | |
isEmailProviderEnabled: boolean; | |
isSmsProviderEnabled: boolean; | |
isRememberBrowserEnabled: boolean; | |
isGoogleAuthenticatorEnabled: boolean; | |
} | |
export class SendTestEmailInput implements ISendTestEmailInput { | |
emailAddress: string; | |
constructor(data?: ISendTestEmailInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.emailAddress = data["emailAddress"]; | |
} | |
} | |
static fromJS(data: any): SendTestEmailInput { | |
let result = new SendTestEmailInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["emailAddress"] = this.emailAddress; | |
return data; | |
} | |
} | |
export interface ISendTestEmailInput { | |
emailAddress: string; | |
} | |
export class InstallDto implements IInstallDto { | |
connectionString: string; | |
adminPassword: string; | |
webSiteUrl: string; | |
serverUrl: string; | |
defaultLanguage: string; | |
smtpSettings: EmailSettingsEditDto; | |
billInfo: HostBillingSettingsEditDto; | |
constructor(data?: IInstallDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.connectionString = data["connectionString"]; | |
this.adminPassword = data["adminPassword"]; | |
this.webSiteUrl = data["webSiteUrl"]; | |
this.serverUrl = data["serverUrl"]; | |
this.defaultLanguage = data["defaultLanguage"]; | |
this.smtpSettings = data["smtpSettings"] ? EmailSettingsEditDto.fromJS(data["smtpSettings"]) : <any>undefined; | |
this.billInfo = data["billInfo"] ? HostBillingSettingsEditDto.fromJS(data["billInfo"]) : <any>undefined; | |
} | |
} | |
static fromJS(data: any): InstallDto { | |
let result = new InstallDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["connectionString"] = this.connectionString; | |
data["adminPassword"] = this.adminPassword; | |
data["webSiteUrl"] = this.webSiteUrl; | |
data["serverUrl"] = this.serverUrl; | |
data["defaultLanguage"] = this.defaultLanguage; | |
data["smtpSettings"] = this.smtpSettings ? this.smtpSettings.toJSON() : <any>undefined; | |
data["billInfo"] = this.billInfo ? this.billInfo.toJSON() : <any>undefined; | |
return data; | |
} | |
} | |
export interface IInstallDto { | |
connectionString: string; | |
adminPassword: string; | |
webSiteUrl: string; | |
serverUrl: string; | |
defaultLanguage: string; | |
smtpSettings: EmailSettingsEditDto; | |
billInfo: HostBillingSettingsEditDto; | |
} | |
export class AppSettingsJsonDto implements IAppSettingsJsonDto { | |
connectionString: string; | |
webSiteUrl: string; | |
serverSiteUrl: string; | |
languages: NameValue[]; | |
constructor(data?: IAppSettingsJsonDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.connectionString = data["connectionString"]; | |
this.webSiteUrl = data["webSiteUrl"]; | |
this.serverSiteUrl = data["serverSiteUrl"]; | |
if (data["languages"] && data["languages"].constructor === Array) { | |
this.languages = []; | |
for (let item of data["languages"]) | |
this.languages.push(NameValue.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): AppSettingsJsonDto { | |
let result = new AppSettingsJsonDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["connectionString"] = this.connectionString; | |
data["webSiteUrl"] = this.webSiteUrl; | |
data["serverSiteUrl"] = this.serverSiteUrl; | |
if (this.languages && this.languages.constructor === Array) { | |
data["languages"] = []; | |
for (let item of this.languages) | |
data["languages"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IAppSettingsJsonDto { | |
connectionString: string; | |
webSiteUrl: string; | |
serverSiteUrl: string; | |
languages: NameValue[]; | |
} | |
export class NameValue implements INameValue { | |
name: string; | |
value: string; | |
constructor(data?: INameValue) { | |
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"]; | |
this.value = data["value"]; | |
} | |
} | |
static fromJS(data: any): NameValue { | |
let result = new NameValue(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["name"] = this.name; | |
data["value"] = this.value; | |
return data; | |
} | |
} | |
export interface INameValue { | |
name: string; | |
value: string; | |
} | |
export class CheckDatabaseOutput implements ICheckDatabaseOutput { | |
isDatabaseExist: boolean; | |
constructor(data?: ICheckDatabaseOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.isDatabaseExist = data["isDatabaseExist"]; | |
} | |
} | |
static fromJS(data: any): CheckDatabaseOutput { | |
let result = new CheckDatabaseOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["isDatabaseExist"] = this.isDatabaseExist; | |
return data; | |
} | |
} | |
export interface ICheckDatabaseOutput { | |
isDatabaseExist: boolean; | |
} | |
export class InvoiceDto implements IInvoiceDto { | |
amount: number; | |
editionDisplayName: string; | |
invoiceNo: string; | |
invoiceDate: moment.Moment; | |
tenantLegalName: string; | |
tenantAddress: string[]; | |
tenantTaxNo: string; | |
hostLegalName: string; | |
hostAddress: string[]; | |
constructor(data?: IInvoiceDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.amount = data["amount"]; | |
this.editionDisplayName = data["editionDisplayName"]; | |
this.invoiceNo = data["invoiceNo"]; | |
this.invoiceDate = data["invoiceDate"] ? moment(data["invoiceDate"].toString()) : <any>undefined; | |
this.tenantLegalName = data["tenantLegalName"]; | |
if (data["tenantAddress"] && data["tenantAddress"].constructor === Array) { | |
this.tenantAddress = []; | |
for (let item of data["tenantAddress"]) | |
this.tenantAddress.push(item); | |
} | |
this.tenantTaxNo = data["tenantTaxNo"]; | |
this.hostLegalName = data["hostLegalName"]; | |
if (data["hostAddress"] && data["hostAddress"].constructor === Array) { | |
this.hostAddress = []; | |
for (let item of data["hostAddress"]) | |
this.hostAddress.push(item); | |
} | |
} | |
} | |
static fromJS(data: any): InvoiceDto { | |
let result = new InvoiceDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["amount"] = this.amount; | |
data["editionDisplayName"] = this.editionDisplayName; | |
data["invoiceNo"] = this.invoiceNo; | |
data["invoiceDate"] = this.invoiceDate ? this.invoiceDate.toISOString() : <any>undefined; | |
data["tenantLegalName"] = this.tenantLegalName; | |
if (this.tenantAddress && this.tenantAddress.constructor === Array) { | |
data["tenantAddress"] = []; | |
for (let item of this.tenantAddress) | |
data["tenantAddress"].push(item); | |
} | |
data["tenantTaxNo"] = this.tenantTaxNo; | |
data["hostLegalName"] = this.hostLegalName; | |
if (this.hostAddress && this.hostAddress.constructor === Array) { | |
data["hostAddress"] = []; | |
for (let item of this.hostAddress) | |
data["hostAddress"].push(item); | |
} | |
return data; | |
} | |
} | |
export interface IInvoiceDto { | |
amount: number; | |
editionDisplayName: string; | |
invoiceNo: string; | |
invoiceDate: moment.Moment; | |
tenantLegalName: string; | |
tenantAddress: string[]; | |
tenantTaxNo: string; | |
hostLegalName: string; | |
hostAddress: string[]; | |
} | |
export class CreateInvoiceDto implements ICreateInvoiceDto { | |
subscriptionPaymentId: number; | |
constructor(data?: ICreateInvoiceDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.subscriptionPaymentId = data["subscriptionPaymentId"]; | |
} | |
} | |
static fromJS(data: any): CreateInvoiceDto { | |
let result = new CreateInvoiceDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["subscriptionPaymentId"] = this.subscriptionPaymentId; | |
return data; | |
} | |
} | |
export interface ICreateInvoiceDto { | |
subscriptionPaymentId: number; | |
} | |
export class GetLanguagesOutput implements IGetLanguagesOutput { | |
defaultLanguageName: string; | |
items: ApplicationLanguageListDto[]; | |
constructor(data?: IGetLanguagesOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.defaultLanguageName = data["defaultLanguageName"]; | |
if (data["items"] && data["items"].constructor === Array) { | |
this.items = []; | |
for (let item of data["items"]) | |
this.items.push(ApplicationLanguageListDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): GetLanguagesOutput { | |
let result = new GetLanguagesOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["defaultLanguageName"] = this.defaultLanguageName; | |
if (this.items && this.items.constructor === Array) { | |
data["items"] = []; | |
for (let item of this.items) | |
data["items"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IGetLanguagesOutput { | |
defaultLanguageName: string; | |
items: ApplicationLanguageListDto[]; | |
} | |
export class ApplicationLanguageListDto implements IApplicationLanguageListDto { | |
tenantId: number; | |
name: string; | |
displayName: string; | |
icon: string; | |
isDisabled: boolean; | |
isDeleted: boolean; | |
deleterUserId: number; | |
deletionTime: moment.Moment; | |
lastModificationTime: moment.Moment; | |
lastModifierUserId: number; | |
creationTime: moment.Moment; | |
creatorUserId: number; | |
id: number; | |
constructor(data?: IApplicationLanguageListDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.tenantId = data["tenantId"]; | |
this.name = data["name"]; | |
this.displayName = data["displayName"]; | |
this.icon = data["icon"]; | |
this.isDisabled = data["isDisabled"]; | |
this.isDeleted = data["isDeleted"]; | |
this.deleterUserId = data["deleterUserId"]; | |
this.deletionTime = data["deletionTime"] ? moment(data["deletionTime"].toString()) : <any>undefined; | |
this.lastModificationTime = data["lastModificationTime"] ? moment(data["lastModificationTime"].toString()) : <any>undefined; | |
this.lastModifierUserId = data["lastModifierUserId"]; | |
this.creationTime = data["creationTime"] ? moment(data["creationTime"].toString()) : <any>undefined; | |
this.creatorUserId = data["creatorUserId"]; | |
this.id = data["id"]; | |
} | |
} | |
static fromJS(data: any): ApplicationLanguageListDto { | |
let result = new ApplicationLanguageListDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["tenantId"] = this.tenantId; | |
data["name"] = this.name; | |
data["displayName"] = this.displayName; | |
data["icon"] = this.icon; | |
data["isDisabled"] = this.isDisabled; | |
data["isDeleted"] = this.isDeleted; | |
data["deleterUserId"] = this.deleterUserId; | |
data["deletionTime"] = this.deletionTime ? this.deletionTime.toISOString() : <any>undefined; | |
data["lastModificationTime"] = this.lastModificationTime ? this.lastModificationTime.toISOString() : <any>undefined; | |
data["lastModifierUserId"] = this.lastModifierUserId; | |
data["creationTime"] = this.creationTime ? this.creationTime.toISOString() : <any>undefined; | |
data["creatorUserId"] = this.creatorUserId; | |
data["id"] = this.id; | |
return data; | |
} | |
} | |
export interface IApplicationLanguageListDto { | |
tenantId: number; | |
name: string; | |
displayName: string; | |
icon: string; | |
isDisabled: boolean; | |
isDeleted: boolean; | |
deleterUserId: number; | |
deletionTime: moment.Moment; | |
lastModificationTime: moment.Moment; | |
lastModifierUserId: number; | |
creationTime: moment.Moment; | |
creatorUserId: number; | |
id: number; | |
} | |
export class GetLanguageForEditOutput implements IGetLanguageForEditOutput { | |
language: ApplicationLanguageEditDto; | |
languageNames: ComboboxItemDto[]; | |
flags: ComboboxItemDto[]; | |
constructor(data?: IGetLanguageForEditOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.language = data["language"] ? ApplicationLanguageEditDto.fromJS(data["language"]) : <any>undefined; | |
if (data["languageNames"] && data["languageNames"].constructor === Array) { | |
this.languageNames = []; | |
for (let item of data["languageNames"]) | |
this.languageNames.push(ComboboxItemDto.fromJS(item)); | |
} | |
if (data["flags"] && data["flags"].constructor === Array) { | |
this.flags = []; | |
for (let item of data["flags"]) | |
this.flags.push(ComboboxItemDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): GetLanguageForEditOutput { | |
let result = new GetLanguageForEditOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["language"] = this.language ? this.language.toJSON() : <any>undefined; | |
if (this.languageNames && this.languageNames.constructor === Array) { | |
data["languageNames"] = []; | |
for (let item of this.languageNames) | |
data["languageNames"].push(item.toJSON()); | |
} | |
if (this.flags && this.flags.constructor === Array) { | |
data["flags"] = []; | |
for (let item of this.flags) | |
data["flags"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IGetLanguageForEditOutput { | |
language: ApplicationLanguageEditDto; | |
languageNames: ComboboxItemDto[]; | |
flags: ComboboxItemDto[]; | |
} | |
export class ApplicationLanguageEditDto implements IApplicationLanguageEditDto { | |
id: number; | |
name: string; | |
icon: string; | |
isEnabled: boolean; | |
constructor(data?: IApplicationLanguageEditDto) { | |
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"]; | |
this.icon = data["icon"]; | |
this.isEnabled = data["isEnabled"]; | |
} | |
} | |
static fromJS(data: any): ApplicationLanguageEditDto { | |
let result = new ApplicationLanguageEditDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["id"] = this.id; | |
data["name"] = this.name; | |
data["icon"] = this.icon; | |
data["isEnabled"] = this.isEnabled; | |
return data; | |
} | |
} | |
export interface IApplicationLanguageEditDto { | |
id: number; | |
name: string; | |
icon: string; | |
isEnabled: boolean; | |
} | |
export class ComboboxItemDto implements IComboboxItemDto { | |
value: string; | |
displayText: string; | |
isSelected: boolean; | |
constructor(data?: IComboboxItemDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.value = data["value"]; | |
this.displayText = data["displayText"]; | |
this.isSelected = data["isSelected"]; | |
} | |
} | |
static fromJS(data: any): ComboboxItemDto { | |
let result = new ComboboxItemDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["value"] = this.value; | |
data["displayText"] = this.displayText; | |
data["isSelected"] = this.isSelected; | |
return data; | |
} | |
} | |
export interface IComboboxItemDto { | |
value: string; | |
displayText: string; | |
isSelected: boolean; | |
} | |
export class CreateOrUpdateLanguageInput implements ICreateOrUpdateLanguageInput { | |
language: ApplicationLanguageEditDto = new ApplicationLanguageEditDto(); | |
constructor(data?: ICreateOrUpdateLanguageInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.language = data["language"] ? ApplicationLanguageEditDto.fromJS(data["language"]) : new ApplicationLanguageEditDto(); | |
} | |
} | |
static fromJS(data: any): CreateOrUpdateLanguageInput { | |
let result = new CreateOrUpdateLanguageInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["language"] = this.language ? this.language.toJSON() : <any>undefined; | |
return data; | |
} | |
} | |
export interface ICreateOrUpdateLanguageInput { | |
language: ApplicationLanguageEditDto; | |
} | |
export class SetDefaultLanguageInput implements ISetDefaultLanguageInput { | |
name: string; | |
constructor(data?: ISetDefaultLanguageInput) { | |
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): SetDefaultLanguageInput { | |
let result = new SetDefaultLanguageInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["name"] = this.name; | |
return data; | |
} | |
} | |
export interface ISetDefaultLanguageInput { | |
name: string; | |
} | |
export class PagedResultDto`1OfOfLanguageTextListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null implements IPagedResultDto`1OfOfLanguageTextListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
totalCount: number; | |
items: LanguageTextListDto[]; | |
constructor(data?: IPagedResultDto`1OfOfLanguageTextListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.totalCount = data["totalCount"]; | |
if (data["items"] && data["items"].constructor === Array) { | |
this.items = []; | |
for (let item of data["items"]) | |
this.items.push(LanguageTextListDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): PagedResultDto`1OfOfLanguageTextListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
let result = new PagedResultDto`1OfOfLanguageTextListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["totalCount"] = this.totalCount; | |
if (this.items && this.items.constructor === Array) { | |
data["items"] = []; | |
for (let item of this.items) | |
data["items"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IPagedResultDto`1OfOfLanguageTextListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
totalCount: number; | |
items: LanguageTextListDto[]; | |
} | |
export class LanguageTextListDto implements ILanguageTextListDto { | |
key: string; | |
baseValue: string; | |
targetValue: string; | |
constructor(data?: ILanguageTextListDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.key = data["key"]; | |
this.baseValue = data["baseValue"]; | |
this.targetValue = data["targetValue"]; | |
} | |
} | |
static fromJS(data: any): LanguageTextListDto { | |
let result = new LanguageTextListDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["key"] = this.key; | |
data["baseValue"] = this.baseValue; | |
data["targetValue"] = this.targetValue; | |
return data; | |
} | |
} | |
export interface ILanguageTextListDto { | |
key: string; | |
baseValue: string; | |
targetValue: string; | |
} | |
export class UpdateLanguageTextInput implements IUpdateLanguageTextInput { | |
languageName: string; | |
sourceName: string; | |
key: string; | |
value: string; | |
constructor(data?: IUpdateLanguageTextInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.languageName = data["languageName"]; | |
this.sourceName = data["sourceName"]; | |
this.key = data["key"]; | |
this.value = data["value"]; | |
} | |
} | |
static fromJS(data: any): UpdateLanguageTextInput { | |
let result = new UpdateLanguageTextInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["languageName"] = this.languageName; | |
data["sourceName"] = this.sourceName; | |
data["key"] = this.key; | |
data["value"] = this.value; | |
return data; | |
} | |
} | |
export interface IUpdateLanguageTextInput { | |
languageName: string; | |
sourceName: string; | |
key: string; | |
value: string; | |
} | |
export class CategoryOutputWithLanguage implements ICategoryOutputWithLanguage { | |
categoryId: string; | |
categoryName: string; | |
categoryDescription: string; | |
children: CategoryOutputWithLanguage[]; | |
constructor(data?: ICategoryOutputWithLanguage) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.categoryId = data["categoryId"]; | |
this.categoryName = data["categoryName"]; | |
this.categoryDescription = data["categoryDescription"]; | |
if (data["children"] && data["children"].constructor === Array) { | |
this.children = []; | |
for (let item of data["children"]) | |
this.children.push(CategoryOutputWithLanguage.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): CategoryOutputWithLanguage { | |
let result = new CategoryOutputWithLanguage(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["categoryId"] = this.categoryId; | |
data["categoryName"] = this.categoryName; | |
data["categoryDescription"] = this.categoryDescription; | |
if (this.children && this.children.constructor === Array) { | |
data["children"] = []; | |
for (let item of this.children) | |
data["children"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface ICategoryOutputWithLanguage { | |
categoryId: string; | |
categoryName: string; | |
categoryDescription: string; | |
children: CategoryOutputWithLanguage[]; | |
} | |
export class CategoryInput implements ICategoryInput { | |
categoryName: TranslationInput = new TranslationInput(); | |
categoryDescription: TranslationInput; | |
parentId: string; | |
buildingStatusList: ChosenBuildingInput[] = []; | |
constructor(data?: ICategoryInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.categoryName = data["categoryName"] ? TranslationInput.fromJS(data["categoryName"]) : new TranslationInput(); | |
this.categoryDescription = data["categoryDescription"] ? TranslationInput.fromJS(data["categoryDescription"]) : <any>undefined; | |
this.parentId = data["parentId"]; | |
if (data["buildingStatusList"] && data["buildingStatusList"].constructor === Array) { | |
this.buildingStatusList = []; | |
for (let item of data["buildingStatusList"]) | |
this.buildingStatusList.push(ChosenBuildingInput.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): CategoryInput { | |
let result = new CategoryInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["categoryName"] = this.categoryName ? this.categoryName.toJSON() : <any>undefined; | |
data["categoryDescription"] = this.categoryDescription ? this.categoryDescription.toJSON() : <any>undefined; | |
data["parentId"] = this.parentId; | |
if (this.buildingStatusList && this.buildingStatusList.constructor === Array) { | |
data["buildingStatusList"] = []; | |
for (let item of this.buildingStatusList) | |
data["buildingStatusList"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface ICategoryInput { | |
categoryName: TranslationInput; | |
categoryDescription: TranslationInput; | |
parentId: string; | |
buildingStatusList: ChosenBuildingInput[]; | |
} | |
export class TranslationInput implements ITranslationInput { | |
eng: string; | |
vie: string; | |
khm: string; | |
tha: string; | |
lao: string; | |
chi: string; | |
kor: string; | |
jpn: string; | |
constructor(data?: ITranslationInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.eng = data["eng"]; | |
this.vie = data["vie"]; | |
this.khm = data["khm"]; | |
this.tha = data["tha"]; | |
this.lao = data["lao"]; | |
this.chi = data["chi"]; | |
this.kor = data["kor"]; | |
this.jpn = data["jpn"]; | |
} | |
} | |
static fromJS(data: any): TranslationInput { | |
let result = new TranslationInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["eng"] = this.eng; | |
data["vie"] = this.vie; | |
data["khm"] = this.khm; | |
data["tha"] = this.tha; | |
data["lao"] = this.lao; | |
data["chi"] = this.chi; | |
data["kor"] = this.kor; | |
data["jpn"] = this.jpn; | |
return data; | |
} | |
} | |
export interface ITranslationInput { | |
eng: string; | |
vie: string; | |
khm: string; | |
tha: string; | |
lao: string; | |
chi: string; | |
kor: string; | |
jpn: string; | |
} | |
export class ChosenBuildingInput implements IChosenBuildingInput { | |
buildingId: string; | |
isActive: boolean; | |
constructor(data?: IChosenBuildingInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.buildingId = data["buildingId"]; | |
this.isActive = data["isActive"]; | |
} | |
} | |
static fromJS(data: any): ChosenBuildingInput { | |
let result = new ChosenBuildingInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["buildingId"] = this.buildingId; | |
data["isActive"] = this.isActive; | |
return data; | |
} | |
} | |
export interface IChosenBuildingInput { | |
buildingId: string; | |
isActive: boolean; | |
} | |
export class CategoryOutput implements ICategoryOutput { | |
categoryId: string; | |
categoryName: TranslationOutput; | |
categoryDescription: TranslationOutput; | |
children: CategoryOutput[]; | |
constructor(data?: ICategoryOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.categoryId = data["categoryId"]; | |
this.categoryName = data["categoryName"] ? TranslationOutput.fromJS(data["categoryName"]) : <any>undefined; | |
this.categoryDescription = data["categoryDescription"] ? TranslationOutput.fromJS(data["categoryDescription"]) : <any>undefined; | |
if (data["children"] && data["children"].constructor === Array) { | |
this.children = []; | |
for (let item of data["children"]) | |
this.children.push(CategoryOutput.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): CategoryOutput { | |
let result = new CategoryOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["categoryId"] = this.categoryId; | |
data["categoryName"] = this.categoryName ? this.categoryName.toJSON() : <any>undefined; | |
data["categoryDescription"] = this.categoryDescription ? this.categoryDescription.toJSON() : <any>undefined; | |
if (this.children && this.children.constructor === Array) { | |
data["children"] = []; | |
for (let item of this.children) | |
data["children"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface ICategoryOutput { | |
categoryId: string; | |
categoryName: TranslationOutput; | |
categoryDescription: TranslationOutput; | |
children: CategoryOutput[]; | |
} | |
export class TranslationOutput implements ITranslationOutput { | |
eng: string; | |
vie: string; | |
khm: string; | |
tha: string; | |
lao: string; | |
chi: string; | |
kor: string; | |
jpn: string; | |
constructor(data?: ITranslationOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.eng = data["eng"]; | |
this.vie = data["vie"]; | |
this.khm = data["khm"]; | |
this.tha = data["tha"]; | |
this.lao = data["lao"]; | |
this.chi = data["chi"]; | |
this.kor = data["kor"]; | |
this.jpn = data["jpn"]; | |
} | |
} | |
static fromJS(data: any): TranslationOutput { | |
let result = new TranslationOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["eng"] = this.eng; | |
data["vie"] = this.vie; | |
data["khm"] = this.khm; | |
data["tha"] = this.tha; | |
data["lao"] = this.lao; | |
data["chi"] = this.chi; | |
data["kor"] = this.kor; | |
data["jpn"] = this.jpn; | |
return data; | |
} | |
} | |
export interface ITranslationOutput { | |
eng: string; | |
vie: string; | |
khm: string; | |
tha: string; | |
lao: string; | |
chi: string; | |
kor: string; | |
jpn: string; | |
} | |
export class DocumentOutputWithLanguage implements IDocumentOutputWithLanguage { | |
documentId: string; | |
documentPath: string; | |
documentName: string; | |
description: string; | |
optionalUrl: string; | |
createdDate: moment.Moment; | |
lastRevisionDate: moment.Moment; | |
publicDate: moment.Moment; | |
countViews: number; | |
constructor(data?: IDocumentOutputWithLanguage) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.documentId = data["documentId"]; | |
this.documentPath = data["documentPath"]; | |
this.documentName = data["documentName"]; | |
this.description = data["description"]; | |
this.optionalUrl = data["optionalUrl"]; | |
this.createdDate = data["createdDate"] ? moment(data["createdDate"].toString()) : <any>undefined; | |
this.lastRevisionDate = data["lastRevisionDate"] ? moment(data["lastRevisionDate"].toString()) : <any>undefined; | |
this.publicDate = data["publicDate"] ? moment(data["publicDate"].toString()) : <any>undefined; | |
this.countViews = data["countViews"]; | |
} | |
} | |
static fromJS(data: any): DocumentOutputWithLanguage { | |
let result = new DocumentOutputWithLanguage(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["documentId"] = this.documentId; | |
data["documentPath"] = this.documentPath; | |
data["documentName"] = this.documentName; | |
data["description"] = this.description; | |
data["optionalUrl"] = this.optionalUrl; | |
data["createdDate"] = this.createdDate ? this.createdDate.toISOString() : <any>undefined; | |
data["lastRevisionDate"] = this.lastRevisionDate ? this.lastRevisionDate.toISOString() : <any>undefined; | |
data["publicDate"] = this.publicDate ? this.publicDate.toISOString() : <any>undefined; | |
data["countViews"] = this.countViews; | |
return data; | |
} | |
} | |
export interface IDocumentOutputWithLanguage { | |
documentId: string; | |
documentPath: string; | |
documentName: string; | |
description: string; | |
optionalUrl: string; | |
createdDate: moment.Moment; | |
lastRevisionDate: moment.Moment; | |
publicDate: moment.Moment; | |
countViews: number; | |
} | |
export class DocumentInput implements IDocumentInput { | |
documentName: TranslationInput; | |
description: TranslationInput; | |
categories: string[]; | |
accessedRoles: string[]; | |
publicDate: moment.Moment; | |
optionalUrl: string; | |
constructor(data?: IDocumentInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.documentName = data["documentName"] ? TranslationInput.fromJS(data["documentName"]) : <any>undefined; | |
this.description = data["description"] ? TranslationInput.fromJS(data["description"]) : <any>undefined; | |
if (data["categories"] && data["categories"].constructor === Array) { | |
this.categories = []; | |
for (let item of data["categories"]) | |
this.categories.push(item); | |
} | |
if (data["accessedRoles"] && data["accessedRoles"].constructor === Array) { | |
this.accessedRoles = []; | |
for (let item of data["accessedRoles"]) | |
this.accessedRoles.push(item); | |
} | |
this.publicDate = data["publicDate"] ? moment(data["publicDate"].toString()) : <any>undefined; | |
this.optionalUrl = data["optionalUrl"]; | |
} | |
} | |
static fromJS(data: any): DocumentInput { | |
let result = new DocumentInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["documentName"] = this.documentName ? this.documentName.toJSON() : <any>undefined; | |
data["description"] = this.description ? this.description.toJSON() : <any>undefined; | |
if (this.categories && this.categories.constructor === Array) { | |
data["categories"] = []; | |
for (let item of this.categories) | |
data["categories"].push(item); | |
} | |
if (this.accessedRoles && this.accessedRoles.constructor === Array) { | |
data["accessedRoles"] = []; | |
for (let item of this.accessedRoles) | |
data["accessedRoles"].push(item); | |
} | |
data["publicDate"] = this.publicDate ? this.publicDate.toISOString() : <any>undefined; | |
data["optionalUrl"] = this.optionalUrl; | |
return data; | |
} | |
} | |
export interface IDocumentInput { | |
documentName: TranslationInput; | |
description: TranslationInput; | |
categories: string[]; | |
accessedRoles: string[]; | |
publicDate: moment.Moment; | |
optionalUrl: string; | |
} | |
export class DocumentOutput implements IDocumentOutput { | |
documentId: string; | |
documentPath: string; | |
documentName: TranslationOutput; | |
description: TranslationOutput; | |
optionalUrl: string; | |
createdDate: moment.Moment; | |
lastRevisionDate: moment.Moment; | |
publicDate: moment.Moment; | |
countViews: number; | |
constructor(data?: IDocumentOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.documentId = data["documentId"]; | |
this.documentPath = data["documentPath"]; | |
this.documentName = data["documentName"] ? TranslationOutput.fromJS(data["documentName"]) : <any>undefined; | |
this.description = data["description"] ? TranslationOutput.fromJS(data["description"]) : <any>undefined; | |
this.optionalUrl = data["optionalUrl"]; | |
this.createdDate = data["createdDate"] ? moment(data["createdDate"].toString()) : <any>undefined; | |
this.lastRevisionDate = data["lastRevisionDate"] ? moment(data["lastRevisionDate"].toString()) : <any>undefined; | |
this.publicDate = data["publicDate"] ? moment(data["publicDate"].toString()) : <any>undefined; | |
this.countViews = data["countViews"]; | |
} | |
} | |
static fromJS(data: any): DocumentOutput { | |
let result = new DocumentOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["documentId"] = this.documentId; | |
data["documentPath"] = this.documentPath; | |
data["documentName"] = this.documentName ? this.documentName.toJSON() : <any>undefined; | |
data["description"] = this.description ? this.description.toJSON() : <any>undefined; | |
data["optionalUrl"] = this.optionalUrl; | |
data["createdDate"] = this.createdDate ? this.createdDate.toISOString() : <any>undefined; | |
data["lastRevisionDate"] = this.lastRevisionDate ? this.lastRevisionDate.toISOString() : <any>undefined; | |
data["publicDate"] = this.publicDate ? this.publicDate.toISOString() : <any>undefined; | |
data["countViews"] = this.countViews; | |
return data; | |
} | |
} | |
export interface IDocumentOutput { | |
documentId: string; | |
documentPath: string; | |
documentName: TranslationOutput; | |
description: TranslationOutput; | |
optionalUrl: string; | |
createdDate: moment.Moment; | |
lastRevisionDate: moment.Moment; | |
publicDate: moment.Moment; | |
countViews: number; | |
} | |
export class GetNotificationsOutput implements IGetNotificationsOutput { | |
unreadCount: number; | |
totalCount: number; | |
items: UserNotification[]; | |
constructor(data?: IGetNotificationsOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.unreadCount = data["unreadCount"]; | |
this.totalCount = data["totalCount"]; | |
if (data["items"] && data["items"].constructor === Array) { | |
this.items = []; | |
for (let item of data["items"]) | |
this.items.push(UserNotification.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): GetNotificationsOutput { | |
let result = new GetNotificationsOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["unreadCount"] = this.unreadCount; | |
data["totalCount"] = this.totalCount; | |
if (this.items && this.items.constructor === Array) { | |
data["items"] = []; | |
for (let item of this.items) | |
data["items"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IGetNotificationsOutput { | |
unreadCount: number; | |
totalCount: number; | |
items: UserNotification[]; | |
} | |
export class UserNotification implements IUserNotification { | |
tenantId: number; | |
userId: number; | |
state: UserNotificationState; | |
notification: TenantNotification; | |
id: string; | |
constructor(data?: IUserNotification) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.tenantId = data["tenantId"]; | |
this.userId = data["userId"]; | |
this.state = data["state"]; | |
this.notification = data["notification"] ? TenantNotification.fromJS(data["notification"]) : <any>undefined; | |
this.id = data["id"]; | |
} | |
} | |
static fromJS(data: any): UserNotification { | |
let result = new UserNotification(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["tenantId"] = this.tenantId; | |
data["userId"] = this.userId; | |
data["state"] = this.state; | |
data["notification"] = this.notification ? this.notification.toJSON() : <any>undefined; | |
data["id"] = this.id; | |
return data; | |
} | |
} | |
export interface IUserNotification { | |
tenantId: number; | |
userId: number; | |
state: UserNotificationState; | |
notification: TenantNotification; | |
id: string; | |
} | |
export class TenantNotification implements ITenantNotification { | |
tenantId: number; | |
notificationName: string; | |
data: NotificationData; | |
entityType: string; | |
entityTypeName: string; | |
entityId: any; | |
severity: TenantNotificationSeverity; | |
creationTime: moment.Moment; | |
id: string; | |
constructor(data?: ITenantNotification) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.tenantId = data["tenantId"]; | |
this.notificationName = data["notificationName"]; | |
this.data = data["data"] ? NotificationData.fromJS(data["data"]) : <any>undefined; | |
this.entityType = data["entityType"]; | |
this.entityTypeName = data["entityTypeName"]; | |
if (data["entityId"]) { | |
this.entityId = {}; | |
for (let key in data["entityId"]) { | |
if (data["entityId"].hasOwnProperty(key)) | |
this.entityId[key] = data["entityId"][key]; | |
} | |
} | |
this.severity = data["severity"]; | |
this.creationTime = data["creationTime"] ? moment(data["creationTime"].toString()) : <any>undefined; | |
this.id = data["id"]; | |
} | |
} | |
static fromJS(data: any): TenantNotification { | |
let result = new TenantNotification(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["tenantId"] = this.tenantId; | |
data["notificationName"] = this.notificationName; | |
data["data"] = this.data ? this.data.toJSON() : <any>undefined; | |
data["entityType"] = this.entityType; | |
data["entityTypeName"] = this.entityTypeName; | |
if (this.entityId) { | |
data["entityId"] = {}; | |
for (let key in this.entityId) { | |
if (this.entityId.hasOwnProperty(key)) | |
data["entityId"][key] = this.entityId[key]; | |
} | |
} | |
data["severity"] = this.severity; | |
data["creationTime"] = this.creationTime ? this.creationTime.toISOString() : <any>undefined; | |
data["id"] = this.id; | |
return data; | |
} | |
} | |
export interface ITenantNotification { | |
tenantId: number; | |
notificationName: string; | |
data: NotificationData; | |
entityType: string; | |
entityTypeName: string; | |
entityId: any; | |
severity: TenantNotificationSeverity; | |
creationTime: moment.Moment; | |
id: string; | |
} | |
export class NotificationData implements INotificationData { | |
type: string; | |
properties: { [key: string] : any; }; | |
constructor(data?: INotificationData) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.type = data["type"]; | |
if (data["properties"]) { | |
this.properties = {}; | |
for (let key in data["properties"]) { | |
if (data["properties"].hasOwnProperty(key)) | |
this.properties[key] = data["properties"][key]; | |
} | |
} | |
} | |
} | |
static fromJS(data: any): NotificationData { | |
let result = new NotificationData(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["type"] = this.type; | |
if (this.properties) { | |
data["properties"] = {}; | |
for (let key in this.properties) { | |
if (this.properties.hasOwnProperty(key)) | |
data["properties"][key] = this.properties[key]; | |
} | |
} | |
return data; | |
} | |
} | |
export interface INotificationData { | |
type: string; | |
properties: { [key: string] : any; }; | |
} | |
export class EntityDto`1OfOfGuidAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e implements IEntityDto`1OfOfGuidAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e { | |
id: string; | |
constructor(data?: IEntityDto`1OfOfGuidAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e) { | |
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"]; | |
} | |
} | |
static fromJS(data: any): EntityDto`1OfOfGuidAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e { | |
let result = new EntityDto`1OfOfGuidAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["id"] = this.id; | |
return data; | |
} | |
} | |
export interface IEntityDto`1OfOfGuidAndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e { | |
id: string; | |
} | |
export class GetNotificationSettingsOutput implements IGetNotificationSettingsOutput { | |
receiveNotifications: boolean; | |
notifications: NotificationSubscriptionWithDisplayNameDto[]; | |
constructor(data?: IGetNotificationSettingsOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.receiveNotifications = data["receiveNotifications"]; | |
if (data["notifications"] && data["notifications"].constructor === Array) { | |
this.notifications = []; | |
for (let item of data["notifications"]) | |
this.notifications.push(NotificationSubscriptionWithDisplayNameDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): GetNotificationSettingsOutput { | |
let result = new GetNotificationSettingsOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["receiveNotifications"] = this.receiveNotifications; | |
if (this.notifications && this.notifications.constructor === Array) { | |
data["notifications"] = []; | |
for (let item of this.notifications) | |
data["notifications"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IGetNotificationSettingsOutput { | |
receiveNotifications: boolean; | |
notifications: NotificationSubscriptionWithDisplayNameDto[]; | |
} | |
export class NotificationSubscriptionWithDisplayNameDto implements INotificationSubscriptionWithDisplayNameDto { | |
displayName: string; | |
description: string; | |
name: string; | |
isSubscribed: boolean; | |
constructor(data?: INotificationSubscriptionWithDisplayNameDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.displayName = data["displayName"]; | |
this.description = data["description"]; | |
this.name = data["name"]; | |
this.isSubscribed = data["isSubscribed"]; | |
} | |
} | |
static fromJS(data: any): NotificationSubscriptionWithDisplayNameDto { | |
let result = new NotificationSubscriptionWithDisplayNameDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["displayName"] = this.displayName; | |
data["description"] = this.description; | |
data["name"] = this.name; | |
data["isSubscribed"] = this.isSubscribed; | |
return data; | |
} | |
} | |
export interface INotificationSubscriptionWithDisplayNameDto { | |
displayName: string; | |
description: string; | |
name: string; | |
isSubscribed: boolean; | |
} | |
export class UpdateNotificationSettingsInput implements IUpdateNotificationSettingsInput { | |
receiveNotifications: boolean; | |
notifications: NotificationSubscriptionDto[]; | |
constructor(data?: IUpdateNotificationSettingsInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.receiveNotifications = data["receiveNotifications"]; | |
if (data["notifications"] && data["notifications"].constructor === Array) { | |
this.notifications = []; | |
for (let item of data["notifications"]) | |
this.notifications.push(NotificationSubscriptionDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): UpdateNotificationSettingsInput { | |
let result = new UpdateNotificationSettingsInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["receiveNotifications"] = this.receiveNotifications; | |
if (this.notifications && this.notifications.constructor === Array) { | |
data["notifications"] = []; | |
for (let item of this.notifications) | |
data["notifications"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IUpdateNotificationSettingsInput { | |
receiveNotifications: boolean; | |
notifications: NotificationSubscriptionDto[]; | |
} | |
export class NotificationSubscriptionDto implements INotificationSubscriptionDto { | |
name: string; | |
isSubscribed: boolean; | |
constructor(data?: INotificationSubscriptionDto) { | |
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"]; | |
this.isSubscribed = data["isSubscribed"]; | |
} | |
} | |
static fromJS(data: any): NotificationSubscriptionDto { | |
let result = new NotificationSubscriptionDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["name"] = this.name; | |
data["isSubscribed"] = this.isSubscribed; | |
return data; | |
} | |
} | |
export interface INotificationSubscriptionDto { | |
name: string; | |
isSubscribed: boolean; | |
} | |
export class ListResultDto`1OfOfOrganizationUnitDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null implements IListResultDto`1OfOfOrganizationUnitDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
items: OrganizationUnitDto[]; | |
constructor(data?: IListResultDto`1OfOfOrganizationUnitDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
if (data["items"] && data["items"].constructor === Array) { | |
this.items = []; | |
for (let item of data["items"]) | |
this.items.push(OrganizationUnitDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): ListResultDto`1OfOfOrganizationUnitDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
let result = new ListResultDto`1OfOfOrganizationUnitDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
if (this.items && this.items.constructor === Array) { | |
data["items"] = []; | |
for (let item of this.items) | |
data["items"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IListResultDto`1OfOfOrganizationUnitDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
items: OrganizationUnitDto[]; | |
} | |
export class OrganizationUnitDto implements IOrganizationUnitDto { | |
parentId: number; | |
code: string; | |
displayName: string; | |
memberCount: number; | |
lastModificationTime: moment.Moment; | |
lastModifierUserId: number; | |
creationTime: moment.Moment; | |
creatorUserId: number; | |
id: number; | |
constructor(data?: IOrganizationUnitDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.parentId = data["parentId"]; | |
this.code = data["code"]; | |
this.displayName = data["displayName"]; | |
this.memberCount = data["memberCount"]; | |
this.lastModificationTime = data["lastModificationTime"] ? moment(data["lastModificationTime"].toString()) : <any>undefined; | |
this.lastModifierUserId = data["lastModifierUserId"]; | |
this.creationTime = data["creationTime"] ? moment(data["creationTime"].toString()) : <any>undefined; | |
this.creatorUserId = data["creatorUserId"]; | |
this.id = data["id"]; | |
} | |
} | |
static fromJS(data: any): OrganizationUnitDto { | |
let result = new OrganizationUnitDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["parentId"] = this.parentId; | |
data["code"] = this.code; | |
data["displayName"] = this.displayName; | |
data["memberCount"] = this.memberCount; | |
data["lastModificationTime"] = this.lastModificationTime ? this.lastModificationTime.toISOString() : <any>undefined; | |
data["lastModifierUserId"] = this.lastModifierUserId; | |
data["creationTime"] = this.creationTime ? this.creationTime.toISOString() : <any>undefined; | |
data["creatorUserId"] = this.creatorUserId; | |
data["id"] = this.id; | |
return data; | |
} | |
} | |
export interface IOrganizationUnitDto { | |
parentId: number; | |
code: string; | |
displayName: string; | |
memberCount: number; | |
lastModificationTime: moment.Moment; | |
lastModifierUserId: number; | |
creationTime: moment.Moment; | |
creatorUserId: number; | |
id: number; | |
} | |
export class PagedResultDto`1OfOfOrganizationUnitUserListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null implements IPagedResultDto`1OfOfOrganizationUnitUserListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
totalCount: number; | |
items: OrganizationUnitUserListDto[]; | |
constructor(data?: IPagedResultDto`1OfOfOrganizationUnitUserListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.totalCount = data["totalCount"]; | |
if (data["items"] && data["items"].constructor === Array) { | |
this.items = []; | |
for (let item of data["items"]) | |
this.items.push(OrganizationUnitUserListDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): PagedResultDto`1OfOfOrganizationUnitUserListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
let result = new PagedResultDto`1OfOfOrganizationUnitUserListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["totalCount"] = this.totalCount; | |
if (this.items && this.items.constructor === Array) { | |
data["items"] = []; | |
for (let item of this.items) | |
data["items"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IPagedResultDto`1OfOfOrganizationUnitUserListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
totalCount: number; | |
items: OrganizationUnitUserListDto[]; | |
} | |
export class OrganizationUnitUserListDto implements IOrganizationUnitUserListDto { | |
name: string; | |
surname: string; | |
userName: string; | |
emailAddress: string; | |
profilePictureId: string; | |
addedTime: moment.Moment; | |
id: number; | |
constructor(data?: IOrganizationUnitUserListDto) { | |
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"]; | |
this.surname = data["surname"]; | |
this.userName = data["userName"]; | |
this.emailAddress = data["emailAddress"]; | |
this.profilePictureId = data["profilePictureId"]; | |
this.addedTime = data["addedTime"] ? moment(data["addedTime"].toString()) : <any>undefined; | |
this.id = data["id"]; | |
} | |
} | |
static fromJS(data: any): OrganizationUnitUserListDto { | |
let result = new OrganizationUnitUserListDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["name"] = this.name; | |
data["surname"] = this.surname; | |
data["userName"] = this.userName; | |
data["emailAddress"] = this.emailAddress; | |
data["profilePictureId"] = this.profilePictureId; | |
data["addedTime"] = this.addedTime ? this.addedTime.toISOString() : <any>undefined; | |
data["id"] = this.id; | |
return data; | |
} | |
} | |
export interface IOrganizationUnitUserListDto { | |
name: string; | |
surname: string; | |
userName: string; | |
emailAddress: string; | |
profilePictureId: string; | |
addedTime: moment.Moment; | |
id: number; | |
} | |
export class CreateOrganizationUnitInput implements ICreateOrganizationUnitInput { | |
parentId: number; | |
displayName: string; | |
constructor(data?: ICreateOrganizationUnitInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.parentId = data["parentId"]; | |
this.displayName = data["displayName"]; | |
} | |
} | |
static fromJS(data: any): CreateOrganizationUnitInput { | |
let result = new CreateOrganizationUnitInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["parentId"] = this.parentId; | |
data["displayName"] = this.displayName; | |
return data; | |
} | |
} | |
export interface ICreateOrganizationUnitInput { | |
parentId: number; | |
displayName: string; | |
} | |
export class UpdateOrganizationUnitInput implements IUpdateOrganizationUnitInput { | |
id: number; | |
displayName: string; | |
constructor(data?: IUpdateOrganizationUnitInput) { | |
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.displayName = data["displayName"]; | |
} | |
} | |
static fromJS(data: any): UpdateOrganizationUnitInput { | |
let result = new UpdateOrganizationUnitInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["id"] = this.id; | |
data["displayName"] = this.displayName; | |
return data; | |
} | |
} | |
export interface IUpdateOrganizationUnitInput { | |
id: number; | |
displayName: string; | |
} | |
export class MoveOrganizationUnitInput implements IMoveOrganizationUnitInput { | |
id: number; | |
newParentId: number; | |
constructor(data?: IMoveOrganizationUnitInput) { | |
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.newParentId = data["newParentId"]; | |
} | |
} | |
static fromJS(data: any): MoveOrganizationUnitInput { | |
let result = new MoveOrganizationUnitInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["id"] = this.id; | |
data["newParentId"] = this.newParentId; | |
return data; | |
} | |
} | |
export interface IMoveOrganizationUnitInput { | |
id: number; | |
newParentId: number; | |
} | |
export class UsersToOrganizationUnitInput implements IUsersToOrganizationUnitInput { | |
userIds: number[]; | |
organizationUnitId: number; | |
constructor(data?: IUsersToOrganizationUnitInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
if (data["userIds"] && data["userIds"].constructor === Array) { | |
this.userIds = []; | |
for (let item of data["userIds"]) | |
this.userIds.push(item); | |
} | |
this.organizationUnitId = data["organizationUnitId"]; | |
} | |
} | |
static fromJS(data: any): UsersToOrganizationUnitInput { | |
let result = new UsersToOrganizationUnitInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
if (this.userIds && this.userIds.constructor === Array) { | |
data["userIds"] = []; | |
for (let item of this.userIds) | |
data["userIds"].push(item); | |
} | |
data["organizationUnitId"] = this.organizationUnitId; | |
return data; | |
} | |
} | |
export interface IUsersToOrganizationUnitInput { | |
userIds: number[]; | |
organizationUnitId: number; | |
} | |
export class FindOrganizationUnitUsersInput implements IFindOrganizationUnitUsersInput { | |
organizationUnitId: number; | |
maxResultCount: number; | |
skipCount: number; | |
filter: string; | |
constructor(data?: IFindOrganizationUnitUsersInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.organizationUnitId = data["organizationUnitId"]; | |
this.maxResultCount = data["maxResultCount"]; | |
this.skipCount = data["skipCount"]; | |
this.filter = data["filter"]; | |
} | |
} | |
static fromJS(data: any): FindOrganizationUnitUsersInput { | |
let result = new FindOrganizationUnitUsersInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["organizationUnitId"] = this.organizationUnitId; | |
data["maxResultCount"] = this.maxResultCount; | |
data["skipCount"] = this.skipCount; | |
data["filter"] = this.filter; | |
return data; | |
} | |
} | |
export interface IFindOrganizationUnitUsersInput { | |
organizationUnitId: number; | |
maxResultCount: number; | |
skipCount: number; | |
filter: string; | |
} | |
export class PaymentInfoDto implements IPaymentInfoDto { | |
edition: EditionSelectDto; | |
additionalPrice: number; | |
constructor(data?: IPaymentInfoDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.edition = data["edition"] ? EditionSelectDto.fromJS(data["edition"]) : <any>undefined; | |
this.additionalPrice = data["additionalPrice"]; | |
} | |
} | |
static fromJS(data: any): PaymentInfoDto { | |
let result = new PaymentInfoDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["edition"] = this.edition ? this.edition.toJSON() : <any>undefined; | |
data["additionalPrice"] = this.additionalPrice; | |
return data; | |
} | |
} | |
export interface IPaymentInfoDto { | |
edition: EditionSelectDto; | |
additionalPrice: number; | |
} | |
export class EditionSelectDto implements IEditionSelectDto { | |
id: number; | |
name: string; | |
displayName: string; | |
expiringEditionId: number; | |
monthlyPrice: number; | |
annualPrice: number; | |
trialDayCount: number; | |
waitingDayAfterExpire: number; | |
isFree: boolean; | |
additionalData: AdditionalData; | |
constructor(data?: IEditionSelectDto) { | |
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"]; | |
this.displayName = data["displayName"]; | |
this.expiringEditionId = data["expiringEditionId"]; | |
this.monthlyPrice = data["monthlyPrice"]; | |
this.annualPrice = data["annualPrice"]; | |
this.trialDayCount = data["trialDayCount"]; | |
this.waitingDayAfterExpire = data["waitingDayAfterExpire"]; | |
this.isFree = data["isFree"]; | |
this.additionalData = data["additionalData"] ? AdditionalData.fromJS(data["additionalData"]) : <any>undefined; | |
} | |
} | |
static fromJS(data: any): EditionSelectDto { | |
let result = new EditionSelectDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["id"] = this.id; | |
data["name"] = this.name; | |
data["displayName"] = this.displayName; | |
data["expiringEditionId"] = this.expiringEditionId; | |
data["monthlyPrice"] = this.monthlyPrice; | |
data["annualPrice"] = this.annualPrice; | |
data["trialDayCount"] = this.trialDayCount; | |
data["waitingDayAfterExpire"] = this.waitingDayAfterExpire; | |
data["isFree"] = this.isFree; | |
data["additionalData"] = this.additionalData ? this.additionalData.toJSON() : <any>undefined; | |
return data; | |
} | |
} | |
export interface IEditionSelectDto { | |
id: number; | |
name: string; | |
displayName: string; | |
expiringEditionId: number; | |
monthlyPrice: number; | |
annualPrice: number; | |
trialDayCount: number; | |
waitingDayAfterExpire: number; | |
isFree: boolean; | |
additionalData: AdditionalData; | |
} | |
export class CreatePaymentDto implements ICreatePaymentDto { | |
editionId: number; | |
editionPaymentType: CreatePaymentDtoEditionPaymentType; | |
paymentPeriodType: CreatePaymentDtoPaymentPeriodType; | |
subscriptionPaymentGatewayType: CreatePaymentDtoSubscriptionPaymentGatewayType; | |
constructor(data?: ICreatePaymentDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.editionId = data["editionId"]; | |
this.editionPaymentType = data["editionPaymentType"]; | |
this.paymentPeriodType = data["paymentPeriodType"]; | |
this.subscriptionPaymentGatewayType = data["subscriptionPaymentGatewayType"]; | |
} | |
} | |
static fromJS(data: any): CreatePaymentDto { | |
let result = new CreatePaymentDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["editionId"] = this.editionId; | |
data["editionPaymentType"] = this.editionPaymentType; | |
data["paymentPeriodType"] = this.paymentPeriodType; | |
data["subscriptionPaymentGatewayType"] = this.subscriptionPaymentGatewayType; | |
return data; | |
} | |
} | |
export interface ICreatePaymentDto { | |
editionId: number; | |
editionPaymentType: CreatePaymentDtoEditionPaymentType; | |
paymentPeriodType: CreatePaymentDtoPaymentPeriodType; | |
subscriptionPaymentGatewayType: CreatePaymentDtoSubscriptionPaymentGatewayType; | |
} | |
export class ExecutePaymentDto implements IExecutePaymentDto { | |
gateway: ExecutePaymentDtoGateway; | |
editionPaymentType: ExecutePaymentDtoEditionPaymentType; | |
editionId: number; | |
paymentPeriodType: ExecutePaymentDtoPaymentPeriodType; | |
additionalData: { [key: string] : string; }; | |
constructor(data?: IExecutePaymentDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.gateway = data["gateway"]; | |
this.editionPaymentType = data["editionPaymentType"]; | |
this.editionId = data["editionId"]; | |
this.paymentPeriodType = data["paymentPeriodType"]; | |
if (data["additionalData"]) { | |
this.additionalData = {}; | |
for (let key in data["additionalData"]) { | |
if (data["additionalData"].hasOwnProperty(key)) | |
this.additionalData[key] = data["additionalData"][key]; | |
} | |
} | |
} | |
} | |
static fromJS(data: any): ExecutePaymentDto { | |
let result = new ExecutePaymentDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["gateway"] = this.gateway; | |
data["editionPaymentType"] = this.editionPaymentType; | |
data["editionId"] = this.editionId; | |
data["paymentPeriodType"] = this.paymentPeriodType; | |
if (this.additionalData) { | |
data["additionalData"] = {}; | |
for (let key in this.additionalData) { | |
if (this.additionalData.hasOwnProperty(key)) | |
data["additionalData"][key] = this.additionalData[key]; | |
} | |
} | |
return data; | |
} | |
} | |
export interface IExecutePaymentDto { | |
gateway: ExecutePaymentDtoGateway; | |
editionPaymentType: ExecutePaymentDtoEditionPaymentType; | |
editionId: number; | |
paymentPeriodType: ExecutePaymentDtoPaymentPeriodType; | |
additionalData: { [key: string] : string; }; | |
} | |
export class PagedResultDto`1OfOfSubscriptionPaymentListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null implements IPagedResultDto`1OfOfSubscriptionPaymentListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
totalCount: number; | |
items: SubscriptionPaymentListDto[]; | |
constructor(data?: IPagedResultDto`1OfOfSubscriptionPaymentListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.totalCount = data["totalCount"]; | |
if (data["items"] && data["items"].constructor === Array) { | |
this.items = []; | |
for (let item of data["items"]) | |
this.items.push(SubscriptionPaymentListDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): PagedResultDto`1OfOfSubscriptionPaymentListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
let result = new PagedResultDto`1OfOfSubscriptionPaymentListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["totalCount"] = this.totalCount; | |
if (this.items && this.items.constructor === Array) { | |
data["items"] = []; | |
for (let item of this.items) | |
data["items"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IPagedResultDto`1OfOfSubscriptionPaymentListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
totalCount: number; | |
items: SubscriptionPaymentListDto[]; | |
} | |
export class SubscriptionPaymentListDto implements ISubscriptionPaymentListDto { | |
gateway: string; | |
amount: number; | |
editionId: number; | |
dayCount: number; | |
paymentPeriodType: string; | |
paymentId: string; | |
payerId: string; | |
status: string; | |
editionDisplayName: string; | |
tenantId: number; | |
invoiceNo: string; | |
lastModificationTime: moment.Moment; | |
lastModifierUserId: number; | |
creationTime: moment.Moment; | |
creatorUserId: number; | |
id: number; | |
constructor(data?: ISubscriptionPaymentListDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.gateway = data["gateway"]; | |
this.amount = data["amount"]; | |
this.editionId = data["editionId"]; | |
this.dayCount = data["dayCount"]; | |
this.paymentPeriodType = data["paymentPeriodType"]; | |
this.paymentId = data["paymentId"]; | |
this.payerId = data["payerId"]; | |
this.status = data["status"]; | |
this.editionDisplayName = data["editionDisplayName"]; | |
this.tenantId = data["tenantId"]; | |
this.invoiceNo = data["invoiceNo"]; | |
this.lastModificationTime = data["lastModificationTime"] ? moment(data["lastModificationTime"].toString()) : <any>undefined; | |
this.lastModifierUserId = data["lastModifierUserId"]; | |
this.creationTime = data["creationTime"] ? moment(data["creationTime"].toString()) : <any>undefined; | |
this.creatorUserId = data["creatorUserId"]; | |
this.id = data["id"]; | |
} | |
} | |
static fromJS(data: any): SubscriptionPaymentListDto { | |
let result = new SubscriptionPaymentListDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["gateway"] = this.gateway; | |
data["amount"] = this.amount; | |
data["editionId"] = this.editionId; | |
data["dayCount"] = this.dayCount; | |
data["paymentPeriodType"] = this.paymentPeriodType; | |
data["paymentId"] = this.paymentId; | |
data["payerId"] = this.payerId; | |
data["status"] = this.status; | |
data["editionDisplayName"] = this.editionDisplayName; | |
data["tenantId"] = this.tenantId; | |
data["invoiceNo"] = this.invoiceNo; | |
data["lastModificationTime"] = this.lastModificationTime ? this.lastModificationTime.toISOString() : <any>undefined; | |
data["lastModifierUserId"] = this.lastModifierUserId; | |
data["creationTime"] = this.creationTime ? this.creationTime.toISOString() : <any>undefined; | |
data["creatorUserId"] = this.creatorUserId; | |
data["id"] = this.id; | |
return data; | |
} | |
} | |
export interface ISubscriptionPaymentListDto { | |
gateway: string; | |
amount: number; | |
editionId: number; | |
dayCount: number; | |
paymentPeriodType: string; | |
paymentId: string; | |
payerId: string; | |
status: string; | |
editionDisplayName: string; | |
tenantId: number; | |
invoiceNo: string; | |
lastModificationTime: moment.Moment; | |
lastModifierUserId: number; | |
creationTime: moment.Moment; | |
creatorUserId: number; | |
id: number; | |
} | |
export class ListResultDto`1OfOfFlatPermissionWithLevelDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null implements IListResultDto`1OfOfFlatPermissionWithLevelDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
items: FlatPermissionWithLevelDto[]; | |
constructor(data?: IListResultDto`1OfOfFlatPermissionWithLevelDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
if (data["items"] && data["items"].constructor === Array) { | |
this.items = []; | |
for (let item of data["items"]) | |
this.items.push(FlatPermissionWithLevelDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): ListResultDto`1OfOfFlatPermissionWithLevelDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
let result = new ListResultDto`1OfOfFlatPermissionWithLevelDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
if (this.items && this.items.constructor === Array) { | |
data["items"] = []; | |
for (let item of this.items) | |
data["items"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IListResultDto`1OfOfFlatPermissionWithLevelDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
items: FlatPermissionWithLevelDto[]; | |
} | |
export class FlatPermissionWithLevelDto implements IFlatPermissionWithLevelDto { | |
level: number; | |
parentName: string; | |
name: string; | |
displayName: string; | |
description: string; | |
isGrantedByDefault: boolean; | |
constructor(data?: IFlatPermissionWithLevelDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.level = data["level"]; | |
this.parentName = data["parentName"]; | |
this.name = data["name"]; | |
this.displayName = data["displayName"]; | |
this.description = data["description"]; | |
this.isGrantedByDefault = data["isGrantedByDefault"]; | |
} | |
} | |
static fromJS(data: any): FlatPermissionWithLevelDto { | |
let result = new FlatPermissionWithLevelDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["level"] = this.level; | |
data["parentName"] = this.parentName; | |
data["name"] = this.name; | |
data["displayName"] = this.displayName; | |
data["description"] = this.description; | |
data["isGrantedByDefault"] = this.isGrantedByDefault; | |
return data; | |
} | |
} | |
export interface IFlatPermissionWithLevelDto { | |
level: number; | |
parentName: string; | |
name: string; | |
displayName: string; | |
description: string; | |
isGrantedByDefault: boolean; | |
} | |
export class CurrentUserProfileEditDto implements ICurrentUserProfileEditDto { | |
name: string; | |
surname: string; | |
userName: string; | |
emailAddress: string; | |
phoneNumber: string; | |
isPhoneNumberConfirmed: boolean; | |
timezone: string; | |
qrCodeSetupImageUrl: string; | |
isGoogleAuthenticatorEnabled: boolean; | |
constructor(data?: ICurrentUserProfileEditDto) { | |
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"]; | |
this.surname = data["surname"]; | |
this.userName = data["userName"]; | |
this.emailAddress = data["emailAddress"]; | |
this.phoneNumber = data["phoneNumber"]; | |
this.isPhoneNumberConfirmed = data["isPhoneNumberConfirmed"]; | |
this.timezone = data["timezone"]; | |
this.qrCodeSetupImageUrl = data["qrCodeSetupImageUrl"]; | |
this.isGoogleAuthenticatorEnabled = data["isGoogleAuthenticatorEnabled"]; | |
} | |
} | |
static fromJS(data: any): CurrentUserProfileEditDto { | |
let result = new CurrentUserProfileEditDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["name"] = this.name; | |
data["surname"] = this.surname; | |
data["userName"] = this.userName; | |
data["emailAddress"] = this.emailAddress; | |
data["phoneNumber"] = this.phoneNumber; | |
data["isPhoneNumberConfirmed"] = this.isPhoneNumberConfirmed; | |
data["timezone"] = this.timezone; | |
data["qrCodeSetupImageUrl"] = this.qrCodeSetupImageUrl; | |
data["isGoogleAuthenticatorEnabled"] = this.isGoogleAuthenticatorEnabled; | |
return data; | |
} | |
} | |
export interface ICurrentUserProfileEditDto { | |
name: string; | |
surname: string; | |
userName: string; | |
emailAddress: string; | |
phoneNumber: string; | |
isPhoneNumberConfirmed: boolean; | |
timezone: string; | |
qrCodeSetupImageUrl: string; | |
isGoogleAuthenticatorEnabled: boolean; | |
} | |
export class UpdateGoogleAuthenticatorKeyOutput implements IUpdateGoogleAuthenticatorKeyOutput { | |
qrCodeSetupImageUrl: string; | |
constructor(data?: IUpdateGoogleAuthenticatorKeyOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.qrCodeSetupImageUrl = data["qrCodeSetupImageUrl"]; | |
} | |
} | |
static fromJS(data: any): UpdateGoogleAuthenticatorKeyOutput { | |
let result = new UpdateGoogleAuthenticatorKeyOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["qrCodeSetupImageUrl"] = this.qrCodeSetupImageUrl; | |
return data; | |
} | |
} | |
export interface IUpdateGoogleAuthenticatorKeyOutput { | |
qrCodeSetupImageUrl: string; | |
} | |
export class VerifySmsCodeInputDto implements IVerifySmsCodeInputDto { | |
code: string; | |
constructor(data?: IVerifySmsCodeInputDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.code = data["code"]; | |
} | |
} | |
static fromJS(data: any): VerifySmsCodeInputDto { | |
let result = new VerifySmsCodeInputDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["code"] = this.code; | |
return data; | |
} | |
} | |
export interface IVerifySmsCodeInputDto { | |
code: string; | |
} | |
export class ChangePasswordInput implements IChangePasswordInput { | |
currentPassword: string; | |
newPassword: string; | |
constructor(data?: IChangePasswordInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.currentPassword = data["currentPassword"]; | |
this.newPassword = data["newPassword"]; | |
} | |
} | |
static fromJS(data: any): ChangePasswordInput { | |
let result = new ChangePasswordInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["currentPassword"] = this.currentPassword; | |
data["newPassword"] = this.newPassword; | |
return data; | |
} | |
} | |
export interface IChangePasswordInput { | |
currentPassword: string; | |
newPassword: string; | |
} | |
export class UpdateProfilePictureInput implements IUpdateProfilePictureInput { | |
fileName: string; | |
x: number; | |
y: number; | |
width: number; | |
height: number; | |
constructor(data?: IUpdateProfilePictureInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.fileName = data["fileName"]; | |
this.x = data["x"]; | |
this.y = data["y"]; | |
this.width = data["width"]; | |
this.height = data["height"]; | |
} | |
} | |
static fromJS(data: any): UpdateProfilePictureInput { | |
let result = new UpdateProfilePictureInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["fileName"] = this.fileName; | |
data["x"] = this.x; | |
data["y"] = this.y; | |
data["width"] = this.width; | |
data["height"] = this.height; | |
return data; | |
} | |
} | |
export interface IUpdateProfilePictureInput { | |
fileName: string; | |
x: number; | |
y: number; | |
width: number; | |
height: number; | |
} | |
export class GetPasswordComplexitySettingOutput implements IGetPasswordComplexitySettingOutput { | |
setting: PasswordComplexitySetting; | |
constructor(data?: IGetPasswordComplexitySettingOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.setting = data["setting"] ? PasswordComplexitySetting.fromJS(data["setting"]) : <any>undefined; | |
} | |
} | |
static fromJS(data: any): GetPasswordComplexitySettingOutput { | |
let result = new GetPasswordComplexitySettingOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["setting"] = this.setting ? this.setting.toJSON() : <any>undefined; | |
return data; | |
} | |
} | |
export interface IGetPasswordComplexitySettingOutput { | |
setting: PasswordComplexitySetting; | |
} | |
export class GetProfilePictureOutput implements IGetProfilePictureOutput { | |
profilePicture: string; | |
constructor(data?: IGetProfilePictureOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.profilePicture = data["profilePicture"]; | |
} | |
} | |
static fromJS(data: any): GetProfilePictureOutput { | |
let result = new GetProfilePictureOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["profilePicture"] = this.profilePicture; | |
return data; | |
} | |
} | |
export interface IGetProfilePictureOutput { | |
profilePicture: string; | |
} | |
export class ChangeUserLanguageDto implements IChangeUserLanguageDto { | |
languageName: string; | |
constructor(data?: IChangeUserLanguageDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.languageName = data["languageName"]; | |
} | |
} | |
static fromJS(data: any): ChangeUserLanguageDto { | |
let result = new ChangeUserLanguageDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["languageName"] = this.languageName; | |
return data; | |
} | |
} | |
export interface IChangeUserLanguageDto { | |
languageName: string; | |
} | |
export class ListResultDto`1OfOfRoleListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null implements IListResultDto`1OfOfRoleListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
items: RoleListDto[]; | |
constructor(data?: IListResultDto`1OfOfRoleListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
if (data["items"] && data["items"].constructor === Array) { | |
this.items = []; | |
for (let item of data["items"]) | |
this.items.push(RoleListDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): ListResultDto`1OfOfRoleListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
let result = new ListResultDto`1OfOfRoleListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
if (this.items && this.items.constructor === Array) { | |
data["items"] = []; | |
for (let item of this.items) | |
data["items"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IListResultDto`1OfOfRoleListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
items: RoleListDto[]; | |
} | |
export class RoleListDto implements IRoleListDto { | |
name: string; | |
displayName: string; | |
isStatic: boolean; | |
isDefault: boolean; | |
creationTime: moment.Moment; | |
id: number; | |
constructor(data?: IRoleListDto) { | |
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"]; | |
this.displayName = data["displayName"]; | |
this.isStatic = data["isStatic"]; | |
this.isDefault = data["isDefault"]; | |
this.creationTime = data["creationTime"] ? moment(data["creationTime"].toString()) : <any>undefined; | |
this.id = data["id"]; | |
} | |
} | |
static fromJS(data: any): RoleListDto { | |
let result = new RoleListDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["name"] = this.name; | |
data["displayName"] = this.displayName; | |
data["isStatic"] = this.isStatic; | |
data["isDefault"] = this.isDefault; | |
data["creationTime"] = this.creationTime ? this.creationTime.toISOString() : <any>undefined; | |
data["id"] = this.id; | |
return data; | |
} | |
} | |
export interface IRoleListDto { | |
name: string; | |
displayName: string; | |
isStatic: boolean; | |
isDefault: boolean; | |
creationTime: moment.Moment; | |
id: number; | |
} | |
export class GetRoleForEditOutput implements IGetRoleForEditOutput { | |
role: RoleEditDto; | |
permissions: FlatPermissionDto[]; | |
grantedPermissionNames: string[]; | |
constructor(data?: IGetRoleForEditOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.role = data["role"] ? RoleEditDto.fromJS(data["role"]) : <any>undefined; | |
if (data["permissions"] && data["permissions"].constructor === Array) { | |
this.permissions = []; | |
for (let item of data["permissions"]) | |
this.permissions.push(FlatPermissionDto.fromJS(item)); | |
} | |
if (data["grantedPermissionNames"] && data["grantedPermissionNames"].constructor === Array) { | |
this.grantedPermissionNames = []; | |
for (let item of data["grantedPermissionNames"]) | |
this.grantedPermissionNames.push(item); | |
} | |
} | |
} | |
static fromJS(data: any): GetRoleForEditOutput { | |
let result = new GetRoleForEditOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["role"] = this.role ? this.role.toJSON() : <any>undefined; | |
if (this.permissions && this.permissions.constructor === Array) { | |
data["permissions"] = []; | |
for (let item of this.permissions) | |
data["permissions"].push(item.toJSON()); | |
} | |
if (this.grantedPermissionNames && this.grantedPermissionNames.constructor === Array) { | |
data["grantedPermissionNames"] = []; | |
for (let item of this.grantedPermissionNames) | |
data["grantedPermissionNames"].push(item); | |
} | |
return data; | |
} | |
} | |
export interface IGetRoleForEditOutput { | |
role: RoleEditDto; | |
permissions: FlatPermissionDto[]; | |
grantedPermissionNames: string[]; | |
} | |
export class RoleEditDto implements IRoleEditDto { | |
id: number; | |
displayName: string; | |
isDefault: boolean; | |
constructor(data?: IRoleEditDto) { | |
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.displayName = data["displayName"]; | |
this.isDefault = data["isDefault"]; | |
} | |
} | |
static fromJS(data: any): RoleEditDto { | |
let result = new RoleEditDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["id"] = this.id; | |
data["displayName"] = this.displayName; | |
data["isDefault"] = this.isDefault; | |
return data; | |
} | |
} | |
export interface IRoleEditDto { | |
id: number; | |
displayName: string; | |
isDefault: boolean; | |
} | |
export class FlatPermissionDto implements IFlatPermissionDto { | |
parentName: string; | |
name: string; | |
displayName: string; | |
description: string; | |
isGrantedByDefault: boolean; | |
constructor(data?: IFlatPermissionDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.parentName = data["parentName"]; | |
this.name = data["name"]; | |
this.displayName = data["displayName"]; | |
this.description = data["description"]; | |
this.isGrantedByDefault = data["isGrantedByDefault"]; | |
} | |
} | |
static fromJS(data: any): FlatPermissionDto { | |
let result = new FlatPermissionDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["parentName"] = this.parentName; | |
data["name"] = this.name; | |
data["displayName"] = this.displayName; | |
data["description"] = this.description; | |
data["isGrantedByDefault"] = this.isGrantedByDefault; | |
return data; | |
} | |
} | |
export interface IFlatPermissionDto { | |
parentName: string; | |
name: string; | |
displayName: string; | |
description: string; | |
isGrantedByDefault: boolean; | |
} | |
export class CreateOrUpdateRoleInput implements ICreateOrUpdateRoleInput { | |
role: RoleEditDto = new RoleEditDto(); | |
grantedPermissionNames: string[] = []; | |
constructor(data?: ICreateOrUpdateRoleInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.role = data["role"] ? RoleEditDto.fromJS(data["role"]) : new RoleEditDto(); | |
if (data["grantedPermissionNames"] && data["grantedPermissionNames"].constructor === Array) { | |
this.grantedPermissionNames = []; | |
for (let item of data["grantedPermissionNames"]) | |
this.grantedPermissionNames.push(item); | |
} | |
} | |
} | |
static fromJS(data: any): CreateOrUpdateRoleInput { | |
let result = new CreateOrUpdateRoleInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["role"] = this.role ? this.role.toJSON() : <any>undefined; | |
if (this.grantedPermissionNames && this.grantedPermissionNames.constructor === Array) { | |
data["grantedPermissionNames"] = []; | |
for (let item of this.grantedPermissionNames) | |
data["grantedPermissionNames"].push(item); | |
} | |
return data; | |
} | |
} | |
export interface ICreateOrUpdateRoleInput { | |
role: RoleEditDto; | |
grantedPermissionNames: string[]; | |
} | |
export class GetCurrentLoginInformationsOutput implements IGetCurrentLoginInformationsOutput { | |
user: UserLoginInfoDto; | |
tenant: TenantLoginInfoDto; | |
application: ApplicationInfoDto; | |
constructor(data?: IGetCurrentLoginInformationsOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.user = data["user"] ? UserLoginInfoDto.fromJS(data["user"]) : <any>undefined; | |
this.tenant = data["tenant"] ? TenantLoginInfoDto.fromJS(data["tenant"]) : <any>undefined; | |
this.application = data["application"] ? ApplicationInfoDto.fromJS(data["application"]) : <any>undefined; | |
} | |
} | |
static fromJS(data: any): GetCurrentLoginInformationsOutput { | |
let result = new GetCurrentLoginInformationsOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["user"] = this.user ? this.user.toJSON() : <any>undefined; | |
data["tenant"] = this.tenant ? this.tenant.toJSON() : <any>undefined; | |
data["application"] = this.application ? this.application.toJSON() : <any>undefined; | |
return data; | |
} | |
} | |
export interface IGetCurrentLoginInformationsOutput { | |
user: UserLoginInfoDto; | |
tenant: TenantLoginInfoDto; | |
application: ApplicationInfoDto; | |
} | |
export class UserLoginInfoDto implements IUserLoginInfoDto { | |
name: string; | |
surname: string; | |
userName: string; | |
emailAddress: string; | |
profilePictureId: string; | |
id: number; | |
constructor(data?: IUserLoginInfoDto) { | |
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"]; | |
this.surname = data["surname"]; | |
this.userName = data["userName"]; | |
this.emailAddress = data["emailAddress"]; | |
this.profilePictureId = data["profilePictureId"]; | |
this.id = data["id"]; | |
} | |
} | |
static fromJS(data: any): UserLoginInfoDto { | |
let result = new UserLoginInfoDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["name"] = this.name; | |
data["surname"] = this.surname; | |
data["userName"] = this.userName; | |
data["emailAddress"] = this.emailAddress; | |
data["profilePictureId"] = this.profilePictureId; | |
data["id"] = this.id; | |
return data; | |
} | |
} | |
export interface IUserLoginInfoDto { | |
name: string; | |
surname: string; | |
userName: string; | |
emailAddress: string; | |
profilePictureId: string; | |
id: number; | |
} | |
export class TenantLoginInfoDto implements ITenantLoginInfoDto { | |
tenancyName: string; | |
name: string; | |
logoId: string; | |
logoFileType: string; | |
customCssId: string; | |
subscriptionEndDateUtc: moment.Moment; | |
isInTrialPeriod: boolean; | |
edition: EditionInfoDto; | |
creationTime: moment.Moment; | |
paymentPeriodType: TenantLoginInfoDtoPaymentPeriodType; | |
subscriptionDateString: string; | |
creationTimeString: string; | |
id: number; | |
constructor(data?: ITenantLoginInfoDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.tenancyName = data["tenancyName"]; | |
this.name = data["name"]; | |
this.logoId = data["logoId"]; | |
this.logoFileType = data["logoFileType"]; | |
this.customCssId = data["customCssId"]; | |
this.subscriptionEndDateUtc = data["subscriptionEndDateUtc"] ? moment(data["subscriptionEndDateUtc"].toString()) : <any>undefined; | |
this.isInTrialPeriod = data["isInTrialPeriod"]; | |
this.edition = data["edition"] ? EditionInfoDto.fromJS(data["edition"]) : <any>undefined; | |
this.creationTime = data["creationTime"] ? moment(data["creationTime"].toString()) : <any>undefined; | |
this.paymentPeriodType = data["paymentPeriodType"]; | |
this.subscriptionDateString = data["subscriptionDateString"]; | |
this.creationTimeString = data["creationTimeString"]; | |
this.id = data["id"]; | |
} | |
} | |
static fromJS(data: any): TenantLoginInfoDto { | |
let result = new TenantLoginInfoDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["tenancyName"] = this.tenancyName; | |
data["name"] = this.name; | |
data["logoId"] = this.logoId; | |
data["logoFileType"] = this.logoFileType; | |
data["customCssId"] = this.customCssId; | |
data["subscriptionEndDateUtc"] = this.subscriptionEndDateUtc ? this.subscriptionEndDateUtc.toISOString() : <any>undefined; | |
data["isInTrialPeriod"] = this.isInTrialPeriod; | |
data["edition"] = this.edition ? this.edition.toJSON() : <any>undefined; | |
data["creationTime"] = this.creationTime ? this.creationTime.toISOString() : <any>undefined; | |
data["paymentPeriodType"] = this.paymentPeriodType; | |
data["subscriptionDateString"] = this.subscriptionDateString; | |
data["creationTimeString"] = this.creationTimeString; | |
data["id"] = this.id; | |
return data; | |
} | |
} | |
export interface ITenantLoginInfoDto { | |
tenancyName: string; | |
name: string; | |
logoId: string; | |
logoFileType: string; | |
customCssId: string; | |
subscriptionEndDateUtc: moment.Moment; | |
isInTrialPeriod: boolean; | |
edition: EditionInfoDto; | |
creationTime: moment.Moment; | |
paymentPeriodType: TenantLoginInfoDtoPaymentPeriodType; | |
subscriptionDateString: string; | |
creationTimeString: string; | |
id: number; | |
} | |
export class ApplicationInfoDto implements IApplicationInfoDto { | |
version: string; | |
releaseDate: moment.Moment; | |
features: { [key: string] : boolean; }; | |
constructor(data?: IApplicationInfoDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.version = data["version"]; | |
this.releaseDate = data["releaseDate"] ? moment(data["releaseDate"].toString()) : <any>undefined; | |
if (data["features"]) { | |
this.features = {}; | |
for (let key in data["features"]) { | |
if (data["features"].hasOwnProperty(key)) | |
this.features[key] = data["features"][key]; | |
} | |
} | |
} | |
} | |
static fromJS(data: any): ApplicationInfoDto { | |
let result = new ApplicationInfoDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["version"] = this.version; | |
data["releaseDate"] = this.releaseDate ? this.releaseDate.toISOString() : <any>undefined; | |
if (this.features) { | |
data["features"] = {}; | |
for (let key in this.features) { | |
if (this.features.hasOwnProperty(key)) | |
data["features"][key] = this.features[key]; | |
} | |
} | |
return data; | |
} | |
} | |
export interface IApplicationInfoDto { | |
version: string; | |
releaseDate: moment.Moment; | |
features: { [key: string] : boolean; }; | |
} | |
export class EditionInfoDto implements IEditionInfoDto { | |
displayName: string; | |
trialDayCount: number; | |
monthlyPrice: number; | |
annualPrice: number; | |
isHighestEdition: boolean; | |
isFree: boolean; | |
id: number; | |
constructor(data?: IEditionInfoDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.displayName = data["displayName"]; | |
this.trialDayCount = data["trialDayCount"]; | |
this.monthlyPrice = data["monthlyPrice"]; | |
this.annualPrice = data["annualPrice"]; | |
this.isHighestEdition = data["isHighestEdition"]; | |
this.isFree = data["isFree"]; | |
this.id = data["id"]; | |
} | |
} | |
static fromJS(data: any): EditionInfoDto { | |
let result = new EditionInfoDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["displayName"] = this.displayName; | |
data["trialDayCount"] = this.trialDayCount; | |
data["monthlyPrice"] = this.monthlyPrice; | |
data["annualPrice"] = this.annualPrice; | |
data["isHighestEdition"] = this.isHighestEdition; | |
data["isFree"] = this.isFree; | |
data["id"] = this.id; | |
return data; | |
} | |
} | |
export interface IEditionInfoDto { | |
displayName: string; | |
trialDayCount: number; | |
monthlyPrice: number; | |
annualPrice: number; | |
isHighestEdition: boolean; | |
isFree: boolean; | |
id: number; | |
} | |
export class UpdateUserSignInTokenOutput implements IUpdateUserSignInTokenOutput { | |
signInToken: string; | |
encodedUserId: string; | |
encodedTenantId: string; | |
constructor(data?: IUpdateUserSignInTokenOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.signInToken = data["signInToken"]; | |
this.encodedUserId = data["encodedUserId"]; | |
this.encodedTenantId = data["encodedTenantId"]; | |
} | |
} | |
static fromJS(data: any): UpdateUserSignInTokenOutput { | |
let result = new UpdateUserSignInTokenOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["signInToken"] = this.signInToken; | |
data["encodedUserId"] = this.encodedUserId; | |
data["encodedTenantId"] = this.encodedTenantId; | |
return data; | |
} | |
} | |
export interface IUpdateUserSignInTokenOutput { | |
signInToken: string; | |
encodedUserId: string; | |
encodedTenantId: string; | |
} | |
export class PagedResultDto`1OfOfTenantListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null implements IPagedResultDto`1OfOfTenantListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
totalCount: number; | |
items: TenantListDto[]; | |
constructor(data?: IPagedResultDto`1OfOfTenantListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.totalCount = data["totalCount"]; | |
if (data["items"] && data["items"].constructor === Array) { | |
this.items = []; | |
for (let item of data["items"]) | |
this.items.push(TenantListDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): PagedResultDto`1OfOfTenantListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
let result = new PagedResultDto`1OfOfTenantListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["totalCount"] = this.totalCount; | |
if (this.items && this.items.constructor === Array) { | |
data["items"] = []; | |
for (let item of this.items) | |
data["items"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IPagedResultDto`1OfOfTenantListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
totalCount: number; | |
items: TenantListDto[]; | |
} | |
export class TenantListDto implements ITenantListDto { | |
tenancyName: string; | |
name: string; | |
editionDisplayName: string; | |
connectionString: string; | |
isActive: boolean; | |
creationTime: moment.Moment; | |
subscriptionEndDateUtc: moment.Moment; | |
editionId: number; | |
isInTrialPeriod: boolean; | |
id: number; | |
constructor(data?: ITenantListDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.tenancyName = data["tenancyName"]; | |
this.name = data["name"]; | |
this.editionDisplayName = data["editionDisplayName"]; | |
this.connectionString = data["connectionString"]; | |
this.isActive = data["isActive"]; | |
this.creationTime = data["creationTime"] ? moment(data["creationTime"].toString()) : <any>undefined; | |
this.subscriptionEndDateUtc = data["subscriptionEndDateUtc"] ? moment(data["subscriptionEndDateUtc"].toString()) : <any>undefined; | |
this.editionId = data["editionId"]; | |
this.isInTrialPeriod = data["isInTrialPeriod"]; | |
this.id = data["id"]; | |
} | |
} | |
static fromJS(data: any): TenantListDto { | |
let result = new TenantListDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["tenancyName"] = this.tenancyName; | |
data["name"] = this.name; | |
data["editionDisplayName"] = this.editionDisplayName; | |
data["connectionString"] = this.connectionString; | |
data["isActive"] = this.isActive; | |
data["creationTime"] = this.creationTime ? this.creationTime.toISOString() : <any>undefined; | |
data["subscriptionEndDateUtc"] = this.subscriptionEndDateUtc ? this.subscriptionEndDateUtc.toISOString() : <any>undefined; | |
data["editionId"] = this.editionId; | |
data["isInTrialPeriod"] = this.isInTrialPeriod; | |
data["id"] = this.id; | |
return data; | |
} | |
} | |
export interface ITenantListDto { | |
tenancyName: string; | |
name: string; | |
editionDisplayName: string; | |
connectionString: string; | |
isActive: boolean; | |
creationTime: moment.Moment; | |
subscriptionEndDateUtc: moment.Moment; | |
editionId: number; | |
isInTrialPeriod: boolean; | |
id: number; | |
} | |
export class CreateTenantInput implements ICreateTenantInput { | |
tenancyName: string; | |
name: string; | |
adminEmailAddress: string; | |
adminPassword: string; | |
connectionString: string; | |
shouldChangePasswordOnNextLogin: boolean; | |
sendActivationEmail: boolean; | |
editionId: number; | |
isActive: boolean; | |
subscriptionEndDateUtc: moment.Moment; | |
isInTrialPeriod: boolean; | |
constructor(data?: ICreateTenantInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.tenancyName = data["tenancyName"]; | |
this.name = data["name"]; | |
this.adminEmailAddress = data["adminEmailAddress"]; | |
this.adminPassword = data["adminPassword"]; | |
this.connectionString = data["connectionString"]; | |
this.shouldChangePasswordOnNextLogin = data["shouldChangePasswordOnNextLogin"]; | |
this.sendActivationEmail = data["sendActivationEmail"]; | |
this.editionId = data["editionId"]; | |
this.isActive = data["isActive"]; | |
this.subscriptionEndDateUtc = data["subscriptionEndDateUtc"] ? moment(data["subscriptionEndDateUtc"].toString()) : <any>undefined; | |
this.isInTrialPeriod = data["isInTrialPeriod"]; | |
} | |
} | |
static fromJS(data: any): CreateTenantInput { | |
let result = new CreateTenantInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["tenancyName"] = this.tenancyName; | |
data["name"] = this.name; | |
data["adminEmailAddress"] = this.adminEmailAddress; | |
data["adminPassword"] = this.adminPassword; | |
data["connectionString"] = this.connectionString; | |
data["shouldChangePasswordOnNextLogin"] = this.shouldChangePasswordOnNextLogin; | |
data["sendActivationEmail"] = this.sendActivationEmail; | |
data["editionId"] = this.editionId; | |
data["isActive"] = this.isActive; | |
data["subscriptionEndDateUtc"] = this.subscriptionEndDateUtc ? this.subscriptionEndDateUtc.toISOString() : <any>undefined; | |
data["isInTrialPeriod"] = this.isInTrialPeriod; | |
return data; | |
} | |
} | |
export interface ICreateTenantInput { | |
tenancyName: string; | |
name: string; | |
adminEmailAddress: string; | |
adminPassword: string; | |
connectionString: string; | |
shouldChangePasswordOnNextLogin: boolean; | |
sendActivationEmail: boolean; | |
editionId: number; | |
isActive: boolean; | |
subscriptionEndDateUtc: moment.Moment; | |
isInTrialPeriod: boolean; | |
} | |
export class TenantEditDto implements ITenantEditDto { | |
tenancyName: string; | |
name: string; | |
connectionString: string; | |
editionId: number; | |
isActive: boolean; | |
subscriptionEndDateUtc: moment.Moment; | |
isInTrialPeriod: boolean; | |
id: number; | |
constructor(data?: ITenantEditDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.tenancyName = data["tenancyName"]; | |
this.name = data["name"]; | |
this.connectionString = data["connectionString"]; | |
this.editionId = data["editionId"]; | |
this.isActive = data["isActive"]; | |
this.subscriptionEndDateUtc = data["subscriptionEndDateUtc"] ? moment(data["subscriptionEndDateUtc"].toString()) : <any>undefined; | |
this.isInTrialPeriod = data["isInTrialPeriod"]; | |
this.id = data["id"]; | |
} | |
} | |
static fromJS(data: any): TenantEditDto { | |
let result = new TenantEditDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["tenancyName"] = this.tenancyName; | |
data["name"] = this.name; | |
data["connectionString"] = this.connectionString; | |
data["editionId"] = this.editionId; | |
data["isActive"] = this.isActive; | |
data["subscriptionEndDateUtc"] = this.subscriptionEndDateUtc ? this.subscriptionEndDateUtc.toISOString() : <any>undefined; | |
data["isInTrialPeriod"] = this.isInTrialPeriod; | |
data["id"] = this.id; | |
return data; | |
} | |
} | |
export interface ITenantEditDto { | |
tenancyName: string; | |
name: string; | |
connectionString: string; | |
editionId: number; | |
isActive: boolean; | |
subscriptionEndDateUtc: moment.Moment; | |
isInTrialPeriod: boolean; | |
id: number; | |
} | |
export class GetTenantFeaturesEditOutput implements IGetTenantFeaturesEditOutput { | |
featureValues: NameValueDto[]; | |
features: FlatFeatureDto[]; | |
constructor(data?: IGetTenantFeaturesEditOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
if (data["featureValues"] && data["featureValues"].constructor === Array) { | |
this.featureValues = []; | |
for (let item of data["featureValues"]) | |
this.featureValues.push(NameValueDto.fromJS(item)); | |
} | |
if (data["features"] && data["features"].constructor === Array) { | |
this.features = []; | |
for (let item of data["features"]) | |
this.features.push(FlatFeatureDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): GetTenantFeaturesEditOutput { | |
let result = new GetTenantFeaturesEditOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
if (this.featureValues && this.featureValues.constructor === Array) { | |
data["featureValues"] = []; | |
for (let item of this.featureValues) | |
data["featureValues"].push(item.toJSON()); | |
} | |
if (this.features && this.features.constructor === Array) { | |
data["features"] = []; | |
for (let item of this.features) | |
data["features"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IGetTenantFeaturesEditOutput { | |
featureValues: NameValueDto[]; | |
features: FlatFeatureDto[]; | |
} | |
export class UpdateTenantFeaturesInput implements IUpdateTenantFeaturesInput { | |
id: number; | |
featureValues: NameValueDto[] = []; | |
constructor(data?: IUpdateTenantFeaturesInput) { | |
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"]; | |
if (data["featureValues"] && data["featureValues"].constructor === Array) { | |
this.featureValues = []; | |
for (let item of data["featureValues"]) | |
this.featureValues.push(NameValueDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): UpdateTenantFeaturesInput { | |
let result = new UpdateTenantFeaturesInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["id"] = this.id; | |
if (this.featureValues && this.featureValues.constructor === Array) { | |
data["featureValues"] = []; | |
for (let item of this.featureValues) | |
data["featureValues"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IUpdateTenantFeaturesInput { | |
id: number; | |
featureValues: NameValueDto[]; | |
} | |
export class EntityDto implements IEntityDto { | |
id: number; | |
constructor(data?: IEntityDto) { | |
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"]; | |
} | |
} | |
static fromJS(data: any): EntityDto { | |
let result = new EntityDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["id"] = this.id; | |
return data; | |
} | |
} | |
export interface IEntityDto { | |
id: number; | |
} | |
export class GetMemberActivityOutput implements IGetMemberActivityOutput { | |
memberActivities: MemberActivity[]; | |
constructor(data?: IGetMemberActivityOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
if (data["memberActivities"] && data["memberActivities"].constructor === Array) { | |
this.memberActivities = []; | |
for (let item of data["memberActivities"]) | |
this.memberActivities.push(MemberActivity.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): GetMemberActivityOutput { | |
let result = new GetMemberActivityOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
if (this.memberActivities && this.memberActivities.constructor === Array) { | |
data["memberActivities"] = []; | |
for (let item of this.memberActivities) | |
data["memberActivities"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IGetMemberActivityOutput { | |
memberActivities: MemberActivity[]; | |
} | |
export class MemberActivity implements IMemberActivity { | |
name: string; | |
earnings: string; | |
cases: number; | |
closed: number; | |
rate: string; | |
constructor(data?: IMemberActivity) { | |
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"]; | |
this.earnings = data["earnings"]; | |
this.cases = data["cases"]; | |
this.closed = data["closed"]; | |
this.rate = data["rate"]; | |
} | |
} | |
static fromJS(data: any): MemberActivity { | |
let result = new MemberActivity(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["name"] = this.name; | |
data["earnings"] = this.earnings; | |
data["cases"] = this.cases; | |
data["closed"] = this.closed; | |
data["rate"] = this.rate; | |
return data; | |
} | |
} | |
export interface IMemberActivity { | |
name: string; | |
earnings: string; | |
cases: number; | |
closed: number; | |
rate: string; | |
} | |
export class GetDashboardDataOutput implements IGetDashboardDataOutput { | |
totalProfit: number; | |
newFeedbacks: number; | |
newOrders: number; | |
newUsers: number; | |
salesSummary: SalesSummaryData[]; | |
totalSales: number; | |
revenue: number; | |
expenses: number; | |
growth: number; | |
transactionPercent: number; | |
newVisitPercent: number; | |
bouncePercent: number; | |
dailySales: number[]; | |
profitShares: number[]; | |
constructor(data?: IGetDashboardDataOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.totalProfit = data["totalProfit"]; | |
this.newFeedbacks = data["newFeedbacks"]; | |
this.newOrders = data["newOrders"]; | |
this.newUsers = data["newUsers"]; | |
if (data["salesSummary"] && data["salesSummary"].constructor === Array) { | |
this.salesSummary = []; | |
for (let item of data["salesSummary"]) | |
this.salesSummary.push(SalesSummaryData.fromJS(item)); | |
} | |
this.totalSales = data["totalSales"]; | |
this.revenue = data["revenue"]; | |
this.expenses = data["expenses"]; | |
this.growth = data["growth"]; | |
this.transactionPercent = data["transactionPercent"]; | |
this.newVisitPercent = data["newVisitPercent"]; | |
this.bouncePercent = data["bouncePercent"]; | |
if (data["dailySales"] && data["dailySales"].constructor === Array) { | |
this.dailySales = []; | |
for (let item of data["dailySales"]) | |
this.dailySales.push(item); | |
} | |
if (data["profitShares"] && data["profitShares"].constructor === Array) { | |
this.profitShares = []; | |
for (let item of data["profitShares"]) | |
this.profitShares.push(item); | |
} | |
} | |
} | |
static fromJS(data: any): GetDashboardDataOutput { | |
let result = new GetDashboardDataOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["totalProfit"] = this.totalProfit; | |
data["newFeedbacks"] = this.newFeedbacks; | |
data["newOrders"] = this.newOrders; | |
data["newUsers"] = this.newUsers; | |
if (this.salesSummary && this.salesSummary.constructor === Array) { | |
data["salesSummary"] = []; | |
for (let item of this.salesSummary) | |
data["salesSummary"].push(item.toJSON()); | |
} | |
data["totalSales"] = this.totalSales; | |
data["revenue"] = this.revenue; | |
data["expenses"] = this.expenses; | |
data["growth"] = this.growth; | |
data["transactionPercent"] = this.transactionPercent; | |
data["newVisitPercent"] = this.newVisitPercent; | |
data["bouncePercent"] = this.bouncePercent; | |
if (this.dailySales && this.dailySales.constructor === Array) { | |
data["dailySales"] = []; | |
for (let item of this.dailySales) | |
data["dailySales"].push(item); | |
} | |
if (this.profitShares && this.profitShares.constructor === Array) { | |
data["profitShares"] = []; | |
for (let item of this.profitShares) | |
data["profitShares"].push(item); | |
} | |
return data; | |
} | |
} | |
export interface IGetDashboardDataOutput { | |
totalProfit: number; | |
newFeedbacks: number; | |
newOrders: number; | |
newUsers: number; | |
salesSummary: SalesSummaryData[]; | |
totalSales: number; | |
revenue: number; | |
expenses: number; | |
growth: number; | |
transactionPercent: number; | |
newVisitPercent: number; | |
bouncePercent: number; | |
dailySales: number[]; | |
profitShares: number[]; | |
} | |
export class SalesSummaryData implements ISalesSummaryData { | |
period: string; | |
sales: number; | |
profit: number; | |
constructor(data?: ISalesSummaryData) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.period = data["period"]; | |
this.sales = data["sales"]; | |
this.profit = data["profit"]; | |
} | |
} | |
static fromJS(data: any): SalesSummaryData { | |
let result = new SalesSummaryData(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["period"] = this.period; | |
data["sales"] = this.sales; | |
data["profit"] = this.profit; | |
return data; | |
} | |
} | |
export interface ISalesSummaryData { | |
period: string; | |
sales: number; | |
profit: number; | |
} | |
export class GetSalesSummaryOutput implements IGetSalesSummaryOutput { | |
salesSummary: SalesSummaryData[]; | |
constructor(data?: IGetSalesSummaryOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
if (data["salesSummary"] && data["salesSummary"].constructor === Array) { | |
this.salesSummary = []; | |
for (let item of data["salesSummary"]) | |
this.salesSummary.push(SalesSummaryData.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): GetSalesSummaryOutput { | |
let result = new GetSalesSummaryOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
if (this.salesSummary && this.salesSummary.constructor === Array) { | |
data["salesSummary"] = []; | |
for (let item of this.salesSummary) | |
data["salesSummary"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IGetSalesSummaryOutput { | |
salesSummary: SalesSummaryData[]; | |
} | |
export class GetWorldMapOutput implements IGetWorldMapOutput { | |
countries: WorldMapCountry[]; | |
constructor(data?: IGetWorldMapOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
if (data["countries"] && data["countries"].constructor === Array) { | |
this.countries = []; | |
for (let item of data["countries"]) | |
this.countries.push(WorldMapCountry.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): GetWorldMapOutput { | |
let result = new GetWorldMapOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
if (this.countries && this.countries.constructor === Array) { | |
data["countries"] = []; | |
for (let item of this.countries) | |
data["countries"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IGetWorldMapOutput { | |
countries: WorldMapCountry[]; | |
} | |
export class WorldMapCountry implements IWorldMapCountry { | |
countryName: string; | |
color: number; | |
constructor(data?: IWorldMapCountry) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.countryName = data["countryName"]; | |
this.color = data["color"]; | |
} | |
} | |
static fromJS(data: any): WorldMapCountry { | |
let result = new WorldMapCountry(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["countryName"] = this.countryName; | |
data["color"] = this.color; | |
return data; | |
} | |
} | |
export interface IWorldMapCountry { | |
countryName: string; | |
color: number; | |
} | |
export class GetGeneralStatsOutput implements IGetGeneralStatsOutput { | |
transactionPercent: number; | |
newVisitPercent: number; | |
bouncePercent: number; | |
constructor(data?: IGetGeneralStatsOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.transactionPercent = data["transactionPercent"]; | |
this.newVisitPercent = data["newVisitPercent"]; | |
this.bouncePercent = data["bouncePercent"]; | |
} | |
} | |
static fromJS(data: any): GetGeneralStatsOutput { | |
let result = new GetGeneralStatsOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["transactionPercent"] = this.transactionPercent; | |
data["newVisitPercent"] = this.newVisitPercent; | |
data["bouncePercent"] = this.bouncePercent; | |
return data; | |
} | |
} | |
export interface IGetGeneralStatsOutput { | |
transactionPercent: number; | |
newVisitPercent: number; | |
bouncePercent: number; | |
} | |
export class RegisterTenantInput implements IRegisterTenantInput { | |
tenancyName: string; | |
name: string; | |
adminEmailAddress: string; | |
adminPassword: string; | |
captchaResponse: string; | |
subscriptionStartType: RegisterTenantInputSubscriptionStartType; | |
gateway: RegisterTenantInputGateway; | |
editionId: number; | |
paymentId: string; | |
constructor(data?: IRegisterTenantInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.tenancyName = data["tenancyName"]; | |
this.name = data["name"]; | |
this.adminEmailAddress = data["adminEmailAddress"]; | |
this.adminPassword = data["adminPassword"]; | |
this.captchaResponse = data["captchaResponse"]; | |
this.subscriptionStartType = data["subscriptionStartType"]; | |
this.gateway = data["gateway"]; | |
this.editionId = data["editionId"]; | |
this.paymentId = data["paymentId"]; | |
} | |
} | |
static fromJS(data: any): RegisterTenantInput { | |
let result = new RegisterTenantInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["tenancyName"] = this.tenancyName; | |
data["name"] = this.name; | |
data["adminEmailAddress"] = this.adminEmailAddress; | |
data["adminPassword"] = this.adminPassword; | |
data["captchaResponse"] = this.captchaResponse; | |
data["subscriptionStartType"] = this.subscriptionStartType; | |
data["gateway"] = this.gateway; | |
data["editionId"] = this.editionId; | |
data["paymentId"] = this.paymentId; | |
return data; | |
} | |
} | |
export interface IRegisterTenantInput { | |
tenancyName: string; | |
name: string; | |
adminEmailAddress: string; | |
adminPassword: string; | |
captchaResponse: string; | |
subscriptionStartType: RegisterTenantInputSubscriptionStartType; | |
gateway: RegisterTenantInputGateway; | |
editionId: number; | |
paymentId: string; | |
} | |
export class RegisterTenantOutput implements IRegisterTenantOutput { | |
tenantId: number; | |
tenancyName: string; | |
name: string; | |
userName: string; | |
emailAddress: string; | |
isTenantActive: boolean; | |
isActive: boolean; | |
isEmailConfirmationRequired: boolean; | |
constructor(data?: IRegisterTenantOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.tenantId = data["tenantId"]; | |
this.tenancyName = data["tenancyName"]; | |
this.name = data["name"]; | |
this.userName = data["userName"]; | |
this.emailAddress = data["emailAddress"]; | |
this.isTenantActive = data["isTenantActive"]; | |
this.isActive = data["isActive"]; | |
this.isEmailConfirmationRequired = data["isEmailConfirmationRequired"]; | |
} | |
} | |
static fromJS(data: any): RegisterTenantOutput { | |
let result = new RegisterTenantOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["tenantId"] = this.tenantId; | |
data["tenancyName"] = this.tenancyName; | |
data["name"] = this.name; | |
data["userName"] = this.userName; | |
data["emailAddress"] = this.emailAddress; | |
data["isTenantActive"] = this.isTenantActive; | |
data["isActive"] = this.isActive; | |
data["isEmailConfirmationRequired"] = this.isEmailConfirmationRequired; | |
return data; | |
} | |
} | |
export interface IRegisterTenantOutput { | |
tenantId: number; | |
tenancyName: string; | |
name: string; | |
userName: string; | |
emailAddress: string; | |
isTenantActive: boolean; | |
isActive: boolean; | |
isEmailConfirmationRequired: boolean; | |
} | |
export class EditionsSelectOutput implements IEditionsSelectOutput { | |
allFeatures: FlatFeatureSelectDto[]; | |
editionsWithFeatures: EditionWithFeaturesDto[]; | |
tenantEditionId: number; | |
constructor(data?: IEditionsSelectOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
if (data["allFeatures"] && data["allFeatures"].constructor === Array) { | |
this.allFeatures = []; | |
for (let item of data["allFeatures"]) | |
this.allFeatures.push(FlatFeatureSelectDto.fromJS(item)); | |
} | |
if (data["editionsWithFeatures"] && data["editionsWithFeatures"].constructor === Array) { | |
this.editionsWithFeatures = []; | |
for (let item of data["editionsWithFeatures"]) | |
this.editionsWithFeatures.push(EditionWithFeaturesDto.fromJS(item)); | |
} | |
this.tenantEditionId = data["tenantEditionId"]; | |
} | |
} | |
static fromJS(data: any): EditionsSelectOutput { | |
let result = new EditionsSelectOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
if (this.allFeatures && this.allFeatures.constructor === Array) { | |
data["allFeatures"] = []; | |
for (let item of this.allFeatures) | |
data["allFeatures"].push(item.toJSON()); | |
} | |
if (this.editionsWithFeatures && this.editionsWithFeatures.constructor === Array) { | |
data["editionsWithFeatures"] = []; | |
for (let item of this.editionsWithFeatures) | |
data["editionsWithFeatures"].push(item.toJSON()); | |
} | |
data["tenantEditionId"] = this.tenantEditionId; | |
return data; | |
} | |
} | |
export interface IEditionsSelectOutput { | |
allFeatures: FlatFeatureSelectDto[]; | |
editionsWithFeatures: EditionWithFeaturesDto[]; | |
tenantEditionId: number; | |
} | |
export class FlatFeatureSelectDto implements IFlatFeatureSelectDto { | |
parentName: string; | |
name: string; | |
displayName: string; | |
description: string; | |
defaultValue: string; | |
inputType: IInputType; | |
textHtmlColor: string; | |
constructor(data?: IFlatFeatureSelectDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.parentName = data["parentName"]; | |
this.name = data["name"]; | |
this.displayName = data["displayName"]; | |
this.description = data["description"]; | |
this.defaultValue = data["defaultValue"]; | |
this.inputType = data["inputType"] ? IInputType.fromJS(data["inputType"]) : <any>undefined; | |
this.textHtmlColor = data["textHtmlColor"]; | |
} | |
} | |
static fromJS(data: any): FlatFeatureSelectDto { | |
let result = new FlatFeatureSelectDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["parentName"] = this.parentName; | |
data["name"] = this.name; | |
data["displayName"] = this.displayName; | |
data["description"] = this.description; | |
data["defaultValue"] = this.defaultValue; | |
data["inputType"] = this.inputType ? this.inputType.toJSON() : <any>undefined; | |
data["textHtmlColor"] = this.textHtmlColor; | |
return data; | |
} | |
} | |
export interface IFlatFeatureSelectDto { | |
parentName: string; | |
name: string; | |
displayName: string; | |
description: string; | |
defaultValue: string; | |
inputType: IInputType; | |
textHtmlColor: string; | |
} | |
export class EditionWithFeaturesDto implements IEditionWithFeaturesDto { | |
edition: EditionSelectDto; | |
featureValues: NameValueDto[]; | |
constructor(data?: IEditionWithFeaturesDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.edition = data["edition"] ? EditionSelectDto.fromJS(data["edition"]) : <any>undefined; | |
if (data["featureValues"] && data["featureValues"].constructor === Array) { | |
this.featureValues = []; | |
for (let item of data["featureValues"]) | |
this.featureValues.push(NameValueDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): EditionWithFeaturesDto { | |
let result = new EditionWithFeaturesDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["edition"] = this.edition ? this.edition.toJSON() : <any>undefined; | |
if (this.featureValues && this.featureValues.constructor === Array) { | |
data["featureValues"] = []; | |
for (let item of this.featureValues) | |
data["featureValues"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IEditionWithFeaturesDto { | |
edition: EditionSelectDto; | |
featureValues: NameValueDto[]; | |
} | |
export class IInputType implements IIInputType { | |
name: string; | |
attributes: { [key: string] : any; }; | |
validator: IValueValidator; | |
constructor(data?: IIInputType) { | |
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"]; | |
if (data["attributes"]) { | |
this.attributes = {}; | |
for (let key in data["attributes"]) { | |
if (data["attributes"].hasOwnProperty(key)) | |
this.attributes[key] = data["attributes"][key]; | |
} | |
} | |
this.validator = data["validator"] ? IValueValidator.fromJS(data["validator"]) : <any>undefined; | |
} | |
} | |
static fromJS(data: any): IInputType { | |
let result = new IInputType(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["name"] = this.name; | |
if (this.attributes) { | |
data["attributes"] = {}; | |
for (let key in this.attributes) { | |
if (this.attributes.hasOwnProperty(key)) | |
data["attributes"][key] = this.attributes[key]; | |
} | |
} | |
data["validator"] = this.validator ? this.validator.toJSON() : <any>undefined; | |
return data; | |
} | |
} | |
export interface IIInputType { | |
name: string; | |
attributes: { [key: string] : any; }; | |
validator: IValueValidator; | |
} | |
export class TenantSettingsEditDto implements ITenantSettingsEditDto { | |
general: GeneralSettingsEditDto; | |
userManagement: TenantUserManagementSettingsEditDto = new TenantUserManagementSettingsEditDto(); | |
email: EmailSettingsEditDto; | |
ldap: LdapSettingsEditDto; | |
security: SecuritySettingsEditDto = new SecuritySettingsEditDto(); | |
billing: TenantBillingSettingsEditDto; | |
constructor(data?: ITenantSettingsEditDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.general = data["general"] ? GeneralSettingsEditDto.fromJS(data["general"]) : <any>undefined; | |
this.userManagement = data["userManagement"] ? TenantUserManagementSettingsEditDto.fromJS(data["userManagement"]) : new TenantUserManagementSettingsEditDto(); | |
this.email = data["email"] ? EmailSettingsEditDto.fromJS(data["email"]) : <any>undefined; | |
this.ldap = data["ldap"] ? LdapSettingsEditDto.fromJS(data["ldap"]) : <any>undefined; | |
this.security = data["security"] ? SecuritySettingsEditDto.fromJS(data["security"]) : new SecuritySettingsEditDto(); | |
this.billing = data["billing"] ? TenantBillingSettingsEditDto.fromJS(data["billing"]) : <any>undefined; | |
} | |
} | |
static fromJS(data: any): TenantSettingsEditDto { | |
let result = new TenantSettingsEditDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["general"] = this.general ? this.general.toJSON() : <any>undefined; | |
data["userManagement"] = this.userManagement ? this.userManagement.toJSON() : <any>undefined; | |
data["email"] = this.email ? this.email.toJSON() : <any>undefined; | |
data["ldap"] = this.ldap ? this.ldap.toJSON() : <any>undefined; | |
data["security"] = this.security ? this.security.toJSON() : <any>undefined; | |
data["billing"] = this.billing ? this.billing.toJSON() : <any>undefined; | |
return data; | |
} | |
} | |
export interface ITenantSettingsEditDto { | |
general: GeneralSettingsEditDto; | |
userManagement: TenantUserManagementSettingsEditDto; | |
email: EmailSettingsEditDto; | |
ldap: LdapSettingsEditDto; | |
security: SecuritySettingsEditDto; | |
billing: TenantBillingSettingsEditDto; | |
} | |
export class TenantUserManagementSettingsEditDto implements ITenantUserManagementSettingsEditDto { | |
allowSelfRegistration: boolean; | |
isNewRegisteredUserActiveByDefault: boolean; | |
isEmailConfirmationRequiredForLogin: boolean; | |
useCaptchaOnRegistration: boolean; | |
constructor(data?: ITenantUserManagementSettingsEditDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.allowSelfRegistration = data["allowSelfRegistration"]; | |
this.isNewRegisteredUserActiveByDefault = data["isNewRegisteredUserActiveByDefault"]; | |
this.isEmailConfirmationRequiredForLogin = data["isEmailConfirmationRequiredForLogin"]; | |
this.useCaptchaOnRegistration = data["useCaptchaOnRegistration"]; | |
} | |
} | |
static fromJS(data: any): TenantUserManagementSettingsEditDto { | |
let result = new TenantUserManagementSettingsEditDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["allowSelfRegistration"] = this.allowSelfRegistration; | |
data["isNewRegisteredUserActiveByDefault"] = this.isNewRegisteredUserActiveByDefault; | |
data["isEmailConfirmationRequiredForLogin"] = this.isEmailConfirmationRequiredForLogin; | |
data["useCaptchaOnRegistration"] = this.useCaptchaOnRegistration; | |
return data; | |
} | |
} | |
export interface ITenantUserManagementSettingsEditDto { | |
allowSelfRegistration: boolean; | |
isNewRegisteredUserActiveByDefault: boolean; | |
isEmailConfirmationRequiredForLogin: boolean; | |
useCaptchaOnRegistration: boolean; | |
} | |
export class LdapSettingsEditDto implements ILdapSettingsEditDto { | |
isModuleEnabled: boolean; | |
isEnabled: boolean; | |
domain: string; | |
userName: string; | |
password: string; | |
constructor(data?: ILdapSettingsEditDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.isModuleEnabled = data["isModuleEnabled"]; | |
this.isEnabled = data["isEnabled"]; | |
this.domain = data["domain"]; | |
this.userName = data["userName"]; | |
this.password = data["password"]; | |
} | |
} | |
static fromJS(data: any): LdapSettingsEditDto { | |
let result = new LdapSettingsEditDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["isModuleEnabled"] = this.isModuleEnabled; | |
data["isEnabled"] = this.isEnabled; | |
data["domain"] = this.domain; | |
data["userName"] = this.userName; | |
data["password"] = this.password; | |
return data; | |
} | |
} | |
export interface ILdapSettingsEditDto { | |
isModuleEnabled: boolean; | |
isEnabled: boolean; | |
domain: string; | |
userName: string; | |
password: string; | |
} | |
export class TenantBillingSettingsEditDto implements ITenantBillingSettingsEditDto { | |
legalName: string; | |
address: string; | |
taxVatNo: string; | |
constructor(data?: ITenantBillingSettingsEditDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.legalName = data["legalName"]; | |
this.address = data["address"]; | |
this.taxVatNo = data["taxVatNo"]; | |
} | |
} | |
static fromJS(data: any): TenantBillingSettingsEditDto { | |
let result = new TenantBillingSettingsEditDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["legalName"] = this.legalName; | |
data["address"] = this.address; | |
data["taxVatNo"] = this.taxVatNo; | |
return data; | |
} | |
} | |
export interface ITenantBillingSettingsEditDto { | |
legalName: string; | |
address: string; | |
taxVatNo: string; | |
} | |
export class ListResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null implements IListResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
items: NameValueDto[]; | |
constructor(data?: IListResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
if (data["items"] && data["items"].constructor === Array) { | |
this.items = []; | |
for (let item of data["items"]) | |
this.items.push(NameValueDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): ListResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
let result = new ListResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
if (this.items && this.items.constructor === Array) { | |
data["items"] = []; | |
for (let item of this.items) | |
data["items"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IListResultDto`1OfOfNameValueDtoAndAbpAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
items: NameValueDto[]; | |
} | |
export class AuthenticateModel implements IAuthenticateModel { | |
userNameOrEmailAddress: string; | |
password: string; | |
twoFactorVerificationCode: string; | |
rememberClient: boolean; | |
twoFactorRememberClientToken: string; | |
singleSignIn: boolean; | |
returnUrl: string; | |
constructor(data?: IAuthenticateModel) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.userNameOrEmailAddress = data["userNameOrEmailAddress"]; | |
this.password = data["password"]; | |
this.twoFactorVerificationCode = data["twoFactorVerificationCode"]; | |
this.rememberClient = data["rememberClient"]; | |
this.twoFactorRememberClientToken = data["twoFactorRememberClientToken"]; | |
this.singleSignIn = data["singleSignIn"]; | |
this.returnUrl = data["returnUrl"]; | |
} | |
} | |
static fromJS(data: any): AuthenticateModel { | |
let result = new AuthenticateModel(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["userNameOrEmailAddress"] = this.userNameOrEmailAddress; | |
data["password"] = this.password; | |
data["twoFactorVerificationCode"] = this.twoFactorVerificationCode; | |
data["rememberClient"] = this.rememberClient; | |
data["twoFactorRememberClientToken"] = this.twoFactorRememberClientToken; | |
data["singleSignIn"] = this.singleSignIn; | |
data["returnUrl"] = this.returnUrl; | |
return data; | |
} | |
} | |
export interface IAuthenticateModel { | |
userNameOrEmailAddress: string; | |
password: string; | |
twoFactorVerificationCode: string; | |
rememberClient: boolean; | |
twoFactorRememberClientToken: string; | |
singleSignIn: boolean; | |
returnUrl: string; | |
} | |
export class AuthenticateResultModel implements IAuthenticateResultModel { | |
accessToken: string; | |
encryptedAccessToken: string; | |
expireInSeconds: number; | |
shouldResetPassword: boolean; | |
passwordResetCode: string; | |
userId: number; | |
requiresTwoFactorVerification: boolean; | |
twoFactorAuthProviders: string[]; | |
twoFactorRememberClientToken: string; | |
returnUrl: string; | |
constructor(data?: IAuthenticateResultModel) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.accessToken = data["accessToken"]; | |
this.encryptedAccessToken = data["encryptedAccessToken"]; | |
this.expireInSeconds = data["expireInSeconds"]; | |
this.shouldResetPassword = data["shouldResetPassword"]; | |
this.passwordResetCode = data["passwordResetCode"]; | |
this.userId = data["userId"]; | |
this.requiresTwoFactorVerification = data["requiresTwoFactorVerification"]; | |
if (data["twoFactorAuthProviders"] && data["twoFactorAuthProviders"].constructor === Array) { | |
this.twoFactorAuthProviders = []; | |
for (let item of data["twoFactorAuthProviders"]) | |
this.twoFactorAuthProviders.push(item); | |
} | |
this.twoFactorRememberClientToken = data["twoFactorRememberClientToken"]; | |
this.returnUrl = data["returnUrl"]; | |
} | |
} | |
static fromJS(data: any): AuthenticateResultModel { | |
let result = new AuthenticateResultModel(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["accessToken"] = this.accessToken; | |
data["encryptedAccessToken"] = this.encryptedAccessToken; | |
data["expireInSeconds"] = this.expireInSeconds; | |
data["shouldResetPassword"] = this.shouldResetPassword; | |
data["passwordResetCode"] = this.passwordResetCode; | |
data["userId"] = this.userId; | |
data["requiresTwoFactorVerification"] = this.requiresTwoFactorVerification; | |
if (this.twoFactorAuthProviders && this.twoFactorAuthProviders.constructor === Array) { | |
data["twoFactorAuthProviders"] = []; | |
for (let item of this.twoFactorAuthProviders) | |
data["twoFactorAuthProviders"].push(item); | |
} | |
data["twoFactorRememberClientToken"] = this.twoFactorRememberClientToken; | |
data["returnUrl"] = this.returnUrl; | |
return data; | |
} | |
} | |
export interface IAuthenticateResultModel { | |
accessToken: string; | |
encryptedAccessToken: string; | |
expireInSeconds: number; | |
shouldResetPassword: boolean; | |
passwordResetCode: string; | |
userId: number; | |
requiresTwoFactorVerification: boolean; | |
twoFactorAuthProviders: string[]; | |
twoFactorRememberClientToken: string; | |
returnUrl: string; | |
} | |
export class SendTwoFactorAuthCodeModel implements ISendTwoFactorAuthCodeModel { | |
userId: number; | |
provider: string; | |
constructor(data?: ISendTwoFactorAuthCodeModel) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.userId = data["userId"]; | |
this.provider = data["provider"]; | |
} | |
} | |
static fromJS(data: any): SendTwoFactorAuthCodeModel { | |
let result = new SendTwoFactorAuthCodeModel(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["userId"] = this.userId; | |
data["provider"] = this.provider; | |
return data; | |
} | |
} | |
export interface ISendTwoFactorAuthCodeModel { | |
userId: number; | |
provider: string; | |
} | |
export class ImpersonatedAuthenticateResultModel implements IImpersonatedAuthenticateResultModel { | |
accessToken: string; | |
encryptedAccessToken: string; | |
expireInSeconds: number; | |
constructor(data?: IImpersonatedAuthenticateResultModel) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.accessToken = data["accessToken"]; | |
this.encryptedAccessToken = data["encryptedAccessToken"]; | |
this.expireInSeconds = data["expireInSeconds"]; | |
} | |
} | |
static fromJS(data: any): ImpersonatedAuthenticateResultModel { | |
let result = new ImpersonatedAuthenticateResultModel(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["accessToken"] = this.accessToken; | |
data["encryptedAccessToken"] = this.encryptedAccessToken; | |
data["expireInSeconds"] = this.expireInSeconds; | |
return data; | |
} | |
} | |
export interface IImpersonatedAuthenticateResultModel { | |
accessToken: string; | |
encryptedAccessToken: string; | |
expireInSeconds: number; | |
} | |
export class SwitchedAccountAuthenticateResultModel implements ISwitchedAccountAuthenticateResultModel { | |
accessToken: string; | |
encryptedAccessToken: string; | |
expireInSeconds: number; | |
constructor(data?: ISwitchedAccountAuthenticateResultModel) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.accessToken = data["accessToken"]; | |
this.encryptedAccessToken = data["encryptedAccessToken"]; | |
this.expireInSeconds = data["expireInSeconds"]; | |
} | |
} | |
static fromJS(data: any): SwitchedAccountAuthenticateResultModel { | |
let result = new SwitchedAccountAuthenticateResultModel(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["accessToken"] = this.accessToken; | |
data["encryptedAccessToken"] = this.encryptedAccessToken; | |
data["expireInSeconds"] = this.expireInSeconds; | |
return data; | |
} | |
} | |
export interface ISwitchedAccountAuthenticateResultModel { | |
accessToken: string; | |
encryptedAccessToken: string; | |
expireInSeconds: number; | |
} | |
export class ExternalLoginProviderInfoModel implements IExternalLoginProviderInfoModel { | |
name: string; | |
clientId: string; | |
constructor(data?: IExternalLoginProviderInfoModel) { | |
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"]; | |
this.clientId = data["clientId"]; | |
} | |
} | |
static fromJS(data: any): ExternalLoginProviderInfoModel { | |
let result = new ExternalLoginProviderInfoModel(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["name"] = this.name; | |
data["clientId"] = this.clientId; | |
return data; | |
} | |
} | |
export interface IExternalLoginProviderInfoModel { | |
name: string; | |
clientId: string; | |
} | |
export class ExternalAuthenticateModel implements IExternalAuthenticateModel { | |
authProvider: string; | |
providerKey: string; | |
providerAccessCode: string; | |
returnUrl: string; | |
singleSignIn: boolean; | |
constructor(data?: IExternalAuthenticateModel) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.authProvider = data["authProvider"]; | |
this.providerKey = data["providerKey"]; | |
this.providerAccessCode = data["providerAccessCode"]; | |
this.returnUrl = data["returnUrl"]; | |
this.singleSignIn = data["singleSignIn"]; | |
} | |
} | |
static fromJS(data: any): ExternalAuthenticateModel { | |
let result = new ExternalAuthenticateModel(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["authProvider"] = this.authProvider; | |
data["providerKey"] = this.providerKey; | |
data["providerAccessCode"] = this.providerAccessCode; | |
data["returnUrl"] = this.returnUrl; | |
data["singleSignIn"] = this.singleSignIn; | |
return data; | |
} | |
} | |
export interface IExternalAuthenticateModel { | |
authProvider: string; | |
providerKey: string; | |
providerAccessCode: string; | |
returnUrl: string; | |
singleSignIn: boolean; | |
} | |
export class ExternalAuthenticateResultModel implements IExternalAuthenticateResultModel { | |
accessToken: string; | |
encryptedAccessToken: string; | |
expireInSeconds: number; | |
waitingForActivation: boolean; | |
returnUrl: string; | |
constructor(data?: IExternalAuthenticateResultModel) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.accessToken = data["accessToken"]; | |
this.encryptedAccessToken = data["encryptedAccessToken"]; | |
this.expireInSeconds = data["expireInSeconds"]; | |
this.waitingForActivation = data["waitingForActivation"]; | |
this.returnUrl = data["returnUrl"]; | |
} | |
} | |
static fromJS(data: any): ExternalAuthenticateResultModel { | |
let result = new ExternalAuthenticateResultModel(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["accessToken"] = this.accessToken; | |
data["encryptedAccessToken"] = this.encryptedAccessToken; | |
data["expireInSeconds"] = this.expireInSeconds; | |
data["waitingForActivation"] = this.waitingForActivation; | |
data["returnUrl"] = this.returnUrl; | |
return data; | |
} | |
} | |
export interface IExternalAuthenticateResultModel { | |
accessToken: string; | |
encryptedAccessToken: string; | |
expireInSeconds: number; | |
waitingForActivation: boolean; | |
returnUrl: string; | |
} | |
export class UiCustomizationSettingsEditDto implements IUiCustomizationSettingsEditDto { | |
layout: UiCustomizationLayoutSettingsEditDto; | |
header: UiCustomizationHeaderSettingsEditDto; | |
menu: UiCustomizationMenuSettingsEditDto; | |
footer: UiCustomizationFooterSettingsEditDto; | |
constructor(data?: IUiCustomizationSettingsEditDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.layout = data["layout"] ? UiCustomizationLayoutSettingsEditDto.fromJS(data["layout"]) : <any>undefined; | |
this.header = data["header"] ? UiCustomizationHeaderSettingsEditDto.fromJS(data["header"]) : <any>undefined; | |
this.menu = data["menu"] ? UiCustomizationMenuSettingsEditDto.fromJS(data["menu"]) : <any>undefined; | |
this.footer = data["footer"] ? UiCustomizationFooterSettingsEditDto.fromJS(data["footer"]) : <any>undefined; | |
} | |
} | |
static fromJS(data: any): UiCustomizationSettingsEditDto { | |
let result = new UiCustomizationSettingsEditDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["layout"] = this.layout ? this.layout.toJSON() : <any>undefined; | |
data["header"] = this.header ? this.header.toJSON() : <any>undefined; | |
data["menu"] = this.menu ? this.menu.toJSON() : <any>undefined; | |
data["footer"] = this.footer ? this.footer.toJSON() : <any>undefined; | |
return data; | |
} | |
} | |
export interface IUiCustomizationSettingsEditDto { | |
layout: UiCustomizationLayoutSettingsEditDto; | |
header: UiCustomizationHeaderSettingsEditDto; | |
menu: UiCustomizationMenuSettingsEditDto; | |
footer: UiCustomizationFooterSettingsEditDto; | |
} | |
export class UiCustomizationLayoutSettingsEditDto implements IUiCustomizationLayoutSettingsEditDto { | |
layoutType: string; | |
pageLoader: string; | |
contentSkin: string; | |
constructor(data?: IUiCustomizationLayoutSettingsEditDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.layoutType = data["layoutType"]; | |
this.pageLoader = data["pageLoader"]; | |
this.contentSkin = data["contentSkin"]; | |
} | |
} | |
static fromJS(data: any): UiCustomizationLayoutSettingsEditDto { | |
let result = new UiCustomizationLayoutSettingsEditDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["layoutType"] = this.layoutType; | |
data["pageLoader"] = this.pageLoader; | |
data["contentSkin"] = this.contentSkin; | |
return data; | |
} | |
} | |
export interface IUiCustomizationLayoutSettingsEditDto { | |
layoutType: string; | |
pageLoader: string; | |
contentSkin: string; | |
} | |
export class UiCustomizationHeaderSettingsEditDto implements IUiCustomizationHeaderSettingsEditDto { | |
desktopFixedHeader: boolean; | |
desktopMinimizeMode: string; | |
mobileFixedHeader: boolean; | |
dropdownSkinDesktop: string; | |
displaySubmenuArrowDesktop: boolean; | |
dropdownSkin: string; | |
constructor(data?: IUiCustomizationHeaderSettingsEditDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.desktopFixedHeader = data["desktopFixedHeader"]; | |
this.desktopMinimizeMode = data["desktopMinimizeMode"]; | |
this.mobileFixedHeader = data["mobileFixedHeader"]; | |
this.dropdownSkinDesktop = data["dropdownSkinDesktop"]; | |
this.displaySubmenuArrowDesktop = data["displaySubmenuArrowDesktop"]; | |
this.dropdownSkin = data["dropdownSkin"]; | |
} | |
} | |
static fromJS(data: any): UiCustomizationHeaderSettingsEditDto { | |
let result = new UiCustomizationHeaderSettingsEditDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["desktopFixedHeader"] = this.desktopFixedHeader; | |
data["desktopMinimizeMode"] = this.desktopMinimizeMode; | |
data["mobileFixedHeader"] = this.mobileFixedHeader; | |
data["dropdownSkinDesktop"] = this.dropdownSkinDesktop; | |
data["displaySubmenuArrowDesktop"] = this.displaySubmenuArrowDesktop; | |
data["dropdownSkin"] = this.dropdownSkin; | |
return data; | |
} | |
} | |
export interface IUiCustomizationHeaderSettingsEditDto { | |
desktopFixedHeader: boolean; | |
desktopMinimizeMode: string; | |
mobileFixedHeader: boolean; | |
dropdownSkinDesktop: string; | |
displaySubmenuArrowDesktop: boolean; | |
dropdownSkin: string; | |
} | |
export class UiCustomizationMenuSettingsEditDto implements IUiCustomizationMenuSettingsEditDto { | |
position: string; | |
asideSkin: string; | |
fixedAside: boolean; | |
allowAsideMinimizing: boolean; | |
defaultMinimizedAside: boolean; | |
allowAsideHiding: boolean; | |
defaultHiddenAside: boolean; | |
submenuToggle: string; | |
dropdownSubmenuSkin: string; | |
dropdownSubmenuArrow: boolean; | |
constructor(data?: IUiCustomizationMenuSettingsEditDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.position = data["position"]; | |
this.asideSkin = data["asideSkin"]; | |
this.fixedAside = data["fixedAside"]; | |
this.allowAsideMinimizing = data["allowAsideMinimizing"]; | |
this.defaultMinimizedAside = data["defaultMinimizedAside"]; | |
this.allowAsideHiding = data["allowAsideHiding"]; | |
this.defaultHiddenAside = data["defaultHiddenAside"]; | |
this.submenuToggle = data["submenuToggle"]; | |
this.dropdownSubmenuSkin = data["dropdownSubmenuSkin"]; | |
this.dropdownSubmenuArrow = data["dropdownSubmenuArrow"]; | |
} | |
} | |
static fromJS(data: any): UiCustomizationMenuSettingsEditDto { | |
let result = new UiCustomizationMenuSettingsEditDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["position"] = this.position; | |
data["asideSkin"] = this.asideSkin; | |
data["fixedAside"] = this.fixedAside; | |
data["allowAsideMinimizing"] = this.allowAsideMinimizing; | |
data["defaultMinimizedAside"] = this.defaultMinimizedAside; | |
data["allowAsideHiding"] = this.allowAsideHiding; | |
data["defaultHiddenAside"] = this.defaultHiddenAside; | |
data["submenuToggle"] = this.submenuToggle; | |
data["dropdownSubmenuSkin"] = this.dropdownSubmenuSkin; | |
data["dropdownSubmenuArrow"] = this.dropdownSubmenuArrow; | |
return data; | |
} | |
} | |
export interface IUiCustomizationMenuSettingsEditDto { | |
position: string; | |
asideSkin: string; | |
fixedAside: boolean; | |
allowAsideMinimizing: boolean; | |
defaultMinimizedAside: boolean; | |
allowAsideHiding: boolean; | |
defaultHiddenAside: boolean; | |
submenuToggle: string; | |
dropdownSubmenuSkin: string; | |
dropdownSubmenuArrow: boolean; | |
} | |
export class UiCustomizationFooterSettingsEditDto implements IUiCustomizationFooterSettingsEditDto { | |
fixedFooter: boolean; | |
constructor(data?: IUiCustomizationFooterSettingsEditDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.fixedFooter = data["fixedFooter"]; | |
} | |
} | |
static fromJS(data: any): UiCustomizationFooterSettingsEditDto { | |
let result = new UiCustomizationFooterSettingsEditDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["fixedFooter"] = this.fixedFooter; | |
return data; | |
} | |
} | |
export interface IUiCustomizationFooterSettingsEditDto { | |
fixedFooter: boolean; | |
} | |
export class BuildingReadOutput implements IBuildingReadOutput { | |
buildingCodeName: string; | |
buildingName: string; | |
buildingDescription: string; | |
isActive: boolean; | |
buildingTypeId: number; | |
constructor(data?: IBuildingReadOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.buildingCodeName = data["buildingCodeName"]; | |
this.buildingName = data["buildingName"]; | |
this.buildingDescription = data["buildingDescription"]; | |
this.isActive = data["isActive"]; | |
this.buildingTypeId = data["buildingTypeId"]; | |
} | |
} | |
static fromJS(data: any): BuildingReadOutput { | |
let result = new BuildingReadOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["buildingCodeName"] = this.buildingCodeName; | |
data["buildingName"] = this.buildingName; | |
data["buildingDescription"] = this.buildingDescription; | |
data["isActive"] = this.isActive; | |
data["buildingTypeId"] = this.buildingTypeId; | |
return data; | |
} | |
} | |
export interface IBuildingReadOutput { | |
buildingCodeName: string; | |
buildingName: string; | |
buildingDescription: string; | |
isActive: boolean; | |
buildingTypeId: number; | |
} | |
export class BuildingCreateInput implements IBuildingCreateInput { | |
buildingCodeName: string; | |
buildingName: TranslationInput2 = new TranslationInput2(); | |
buildingDescription: TranslationInput2; | |
isActive: boolean; | |
buildingTypeId: number; | |
constructor(data?: IBuildingCreateInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.buildingCodeName = data["buildingCodeName"]; | |
this.buildingName = data["buildingName"] ? TranslationInput2.fromJS(data["buildingName"]) : new TranslationInput2(); | |
this.buildingDescription = data["buildingDescription"] ? TranslationInput2.fromJS(data["buildingDescription"]) : <any>undefined; | |
this.isActive = data["isActive"]; | |
this.buildingTypeId = data["buildingTypeId"]; | |
} | |
} | |
static fromJS(data: any): BuildingCreateInput { | |
let result = new BuildingCreateInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["buildingCodeName"] = this.buildingCodeName; | |
data["buildingName"] = this.buildingName ? this.buildingName.toJSON() : <any>undefined; | |
data["buildingDescription"] = this.buildingDescription ? this.buildingDescription.toJSON() : <any>undefined; | |
data["isActive"] = this.isActive; | |
data["buildingTypeId"] = this.buildingTypeId; | |
return data; | |
} | |
} | |
export interface IBuildingCreateInput { | |
buildingCodeName: string; | |
buildingName: TranslationInput2; | |
buildingDescription: TranslationInput2; | |
isActive: boolean; | |
buildingTypeId: number; | |
} | |
export class TranslationInput2 implements ITranslationInput2 { | |
eng: string; | |
vie: string; | |
khm: string; | |
tha: string; | |
lao: string; | |
chi: string; | |
kor: string; | |
jpn: string; | |
constructor(data?: ITranslationInput2) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.eng = data["eng"]; | |
this.vie = data["vie"]; | |
this.khm = data["khm"]; | |
this.tha = data["tha"]; | |
this.lao = data["lao"]; | |
this.chi = data["chi"]; | |
this.kor = data["kor"]; | |
this.jpn = data["jpn"]; | |
} | |
} | |
static fromJS(data: any): TranslationInput2 { | |
let result = new TranslationInput2(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["eng"] = this.eng; | |
data["vie"] = this.vie; | |
data["khm"] = this.khm; | |
data["tha"] = this.tha; | |
data["lao"] = this.lao; | |
data["chi"] = this.chi; | |
data["kor"] = this.kor; | |
data["jpn"] = this.jpn; | |
return data; | |
} | |
} | |
export interface ITranslationInput2 { | |
eng: string; | |
vie: string; | |
khm: string; | |
tha: string; | |
lao: string; | |
chi: string; | |
kor: string; | |
jpn: string; | |
} | |
export class BuildingUpdateInput implements IBuildingUpdateInput { | |
buildingId: number; | |
buildingCodeName: string; | |
buildingName: TranslationInput2; | |
buildingDescription: TranslationInput2; | |
isActive: boolean; | |
buildingTypeId: number; | |
constructor(data?: IBuildingUpdateInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.buildingId = data["buildingId"]; | |
this.buildingCodeName = data["buildingCodeName"]; | |
this.buildingName = data["buildingName"] ? TranslationInput2.fromJS(data["buildingName"]) : <any>undefined; | |
this.buildingDescription = data["buildingDescription"] ? TranslationInput2.fromJS(data["buildingDescription"]) : <any>undefined; | |
this.isActive = data["isActive"]; | |
this.buildingTypeId = data["buildingTypeId"]; | |
} | |
} | |
static fromJS(data: any): BuildingUpdateInput { | |
let result = new BuildingUpdateInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["buildingId"] = this.buildingId; | |
data["buildingCodeName"] = this.buildingCodeName; | |
data["buildingName"] = this.buildingName ? this.buildingName.toJSON() : <any>undefined; | |
data["buildingDescription"] = this.buildingDescription ? this.buildingDescription.toJSON() : <any>undefined; | |
data["isActive"] = this.isActive; | |
data["buildingTypeId"] = this.buildingTypeId; | |
return data; | |
} | |
} | |
export interface IBuildingUpdateInput { | |
buildingId: number; | |
buildingCodeName: string; | |
buildingName: TranslationInput2; | |
buildingDescription: TranslationInput2; | |
isActive: boolean; | |
buildingTypeId: number; | |
} | |
export class BuildingUpdateOutput implements IBuildingUpdateOutput { | |
buildingId: number; | |
buildingCodeName: string; | |
buildingName: TranslationOutput2; | |
buildingDescription: TranslationOutput2; | |
isActive: boolean; | |
buildingTypeId: number; | |
constructor(data?: IBuildingUpdateOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.buildingId = data["buildingId"]; | |
this.buildingCodeName = data["buildingCodeName"]; | |
this.buildingName = data["buildingName"] ? TranslationOutput2.fromJS(data["buildingName"]) : <any>undefined; | |
this.buildingDescription = data["buildingDescription"] ? TranslationOutput2.fromJS(data["buildingDescription"]) : <any>undefined; | |
this.isActive = data["isActive"]; | |
this.buildingTypeId = data["buildingTypeId"]; | |
} | |
} | |
static fromJS(data: any): BuildingUpdateOutput { | |
let result = new BuildingUpdateOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["buildingId"] = this.buildingId; | |
data["buildingCodeName"] = this.buildingCodeName; | |
data["buildingName"] = this.buildingName ? this.buildingName.toJSON() : <any>undefined; | |
data["buildingDescription"] = this.buildingDescription ? this.buildingDescription.toJSON() : <any>undefined; | |
data["isActive"] = this.isActive; | |
data["buildingTypeId"] = this.buildingTypeId; | |
return data; | |
} | |
} | |
export interface IBuildingUpdateOutput { | |
buildingId: number; | |
buildingCodeName: string; | |
buildingName: TranslationOutput2; | |
buildingDescription: TranslationOutput2; | |
isActive: boolean; | |
buildingTypeId: number; | |
} | |
export class TranslationOutput2 implements ITranslationOutput2 { | |
eng: string; | |
vie: string; | |
khm: string; | |
tha: string; | |
lao: string; | |
chi: string; | |
kor: string; | |
jpn: string; | |
constructor(data?: ITranslationOutput2) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.eng = data["eng"]; | |
this.vie = data["vie"]; | |
this.khm = data["khm"]; | |
this.tha = data["tha"]; | |
this.lao = data["lao"]; | |
this.chi = data["chi"]; | |
this.kor = data["kor"]; | |
this.jpn = data["jpn"]; | |
} | |
} | |
static fromJS(data: any): TranslationOutput2 { | |
let result = new TranslationOutput2(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["eng"] = this.eng; | |
data["vie"] = this.vie; | |
data["khm"] = this.khm; | |
data["tha"] = this.tha; | |
data["lao"] = this.lao; | |
data["chi"] = this.chi; | |
data["kor"] = this.kor; | |
data["jpn"] = this.jpn; | |
return data; | |
} | |
} | |
export interface ITranslationOutput2 { | |
eng: string; | |
vie: string; | |
khm: string; | |
tha: string; | |
lao: string; | |
chi: string; | |
kor: string; | |
jpn: string; | |
} | |
export class EmployeeReadOutput implements IEmployeeReadOutput { | |
tenantId: number; | |
employeeId: number; | |
educationId: number; | |
countryIssued: CountryReadOutput; | |
provinceIssuedId: number; | |
provinceIssued: ProvinceReadOutput; | |
dateOfBirth: moment.Moment; | |
fullName: string; | |
employeeCode: string; | |
email: string; | |
contractNo: string; | |
contractDate: moment.Moment; | |
contractExpiredDate: moment.Moment; | |
genderId: EmployeeReadOutputGenderId; | |
idCard: string; | |
issuedDate: moment.Moment; | |
positionId: number; | |
constructor(data?: IEmployeeReadOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.tenantId = data["tenantId"]; | |
this.employeeId = data["employeeId"]; | |
this.educationId = data["educationId"]; | |
this.countryIssued = data["countryIssued"] ? CountryReadOutput.fromJS(data["countryIssued"]) : <any>undefined; | |
this.provinceIssuedId = data["provinceIssuedId"]; | |
this.provinceIssued = data["provinceIssued"] ? ProvinceReadOutput.fromJS(data["provinceIssued"]) : <any>undefined; | |
this.dateOfBirth = data["dateOfBirth"] ? moment(data["dateOfBirth"].toString()) : <any>undefined; | |
this.fullName = data["fullName"]; | |
this.employeeCode = data["employeeCode"]; | |
this.email = data["email"]; | |
this.contractNo = data["contractNo"]; | |
this.contractDate = data["contractDate"] ? moment(data["contractDate"].toString()) : <any>undefined; | |
this.contractExpiredDate = data["contractExpiredDate"] ? moment(data["contractExpiredDate"].toString()) : <any>undefined; | |
this.genderId = data["genderId"]; | |
this.idCard = data["idCard"]; | |
this.issuedDate = data["issuedDate"] ? moment(data["issuedDate"].toString()) : <any>undefined; | |
this.positionId = data["positionId"]; | |
} | |
} | |
static fromJS(data: any): EmployeeReadOutput { | |
let result = new EmployeeReadOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["tenantId"] = this.tenantId; | |
data["employeeId"] = this.employeeId; | |
data["educationId"] = this.educationId; | |
data["countryIssued"] = this.countryIssued ? this.countryIssued.toJSON() : <any>undefined; | |
data["provinceIssuedId"] = this.provinceIssuedId; | |
data["provinceIssued"] = this.provinceIssued ? this.provinceIssued.toJSON() : <any>undefined; | |
data["dateOfBirth"] = this.dateOfBirth ? this.dateOfBirth.toISOString() : <any>undefined; | |
data["fullName"] = this.fullName; | |
data["employeeCode"] = this.employeeCode; | |
data["email"] = this.email; | |
data["contractNo"] = this.contractNo; | |
data["contractDate"] = this.contractDate ? this.contractDate.toISOString() : <any>undefined; | |
data["contractExpiredDate"] = this.contractExpiredDate ? this.contractExpiredDate.toISOString() : <any>undefined; | |
data["genderId"] = this.genderId; | |
data["idCard"] = this.idCard; | |
data["issuedDate"] = this.issuedDate ? this.issuedDate.toISOString() : <any>undefined; | |
data["positionId"] = this.positionId; | |
return data; | |
} | |
} | |
export interface IEmployeeReadOutput { | |
tenantId: number; | |
employeeId: number; | |
educationId: number; | |
countryIssued: CountryReadOutput; | |
provinceIssuedId: number; | |
provinceIssued: ProvinceReadOutput; | |
dateOfBirth: moment.Moment; | |
fullName: string; | |
employeeCode: string; | |
email: string; | |
contractNo: string; | |
contractDate: moment.Moment; | |
contractExpiredDate: moment.Moment; | |
genderId: EmployeeReadOutputGenderId; | |
idCard: string; | |
issuedDate: moment.Moment; | |
positionId: number; | |
} | |
export class CountryReadOutput implements ICountryReadOutput { | |
countryId: number; | |
countryName: string; | |
countryStatus: boolean; | |
constructor(data?: ICountryReadOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.countryId = data["countryId"]; | |
this.countryName = data["countryName"]; | |
this.countryStatus = data["countryStatus"]; | |
} | |
} | |
static fromJS(data: any): CountryReadOutput { | |
let result = new CountryReadOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["countryId"] = this.countryId; | |
data["countryName"] = this.countryName; | |
data["countryStatus"] = this.countryStatus; | |
return data; | |
} | |
} | |
export interface ICountryReadOutput { | |
countryId: number; | |
countryName: string; | |
countryStatus: boolean; | |
} | |
export class ProvinceReadOutput implements IProvinceReadOutput { | |
provinceId: number; | |
countryId: number; | |
provinceName: string; | |
provinceStatus: boolean; | |
constructor(data?: IProvinceReadOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.provinceId = data["provinceId"]; | |
this.countryId = data["countryId"]; | |
this.provinceName = data["provinceName"]; | |
this.provinceStatus = data["provinceStatus"]; | |
} | |
} | |
static fromJS(data: any): ProvinceReadOutput { | |
let result = new ProvinceReadOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["provinceId"] = this.provinceId; | |
data["countryId"] = this.countryId; | |
data["provinceName"] = this.provinceName; | |
data["provinceStatus"] = this.provinceStatus; | |
return data; | |
} | |
} | |
export interface IProvinceReadOutput { | |
provinceId: number; | |
countryId: number; | |
provinceName: string; | |
provinceStatus: boolean; | |
} | |
export class EmployeeCreateInput implements IEmployeeCreateInput { | |
tenantId: number; | |
employeeId: number; | |
educationId: number; | |
countryIssued: CountryCreateInput; | |
provinceIssuedId: number; | |
provinceIssued: ProvinceCreateInput; | |
dateOfBirth: moment.Moment; | |
fullName: string; | |
employeeCode: string; | |
email: string; | |
contractNo: string; | |
contractDate: moment.Moment; | |
contractExpiredDate: moment.Moment; | |
genderId: EmployeeCreateInputGenderId; | |
idCard: string; | |
issuedDate: moment.Moment; | |
positionId: number; | |
constructor(data?: IEmployeeCreateInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.tenantId = data["tenantId"]; | |
this.employeeId = data["employeeId"]; | |
this.educationId = data["educationId"]; | |
this.countryIssued = data["countryIssued"] ? CountryCreateInput.fromJS(data["countryIssued"]) : <any>undefined; | |
this.provinceIssuedId = data["provinceIssuedId"]; | |
this.provinceIssued = data["provinceIssued"] ? ProvinceCreateInput.fromJS(data["provinceIssued"]) : <any>undefined; | |
this.dateOfBirth = data["dateOfBirth"] ? moment(data["dateOfBirth"].toString()) : <any>undefined; | |
this.fullName = data["fullName"]; | |
this.employeeCode = data["employeeCode"]; | |
this.email = data["email"]; | |
this.contractNo = data["contractNo"]; | |
this.contractDate = data["contractDate"] ? moment(data["contractDate"].toString()) : <any>undefined; | |
this.contractExpiredDate = data["contractExpiredDate"] ? moment(data["contractExpiredDate"].toString()) : <any>undefined; | |
this.genderId = data["genderId"]; | |
this.idCard = data["idCard"]; | |
this.issuedDate = data["issuedDate"] ? moment(data["issuedDate"].toString()) : <any>undefined; | |
this.positionId = data["positionId"]; | |
} | |
} | |
static fromJS(data: any): EmployeeCreateInput { | |
let result = new EmployeeCreateInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["tenantId"] = this.tenantId; | |
data["employeeId"] = this.employeeId; | |
data["educationId"] = this.educationId; | |
data["countryIssued"] = this.countryIssued ? this.countryIssued.toJSON() : <any>undefined; | |
data["provinceIssuedId"] = this.provinceIssuedId; | |
data["provinceIssued"] = this.provinceIssued ? this.provinceIssued.toJSON() : <any>undefined; | |
data["dateOfBirth"] = this.dateOfBirth ? this.dateOfBirth.toISOString() : <any>undefined; | |
data["fullName"] = this.fullName; | |
data["employeeCode"] = this.employeeCode; | |
data["email"] = this.email; | |
data["contractNo"] = this.contractNo; | |
data["contractDate"] = this.contractDate ? this.contractDate.toISOString() : <any>undefined; | |
data["contractExpiredDate"] = this.contractExpiredDate ? this.contractExpiredDate.toISOString() : <any>undefined; | |
data["genderId"] = this.genderId; | |
data["idCard"] = this.idCard; | |
data["issuedDate"] = this.issuedDate ? this.issuedDate.toISOString() : <any>undefined; | |
data["positionId"] = this.positionId; | |
return data; | |
} | |
} | |
export interface IEmployeeCreateInput { | |
tenantId: number; | |
employeeId: number; | |
educationId: number; | |
countryIssued: CountryCreateInput; | |
provinceIssuedId: number; | |
provinceIssued: ProvinceCreateInput; | |
dateOfBirth: moment.Moment; | |
fullName: string; | |
employeeCode: string; | |
email: string; | |
contractNo: string; | |
contractDate: moment.Moment; | |
contractExpiredDate: moment.Moment; | |
genderId: EmployeeCreateInputGenderId; | |
idCard: string; | |
issuedDate: moment.Moment; | |
positionId: number; | |
} | |
export class CountryCreateInput implements ICountryCreateInput { | |
countryId: number; | |
countryNameIdLang: TranslationInput2; | |
countryStatus: boolean; | |
constructor(data?: ICountryCreateInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.countryId = data["countryId"]; | |
this.countryNameIdLang = data["countryNameIdLang"] ? TranslationInput2.fromJS(data["countryNameIdLang"]) : <any>undefined; | |
this.countryStatus = data["countryStatus"]; | |
} | |
} | |
static fromJS(data: any): CountryCreateInput { | |
let result = new CountryCreateInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["countryId"] = this.countryId; | |
data["countryNameIdLang"] = this.countryNameIdLang ? this.countryNameIdLang.toJSON() : <any>undefined; | |
data["countryStatus"] = this.countryStatus; | |
return data; | |
} | |
} | |
export interface ICountryCreateInput { | |
countryId: number; | |
countryNameIdLang: TranslationInput2; | |
countryStatus: boolean; | |
} | |
export class ProvinceCreateInput implements IProvinceCreateInput { | |
provinceId: number; | |
countryId: number; | |
provinceNameIdLang: TranslationInput2; | |
provinceStatus: boolean; | |
constructor(data?: IProvinceCreateInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.provinceId = data["provinceId"]; | |
this.countryId = data["countryId"]; | |
this.provinceNameIdLang = data["provinceNameIdLang"] ? TranslationInput2.fromJS(data["provinceNameIdLang"]) : <any>undefined; | |
this.provinceStatus = data["provinceStatus"]; | |
} | |
} | |
static fromJS(data: any): ProvinceCreateInput { | |
let result = new ProvinceCreateInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["provinceId"] = this.provinceId; | |
data["countryId"] = this.countryId; | |
data["provinceNameIdLang"] = this.provinceNameIdLang ? this.provinceNameIdLang.toJSON() : <any>undefined; | |
data["provinceStatus"] = this.provinceStatus; | |
return data; | |
} | |
} | |
export interface IProvinceCreateInput { | |
provinceId: number; | |
countryId: number; | |
provinceNameIdLang: TranslationInput2; | |
provinceStatus: boolean; | |
} | |
export class EmployeeUpdateInput implements IEmployeeUpdateInput { | |
tenantId: number; | |
employeeId: number; | |
educationId: number; | |
countryIssued: CountryUpdateInput; | |
provinceIssuedId: number; | |
provinceIssued: ProvinceUpdateInput; | |
dateOfBirth: moment.Moment; | |
fullName: string; | |
employeeCode: string; | |
email: string; | |
contractNo: string; | |
contractDate: moment.Moment; | |
contractExpiredDate: moment.Moment; | |
genderId: EmployeeUpdateInputGenderId; | |
idCard: string; | |
issuedDate: moment.Moment; | |
positionId: number; | |
constructor(data?: IEmployeeUpdateInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.tenantId = data["tenantId"]; | |
this.employeeId = data["employeeId"]; | |
this.educationId = data["educationId"]; | |
this.countryIssued = data["countryIssued"] ? CountryUpdateInput.fromJS(data["countryIssued"]) : <any>undefined; | |
this.provinceIssuedId = data["provinceIssuedId"]; | |
this.provinceIssued = data["provinceIssued"] ? ProvinceUpdateInput.fromJS(data["provinceIssued"]) : <any>undefined; | |
this.dateOfBirth = data["dateOfBirth"] ? moment(data["dateOfBirth"].toString()) : <any>undefined; | |
this.fullName = data["fullName"]; | |
this.employeeCode = data["employeeCode"]; | |
this.email = data["email"]; | |
this.contractNo = data["contractNo"]; | |
this.contractDate = data["contractDate"] ? moment(data["contractDate"].toString()) : <any>undefined; | |
this.contractExpiredDate = data["contractExpiredDate"] ? moment(data["contractExpiredDate"].toString()) : <any>undefined; | |
this.genderId = data["genderId"]; | |
this.idCard = data["idCard"]; | |
this.issuedDate = data["issuedDate"] ? moment(data["issuedDate"].toString()) : <any>undefined; | |
this.positionId = data["positionId"]; | |
} | |
} | |
static fromJS(data: any): EmployeeUpdateInput { | |
let result = new EmployeeUpdateInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["tenantId"] = this.tenantId; | |
data["employeeId"] = this.employeeId; | |
data["educationId"] = this.educationId; | |
data["countryIssued"] = this.countryIssued ? this.countryIssued.toJSON() : <any>undefined; | |
data["provinceIssuedId"] = this.provinceIssuedId; | |
data["provinceIssued"] = this.provinceIssued ? this.provinceIssued.toJSON() : <any>undefined; | |
data["dateOfBirth"] = this.dateOfBirth ? this.dateOfBirth.toISOString() : <any>undefined; | |
data["fullName"] = this.fullName; | |
data["employeeCode"] = this.employeeCode; | |
data["email"] = this.email; | |
data["contractNo"] = this.contractNo; | |
data["contractDate"] = this.contractDate ? this.contractDate.toISOString() : <any>undefined; | |
data["contractExpiredDate"] = this.contractExpiredDate ? this.contractExpiredDate.toISOString() : <any>undefined; | |
data["genderId"] = this.genderId; | |
data["idCard"] = this.idCard; | |
data["issuedDate"] = this.issuedDate ? this.issuedDate.toISOString() : <any>undefined; | |
data["positionId"] = this.positionId; | |
return data; | |
} | |
} | |
export interface IEmployeeUpdateInput { | |
tenantId: number; | |
employeeId: number; | |
educationId: number; | |
countryIssued: CountryUpdateInput; | |
provinceIssuedId: number; | |
provinceIssued: ProvinceUpdateInput; | |
dateOfBirth: moment.Moment; | |
fullName: string; | |
employeeCode: string; | |
email: string; | |
contractNo: string; | |
contractDate: moment.Moment; | |
contractExpiredDate: moment.Moment; | |
genderId: EmployeeUpdateInputGenderId; | |
idCard: string; | |
issuedDate: moment.Moment; | |
positionId: number; | |
} | |
export class CountryUpdateInput implements ICountryUpdateInput { | |
countryId: number; | |
countryNameIdLang: TranslationInput2; | |
countryStatus: boolean; | |
constructor(data?: ICountryUpdateInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.countryId = data["countryId"]; | |
this.countryNameIdLang = data["countryNameIdLang"] ? TranslationInput2.fromJS(data["countryNameIdLang"]) : <any>undefined; | |
this.countryStatus = data["countryStatus"]; | |
} | |
} | |
static fromJS(data: any): CountryUpdateInput { | |
let result = new CountryUpdateInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["countryId"] = this.countryId; | |
data["countryNameIdLang"] = this.countryNameIdLang ? this.countryNameIdLang.toJSON() : <any>undefined; | |
data["countryStatus"] = this.countryStatus; | |
return data; | |
} | |
} | |
export interface ICountryUpdateInput { | |
countryId: number; | |
countryNameIdLang: TranslationInput2; | |
countryStatus: boolean; | |
} | |
export class ProvinceUpdateInput implements IProvinceUpdateInput { | |
provinceId: number; | |
countryId: number; | |
provinceNameIdLang: TranslationInput2; | |
provinceStatus: boolean; | |
constructor(data?: IProvinceUpdateInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.provinceId = data["provinceId"]; | |
this.countryId = data["countryId"]; | |
this.provinceNameIdLang = data["provinceNameIdLang"] ? TranslationInput2.fromJS(data["provinceNameIdLang"]) : <any>undefined; | |
this.provinceStatus = data["provinceStatus"]; | |
} | |
} | |
static fromJS(data: any): ProvinceUpdateInput { | |
let result = new ProvinceUpdateInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["provinceId"] = this.provinceId; | |
data["countryId"] = this.countryId; | |
data["provinceNameIdLang"] = this.provinceNameIdLang ? this.provinceNameIdLang.toJSON() : <any>undefined; | |
data["provinceStatus"] = this.provinceStatus; | |
return data; | |
} | |
} | |
export interface IProvinceUpdateInput { | |
provinceId: number; | |
countryId: number; | |
provinceNameIdLang: TranslationInput2; | |
provinceStatus: boolean; | |
} | |
export class EmployeeUpdateOutput implements IEmployeeUpdateOutput { | |
tenantId: number; | |
employeeId: number; | |
educationId: number; | |
countryIssued: CountryUpdateOutput; | |
provinceIssuedId: number; | |
provinceIssued: ProvinceUpdateOutput; | |
dateOfBirth: moment.Moment; | |
fullName: string; | |
employeeCode: string; | |
email: string; | |
contractNo: string; | |
contractDate: moment.Moment; | |
contractExpiredDate: moment.Moment; | |
genderId: EmployeeUpdateOutputGenderId; | |
idCard: string; | |
issuedDate: moment.Moment; | |
positionId: number; | |
constructor(data?: IEmployeeUpdateOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.tenantId = data["tenantId"]; | |
this.employeeId = data["employeeId"]; | |
this.educationId = data["educationId"]; | |
this.countryIssued = data["countryIssued"] ? CountryUpdateOutput.fromJS(data["countryIssued"]) : <any>undefined; | |
this.provinceIssuedId = data["provinceIssuedId"]; | |
this.provinceIssued = data["provinceIssued"] ? ProvinceUpdateOutput.fromJS(data["provinceIssued"]) : <any>undefined; | |
this.dateOfBirth = data["dateOfBirth"] ? moment(data["dateOfBirth"].toString()) : <any>undefined; | |
this.fullName = data["fullName"]; | |
this.employeeCode = data["employeeCode"]; | |
this.email = data["email"]; | |
this.contractNo = data["contractNo"]; | |
this.contractDate = data["contractDate"] ? moment(data["contractDate"].toString()) : <any>undefined; | |
this.contractExpiredDate = data["contractExpiredDate"] ? moment(data["contractExpiredDate"].toString()) : <any>undefined; | |
this.genderId = data["genderId"]; | |
this.idCard = data["idCard"]; | |
this.issuedDate = data["issuedDate"] ? moment(data["issuedDate"].toString()) : <any>undefined; | |
this.positionId = data["positionId"]; | |
} | |
} | |
static fromJS(data: any): EmployeeUpdateOutput { | |
let result = new EmployeeUpdateOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["tenantId"] = this.tenantId; | |
data["employeeId"] = this.employeeId; | |
data["educationId"] = this.educationId; | |
data["countryIssued"] = this.countryIssued ? this.countryIssued.toJSON() : <any>undefined; | |
data["provinceIssuedId"] = this.provinceIssuedId; | |
data["provinceIssued"] = this.provinceIssued ? this.provinceIssued.toJSON() : <any>undefined; | |
data["dateOfBirth"] = this.dateOfBirth ? this.dateOfBirth.toISOString() : <any>undefined; | |
data["fullName"] = this.fullName; | |
data["employeeCode"] = this.employeeCode; | |
data["email"] = this.email; | |
data["contractNo"] = this.contractNo; | |
data["contractDate"] = this.contractDate ? this.contractDate.toISOString() : <any>undefined; | |
data["contractExpiredDate"] = this.contractExpiredDate ? this.contractExpiredDate.toISOString() : <any>undefined; | |
data["genderId"] = this.genderId; | |
data["idCard"] = this.idCard; | |
data["issuedDate"] = this.issuedDate ? this.issuedDate.toISOString() : <any>undefined; | |
data["positionId"] = this.positionId; | |
return data; | |
} | |
} | |
export interface IEmployeeUpdateOutput { | |
tenantId: number; | |
employeeId: number; | |
educationId: number; | |
countryIssued: CountryUpdateOutput; | |
provinceIssuedId: number; | |
provinceIssued: ProvinceUpdateOutput; | |
dateOfBirth: moment.Moment; | |
fullName: string; | |
employeeCode: string; | |
email: string; | |
contractNo: string; | |
contractDate: moment.Moment; | |
contractExpiredDate: moment.Moment; | |
genderId: EmployeeUpdateOutputGenderId; | |
idCard: string; | |
issuedDate: moment.Moment; | |
positionId: number; | |
} | |
export class CountryUpdateOutput implements ICountryUpdateOutput { | |
countryId: number; | |
countryName: TranslationOutput2; | |
countryStatus: boolean; | |
constructor(data?: ICountryUpdateOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.countryId = data["countryId"]; | |
this.countryName = data["countryName"] ? TranslationOutput2.fromJS(data["countryName"]) : <any>undefined; | |
this.countryStatus = data["countryStatus"]; | |
} | |
} | |
static fromJS(data: any): CountryUpdateOutput { | |
let result = new CountryUpdateOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["countryId"] = this.countryId; | |
data["countryName"] = this.countryName ? this.countryName.toJSON() : <any>undefined; | |
data["countryStatus"] = this.countryStatus; | |
return data; | |
} | |
} | |
export interface ICountryUpdateOutput { | |
countryId: number; | |
countryName: TranslationOutput2; | |
countryStatus: boolean; | |
} | |
export class ProvinceUpdateOutput implements IProvinceUpdateOutput { | |
provinceId: number; | |
countryId: number; | |
provinceName: TranslationOutput2; | |
provinceStatus: boolean; | |
constructor(data?: IProvinceUpdateOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.provinceId = data["provinceId"]; | |
this.countryId = data["countryId"]; | |
this.provinceName = data["provinceName"] ? TranslationOutput2.fromJS(data["provinceName"]) : <any>undefined; | |
this.provinceStatus = data["provinceStatus"]; | |
} | |
} | |
static fromJS(data: any): ProvinceUpdateOutput { | |
let result = new ProvinceUpdateOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["provinceId"] = this.provinceId; | |
data["countryId"] = this.countryId; | |
data["provinceName"] = this.provinceName ? this.provinceName.toJSON() : <any>undefined; | |
data["provinceStatus"] = this.provinceStatus; | |
return data; | |
} | |
} | |
export interface IProvinceUpdateOutput { | |
provinceId: number; | |
countryId: number; | |
provinceName: TranslationOutput2; | |
provinceStatus: boolean; | |
} | |
export class FloorReadOutput implements IFloorReadOutput { | |
floorCodeName: string; | |
floorName: string; | |
floorDescription: string; | |
isActive: boolean; | |
floorTypeId: number; | |
constructor(data?: IFloorReadOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.floorCodeName = data["floorCodeName"]; | |
this.floorName = data["floorName"]; | |
this.floorDescription = data["floorDescription"]; | |
this.isActive = data["isActive"]; | |
this.floorTypeId = data["floorTypeId"]; | |
} | |
} | |
static fromJS(data: any): FloorReadOutput { | |
let result = new FloorReadOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["floorCodeName"] = this.floorCodeName; | |
data["floorName"] = this.floorName; | |
data["floorDescription"] = this.floorDescription; | |
data["isActive"] = this.isActive; | |
data["floorTypeId"] = this.floorTypeId; | |
return data; | |
} | |
} | |
export interface IFloorReadOutput { | |
floorCodeName: string; | |
floorName: string; | |
floorDescription: string; | |
isActive: boolean; | |
floorTypeId: number; | |
} | |
export class FloorCreateInput implements IFloorCreateInput { | |
floorCodeName: string; | |
floorName: TranslationInput2 = new TranslationInput2(); | |
floorDescription: TranslationInput2; | |
isActive: boolean; | |
floorTypeId: number; | |
constructor(data?: IFloorCreateInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.floorCodeName = data["floorCodeName"]; | |
this.floorName = data["floorName"] ? TranslationInput2.fromJS(data["floorName"]) : new TranslationInput2(); | |
this.floorDescription = data["floorDescription"] ? TranslationInput2.fromJS(data["floorDescription"]) : <any>undefined; | |
this.isActive = data["isActive"]; | |
this.floorTypeId = data["floorTypeId"]; | |
} | |
} | |
static fromJS(data: any): FloorCreateInput { | |
let result = new FloorCreateInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["floorCodeName"] = this.floorCodeName; | |
data["floorName"] = this.floorName ? this.floorName.toJSON() : <any>undefined; | |
data["floorDescription"] = this.floorDescription ? this.floorDescription.toJSON() : <any>undefined; | |
data["isActive"] = this.isActive; | |
data["floorTypeId"] = this.floorTypeId; | |
return data; | |
} | |
} | |
export interface IFloorCreateInput { | |
floorCodeName: string; | |
floorName: TranslationInput2; | |
floorDescription: TranslationInput2; | |
isActive: boolean; | |
floorTypeId: number; | |
} | |
export class FloorUpdateInput implements IFloorUpdateInput { | |
floorId: number; | |
floorCodeName: string; | |
floorName: TranslationInput2; | |
floorDescription: TranslationInput2; | |
isActive: boolean; | |
floorTypeId: number; | |
constructor(data?: IFloorUpdateInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.floorId = data["floorId"]; | |
this.floorCodeName = data["floorCodeName"]; | |
this.floorName = data["floorName"] ? TranslationInput2.fromJS(data["floorName"]) : <any>undefined; | |
this.floorDescription = data["floorDescription"] ? TranslationInput2.fromJS(data["floorDescription"]) : <any>undefined; | |
this.isActive = data["isActive"]; | |
this.floorTypeId = data["floorTypeId"]; | |
} | |
} | |
static fromJS(data: any): FloorUpdateInput { | |
let result = new FloorUpdateInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["floorId"] = this.floorId; | |
data["floorCodeName"] = this.floorCodeName; | |
data["floorName"] = this.floorName ? this.floorName.toJSON() : <any>undefined; | |
data["floorDescription"] = this.floorDescription ? this.floorDescription.toJSON() : <any>undefined; | |
data["isActive"] = this.isActive; | |
data["floorTypeId"] = this.floorTypeId; | |
return data; | |
} | |
} | |
export interface IFloorUpdateInput { | |
floorId: number; | |
floorCodeName: string; | |
floorName: TranslationInput2; | |
floorDescription: TranslationInput2; | |
isActive: boolean; | |
floorTypeId: number; | |
} | |
export class FloorUpdateOutput implements IFloorUpdateOutput { | |
floorId: number; | |
floorCodeName: string; | |
floorName: TranslationOutput2; | |
floorDescription: TranslationOutput2; | |
isActive: boolean; | |
floorTypeId: number; | |
constructor(data?: IFloorUpdateOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.floorId = data["floorId"]; | |
this.floorCodeName = data["floorCodeName"]; | |
this.floorName = data["floorName"] ? TranslationOutput2.fromJS(data["floorName"]) : <any>undefined; | |
this.floorDescription = data["floorDescription"] ? TranslationOutput2.fromJS(data["floorDescription"]) : <any>undefined; | |
this.isActive = data["isActive"]; | |
this.floorTypeId = data["floorTypeId"]; | |
} | |
} | |
static fromJS(data: any): FloorUpdateOutput { | |
let result = new FloorUpdateOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["floorId"] = this.floorId; | |
data["floorCodeName"] = this.floorCodeName; | |
data["floorName"] = this.floorName ? this.floorName.toJSON() : <any>undefined; | |
data["floorDescription"] = this.floorDescription ? this.floorDescription.toJSON() : <any>undefined; | |
data["isActive"] = this.isActive; | |
data["floorTypeId"] = this.floorTypeId; | |
return data; | |
} | |
} | |
export interface IFloorUpdateOutput { | |
floorId: number; | |
floorCodeName: string; | |
floorName: TranslationOutput2; | |
floorDescription: TranslationOutput2; | |
isActive: boolean; | |
floorTypeId: number; | |
} | |
export class MemberReadOutput implements IMemberReadOutput { | |
memberId: number; | |
address: AddressReadOutput; | |
countryIssued: CountryReadOutput; | |
provinceIssuedId: number; | |
provinceIssued: ProvinceReadOutput; | |
dateOfBirth: moment.Moment; | |
fullName: string; | |
email: string; | |
gender: MemberReadOutputGender; | |
idCard: string; | |
constructor(data?: IMemberReadOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.memberId = data["memberId"]; | |
this.address = data["address"] ? AddressReadOutput.fromJS(data["address"]) : <any>undefined; | |
this.countryIssued = data["countryIssued"] ? CountryReadOutput.fromJS(data["countryIssued"]) : <any>undefined; | |
this.provinceIssuedId = data["provinceIssuedId"]; | |
this.provinceIssued = data["provinceIssued"] ? ProvinceReadOutput.fromJS(data["provinceIssued"]) : <any>undefined; | |
this.dateOfBirth = data["dateOfBirth"] ? moment(data["dateOfBirth"].toString()) : <any>undefined; | |
this.fullName = data["fullName"]; | |
this.email = data["email"]; | |
this.gender = data["gender"]; | |
this.idCard = data["idCard"]; | |
} | |
} | |
static fromJS(data: any): MemberReadOutput { | |
let result = new MemberReadOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["memberId"] = this.memberId; | |
data["address"] = this.address ? this.address.toJSON() : <any>undefined; | |
data["countryIssued"] = this.countryIssued ? this.countryIssued.toJSON() : <any>undefined; | |
data["provinceIssuedId"] = this.provinceIssuedId; | |
data["provinceIssued"] = this.provinceIssued ? this.provinceIssued.toJSON() : <any>undefined; | |
data["dateOfBirth"] = this.dateOfBirth ? this.dateOfBirth.toISOString() : <any>undefined; | |
data["fullName"] = this.fullName; | |
data["email"] = this.email; | |
data["gender"] = this.gender; | |
data["idCard"] = this.idCard; | |
return data; | |
} | |
} | |
export interface IMemberReadOutput { | |
memberId: number; | |
address: AddressReadOutput; | |
countryIssued: CountryReadOutput; | |
provinceIssuedId: number; | |
provinceIssued: ProvinceReadOutput; | |
dateOfBirth: moment.Moment; | |
fullName: string; | |
email: string; | |
gender: MemberReadOutputGender; | |
idCard: string; | |
} | |
export class AddressReadOutput implements IAddressReadOutput { | |
addressTypeId: number; | |
fullAddress: string; | |
constructor(data?: IAddressReadOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.addressTypeId = data["addressTypeId"]; | |
this.fullAddress = data["fullAddress"]; | |
} | |
} | |
static fromJS(data: any): AddressReadOutput { | |
let result = new AddressReadOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["addressTypeId"] = this.addressTypeId; | |
data["fullAddress"] = this.fullAddress; | |
return data; | |
} | |
} | |
export interface IAddressReadOutput { | |
addressTypeId: number; | |
fullAddress: string; | |
} | |
export class MemberCreateInput implements IMemberCreateInput { | |
memberId: number; | |
address: AddressCreateInput; | |
countryIssued: CountryCreateInput; | |
provinceIssued: ProvinceCreateInput; | |
dateOfBirth: moment.Moment; | |
fullName: string; | |
email: string; | |
gender: MemberCreateInputGender; | |
idCard: string; | |
constructor(data?: IMemberCreateInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.memberId = data["memberId"]; | |
this.address = data["address"] ? AddressCreateInput.fromJS(data["address"]) : <any>undefined; | |
this.countryIssued = data["countryIssued"] ? CountryCreateInput.fromJS(data["countryIssued"]) : <any>undefined; | |
this.provinceIssued = data["provinceIssued"] ? ProvinceCreateInput.fromJS(data["provinceIssued"]) : <any>undefined; | |
this.dateOfBirth = data["dateOfBirth"] ? moment(data["dateOfBirth"].toString()) : <any>undefined; | |
this.fullName = data["fullName"]; | |
this.email = data["email"]; | |
this.gender = data["gender"]; | |
this.idCard = data["idCard"]; | |
} | |
} | |
static fromJS(data: any): MemberCreateInput { | |
let result = new MemberCreateInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["memberId"] = this.memberId; | |
data["address"] = this.address ? this.address.toJSON() : <any>undefined; | |
data["countryIssued"] = this.countryIssued ? this.countryIssued.toJSON() : <any>undefined; | |
data["provinceIssued"] = this.provinceIssued ? this.provinceIssued.toJSON() : <any>undefined; | |
data["dateOfBirth"] = this.dateOfBirth ? this.dateOfBirth.toISOString() : <any>undefined; | |
data["fullName"] = this.fullName; | |
data["email"] = this.email; | |
data["gender"] = this.gender; | |
data["idCard"] = this.idCard; | |
return data; | |
} | |
} | |
export interface IMemberCreateInput { | |
memberId: number; | |
address: AddressCreateInput; | |
countryIssued: CountryCreateInput; | |
provinceIssued: ProvinceCreateInput; | |
dateOfBirth: moment.Moment; | |
fullName: string; | |
email: string; | |
gender: MemberCreateInputGender; | |
idCard: string; | |
} | |
export class AddressCreateInput implements IAddressCreateInput { | |
addressTypeId: number; | |
fullAddress: string; | |
constructor(data?: IAddressCreateInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.addressTypeId = data["addressTypeId"]; | |
this.fullAddress = data["fullAddress"]; | |
} | |
} | |
static fromJS(data: any): AddressCreateInput { | |
let result = new AddressCreateInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["addressTypeId"] = this.addressTypeId; | |
data["fullAddress"] = this.fullAddress; | |
return data; | |
} | |
} | |
export interface IAddressCreateInput { | |
addressTypeId: number; | |
fullAddress: string; | |
} | |
export class MemberUpdateInput implements IMemberUpdateInput { | |
memberId: number; | |
tenantId: number; | |
address: AddressUpdateInput; | |
countryIssued: CountryUpdateInput; | |
provinceIssued: ProvinceUpdateInput; | |
dateOfBirth: moment.Moment; | |
fullName: string; | |
email: string; | |
gender: MemberUpdateInputGender; | |
idCard: string; | |
constructor(data?: IMemberUpdateInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.memberId = data["memberId"]; | |
this.tenantId = data["tenantId"]; | |
this.address = data["address"] ? AddressUpdateInput.fromJS(data["address"]) : <any>undefined; | |
this.countryIssued = data["countryIssued"] ? CountryUpdateInput.fromJS(data["countryIssued"]) : <any>undefined; | |
this.provinceIssued = data["provinceIssued"] ? ProvinceUpdateInput.fromJS(data["provinceIssued"]) : <any>undefined; | |
this.dateOfBirth = data["dateOfBirth"] ? moment(data["dateOfBirth"].toString()) : <any>undefined; | |
this.fullName = data["fullName"]; | |
this.email = data["email"]; | |
this.gender = data["gender"]; | |
this.idCard = data["idCard"]; | |
} | |
} | |
static fromJS(data: any): MemberUpdateInput { | |
let result = new MemberUpdateInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["memberId"] = this.memberId; | |
data["tenantId"] = this.tenantId; | |
data["address"] = this.address ? this.address.toJSON() : <any>undefined; | |
data["countryIssued"] = this.countryIssued ? this.countryIssued.toJSON() : <any>undefined; | |
data["provinceIssued"] = this.provinceIssued ? this.provinceIssued.toJSON() : <any>undefined; | |
data["dateOfBirth"] = this.dateOfBirth ? this.dateOfBirth.toISOString() : <any>undefined; | |
data["fullName"] = this.fullName; | |
data["email"] = this.email; | |
data["gender"] = this.gender; | |
data["idCard"] = this.idCard; | |
return data; | |
} | |
} | |
export interface IMemberUpdateInput { | |
memberId: number; | |
tenantId: number; | |
address: AddressUpdateInput; | |
countryIssued: CountryUpdateInput; | |
provinceIssued: ProvinceUpdateInput; | |
dateOfBirth: moment.Moment; | |
fullName: string; | |
email: string; | |
gender: MemberUpdateInputGender; | |
idCard: string; | |
} | |
export class AddressUpdateInput implements IAddressUpdateInput { | |
addressTypeId: number; | |
fullAddress: string; | |
constructor(data?: IAddressUpdateInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.addressTypeId = data["addressTypeId"]; | |
this.fullAddress = data["fullAddress"]; | |
} | |
} | |
static fromJS(data: any): AddressUpdateInput { | |
let result = new AddressUpdateInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["addressTypeId"] = this.addressTypeId; | |
data["fullAddress"] = this.fullAddress; | |
return data; | |
} | |
} | |
export interface IAddressUpdateInput { | |
addressTypeId: number; | |
fullAddress: string; | |
} | |
export class MemberUpdateOutput implements IMemberUpdateOutput { | |
tenantId: number; | |
memberId: number; | |
addressId: number; | |
addressDisplay: AddressUpdateOutput; | |
countryIssuedId: number; | |
countryIssued: CountryUpdateOutput; | |
provinceIssuedId: number; | |
provinceIssued: ProvinceUpdateOutput; | |
dateOfBirth: moment.Moment; | |
fullName: string; | |
email: string; | |
genderId: number; | |
gender: MemberUpdateOutputGender; | |
idCard: string; | |
constructor(data?: IMemberUpdateOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.tenantId = data["tenantId"]; | |
this.memberId = data["memberId"]; | |
this.addressId = data["addressId"]; | |
this.addressDisplay = data["addressDisplay"] ? AddressUpdateOutput.fromJS(data["addressDisplay"]) : <any>undefined; | |
this.countryIssuedId = data["countryIssuedId"]; | |
this.countryIssued = data["countryIssued"] ? CountryUpdateOutput.fromJS(data["countryIssued"]) : <any>undefined; | |
this.provinceIssuedId = data["provinceIssuedId"]; | |
this.provinceIssued = data["provinceIssued"] ? ProvinceUpdateOutput.fromJS(data["provinceIssued"]) : <any>undefined; | |
this.dateOfBirth = data["dateOfBirth"] ? moment(data["dateOfBirth"].toString()) : <any>undefined; | |
this.fullName = data["fullName"]; | |
this.email = data["email"]; | |
this.genderId = data["genderId"]; | |
this.gender = data["gender"]; | |
this.idCard = data["idCard"]; | |
} | |
} | |
static fromJS(data: any): MemberUpdateOutput { | |
let result = new MemberUpdateOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["tenantId"] = this.tenantId; | |
data["memberId"] = this.memberId; | |
data["addressId"] = this.addressId; | |
data["addressDisplay"] = this.addressDisplay ? this.addressDisplay.toJSON() : <any>undefined; | |
data["countryIssuedId"] = this.countryIssuedId; | |
data["countryIssued"] = this.countryIssued ? this.countryIssued.toJSON() : <any>undefined; | |
data["provinceIssuedId"] = this.provinceIssuedId; | |
data["provinceIssued"] = this.provinceIssued ? this.provinceIssued.toJSON() : <any>undefined; | |
data["dateOfBirth"] = this.dateOfBirth ? this.dateOfBirth.toISOString() : <any>undefined; | |
data["fullName"] = this.fullName; | |
data["email"] = this.email; | |
data["genderId"] = this.genderId; | |
data["gender"] = this.gender; | |
data["idCard"] = this.idCard; | |
return data; | |
} | |
} | |
export interface IMemberUpdateOutput { | |
tenantId: number; | |
memberId: number; | |
addressId: number; | |
addressDisplay: AddressUpdateOutput; | |
countryIssuedId: number; | |
countryIssued: CountryUpdateOutput; | |
provinceIssuedId: number; | |
provinceIssued: ProvinceUpdateOutput; | |
dateOfBirth: moment.Moment; | |
fullName: string; | |
email: string; | |
genderId: number; | |
gender: MemberUpdateOutputGender; | |
idCard: string; | |
} | |
export class AddressUpdateOutput implements IAddressUpdateOutput { | |
addressTypeId: number; | |
fullAddress: string; | |
constructor(data?: IAddressUpdateOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.addressTypeId = data["addressTypeId"]; | |
this.fullAddress = data["fullAddress"]; | |
} | |
} | |
static fromJS(data: any): AddressUpdateOutput { | |
let result = new AddressUpdateOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["addressTypeId"] = this.addressTypeId; | |
data["fullAddress"] = this.fullAddress; | |
return data; | |
} | |
} | |
export interface IAddressUpdateOutput { | |
addressTypeId: number; | |
fullAddress: string; | |
} | |
export class UnitReadOutput implements IUnitReadOutput { | |
unitCodeName: string; | |
unitName: string; | |
unitDescription: string; | |
unitTypeId: number; | |
constructor(data?: IUnitReadOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.unitCodeName = data["unitCodeName"]; | |
this.unitName = data["unitName"]; | |
this.unitDescription = data["unitDescription"]; | |
this.unitTypeId = data["unitTypeId"]; | |
} | |
} | |
static fromJS(data: any): UnitReadOutput { | |
let result = new UnitReadOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["unitCodeName"] = this.unitCodeName; | |
data["unitName"] = this.unitName; | |
data["unitDescription"] = this.unitDescription; | |
data["unitTypeId"] = this.unitTypeId; | |
return data; | |
} | |
} | |
export interface IUnitReadOutput { | |
unitCodeName: string; | |
unitName: string; | |
unitDescription: string; | |
unitTypeId: number; | |
} | |
export class UnitCreateInput implements IUnitCreateInput { | |
unitCodeName: string; | |
unitName: TranslationInput2 = new TranslationInput2(); | |
unitDescription: TranslationInput2; | |
unitTypeId: number; | |
constructor(data?: IUnitCreateInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.unitCodeName = data["unitCodeName"]; | |
this.unitName = data["unitName"] ? TranslationInput2.fromJS(data["unitName"]) : new TranslationInput2(); | |
this.unitDescription = data["unitDescription"] ? TranslationInput2.fromJS(data["unitDescription"]) : <any>undefined; | |
this.unitTypeId = data["unitTypeId"]; | |
} | |
} | |
static fromJS(data: any): UnitCreateInput { | |
let result = new UnitCreateInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["unitCodeName"] = this.unitCodeName; | |
data["unitName"] = this.unitName ? this.unitName.toJSON() : <any>undefined; | |
data["unitDescription"] = this.unitDescription ? this.unitDescription.toJSON() : <any>undefined; | |
data["unitTypeId"] = this.unitTypeId; | |
return data; | |
} | |
} | |
export interface IUnitCreateInput { | |
unitCodeName: string; | |
unitName: TranslationInput2; | |
unitDescription: TranslationInput2; | |
unitTypeId: number; | |
} | |
export class UnitUpdateInput implements IUnitUpdateInput { | |
unitId: number; | |
unitCodeName: string; | |
unitName: TranslationInput2; | |
unitDescription: TranslationInput2; | |
unitTypeId: number; | |
constructor(data?: IUnitUpdateInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.unitId = data["unitId"]; | |
this.unitCodeName = data["unitCodeName"]; | |
this.unitName = data["unitName"] ? TranslationInput2.fromJS(data["unitName"]) : <any>undefined; | |
this.unitDescription = data["unitDescription"] ? TranslationInput2.fromJS(data["unitDescription"]) : <any>undefined; | |
this.unitTypeId = data["unitTypeId"]; | |
} | |
} | |
static fromJS(data: any): UnitUpdateInput { | |
let result = new UnitUpdateInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["unitId"] = this.unitId; | |
data["unitCodeName"] = this.unitCodeName; | |
data["unitName"] = this.unitName ? this.unitName.toJSON() : <any>undefined; | |
data["unitDescription"] = this.unitDescription ? this.unitDescription.toJSON() : <any>undefined; | |
data["unitTypeId"] = this.unitTypeId; | |
return data; | |
} | |
} | |
export interface IUnitUpdateInput { | |
unitId: number; | |
unitCodeName: string; | |
unitName: TranslationInput2; | |
unitDescription: TranslationInput2; | |
unitTypeId: number; | |
} | |
export class PagedResultDto`1OfOfUserListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null implements IPagedResultDto`1OfOfUserListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
totalCount: number; | |
items: UserListDto[]; | |
constructor(data?: IPagedResultDto`1OfOfUserListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.totalCount = data["totalCount"]; | |
if (data["items"] && data["items"].constructor === Array) { | |
this.items = []; | |
for (let item of data["items"]) | |
this.items.push(UserListDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): PagedResultDto`1OfOfUserListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
let result = new PagedResultDto`1OfOfUserListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["totalCount"] = this.totalCount; | |
if (this.items && this.items.constructor === Array) { | |
data["items"] = []; | |
for (let item of this.items) | |
data["items"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IPagedResultDto`1OfOfUserListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
totalCount: number; | |
items: UserListDto[]; | |
} | |
export class UserListDto implements IUserListDto { | |
name: string; | |
surname: string; | |
userName: string; | |
emailAddress: string; | |
phoneNumber: string; | |
profilePictureId: string; | |
isEmailConfirmed: boolean; | |
roles: UserListRoleDto[]; | |
lastLoginTime: moment.Moment; | |
isActive: boolean; | |
creationTime: moment.Moment; | |
id: number; | |
constructor(data?: IUserListDto) { | |
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"]; | |
this.surname = data["surname"]; | |
this.userName = data["userName"]; | |
this.emailAddress = data["emailAddress"]; | |
this.phoneNumber = data["phoneNumber"]; | |
this.profilePictureId = data["profilePictureId"]; | |
this.isEmailConfirmed = data["isEmailConfirmed"]; | |
if (data["roles"] && data["roles"].constructor === Array) { | |
this.roles = []; | |
for (let item of data["roles"]) | |
this.roles.push(UserListRoleDto.fromJS(item)); | |
} | |
this.lastLoginTime = data["lastLoginTime"] ? moment(data["lastLoginTime"].toString()) : <any>undefined; | |
this.isActive = data["isActive"]; | |
this.creationTime = data["creationTime"] ? moment(data["creationTime"].toString()) : <any>undefined; | |
this.id = data["id"]; | |
} | |
} | |
static fromJS(data: any): UserListDto { | |
let result = new UserListDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["name"] = this.name; | |
data["surname"] = this.surname; | |
data["userName"] = this.userName; | |
data["emailAddress"] = this.emailAddress; | |
data["phoneNumber"] = this.phoneNumber; | |
data["profilePictureId"] = this.profilePictureId; | |
data["isEmailConfirmed"] = this.isEmailConfirmed; | |
if (this.roles && this.roles.constructor === Array) { | |
data["roles"] = []; | |
for (let item of this.roles) | |
data["roles"].push(item.toJSON()); | |
} | |
data["lastLoginTime"] = this.lastLoginTime ? this.lastLoginTime.toISOString() : <any>undefined; | |
data["isActive"] = this.isActive; | |
data["creationTime"] = this.creationTime ? this.creationTime.toISOString() : <any>undefined; | |
data["id"] = this.id; | |
return data; | |
} | |
} | |
export interface IUserListDto { | |
name: string; | |
surname: string; | |
userName: string; | |
emailAddress: string; | |
phoneNumber: string; | |
profilePictureId: string; | |
isEmailConfirmed: boolean; | |
roles: UserListRoleDto[]; | |
lastLoginTime: moment.Moment; | |
isActive: boolean; | |
creationTime: moment.Moment; | |
id: number; | |
} | |
export class UserListRoleDto implements IUserListRoleDto { | |
roleId: number; | |
roleName: string; | |
constructor(data?: IUserListRoleDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.roleId = data["roleId"]; | |
this.roleName = data["roleName"]; | |
} | |
} | |
static fromJS(data: any): UserListRoleDto { | |
let result = new UserListRoleDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["roleId"] = this.roleId; | |
data["roleName"] = this.roleName; | |
return data; | |
} | |
} | |
export interface IUserListRoleDto { | |
roleId: number; | |
roleName: string; | |
} | |
export class GetUserForEditOutput implements IGetUserForEditOutput { | |
profilePictureId: string; | |
user: UserEditDto; | |
roles: UserRoleDto[]; | |
allOrganizationUnits: OrganizationUnitDto[]; | |
memberedOrganizationUnits: string[]; | |
constructor(data?: IGetUserForEditOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.profilePictureId = data["profilePictureId"]; | |
this.user = data["user"] ? UserEditDto.fromJS(data["user"]) : <any>undefined; | |
if (data["roles"] && data["roles"].constructor === Array) { | |
this.roles = []; | |
for (let item of data["roles"]) | |
this.roles.push(UserRoleDto.fromJS(item)); | |
} | |
if (data["allOrganizationUnits"] && data["allOrganizationUnits"].constructor === Array) { | |
this.allOrganizationUnits = []; | |
for (let item of data["allOrganizationUnits"]) | |
this.allOrganizationUnits.push(OrganizationUnitDto.fromJS(item)); | |
} | |
if (data["memberedOrganizationUnits"] && data["memberedOrganizationUnits"].constructor === Array) { | |
this.memberedOrganizationUnits = []; | |
for (let item of data["memberedOrganizationUnits"]) | |
this.memberedOrganizationUnits.push(item); | |
} | |
} | |
} | |
static fromJS(data: any): GetUserForEditOutput { | |
let result = new GetUserForEditOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["profilePictureId"] = this.profilePictureId; | |
data["user"] = this.user ? this.user.toJSON() : <any>undefined; | |
if (this.roles && this.roles.constructor === Array) { | |
data["roles"] = []; | |
for (let item of this.roles) | |
data["roles"].push(item.toJSON()); | |
} | |
if (this.allOrganizationUnits && this.allOrganizationUnits.constructor === Array) { | |
data["allOrganizationUnits"] = []; | |
for (let item of this.allOrganizationUnits) | |
data["allOrganizationUnits"].push(item.toJSON()); | |
} | |
if (this.memberedOrganizationUnits && this.memberedOrganizationUnits.constructor === Array) { | |
data["memberedOrganizationUnits"] = []; | |
for (let item of this.memberedOrganizationUnits) | |
data["memberedOrganizationUnits"].push(item); | |
} | |
return data; | |
} | |
} | |
export interface IGetUserForEditOutput { | |
profilePictureId: string; | |
user: UserEditDto; | |
roles: UserRoleDto[]; | |
allOrganizationUnits: OrganizationUnitDto[]; | |
memberedOrganizationUnits: string[]; | |
} | |
export class UserEditDto implements IUserEditDto { | |
id: number; | |
name: string; | |
surname: string; | |
userName: string; | |
emailAddress: string; | |
phoneNumber: string; | |
password: string; | |
isActive: boolean; | |
shouldChangePasswordOnNextLogin: boolean; | |
isTwoFactorEnabled: boolean; | |
isLockoutEnabled: boolean; | |
constructor(data?: IUserEditDto) { | |
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"]; | |
this.surname = data["surname"]; | |
this.userName = data["userName"]; | |
this.emailAddress = data["emailAddress"]; | |
this.phoneNumber = data["phoneNumber"]; | |
this.password = data["password"]; | |
this.isActive = data["isActive"]; | |
this.shouldChangePasswordOnNextLogin = data["shouldChangePasswordOnNextLogin"]; | |
this.isTwoFactorEnabled = data["isTwoFactorEnabled"]; | |
this.isLockoutEnabled = data["isLockoutEnabled"]; | |
} | |
} | |
static fromJS(data: any): UserEditDto { | |
let result = new UserEditDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["id"] = this.id; | |
data["name"] = this.name; | |
data["surname"] = this.surname; | |
data["userName"] = this.userName; | |
data["emailAddress"] = this.emailAddress; | |
data["phoneNumber"] = this.phoneNumber; | |
data["password"] = this.password; | |
data["isActive"] = this.isActive; | |
data["shouldChangePasswordOnNextLogin"] = this.shouldChangePasswordOnNextLogin; | |
data["isTwoFactorEnabled"] = this.isTwoFactorEnabled; | |
data["isLockoutEnabled"] = this.isLockoutEnabled; | |
return data; | |
} | |
} | |
export interface IUserEditDto { | |
id: number; | |
name: string; | |
surname: string; | |
userName: string; | |
emailAddress: string; | |
phoneNumber: string; | |
password: string; | |
isActive: boolean; | |
shouldChangePasswordOnNextLogin: boolean; | |
isTwoFactorEnabled: boolean; | |
isLockoutEnabled: boolean; | |
} | |
export class UserRoleDto implements IUserRoleDto { | |
roleId: number; | |
roleName: string; | |
roleDisplayName: string; | |
isAssigned: boolean; | |
constructor(data?: IUserRoleDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.roleId = data["roleId"]; | |
this.roleName = data["roleName"]; | |
this.roleDisplayName = data["roleDisplayName"]; | |
this.isAssigned = data["isAssigned"]; | |
} | |
} | |
static fromJS(data: any): UserRoleDto { | |
let result = new UserRoleDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["roleId"] = this.roleId; | |
data["roleName"] = this.roleName; | |
data["roleDisplayName"] = this.roleDisplayName; | |
data["isAssigned"] = this.isAssigned; | |
return data; | |
} | |
} | |
export interface IUserRoleDto { | |
roleId: number; | |
roleName: string; | |
roleDisplayName: string; | |
isAssigned: boolean; | |
} | |
export class GetUserPermissionsForEditOutput implements IGetUserPermissionsForEditOutput { | |
permissions: FlatPermissionDto[]; | |
grantedPermissionNames: string[]; | |
constructor(data?: IGetUserPermissionsForEditOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
if (data["permissions"] && data["permissions"].constructor === Array) { | |
this.permissions = []; | |
for (let item of data["permissions"]) | |
this.permissions.push(FlatPermissionDto.fromJS(item)); | |
} | |
if (data["grantedPermissionNames"] && data["grantedPermissionNames"].constructor === Array) { | |
this.grantedPermissionNames = []; | |
for (let item of data["grantedPermissionNames"]) | |
this.grantedPermissionNames.push(item); | |
} | |
} | |
} | |
static fromJS(data: any): GetUserPermissionsForEditOutput { | |
let result = new GetUserPermissionsForEditOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
if (this.permissions && this.permissions.constructor === Array) { | |
data["permissions"] = []; | |
for (let item of this.permissions) | |
data["permissions"].push(item.toJSON()); | |
} | |
if (this.grantedPermissionNames && this.grantedPermissionNames.constructor === Array) { | |
data["grantedPermissionNames"] = []; | |
for (let item of this.grantedPermissionNames) | |
data["grantedPermissionNames"].push(item); | |
} | |
return data; | |
} | |
} | |
export interface IGetUserPermissionsForEditOutput { | |
permissions: FlatPermissionDto[]; | |
grantedPermissionNames: string[]; | |
} | |
export class EntityDto`1OfOfInt64AndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e implements IEntityDto`1OfOfInt64AndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e { | |
id: number; | |
constructor(data?: IEntityDto`1OfOfInt64AndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e) { | |
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"]; | |
} | |
} | |
static fromJS(data: any): EntityDto`1OfOfInt64AndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e { | |
let result = new EntityDto`1OfOfInt64AndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["id"] = this.id; | |
return data; | |
} | |
} | |
export interface IEntityDto`1OfOfInt64AndCoreLibAnd_0AndCulture=neutralAndPublicKeyToken=7cec85d7bea7798e { | |
id: number; | |
} | |
export class UpdateUserPermissionsInput implements IUpdateUserPermissionsInput { | |
id: number; | |
grantedPermissionNames: string[] = []; | |
constructor(data?: IUpdateUserPermissionsInput) { | |
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"]; | |
if (data["grantedPermissionNames"] && data["grantedPermissionNames"].constructor === Array) { | |
this.grantedPermissionNames = []; | |
for (let item of data["grantedPermissionNames"]) | |
this.grantedPermissionNames.push(item); | |
} | |
} | |
} | |
static fromJS(data: any): UpdateUserPermissionsInput { | |
let result = new UpdateUserPermissionsInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["id"] = this.id; | |
if (this.grantedPermissionNames && this.grantedPermissionNames.constructor === Array) { | |
data["grantedPermissionNames"] = []; | |
for (let item of this.grantedPermissionNames) | |
data["grantedPermissionNames"].push(item); | |
} | |
return data; | |
} | |
} | |
export interface IUpdateUserPermissionsInput { | |
id: number; | |
grantedPermissionNames: string[]; | |
} | |
export class CreateOrUpdateUserInput implements ICreateOrUpdateUserInput { | |
user: UserEditDto = new UserEditDto(); | |
assignedRoleNames: string[] = []; | |
sendActivationEmail: boolean; | |
setRandomPassword: boolean; | |
organizationUnits: number[]; | |
constructor(data?: ICreateOrUpdateUserInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.user = data["user"] ? UserEditDto.fromJS(data["user"]) : new UserEditDto(); | |
if (data["assignedRoleNames"] && data["assignedRoleNames"].constructor === Array) { | |
this.assignedRoleNames = []; | |
for (let item of data["assignedRoleNames"]) | |
this.assignedRoleNames.push(item); | |
} | |
this.sendActivationEmail = data["sendActivationEmail"]; | |
this.setRandomPassword = data["setRandomPassword"]; | |
if (data["organizationUnits"] && data["organizationUnits"].constructor === Array) { | |
this.organizationUnits = []; | |
for (let item of data["organizationUnits"]) | |
this.organizationUnits.push(item); | |
} | |
} | |
} | |
static fromJS(data: any): CreateOrUpdateUserInput { | |
let result = new CreateOrUpdateUserInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["user"] = this.user ? this.user.toJSON() : <any>undefined; | |
if (this.assignedRoleNames && this.assignedRoleNames.constructor === Array) { | |
data["assignedRoleNames"] = []; | |
for (let item of this.assignedRoleNames) | |
data["assignedRoleNames"].push(item); | |
} | |
data["sendActivationEmail"] = this.sendActivationEmail; | |
data["setRandomPassword"] = this.setRandomPassword; | |
if (this.organizationUnits && this.organizationUnits.constructor === Array) { | |
data["organizationUnits"] = []; | |
for (let item of this.organizationUnits) | |
data["organizationUnits"].push(item); | |
} | |
return data; | |
} | |
} | |
export interface ICreateOrUpdateUserInput { | |
user: UserEditDto; | |
assignedRoleNames: string[]; | |
sendActivationEmail: boolean; | |
setRandomPassword: boolean; | |
organizationUnits: number[]; | |
} | |
export class LinkToUserInput implements ILinkToUserInput { | |
tenancyName: string; | |
usernameOrEmailAddress: string; | |
password: string; | |
constructor(data?: ILinkToUserInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.tenancyName = data["tenancyName"]; | |
this.usernameOrEmailAddress = data["usernameOrEmailAddress"]; | |
this.password = data["password"]; | |
} | |
} | |
static fromJS(data: any): LinkToUserInput { | |
let result = new LinkToUserInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["tenancyName"] = this.tenancyName; | |
data["usernameOrEmailAddress"] = this.usernameOrEmailAddress; | |
data["password"] = this.password; | |
return data; | |
} | |
} | |
export interface ILinkToUserInput { | |
tenancyName: string; | |
usernameOrEmailAddress: string; | |
password: string; | |
} | |
export class PagedResultDto`1OfOfLinkedUserDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null implements IPagedResultDto`1OfOfLinkedUserDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
totalCount: number; | |
items: LinkedUserDto[]; | |
constructor(data?: IPagedResultDto`1OfOfLinkedUserDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.totalCount = data["totalCount"]; | |
if (data["items"] && data["items"].constructor === Array) { | |
this.items = []; | |
for (let item of data["items"]) | |
this.items.push(LinkedUserDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): PagedResultDto`1OfOfLinkedUserDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
let result = new PagedResultDto`1OfOfLinkedUserDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["totalCount"] = this.totalCount; | |
if (this.items && this.items.constructor === Array) { | |
data["items"] = []; | |
for (let item of this.items) | |
data["items"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IPagedResultDto`1OfOfLinkedUserDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
totalCount: number; | |
items: LinkedUserDto[]; | |
} | |
export class LinkedUserDto implements ILinkedUserDto { | |
tenantId: number; | |
tenancyName: string; | |
username: string; | |
lastLoginTime: moment.Moment; | |
id: number; | |
constructor(data?: ILinkedUserDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.tenantId = data["tenantId"]; | |
this.tenancyName = data["tenancyName"]; | |
this.username = data["username"]; | |
this.lastLoginTime = data["lastLoginTime"] ? moment(data["lastLoginTime"].toString()) : <any>undefined; | |
this.id = data["id"]; | |
} | |
} | |
static fromJS(data: any): LinkedUserDto { | |
let result = new LinkedUserDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["tenantId"] = this.tenantId; | |
data["tenancyName"] = this.tenancyName; | |
data["username"] = this.username; | |
data["lastLoginTime"] = this.lastLoginTime ? this.lastLoginTime.toISOString() : <any>undefined; | |
data["id"] = this.id; | |
return data; | |
} | |
} | |
export interface ILinkedUserDto { | |
tenantId: number; | |
tenancyName: string; | |
username: string; | |
lastLoginTime: moment.Moment; | |
id: number; | |
} | |
export class ListResultDto`1OfOfLinkedUserDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null implements IListResultDto`1OfOfLinkedUserDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
items: LinkedUserDto[]; | |
constructor(data?: IListResultDto`1OfOfLinkedUserDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
if (data["items"] && data["items"].constructor === Array) { | |
this.items = []; | |
for (let item of data["items"]) | |
this.items.push(LinkedUserDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): ListResultDto`1OfOfLinkedUserDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
let result = new ListResultDto`1OfOfLinkedUserDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
if (this.items && this.items.constructor === Array) { | |
data["items"] = []; | |
for (let item of this.items) | |
data["items"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IListResultDto`1OfOfLinkedUserDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
items: LinkedUserDto[]; | |
} | |
export class UnlinkUserInput implements IUnlinkUserInput { | |
tenantId: number; | |
userId: number; | |
constructor(data?: IUnlinkUserInput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.tenantId = data["tenantId"]; | |
this.userId = data["userId"]; | |
} | |
} | |
static fromJS(data: any): UnlinkUserInput { | |
let result = new UnlinkUserInput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["tenantId"] = this.tenantId; | |
data["userId"] = this.userId; | |
return data; | |
} | |
} | |
export interface IUnlinkUserInput { | |
tenantId: number; | |
userId: number; | |
} | |
export class ListResultDto`1OfOfUserLoginAttemptDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null implements IListResultDto`1OfOfUserLoginAttemptDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
items: UserLoginAttemptDto[]; | |
constructor(data?: IListResultDto`1OfOfUserLoginAttemptDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
if (data["items"] && data["items"].constructor === Array) { | |
this.items = []; | |
for (let item of data["items"]) | |
this.items.push(UserLoginAttemptDto.fromJS(item)); | |
} | |
} | |
} | |
static fromJS(data: any): ListResultDto`1OfOfUserLoginAttemptDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
let result = new ListResultDto`1OfOfUserLoginAttemptDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
if (this.items && this.items.constructor === Array) { | |
data["items"] = []; | |
for (let item of this.items) | |
data["items"].push(item.toJSON()); | |
} | |
return data; | |
} | |
} | |
export interface IListResultDto`1OfOfUserLoginAttemptDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null { | |
items: UserLoginAttemptDto[]; | |
} | |
export class UserLoginAttemptDto implements IUserLoginAttemptDto { | |
tenancyName: string; | |
userNameOrEmail: string; | |
clientIpAddress: string; | |
clientName: string; | |
browserInfo: string; | |
result: string; | |
creationTime: moment.Moment; | |
constructor(data?: IUserLoginAttemptDto) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
this.tenancyName = data["tenancyName"]; | |
this.userNameOrEmail = data["userNameOrEmail"]; | |
this.clientIpAddress = data["clientIpAddress"]; | |
this.clientName = data["clientName"]; | |
this.browserInfo = data["browserInfo"]; | |
this.result = data["result"]; | |
this.creationTime = data["creationTime"] ? moment(data["creationTime"].toString()) : <any>undefined; | |
} | |
} | |
static fromJS(data: any): UserLoginAttemptDto { | |
let result = new UserLoginAttemptDto(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
data["tenancyName"] = this.tenancyName; | |
data["userNameOrEmail"] = this.userNameOrEmail; | |
data["clientIpAddress"] = this.clientIpAddress; | |
data["clientName"] = this.clientName; | |
data["browserInfo"] = this.browserInfo; | |
data["result"] = this.result; | |
data["creationTime"] = this.creationTime ? this.creationTime.toISOString() : <any>undefined; | |
return data; | |
} | |
} | |
export interface IUserLoginAttemptDto { | |
tenancyName: string; | |
userNameOrEmail: string; | |
clientIpAddress: string; | |
clientName: string; | |
browserInfo: string; | |
result: string; | |
creationTime: moment.Moment; | |
} | |
export class GetLatestWebLogsOutput implements IGetLatestWebLogsOutput { | |
latestWebLogLines: string[]; | |
constructor(data?: IGetLatestWebLogsOutput) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
if (data["latestWebLogLines"] && data["latestWebLogLines"].constructor === Array) { | |
this.latestWebLogLines = []; | |
for (let item of data["latestWebLogLines"]) | |
this.latestWebLogLines.push(item); | |
} | |
} | |
} | |
static fromJS(data: any): GetLatestWebLogsOutput { | |
let result = new GetLatestWebLogsOutput(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
if (this.latestWebLogLines && this.latestWebLogLines.constructor === Array) { | |
data["latestWebLogLines"] = []; | |
for (let item of this.latestWebLogLines) | |
data["latestWebLogLines"].push(item); | |
} | |
return data; | |
} | |
} | |
export interface IGetLatestWebLogsOutput { | |
latestWebLogLines: string[]; | |
} | |
export enum IncomeStatisticsDateInterval { | |
_1 = 1, | |
_2 = 2, | |
_3 = 3, | |
} | |
export enum IncomeStatisticsDateInterval2 { | |
_1 = 1, | |
_2 = 2, | |
_3 = 3, | |
} | |
export enum State { | |
_0 = 0, | |
_1 = 1, | |
} | |
export enum SalesSummaryDatePeriod { | |
_1 = 1, | |
_2 = 2, | |
_3 = 3, | |
} | |
export enum SalesSummaryDatePeriod2 { | |
_1 = 1, | |
_2 = 2, | |
_3 = 3, | |
} | |
export enum DefaultTimezoneScope { | |
_1 = 1, | |
_2 = 2, | |
_4 = 4, | |
_7 = 7, | |
} | |
export enum IsTenantAvailableOutputState { | |
_1 = 1, | |
_2 = 2, | |
_3 = 3, | |
} | |
export enum FriendDtoState { | |
_1 = 1, | |
_2 = 2, | |
} | |
export enum ChatMessageDtoSide { | |
_1 = 1, | |
_2 = 2, | |
} | |
export enum ChatMessageDtoReadState { | |
_1 = 1, | |
_2 = 2, | |
} | |
export enum ChatMessageDtoReceiverReadState { | |
_1 = 1, | |
_2 = 2, | |
} | |
export enum UserNotificationState { | |
_0 = 0, | |
_1 = 1, | |
} | |
export enum TenantNotificationSeverity { | |
_0 = 0, | |
_1 = 1, | |
_2 = 2, | |
_3 = 3, | |
_4 = 4, | |
} | |
export class AdditionalData implements IAdditionalData { | |
paypal: { [key: string] : string; }; | |
constructor(data?: IAdditionalData) { | |
if (data) { | |
for (var property in data) { | |
if (data.hasOwnProperty(property)) | |
(<any>this)[property] = (<any>data)[property]; | |
} | |
} | |
} | |
init(data?: any) { | |
if (data) { | |
if (data["Paypal"]) { | |
this.paypal = {}; | |
for (let key in data["Paypal"]) { | |
if (data["Paypal"].hasOwnProperty(key)) | |
this.paypal[key] = data["Paypal"][key]; | |
} | |
} | |
} | |
} | |
static fromJS(data: any): AdditionalData { | |
let result = new AdditionalData(); | |
result.init(data); | |
return result; | |
} | |
toJSON(data?: any) { | |
data = typeof data === 'object' ? data : {}; | |
if (this.paypal) { | |
data["Paypal"] = {}; | |
for (let key in this.paypal) { | |
if (this.paypal.hasOwnProperty(key)) | |
data["Paypal"][key] = this.paypal[key]; | |
} | |
} | |
return data; | |
} | |
} | |
export interface IAdditionalData { | |
paypal: { [key: string] : string; }; | |
} | |
export enum CreatePaymentDtoEditionPaymentType { | |
_0 = 0, | |
_1 = 1, | |
_2 = 2, | |
_3 = 3, | |
} | |
export enum CreatePaymentDtoPaymentPeriodType { | |
_30 = 30, | |
_365 = 365, | |
} | |
export enum CreatePaymentDtoSubscriptionPaymentGatewayType { | |
_1 = 1, | |
} | |
export enum ExecutePaymentDtoGateway { | |
_1 = 1, | |
} | |
export enum ExecutePaymentDtoEditionPaymentType { | |
_0 = 0, | |
_1 = 1, | |
_2 = 2, | |
_3 = 3, | |
} | |
export enum ExecutePaymentDtoPaymentPeriodType { | |
_30 = 30, | |
_365 = 365, | |
} | |
export enum TenantLoginInfoDtoPaymentPeriodType { | |
_30 = 30, | |
_365 = 365, | |
} | |
export enum RegisterTenantInputSubscriptionStartType { | |
_1 = 1, | |
_2 = 2, | |
_3 = 3, | |
} | |
export enum RegisterTenantInputGateway { | |
_1 = 1, | |
} | |
export enum EmployeeReadOutputGenderId { | |
_1 = 1, | |
_2 = 2, | |
_3 = 3, | |
} | |
export enum EmployeeCreateInputGenderId { | |
_1 = 1, | |
_2 = 2, | |
_3 = 3, | |
} | |
export enum EmployeeUpdateInputGenderId { | |
_1 = 1, | |
_2 = 2, | |
_3 = 3, | |
} | |
export enum EmployeeUpdateOutputGenderId { | |
_1 = 1, | |
_2 = 2, | |
_3 = 3, | |
} | |
export enum MemberReadOutputGender { | |
_1 = 1, | |
_2 = 2, | |
_3 = 3, | |
} | |
export enum MemberCreateInputGender { | |
_1 = 1, | |
_2 = 2, | |
_3 = 3, | |
} | |
export enum MemberUpdateInputGender { | |
_1 = 1, | |
_2 = 2, | |
_3 = 3, | |
} | |
export enum MemberUpdateOutputGender { | |
_1 = 1, | |
_2 = 2, | |
_3 = 3, | |
} | |
export class SwaggerException extends Error { | |
message: string; | |
status: number; | |
response: string; | |
headers: { [key: string]: any; }; | |
result: any; | |
constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) { | |
super(); | |
this.message = message; | |
this.status = status; | |
this.response = response; | |
this.headers = headers; | |
this.result = result; | |
} | |
protected isSwaggerException = true; | |
static isSwaggerException(obj: any): obj is SwaggerException { | |
return obj.isSwaggerException === true; | |
} | |
} | |
function throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): Observable<any> { | |
if(result !== null && result !== undefined) | |
return Observable.throw(result); | |
else | |
return Observable.throw(new SwaggerException(message, status, response, headers, null)); | |
} | |
function blobToText(blob: any): Observable<string> { | |
return new Observable<string>((observer: any) => { | |
if (!blob) { | |
observer.next(""); | |
observer.complete(); | |
} else { | |
let reader = new FileReader(); | |
reader.onload = function() { | |
observer.next(this.result); | |
observer.complete(); | |
} | |
reader.readAsText(blob); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment