@ignos/api-client 20241004.0.10504 → 20241014.0.10569
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ignosportal-api.d.ts +13 -0
- package/lib/ignosportal-api.js +49 -0
- package/package.json +1 -1
- package/src/ignosportal-api.ts +57 -0
package/lib/ignosportal-api.d.ts
CHANGED
|
@@ -422,6 +422,11 @@ export interface IMrbClient {
|
|
|
422
422
|
* @return HTTP 204 No Content
|
|
423
423
|
*/
|
|
424
424
|
deleteMrbTemplate(request: DeleteMrbTemplateRequest): Promise<void>;
|
|
425
|
+
/**
|
|
426
|
+
* Copy a MRB template
|
|
427
|
+
* @return MRB template
|
|
428
|
+
*/
|
|
429
|
+
copyMrbTemplate(templateId: string, request: CreateMrbTemplateRequest): Promise<MrbTemplateDto>;
|
|
425
430
|
getMrbCompanySettings(): Promise<MrbCompanySettingsDto>;
|
|
426
431
|
upsertMrbCompanySettings(request: UpsertMrbCompanySettings): Promise<MrbCompanySettingsDto>;
|
|
427
432
|
}
|
|
@@ -506,6 +511,12 @@ export declare class MrbClient extends AuthorizedApiBase implements IMrbClient {
|
|
|
506
511
|
*/
|
|
507
512
|
deleteMrbTemplate(request: DeleteMrbTemplateRequest): Promise<void>;
|
|
508
513
|
protected processDeleteMrbTemplate(response: Response): Promise<void>;
|
|
514
|
+
/**
|
|
515
|
+
* Copy a MRB template
|
|
516
|
+
* @return MRB template
|
|
517
|
+
*/
|
|
518
|
+
copyMrbTemplate(templateId: string, request: CreateMrbTemplateRequest): Promise<MrbTemplateDto>;
|
|
519
|
+
protected processCopyMrbTemplate(response: Response): Promise<MrbTemplateDto>;
|
|
509
520
|
getMrbCompanySettings(): Promise<MrbCompanySettingsDto>;
|
|
510
521
|
protected processGetMrbCompanySettings(response: Response): Promise<MrbCompanySettingsDto>;
|
|
511
522
|
upsertMrbCompanySettings(request: UpsertMrbCompanySettings): Promise<MrbCompanySettingsDto>;
|
|
@@ -2868,6 +2879,7 @@ export interface IListUsersRequest {
|
|
|
2868
2879
|
}
|
|
2869
2880
|
export declare class EngageAppSettings implements IEngageAppSettings {
|
|
2870
2881
|
includeDrawingInRouteCardPrint?: boolean;
|
|
2882
|
+
routeCardPrintInLandscapeOrientation?: boolean;
|
|
2871
2883
|
constructor(data?: IEngageAppSettings);
|
|
2872
2884
|
init(_data?: any): void;
|
|
2873
2885
|
static fromJS(data: any): EngageAppSettings;
|
|
@@ -2875,6 +2887,7 @@ export declare class EngageAppSettings implements IEngageAppSettings {
|
|
|
2875
2887
|
}
|
|
2876
2888
|
export interface IEngageAppSettings {
|
|
2877
2889
|
includeDrawingInRouteCardPrint?: boolean;
|
|
2890
|
+
routeCardPrintInLandscapeOrientation?: boolean;
|
|
2878
2891
|
}
|
|
2879
2892
|
export declare class MoveAppSettings implements IMoveAppSettings {
|
|
2880
2893
|
engageMoveAutoPrompt?: boolean;
|
package/lib/ignosportal-api.js
CHANGED
|
@@ -3180,6 +3180,53 @@ export class MrbClient extends AuthorizedApiBase {
|
|
|
3180
3180
|
}
|
|
3181
3181
|
return Promise.resolve(null);
|
|
3182
3182
|
}
|
|
3183
|
+
/**
|
|
3184
|
+
* Copy a MRB template
|
|
3185
|
+
* @return MRB template
|
|
3186
|
+
*/
|
|
3187
|
+
copyMrbTemplate(templateId, request) {
|
|
3188
|
+
let url_ = this.baseUrl + "/mrb/templates/{templateId}/copy";
|
|
3189
|
+
if (templateId === undefined || templateId === null)
|
|
3190
|
+
throw new Error("The parameter 'templateId' must be defined.");
|
|
3191
|
+
url_ = url_.replace("{templateId}", encodeURIComponent("" + templateId));
|
|
3192
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3193
|
+
const content_ = JSON.stringify(request);
|
|
3194
|
+
let options_ = {
|
|
3195
|
+
body: content_,
|
|
3196
|
+
method: "POST",
|
|
3197
|
+
headers: {
|
|
3198
|
+
"Content-Type": "application/json",
|
|
3199
|
+
"Accept": "application/json"
|
|
3200
|
+
}
|
|
3201
|
+
};
|
|
3202
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3203
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
3204
|
+
}).then((_response) => {
|
|
3205
|
+
return this.processCopyMrbTemplate(_response);
|
|
3206
|
+
});
|
|
3207
|
+
}
|
|
3208
|
+
processCopyMrbTemplate(response) {
|
|
3209
|
+
const status = response.status;
|
|
3210
|
+
let _headers = {};
|
|
3211
|
+
if (response.headers && response.headers.forEach) {
|
|
3212
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
3213
|
+
}
|
|
3214
|
+
;
|
|
3215
|
+
if (status === 200) {
|
|
3216
|
+
return response.text().then((_responseText) => {
|
|
3217
|
+
let result200 = null;
|
|
3218
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3219
|
+
result200 = MrbTemplateDto.fromJS(resultData200);
|
|
3220
|
+
return result200;
|
|
3221
|
+
});
|
|
3222
|
+
}
|
|
3223
|
+
else if (status !== 200 && status !== 204) {
|
|
3224
|
+
return response.text().then((_responseText) => {
|
|
3225
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3226
|
+
});
|
|
3227
|
+
}
|
|
3228
|
+
return Promise.resolve(null);
|
|
3229
|
+
}
|
|
3183
3230
|
getMrbCompanySettings() {
|
|
3184
3231
|
let url_ = this.baseUrl + "/mrb/settings";
|
|
3185
3232
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -20660,6 +20707,7 @@ export class EngageAppSettings {
|
|
|
20660
20707
|
init(_data) {
|
|
20661
20708
|
if (_data) {
|
|
20662
20709
|
this.includeDrawingInRouteCardPrint = _data["includeDrawingInRouteCardPrint"];
|
|
20710
|
+
this.routeCardPrintInLandscapeOrientation = _data["routeCardPrintInLandscapeOrientation"];
|
|
20663
20711
|
}
|
|
20664
20712
|
}
|
|
20665
20713
|
static fromJS(data) {
|
|
@@ -20671,6 +20719,7 @@ export class EngageAppSettings {
|
|
|
20671
20719
|
toJSON(data) {
|
|
20672
20720
|
data = typeof data === 'object' ? data : {};
|
|
20673
20721
|
data["includeDrawingInRouteCardPrint"] = this.includeDrawingInRouteCardPrint;
|
|
20722
|
+
data["routeCardPrintInLandscapeOrientation"] = this.routeCardPrintInLandscapeOrientation;
|
|
20674
20723
|
return data;
|
|
20675
20724
|
}
|
|
20676
20725
|
}
|
package/package.json
CHANGED
package/src/ignosportal-api.ts
CHANGED
|
@@ -2370,6 +2370,12 @@ export interface IMrbClient {
|
|
|
2370
2370
|
*/
|
|
2371
2371
|
deleteMrbTemplate(request: DeleteMrbTemplateRequest): Promise<void>;
|
|
2372
2372
|
|
|
2373
|
+
/**
|
|
2374
|
+
* Copy a MRB template
|
|
2375
|
+
* @return MRB template
|
|
2376
|
+
*/
|
|
2377
|
+
copyMrbTemplate(templateId: string, request: CreateMrbTemplateRequest): Promise<MrbTemplateDto>;
|
|
2378
|
+
|
|
2373
2379
|
getMrbCompanySettings(): Promise<MrbCompanySettingsDto>;
|
|
2374
2380
|
|
|
2375
2381
|
upsertMrbCompanySettings(request: UpsertMrbCompanySettings): Promise<MrbCompanySettingsDto>;
|
|
@@ -3465,6 +3471,53 @@ export class MrbClient extends AuthorizedApiBase implements IMrbClient {
|
|
|
3465
3471
|
return Promise.resolve<void>(null as any);
|
|
3466
3472
|
}
|
|
3467
3473
|
|
|
3474
|
+
/**
|
|
3475
|
+
* Copy a MRB template
|
|
3476
|
+
* @return MRB template
|
|
3477
|
+
*/
|
|
3478
|
+
copyMrbTemplate(templateId: string, request: CreateMrbTemplateRequest): Promise<MrbTemplateDto> {
|
|
3479
|
+
let url_ = this.baseUrl + "/mrb/templates/{templateId}/copy";
|
|
3480
|
+
if (templateId === undefined || templateId === null)
|
|
3481
|
+
throw new Error("The parameter 'templateId' must be defined.");
|
|
3482
|
+
url_ = url_.replace("{templateId}", encodeURIComponent("" + templateId));
|
|
3483
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3484
|
+
|
|
3485
|
+
const content_ = JSON.stringify(request);
|
|
3486
|
+
|
|
3487
|
+
let options_: RequestInit = {
|
|
3488
|
+
body: content_,
|
|
3489
|
+
method: "POST",
|
|
3490
|
+
headers: {
|
|
3491
|
+
"Content-Type": "application/json",
|
|
3492
|
+
"Accept": "application/json"
|
|
3493
|
+
}
|
|
3494
|
+
};
|
|
3495
|
+
|
|
3496
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3497
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
3498
|
+
}).then((_response: Response) => {
|
|
3499
|
+
return this.processCopyMrbTemplate(_response);
|
|
3500
|
+
});
|
|
3501
|
+
}
|
|
3502
|
+
|
|
3503
|
+
protected processCopyMrbTemplate(response: Response): Promise<MrbTemplateDto> {
|
|
3504
|
+
const status = response.status;
|
|
3505
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
3506
|
+
if (status === 200) {
|
|
3507
|
+
return response.text().then((_responseText) => {
|
|
3508
|
+
let result200: any = null;
|
|
3509
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3510
|
+
result200 = MrbTemplateDto.fromJS(resultData200);
|
|
3511
|
+
return result200;
|
|
3512
|
+
});
|
|
3513
|
+
} else if (status !== 200 && status !== 204) {
|
|
3514
|
+
return response.text().then((_responseText) => {
|
|
3515
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3516
|
+
});
|
|
3517
|
+
}
|
|
3518
|
+
return Promise.resolve<MrbTemplateDto>(null as any);
|
|
3519
|
+
}
|
|
3520
|
+
|
|
3468
3521
|
getMrbCompanySettings(): Promise<MrbCompanySettingsDto> {
|
|
3469
3522
|
let url_ = this.baseUrl + "/mrb/settings";
|
|
3470
3523
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -22459,6 +22512,7 @@ export interface IListUsersRequest {
|
|
|
22459
22512
|
|
|
22460
22513
|
export class EngageAppSettings implements IEngageAppSettings {
|
|
22461
22514
|
includeDrawingInRouteCardPrint?: boolean;
|
|
22515
|
+
routeCardPrintInLandscapeOrientation?: boolean;
|
|
22462
22516
|
|
|
22463
22517
|
constructor(data?: IEngageAppSettings) {
|
|
22464
22518
|
if (data) {
|
|
@@ -22472,6 +22526,7 @@ export class EngageAppSettings implements IEngageAppSettings {
|
|
|
22472
22526
|
init(_data?: any) {
|
|
22473
22527
|
if (_data) {
|
|
22474
22528
|
this.includeDrawingInRouteCardPrint = _data["includeDrawingInRouteCardPrint"];
|
|
22529
|
+
this.routeCardPrintInLandscapeOrientation = _data["routeCardPrintInLandscapeOrientation"];
|
|
22475
22530
|
}
|
|
22476
22531
|
}
|
|
22477
22532
|
|
|
@@ -22485,12 +22540,14 @@ export class EngageAppSettings implements IEngageAppSettings {
|
|
|
22485
22540
|
toJSON(data?: any) {
|
|
22486
22541
|
data = typeof data === 'object' ? data : {};
|
|
22487
22542
|
data["includeDrawingInRouteCardPrint"] = this.includeDrawingInRouteCardPrint;
|
|
22543
|
+
data["routeCardPrintInLandscapeOrientation"] = this.routeCardPrintInLandscapeOrientation;
|
|
22488
22544
|
return data;
|
|
22489
22545
|
}
|
|
22490
22546
|
}
|
|
22491
22547
|
|
|
22492
22548
|
export interface IEngageAppSettings {
|
|
22493
22549
|
includeDrawingInRouteCardPrint?: boolean;
|
|
22550
|
+
routeCardPrintInLandscapeOrientation?: boolean;
|
|
22494
22551
|
}
|
|
22495
22552
|
|
|
22496
22553
|
export class MoveAppSettings implements IMoveAppSettings {
|