spitfirepm 23.9700.3 → 23.9700.5
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 -1
- package/dist/SwaggerClients.d.ts +47 -19
- package/dist/SwaggerClients.js +436 -5
- package/dist/SwaggerClients.js.map +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ apiResult.then( (a) => {
|
|
|
25
25
|
### Change Log
|
|
26
26
|
|
|
27
27
|
```
|
|
28
|
-
23.9700.
|
|
28
|
+
23.9700.5 - Lookup Editor Endpoints
|
|
29
29
|
23.9700.2 - ProcessDocumentType DataModel enriched
|
|
30
30
|
23.9700.1 - GatherDependsOnValues() improved
|
|
31
31
|
23.9600.18 - Project Program
|
package/dist/SwaggerClients.d.ts
CHANGED
|
@@ -1245,7 +1245,7 @@ export declare class ConfigClient extends APIClientBase {
|
|
|
1245
1245
|
private processGetToolsMenuWithCallbacks;
|
|
1246
1246
|
protected processGetToolsMenu(xhr: any): MenuAction[] | null | null;
|
|
1247
1247
|
/**
|
|
1248
|
-
* Returns the Lookup Results (DVs)
|
|
1248
|
+
* Returns the Lookup Results (DVs), each with its parameter slots
|
|
1249
1249
|
*/
|
|
1250
1250
|
getLookupResults(): Promise<LookupResult[] | null>;
|
|
1251
1251
|
private getLookupResultsWithCallbacks;
|
|
@@ -1259,6 +1259,23 @@ export declare class ConfigClient extends APIClientBase {
|
|
|
1259
1259
|
private patchLookupResultWithCallbacks;
|
|
1260
1260
|
private processPatchLookupResultWithCallbacks;
|
|
1261
1261
|
protected processPatchLookupResult(xhr: any): LookupResult | null | null;
|
|
1262
|
+
/**
|
|
1263
|
+
* Deactivates one Lookup Result and its parameter slots
|
|
1264
|
+
* @param lookupResultKey Lookup Result key
|
|
1265
|
+
*/
|
|
1266
|
+
deleteLookupResult(lookupResultKey: string): Promise<number>;
|
|
1267
|
+
private deleteLookupResultWithCallbacks;
|
|
1268
|
+
private processDeleteLookupResultWithCallbacks;
|
|
1269
|
+
protected processDeleteLookupResult(xhr: any): number | null;
|
|
1270
|
+
/**
|
|
1271
|
+
* Copies one Lookup Result and all of its parameter slots
|
|
1272
|
+
* @param lookupResultKey Lookup Result to copy
|
|
1273
|
+
* @param newName (optional) Name for the copy. Omit to have one generated
|
|
1274
|
+
*/
|
|
1275
|
+
copyLookupResult(lookupResultKey: string, newName?: string | null | undefined): Promise<LookupResult | null>;
|
|
1276
|
+
private copyLookupResultWithCallbacks;
|
|
1277
|
+
private processCopyLookupResultWithCallbacks;
|
|
1278
|
+
protected processCopyLookupResult(xhr: any): LookupResult | null | null;
|
|
1262
1279
|
/**
|
|
1263
1280
|
* Returns the parameter slots of one Lookup Result
|
|
1264
1281
|
* @param lookupResultKey Lookup Result key
|
|
@@ -1299,6 +1316,23 @@ export declare class ConfigClient extends APIClientBase {
|
|
|
1299
1316
|
private patchLookupWithCallbacks;
|
|
1300
1317
|
private processPatchLookupWithCallbacks;
|
|
1301
1318
|
protected processPatchLookup(xhr: any): Lookup | null | null;
|
|
1319
|
+
/**
|
|
1320
|
+
* Deactivates one Lookup and its fields
|
|
1321
|
+
* @param lookupKey Lookup key
|
|
1322
|
+
*/
|
|
1323
|
+
deleteLookup(lookupKey: string): Promise<number>;
|
|
1324
|
+
private deleteLookupWithCallbacks;
|
|
1325
|
+
private processDeleteLookupWithCallbacks;
|
|
1326
|
+
protected processDeleteLookup(xhr: any): number | null;
|
|
1327
|
+
/**
|
|
1328
|
+
* Copies one Lookup and all of its field rows
|
|
1329
|
+
* @param lookupKey Lookup to copy
|
|
1330
|
+
* @param newName (optional) Name for the copy. Omit to have one generated
|
|
1331
|
+
*/
|
|
1332
|
+
copyLookup(lookupKey: string, newName?: string | null | undefined): Promise<Lookup | null>;
|
|
1333
|
+
private copyLookupWithCallbacks;
|
|
1334
|
+
private processCopyLookupWithCallbacks;
|
|
1335
|
+
protected processCopyLookup(xhr: any): Lookup | null | null;
|
|
1302
1336
|
/**
|
|
1303
1337
|
* Returns the fields of one Lookup
|
|
1304
1338
|
* @param lookupKey Lookup key
|
|
@@ -1316,6 +1350,14 @@ export declare class ConfigClient extends APIClientBase {
|
|
|
1316
1350
|
private putLookupFieldsWithCallbacks;
|
|
1317
1351
|
private processPutLookupFieldsWithCallbacks;
|
|
1318
1352
|
protected processPutLookupFields(xhr: any): LookupField[] | null | null;
|
|
1353
|
+
/**
|
|
1354
|
+
* Runs a Lookup's Data Query against supplied values, returning the row count AND the SQL
|
|
1355
|
+
* @param valueFor Type-ahead text, plus any depends-on values
|
|
1356
|
+
*/
|
|
1357
|
+
testLookup(valueFor: DVRequest): Promise<LookupTestResult | null>;
|
|
1358
|
+
private testLookupWithCallbacks;
|
|
1359
|
+
private processTestLookupWithCallbacks;
|
|
1360
|
+
protected processTestLookup(xhr: any): LookupTestResult | null | null;
|
|
1319
1361
|
/**
|
|
1320
1362
|
* Returns the Manage dashboard tool menu
|
|
1321
1363
|
*/
|
|
@@ -1631,11 +1673,11 @@ export declare class DocumentToolsClient extends APIClientBase {
|
|
|
1631
1673
|
private processGetDocHeaderRevisionWithCallbacks;
|
|
1632
1674
|
protected processGetDocHeaderRevision(xhr: any): DocMasterDetail | null | null;
|
|
1633
1675
|
/**
|
|
1634
|
-
* Creates a New document
|
|
1676
|
+
* Creates a New document. ,
|
|
1635
1677
|
* @param id Document Key (use empty for auto assign)
|
|
1636
1678
|
* @param typeKey Type
|
|
1637
1679
|
* @param forProject (optional) Project
|
|
1638
|
-
* @param forParent (optional) Parent Doc Key
|
|
1680
|
+
* @param forParent (optional) Parent Doc Key (NextDocFlow rules apply; See https://support.spitfirepm.com/kba-01517/)
|
|
1639
1681
|
* @param forBatch (optional) Batch/Subcontract
|
|
1640
1682
|
* @param forSourceContact (optional) Source Contact
|
|
1641
1683
|
*/
|
|
@@ -2530,7 +2572,7 @@ export declare class DocumentToolsClient extends APIClientBase {
|
|
|
2530
2572
|
private processDeleteDocItemByKeyWithCallbacks;
|
|
2531
2573
|
protected processDeleteDocItemByKey(xhr: any): string | null;
|
|
2532
2574
|
/**
|
|
2533
|
-
* Copies the specified document; returns a list of GUIDs for the created documents
|
|
2575
|
+
* Copies the specified document, applying DocCopyConfig rules; returns a list of GUIDs for the created documents
|
|
2534
2576
|
* @param id Document Key
|
|
2535
2577
|
* @param destinationProject (optional) optional - target project; if Not specified, same project
|
|
2536
2578
|
* @param withItems (optional) optional - should items be copied
|
|
@@ -3346,7 +3388,7 @@ export declare class SystemClient extends APIClientBase {
|
|
|
3346
3388
|
[key: string]: any;
|
|
3347
3389
|
} | null | null;
|
|
3348
3390
|
/**
|
|
3349
|
-
* Reloads site configuration and settings
|
|
3391
|
+
* Reloads site configuration and settings on all peers in a farm
|
|
3350
3392
|
*/
|
|
3351
3393
|
reloadSiteConfiguration(): Promise<string | null>;
|
|
3352
3394
|
private reloadSiteConfigurationWithCallbacks;
|
|
@@ -4235,8 +4277,6 @@ export interface CodeSet {
|
|
|
4235
4277
|
AllowNextSet?: boolean;
|
|
4236
4278
|
/** Maximum length of code values in this set */
|
|
4237
4279
|
CodeSize?: number;
|
|
4238
|
-
/** Row version */
|
|
4239
|
-
UpdateTS?: string | undefined;
|
|
4240
4280
|
/** Collection of commands for this row */
|
|
4241
4281
|
MenuCommands?: MenuAction[] | undefined;
|
|
4242
4282
|
/** eTag */
|
|
@@ -4268,8 +4308,6 @@ export interface CodeSetValue {
|
|
|
4268
4308
|
Active?: boolean;
|
|
4269
4309
|
/** Flag */
|
|
4270
4310
|
OnAdd?: boolean;
|
|
4271
|
-
/** Row version */
|
|
4272
|
-
UpdateTS?: string | undefined;
|
|
4273
4311
|
/** Collection of commands for this row */
|
|
4274
4312
|
MenuCommands?: MenuAction[] | undefined;
|
|
4275
4313
|
/** eTag */
|
|
@@ -6557,8 +6595,6 @@ overwrite one. False where no column is filterable, so no WHERE clause can be b
|
|
|
6557
6595
|
PreLoad?: boolean;
|
|
6558
6596
|
/** Flag */
|
|
6559
6597
|
Active?: boolean;
|
|
6560
|
-
/** Row version */
|
|
6561
|
-
UpdateTS?: string | undefined;
|
|
6562
6598
|
/** Column definitions for this lookup, in FieldSequence order. Populated when the caller
|
|
6563
6599
|
asks for the full definition rather than the list */
|
|
6564
6600
|
Fields?: LookupField[] | undefined;
|
|
@@ -6633,8 +6669,6 @@ is already enough to exclude them from autocomplete */
|
|
|
6633
6669
|
IsInputOnly?: boolean;
|
|
6634
6670
|
/** Flag */
|
|
6635
6671
|
Active?: boolean;
|
|
6636
|
-
/** Row version */
|
|
6637
|
-
UpdateTS?: string | undefined;
|
|
6638
6672
|
/** Collection of commands for this row */
|
|
6639
6673
|
MenuCommands?: MenuAction[] | undefined;
|
|
6640
6674
|
/** eTag */
|
|
@@ -6673,8 +6707,6 @@ can convert the answer into a JSON object */
|
|
|
6673
6707
|
PackedToJSON?: string | undefined;
|
|
6674
6708
|
/** Flag */
|
|
6675
6709
|
Active?: boolean;
|
|
6676
|
-
/** Row version */
|
|
6677
|
-
UpdateTS?: string | undefined;
|
|
6678
6710
|
/** Number of dependent values (@pD1..@pD4) this result expects. Derived, not stored */
|
|
6679
6711
|
DependsCount?: number | undefined;
|
|
6680
6712
|
/** Parameter slots for this result, in call order. Populated when the caller asks for
|
|
@@ -6709,8 +6741,6 @@ lookups to fill it rather than guess. A soft reference by name, so it may not r
|
|
|
6709
6741
|
Notes?: string | undefined;
|
|
6710
6742
|
/** Flag */
|
|
6711
6743
|
Active?: boolean;
|
|
6712
|
-
/** Row version */
|
|
6713
|
-
UpdateTS?: string | undefined;
|
|
6714
6744
|
/** Collection of commands for this row */
|
|
6715
6745
|
MenuCommands?: MenuAction[] | undefined;
|
|
6716
6746
|
/** eTag */
|
|
@@ -8372,8 +8402,6 @@ export interface ScopedCodeSetValue {
|
|
|
8372
8402
|
CodeFlag?: boolean;
|
|
8373
8403
|
/** Flag, true if code still relevant. False does not prevent use. */
|
|
8374
8404
|
Active?: boolean;
|
|
8375
|
-
/** Row version */
|
|
8376
|
-
UpdateTS?: string | undefined;
|
|
8377
8405
|
/** Collection of commands for this row */
|
|
8378
8406
|
MenuCommands?: MenuAction[] | undefined;
|
|
8379
8407
|
/** eTag */
|
package/dist/SwaggerClients.js
CHANGED
|
@@ -11344,7 +11344,7 @@ class ConfigClient extends APIClientBase_1.APIClientBase {
|
|
|
11344
11344
|
return null;
|
|
11345
11345
|
}
|
|
11346
11346
|
/**
|
|
11347
|
-
* Returns the Lookup Results (DVs)
|
|
11347
|
+
* Returns the Lookup Results (DVs), each with its parameter slots
|
|
11348
11348
|
*/
|
|
11349
11349
|
getLookupResults() {
|
|
11350
11350
|
return new Promise((resolve, reject) => {
|
|
@@ -11503,6 +11503,185 @@ class ConfigClient extends APIClientBase_1.APIClientBase {
|
|
|
11503
11503
|
}
|
|
11504
11504
|
return null;
|
|
11505
11505
|
}
|
|
11506
|
+
/**
|
|
11507
|
+
* Deactivates one Lookup Result and its parameter slots
|
|
11508
|
+
* @param lookupResultKey Lookup Result key
|
|
11509
|
+
*/
|
|
11510
|
+
deleteLookupResult(lookupResultKey) {
|
|
11511
|
+
return new Promise((resolve, reject) => {
|
|
11512
|
+
this.deleteLookupResultWithCallbacks(lookupResultKey, (result) => resolve(result), (exception, _reason) => reject(exception));
|
|
11513
|
+
});
|
|
11514
|
+
}
|
|
11515
|
+
deleteLookupResultWithCallbacks(lookupResultKey, onSuccess, onFail) {
|
|
11516
|
+
let url_ = this.baseUrl + "/api/configuration/lookup-results/{lookupResultKey}";
|
|
11517
|
+
if (lookupResultKey === undefined || lookupResultKey === null)
|
|
11518
|
+
throw new globalThis.Error("The parameter 'lookupResultKey' must be defined.");
|
|
11519
|
+
url_ = url_.replace("{lookupResultKey}", encodeURIComponent("" + lookupResultKey));
|
|
11520
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
11521
|
+
jQuery.ajax({
|
|
11522
|
+
url: url_,
|
|
11523
|
+
beforeSend: this.beforeSend,
|
|
11524
|
+
type: "delete",
|
|
11525
|
+
dataType: "text",
|
|
11526
|
+
headers: {
|
|
11527
|
+
"Accept": "application/json"
|
|
11528
|
+
}
|
|
11529
|
+
}).done((_data, _textStatus, xhr) => {
|
|
11530
|
+
this.processDeleteLookupResultWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
11531
|
+
}).fail((xhr) => {
|
|
11532
|
+
this.processDeleteLookupResultWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
11533
|
+
});
|
|
11534
|
+
}
|
|
11535
|
+
processDeleteLookupResultWithCallbacks(_url, xhr, onSuccess, onFail) {
|
|
11536
|
+
try {
|
|
11537
|
+
let result = this.transformResult(_url, xhr, (xhr) => this.processDeleteLookupResult(xhr));
|
|
11538
|
+
if (onSuccess !== undefined)
|
|
11539
|
+
onSuccess(result);
|
|
11540
|
+
}
|
|
11541
|
+
catch (e) {
|
|
11542
|
+
if (onFail !== undefined)
|
|
11543
|
+
onFail(e, "http_service_exception");
|
|
11544
|
+
}
|
|
11545
|
+
}
|
|
11546
|
+
processDeleteLookupResult(xhr) {
|
|
11547
|
+
const status = xhr.status;
|
|
11548
|
+
let _headers = {};
|
|
11549
|
+
if (status === 200) {
|
|
11550
|
+
const _responseText = xhr.responseText;
|
|
11551
|
+
let result200 = null;
|
|
11552
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11553
|
+
return result200;
|
|
11554
|
+
}
|
|
11555
|
+
else if (status === 401) {
|
|
11556
|
+
const _responseText = xhr.responseText;
|
|
11557
|
+
let result401 = null;
|
|
11558
|
+
result401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11559
|
+
return throwException("Not currently authenticated", status, _responseText, _headers, result401);
|
|
11560
|
+
}
|
|
11561
|
+
else if (status === 403) {
|
|
11562
|
+
const _responseText = xhr.responseText;
|
|
11563
|
+
let result403 = null;
|
|
11564
|
+
result403 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11565
|
+
return throwException("Access denied", status, _responseText, _headers, result403);
|
|
11566
|
+
}
|
|
11567
|
+
else if (status === 404) {
|
|
11568
|
+
const _responseText = xhr.responseText;
|
|
11569
|
+
let result404 = null;
|
|
11570
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11571
|
+
return throwException("Not found", status, _responseText, _headers, result404);
|
|
11572
|
+
}
|
|
11573
|
+
else if (status === 409) {
|
|
11574
|
+
const _responseText = xhr.responseText;
|
|
11575
|
+
let result409 = null;
|
|
11576
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11577
|
+
return throwException("Still referenced by one or more Lookups", status, _responseText, _headers, result409);
|
|
11578
|
+
}
|
|
11579
|
+
else if (status === 500) {
|
|
11580
|
+
const _responseText = xhr.responseText;
|
|
11581
|
+
let result500 = null;
|
|
11582
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11583
|
+
return throwException("Internal failure; see response", status, _responseText, _headers, result500);
|
|
11584
|
+
}
|
|
11585
|
+
else if (status !== 200 && status !== 204) {
|
|
11586
|
+
const _responseText = xhr.responseText;
|
|
11587
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
11588
|
+
}
|
|
11589
|
+
return null;
|
|
11590
|
+
}
|
|
11591
|
+
/**
|
|
11592
|
+
* Copies one Lookup Result and all of its parameter slots
|
|
11593
|
+
* @param lookupResultKey Lookup Result to copy
|
|
11594
|
+
* @param newName (optional) Name for the copy. Omit to have one generated
|
|
11595
|
+
*/
|
|
11596
|
+
copyLookupResult(lookupResultKey, newName) {
|
|
11597
|
+
return new Promise((resolve, reject) => {
|
|
11598
|
+
this.copyLookupResultWithCallbacks(lookupResultKey, newName, (result) => resolve(result), (exception, _reason) => reject(exception));
|
|
11599
|
+
});
|
|
11600
|
+
}
|
|
11601
|
+
copyLookupResultWithCallbacks(lookupResultKey, newName, onSuccess, onFail) {
|
|
11602
|
+
let url_ = this.baseUrl + "/api/configuration/lookup-results/{lookupResultKey}/copy?";
|
|
11603
|
+
if (lookupResultKey === undefined || lookupResultKey === null)
|
|
11604
|
+
throw new globalThis.Error("The parameter 'lookupResultKey' must be defined.");
|
|
11605
|
+
url_ = url_.replace("{lookupResultKey}", encodeURIComponent("" + lookupResultKey));
|
|
11606
|
+
if (newName !== undefined && newName !== null)
|
|
11607
|
+
url_ += "newName=" + encodeURIComponent("" + newName) + "&";
|
|
11608
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
11609
|
+
jQuery.ajax({
|
|
11610
|
+
url: url_,
|
|
11611
|
+
beforeSend: this.beforeSend,
|
|
11612
|
+
type: "post",
|
|
11613
|
+
dataType: "text",
|
|
11614
|
+
headers: {
|
|
11615
|
+
"Accept": "application/json"
|
|
11616
|
+
}
|
|
11617
|
+
}).done((_data, _textStatus, xhr) => {
|
|
11618
|
+
this.processCopyLookupResultWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
11619
|
+
}).fail((xhr) => {
|
|
11620
|
+
this.processCopyLookupResultWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
11621
|
+
});
|
|
11622
|
+
}
|
|
11623
|
+
processCopyLookupResultWithCallbacks(_url, xhr, onSuccess, onFail) {
|
|
11624
|
+
try {
|
|
11625
|
+
let result = this.transformResult(_url, xhr, (xhr) => this.processCopyLookupResult(xhr));
|
|
11626
|
+
if (onSuccess !== undefined)
|
|
11627
|
+
onSuccess(result);
|
|
11628
|
+
}
|
|
11629
|
+
catch (e) {
|
|
11630
|
+
if (onFail !== undefined)
|
|
11631
|
+
onFail(e, "http_service_exception");
|
|
11632
|
+
}
|
|
11633
|
+
}
|
|
11634
|
+
processCopyLookupResult(xhr) {
|
|
11635
|
+
const status = xhr.status;
|
|
11636
|
+
let _headers = {};
|
|
11637
|
+
if (status === 200) {
|
|
11638
|
+
const _responseText = xhr.responseText;
|
|
11639
|
+
let result200 = null;
|
|
11640
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11641
|
+
return result200;
|
|
11642
|
+
}
|
|
11643
|
+
else if (status === 400) {
|
|
11644
|
+
const _responseText = xhr.responseText;
|
|
11645
|
+
let result400 = null;
|
|
11646
|
+
result400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11647
|
+
return throwException("Request malformed", status, _responseText, _headers, result400);
|
|
11648
|
+
}
|
|
11649
|
+
else if (status === 401) {
|
|
11650
|
+
const _responseText = xhr.responseText;
|
|
11651
|
+
let result401 = null;
|
|
11652
|
+
result401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11653
|
+
return throwException("Not currently authenticated", status, _responseText, _headers, result401);
|
|
11654
|
+
}
|
|
11655
|
+
else if (status === 403) {
|
|
11656
|
+
const _responseText = xhr.responseText;
|
|
11657
|
+
let result403 = null;
|
|
11658
|
+
result403 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11659
|
+
return throwException("Access denied", status, _responseText, _headers, result403);
|
|
11660
|
+
}
|
|
11661
|
+
else if (status === 404) {
|
|
11662
|
+
const _responseText = xhr.responseText;
|
|
11663
|
+
let result404 = null;
|
|
11664
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11665
|
+
return throwException("Not found", status, _responseText, _headers, result404);
|
|
11666
|
+
}
|
|
11667
|
+
else if (status === 409) {
|
|
11668
|
+
const _responseText = xhr.responseText;
|
|
11669
|
+
let result409 = null;
|
|
11670
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11671
|
+
return throwException("That name is already taken", status, _responseText, _headers, result409);
|
|
11672
|
+
}
|
|
11673
|
+
else if (status === 500) {
|
|
11674
|
+
const _responseText = xhr.responseText;
|
|
11675
|
+
let result500 = null;
|
|
11676
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11677
|
+
return throwException("Internal failure; see response", status, _responseText, _headers, result500);
|
|
11678
|
+
}
|
|
11679
|
+
else if (status !== 200 && status !== 204) {
|
|
11680
|
+
const _responseText = xhr.responseText;
|
|
11681
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
11682
|
+
}
|
|
11683
|
+
return null;
|
|
11684
|
+
}
|
|
11506
11685
|
/**
|
|
11507
11686
|
* Returns the parameter slots of one Lookup Result
|
|
11508
11687
|
* @param lookupResultKey Lookup Result key
|
|
@@ -11910,6 +12089,179 @@ class ConfigClient extends APIClientBase_1.APIClientBase {
|
|
|
11910
12089
|
}
|
|
11911
12090
|
return null;
|
|
11912
12091
|
}
|
|
12092
|
+
/**
|
|
12093
|
+
* Deactivates one Lookup and its fields
|
|
12094
|
+
* @param lookupKey Lookup key
|
|
12095
|
+
*/
|
|
12096
|
+
deleteLookup(lookupKey) {
|
|
12097
|
+
return new Promise((resolve, reject) => {
|
|
12098
|
+
this.deleteLookupWithCallbacks(lookupKey, (result) => resolve(result), (exception, _reason) => reject(exception));
|
|
12099
|
+
});
|
|
12100
|
+
}
|
|
12101
|
+
deleteLookupWithCallbacks(lookupKey, onSuccess, onFail) {
|
|
12102
|
+
let url_ = this.baseUrl + "/api/configuration/lookups/{lookupKey}";
|
|
12103
|
+
if (lookupKey === undefined || lookupKey === null)
|
|
12104
|
+
throw new globalThis.Error("The parameter 'lookupKey' must be defined.");
|
|
12105
|
+
url_ = url_.replace("{lookupKey}", encodeURIComponent("" + lookupKey));
|
|
12106
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
12107
|
+
jQuery.ajax({
|
|
12108
|
+
url: url_,
|
|
12109
|
+
beforeSend: this.beforeSend,
|
|
12110
|
+
type: "delete",
|
|
12111
|
+
dataType: "text",
|
|
12112
|
+
headers: {
|
|
12113
|
+
"Accept": "application/json"
|
|
12114
|
+
}
|
|
12115
|
+
}).done((_data, _textStatus, xhr) => {
|
|
12116
|
+
this.processDeleteLookupWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
12117
|
+
}).fail((xhr) => {
|
|
12118
|
+
this.processDeleteLookupWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
12119
|
+
});
|
|
12120
|
+
}
|
|
12121
|
+
processDeleteLookupWithCallbacks(_url, xhr, onSuccess, onFail) {
|
|
12122
|
+
try {
|
|
12123
|
+
let result = this.transformResult(_url, xhr, (xhr) => this.processDeleteLookup(xhr));
|
|
12124
|
+
if (onSuccess !== undefined)
|
|
12125
|
+
onSuccess(result);
|
|
12126
|
+
}
|
|
12127
|
+
catch (e) {
|
|
12128
|
+
if (onFail !== undefined)
|
|
12129
|
+
onFail(e, "http_service_exception");
|
|
12130
|
+
}
|
|
12131
|
+
}
|
|
12132
|
+
processDeleteLookup(xhr) {
|
|
12133
|
+
const status = xhr.status;
|
|
12134
|
+
let _headers = {};
|
|
12135
|
+
if (status === 200) {
|
|
12136
|
+
const _responseText = xhr.responseText;
|
|
12137
|
+
let result200 = null;
|
|
12138
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12139
|
+
return result200;
|
|
12140
|
+
}
|
|
12141
|
+
else if (status === 401) {
|
|
12142
|
+
const _responseText = xhr.responseText;
|
|
12143
|
+
let result401 = null;
|
|
12144
|
+
result401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12145
|
+
return throwException("Not currently authenticated", status, _responseText, _headers, result401);
|
|
12146
|
+
}
|
|
12147
|
+
else if (status === 403) {
|
|
12148
|
+
const _responseText = xhr.responseText;
|
|
12149
|
+
let result403 = null;
|
|
12150
|
+
result403 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12151
|
+
return throwException("Access denied", status, _responseText, _headers, result403);
|
|
12152
|
+
}
|
|
12153
|
+
else if (status === 404) {
|
|
12154
|
+
const _responseText = xhr.responseText;
|
|
12155
|
+
let result404 = null;
|
|
12156
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12157
|
+
return throwException("Not found", status, _responseText, _headers, result404);
|
|
12158
|
+
}
|
|
12159
|
+
else if (status === 500) {
|
|
12160
|
+
const _responseText = xhr.responseText;
|
|
12161
|
+
let result500 = null;
|
|
12162
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12163
|
+
return throwException("Internal failure; see response", status, _responseText, _headers, result500);
|
|
12164
|
+
}
|
|
12165
|
+
else if (status !== 200 && status !== 204) {
|
|
12166
|
+
const _responseText = xhr.responseText;
|
|
12167
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
12168
|
+
}
|
|
12169
|
+
return null;
|
|
12170
|
+
}
|
|
12171
|
+
/**
|
|
12172
|
+
* Copies one Lookup and all of its field rows
|
|
12173
|
+
* @param lookupKey Lookup to copy
|
|
12174
|
+
* @param newName (optional) Name for the copy. Omit to have one generated
|
|
12175
|
+
*/
|
|
12176
|
+
copyLookup(lookupKey, newName) {
|
|
12177
|
+
return new Promise((resolve, reject) => {
|
|
12178
|
+
this.copyLookupWithCallbacks(lookupKey, newName, (result) => resolve(result), (exception, _reason) => reject(exception));
|
|
12179
|
+
});
|
|
12180
|
+
}
|
|
12181
|
+
copyLookupWithCallbacks(lookupKey, newName, onSuccess, onFail) {
|
|
12182
|
+
let url_ = this.baseUrl + "/api/configuration/lookups/{lookupKey}/copy?";
|
|
12183
|
+
if (lookupKey === undefined || lookupKey === null)
|
|
12184
|
+
throw new globalThis.Error("The parameter 'lookupKey' must be defined.");
|
|
12185
|
+
url_ = url_.replace("{lookupKey}", encodeURIComponent("" + lookupKey));
|
|
12186
|
+
if (newName !== undefined && newName !== null)
|
|
12187
|
+
url_ += "newName=" + encodeURIComponent("" + newName) + "&";
|
|
12188
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
12189
|
+
jQuery.ajax({
|
|
12190
|
+
url: url_,
|
|
12191
|
+
beforeSend: this.beforeSend,
|
|
12192
|
+
type: "post",
|
|
12193
|
+
dataType: "text",
|
|
12194
|
+
headers: {
|
|
12195
|
+
"Accept": "application/json"
|
|
12196
|
+
}
|
|
12197
|
+
}).done((_data, _textStatus, xhr) => {
|
|
12198
|
+
this.processCopyLookupWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
12199
|
+
}).fail((xhr) => {
|
|
12200
|
+
this.processCopyLookupWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
12201
|
+
});
|
|
12202
|
+
}
|
|
12203
|
+
processCopyLookupWithCallbacks(_url, xhr, onSuccess, onFail) {
|
|
12204
|
+
try {
|
|
12205
|
+
let result = this.transformResult(_url, xhr, (xhr) => this.processCopyLookup(xhr));
|
|
12206
|
+
if (onSuccess !== undefined)
|
|
12207
|
+
onSuccess(result);
|
|
12208
|
+
}
|
|
12209
|
+
catch (e) {
|
|
12210
|
+
if (onFail !== undefined)
|
|
12211
|
+
onFail(e, "http_service_exception");
|
|
12212
|
+
}
|
|
12213
|
+
}
|
|
12214
|
+
processCopyLookup(xhr) {
|
|
12215
|
+
const status = xhr.status;
|
|
12216
|
+
let _headers = {};
|
|
12217
|
+
if (status === 200) {
|
|
12218
|
+
const _responseText = xhr.responseText;
|
|
12219
|
+
let result200 = null;
|
|
12220
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12221
|
+
return result200;
|
|
12222
|
+
}
|
|
12223
|
+
else if (status === 400) {
|
|
12224
|
+
const _responseText = xhr.responseText;
|
|
12225
|
+
let result400 = null;
|
|
12226
|
+
result400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12227
|
+
return throwException("Request malformed", status, _responseText, _headers, result400);
|
|
12228
|
+
}
|
|
12229
|
+
else if (status === 401) {
|
|
12230
|
+
const _responseText = xhr.responseText;
|
|
12231
|
+
let result401 = null;
|
|
12232
|
+
result401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12233
|
+
return throwException("Not currently authenticated", status, _responseText, _headers, result401);
|
|
12234
|
+
}
|
|
12235
|
+
else if (status === 403) {
|
|
12236
|
+
const _responseText = xhr.responseText;
|
|
12237
|
+
let result403 = null;
|
|
12238
|
+
result403 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12239
|
+
return throwException("Access denied", status, _responseText, _headers, result403);
|
|
12240
|
+
}
|
|
12241
|
+
else if (status === 404) {
|
|
12242
|
+
const _responseText = xhr.responseText;
|
|
12243
|
+
let result404 = null;
|
|
12244
|
+
result404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12245
|
+
return throwException("Not found", status, _responseText, _headers, result404);
|
|
12246
|
+
}
|
|
12247
|
+
else if (status === 409) {
|
|
12248
|
+
const _responseText = xhr.responseText;
|
|
12249
|
+
let result409 = null;
|
|
12250
|
+
result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12251
|
+
return throwException("That name is already taken", status, _responseText, _headers, result409);
|
|
12252
|
+
}
|
|
12253
|
+
else if (status === 500) {
|
|
12254
|
+
const _responseText = xhr.responseText;
|
|
12255
|
+
let result500 = null;
|
|
12256
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12257
|
+
return throwException("Internal failure; see response", status, _responseText, _headers, result500);
|
|
12258
|
+
}
|
|
12259
|
+
else if (status !== 200 && status !== 204) {
|
|
12260
|
+
const _responseText = xhr.responseText;
|
|
12261
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
12262
|
+
}
|
|
12263
|
+
return null;
|
|
12264
|
+
}
|
|
11913
12265
|
/**
|
|
11914
12266
|
* Returns the fields of one Lookup
|
|
11915
12267
|
* @param lookupKey Lookup key
|
|
@@ -12078,6 +12430,85 @@ class ConfigClient extends APIClientBase_1.APIClientBase {
|
|
|
12078
12430
|
}
|
|
12079
12431
|
return null;
|
|
12080
12432
|
}
|
|
12433
|
+
/**
|
|
12434
|
+
* Runs a Lookup's Data Query against supplied values, returning the row count AND the SQL
|
|
12435
|
+
* @param valueFor Type-ahead text, plus any depends-on values
|
|
12436
|
+
*/
|
|
12437
|
+
testLookup(valueFor) {
|
|
12438
|
+
return new Promise((resolve, reject) => {
|
|
12439
|
+
this.testLookupWithCallbacks(valueFor, (result) => resolve(result), (exception, _reason) => reject(exception));
|
|
12440
|
+
});
|
|
12441
|
+
}
|
|
12442
|
+
testLookupWithCallbacks(valueFor, onSuccess, onFail) {
|
|
12443
|
+
let url_ = this.baseUrl + "/api/configuration/lookups/test";
|
|
12444
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
12445
|
+
const content_ = JSON.stringify(valueFor);
|
|
12446
|
+
jQuery.ajax({
|
|
12447
|
+
url: url_,
|
|
12448
|
+
beforeSend: this.beforeSend,
|
|
12449
|
+
type: "post",
|
|
12450
|
+
data: content_,
|
|
12451
|
+
dataType: "text",
|
|
12452
|
+
headers: {
|
|
12453
|
+
"Content-Type": "application/json",
|
|
12454
|
+
"Accept": "application/json"
|
|
12455
|
+
}
|
|
12456
|
+
}).done((_data, _textStatus, xhr) => {
|
|
12457
|
+
this.processTestLookupWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
12458
|
+
}).fail((xhr) => {
|
|
12459
|
+
this.processTestLookupWithCallbacks(url_, xhr, onSuccess, onFail);
|
|
12460
|
+
});
|
|
12461
|
+
}
|
|
12462
|
+
processTestLookupWithCallbacks(_url, xhr, onSuccess, onFail) {
|
|
12463
|
+
try {
|
|
12464
|
+
let result = this.transformResult(_url, xhr, (xhr) => this.processTestLookup(xhr));
|
|
12465
|
+
if (onSuccess !== undefined)
|
|
12466
|
+
onSuccess(result);
|
|
12467
|
+
}
|
|
12468
|
+
catch (e) {
|
|
12469
|
+
if (onFail !== undefined)
|
|
12470
|
+
onFail(e, "http_service_exception");
|
|
12471
|
+
}
|
|
12472
|
+
}
|
|
12473
|
+
processTestLookup(xhr) {
|
|
12474
|
+
const status = xhr.status;
|
|
12475
|
+
let _headers = {};
|
|
12476
|
+
if (status === 200) {
|
|
12477
|
+
const _responseText = xhr.responseText;
|
|
12478
|
+
let result200 = null;
|
|
12479
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12480
|
+
return result200;
|
|
12481
|
+
}
|
|
12482
|
+
else if (status === 400) {
|
|
12483
|
+
const _responseText = xhr.responseText;
|
|
12484
|
+
let result400 = null;
|
|
12485
|
+
result400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12486
|
+
return throwException("Request malformed", status, _responseText, _headers, result400);
|
|
12487
|
+
}
|
|
12488
|
+
else if (status === 401) {
|
|
12489
|
+
const _responseText = xhr.responseText;
|
|
12490
|
+
let result401 = null;
|
|
12491
|
+
result401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12492
|
+
return throwException("Not currently authenticated", status, _responseText, _headers, result401);
|
|
12493
|
+
}
|
|
12494
|
+
else if (status === 403) {
|
|
12495
|
+
const _responseText = xhr.responseText;
|
|
12496
|
+
let result403 = null;
|
|
12497
|
+
result403 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12498
|
+
return throwException("Access denied", status, _responseText, _headers, result403);
|
|
12499
|
+
}
|
|
12500
|
+
else if (status === 500) {
|
|
12501
|
+
const _responseText = xhr.responseText;
|
|
12502
|
+
let result500 = null;
|
|
12503
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12504
|
+
return throwException("Internal failure; see response", status, _responseText, _headers, result500);
|
|
12505
|
+
}
|
|
12506
|
+
else if (status !== 200 && status !== 204) {
|
|
12507
|
+
const _responseText = xhr.responseText;
|
|
12508
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
12509
|
+
}
|
|
12510
|
+
return null;
|
|
12511
|
+
}
|
|
12081
12512
|
/**
|
|
12082
12513
|
* Returns the Manage dashboard tool menu
|
|
12083
12514
|
*/
|
|
@@ -15002,11 +15433,11 @@ class DocumentToolsClient extends APIClientBase_1.APIClientBase {
|
|
|
15002
15433
|
return null;
|
|
15003
15434
|
}
|
|
15004
15435
|
/**
|
|
15005
|
-
* Creates a New document
|
|
15436
|
+
* Creates a New document. ,
|
|
15006
15437
|
* @param id Document Key (use empty for auto assign)
|
|
15007
15438
|
* @param typeKey Type
|
|
15008
15439
|
* @param forProject (optional) Project
|
|
15009
|
-
* @param forParent (optional) Parent Doc Key
|
|
15440
|
+
* @param forParent (optional) Parent Doc Key (NextDocFlow rules apply; See https://support.spitfirepm.com/kba-01517/)
|
|
15010
15441
|
* @param forBatch (optional) Batch/Subcontract
|
|
15011
15442
|
* @param forSourceContact (optional) Source Contact
|
|
15012
15443
|
*/
|
|
@@ -23275,7 +23706,7 @@ class DocumentToolsClient extends APIClientBase_1.APIClientBase {
|
|
|
23275
23706
|
return null;
|
|
23276
23707
|
}
|
|
23277
23708
|
/**
|
|
23278
|
-
* Copies the specified document; returns a list of GUIDs for the created documents
|
|
23709
|
+
* Copies the specified document, applying DocCopyConfig rules; returns a list of GUIDs for the created documents
|
|
23279
23710
|
* @param id Document Key
|
|
23280
23711
|
* @param destinationProject (optional) optional - target project; if Not specified, same project
|
|
23281
23712
|
* @param withItems (optional) optional - should items be copied
|
|
@@ -30091,7 +30522,7 @@ class SystemClient extends APIClientBase_1.APIClientBase {
|
|
|
30091
30522
|
return null;
|
|
30092
30523
|
}
|
|
30093
30524
|
/**
|
|
30094
|
-
* Reloads site configuration and settings
|
|
30525
|
+
* Reloads site configuration and settings on all peers in a farm
|
|
30095
30526
|
*/
|
|
30096
30527
|
reloadSiteConfiguration() {
|
|
30097
30528
|
return new Promise((resolve, reject) => {
|