spitfirepm 23.9600.14 → 23.9600.15
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/README.md +1 -0
- package/dist/SwaggerClients.d.ts +41 -8
- package/dist/SwaggerClients.js +263 -54
- package/dist/SwaggerClients.js.map +1 -1
- package/dist/sfRESTClient.js +41 -34
- package/dist/sfRESTClient.js.map +1 -1
- package/dist/version.d.ts +1 -0
- package/dist/version.js +6 -0
- package/dist/version.js.map +1 -0
- package/package.json +2 -1
package/README.md
CHANGED
package/dist/SwaggerClients.d.ts
CHANGED
|
@@ -1228,6 +1228,14 @@ export declare class ConfigClient extends APIClientBase {
|
|
|
1228
1228
|
private deleteEventSubscriptionsWithCallbacks;
|
|
1229
1229
|
private processDeleteEventSubscriptionsWithCallbacks;
|
|
1230
1230
|
protected processDeleteEventSubscriptions(xhr: any): number | null;
|
|
1231
|
+
/**
|
|
1232
|
+
* Returns a named dashboard tool menu
|
|
1233
|
+
* @param menuId The DropDownMenu name, e.g. ManagerToolMenu or AdminToolMenu
|
|
1234
|
+
*/
|
|
1235
|
+
getToolsMenu(menuId: string | null): Promise<MenuAction[] | null>;
|
|
1236
|
+
private getToolsMenuWithCallbacks;
|
|
1237
|
+
private processGetToolsMenuWithCallbacks;
|
|
1238
|
+
protected processGetToolsMenu(xhr: any): MenuAction[] | null | null;
|
|
1231
1239
|
/**
|
|
1232
1240
|
* Returns the Manage dashboard tool menu
|
|
1233
1241
|
*/
|
|
@@ -1390,6 +1398,31 @@ export declare class ConfigClient extends APIClientBase {
|
|
|
1390
1398
|
private deleteScopedCodeSetValuesWithCallbacks;
|
|
1391
1399
|
private processDeleteScopedCodeSetValuesWithCallbacks;
|
|
1392
1400
|
protected processDeleteScopedCodeSetValues(xhr: any): number | null;
|
|
1401
|
+
/**
|
|
1402
|
+
* Returns the current user's settings
|
|
1403
|
+
*/
|
|
1404
|
+
getUserSettings(): Promise<{
|
|
1405
|
+
[key: string]: any;
|
|
1406
|
+
} | null>;
|
|
1407
|
+
private getUserSettingsWithCallbacks;
|
|
1408
|
+
private processGetUserSettingsWithCallbacks;
|
|
1409
|
+
protected processGetUserSettings(xhr: any): {
|
|
1410
|
+
[key: string]: any;
|
|
1411
|
+
} | null | null;
|
|
1412
|
+
/**
|
|
1413
|
+
* Updates the current user's settings
|
|
1414
|
+
* @param settings Settings to merge
|
|
1415
|
+
*/
|
|
1416
|
+
patchUserSettings(settings: {
|
|
1417
|
+
[key: string]: any;
|
|
1418
|
+
}): Promise<{
|
|
1419
|
+
[key: string]: any;
|
|
1420
|
+
} | null>;
|
|
1421
|
+
private patchUserSettingsWithCallbacks;
|
|
1422
|
+
private processPatchUserSettingsWithCallbacks;
|
|
1423
|
+
protected processPatchUserSettings(xhr: any): {
|
|
1424
|
+
[key: string]: any;
|
|
1425
|
+
} | null | null;
|
|
1393
1426
|
/**
|
|
1394
1427
|
* Returns the list of workflow scripts
|
|
1395
1428
|
*/
|
|
@@ -1469,14 +1502,6 @@ export declare class DocumentToolsClient extends APIClientBase {
|
|
|
1469
1502
|
beforeSend: any;
|
|
1470
1503
|
protected jsonParseReviver: ((key: string, value: any) => any) | undefined;
|
|
1471
1504
|
constructor(baseUrl?: string);
|
|
1472
|
-
/**
|
|
1473
|
-
* Returns the header Of the specified document, including a Document Session Key
|
|
1474
|
-
* @param id Document Key
|
|
1475
|
-
*/
|
|
1476
|
-
getDocHeader(id: string): Promise<DocMasterDetail | null>;
|
|
1477
|
-
private getDocHeaderWithCallbacks;
|
|
1478
|
-
private processGetDocHeaderWithCallbacks;
|
|
1479
|
-
protected processGetDocHeader(xhr: any): DocMasterDetail | null | null;
|
|
1480
1505
|
/**
|
|
1481
1506
|
* Deletes the specified document
|
|
1482
1507
|
* @param id Document Key
|
|
@@ -1494,6 +1519,14 @@ export declare class DocumentToolsClient extends APIClientBase {
|
|
|
1494
1519
|
private updateDocHeaderWithCallbacks;
|
|
1495
1520
|
private processUpdateDocHeaderWithCallbacks;
|
|
1496
1521
|
protected processUpdateDocHeader(xhr: any): any | null;
|
|
1522
|
+
/**
|
|
1523
|
+
* Returns the header Of the specified document, including a Document Session Key
|
|
1524
|
+
* @param id Document Key
|
|
1525
|
+
*/
|
|
1526
|
+
getDocHeader(id: string): Promise<DocMasterDetail | null>;
|
|
1527
|
+
private getDocHeaderWithCallbacks;
|
|
1528
|
+
private processGetDocHeaderWithCallbacks;
|
|
1529
|
+
protected processGetDocHeader(xhr: any): DocMasterDetail | null | null;
|
|
1497
1530
|
/**
|
|
1498
1531
|
* Updates a Single field On the header Of the specified document
|
|
1499
1532
|
* @param id Document Key
|
package/dist/SwaggerClients.js
CHANGED
|
@@ -11203,6 +11203,79 @@ class ConfigClient extends APIClientBase_1.APIClientBase {
|
|
|
11203
11203
|
}
|
|
11204
11204
|
return null;
|
|
11205
11205
|
}
|
|
11206
|
+
/**
|
|
11207
|
+
* Returns a named dashboard tool menu
|
|
11208
|
+
* @param menuId The DropDownMenu name, e.g. ManagerToolMenu or AdminToolMenu
|
|
11209
|
+
*/
|
|
11210
|
+
getToolsMenu(menuId) {
|
|
11211
|
+
return new Promise((resolve, reject) => {
|
|
11212
|
+
this.getToolsMenuWithCallbacks(menuId, (result) => resolve(result), (exception, _reason) => reject(exception));
|
|
11213
|
+
});
|
|
11214
|
+
}
|
|
11215
|
+
getToolsMenuWithCallbacks(menuId, onSuccess, onFail) {
|
|
11216
|
+
let url_ = this.baseUrl + "/api/configuration/list-tools/{menuId}";
|
|
11217
|
+
if (menuId === undefined || menuId === null)
|
|
11218
|
+
throw new globalThis.Error("The parameter 'menuId' must be defined.");
|
|
11219
|
+
url_ = url_.replace("{menuId}", encodeURIComponent("" + menuId));
|
|
11220
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
11221
|
+
jQuery.ajax({
|
|
11222
|
+
url: url_,
|
|
11223
|
+
beforeSend: this.beforeSend,
|
|
11224
|
+
type: "get",
|
|
11225
|
+
dataType: "text",
|
|
11226
|
+
headers: {
|
|
11227
|
+
"Accept": "application/json"
|
|
11228
|
+
}
|
|
11229
|
+
}).done((_data, _textStatus, xhr) => {
|
|
11230
|
+
this.processGetToolsMenuWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
11231
|
+
}).fail((xhr) => {
|
|
11232
|
+
this.processGetToolsMenuWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
11233
|
+
});
|
|
11234
|
+
}
|
|
11235
|
+
processGetToolsMenuWithCallbacks(_url, xhr, onSuccess, onFail) {
|
|
11236
|
+
try {
|
|
11237
|
+
let result = this.transformResult(_url, xhr, (xhr) => this.processGetToolsMenu(xhr));
|
|
11238
|
+
if (onSuccess !== undefined)
|
|
11239
|
+
onSuccess(result);
|
|
11240
|
+
}
|
|
11241
|
+
catch (e) {
|
|
11242
|
+
if (onFail !== undefined)
|
|
11243
|
+
onFail(e, "http_service_exception");
|
|
11244
|
+
}
|
|
11245
|
+
}
|
|
11246
|
+
processGetToolsMenu(xhr) {
|
|
11247
|
+
const status = xhr.status;
|
|
11248
|
+
let _headers = {};
|
|
11249
|
+
if (status === 200) {
|
|
11250
|
+
const _responseText = xhr.responseText;
|
|
11251
|
+
let result200 = null;
|
|
11252
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11253
|
+
return result200;
|
|
11254
|
+
}
|
|
11255
|
+
else if (status === 401) {
|
|
11256
|
+
const _responseText = xhr.responseText;
|
|
11257
|
+
let result401 = null;
|
|
11258
|
+
result401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11259
|
+
return throwException("Not currently authenticated", status, _responseText, _headers, result401);
|
|
11260
|
+
}
|
|
11261
|
+
else if (status === 404) {
|
|
11262
|
+
const _responseText = xhr.responseText;
|
|
11263
|
+
let result404 = null;
|
|
11264
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11265
|
+
return throwException("No such menu, or the menu resolved to no tools", status, _responseText, _headers, result404);
|
|
11266
|
+
}
|
|
11267
|
+
else if (status === 500) {
|
|
11268
|
+
const _responseText = xhr.responseText;
|
|
11269
|
+
let result500 = null;
|
|
11270
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11271
|
+
return throwException("Internal failure; see response", status, _responseText, _headers, result500);
|
|
11272
|
+
}
|
|
11273
|
+
else if (status !== 200 && status !== 204) {
|
|
11274
|
+
const _responseText = xhr.responseText;
|
|
11275
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
11276
|
+
}
|
|
11277
|
+
return null;
|
|
11278
|
+
}
|
|
11206
11279
|
/**
|
|
11207
11280
|
* Returns the Manage dashboard tool menu
|
|
11208
11281
|
*/
|
|
@@ -12916,6 +12989,142 @@ class ConfigClient extends APIClientBase_1.APIClientBase {
|
|
|
12916
12989
|
}
|
|
12917
12990
|
return null;
|
|
12918
12991
|
}
|
|
12992
|
+
/**
|
|
12993
|
+
* Returns the current user's settings
|
|
12994
|
+
*/
|
|
12995
|
+
getUserSettings() {
|
|
12996
|
+
return new Promise((resolve, reject) => {
|
|
12997
|
+
this.getUserSettingsWithCallbacks((result) => resolve(result), (exception, _reason) => reject(exception));
|
|
12998
|
+
});
|
|
12999
|
+
}
|
|
13000
|
+
getUserSettingsWithCallbacks(onSuccess, onFail) {
|
|
13001
|
+
let url_ = this.baseUrl + "/api/configuration/user-settings";
|
|
13002
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
13003
|
+
jQuery.ajax({
|
|
13004
|
+
url: url_,
|
|
13005
|
+
beforeSend: this.beforeSend,
|
|
13006
|
+
type: "get",
|
|
13007
|
+
dataType: "text",
|
|
13008
|
+
headers: {
|
|
13009
|
+
"Accept": "application/json"
|
|
13010
|
+
}
|
|
13011
|
+
}).done((_data, _textStatus, xhr) => {
|
|
13012
|
+
this.processGetUserSettingsWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
13013
|
+
}).fail((xhr) => {
|
|
13014
|
+
this.processGetUserSettingsWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
13015
|
+
});
|
|
13016
|
+
}
|
|
13017
|
+
processGetUserSettingsWithCallbacks(_url, xhr, onSuccess, onFail) {
|
|
13018
|
+
try {
|
|
13019
|
+
let result = this.transformResult(_url, xhr, (xhr) => this.processGetUserSettings(xhr));
|
|
13020
|
+
if (onSuccess !== undefined)
|
|
13021
|
+
onSuccess(result);
|
|
13022
|
+
}
|
|
13023
|
+
catch (e) {
|
|
13024
|
+
if (onFail !== undefined)
|
|
13025
|
+
onFail(e, "http_service_exception");
|
|
13026
|
+
}
|
|
13027
|
+
}
|
|
13028
|
+
processGetUserSettings(xhr) {
|
|
13029
|
+
const status = xhr.status;
|
|
13030
|
+
let _headers = {};
|
|
13031
|
+
if (status === 200) {
|
|
13032
|
+
const _responseText = xhr.responseText;
|
|
13033
|
+
let result200 = null;
|
|
13034
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
13035
|
+
return result200;
|
|
13036
|
+
}
|
|
13037
|
+
else if (status === 401) {
|
|
13038
|
+
const _responseText = xhr.responseText;
|
|
13039
|
+
let result401 = null;
|
|
13040
|
+
result401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
13041
|
+
return throwException("Not currently authenticated", status, _responseText, _headers, result401);
|
|
13042
|
+
}
|
|
13043
|
+
else if (status === 500) {
|
|
13044
|
+
const _responseText = xhr.responseText;
|
|
13045
|
+
let result500 = null;
|
|
13046
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
13047
|
+
return throwException("Internal failure; see response", status, _responseText, _headers, result500);
|
|
13048
|
+
}
|
|
13049
|
+
else if (status !== 200 && status !== 204) {
|
|
13050
|
+
const _responseText = xhr.responseText;
|
|
13051
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
13052
|
+
}
|
|
13053
|
+
return null;
|
|
13054
|
+
}
|
|
13055
|
+
/**
|
|
13056
|
+
* Updates the current user's settings
|
|
13057
|
+
* @param settings Settings to merge
|
|
13058
|
+
*/
|
|
13059
|
+
patchUserSettings(settings) {
|
|
13060
|
+
return new Promise((resolve, reject) => {
|
|
13061
|
+
this.patchUserSettingsWithCallbacks(settings, (result) => resolve(result), (exception, _reason) => reject(exception));
|
|
13062
|
+
});
|
|
13063
|
+
}
|
|
13064
|
+
patchUserSettingsWithCallbacks(settings, onSuccess, onFail) {
|
|
13065
|
+
let url_ = this.baseUrl + "/api/configuration/user-settings";
|
|
13066
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
13067
|
+
const content_ = JSON.stringify(settings);
|
|
13068
|
+
jQuery.ajax({
|
|
13069
|
+
url: url_,
|
|
13070
|
+
beforeSend: this.beforeSend,
|
|
13071
|
+
type: "patch",
|
|
13072
|
+
data: content_,
|
|
13073
|
+
dataType: "text",
|
|
13074
|
+
headers: {
|
|
13075
|
+
"Content-Type": "application/json",
|
|
13076
|
+
"Accept": "application/json"
|
|
13077
|
+
}
|
|
13078
|
+
}).done((_data, _textStatus, xhr) => {
|
|
13079
|
+
this.processPatchUserSettingsWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
13080
|
+
}).fail((xhr) => {
|
|
13081
|
+
this.processPatchUserSettingsWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
13082
|
+
});
|
|
13083
|
+
}
|
|
13084
|
+
processPatchUserSettingsWithCallbacks(_url, xhr, onSuccess, onFail) {
|
|
13085
|
+
try {
|
|
13086
|
+
let result = this.transformResult(_url, xhr, (xhr) => this.processPatchUserSettings(xhr));
|
|
13087
|
+
if (onSuccess !== undefined)
|
|
13088
|
+
onSuccess(result);
|
|
13089
|
+
}
|
|
13090
|
+
catch (e) {
|
|
13091
|
+
if (onFail !== undefined)
|
|
13092
|
+
onFail(e, "http_service_exception");
|
|
13093
|
+
}
|
|
13094
|
+
}
|
|
13095
|
+
processPatchUserSettings(xhr) {
|
|
13096
|
+
const status = xhr.status;
|
|
13097
|
+
let _headers = {};
|
|
13098
|
+
if (status === 200) {
|
|
13099
|
+
const _responseText = xhr.responseText;
|
|
13100
|
+
let result200 = null;
|
|
13101
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
13102
|
+
return result200;
|
|
13103
|
+
}
|
|
13104
|
+
else if (status === 400) {
|
|
13105
|
+
const _responseText = xhr.responseText;
|
|
13106
|
+
let result400 = null;
|
|
13107
|
+
result400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
13108
|
+
return throwException("Request malformed", status, _responseText, _headers, result400);
|
|
13109
|
+
}
|
|
13110
|
+
else if (status === 401) {
|
|
13111
|
+
const _responseText = xhr.responseText;
|
|
13112
|
+
let result401 = null;
|
|
13113
|
+
result401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
13114
|
+
return throwException("Not currently authenticated", status, _responseText, _headers, result401);
|
|
13115
|
+
}
|
|
13116
|
+
else if (status === 500) {
|
|
13117
|
+
const _responseText = xhr.responseText;
|
|
13118
|
+
let result500 = null;
|
|
13119
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
13120
|
+
return throwException("Internal failure; see response", status, _responseText, _headers, result500);
|
|
13121
|
+
}
|
|
13122
|
+
else if (status !== 200 && status !== 204) {
|
|
13123
|
+
const _responseText = xhr.responseText;
|
|
13124
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
13125
|
+
}
|
|
13126
|
+
return null;
|
|
13127
|
+
}
|
|
12919
13128
|
/**
|
|
12920
13129
|
* Returns the list of workflow scripts
|
|
12921
13130
|
*/
|
|
@@ -13568,15 +13777,15 @@ class DocumentToolsClient extends APIClientBase_1.APIClientBase {
|
|
|
13568
13777
|
this.baseUrl = baseUrl ?? this.getBaseUrl("https://dev.spitfirepm.com:8443/SFPMS");
|
|
13569
13778
|
}
|
|
13570
13779
|
/**
|
|
13571
|
-
*
|
|
13780
|
+
* Deletes the specified document
|
|
13572
13781
|
* @param id Document Key
|
|
13573
13782
|
*/
|
|
13574
|
-
|
|
13783
|
+
deleteDocHeader(id) {
|
|
13575
13784
|
return new Promise((resolve, reject) => {
|
|
13576
|
-
this.
|
|
13785
|
+
this.deleteDocHeaderWithCallbacks(id, (result) => resolve(result), (exception, _reason) => reject(exception));
|
|
13577
13786
|
});
|
|
13578
13787
|
}
|
|
13579
|
-
|
|
13788
|
+
deleteDocHeaderWithCallbacks(id, onSuccess, onFail) {
|
|
13580
13789
|
let url_ = this.baseUrl + "/api/document/{id}";
|
|
13581
13790
|
if (id === undefined || id === null)
|
|
13582
13791
|
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
@@ -13585,20 +13794,20 @@ class DocumentToolsClient extends APIClientBase_1.APIClientBase {
|
|
|
13585
13794
|
jQuery.ajax({
|
|
13586
13795
|
url: url_,
|
|
13587
13796
|
beforeSend: this.beforeSend,
|
|
13588
|
-
type: "
|
|
13797
|
+
type: "delete",
|
|
13589
13798
|
dataType: "text",
|
|
13590
13799
|
headers: {
|
|
13591
|
-
"Accept": "application/
|
|
13800
|
+
"Accept": "application/octet-stream"
|
|
13592
13801
|
}
|
|
13593
13802
|
}).done((_data, _textStatus, xhr) => {
|
|
13594
|
-
this.
|
|
13803
|
+
this.processDeleteDocHeaderWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
13595
13804
|
}).fail((xhr) => {
|
|
13596
|
-
this.
|
|
13805
|
+
this.processDeleteDocHeaderWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
13597
13806
|
});
|
|
13598
13807
|
}
|
|
13599
|
-
|
|
13808
|
+
processDeleteDocHeaderWithCallbacks(_url, xhr, onSuccess, onFail) {
|
|
13600
13809
|
try {
|
|
13601
|
-
let result = this.transformResult(_url, xhr, (xhr) => this.
|
|
13810
|
+
let result = this.transformResult(_url, xhr, (xhr) => this.processDeleteDocHeader(xhr));
|
|
13602
13811
|
if (onSuccess !== undefined)
|
|
13603
13812
|
onSuccess(result);
|
|
13604
13813
|
}
|
|
@@ -13607,10 +13816,10 @@ class DocumentToolsClient extends APIClientBase_1.APIClientBase {
|
|
|
13607
13816
|
onFail(e, "http_service_exception");
|
|
13608
13817
|
}
|
|
13609
13818
|
}
|
|
13610
|
-
|
|
13819
|
+
processDeleteDocHeader(xhr) {
|
|
13611
13820
|
const status = xhr.status;
|
|
13612
13821
|
let _headers = {};
|
|
13613
|
-
if (status === 200) {
|
|
13822
|
+
if (status === 200 || status === 206) {
|
|
13614
13823
|
const _responseText = xhr.responseText;
|
|
13615
13824
|
let result200 = null;
|
|
13616
13825
|
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
@@ -13626,7 +13835,19 @@ class DocumentToolsClient extends APIClientBase_1.APIClientBase {
|
|
|
13626
13835
|
const _responseText = xhr.responseText;
|
|
13627
13836
|
let result404 = null;
|
|
13628
13837
|
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
13629
|
-
return throwException("Document
|
|
13838
|
+
return throwException("Document not found, or not accessible", status, _responseText, _headers, result404);
|
|
13839
|
+
}
|
|
13840
|
+
else if (status === 406) {
|
|
13841
|
+
const _responseText = xhr.responseText;
|
|
13842
|
+
let result406 = null;
|
|
13843
|
+
result406 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
13844
|
+
return throwException("Not acceptable", status, _responseText, _headers, result406);
|
|
13845
|
+
}
|
|
13846
|
+
else if (status === 409) {
|
|
13847
|
+
const _responseText = xhr.responseText;
|
|
13848
|
+
let result409 = null;
|
|
13849
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
13850
|
+
return throwException("Could Not persist the delete", status, _responseText, _headers, result409);
|
|
13630
13851
|
}
|
|
13631
13852
|
else if (status === 500) {
|
|
13632
13853
|
const _responseText = xhr.responseText;
|
|
@@ -13641,37 +13862,41 @@ class DocumentToolsClient extends APIClientBase_1.APIClientBase {
|
|
|
13641
13862
|
return null;
|
|
13642
13863
|
}
|
|
13643
13864
|
/**
|
|
13644
|
-
*
|
|
13865
|
+
* Updates the header On the specified document
|
|
13645
13866
|
* @param id Document Key
|
|
13867
|
+
* @param updatedData Replacement data
|
|
13646
13868
|
*/
|
|
13647
|
-
|
|
13869
|
+
updateDocHeader(id, updatedData) {
|
|
13648
13870
|
return new Promise((resolve, reject) => {
|
|
13649
|
-
this.
|
|
13871
|
+
this.updateDocHeaderWithCallbacks(id, updatedData, (result) => resolve(result), (exception, _reason) => reject(exception));
|
|
13650
13872
|
});
|
|
13651
13873
|
}
|
|
13652
|
-
|
|
13874
|
+
updateDocHeaderWithCallbacks(id, updatedData, onSuccess, onFail) {
|
|
13653
13875
|
let url_ = this.baseUrl + "/api/document/{id}";
|
|
13654
13876
|
if (id === undefined || id === null)
|
|
13655
13877
|
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
13656
13878
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
13657
13879
|
url_ = url_.replace(/[?&]$/, "");
|
|
13880
|
+
const content_ = JSON.stringify(updatedData);
|
|
13658
13881
|
jQuery.ajax({
|
|
13659
13882
|
url: url_,
|
|
13660
13883
|
beforeSend: this.beforeSend,
|
|
13661
|
-
type: "
|
|
13884
|
+
type: "put",
|
|
13885
|
+
data: content_,
|
|
13662
13886
|
dataType: "text",
|
|
13663
13887
|
headers: {
|
|
13888
|
+
"Content-Type": "application/json",
|
|
13664
13889
|
"Accept": "application/octet-stream"
|
|
13665
13890
|
}
|
|
13666
13891
|
}).done((_data, _textStatus, xhr) => {
|
|
13667
|
-
this.
|
|
13892
|
+
this.processUpdateDocHeaderWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
13668
13893
|
}).fail((xhr) => {
|
|
13669
|
-
this.
|
|
13894
|
+
this.processUpdateDocHeaderWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
13670
13895
|
});
|
|
13671
13896
|
}
|
|
13672
|
-
|
|
13897
|
+
processUpdateDocHeaderWithCallbacks(_url, xhr, onSuccess, onFail) {
|
|
13673
13898
|
try {
|
|
13674
|
-
let result = this.transformResult(_url, xhr, (xhr) => this.
|
|
13899
|
+
let result = this.transformResult(_url, xhr, (xhr) => this.processUpdateDocHeader(xhr));
|
|
13675
13900
|
if (onSuccess !== undefined)
|
|
13676
13901
|
onSuccess(result);
|
|
13677
13902
|
}
|
|
@@ -13680,7 +13905,7 @@ class DocumentToolsClient extends APIClientBase_1.APIClientBase {
|
|
|
13680
13905
|
onFail(e, "http_service_exception");
|
|
13681
13906
|
}
|
|
13682
13907
|
}
|
|
13683
|
-
|
|
13908
|
+
processUpdateDocHeader(xhr) {
|
|
13684
13909
|
const status = xhr.status;
|
|
13685
13910
|
let _headers = {};
|
|
13686
13911
|
if (status === 200 || status === 206) {
|
|
@@ -13699,19 +13924,19 @@ class DocumentToolsClient extends APIClientBase_1.APIClientBase {
|
|
|
13699
13924
|
const _responseText = xhr.responseText;
|
|
13700
13925
|
let result404 = null;
|
|
13701
13926
|
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
13702
|
-
return throwException("Document
|
|
13927
|
+
return throwException("Document Not found, Or Not accessible", status, _responseText, _headers, result404);
|
|
13703
13928
|
}
|
|
13704
13929
|
else if (status === 406) {
|
|
13705
13930
|
const _responseText = xhr.responseText;
|
|
13706
13931
|
let result406 = null;
|
|
13707
13932
|
result406 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
13708
|
-
return throwException("
|
|
13933
|
+
return throwException("Document number cannot be changed by this method", status, _responseText, _headers, result406);
|
|
13709
13934
|
}
|
|
13710
13935
|
else if (status === 409) {
|
|
13711
13936
|
const _responseText = xhr.responseText;
|
|
13712
13937
|
let result409 = null;
|
|
13713
13938
|
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
13714
|
-
return throwException("Could Not persist the
|
|
13939
|
+
return throwException("Could Not persist the update", status, _responseText, _headers, result409);
|
|
13715
13940
|
}
|
|
13716
13941
|
else if (status === 500) {
|
|
13717
13942
|
const _responseText = xhr.responseText;
|
|
@@ -13726,41 +13951,37 @@ class DocumentToolsClient extends APIClientBase_1.APIClientBase {
|
|
|
13726
13951
|
return null;
|
|
13727
13952
|
}
|
|
13728
13953
|
/**
|
|
13729
|
-
*
|
|
13954
|
+
* Returns the header Of the specified document, including a Document Session Key
|
|
13730
13955
|
* @param id Document Key
|
|
13731
|
-
* @param updatedData Replacement data
|
|
13732
13956
|
*/
|
|
13733
|
-
|
|
13957
|
+
getDocHeader(id) {
|
|
13734
13958
|
return new Promise((resolve, reject) => {
|
|
13735
|
-
this.
|
|
13959
|
+
this.getDocHeaderWithCallbacks(id, (result) => resolve(result), (exception, _reason) => reject(exception));
|
|
13736
13960
|
});
|
|
13737
13961
|
}
|
|
13738
|
-
|
|
13962
|
+
getDocHeaderWithCallbacks(id, onSuccess, onFail) {
|
|
13739
13963
|
let url_ = this.baseUrl + "/api/document/{id}";
|
|
13740
13964
|
if (id === undefined || id === null)
|
|
13741
13965
|
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
13742
13966
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
13743
13967
|
url_ = url_.replace(/[?&]$/, "");
|
|
13744
|
-
const content_ = JSON.stringify(updatedData);
|
|
13745
13968
|
jQuery.ajax({
|
|
13746
13969
|
url: url_,
|
|
13747
13970
|
beforeSend: this.beforeSend,
|
|
13748
|
-
type: "
|
|
13749
|
-
data: content_,
|
|
13971
|
+
type: "get",
|
|
13750
13972
|
dataType: "text",
|
|
13751
13973
|
headers: {
|
|
13752
|
-
"
|
|
13753
|
-
"Accept": "application/octet-stream"
|
|
13974
|
+
"Accept": "application/json"
|
|
13754
13975
|
}
|
|
13755
13976
|
}).done((_data, _textStatus, xhr) => {
|
|
13756
|
-
this.
|
|
13977
|
+
this.processGetDocHeaderWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
13757
13978
|
}).fail((xhr) => {
|
|
13758
|
-
this.
|
|
13979
|
+
this.processGetDocHeaderWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
13759
13980
|
});
|
|
13760
13981
|
}
|
|
13761
|
-
|
|
13982
|
+
processGetDocHeaderWithCallbacks(_url, xhr, onSuccess, onFail) {
|
|
13762
13983
|
try {
|
|
13763
|
-
let result = this.transformResult(_url, xhr, (xhr) => this.
|
|
13984
|
+
let result = this.transformResult(_url, xhr, (xhr) => this.processGetDocHeader(xhr));
|
|
13764
13985
|
if (onSuccess !== undefined)
|
|
13765
13986
|
onSuccess(result);
|
|
13766
13987
|
}
|
|
@@ -13769,10 +13990,10 @@ class DocumentToolsClient extends APIClientBase_1.APIClientBase {
|
|
|
13769
13990
|
onFail(e, "http_service_exception");
|
|
13770
13991
|
}
|
|
13771
13992
|
}
|
|
13772
|
-
|
|
13993
|
+
processGetDocHeader(xhr) {
|
|
13773
13994
|
const status = xhr.status;
|
|
13774
13995
|
let _headers = {};
|
|
13775
|
-
if (status === 200
|
|
13996
|
+
if (status === 200) {
|
|
13776
13997
|
const _responseText = xhr.responseText;
|
|
13777
13998
|
let result200 = null;
|
|
13778
13999
|
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
@@ -13790,18 +14011,6 @@ class DocumentToolsClient extends APIClientBase_1.APIClientBase {
|
|
|
13790
14011
|
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
13791
14012
|
return throwException("Document Not found, Or Not accessible", status, _responseText, _headers, result404);
|
|
13792
14013
|
}
|
|
13793
|
-
else if (status === 406) {
|
|
13794
|
-
const _responseText = xhr.responseText;
|
|
13795
|
-
let result406 = null;
|
|
13796
|
-
result406 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
13797
|
-
return throwException("Document number cannot be changed by this method", status, _responseText, _headers, result406);
|
|
13798
|
-
}
|
|
13799
|
-
else if (status === 409) {
|
|
13800
|
-
const _responseText = xhr.responseText;
|
|
13801
|
-
let result409 = null;
|
|
13802
|
-
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
13803
|
-
return throwException("Could Not persist the update", status, _responseText, _headers, result409);
|
|
13804
|
-
}
|
|
13805
14014
|
else if (status === 500) {
|
|
13806
14015
|
const _responseText = xhr.responseText;
|
|
13807
14016
|
let result500 = null;
|