spitfirepm 23.9600.18 → 23.9700.1
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 +27 -18
- package/dist/SwaggerClients.js +200 -110
- package/dist/SwaggerClients.js.map +1 -1
- package/dist/sfRESTClient.d.ts +5 -3
- package/dist/sfRESTClient.js +26 -18
- package/dist/sfRESTClient.js.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/SwaggerClients.d.ts
CHANGED
|
@@ -1510,6 +1510,15 @@ export declare class DocumentToolsClient extends APIClientBase {
|
|
|
1510
1510
|
beforeSend: any;
|
|
1511
1511
|
protected jsonParseReviver: ((key: string, value: any) => any) | undefined;
|
|
1512
1512
|
constructor(baseUrl?: string);
|
|
1513
|
+
/**
|
|
1514
|
+
* Updates the header On the specified document
|
|
1515
|
+
* @param id Document Key
|
|
1516
|
+
* @param updatedData Replacement data
|
|
1517
|
+
*/
|
|
1518
|
+
updateDocHeader(id: string, updatedData: DocMasterDetail): Promise<any>;
|
|
1519
|
+
private updateDocHeaderWithCallbacks;
|
|
1520
|
+
private processUpdateDocHeaderWithCallbacks;
|
|
1521
|
+
protected processUpdateDocHeader(xhr: any): any | null;
|
|
1513
1522
|
/**
|
|
1514
1523
|
* Returns the header Of the specified document, including a Document Session Key
|
|
1515
1524
|
* @param id Document Key
|
|
@@ -1526,15 +1535,6 @@ export declare class DocumentToolsClient extends APIClientBase {
|
|
|
1526
1535
|
private deleteDocHeaderWithCallbacks;
|
|
1527
1536
|
private processDeleteDocHeaderWithCallbacks;
|
|
1528
1537
|
protected processDeleteDocHeader(xhr: any): any | null;
|
|
1529
|
-
/**
|
|
1530
|
-
* Updates the header On the specified document
|
|
1531
|
-
* @param id Document Key
|
|
1532
|
-
* @param updatedData Replacement data
|
|
1533
|
-
*/
|
|
1534
|
-
updateDocHeader(id: string, updatedData: DocMasterDetail): Promise<any>;
|
|
1535
|
-
private updateDocHeaderWithCallbacks;
|
|
1536
|
-
private processUpdateDocHeaderWithCallbacks;
|
|
1537
|
-
protected processUpdateDocHeader(xhr: any): any | null;
|
|
1538
1538
|
/**
|
|
1539
1539
|
* Updates a Single field On the header Of the specified document
|
|
1540
1540
|
* @param id Document Key
|
|
@@ -1916,6 +1916,14 @@ export declare class DocumentToolsClient extends APIClientBase {
|
|
|
1916
1916
|
private addDocDateWithCallbacks;
|
|
1917
1917
|
private processAddDocDateWithCallbacks;
|
|
1918
1918
|
protected processAddDocDate(xhr: any): DocDate | null | null;
|
|
1919
|
+
/**
|
|
1920
|
+
* Returns the dates for the specified document
|
|
1921
|
+
* @param id Document Key
|
|
1922
|
+
*/
|
|
1923
|
+
getDocDates(id: string): Promise<DocDate[] | null>;
|
|
1924
|
+
private getDocDatesWithCallbacks;
|
|
1925
|
+
private processGetDocDatesWithCallbacks;
|
|
1926
|
+
protected processGetDocDates(xhr: any): DocDate[] | null | null;
|
|
1919
1927
|
/**
|
|
1920
1928
|
* Deletes a specific date from the specified document
|
|
1921
1929
|
* @param id Document Key
|
|
@@ -1936,14 +1944,6 @@ export declare class DocumentToolsClient extends APIClientBase {
|
|
|
1936
1944
|
private updateDocDatesWithCallbacks;
|
|
1937
1945
|
private processUpdateDocDatesWithCallbacks;
|
|
1938
1946
|
protected processUpdateDocDates(xhr: any): string | null;
|
|
1939
|
-
/**
|
|
1940
|
-
* Returns the dates for the specified document
|
|
1941
|
-
* @param id Document Key
|
|
1942
|
-
*/
|
|
1943
|
-
getDocDates(id: string): Promise<DocDate[] | null>;
|
|
1944
|
-
private getDocDatesWithCallbacks;
|
|
1945
|
-
private processGetDocDatesWithCallbacks;
|
|
1946
|
-
protected processGetDocDates(xhr: any): DocDate[] | null | null;
|
|
1947
1947
|
/**
|
|
1948
1948
|
* Information about actions for the specified document
|
|
1949
1949
|
* @param id Document Key
|
|
@@ -2363,7 +2363,7 @@ export declare class DocumentToolsClient extends APIClientBase {
|
|
|
2363
2363
|
private processGetDocSessionWithCallbacks;
|
|
2364
2364
|
protected processGetDocSession(xhr: any): string | null | null;
|
|
2365
2365
|
/**
|
|
2366
|
-
* Ends the Document Session
|
|
2366
|
+
* Ends the Document Session (see also EndDocSessionViaPost)
|
|
2367
2367
|
* @param id Document Key
|
|
2368
2368
|
* @param sessionID cache key or session
|
|
2369
2369
|
*/
|
|
@@ -2395,6 +2395,15 @@ export declare class DocumentToolsClient extends APIClientBase {
|
|
|
2395
2395
|
protected processPatchDocData(xhr: any): {
|
|
2396
2396
|
[key: string]: number;
|
|
2397
2397
|
} | null | null;
|
|
2398
|
+
/**
|
|
2399
|
+
* Ends the Document Session (sendBeacon-friendly POST)
|
|
2400
|
+
* @param id Document Key
|
|
2401
|
+
* @param sessionID cache key or session
|
|
2402
|
+
*/
|
|
2403
|
+
endDocSessionViaPost(id: string, sessionID: string | null): Promise<HttpStatusCode>;
|
|
2404
|
+
private endDocSessionViaPostWithCallbacks;
|
|
2405
|
+
private processEndDocSessionViaPostWithCallbacks;
|
|
2406
|
+
protected processEndDocSessionViaPost(xhr: any): HttpStatusCode | null;
|
|
2398
2407
|
/**
|
|
2399
2408
|
* Modifies the current exclusivity of this document session
|
|
2400
2409
|
* @param id Document Key
|
package/dist/SwaggerClients.js
CHANGED
|
@@ -13844,37 +13844,41 @@ class DocumentToolsClient extends APIClientBase_1.APIClientBase {
|
|
|
13844
13844
|
this.baseUrl = baseUrl ?? this.getBaseUrl("https://dev.spitfirepm.com:8443/SFPMS");
|
|
13845
13845
|
}
|
|
13846
13846
|
/**
|
|
13847
|
-
*
|
|
13847
|
+
* Updates the header On the specified document
|
|
13848
13848
|
* @param id Document Key
|
|
13849
|
+
* @param updatedData Replacement data
|
|
13849
13850
|
*/
|
|
13850
|
-
|
|
13851
|
+
updateDocHeader(id, updatedData) {
|
|
13851
13852
|
return new Promise((resolve, reject) => {
|
|
13852
|
-
this.
|
|
13853
|
+
this.updateDocHeaderWithCallbacks(id, updatedData, (result) => resolve(result), (exception, _reason) => reject(exception));
|
|
13853
13854
|
});
|
|
13854
13855
|
}
|
|
13855
|
-
|
|
13856
|
+
updateDocHeaderWithCallbacks(id, updatedData, onSuccess, onFail) {
|
|
13856
13857
|
let url_ = this.baseUrl + "/api/document/{id}";
|
|
13857
13858
|
if (id === undefined || id === null)
|
|
13858
13859
|
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
13859
13860
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
13860
13861
|
url_ = url_.replace(/[?&]$/, "");
|
|
13862
|
+
const content_ = JSON.stringify(updatedData);
|
|
13861
13863
|
jQuery.ajax({
|
|
13862
13864
|
url: url_,
|
|
13863
13865
|
beforeSend: this.beforeSend,
|
|
13864
|
-
type: "
|
|
13866
|
+
type: "put",
|
|
13867
|
+
data: content_,
|
|
13865
13868
|
dataType: "text",
|
|
13866
13869
|
headers: {
|
|
13867
|
-
"
|
|
13870
|
+
"Content-Type": "application/json",
|
|
13871
|
+
"Accept": "application/octet-stream"
|
|
13868
13872
|
}
|
|
13869
13873
|
}).done((_data, _textStatus, xhr) => {
|
|
13870
|
-
this.
|
|
13874
|
+
this.processUpdateDocHeaderWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
13871
13875
|
}).fail((xhr) => {
|
|
13872
|
-
this.
|
|
13876
|
+
this.processUpdateDocHeaderWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
13873
13877
|
});
|
|
13874
13878
|
}
|
|
13875
|
-
|
|
13879
|
+
processUpdateDocHeaderWithCallbacks(_url, xhr, onSuccess, onFail) {
|
|
13876
13880
|
try {
|
|
13877
|
-
let result = this.transformResult(_url, xhr, (xhr) => this.
|
|
13881
|
+
let result = this.transformResult(_url, xhr, (xhr) => this.processUpdateDocHeader(xhr));
|
|
13878
13882
|
if (onSuccess !== undefined)
|
|
13879
13883
|
onSuccess(result);
|
|
13880
13884
|
}
|
|
@@ -13883,10 +13887,10 @@ class DocumentToolsClient extends APIClientBase_1.APIClientBase {
|
|
|
13883
13887
|
onFail(e, "http_service_exception");
|
|
13884
13888
|
}
|
|
13885
13889
|
}
|
|
13886
|
-
|
|
13890
|
+
processUpdateDocHeader(xhr) {
|
|
13887
13891
|
const status = xhr.status;
|
|
13888
13892
|
let _headers = {};
|
|
13889
|
-
if (status === 200) {
|
|
13893
|
+
if (status === 200 || status === 206) {
|
|
13890
13894
|
const _responseText = xhr.responseText;
|
|
13891
13895
|
let result200 = null;
|
|
13892
13896
|
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
@@ -13904,6 +13908,18 @@ class DocumentToolsClient extends APIClientBase_1.APIClientBase {
|
|
|
13904
13908
|
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
13905
13909
|
return throwException("Document Not found, Or Not accessible", status, _responseText, _headers, result404);
|
|
13906
13910
|
}
|
|
13911
|
+
else if (status === 406) {
|
|
13912
|
+
const _responseText = xhr.responseText;
|
|
13913
|
+
let result406 = null;
|
|
13914
|
+
result406 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
13915
|
+
return throwException("Document number cannot be changed by this method", status, _responseText, _headers, result406);
|
|
13916
|
+
}
|
|
13917
|
+
else if (status === 409) {
|
|
13918
|
+
const _responseText = xhr.responseText;
|
|
13919
|
+
let result409 = null;
|
|
13920
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
13921
|
+
return throwException("Could Not persist the update", status, _responseText, _headers, result409);
|
|
13922
|
+
}
|
|
13907
13923
|
else if (status === 500) {
|
|
13908
13924
|
const _responseText = xhr.responseText;
|
|
13909
13925
|
let result500 = null;
|
|
@@ -13917,15 +13933,15 @@ class DocumentToolsClient extends APIClientBase_1.APIClientBase {
|
|
|
13917
13933
|
return null;
|
|
13918
13934
|
}
|
|
13919
13935
|
/**
|
|
13920
|
-
*
|
|
13936
|
+
* Returns the header Of the specified document, including a Document Session Key
|
|
13921
13937
|
* @param id Document Key
|
|
13922
13938
|
*/
|
|
13923
|
-
|
|
13939
|
+
getDocHeader(id) {
|
|
13924
13940
|
return new Promise((resolve, reject) => {
|
|
13925
|
-
this.
|
|
13941
|
+
this.getDocHeaderWithCallbacks(id, (result) => resolve(result), (exception, _reason) => reject(exception));
|
|
13926
13942
|
});
|
|
13927
13943
|
}
|
|
13928
|
-
|
|
13944
|
+
getDocHeaderWithCallbacks(id, onSuccess, onFail) {
|
|
13929
13945
|
let url_ = this.baseUrl + "/api/document/{id}";
|
|
13930
13946
|
if (id === undefined || id === null)
|
|
13931
13947
|
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
@@ -13934,20 +13950,20 @@ class DocumentToolsClient extends APIClientBase_1.APIClientBase {
|
|
|
13934
13950
|
jQuery.ajax({
|
|
13935
13951
|
url: url_,
|
|
13936
13952
|
beforeSend: this.beforeSend,
|
|
13937
|
-
type: "
|
|
13953
|
+
type: "get",
|
|
13938
13954
|
dataType: "text",
|
|
13939
13955
|
headers: {
|
|
13940
|
-
"Accept": "application/
|
|
13956
|
+
"Accept": "application/json"
|
|
13941
13957
|
}
|
|
13942
13958
|
}).done((_data, _textStatus, xhr) => {
|
|
13943
|
-
this.
|
|
13959
|
+
this.processGetDocHeaderWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
13944
13960
|
}).fail((xhr) => {
|
|
13945
|
-
this.
|
|
13961
|
+
this.processGetDocHeaderWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
13946
13962
|
});
|
|
13947
13963
|
}
|
|
13948
|
-
|
|
13964
|
+
processGetDocHeaderWithCallbacks(_url, xhr, onSuccess, onFail) {
|
|
13949
13965
|
try {
|
|
13950
|
-
let result = this.transformResult(_url, xhr, (xhr) => this.
|
|
13966
|
+
let result = this.transformResult(_url, xhr, (xhr) => this.processGetDocHeader(xhr));
|
|
13951
13967
|
if (onSuccess !== undefined)
|
|
13952
13968
|
onSuccess(result);
|
|
13953
13969
|
}
|
|
@@ -13956,10 +13972,10 @@ class DocumentToolsClient extends APIClientBase_1.APIClientBase {
|
|
|
13956
13972
|
onFail(e, "http_service_exception");
|
|
13957
13973
|
}
|
|
13958
13974
|
}
|
|
13959
|
-
|
|
13975
|
+
processGetDocHeader(xhr) {
|
|
13960
13976
|
const status = xhr.status;
|
|
13961
13977
|
let _headers = {};
|
|
13962
|
-
if (status === 200
|
|
13978
|
+
if (status === 200) {
|
|
13963
13979
|
const _responseText = xhr.responseText;
|
|
13964
13980
|
let result200 = null;
|
|
13965
13981
|
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
@@ -13975,19 +13991,7 @@ class DocumentToolsClient extends APIClientBase_1.APIClientBase {
|
|
|
13975
13991
|
const _responseText = xhr.responseText;
|
|
13976
13992
|
let result404 = null;
|
|
13977
13993
|
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
13978
|
-
return throwException("Document
|
|
13979
|
-
}
|
|
13980
|
-
else if (status === 406) {
|
|
13981
|
-
const _responseText = xhr.responseText;
|
|
13982
|
-
let result406 = null;
|
|
13983
|
-
result406 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
13984
|
-
return throwException("Not acceptable", status, _responseText, _headers, result406);
|
|
13985
|
-
}
|
|
13986
|
-
else if (status === 409) {
|
|
13987
|
-
const _responseText = xhr.responseText;
|
|
13988
|
-
let result409 = null;
|
|
13989
|
-
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
13990
|
-
return throwException("Could Not persist the delete", status, _responseText, _headers, result409);
|
|
13994
|
+
return throwException("Document Not found, Or Not accessible", status, _responseText, _headers, result404);
|
|
13991
13995
|
}
|
|
13992
13996
|
else if (status === 500) {
|
|
13993
13997
|
const _responseText = xhr.responseText;
|
|
@@ -14002,41 +14006,37 @@ class DocumentToolsClient extends APIClientBase_1.APIClientBase {
|
|
|
14002
14006
|
return null;
|
|
14003
14007
|
}
|
|
14004
14008
|
/**
|
|
14005
|
-
*
|
|
14009
|
+
* Deletes the specified document
|
|
14006
14010
|
* @param id Document Key
|
|
14007
|
-
* @param updatedData Replacement data
|
|
14008
14011
|
*/
|
|
14009
|
-
|
|
14012
|
+
deleteDocHeader(id) {
|
|
14010
14013
|
return new Promise((resolve, reject) => {
|
|
14011
|
-
this.
|
|
14014
|
+
this.deleteDocHeaderWithCallbacks(id, (result) => resolve(result), (exception, _reason) => reject(exception));
|
|
14012
14015
|
});
|
|
14013
14016
|
}
|
|
14014
|
-
|
|
14017
|
+
deleteDocHeaderWithCallbacks(id, onSuccess, onFail) {
|
|
14015
14018
|
let url_ = this.baseUrl + "/api/document/{id}";
|
|
14016
14019
|
if (id === undefined || id === null)
|
|
14017
14020
|
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
14018
14021
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
14019
14022
|
url_ = url_.replace(/[?&]$/, "");
|
|
14020
|
-
const content_ = JSON.stringify(updatedData);
|
|
14021
14023
|
jQuery.ajax({
|
|
14022
14024
|
url: url_,
|
|
14023
14025
|
beforeSend: this.beforeSend,
|
|
14024
|
-
type: "
|
|
14025
|
-
data: content_,
|
|
14026
|
+
type: "delete",
|
|
14026
14027
|
dataType: "text",
|
|
14027
14028
|
headers: {
|
|
14028
|
-
"Content-Type": "application/json",
|
|
14029
14029
|
"Accept": "application/octet-stream"
|
|
14030
14030
|
}
|
|
14031
14031
|
}).done((_data, _textStatus, xhr) => {
|
|
14032
|
-
this.
|
|
14032
|
+
this.processDeleteDocHeaderWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
14033
14033
|
}).fail((xhr) => {
|
|
14034
|
-
this.
|
|
14034
|
+
this.processDeleteDocHeaderWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
14035
14035
|
});
|
|
14036
14036
|
}
|
|
14037
|
-
|
|
14037
|
+
processDeleteDocHeaderWithCallbacks(_url, xhr, onSuccess, onFail) {
|
|
14038
14038
|
try {
|
|
14039
|
-
let result = this.transformResult(_url, xhr, (xhr) => this.
|
|
14039
|
+
let result = this.transformResult(_url, xhr, (xhr) => this.processDeleteDocHeader(xhr));
|
|
14040
14040
|
if (onSuccess !== undefined)
|
|
14041
14041
|
onSuccess(result);
|
|
14042
14042
|
}
|
|
@@ -14045,7 +14045,7 @@ class DocumentToolsClient extends APIClientBase_1.APIClientBase {
|
|
|
14045
14045
|
onFail(e, "http_service_exception");
|
|
14046
14046
|
}
|
|
14047
14047
|
}
|
|
14048
|
-
|
|
14048
|
+
processDeleteDocHeader(xhr) {
|
|
14049
14049
|
const status = xhr.status;
|
|
14050
14050
|
let _headers = {};
|
|
14051
14051
|
if (status === 200 || status === 206) {
|
|
@@ -14064,19 +14064,19 @@ class DocumentToolsClient extends APIClientBase_1.APIClientBase {
|
|
|
14064
14064
|
const _responseText = xhr.responseText;
|
|
14065
14065
|
let result404 = null;
|
|
14066
14066
|
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
14067
|
-
return throwException("Document
|
|
14067
|
+
return throwException("Document not found, or not accessible", status, _responseText, _headers, result404);
|
|
14068
14068
|
}
|
|
14069
14069
|
else if (status === 406) {
|
|
14070
14070
|
const _responseText = xhr.responseText;
|
|
14071
14071
|
let result406 = null;
|
|
14072
14072
|
result406 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
14073
|
-
return throwException("
|
|
14073
|
+
return throwException("Not acceptable", status, _responseText, _headers, result406);
|
|
14074
14074
|
}
|
|
14075
14075
|
else if (status === 409) {
|
|
14076
14076
|
const _responseText = xhr.responseText;
|
|
14077
14077
|
let result409 = null;
|
|
14078
14078
|
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
14079
|
-
return throwException("Could Not persist the
|
|
14079
|
+
return throwException("Could Not persist the delete", status, _responseText, _headers, result409);
|
|
14080
14080
|
}
|
|
14081
14081
|
else if (status === 500) {
|
|
14082
14082
|
const _responseText = xhr.responseText;
|
|
@@ -17459,6 +17459,61 @@ class DocumentToolsClient extends APIClientBase_1.APIClientBase {
|
|
|
17459
17459
|
}
|
|
17460
17460
|
return null;
|
|
17461
17461
|
}
|
|
17462
|
+
/**
|
|
17463
|
+
* Returns the dates for the specified document
|
|
17464
|
+
* @param id Document Key
|
|
17465
|
+
*/
|
|
17466
|
+
getDocDates(id) {
|
|
17467
|
+
return new Promise((resolve, reject) => {
|
|
17468
|
+
this.getDocDatesWithCallbacks(id, (result) => resolve(result), (exception, _reason) => reject(exception));
|
|
17469
|
+
});
|
|
17470
|
+
}
|
|
17471
|
+
getDocDatesWithCallbacks(id, onSuccess, onFail) {
|
|
17472
|
+
let url_ = this.baseUrl + "/api/document/{id}/dates";
|
|
17473
|
+
if (id === undefined || id === null)
|
|
17474
|
+
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
17475
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
17476
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
17477
|
+
jQuery.ajax({
|
|
17478
|
+
url: url_,
|
|
17479
|
+
beforeSend: this.beforeSend,
|
|
17480
|
+
type: "get",
|
|
17481
|
+
dataType: "text",
|
|
17482
|
+
headers: {
|
|
17483
|
+
"Accept": "application/json"
|
|
17484
|
+
}
|
|
17485
|
+
}).done((_data, _textStatus, xhr) => {
|
|
17486
|
+
this.processGetDocDatesWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
17487
|
+
}).fail((xhr) => {
|
|
17488
|
+
this.processGetDocDatesWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
17489
|
+
});
|
|
17490
|
+
}
|
|
17491
|
+
processGetDocDatesWithCallbacks(_url, xhr, onSuccess, onFail) {
|
|
17492
|
+
try {
|
|
17493
|
+
let result = this.transformResult(_url, xhr, (xhr) => this.processGetDocDates(xhr));
|
|
17494
|
+
if (onSuccess !== undefined)
|
|
17495
|
+
onSuccess(result);
|
|
17496
|
+
}
|
|
17497
|
+
catch (e) {
|
|
17498
|
+
if (onFail !== undefined)
|
|
17499
|
+
onFail(e, "http_service_exception");
|
|
17500
|
+
}
|
|
17501
|
+
}
|
|
17502
|
+
processGetDocDates(xhr) {
|
|
17503
|
+
const status = xhr.status;
|
|
17504
|
+
let _headers = {};
|
|
17505
|
+
if (status === 200) {
|
|
17506
|
+
const _responseText = xhr.responseText;
|
|
17507
|
+
let result200 = null;
|
|
17508
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
17509
|
+
return result200;
|
|
17510
|
+
}
|
|
17511
|
+
else if (status !== 200 && status !== 204) {
|
|
17512
|
+
const _responseText = xhr.responseText;
|
|
17513
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
17514
|
+
}
|
|
17515
|
+
return null;
|
|
17516
|
+
}
|
|
17462
17517
|
/**
|
|
17463
17518
|
* Deletes a specific date from the specified document
|
|
17464
17519
|
* @param id Document Key
|
|
@@ -17633,61 +17688,6 @@ class DocumentToolsClient extends APIClientBase_1.APIClientBase {
|
|
|
17633
17688
|
}
|
|
17634
17689
|
return null;
|
|
17635
17690
|
}
|
|
17636
|
-
/**
|
|
17637
|
-
* Returns the dates for the specified document
|
|
17638
|
-
* @param id Document Key
|
|
17639
|
-
*/
|
|
17640
|
-
getDocDates(id) {
|
|
17641
|
-
return new Promise((resolve, reject) => {
|
|
17642
|
-
this.getDocDatesWithCallbacks(id, (result) => resolve(result), (exception, _reason) => reject(exception));
|
|
17643
|
-
});
|
|
17644
|
-
}
|
|
17645
|
-
getDocDatesWithCallbacks(id, onSuccess, onFail) {
|
|
17646
|
-
let url_ = this.baseUrl + "/api/document/{id}/dates";
|
|
17647
|
-
if (id === undefined || id === null)
|
|
17648
|
-
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
17649
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
17650
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
17651
|
-
jQuery.ajax({
|
|
17652
|
-
url: url_,
|
|
17653
|
-
beforeSend: this.beforeSend,
|
|
17654
|
-
type: "get",
|
|
17655
|
-
dataType: "text",
|
|
17656
|
-
headers: {
|
|
17657
|
-
"Accept": "application/json"
|
|
17658
|
-
}
|
|
17659
|
-
}).done((_data, _textStatus, xhr) => {
|
|
17660
|
-
this.processGetDocDatesWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
17661
|
-
}).fail((xhr) => {
|
|
17662
|
-
this.processGetDocDatesWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
17663
|
-
});
|
|
17664
|
-
}
|
|
17665
|
-
processGetDocDatesWithCallbacks(_url, xhr, onSuccess, onFail) {
|
|
17666
|
-
try {
|
|
17667
|
-
let result = this.transformResult(_url, xhr, (xhr) => this.processGetDocDates(xhr));
|
|
17668
|
-
if (onSuccess !== undefined)
|
|
17669
|
-
onSuccess(result);
|
|
17670
|
-
}
|
|
17671
|
-
catch (e) {
|
|
17672
|
-
if (onFail !== undefined)
|
|
17673
|
-
onFail(e, "http_service_exception");
|
|
17674
|
-
}
|
|
17675
|
-
}
|
|
17676
|
-
processGetDocDates(xhr) {
|
|
17677
|
-
const status = xhr.status;
|
|
17678
|
-
let _headers = {};
|
|
17679
|
-
if (status === 200) {
|
|
17680
|
-
const _responseText = xhr.responseText;
|
|
17681
|
-
let result200 = null;
|
|
17682
|
-
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
17683
|
-
return result200;
|
|
17684
|
-
}
|
|
17685
|
-
else if (status !== 200 && status !== 204) {
|
|
17686
|
-
const _responseText = xhr.responseText;
|
|
17687
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
17688
|
-
}
|
|
17689
|
-
return null;
|
|
17690
|
-
}
|
|
17691
17691
|
/**
|
|
17692
17692
|
* Information about actions for the specified document
|
|
17693
17693
|
* @param id Document Key
|
|
@@ -21645,7 +21645,7 @@ class DocumentToolsClient extends APIClientBase_1.APIClientBase {
|
|
|
21645
21645
|
return null;
|
|
21646
21646
|
}
|
|
21647
21647
|
/**
|
|
21648
|
-
* Ends the Document Session
|
|
21648
|
+
* Ends the Document Session (see also EndDocSessionViaPost)
|
|
21649
21649
|
* @param id Document Key
|
|
21650
21650
|
* @param sessionID cache key or session
|
|
21651
21651
|
*/
|
|
@@ -21932,6 +21932,96 @@ class DocumentToolsClient extends APIClientBase_1.APIClientBase {
|
|
|
21932
21932
|
}
|
|
21933
21933
|
return null;
|
|
21934
21934
|
}
|
|
21935
|
+
/**
|
|
21936
|
+
* Ends the Document Session (sendBeacon-friendly POST)
|
|
21937
|
+
* @param id Document Key
|
|
21938
|
+
* @param sessionID cache key or session
|
|
21939
|
+
*/
|
|
21940
|
+
endDocSessionViaPost(id, sessionID) {
|
|
21941
|
+
return new Promise((resolve, reject) => {
|
|
21942
|
+
this.endDocSessionViaPostWithCallbacks(id, sessionID, (result) => resolve(result), (exception, _reason) => reject(exception));
|
|
21943
|
+
});
|
|
21944
|
+
}
|
|
21945
|
+
endDocSessionViaPostWithCallbacks(id, sessionID, onSuccess, onFail) {
|
|
21946
|
+
let url_ = this.baseUrl + "/api/document/{id}/session/end?";
|
|
21947
|
+
if (id === undefined || id === null)
|
|
21948
|
+
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
21949
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
21950
|
+
if (sessionID === undefined)
|
|
21951
|
+
throw new globalThis.Error("The parameter 'sessionID' must be defined.");
|
|
21952
|
+
else if (sessionID !== null)
|
|
21953
|
+
url_ += "sessionID=" + encodeURIComponent("" + sessionID) + "&";
|
|
21954
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
21955
|
+
jQuery.ajax({
|
|
21956
|
+
url: url_,
|
|
21957
|
+
beforeSend: this.beforeSend,
|
|
21958
|
+
type: "post",
|
|
21959
|
+
dataType: "text",
|
|
21960
|
+
headers: {
|
|
21961
|
+
"Accept": "application/json"
|
|
21962
|
+
}
|
|
21963
|
+
}).done((_data, _textStatus, xhr) => {
|
|
21964
|
+
this.processEndDocSessionViaPostWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
21965
|
+
}).fail((xhr) => {
|
|
21966
|
+
this.processEndDocSessionViaPostWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
21967
|
+
});
|
|
21968
|
+
}
|
|
21969
|
+
processEndDocSessionViaPostWithCallbacks(_url, xhr, onSuccess, onFail) {
|
|
21970
|
+
try {
|
|
21971
|
+
let result = this.transformResult(_url, xhr, (xhr) => this.processEndDocSessionViaPost(xhr));
|
|
21972
|
+
if (onSuccess !== undefined)
|
|
21973
|
+
onSuccess(result);
|
|
21974
|
+
}
|
|
21975
|
+
catch (e) {
|
|
21976
|
+
if (onFail !== undefined)
|
|
21977
|
+
onFail(e, "http_service_exception");
|
|
21978
|
+
}
|
|
21979
|
+
}
|
|
21980
|
+
processEndDocSessionViaPost(xhr) {
|
|
21981
|
+
const status = xhr.status;
|
|
21982
|
+
let _headers = {};
|
|
21983
|
+
if (status === 200) {
|
|
21984
|
+
const _responseText = xhr.responseText;
|
|
21985
|
+
let result200 = null;
|
|
21986
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
21987
|
+
return result200;
|
|
21988
|
+
}
|
|
21989
|
+
else if (status === 401) {
|
|
21990
|
+
const _responseText = xhr.responseText;
|
|
21991
|
+
let result401 = null;
|
|
21992
|
+
result401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
21993
|
+
return throwException("Not currently authenticated or lacks authorization", status, _responseText, _headers, result401);
|
|
21994
|
+
}
|
|
21995
|
+
else if (status === 403) {
|
|
21996
|
+
const _responseText = xhr.responseText;
|
|
21997
|
+
let result403 = null;
|
|
21998
|
+
result403 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
21999
|
+
return throwException("Not currently authenticated or lacks authorization", status, _responseText, _headers, result403);
|
|
22000
|
+
}
|
|
22001
|
+
else if (status === 404) {
|
|
22002
|
+
const _responseText = xhr.responseText;
|
|
22003
|
+
let result404 = null;
|
|
22004
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
22005
|
+
return throwException("Document not found, or not accessible", status, _responseText, _headers, result404);
|
|
22006
|
+
}
|
|
22007
|
+
else if (status === 406) {
|
|
22008
|
+
const _responseText = xhr.responseText;
|
|
22009
|
+
let result406 = null;
|
|
22010
|
+
result406 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
22011
|
+
return throwException("Not currently authenticated or lacks authorization", status, _responseText, _headers, result406);
|
|
22012
|
+
}
|
|
22013
|
+
else if (status === 500) {
|
|
22014
|
+
const _responseText = xhr.responseText;
|
|
22015
|
+
let result500 = null;
|
|
22016
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
22017
|
+
return throwException("Unexpected failure", status, _responseText, _headers, result500);
|
|
22018
|
+
}
|
|
22019
|
+
else if (status !== 200 && status !== 204) {
|
|
22020
|
+
const _responseText = xhr.responseText;
|
|
22021
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
22022
|
+
}
|
|
22023
|
+
return null;
|
|
22024
|
+
}
|
|
21935
22025
|
/**
|
|
21936
22026
|
* Modifies the current exclusivity of this document session
|
|
21937
22027
|
* @param id Document Key
|