visualvault-api 2.0.0-beta.2 → 2.0.0-beta.3
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/dist/VVRestApi.cjs +316 -4
- package/dist/VVRestApi.cjs.map +1 -1
- package/dist/VVRestApi.d.cts +4 -0
- package/dist/VVRestApi.d.ts +4 -0
- package/dist/VVRestApi.js +316 -4
- package/dist/VVRestApi.js.map +1 -1
- package/dist/config.yml +33 -4
- package/dist/index.cjs +316 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +316 -4
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/config.yml
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# VisualVault URIs
|
|
2
2
|
ApiUri: /api/v1/{custalias}/{custdbalias}
|
|
3
|
+
BaseApiUri: /api/v1
|
|
3
4
|
FormsApiUri: /api/v1
|
|
4
5
|
DocApiUri: /api/v1
|
|
5
6
|
NotificationsApiUri: /api/v1
|
|
@@ -55,9 +56,34 @@ ResourceUri:
|
|
|
55
56
|
UsersIdUserId: /users/{id}/userId
|
|
56
57
|
UsersMe: /users/me
|
|
57
58
|
GetGroups: /groups
|
|
59
|
+
GroupById: /groups/{id}
|
|
60
|
+
AddGroup: /groups
|
|
61
|
+
UpdateGroup: /groups/{id}
|
|
62
|
+
DeleteGroup: /groups/{id}
|
|
58
63
|
Groups: /sites/{id}/groups
|
|
64
|
+
SiteGroupById: /sites/{siteId}/groups/{groupId}
|
|
59
65
|
GroupsUsers: /groups/{id}/users
|
|
60
66
|
GroupsAddUser: /groups/{groupId}/users/{userId}
|
|
67
|
+
SiteById: /sites/{id}
|
|
68
|
+
ChangeGroupSite: /sites/changegroupsite
|
|
69
|
+
LanguageAreas: /resource/area
|
|
70
|
+
Languages: /resource/language
|
|
71
|
+
ExportLanguages: /resource/customerLocalization/exportCsv
|
|
72
|
+
ImportLanguages: /resource/customerLocalization/importCsv
|
|
73
|
+
Reports: /reports
|
|
74
|
+
DropDownLists: /lists
|
|
75
|
+
DropDownListsId: /lists/{id}
|
|
76
|
+
DropDownListsIdItems: /lists/{id}/items
|
|
77
|
+
DocumentTypes: /documenttypes
|
|
78
|
+
SavedSearches: /savedsearches
|
|
79
|
+
DocumentFields: /documentfields
|
|
80
|
+
SavedSearchIndexFields: /savedSearchIndexFields
|
|
81
|
+
LastDocuments: /lastdocuments
|
|
82
|
+
FrequentDocuments: /frequentdocuments
|
|
83
|
+
SavedSearchDocuments: /savedsearchdocuments/{savedSearchId}
|
|
84
|
+
DocumentDefaultAction: /documentDefaultAction/{documentId}
|
|
85
|
+
CreateDocumentZipFile: /documents/CreateDocumentZipFile
|
|
86
|
+
GetDocumentZipFileStatus: /documents/GetDocumentZipFileStatus
|
|
61
87
|
Folders: /folders
|
|
62
88
|
FoldersId: /folders/{id}
|
|
63
89
|
FoldersCopy: /folders/copy
|
|
@@ -80,14 +106,17 @@ ResourceUri:
|
|
|
80
106
|
CustomerAssignUser: /customer/{customerId}/assignuser
|
|
81
107
|
CustomerDatabaseAssignUser: /customerdatabase/{databaseId}/assignuser
|
|
82
108
|
IndexFields: /indexfields
|
|
109
|
+
IndexFieldsFolder: /indexfields/{id}/folders/{folderId}
|
|
83
110
|
OutsideProcesses: /outsideprocesses
|
|
84
111
|
SecurityMembers: /securitymembers
|
|
85
112
|
Layout: /layout
|
|
86
113
|
ReportServerPDF: /ReportServer/{id}/PDF
|
|
87
|
-
DocApi:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
114
|
+
DocApi:
|
|
115
|
+
CreateDocument: /Documents
|
|
116
|
+
GetRevision: /Documents/revisions/{id}
|
|
117
|
+
OcrStatus: /Documents/ocr/{id}
|
|
118
|
+
UpdateDocument: /Documents/{id}
|
|
119
|
+
AdvancedSearch: /Search/Advanced
|
|
91
120
|
FormsApi:
|
|
92
121
|
FormInstance: /forminstance
|
|
93
122
|
ObjectsApi:
|
package/dist/index.cjs
CHANGED
|
@@ -614,6 +614,12 @@ var DocumentManager = class {
|
|
|
614
614
|
constructor(httpHelper) {
|
|
615
615
|
this._httpHelper = httpHelper;
|
|
616
616
|
}
|
|
617
|
+
async createDocument(data) {
|
|
618
|
+
const resourceUri = this._httpHelper._config.ResourceUri.DocApi.CreateDocument;
|
|
619
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
620
|
+
const opts = { method: "POST" };
|
|
621
|
+
return this._httpHelper.doVvClientRequest(url, opts, null, data);
|
|
622
|
+
}
|
|
617
623
|
async GetRevision(documentRevisionId) {
|
|
618
624
|
let resourceUri = this._httpHelper._config.ResourceUri.DocApi.GetRevision;
|
|
619
625
|
resourceUri = resourceUri.replace("{id}", documentRevisionId);
|
|
@@ -635,6 +641,13 @@ var DocumentManager = class {
|
|
|
635
641
|
const opts = { method: "PUT" };
|
|
636
642
|
return this._httpHelper.doVvClientRequest(url, opts, null, data);
|
|
637
643
|
}
|
|
644
|
+
async updateDocument(documentId, data) {
|
|
645
|
+
let resourceUri = this._httpHelper._config.ResourceUri.DocApi.UpdateDocument;
|
|
646
|
+
resourceUri = resourceUri.replace("{id}", documentId);
|
|
647
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
648
|
+
const opts = { method: "PUT" };
|
|
649
|
+
return this._httpHelper.doVvClientRequest(url, opts, null, data);
|
|
650
|
+
}
|
|
638
651
|
async search(criteriaList, searchFolders, excludeFolders, sortBy, sortDirection = "desc", page = 0, take = 15, archiveType = 0, roleSecurity = false) {
|
|
639
652
|
const url = this._httpHelper.getUrl(this._httpHelper._config.ResourceUri.DocApi.AdvancedSearch);
|
|
640
653
|
const data = {
|
|
@@ -1533,6 +1546,30 @@ var GroupsManager = class {
|
|
|
1533
1546
|
const opts = { method: "GET" };
|
|
1534
1547
|
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
1535
1548
|
}
|
|
1549
|
+
getGroupById(params, groupId) {
|
|
1550
|
+
const resourceUri = this._httpHelper._config.ResourceUri.GroupById.replace("{id}", groupId);
|
|
1551
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
1552
|
+
const opts = { method: "GET" };
|
|
1553
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
1554
|
+
}
|
|
1555
|
+
addGroup(params, formData) {
|
|
1556
|
+
const resourceUri = this._httpHelper._config.ResourceUri.AddGroup;
|
|
1557
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
1558
|
+
const opts = { method: "POST" };
|
|
1559
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, formData);
|
|
1560
|
+
}
|
|
1561
|
+
updateGroup(params, groupId, formData) {
|
|
1562
|
+
const resourceUri = this._httpHelper._config.ResourceUri.UpdateGroup.replace("{id}", groupId);
|
|
1563
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
1564
|
+
const opts = { method: "PUT" };
|
|
1565
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, formData);
|
|
1566
|
+
}
|
|
1567
|
+
deleteGroup(params, groupId) {
|
|
1568
|
+
const resourceUri = this._httpHelper._config.ResourceUri.DeleteGroup.replace("{id}", groupId);
|
|
1569
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
1570
|
+
const opts = { method: "DELETE" };
|
|
1571
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
1572
|
+
}
|
|
1536
1573
|
getGroupsUsers(params, groupId) {
|
|
1537
1574
|
const resourceUri = this._httpHelper._config.ResourceUri.GroupsUsers.replace("{id}", groupId);
|
|
1538
1575
|
const url = this._httpHelper.getUrl(resourceUri);
|
|
@@ -1603,6 +1640,12 @@ var LibraryManager = class {
|
|
|
1603
1640
|
const opts = { method: "GET" };
|
|
1604
1641
|
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
1605
1642
|
}
|
|
1643
|
+
getFolderByPath(params, folderPath) {
|
|
1644
|
+
const resourceUri = this._httpHelper._config.ResourceUri.Folders + "?folderpath=" + encodeURIComponent(folderPath);
|
|
1645
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
1646
|
+
const opts = { method: "GET" };
|
|
1647
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
1648
|
+
}
|
|
1606
1649
|
updateFolderIndexFieldOverrideSettings(folderId, fieldId, queryId, displayField, valueField, dropDownListId, required, defaultValue) {
|
|
1607
1650
|
const data = {
|
|
1608
1651
|
queryId,
|
|
@@ -1687,8 +1730,8 @@ var SitesManager = class {
|
|
|
1687
1730
|
return this._httpHelper.doVvClientRequest(url, opts, params, data);
|
|
1688
1731
|
}
|
|
1689
1732
|
putSites(params, data, siteId) {
|
|
1690
|
-
const resourceUri = this._httpHelper._config.ResourceUri.
|
|
1691
|
-
const url = this._httpHelper.getUrl(resourceUri
|
|
1733
|
+
const resourceUri = this._httpHelper._config.ResourceUri.SiteById.replace("{id}", siteId);
|
|
1734
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
1692
1735
|
const opts = { method: "PUT" };
|
|
1693
1736
|
return this._httpHelper.doVvClientRequest(url, opts, params, data);
|
|
1694
1737
|
}
|
|
@@ -1705,8 +1748,8 @@ var SitesManager = class {
|
|
|
1705
1748
|
return this._httpHelper.doVvClientRequest(url, opts, params, data);
|
|
1706
1749
|
}
|
|
1707
1750
|
putGroups(params, data, siteId, grId) {
|
|
1708
|
-
const resourceUri = this._httpHelper._config.ResourceUri.
|
|
1709
|
-
const url = this._httpHelper.getUrl(resourceUri
|
|
1751
|
+
const resourceUri = this._httpHelper._config.ResourceUri.SiteGroupById.replace("{siteId}", siteId).replace("{groupId}", grId);
|
|
1752
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
1710
1753
|
const opts = { method: "PUT" };
|
|
1711
1754
|
return this._httpHelper.doVvClientRequest(url, opts, params, data);
|
|
1712
1755
|
}
|
|
@@ -1720,6 +1763,28 @@ var SitesManager = class {
|
|
|
1720
1763
|
};
|
|
1721
1764
|
return this._httpHelper.doVvClientRequest(url, opts, null, data);
|
|
1722
1765
|
}
|
|
1766
|
+
getSiteById(params, siteId) {
|
|
1767
|
+
const resourceUri = this._httpHelper._config.ResourceUri.SiteById.replace("{id}", siteId);
|
|
1768
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
1769
|
+
const opts = { method: "GET" };
|
|
1770
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
1771
|
+
}
|
|
1772
|
+
deleteSite(params, siteId) {
|
|
1773
|
+
const resourceUri = this._httpHelper._config.ResourceUri.SiteById.replace("{id}", siteId);
|
|
1774
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
1775
|
+
const opts = { method: "DELETE" };
|
|
1776
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
1777
|
+
}
|
|
1778
|
+
changeGroupSite(params, groupId, newSiteId) {
|
|
1779
|
+
const resourceUri = this._httpHelper._config.ResourceUri.ChangeGroupSite;
|
|
1780
|
+
const data = {
|
|
1781
|
+
groupId,
|
|
1782
|
+
newSiteId
|
|
1783
|
+
};
|
|
1784
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
1785
|
+
const opts = { method: "PUT" };
|
|
1786
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, data);
|
|
1787
|
+
}
|
|
1723
1788
|
};
|
|
1724
1789
|
|
|
1725
1790
|
// lib/vvRestApi/usersManager.js
|
|
@@ -2108,6 +2173,81 @@ var DocumentsManager = class {
|
|
|
2108
2173
|
const opts = { method: "GET" };
|
|
2109
2174
|
return this._httpHelper.doVvClientRequest(url, opts, null, null);
|
|
2110
2175
|
}
|
|
2176
|
+
createDocumentZipFile(params, documentIds) {
|
|
2177
|
+
const resourceUri = this._httpHelper._config.ResourceUri.CreateDocumentZipFile;
|
|
2178
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2179
|
+
const opts = { method: "POST" };
|
|
2180
|
+
const data = { documentDhIds: documentIds };
|
|
2181
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, data);
|
|
2182
|
+
}
|
|
2183
|
+
getDocumentZipFileStatus(params, downloadKey) {
|
|
2184
|
+
const resourceUri = this._httpHelper._config.ResourceUri.GetDocumentZipFileStatus + `?downloadKey=${encodeURIComponent(downloadKey)}`;
|
|
2185
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2186
|
+
const opts = { method: "GET" };
|
|
2187
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2188
|
+
}
|
|
2189
|
+
getDocumentIndexFields(params, documentId) {
|
|
2190
|
+
const resourceUri = this._httpHelper._config.ResourceUri.DocumentIndexFields.replace("{id}", documentId);
|
|
2191
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2192
|
+
const opts = { method: "GET" };
|
|
2193
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2194
|
+
}
|
|
2195
|
+
getDocumentTypes(params) {
|
|
2196
|
+
const resourceUri = this._httpHelper._config.ResourceUri.DocumentTypes;
|
|
2197
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2198
|
+
const opts = { method: "GET" };
|
|
2199
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2200
|
+
}
|
|
2201
|
+
createDocumentType(params, name) {
|
|
2202
|
+
const resourceUri = this._httpHelper._config.ResourceUri.DocumentTypes;
|
|
2203
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2204
|
+
const opts = { method: "POST" };
|
|
2205
|
+
const data = { documentTypeName: name };
|
|
2206
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, data);
|
|
2207
|
+
}
|
|
2208
|
+
getSavedSearches(params) {
|
|
2209
|
+
const resourceUri = this._httpHelper._config.ResourceUri.SavedSearches;
|
|
2210
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2211
|
+
const opts = { method: "GET" };
|
|
2212
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2213
|
+
}
|
|
2214
|
+
getDocumentFields(params) {
|
|
2215
|
+
const resourceUri = this._httpHelper._config.ResourceUri.DocumentFields;
|
|
2216
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2217
|
+
const opts = { method: "GET" };
|
|
2218
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2219
|
+
}
|
|
2220
|
+
getSavedSearchIndexFields(params, savedSearchId) {
|
|
2221
|
+
const resourceUri = this._httpHelper._config.ResourceUri.SavedSearchIndexFields;
|
|
2222
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2223
|
+
const opts = { method: "GET" };
|
|
2224
|
+
const mergedParams = { ...params, savedSearchId };
|
|
2225
|
+
return this._httpHelper.doVvClientRequest(url, opts, mergedParams, null);
|
|
2226
|
+
}
|
|
2227
|
+
getLastDocuments(params) {
|
|
2228
|
+
const resourceUri = this._httpHelper._config.ResourceUri.LastDocuments;
|
|
2229
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2230
|
+
const opts = { method: "GET" };
|
|
2231
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2232
|
+
}
|
|
2233
|
+
getFrequentDocuments(params) {
|
|
2234
|
+
const resourceUri = this._httpHelper._config.ResourceUri.FrequentDocuments;
|
|
2235
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2236
|
+
const opts = { method: "GET" };
|
|
2237
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2238
|
+
}
|
|
2239
|
+
getSavedSearchDocuments(params, savedSearchId) {
|
|
2240
|
+
const resourceUri = this._httpHelper._config.ResourceUri.SavedSearchDocuments.replace("{savedSearchId}", savedSearchId);
|
|
2241
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2242
|
+
const opts = { method: "GET" };
|
|
2243
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2244
|
+
}
|
|
2245
|
+
getDocumentDefaultLink(params, documentId) {
|
|
2246
|
+
const resourceUri = this._httpHelper._config.ResourceUri.DocumentDefaultAction.replace("{documentId}", documentId);
|
|
2247
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2248
|
+
const opts = { method: "GET" };
|
|
2249
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2250
|
+
}
|
|
2111
2251
|
};
|
|
2112
2252
|
|
|
2113
2253
|
// lib/vvRestApi/projectsManager.js
|
|
@@ -2148,6 +2288,70 @@ var IndexFieldsManager = class {
|
|
|
2148
2288
|
const opts = { method: "GET" };
|
|
2149
2289
|
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2150
2290
|
}
|
|
2291
|
+
getIndexField(params, id) {
|
|
2292
|
+
const resourceUri = this._httpHelper._config.ResourceUri.IndexFields + "/" + id;
|
|
2293
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2294
|
+
const opts = { method: "GET" };
|
|
2295
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2296
|
+
}
|
|
2297
|
+
/**
|
|
2298
|
+
* Payload for creating/updating index fields.
|
|
2299
|
+
* @typedef {Object} IndexFieldData
|
|
2300
|
+
* @property {string} fieldType
|
|
2301
|
+
* @property {string} label
|
|
2302
|
+
* @property {string} [description]
|
|
2303
|
+
* @property {boolean} [required]
|
|
2304
|
+
* @property {?string} [connectionId]
|
|
2305
|
+
* @property {?string} [queryId]
|
|
2306
|
+
* @property {?string} [queryDisplayField]
|
|
2307
|
+
* @property {?string} [queryValueField]
|
|
2308
|
+
* @property {?string} [dropDownListId]
|
|
2309
|
+
* @property {?string} [defaultValue]
|
|
2310
|
+
*/
|
|
2311
|
+
/**
|
|
2312
|
+
* Create an index field
|
|
2313
|
+
* @param {Object} params - Query parameters
|
|
2314
|
+
* @param {IndexFieldData} data - Request body
|
|
2315
|
+
* @returns {Promise<string>}
|
|
2316
|
+
*/
|
|
2317
|
+
createIndexField(params, data) {
|
|
2318
|
+
const resourceUri = this._httpHelper._config.ResourceUri.IndexFields;
|
|
2319
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2320
|
+
const opts = { method: "POST" };
|
|
2321
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, data);
|
|
2322
|
+
}
|
|
2323
|
+
/**
|
|
2324
|
+
* Update an index field
|
|
2325
|
+
* @param {Object} params - Query parameters
|
|
2326
|
+
* @param {string} id - Index field id
|
|
2327
|
+
* @param {IndexFieldData} data - Request body
|
|
2328
|
+
* @returns {Promise<string>}
|
|
2329
|
+
*/
|
|
2330
|
+
updateIndexField(params, id, data) {
|
|
2331
|
+
const resourceUri = this._httpHelper._config.ResourceUri.IndexFields + "/" + id;
|
|
2332
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2333
|
+
const opts = { method: "PUT" };
|
|
2334
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, data);
|
|
2335
|
+
}
|
|
2336
|
+
deleteIndexField(params, id) {
|
|
2337
|
+
const resourceUri = this._httpHelper._config.ResourceUri.IndexFields + "/" + id;
|
|
2338
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2339
|
+
const opts = { method: "DELETE" };
|
|
2340
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2341
|
+
}
|
|
2342
|
+
moveIndexFieldAfter(params, sourceFieldId, destinationFieldId) {
|
|
2343
|
+
const resourceUri = this._httpHelper._config.ResourceUri.IndexFields + "/MoveIndexFieldAfter";
|
|
2344
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2345
|
+
const opts = { method: "POST" };
|
|
2346
|
+
const data = { sourceFieldId, destinationFieldId };
|
|
2347
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, data);
|
|
2348
|
+
}
|
|
2349
|
+
addIndexFieldToFolder(indexFieldId, folderId) {
|
|
2350
|
+
const resourceUri = this._httpHelper._config.ResourceUri.IndexFieldsFolder.replace("{id}", indexFieldId).replace("{folderId}", folderId);
|
|
2351
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2352
|
+
const opts = { method: "PUT" };
|
|
2353
|
+
return this._httpHelper.doVvClientRequest(url, opts, null, null);
|
|
2354
|
+
}
|
|
2151
2355
|
};
|
|
2152
2356
|
|
|
2153
2357
|
// lib/vvRestApi/outsideProcessesManager.js
|
|
@@ -2234,6 +2438,12 @@ var ReportsManager = class {
|
|
|
2234
2438
|
constructor(httpHelper) {
|
|
2235
2439
|
this._httpHelper = httpHelper;
|
|
2236
2440
|
}
|
|
2441
|
+
getReports(params) {
|
|
2442
|
+
const resourceUri = this._httpHelper._config.ResourceUri.Reports;
|
|
2443
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2444
|
+
const opts = { method: "GET" };
|
|
2445
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2446
|
+
}
|
|
2237
2447
|
getReportPDF(reportId, params) {
|
|
2238
2448
|
const resourceUri = this._httpHelper._config.ResourceUri.ReportServerPDF.replace("{id}", reportId);
|
|
2239
2449
|
const url = this._httpHelper.getUrl(resourceUri);
|
|
@@ -2242,6 +2452,102 @@ var ReportsManager = class {
|
|
|
2242
2452
|
}
|
|
2243
2453
|
};
|
|
2244
2454
|
|
|
2455
|
+
// lib/vvRestApi/languageResourcesManager.js
|
|
2456
|
+
init_cjs_shims();
|
|
2457
|
+
var LanguageResourcesManager = class {
|
|
2458
|
+
constructor(httpHelper, baseUrl) {
|
|
2459
|
+
this._httpHelper = httpHelper;
|
|
2460
|
+
this._baseUrl = baseUrl;
|
|
2461
|
+
this._apiUrl = httpHelper._config.BaseApiUri;
|
|
2462
|
+
}
|
|
2463
|
+
getLanguageAreas(params) {
|
|
2464
|
+
const resourceUri = this._httpHelper._config.ResourceUri.LanguageAreas;
|
|
2465
|
+
const url = this._baseUrl + this._apiUrl + resourceUri;
|
|
2466
|
+
const opts = { method: "GET" };
|
|
2467
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2468
|
+
}
|
|
2469
|
+
getLanguages(params) {
|
|
2470
|
+
const resourceUri = this._httpHelper._config.ResourceUri.Languages;
|
|
2471
|
+
const url = this._baseUrl + this._apiUrl + resourceUri;
|
|
2472
|
+
const opts = { method: "GET" };
|
|
2473
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2474
|
+
}
|
|
2475
|
+
exportLanguages(params) {
|
|
2476
|
+
const resourceUri = this._httpHelper._config.ResourceUri.ExportLanguages;
|
|
2477
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2478
|
+
const opts = { method: "GETSTREAM" };
|
|
2479
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2480
|
+
}
|
|
2481
|
+
importLanguages(params, fileData, fileName) {
|
|
2482
|
+
const resourceUri = this._httpHelper._config.ResourceUri.ImportLanguages;
|
|
2483
|
+
const url = this._httpHelper.getUrl(resourceUri) + `?area=${params.area}&lang=${params.lang}`;
|
|
2484
|
+
const opts = { method: "POSTSTREAM" };
|
|
2485
|
+
const data = { fileName };
|
|
2486
|
+
return this._httpHelper.doVvClientRequest(url, opts, null, data, fileData);
|
|
2487
|
+
}
|
|
2488
|
+
};
|
|
2489
|
+
|
|
2490
|
+
// lib/vvRestApi/dropdownListsManager.js
|
|
2491
|
+
init_cjs_shims();
|
|
2492
|
+
var DropdownListsManager = class {
|
|
2493
|
+
constructor(httpHelper) {
|
|
2494
|
+
this._httpHelper = httpHelper;
|
|
2495
|
+
}
|
|
2496
|
+
getDropDownLists(params) {
|
|
2497
|
+
const resourceUri = this._httpHelper._config.ResourceUri.DropDownLists;
|
|
2498
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2499
|
+
const opts = { method: "GET" };
|
|
2500
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2501
|
+
}
|
|
2502
|
+
getDropDownListById(params, listId) {
|
|
2503
|
+
const resourceUri = this._httpHelper._config.ResourceUri.DropDownListsId.replace("{id}", listId);
|
|
2504
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2505
|
+
const opts = { method: "GET" };
|
|
2506
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2507
|
+
}
|
|
2508
|
+
getDropDownListItemsById(params, listId) {
|
|
2509
|
+
const resourceUri = this._httpHelper._config.ResourceUri.DropDownListsIdItems.replace("{id}", listId);
|
|
2510
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2511
|
+
const opts = { method: "GET" };
|
|
2512
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2513
|
+
}
|
|
2514
|
+
addDropDownList(params, ddName, ddDescription, ddItems) {
|
|
2515
|
+
const resourceUri = this._httpHelper._config.ResourceUri.DropDownLists;
|
|
2516
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2517
|
+
const opts = { method: "POST" };
|
|
2518
|
+
const data = {
|
|
2519
|
+
Name: ddName,
|
|
2520
|
+
Description: ddDescription,
|
|
2521
|
+
Items: ddItems
|
|
2522
|
+
};
|
|
2523
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, data);
|
|
2524
|
+
}
|
|
2525
|
+
deleteDropDownList(params, listId) {
|
|
2526
|
+
const resourceUri = this._httpHelper._config.ResourceUri.DropDownListsId.replace("{id}", listId);
|
|
2527
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2528
|
+
const opts = { method: "DELETE" };
|
|
2529
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2530
|
+
}
|
|
2531
|
+
updateDropDownList(params, listId, ddName, ddDescription, items) {
|
|
2532
|
+
const resourceUri = this._httpHelper._config.ResourceUri.DropDownListsId.replace("{id}", listId);
|
|
2533
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2534
|
+
const opts = { method: "PUT" };
|
|
2535
|
+
const data = {
|
|
2536
|
+
Name: ddName,
|
|
2537
|
+
Description: ddDescription,
|
|
2538
|
+
Items: items
|
|
2539
|
+
};
|
|
2540
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, data);
|
|
2541
|
+
}
|
|
2542
|
+
deleteDropDownListItem(params, listId, itemIds) {
|
|
2543
|
+
const resourceUri = this._httpHelper._config.ResourceUri.DropDownListsIdItems.replace("{id}", listId);
|
|
2544
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2545
|
+
const opts = { method: "DELETE" };
|
|
2546
|
+
const mergedParams = { ...params, itemIds };
|
|
2547
|
+
return this._httpHelper.doVvClientRequest(url, opts, mergedParams, null);
|
|
2548
|
+
}
|
|
2549
|
+
};
|
|
2550
|
+
|
|
2245
2551
|
// lib/VVRestApi.js
|
|
2246
2552
|
var debug5 = (0, import_debug5.default)("visualvault:api");
|
|
2247
2553
|
var __filename7 = (0, import_url6.fileURLToPath)(importMetaUrl);
|
|
@@ -2289,6 +2595,10 @@ var VVClient = class {
|
|
|
2289
2595
|
layouts;
|
|
2290
2596
|
/** @type {*} */
|
|
2291
2597
|
reports;
|
|
2598
|
+
/** @type {*} */
|
|
2599
|
+
languageResources;
|
|
2600
|
+
/** @type {*} */
|
|
2601
|
+
dropdownLists;
|
|
2292
2602
|
/**
|
|
2293
2603
|
* @param {*} sessionToken - Session token from authentication
|
|
2294
2604
|
*/
|
|
@@ -2317,6 +2627,8 @@ var VVClient = class {
|
|
|
2317
2627
|
this.securityMembers = new SecurityMembersManager(this._httpHelper);
|
|
2318
2628
|
this.layouts = new LayoutsManager(this._httpHelper);
|
|
2319
2629
|
this.reports = new ReportsManager(this._httpHelper);
|
|
2630
|
+
this.languageResources = new LanguageResourcesManager(this._httpHelper, sessionToken.baseUrl);
|
|
2631
|
+
this.dropdownLists = new DropdownListsManager(this._httpHelper);
|
|
2320
2632
|
this.docApi = null;
|
|
2321
2633
|
this.formsApi = null;
|
|
2322
2634
|
this.objectsApi = null;
|