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/VVRestApi.d.cts
CHANGED
|
@@ -67,9 +67,11 @@ declare class CurrentUserManager {
|
|
|
67
67
|
declare class DocumentManager {
|
|
68
68
|
constructor(httpHelper: any);
|
|
69
69
|
_httpHelper: any;
|
|
70
|
+
createDocument(data: any): Promise<any>;
|
|
70
71
|
GetRevision(documentRevisionId: any): Promise<any>;
|
|
71
72
|
getDocumentOcrStatus(documentRevisionId: any): Promise<any>;
|
|
72
73
|
updateDocumentOcrStatus(documentRevisionId: any, data: any): Promise<any>;
|
|
74
|
+
updateDocument(documentId: any, data: any): Promise<any>;
|
|
73
75
|
search(criteriaList: any, searchFolders: any, excludeFolders: any, sortBy: any, sortDirection?: string, page?: number, take?: number, archiveType?: number, roleSecurity?: boolean): Promise<any>;
|
|
74
76
|
}
|
|
75
77
|
|
|
@@ -313,6 +315,8 @@ declare class VVClient {
|
|
|
313
315
|
/** @type {*} */ securityMembers: any;
|
|
314
316
|
/** @type {*} */ layouts: any;
|
|
315
317
|
/** @type {*} */ reports: any;
|
|
318
|
+
/** @type {*} */ languageResources: any;
|
|
319
|
+
/** @type {*} */ dropdownLists: any;
|
|
316
320
|
yamlConfig: any;
|
|
317
321
|
_httpHelper: HttpHelper;
|
|
318
322
|
currentUser: CurrentUserManager;
|
package/dist/VVRestApi.d.ts
CHANGED
|
@@ -67,9 +67,11 @@ declare class CurrentUserManager {
|
|
|
67
67
|
declare class DocumentManager {
|
|
68
68
|
constructor(httpHelper: any);
|
|
69
69
|
_httpHelper: any;
|
|
70
|
+
createDocument(data: any): Promise<any>;
|
|
70
71
|
GetRevision(documentRevisionId: any): Promise<any>;
|
|
71
72
|
getDocumentOcrStatus(documentRevisionId: any): Promise<any>;
|
|
72
73
|
updateDocumentOcrStatus(documentRevisionId: any, data: any): Promise<any>;
|
|
74
|
+
updateDocument(documentId: any, data: any): Promise<any>;
|
|
73
75
|
search(criteriaList: any, searchFolders: any, excludeFolders: any, sortBy: any, sortDirection?: string, page?: number, take?: number, archiveType?: number, roleSecurity?: boolean): Promise<any>;
|
|
74
76
|
}
|
|
75
77
|
|
|
@@ -313,6 +315,8 @@ declare class VVClient {
|
|
|
313
315
|
/** @type {*} */ securityMembers: any;
|
|
314
316
|
/** @type {*} */ layouts: any;
|
|
315
317
|
/** @type {*} */ reports: any;
|
|
318
|
+
/** @type {*} */ languageResources: any;
|
|
319
|
+
/** @type {*} */ dropdownLists: any;
|
|
316
320
|
yamlConfig: any;
|
|
317
321
|
_httpHelper: HttpHelper;
|
|
318
322
|
currentUser: CurrentUserManager;
|
package/dist/VVRestApi.js
CHANGED
|
@@ -580,6 +580,12 @@ var DocumentManager = class {
|
|
|
580
580
|
constructor(httpHelper) {
|
|
581
581
|
this._httpHelper = httpHelper;
|
|
582
582
|
}
|
|
583
|
+
async createDocument(data) {
|
|
584
|
+
const resourceUri = this._httpHelper._config.ResourceUri.DocApi.CreateDocument;
|
|
585
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
586
|
+
const opts = { method: "POST" };
|
|
587
|
+
return this._httpHelper.doVvClientRequest(url, opts, null, data);
|
|
588
|
+
}
|
|
583
589
|
async GetRevision(documentRevisionId) {
|
|
584
590
|
let resourceUri = this._httpHelper._config.ResourceUri.DocApi.GetRevision;
|
|
585
591
|
resourceUri = resourceUri.replace("{id}", documentRevisionId);
|
|
@@ -601,6 +607,13 @@ var DocumentManager = class {
|
|
|
601
607
|
const opts = { method: "PUT" };
|
|
602
608
|
return this._httpHelper.doVvClientRequest(url, opts, null, data);
|
|
603
609
|
}
|
|
610
|
+
async updateDocument(documentId, data) {
|
|
611
|
+
let resourceUri = this._httpHelper._config.ResourceUri.DocApi.UpdateDocument;
|
|
612
|
+
resourceUri = resourceUri.replace("{id}", documentId);
|
|
613
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
614
|
+
const opts = { method: "PUT" };
|
|
615
|
+
return this._httpHelper.doVvClientRequest(url, opts, null, data);
|
|
616
|
+
}
|
|
604
617
|
async search(criteriaList, searchFolders, excludeFolders, sortBy, sortDirection = "desc", page = 0, take = 15, archiveType = 0, roleSecurity = false) {
|
|
605
618
|
const url = this._httpHelper.getUrl(this._httpHelper._config.ResourceUri.DocApi.AdvancedSearch);
|
|
606
619
|
const data = {
|
|
@@ -1499,6 +1512,30 @@ var GroupsManager = class {
|
|
|
1499
1512
|
const opts = { method: "GET" };
|
|
1500
1513
|
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
1501
1514
|
}
|
|
1515
|
+
getGroupById(params, groupId) {
|
|
1516
|
+
const resourceUri = this._httpHelper._config.ResourceUri.GroupById.replace("{id}", groupId);
|
|
1517
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
1518
|
+
const opts = { method: "GET" };
|
|
1519
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
1520
|
+
}
|
|
1521
|
+
addGroup(params, formData) {
|
|
1522
|
+
const resourceUri = this._httpHelper._config.ResourceUri.AddGroup;
|
|
1523
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
1524
|
+
const opts = { method: "POST" };
|
|
1525
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, formData);
|
|
1526
|
+
}
|
|
1527
|
+
updateGroup(params, groupId, formData) {
|
|
1528
|
+
const resourceUri = this._httpHelper._config.ResourceUri.UpdateGroup.replace("{id}", groupId);
|
|
1529
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
1530
|
+
const opts = { method: "PUT" };
|
|
1531
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, formData);
|
|
1532
|
+
}
|
|
1533
|
+
deleteGroup(params, groupId) {
|
|
1534
|
+
const resourceUri = this._httpHelper._config.ResourceUri.DeleteGroup.replace("{id}", groupId);
|
|
1535
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
1536
|
+
const opts = { method: "DELETE" };
|
|
1537
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
1538
|
+
}
|
|
1502
1539
|
getGroupsUsers(params, groupId) {
|
|
1503
1540
|
const resourceUri = this._httpHelper._config.ResourceUri.GroupsUsers.replace("{id}", groupId);
|
|
1504
1541
|
const url = this._httpHelper.getUrl(resourceUri);
|
|
@@ -1569,6 +1606,12 @@ var LibraryManager = class {
|
|
|
1569
1606
|
const opts = { method: "GET" };
|
|
1570
1607
|
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
1571
1608
|
}
|
|
1609
|
+
getFolderByPath(params, folderPath) {
|
|
1610
|
+
const resourceUri = this._httpHelper._config.ResourceUri.Folders + "?folderpath=" + encodeURIComponent(folderPath);
|
|
1611
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
1612
|
+
const opts = { method: "GET" };
|
|
1613
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
1614
|
+
}
|
|
1572
1615
|
updateFolderIndexFieldOverrideSettings(folderId, fieldId, queryId, displayField, valueField, dropDownListId, required, defaultValue) {
|
|
1573
1616
|
const data = {
|
|
1574
1617
|
queryId,
|
|
@@ -1653,8 +1696,8 @@ var SitesManager = class {
|
|
|
1653
1696
|
return this._httpHelper.doVvClientRequest(url, opts, params, data);
|
|
1654
1697
|
}
|
|
1655
1698
|
putSites(params, data, siteId) {
|
|
1656
|
-
const resourceUri = this._httpHelper._config.ResourceUri.
|
|
1657
|
-
const url = this._httpHelper.getUrl(resourceUri
|
|
1699
|
+
const resourceUri = this._httpHelper._config.ResourceUri.SiteById.replace("{id}", siteId);
|
|
1700
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
1658
1701
|
const opts = { method: "PUT" };
|
|
1659
1702
|
return this._httpHelper.doVvClientRequest(url, opts, params, data);
|
|
1660
1703
|
}
|
|
@@ -1671,8 +1714,8 @@ var SitesManager = class {
|
|
|
1671
1714
|
return this._httpHelper.doVvClientRequest(url, opts, params, data);
|
|
1672
1715
|
}
|
|
1673
1716
|
putGroups(params, data, siteId, grId) {
|
|
1674
|
-
const resourceUri = this._httpHelper._config.ResourceUri.
|
|
1675
|
-
const url = this._httpHelper.getUrl(resourceUri
|
|
1717
|
+
const resourceUri = this._httpHelper._config.ResourceUri.SiteGroupById.replace("{siteId}", siteId).replace("{groupId}", grId);
|
|
1718
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
1676
1719
|
const opts = { method: "PUT" };
|
|
1677
1720
|
return this._httpHelper.doVvClientRequest(url, opts, params, data);
|
|
1678
1721
|
}
|
|
@@ -1686,6 +1729,28 @@ var SitesManager = class {
|
|
|
1686
1729
|
};
|
|
1687
1730
|
return this._httpHelper.doVvClientRequest(url, opts, null, data);
|
|
1688
1731
|
}
|
|
1732
|
+
getSiteById(params, siteId) {
|
|
1733
|
+
const resourceUri = this._httpHelper._config.ResourceUri.SiteById.replace("{id}", siteId);
|
|
1734
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
1735
|
+
const opts = { method: "GET" };
|
|
1736
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
1737
|
+
}
|
|
1738
|
+
deleteSite(params, siteId) {
|
|
1739
|
+
const resourceUri = this._httpHelper._config.ResourceUri.SiteById.replace("{id}", siteId);
|
|
1740
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
1741
|
+
const opts = { method: "DELETE" };
|
|
1742
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
1743
|
+
}
|
|
1744
|
+
changeGroupSite(params, groupId, newSiteId) {
|
|
1745
|
+
const resourceUri = this._httpHelper._config.ResourceUri.ChangeGroupSite;
|
|
1746
|
+
const data = {
|
|
1747
|
+
groupId,
|
|
1748
|
+
newSiteId
|
|
1749
|
+
};
|
|
1750
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
1751
|
+
const opts = { method: "PUT" };
|
|
1752
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, data);
|
|
1753
|
+
}
|
|
1689
1754
|
};
|
|
1690
1755
|
|
|
1691
1756
|
// lib/vvRestApi/usersManager.js
|
|
@@ -2074,6 +2139,81 @@ var DocumentsManager = class {
|
|
|
2074
2139
|
const opts = { method: "GET" };
|
|
2075
2140
|
return this._httpHelper.doVvClientRequest(url, opts, null, null);
|
|
2076
2141
|
}
|
|
2142
|
+
createDocumentZipFile(params, documentIds) {
|
|
2143
|
+
const resourceUri = this._httpHelper._config.ResourceUri.CreateDocumentZipFile;
|
|
2144
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2145
|
+
const opts = { method: "POST" };
|
|
2146
|
+
const data = { documentDhIds: documentIds };
|
|
2147
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, data);
|
|
2148
|
+
}
|
|
2149
|
+
getDocumentZipFileStatus(params, downloadKey) {
|
|
2150
|
+
const resourceUri = this._httpHelper._config.ResourceUri.GetDocumentZipFileStatus + `?downloadKey=${encodeURIComponent(downloadKey)}`;
|
|
2151
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2152
|
+
const opts = { method: "GET" };
|
|
2153
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2154
|
+
}
|
|
2155
|
+
getDocumentIndexFields(params, documentId) {
|
|
2156
|
+
const resourceUri = this._httpHelper._config.ResourceUri.DocumentIndexFields.replace("{id}", documentId);
|
|
2157
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2158
|
+
const opts = { method: "GET" };
|
|
2159
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2160
|
+
}
|
|
2161
|
+
getDocumentTypes(params) {
|
|
2162
|
+
const resourceUri = this._httpHelper._config.ResourceUri.DocumentTypes;
|
|
2163
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2164
|
+
const opts = { method: "GET" };
|
|
2165
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2166
|
+
}
|
|
2167
|
+
createDocumentType(params, name) {
|
|
2168
|
+
const resourceUri = this._httpHelper._config.ResourceUri.DocumentTypes;
|
|
2169
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2170
|
+
const opts = { method: "POST" };
|
|
2171
|
+
const data = { documentTypeName: name };
|
|
2172
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, data);
|
|
2173
|
+
}
|
|
2174
|
+
getSavedSearches(params) {
|
|
2175
|
+
const resourceUri = this._httpHelper._config.ResourceUri.SavedSearches;
|
|
2176
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2177
|
+
const opts = { method: "GET" };
|
|
2178
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2179
|
+
}
|
|
2180
|
+
getDocumentFields(params) {
|
|
2181
|
+
const resourceUri = this._httpHelper._config.ResourceUri.DocumentFields;
|
|
2182
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2183
|
+
const opts = { method: "GET" };
|
|
2184
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2185
|
+
}
|
|
2186
|
+
getSavedSearchIndexFields(params, savedSearchId) {
|
|
2187
|
+
const resourceUri = this._httpHelper._config.ResourceUri.SavedSearchIndexFields;
|
|
2188
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2189
|
+
const opts = { method: "GET" };
|
|
2190
|
+
const mergedParams = { ...params, savedSearchId };
|
|
2191
|
+
return this._httpHelper.doVvClientRequest(url, opts, mergedParams, null);
|
|
2192
|
+
}
|
|
2193
|
+
getLastDocuments(params) {
|
|
2194
|
+
const resourceUri = this._httpHelper._config.ResourceUri.LastDocuments;
|
|
2195
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2196
|
+
const opts = { method: "GET" };
|
|
2197
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2198
|
+
}
|
|
2199
|
+
getFrequentDocuments(params) {
|
|
2200
|
+
const resourceUri = this._httpHelper._config.ResourceUri.FrequentDocuments;
|
|
2201
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2202
|
+
const opts = { method: "GET" };
|
|
2203
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2204
|
+
}
|
|
2205
|
+
getSavedSearchDocuments(params, savedSearchId) {
|
|
2206
|
+
const resourceUri = this._httpHelper._config.ResourceUri.SavedSearchDocuments.replace("{savedSearchId}", savedSearchId);
|
|
2207
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2208
|
+
const opts = { method: "GET" };
|
|
2209
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2210
|
+
}
|
|
2211
|
+
getDocumentDefaultLink(params, documentId) {
|
|
2212
|
+
const resourceUri = this._httpHelper._config.ResourceUri.DocumentDefaultAction.replace("{documentId}", documentId);
|
|
2213
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2214
|
+
const opts = { method: "GET" };
|
|
2215
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2216
|
+
}
|
|
2077
2217
|
};
|
|
2078
2218
|
|
|
2079
2219
|
// lib/vvRestApi/projectsManager.js
|
|
@@ -2114,6 +2254,70 @@ var IndexFieldsManager = class {
|
|
|
2114
2254
|
const opts = { method: "GET" };
|
|
2115
2255
|
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2116
2256
|
}
|
|
2257
|
+
getIndexField(params, id) {
|
|
2258
|
+
const resourceUri = this._httpHelper._config.ResourceUri.IndexFields + "/" + id;
|
|
2259
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2260
|
+
const opts = { method: "GET" };
|
|
2261
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2262
|
+
}
|
|
2263
|
+
/**
|
|
2264
|
+
* Payload for creating/updating index fields.
|
|
2265
|
+
* @typedef {Object} IndexFieldData
|
|
2266
|
+
* @property {string} fieldType
|
|
2267
|
+
* @property {string} label
|
|
2268
|
+
* @property {string} [description]
|
|
2269
|
+
* @property {boolean} [required]
|
|
2270
|
+
* @property {?string} [connectionId]
|
|
2271
|
+
* @property {?string} [queryId]
|
|
2272
|
+
* @property {?string} [queryDisplayField]
|
|
2273
|
+
* @property {?string} [queryValueField]
|
|
2274
|
+
* @property {?string} [dropDownListId]
|
|
2275
|
+
* @property {?string} [defaultValue]
|
|
2276
|
+
*/
|
|
2277
|
+
/**
|
|
2278
|
+
* Create an index field
|
|
2279
|
+
* @param {Object} params - Query parameters
|
|
2280
|
+
* @param {IndexFieldData} data - Request body
|
|
2281
|
+
* @returns {Promise<string>}
|
|
2282
|
+
*/
|
|
2283
|
+
createIndexField(params, data) {
|
|
2284
|
+
const resourceUri = this._httpHelper._config.ResourceUri.IndexFields;
|
|
2285
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2286
|
+
const opts = { method: "POST" };
|
|
2287
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, data);
|
|
2288
|
+
}
|
|
2289
|
+
/**
|
|
2290
|
+
* Update an index field
|
|
2291
|
+
* @param {Object} params - Query parameters
|
|
2292
|
+
* @param {string} id - Index field id
|
|
2293
|
+
* @param {IndexFieldData} data - Request body
|
|
2294
|
+
* @returns {Promise<string>}
|
|
2295
|
+
*/
|
|
2296
|
+
updateIndexField(params, id, data) {
|
|
2297
|
+
const resourceUri = this._httpHelper._config.ResourceUri.IndexFields + "/" + id;
|
|
2298
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2299
|
+
const opts = { method: "PUT" };
|
|
2300
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, data);
|
|
2301
|
+
}
|
|
2302
|
+
deleteIndexField(params, id) {
|
|
2303
|
+
const resourceUri = this._httpHelper._config.ResourceUri.IndexFields + "/" + id;
|
|
2304
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2305
|
+
const opts = { method: "DELETE" };
|
|
2306
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2307
|
+
}
|
|
2308
|
+
moveIndexFieldAfter(params, sourceFieldId, destinationFieldId) {
|
|
2309
|
+
const resourceUri = this._httpHelper._config.ResourceUri.IndexFields + "/MoveIndexFieldAfter";
|
|
2310
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2311
|
+
const opts = { method: "POST" };
|
|
2312
|
+
const data = { sourceFieldId, destinationFieldId };
|
|
2313
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, data);
|
|
2314
|
+
}
|
|
2315
|
+
addIndexFieldToFolder(indexFieldId, folderId) {
|
|
2316
|
+
const resourceUri = this._httpHelper._config.ResourceUri.IndexFieldsFolder.replace("{id}", indexFieldId).replace("{folderId}", folderId);
|
|
2317
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2318
|
+
const opts = { method: "PUT" };
|
|
2319
|
+
return this._httpHelper.doVvClientRequest(url, opts, null, null);
|
|
2320
|
+
}
|
|
2117
2321
|
};
|
|
2118
2322
|
|
|
2119
2323
|
// lib/vvRestApi/outsideProcessesManager.js
|
|
@@ -2200,6 +2404,12 @@ var ReportsManager = class {
|
|
|
2200
2404
|
constructor(httpHelper) {
|
|
2201
2405
|
this._httpHelper = httpHelper;
|
|
2202
2406
|
}
|
|
2407
|
+
getReports(params) {
|
|
2408
|
+
const resourceUri = this._httpHelper._config.ResourceUri.Reports;
|
|
2409
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2410
|
+
const opts = { method: "GET" };
|
|
2411
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2412
|
+
}
|
|
2203
2413
|
getReportPDF(reportId, params) {
|
|
2204
2414
|
const resourceUri = this._httpHelper._config.ResourceUri.ReportServerPDF.replace("{id}", reportId);
|
|
2205
2415
|
const url = this._httpHelper.getUrl(resourceUri);
|
|
@@ -2208,6 +2418,102 @@ var ReportsManager = class {
|
|
|
2208
2418
|
}
|
|
2209
2419
|
};
|
|
2210
2420
|
|
|
2421
|
+
// lib/vvRestApi/languageResourcesManager.js
|
|
2422
|
+
init_esm_shims();
|
|
2423
|
+
var LanguageResourcesManager = class {
|
|
2424
|
+
constructor(httpHelper, baseUrl) {
|
|
2425
|
+
this._httpHelper = httpHelper;
|
|
2426
|
+
this._baseUrl = baseUrl;
|
|
2427
|
+
this._apiUrl = httpHelper._config.BaseApiUri;
|
|
2428
|
+
}
|
|
2429
|
+
getLanguageAreas(params) {
|
|
2430
|
+
const resourceUri = this._httpHelper._config.ResourceUri.LanguageAreas;
|
|
2431
|
+
const url = this._baseUrl + this._apiUrl + resourceUri;
|
|
2432
|
+
const opts = { method: "GET" };
|
|
2433
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2434
|
+
}
|
|
2435
|
+
getLanguages(params) {
|
|
2436
|
+
const resourceUri = this._httpHelper._config.ResourceUri.Languages;
|
|
2437
|
+
const url = this._baseUrl + this._apiUrl + resourceUri;
|
|
2438
|
+
const opts = { method: "GET" };
|
|
2439
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2440
|
+
}
|
|
2441
|
+
exportLanguages(params) {
|
|
2442
|
+
const resourceUri = this._httpHelper._config.ResourceUri.ExportLanguages;
|
|
2443
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2444
|
+
const opts = { method: "GETSTREAM" };
|
|
2445
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2446
|
+
}
|
|
2447
|
+
importLanguages(params, fileData, fileName) {
|
|
2448
|
+
const resourceUri = this._httpHelper._config.ResourceUri.ImportLanguages;
|
|
2449
|
+
const url = this._httpHelper.getUrl(resourceUri) + `?area=${params.area}&lang=${params.lang}`;
|
|
2450
|
+
const opts = { method: "POSTSTREAM" };
|
|
2451
|
+
const data = { fileName };
|
|
2452
|
+
return this._httpHelper.doVvClientRequest(url, opts, null, data, fileData);
|
|
2453
|
+
}
|
|
2454
|
+
};
|
|
2455
|
+
|
|
2456
|
+
// lib/vvRestApi/dropdownListsManager.js
|
|
2457
|
+
init_esm_shims();
|
|
2458
|
+
var DropdownListsManager = class {
|
|
2459
|
+
constructor(httpHelper) {
|
|
2460
|
+
this._httpHelper = httpHelper;
|
|
2461
|
+
}
|
|
2462
|
+
getDropDownLists(params) {
|
|
2463
|
+
const resourceUri = this._httpHelper._config.ResourceUri.DropDownLists;
|
|
2464
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2465
|
+
const opts = { method: "GET" };
|
|
2466
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2467
|
+
}
|
|
2468
|
+
getDropDownListById(params, listId) {
|
|
2469
|
+
const resourceUri = this._httpHelper._config.ResourceUri.DropDownListsId.replace("{id}", listId);
|
|
2470
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2471
|
+
const opts = { method: "GET" };
|
|
2472
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2473
|
+
}
|
|
2474
|
+
getDropDownListItemsById(params, listId) {
|
|
2475
|
+
const resourceUri = this._httpHelper._config.ResourceUri.DropDownListsIdItems.replace("{id}", listId);
|
|
2476
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2477
|
+
const opts = { method: "GET" };
|
|
2478
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2479
|
+
}
|
|
2480
|
+
addDropDownList(params, ddName, ddDescription, ddItems) {
|
|
2481
|
+
const resourceUri = this._httpHelper._config.ResourceUri.DropDownLists;
|
|
2482
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2483
|
+
const opts = { method: "POST" };
|
|
2484
|
+
const data = {
|
|
2485
|
+
Name: ddName,
|
|
2486
|
+
Description: ddDescription,
|
|
2487
|
+
Items: ddItems
|
|
2488
|
+
};
|
|
2489
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, data);
|
|
2490
|
+
}
|
|
2491
|
+
deleteDropDownList(params, listId) {
|
|
2492
|
+
const resourceUri = this._httpHelper._config.ResourceUri.DropDownListsId.replace("{id}", listId);
|
|
2493
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2494
|
+
const opts = { method: "DELETE" };
|
|
2495
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, null);
|
|
2496
|
+
}
|
|
2497
|
+
updateDropDownList(params, listId, ddName, ddDescription, items) {
|
|
2498
|
+
const resourceUri = this._httpHelper._config.ResourceUri.DropDownListsId.replace("{id}", listId);
|
|
2499
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2500
|
+
const opts = { method: "PUT" };
|
|
2501
|
+
const data = {
|
|
2502
|
+
Name: ddName,
|
|
2503
|
+
Description: ddDescription,
|
|
2504
|
+
Items: items
|
|
2505
|
+
};
|
|
2506
|
+
return this._httpHelper.doVvClientRequest(url, opts, params, data);
|
|
2507
|
+
}
|
|
2508
|
+
deleteDropDownListItem(params, listId, itemIds) {
|
|
2509
|
+
const resourceUri = this._httpHelper._config.ResourceUri.DropDownListsIdItems.replace("{id}", listId);
|
|
2510
|
+
const url = this._httpHelper.getUrl(resourceUri);
|
|
2511
|
+
const opts = { method: "DELETE" };
|
|
2512
|
+
const mergedParams = { ...params, itemIds };
|
|
2513
|
+
return this._httpHelper.doVvClientRequest(url, opts, mergedParams, null);
|
|
2514
|
+
}
|
|
2515
|
+
};
|
|
2516
|
+
|
|
2211
2517
|
// lib/VVRestApi.js
|
|
2212
2518
|
var debug5 = createDebug5("visualvault:api");
|
|
2213
2519
|
var __filename7 = fileURLToPath7(import.meta.url);
|
|
@@ -2255,6 +2561,10 @@ var VVClient = class {
|
|
|
2255
2561
|
layouts;
|
|
2256
2562
|
/** @type {*} */
|
|
2257
2563
|
reports;
|
|
2564
|
+
/** @type {*} */
|
|
2565
|
+
languageResources;
|
|
2566
|
+
/** @type {*} */
|
|
2567
|
+
dropdownLists;
|
|
2258
2568
|
/**
|
|
2259
2569
|
* @param {*} sessionToken - Session token from authentication
|
|
2260
2570
|
*/
|
|
@@ -2283,6 +2593,8 @@ var VVClient = class {
|
|
|
2283
2593
|
this.securityMembers = new SecurityMembersManager(this._httpHelper);
|
|
2284
2594
|
this.layouts = new LayoutsManager(this._httpHelper);
|
|
2285
2595
|
this.reports = new ReportsManager(this._httpHelper);
|
|
2596
|
+
this.languageResources = new LanguageResourcesManager(this._httpHelper, sessionToken.baseUrl);
|
|
2597
|
+
this.dropdownLists = new DropdownListsManager(this._httpHelper);
|
|
2286
2598
|
this.docApi = null;
|
|
2287
2599
|
this.formsApi = null;
|
|
2288
2600
|
this.objectsApi = null;
|