visualvault-api 2.0.0-beta.0 → 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.js CHANGED
@@ -574,12 +574,18 @@ var common_default = {
574
574
  authorize: Authorize
575
575
  };
576
576
 
577
- // lib/docApi/documentInstanceManager.js
577
+ // lib/docApi/documentManager.js
578
578
  init_esm_shims();
579
- var DocumentInstanceManager = class {
579
+ 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 DocumentInstanceManager = 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 = {
@@ -637,7 +650,7 @@ var DocApi = class {
637
650
  this.baseUrl = docApiConfig["apiUrl"] || null;
638
651
  this.roleSecurity = docApiConfig["roleSecurity"] || false;
639
652
  if (this.isEnabled) {
640
- this.documentInstances = new DocumentInstanceManager(this._httpHelper);
653
+ this.documents = new DocumentManager(this._httpHelper);
641
654
  }
642
655
  }
643
656
  };
@@ -696,9 +709,9 @@ var FormsApi_default = FormsApi;
696
709
  // lib/ObjectsApi.js
697
710
  init_esm_shims();
698
711
 
699
- // lib/objectsApi/modelsManager.js
712
+ // lib/objectsApi/modelManager.js
700
713
  init_esm_shims();
701
- var ModelsManager = class {
714
+ var ModelManager = class {
702
715
  constructor(httpHelper) {
703
716
  this._httpHelper = httpHelper;
704
717
  }
@@ -727,11 +740,11 @@ var ModelsManager = class {
727
740
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
728
741
  }
729
742
  };
730
- var modelsManager_default = ModelsManager;
743
+ var modelManager_default = ModelManager;
731
744
 
732
- // lib/objectsApi/objectsManager.js
745
+ // lib/objectsApi/objectManager.js
733
746
  init_esm_shims();
734
- var ObjectsManager = class {
747
+ var ObjectManager = class {
735
748
  constructor(httpHelper) {
736
749
  this._httpHelper = httpHelper;
737
750
  }
@@ -809,7 +822,7 @@ var ObjectsManager = class {
809
822
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
810
823
  }
811
824
  };
812
- var objectsManager_default = ObjectsManager;
825
+ var objectManager_default = ObjectManager;
813
826
 
814
827
  // lib/ObjectsApi.js
815
828
  import yaml4 from "js-yaml";
@@ -828,8 +841,8 @@ var ObjectsApi = class {
828
841
  this.isEnabled = objectsApiConfig["isEnabled"] || false;
829
842
  this.baseUrl = objectsApiConfig["apiUrl"] || null;
830
843
  if (this.isEnabled) {
831
- this.models = new modelsManager_default(this._httpHelper);
832
- this.objects = new objectsManager_default(this._httpHelper);
844
+ this.models = new modelManager_default(this._httpHelper);
845
+ this.objects = new objectManager_default(this._httpHelper);
833
846
  }
834
847
  }
835
848
  };
@@ -938,6 +951,27 @@ var WorkflowManager = class {
938
951
  };
939
952
  var workflowManager_default = WorkflowManager;
940
953
 
954
+ // lib/studioApi/rolesAndPermissionsManager.js
955
+ init_esm_shims();
956
+ var RolesAndPermissionsManager = class {
957
+ constructor(httpHelper) {
958
+ this._httpHelper = httpHelper;
959
+ }
960
+ /**
961
+ * Retrieves available features for the requesting user
962
+ * @param {object} params - Optional URL parameters to include in the request
963
+ */
964
+ async getUserFeatures(params) {
965
+ var resourceUri = this._httpHelper._config.ResourceUri.StudioApi.ResourceUserFeatures;
966
+ var url = this._httpHelper.getUrl(resourceUri);
967
+ var opts = { method: "GET" };
968
+ var data = {};
969
+ params = params || {};
970
+ return this._httpHelper.doVvClientRequest(url, opts, params, data);
971
+ }
972
+ };
973
+ var rolesAndPermissionsManager_default = RolesAndPermissionsManager;
974
+
941
975
  // lib/StudioApi.js
942
976
  import yaml5 from "js-yaml";
943
977
  import fs5 from "fs";
@@ -956,6 +990,7 @@ var StudioApi = class {
956
990
  this.baseUrl = studioApiConfig["studioApiUrl"] || null;
957
991
  if (this.isEnabled) {
958
992
  this.workflow = new workflowManager_default(this._httpHelper);
993
+ this.permissions = new rolesAndPermissionsManager_default(this._httpHelper);
959
994
  }
960
995
  }
961
996
  };
@@ -1477,6 +1512,30 @@ var GroupsManager = class {
1477
1512
  const opts = { method: "GET" };
1478
1513
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1479
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
+ }
1480
1539
  getGroupsUsers(params, groupId) {
1481
1540
  const resourceUri = this._httpHelper._config.ResourceUri.GroupsUsers.replace("{id}", groupId);
1482
1541
  const url = this._httpHelper.getUrl(resourceUri);
@@ -1547,6 +1606,12 @@ var LibraryManager = class {
1547
1606
  const opts = { method: "GET" };
1548
1607
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1549
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
+ }
1550
1615
  updateFolderIndexFieldOverrideSettings(folderId, fieldId, queryId, displayField, valueField, dropDownListId, required, defaultValue) {
1551
1616
  const data = {
1552
1617
  queryId,
@@ -1631,8 +1696,8 @@ var SitesManager = class {
1631
1696
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1632
1697
  }
1633
1698
  putSites(params, data, siteId) {
1634
- const resourceUri = this._httpHelper._config.ResourceUri.Sites;
1635
- const url = this._httpHelper.getUrl(resourceUri + "/" + siteId);
1699
+ const resourceUri = this._httpHelper._config.ResourceUri.SiteById.replace("{id}", siteId);
1700
+ const url = this._httpHelper.getUrl(resourceUri);
1636
1701
  const opts = { method: "PUT" };
1637
1702
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1638
1703
  }
@@ -1649,8 +1714,8 @@ var SitesManager = class {
1649
1714
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1650
1715
  }
1651
1716
  putGroups(params, data, siteId, grId) {
1652
- const resourceUri = this._httpHelper._config.ResourceUri.Groups.replace("{id}", siteId);
1653
- const url = this._httpHelper.getUrl(resourceUri + "/" + grId);
1717
+ const resourceUri = this._httpHelper._config.ResourceUri.SiteGroupById.replace("{siteId}", siteId).replace("{groupId}", grId);
1718
+ const url = this._httpHelper.getUrl(resourceUri);
1654
1719
  const opts = { method: "PUT" };
1655
1720
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1656
1721
  }
@@ -1664,6 +1729,28 @@ var SitesManager = class {
1664
1729
  };
1665
1730
  return this._httpHelper.doVvClientRequest(url, opts, null, data);
1666
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
+ }
1667
1754
  };
1668
1755
 
1669
1756
  // lib/vvRestApi/usersManager.js
@@ -1743,9 +1830,8 @@ var UsersManager = class {
1743
1830
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1744
1831
  }
1745
1832
  getCurrentUser() {
1746
- const resourceUri = this._httpHelper._config.ResourceUri.UsersWhoAmI;
1747
- const baseUrl = this._httpHelper._sessionToken.baseUrl;
1748
- const url = baseUrl + "/api/v1" + resourceUri;
1833
+ const resourceUri = this._httpHelper._config.ResourceUri.UsersMe;
1834
+ const url = this._httpHelper.getUrl(resourceUri);
1749
1835
  const opts = { method: "GET" };
1750
1836
  const params = [];
1751
1837
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
@@ -2041,6 +2127,93 @@ var DocumentsManager = class {
2041
2127
  };
2042
2128
  return this._httpHelper.doVvClientRequest(url, opts, null, data);
2043
2129
  }
2130
+ getDocumentWebDavUrl(documentId) {
2131
+ const resourceUri = this._httpHelper._config.ResourceUri.DocumentsWebDavUrl.replace("{id}", documentId);
2132
+ const url = this._httpHelper.getUrl(resourceUri);
2133
+ const opts = { method: "GET" };
2134
+ return this._httpHelper.doVvClientRequest(url, opts, null, null);
2135
+ }
2136
+ getDocumentWopiUrl(documentId) {
2137
+ const resourceUri = this._httpHelper._config.ResourceUri.DocumentsWopiUrl.replace("{id}", documentId);
2138
+ const url = this._httpHelper.getUrl(resourceUri);
2139
+ const opts = { method: "GET" };
2140
+ return this._httpHelper.doVvClientRequest(url, opts, null, null);
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
+ }
2044
2217
  };
2045
2218
 
2046
2219
  // lib/vvRestApi/projectsManager.js
@@ -2081,6 +2254,70 @@ var IndexFieldsManager = class {
2081
2254
  const opts = { method: "GET" };
2082
2255
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2083
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
+ }
2084
2321
  };
2085
2322
 
2086
2323
  // lib/vvRestApi/outsideProcessesManager.js
@@ -2167,6 +2404,12 @@ var ReportsManager = class {
2167
2404
  constructor(httpHelper) {
2168
2405
  this._httpHelper = httpHelper;
2169
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
+ }
2170
2413
  getReportPDF(reportId, params) {
2171
2414
  const resourceUri = this._httpHelper._config.ResourceUri.ReportServerPDF.replace("{id}", reportId);
2172
2415
  const url = this._httpHelper.getUrl(resourceUri);
@@ -2175,6 +2418,102 @@ var ReportsManager = class {
2175
2418
  }
2176
2419
  };
2177
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
+
2178
2517
  // lib/VVRestApi.js
2179
2518
  var debug5 = createDebug5("visualvault:api");
2180
2519
  var __filename7 = fileURLToPath7(import.meta.url);
@@ -2222,6 +2561,10 @@ var VVClient = class {
2222
2561
  layouts;
2223
2562
  /** @type {*} */
2224
2563
  reports;
2564
+ /** @type {*} */
2565
+ languageResources;
2566
+ /** @type {*} */
2567
+ dropdownLists;
2225
2568
  /**
2226
2569
  * @param {*} sessionToken - Session token from authentication
2227
2570
  */
@@ -2250,66 +2593,13 @@ var VVClient = class {
2250
2593
  this.securityMembers = new SecurityMembersManager(this._httpHelper);
2251
2594
  this.layouts = new LayoutsManager(this._httpHelper);
2252
2595
  this.reports = new ReportsManager(this._httpHelper);
2253
- this._docApi = null;
2254
- Object.defineProperties(this, {
2255
- docApi: {
2256
- get: function() {
2257
- if (this._docApi != null && this._docApi.isEnabled && this._docApi.baseUrl) {
2258
- return this._docApi;
2259
- } else {
2260
- throw new ReferenceError("Document Api not enabled");
2261
- }
2262
- }
2263
- }
2264
- });
2265
- this._formsApi = null;
2266
- Object.defineProperties(this, {
2267
- formsApi: {
2268
- get: function() {
2269
- if (this._formsApi != null && this._formsApi.isEnabled && this._formsApi.baseUrl) {
2270
- return this._formsApi;
2271
- } else {
2272
- throw new ReferenceError("Forms Api not enabled");
2273
- }
2274
- }
2275
- }
2276
- });
2277
- this._objectsApi = null;
2278
- Object.defineProperties(this, {
2279
- objectsApi: {
2280
- get: function() {
2281
- if (this._objectsApi != null && this._objectsApi.isEnabled && this._objectsApi.baseUrl) {
2282
- return this._objectsApi;
2283
- } else {
2284
- throw new ReferenceError("Objects Api not enabled");
2285
- }
2286
- }
2287
- }
2288
- });
2289
- this._studioApi = null;
2290
- Object.defineProperties(this, {
2291
- studioApi: {
2292
- get: function() {
2293
- if (this._studioApi != null && this._studioApi.isEnabled && this._studioApi.baseUrl) {
2294
- return this._studioApi;
2295
- } else {
2296
- throw new ReferenceError("Studio Api not enabled");
2297
- }
2298
- }
2299
- }
2300
- });
2301
- this._notificationsApi = null;
2302
- Object.defineProperties(this, {
2303
- notificationsApi: {
2304
- get: function() {
2305
- if (this._notificationsApi != null && this._notificationsApi.isEnabled && this._notificationsApi.baseUrl) {
2306
- return this._notificationsApi;
2307
- } else {
2308
- throw new ReferenceError("Notifications Api not enabled");
2309
- }
2310
- }
2311
- }
2312
- });
2596
+ this.languageResources = new LanguageResourcesManager(this._httpHelper, sessionToken.baseUrl);
2597
+ this.dropdownLists = new DropdownListsManager(this._httpHelper);
2598
+ this.docApi = null;
2599
+ this.formsApi = null;
2600
+ this.objectsApi = null;
2601
+ this.studioApi = null;
2602
+ this.notificationsApi = null;
2313
2603
  }
2314
2604
  async createDocApi(sessionToken) {
2315
2605
  const docApiConfigResponse = JSON.parse(await this.configuration.getDocApiConfig());
@@ -2318,12 +2608,12 @@ var VVClient = class {
2318
2608
  docApiSession.baseUrl = docApiConfigResponse.data["apiUrl"];
2319
2609
  docApiSession.apiUrl = this.yamlConfig.DocApiUri;
2320
2610
  if (docApiSession["tokenType"] == "jwt") {
2321
- this._docApi = new DocApi_default(docApiSession, docApiConfigResponse.data);
2611
+ this.docApi = new DocApi_default(docApiSession, docApiConfigResponse.data);
2322
2612
  } else if (this.users) {
2323
2613
  const jwtResponse = JSON.parse(await this.users.getUserJwt(docApiSession.audience));
2324
2614
  if (jwtResponse["data"] && jwtResponse["data"]["token"]) {
2325
2615
  docApiSession.convertToJwt(jwtResponse["data"]);
2326
- this._docApi = new DocApi_default(docApiSession, docApiConfigResponse.data);
2616
+ this.docApi = new DocApi_default(docApiSession, docApiConfigResponse.data);
2327
2617
  }
2328
2618
  }
2329
2619
  }
@@ -2335,12 +2625,12 @@ var VVClient = class {
2335
2625
  formsApiSession.baseUrl = formsApiConfigResponse.data["formsApiUrl"];
2336
2626
  formsApiSession.apiUrl = this.yamlConfig.FormsApiUri;
2337
2627
  if (formsApiSession["tokenType"] == "jwt") {
2338
- this._formsApi = new FormsApi_default(formsApiSession, formsApiConfigResponse.data);
2628
+ this.formsApi = new FormsApi_default(formsApiSession, formsApiConfigResponse.data);
2339
2629
  } else if (this.users) {
2340
2630
  const jwtResponse = JSON.parse(await this.users.getUserJwt(formsApiSession.audience));
2341
2631
  if (jwtResponse["data"] && jwtResponse["data"]["token"]) {
2342
2632
  formsApiSession.convertToJwt(jwtResponse["data"]);
2343
- this._formsApi = new FormsApi_default(formsApiSession, formsApiConfigResponse.data);
2633
+ this.formsApi = new FormsApi_default(formsApiSession, formsApiConfigResponse.data);
2344
2634
  }
2345
2635
  }
2346
2636
  }
@@ -2352,12 +2642,12 @@ var VVClient = class {
2352
2642
  objectsApiSession.baseUrl = objectsApiConfigResponse.data["apiUrl"];
2353
2643
  objectsApiSession.apiUrl = "";
2354
2644
  if (objectsApiSession["tokenType"] == "jwt") {
2355
- this._objectsApi = new ObjectsApi_default(objectsApiSession, objectsApiConfigResponse.data);
2645
+ this.objectsApi = new ObjectsApi_default(objectsApiSession, objectsApiConfigResponse.data);
2356
2646
  } else if (this.users) {
2357
2647
  const jwtResponse = JSON.parse(await this.users.getUserJwt(objectsApiSession.audience));
2358
2648
  if (jwtResponse["data"] && jwtResponse["data"]["token"]) {
2359
2649
  objectsApiSession.convertToJwt(jwtResponse["data"]);
2360
- this._objectsApi = new ObjectsApi_default(objectsApiSession, objectsApiConfigResponse.data);
2650
+ this.objectsApi = new ObjectsApi_default(objectsApiSession, objectsApiConfigResponse.data);
2361
2651
  }
2362
2652
  }
2363
2653
  }
@@ -2369,12 +2659,12 @@ var VVClient = class {
2369
2659
  studioApiSession.baseUrl = studioApiConfigResponse.data["studioApiUrl"];
2370
2660
  studioApiSession.apiUrl = "";
2371
2661
  if (studioApiSession["tokenType"] == "jwt") {
2372
- this._studioApi = new StudioApi_default(studioApiSession, studioApiConfigResponse.data);
2662
+ this.studioApi = new StudioApi_default(studioApiSession, studioApiConfigResponse.data);
2373
2663
  } else if (this.users) {
2374
2664
  const jwtResponse = JSON.parse(await this.users.getUserJwt(studioApiSession.audience));
2375
2665
  if (jwtResponse["data"] && jwtResponse["data"]["token"]) {
2376
2666
  studioApiSession.convertToJwt(jwtResponse["data"]);
2377
- this._studioApi = new StudioApi_default(studioApiSession, studioApiConfigResponse.data);
2667
+ this.studioApi = new StudioApi_default(studioApiSession, studioApiConfigResponse.data);
2378
2668
  }
2379
2669
  }
2380
2670
  }
@@ -2386,12 +2676,12 @@ var VVClient = class {
2386
2676
  notificationsApiSession.baseUrl = notificationsApiConfigResponse.data["apiUrl"];
2387
2677
  notificationsApiSession.apiUrl = this.yamlConfig.NotificationsApiUri;
2388
2678
  if (notificationsApiSession["tokenType"] == "jwt") {
2389
- this._notificationsApi = new NotificationsApi_default(notificationsApiSession, notificationsApiConfigResponse.data);
2679
+ this.notificationsApi = new NotificationsApi_default(notificationsApiSession, notificationsApiConfigResponse.data);
2390
2680
  } else if (this.users) {
2391
2681
  const jwtResponse = JSON.parse(await this.users.getUserJwt(notificationsApiSession.audience));
2392
2682
  if (jwtResponse["data"] && jwtResponse["data"]["token"]) {
2393
2683
  notificationsApiSession.convertToJwt(jwtResponse["data"]);
2394
- this._notificationsApi = new NotificationsApi_default(notificationsApiSession, notificationsApiConfigResponse.data);
2684
+ this.notificationsApi = new NotificationsApi_default(notificationsApiSession, notificationsApiConfigResponse.data);
2395
2685
  }
2396
2686
  }
2397
2687
  }