visualvault-api 2.0.0 → 2.1.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -611,15 +611,43 @@ var common_default = {
611
611
  // lib/docApi/documentManager.js
612
612
  init_cjs_shims();
613
613
  var DocumentManager = class {
614
+ /**
615
+ * @param {object} httpHelper - The HTTP helper instance used to make API requests.
616
+ */
614
617
  constructor(httpHelper) {
615
618
  this._httpHelper = httpHelper;
616
619
  }
620
+ /**
621
+ * Creates a new document.
622
+ * @param {object} data - The document creation payload.
623
+ * @param {string} data.folderId - (Required) The Guid of the folder to create the document in.
624
+ * @param {string} [data.name] - The document name.
625
+ * @param {string} [data.revision] - The revision label.
626
+ * @param {string} [data.documentState] - The document state.
627
+ * @param {string} [data.fileName] - The file name of the attached file.
628
+ * @param {string} [data.contentType] - The MIME type of the attached file.
629
+ * @param {number[]|Uint8Array} [data.fileBytes] - The file content as a byte array.
630
+ * @param {number} [data.fileLength] - The byte length of the file.
631
+ * @param {Array<{key: string, value: string}>} [data.indexFields] - Index field key/value pairs.
632
+ * @param {string} [data.docType] - The document type.
633
+ * @param {number} [data.confidence] - OCR confidence score (decimal).
634
+ * @param {string} [data.description] - Document description.
635
+ * @param {string} [data.keywords] - Document keywords.
636
+ * @param {string} [data.abstract] - Document abstract.
637
+ * @param {string} [data.changeText] - Change description for this revision.
638
+ * @returns {Promise<string>} The API response containing the created document details.
639
+ */
617
640
  async createDocument(data) {
618
641
  const resourceUri = this._httpHelper._config.ResourceUri.DocApi.CreateDocument;
619
642
  const url = this._httpHelper.getUrl(resourceUri);
620
643
  const opts = { method: "POST" };
621
644
  return this._httpHelper.doVvClientRequest(url, opts, null, data);
622
645
  }
646
+ /**
647
+ * Retrieves a specific document revision by its ID.
648
+ * @param {string} documentRevisionId - The ID (Guid) of the document revision to retrieve.
649
+ * @returns {Promise<string>} The API response containing the document revision details.
650
+ */
623
651
  async GetRevision(documentRevisionId) {
624
652
  let resourceUri = this._httpHelper._config.ResourceUri.DocApi.GetRevision;
625
653
  resourceUri = resourceUri.replace("{id}", documentRevisionId);
@@ -627,6 +655,11 @@ var DocumentManager = class {
627
655
  const opts = { method: "GET" };
628
656
  return this._httpHelper.doVvClientRequest(url, opts, null, null);
629
657
  }
658
+ /**
659
+ * Retrieves the OCR processing status for a document revision.
660
+ * @param {string} documentRevisionId - The ID (Guid) of the document revision to check.
661
+ * @returns {Promise<string>} The API response containing the OCR status for the document revision.
662
+ */
630
663
  async getDocumentOcrStatus(documentRevisionId) {
631
664
  let resourceUri = this._httpHelper._config.ResourceUri.DocApi.OcrStatus;
632
665
  resourceUri = resourceUri.replace("{id}", documentRevisionId);
@@ -634,6 +667,16 @@ var DocumentManager = class {
634
667
  const opts = { method: "GET" };
635
668
  return this._httpHelper.doVvClientRequest(url, opts, null, null);
636
669
  }
670
+ /**
671
+ * Updates the OCR processing status for a document revision.
672
+ * @param {string} documentRevisionId - The ID (Guid) of the document revision to update.
673
+ * @param {object} data - The OCR status payload.
674
+ * @param {number} data.ocrErrorCode - Error code enum: 0=None, 1=ErrorThrown, 2=OcrProcessingError, 3=OcrOutputSaveError, 4=CheckinError.
675
+ * @param {number} data.ocrStatus - Status enum: 0=None, 1=Success, 2=SuccessNoTextExtracted, 3=Failure, 4=FailureNoRetry, 5=ResultingDocumentFromSuccess.
676
+ * @param {number} data.pageCount - Number of pages processed.
677
+ * @param {number} data.wordCount - Number of words extracted.
678
+ * @returns {Promise<string>} The API response confirming the OCR status update.
679
+ */
637
680
  async updateDocumentOcrStatus(documentRevisionId, data) {
638
681
  let resourceUri = this._httpHelper._config.ResourceUri.DocApi.OcrStatus;
639
682
  resourceUri = resourceUri.replace("{id}", documentRevisionId);
@@ -641,6 +684,24 @@ var DocumentManager = class {
641
684
  const opts = { method: "PUT" };
642
685
  return this._httpHelper.doVvClientRequest(url, opts, null, data);
643
686
  }
687
+ /**
688
+ * Updates an existing document by its ID.
689
+ * @param {string} documentId - The ID (Guid) of the document to update.
690
+ * @param {object} data - The document update payload.
691
+ * @param {string} [data.name] - The document name.
692
+ * @param {string} [data.displayRev] - The display revision label.
693
+ * @param {string} [data.description] - Document description.
694
+ * @param {string} [data.keywords] - Document keywords.
695
+ * @param {string} [data.comments] - Comments for this revision.
696
+ * @param {string} [data.abstract] - Document abstract.
697
+ * @param {string} [data.changeText] - Change description for this revision.
698
+ * @param {string} [data.archive] - Archive state value.
699
+ * @param {string} [data.state] - Document state.
700
+ * @param {Array<{key: string, value: string}>} [data.indexFields] - Index field key/value pairs.
701
+ * @param {string} [data.docType] - The document type.
702
+ * @param {number} [data.confidence] - OCR confidence score (decimal).
703
+ * @returns {Promise<string>} The API response confirming the document update.
704
+ */
644
705
  async updateDocument(documentId, data) {
645
706
  let resourceUri = this._httpHelper._config.ResourceUri.DocApi.UpdateDocument;
646
707
  resourceUri = resourceUri.replace("{id}", documentId);
@@ -648,6 +709,19 @@ var DocumentManager = class {
648
709
  const opts = { method: "PUT" };
649
710
  return this._httpHelper.doVvClientRequest(url, opts, null, data);
650
711
  }
712
+ /**
713
+ * Searches for documents using advanced search criteria.
714
+ * @param {object[]} criteriaList - List of search criteria objects to filter results.
715
+ * @param {string[]} searchFolders - List of folder paths to include in the search scope.
716
+ * @param {string[]} excludeFolders - List of folder paths to exclude from the search scope.
717
+ * @param {string} sortBy - The field name to sort the results by.
718
+ * @param {string} [sortDirection='desc'] - Sort direction, either 'asc' or 'desc'.
719
+ * @param {number} [page=0] - Zero-based page index for pagination.
720
+ * @param {number} [take=15] - Number of results to return per page.
721
+ * @param {number} [archiveType=0] - Archive type filter: 0 for active, 1 for archived documents.
722
+ * @param {boolean} [roleSecurity=false] - Whether to apply role-based security filtering.
723
+ * @returns {Promise<string>} The API response containing the matching documents and pagination info.
724
+ */
651
725
  async search(criteriaList, searchFolders, excludeFolders, sortBy, sortDirection = "desc", page = 0, take = 15, archiveType = 0, roleSecurity = false) {
652
726
  const url = this._httpHelper.getUrl(this._httpHelper._config.ResourceUri.DocApi.AdvancedSearch);
653
727
  const data = {
@@ -674,6 +748,18 @@ var import_path = __toESM(require("path"), 1);
674
748
  var __filename2 = (0, import_url.fileURLToPath)(importMetaUrl);
675
749
  var __dirname = import_path.default.dirname(__filename2);
676
750
  var DocApi = class {
751
+ /** @type {boolean} */
752
+ isEnabled;
753
+ /** @type {string|null} */
754
+ baseUrl;
755
+ /** @type {boolean} */
756
+ roleSecurity;
757
+ /** @type {DocumentManager} */
758
+ documents;
759
+ /**
760
+ * @param {object} sessionToken - JWT session token from authentication.
761
+ * @param {object} docApiConfig - DocApi configuration object returned by the VV configuration endpoint.
762
+ */
677
763
  constructor(sessionToken, docApiConfig) {
678
764
  if (!sessionToken["tokenType"] && sessionToken["tokenType"] != "jwt") {
679
765
  return;
@@ -696,9 +782,26 @@ init_cjs_shims();
696
782
  // lib/formsApi/formInstanceManager.js
697
783
  init_cjs_shims();
698
784
  var FormInstanceManager = class {
785
+ /**
786
+ * @param {object} httpHelper - The HTTP helper instance used to make API requests.
787
+ */
699
788
  constructor(httpHelper) {
700
789
  this._httpHelper = httpHelper;
701
790
  }
791
+ /**
792
+ * Creates a new form instance from a form template.
793
+ * @param {object} params - URL parameters to include in the request.
794
+ * @param {object} data - The form instance creation payload.
795
+ * @param {string} data.formTemplateId - The Guid of the form template revision; overridden by the formTemplateRevisionId argument if provided.
796
+ * @param {Array<{key: string, value: *, props?: Array<{key: string, value: string}>}>} data.fields - (Required) Form field values. Each item's key is the field name or its Guid; value is the field's value; props holds any extra key/value pairs to save alongside.
797
+ * @param {string} [data.formName] - The DhDocId (display name) for the new form instance.
798
+ * @param {string} [data.parentFormId] - Guid of the parent form instance (for child forms linked via a relation).
799
+ * @param {string} [data.controlFormId] - Guid of the form control (e.g. RRC or Questions) associated with this instance.
800
+ * @param {string} [data.offlineFormId] - Guid assigned to this form while offline; used when syncing offline forms.
801
+ * @param {boolean} [data.ignoreWorkflow] - When true, skips workflow processing for this save.
802
+ * @param {string} formTemplateRevisionId - The ID (Guid) of the form template revision to use; overrides any value in data.
803
+ * @returns {Promise<string>} The API response containing the created form instance details.
804
+ */
702
805
  async postForm(params, data, formTemplateRevisionId) {
703
806
  const resourceUri = this._httpHelper._config.ResourceUri.FormsApi.FormInstance;
704
807
  const url = this._httpHelper.getUrl(resourceUri);
@@ -706,6 +809,23 @@ var FormInstanceManager = class {
706
809
  data["formTemplateId"] = formTemplateRevisionId || data["formTemplateId"];
707
810
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
708
811
  }
812
+ /**
813
+ * Submits a new revision for an existing form instance.
814
+ * @param {object} params - URL parameters to include in the request.
815
+ * @param {object} data - The form instance revision payload.
816
+ * @param {string} data.formTemplateId - The Guid of the form template revision; overridden by the formTemplateRevisionId argument if provided.
817
+ * @param {string} data.formId - The Guid of the existing form instance being revised; overridden by the formId argument if provided.
818
+ * @param {Array<{key: string, value: *, props?: Array<{key: string, value: string}>}>} data.fields - (Required) Form field values. Each item's key is the field name or its Guid; value is the field's value; props holds any extra key/value pairs to save alongside.
819
+ * @param {boolean} [data.replaceRevision] - When true, replaces the current revision instead of creating a new one.
820
+ * @param {string} [data.formName] - The DhDocId (display name) for this revision.
821
+ * @param {string} [data.parentFormId] - Guid of the parent form instance (for child forms linked via a relation).
822
+ * @param {string} [data.controlFormId] - Guid of the form control (e.g. RRC or Questions) associated with this instance.
823
+ * @param {string} [data.offlineFormId] - Guid assigned to this form while offline; used when syncing offline forms.
824
+ * @param {boolean} [data.ignoreWorkflow] - When true, skips workflow processing for this save.
825
+ * @param {string} formTemplateRevisionId - The ID (Guid) of the form template revision; overrides any value in data.
826
+ * @param {string} formId - The ID (Guid) of the existing form instance to revise; overrides any value in data.
827
+ * @returns {Promise<string>} The API response containing the updated form instance details.
828
+ */
709
829
  async postFormRevision(params, data, formTemplateRevisionId, formId) {
710
830
  const resourceUri = this._httpHelper._config.ResourceUri.FormsApi.FormInstance;
711
831
  const url = this._httpHelper.getUrl(resourceUri);
@@ -725,6 +845,16 @@ var import_path2 = __toESM(require("path"), 1);
725
845
  var __filename3 = (0, import_url2.fileURLToPath)(importMetaUrl);
726
846
  var __dirname2 = import_path2.default.dirname(__filename3);
727
847
  var FormsApi = class {
848
+ /** @type {boolean} */
849
+ isEnabled;
850
+ /** @type {string|null} */
851
+ baseUrl;
852
+ /** @type {FormInstanceManager} */
853
+ formInstances;
854
+ /**
855
+ * @param {object} sessionToken - JWT session token from authentication.
856
+ * @param {object} formsApiConfig - FormsApi configuration object returned by the VV configuration endpoint.
857
+ */
728
858
  constructor(sessionToken, formsApiConfig) {
729
859
  if (!sessionToken["tokenType"] && sessionToken["tokenType"] != "jwt") {
730
860
  return;
@@ -746,12 +876,16 @@ init_cjs_shims();
746
876
  // lib/objectsApi/modelManager.js
747
877
  init_cjs_shims();
748
878
  var ModelManager = class {
879
+ /**
880
+ * @param {object} httpHelper - The HTTP helper instance used to make API requests.
881
+ */
749
882
  constructor(httpHelper) {
750
883
  this._httpHelper = httpHelper;
751
884
  }
752
885
  /**
753
- * Retrieves a list of available models
754
- * @param {object} params - Optional URL parameters to include in the request
886
+ * Retrieves a list of available models.
887
+ * @param {object} [params] - Optional URL parameters to include in the request.
888
+ * @returns {Promise<object>} The API response containing the list of models.
755
889
  */
756
890
  async getModels(params) {
757
891
  const resourceUri = this._httpHelper._config.ResourceUri.ObjectsApi.Models;
@@ -761,9 +895,10 @@ var ModelManager = class {
761
895
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
762
896
  }
763
897
  /**
764
- * Retrieves a specific model by its ID
765
- * @param {string} modelId - The ID (Guid) for the requested model
766
- * @param {object} params - Optional URL parameters to include in the request
898
+ * Retrieves a specific model by its ID.
899
+ * @param {string} modelId - The ID (Guid) for the requested model.
900
+ * @param {object} [params] - Optional URL parameters to include in the request.
901
+ * @returns {Promise<object>} The API response containing the model details.
767
902
  */
768
903
  async getModelById(modelId, params) {
769
904
  let resourceUri = this._httpHelper._config.ResourceUri.ObjectsApi.ModelById;
@@ -779,13 +914,17 @@ var modelManager_default = ModelManager;
779
914
  // lib/objectsApi/objectManager.js
780
915
  init_cjs_shims();
781
916
  var ObjectManager = class {
917
+ /**
918
+ * @param {object} httpHelper - The HTTP helper instance used to make API requests.
919
+ */
782
920
  constructor(httpHelper) {
783
921
  this._httpHelper = httpHelper;
784
922
  }
785
923
  /**
786
- * Retrieves a specific object by its ID
787
- * @param {string} objectId - The ID (Guid) for the requested object
788
- * @param {object} params - Optional URL parameters to include in the request
924
+ * Retrieves a specific object by its ID.
925
+ * @param {string} objectId - The ID (Guid) for the requested object.
926
+ * @param {object} [params] - Optional URL parameters to include in the request.
927
+ * @returns {Promise<string>} The API response containing the object details.
789
928
  */
790
929
  async getObject(objectId, params) {
791
930
  let resourceUri = this._httpHelper._config.ResourceUri.ObjectsApi.ObjectById;
@@ -796,10 +935,16 @@ var ObjectManager = class {
796
935
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
797
936
  }
798
937
  /**
799
- * Retrieves a paged list of objects associated with a given model
800
- * @param {string} modelId - The ID (Guid) for the requested model to search
801
- * @param {object} data - Data to send in the request body
802
- * @param {object} params - Optional URL parameters to include in the request
938
+ * Retrieves a paged list of objects associated with a given model.
939
+ * @param {string} modelId - The ID (Guid) for the requested model to search.
940
+ * @param {object} data - The search payload.
941
+ * @param {number} [data.page=0] - Zero-based page index for pagination.
942
+ * @param {number} [data.take=10] - Number of results to return per page.
943
+ * @param {Array<{sortField: string, direction: number}>} [data.sort] - Sort criteria; direction: 0=Ascending, 1=Descending.
944
+ * @param {Array<{lookIn: string, clause: string, criteria: string, condition?: string, leftBracket?: boolean, rightBracket?: boolean}>} [data.criteriaList] - Filter criteria items. lookIn: property name or Guid. clause: 'IsEqual'|'NotEqual'|'GreaterThan'|'GreaterThanEqual'|'LessThan'|'LessThanEqual'|'BeginWith'|'NotBeginWith'|'EndWith'|'NotEndWith'|'Contain'|'NotContain'|'Null'|'NotNull'|'Between'|'NotBetween'|'In'|'NotIn'. criteria: value to compare. condition: 'AND'|'OR'. leftBracket/rightBracket: open/close a logical group.
945
+ * @param {string[]} [data.propertyList] - Property names or Guids to include in results; empty array returns all properties.
946
+ * @param {object} [params] - Optional URL parameters to include in the request.
947
+ * @returns {Promise<string>} The API response containing the list of matching objects and pagination info.
803
948
  */
804
949
  async getObjectsByModelId(modelId, data, params) {
805
950
  let resourceUri = this._httpHelper._config.ResourceUri.ObjectsApi.ObjectSearchByModelId;
@@ -811,10 +956,14 @@ var ObjectManager = class {
811
956
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
812
957
  }
813
958
  /**
814
- * Creates a new object adhering to a given model
815
- * @param {string} modelId - The ID (Guid) used to create a new object for that model
816
- * @param {object} data - Data to send in the request body
817
- * @param {object} params - Optional URL parameters to include in the request
959
+ * Creates a new object adhering to a given model.
960
+ * @param {string} modelId - The ID (Guid) used to create a new object for that model; overrides any value in data.
961
+ * @param {object} data - The object creation payload.
962
+ * @param {string} data.modelId - The Guid of the model this object belongs to; overridden by the modelId argument.
963
+ * @param {object} [data.properties] - Key/value pairs for object property values, keyed by property name or Guid.
964
+ * @param {Array<{id: string, revisionId: string, properties: object, relatedObjectUpdates?: Array}>} [data.relatedModels] - Related object instances to create or link alongside this object.
965
+ * @param {object} [params] - Optional URL parameters to include in the request.
966
+ * @returns {Promise<string>} The API response containing the created object details.
818
967
  */
819
968
  async createObject(modelId, data, params) {
820
969
  const resourceUri = this._httpHelper._config.ResourceUri.ObjectsApi.Object;
@@ -826,11 +975,15 @@ var ObjectManager = class {
826
975
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
827
976
  }
828
977
  /**
829
- * Updates an existing object by its ID (Guid) and revision ID (Guid)
830
- * @param {string} objectId - The ID (Guid) for the requested object to update
831
- * @param {string} objectRevisionId - The revision ID (Guid) for the requested object to update
832
- * @param {object} data - Data to send in the request body
833
- * @param {object} params - Optional URL parameters to include in the request
978
+ * Updates an existing object by its ID and revision ID.
979
+ * @param {string} objectId - The ID (Guid) for the requested object to update.
980
+ * @param {string} objectRevisionId - The revision ID (Guid) for the requested object to update; overrides any value in data.
981
+ * @param {object} data - The object update payload.
982
+ * @param {string} data.revisionId - The revision Guid to update; overridden by the objectRevisionId argument.
983
+ * @param {object} [data.properties] - Key/value pairs for the updated object property values, keyed by property name or Guid.
984
+ * @param {Array<{id: string, revisionId: string, properties: object, relatedObjectUpdates?: Array}>} [data.relatedObjectUpdates] - Related object instances to update alongside this object.
985
+ * @param {object} [params] - Optional URL parameters to include in the request.
986
+ * @returns {Promise<string>} The API response confirming the object update.
834
987
  */
835
988
  async updateObject(objectId, objectRevisionId, data, params) {
836
989
  let resourceUri = this._httpHelper._config.ResourceUri.ObjectsApi.ObjectById;
@@ -843,9 +996,10 @@ var ObjectManager = class {
843
996
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
844
997
  }
845
998
  /**
846
- * Deletes an existing object by its ID (Guid)
847
- * @param {string} objectId - The ID (Guid) for the requested object to delete
848
- * @param {object} params - Optional URL parameters to include in the request
999
+ * Deletes an existing object by its ID.
1000
+ * @param {string} objectId - The ID (Guid) for the requested object to delete.
1001
+ * @param {object} [params] - Optional URL parameters to include in the request.
1002
+ * @returns {Promise<string>} The API response confirming the object deletion.
849
1003
  */
850
1004
  async deleteObject(objectId, params) {
851
1005
  let resourceUri = this._httpHelper._config.ResourceUri.ObjectsApi.ObjectById;
@@ -866,6 +1020,18 @@ var import_path3 = __toESM(require("path"), 1);
866
1020
  var __filename4 = (0, import_url3.fileURLToPath)(importMetaUrl);
867
1021
  var __dirname3 = import_path3.default.dirname(__filename4);
868
1022
  var ObjectsApi = class {
1023
+ /** @type {boolean} */
1024
+ isEnabled;
1025
+ /** @type {string|null} */
1026
+ baseUrl;
1027
+ /** @type {ModelManager} */
1028
+ models;
1029
+ /** @type {ObjectManager} */
1030
+ objects;
1031
+ /**
1032
+ * @param {object} sessionToken - JWT session token from authentication.
1033
+ * @param {object} objectsApiConfig - ObjectsApi configuration object returned by the VV configuration endpoint.
1034
+ */
869
1035
  constructor(sessionToken, objectsApiConfig) {
870
1036
  if (!sessionToken["tokenType"] && sessionToken["tokenType"] != "jwt") {
871
1037
  return;
@@ -888,9 +1054,17 @@ init_cjs_shims();
888
1054
  // lib/studioApi/workflowManager.js
889
1055
  init_cjs_shims();
890
1056
  var WorkflowManager = class {
1057
+ /**
1058
+ * @param {object} httpHelper - The HTTP helper instance used to make API requests.
1059
+ */
891
1060
  constructor(httpHelper) {
892
1061
  this._httpHelper = httpHelper;
893
1062
  }
1063
+ /**
1064
+ * Retrieves the latest published version of a workflow by its ID.
1065
+ * @param {string} workflowId - The ID (Guid) of the workflow to retrieve.
1066
+ * @returns {Promise<object>} The API response containing the workflow details.
1067
+ */
894
1068
  async getWorkflow(workflowId) {
895
1069
  const resourceUri = this._httpHelper._config.ResourceUri.StudioApi.WorkflowLatestPublishedId.replace("{id}", workflowId);
896
1070
  const url = this._httpHelper.getUrl(resourceUri);
@@ -899,6 +1073,11 @@ var WorkflowManager = class {
899
1073
  const params = {};
900
1074
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
901
1075
  }
1076
+ /**
1077
+ * Retrieves the latest published version of a workflow by its name.
1078
+ * @param {string} workflowName - The name of the workflow to retrieve.
1079
+ * @returns {Promise<object>} The API response containing the workflow details.
1080
+ */
902
1081
  async getWorkflowByName(workflowName) {
903
1082
  const resourceUri = this._httpHelper._config.ResourceUri.StudioApi.WorkflowLatestPublished;
904
1083
  const url = this._httpHelper.getUrl(resourceUri);
@@ -907,6 +1086,12 @@ var WorkflowManager = class {
907
1086
  const params = { name: workflowName };
908
1087
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
909
1088
  }
1089
+ /**
1090
+ * Retrieves the variables defined for a specific workflow.
1091
+ * @param {object} [params] - Optional URL parameters to include in the request.
1092
+ * @param {string} workflowId - The ID (Guid) of the workflow whose variables to retrieve.
1093
+ * @returns {Promise<object>} The API response containing the list of workflow variables.
1094
+ */
910
1095
  async getWorkflowVariables(params, workflowId) {
911
1096
  const resourceUri = this._httpHelper._config.ResourceUri.StudioApi.WorkflowVariables.replace("{id}", workflowId);
912
1097
  const url = this._httpHelper.getUrl(resourceUri);
@@ -916,14 +1101,15 @@ var WorkflowManager = class {
916
1101
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
917
1102
  }
918
1103
  /**
919
- * Triggers workflow
920
- * @param {string} workflowId
921
- * @param {number} workflowRevision
922
- * @param {string} objectId
923
- * @param {object[]} workflowVariables - workflow values to be submitted to the workflow
924
- * * @param {string} workflowVariables[].name = name of variable
925
- * * @param {*} workflowVariables[].value - value to be passed
926
- * * @param {number} workflowVariables[].dataType - Text: 1, Number: 2, Date: 3, Boolean: 4
1104
+ * Triggers a workflow run for a specific object.
1105
+ * @param {string} workflowId - The ID (Guid) of the workflow to trigger.
1106
+ * @param {number} workflowRevision - The revision number of the workflow to run.
1107
+ * @param {string} objectId - The ID (Guid) of the object to run the workflow against.
1108
+ * @param {object[]} workflowVariables - Workflow variable values to pass into the workflow.
1109
+ * @param {string} workflowVariables[].name - The name of the variable.
1110
+ * @param {*} workflowVariables[].value - The value to pass for the variable.
1111
+ * @param {number} workflowVariables[].dataType - The data type: Text: 1, Number: 2, Date: 3, Boolean: 4.
1112
+ * @returns {Promise<object>} The API response containing the triggered workflow instance details.
927
1113
  */
928
1114
  async triggerWorkflow(workflowId, workflowRevision, objectId, workflowVariables) {
929
1115
  const resourceUri = this._httpHelper._config.ResourceUri.StudioApi.WorkflowRun.replace("{id}", workflowId).replace("{revision}", workflowRevision);
@@ -941,10 +1127,10 @@ var WorkflowManager = class {
941
1127
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
942
1128
  }
943
1129
  /**
944
- * Terminates the workflow instance
945
- * @param {string} workflowId
946
- * @param {string} instanceId
947
- * @returns
1130
+ * Terminates a running workflow instance.
1131
+ * @param {string} workflowId - The ID (Guid) of the workflow containing the instance to terminate.
1132
+ * @param {string} instanceId - The ID (Guid) of the workflow instance to terminate.
1133
+ * @returns {Promise<object>} The API response confirming the workflow instance was terminated.
948
1134
  */
949
1135
  async terminateWorkflow(workflowId, instanceId) {
950
1136
  const resourceUri = this._httpHelper._config.ResourceUri.StudioApi.WorkflowTerminate.replace("{workflowId}", workflowId).replace("{instanceId}", instanceId);
@@ -955,11 +1141,11 @@ var WorkflowManager = class {
955
1141
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
956
1142
  }
957
1143
  /**
958
- * Returns workflow history for an object under the provided workflow
959
- * @param {string} workflowId
960
- * @param {string} objectId
961
- * @returns
962
- */
1144
+ * Returns the workflow execution history for an object under the provided workflow.
1145
+ * @param {string} objectId - The ID (Guid) of the object whose workflow history to retrieve.
1146
+ * @param {string} workflowId - The ID (Guid) of the workflow to query history for.
1147
+ * @returns {Promise<object>} The API response containing the workflow history entries for the object.
1148
+ */
963
1149
  async GetWorkflowHistoryForObject(objectId, workflowId) {
964
1150
  const resourceUri = this._httpHelper._config.ResourceUri.StudioApi.WorkflowHistoryObject.replace("{workflowId}", workflowId).replace("{objectId}", objectId);
965
1151
  const url = this._httpHelper.getUrl(resourceUri);
@@ -969,10 +1155,10 @@ var WorkflowManager = class {
969
1155
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
970
1156
  }
971
1157
  /**
972
- * Returns the running workflow, if any, for an object under the provided workflow
973
- * @param {string} workflowId
974
- * @param {string} objectId
975
- * @returns
1158
+ * Returns the currently running workflow instance, if any, for an object under the provided workflow.
1159
+ * @param {string} objectId - The ID (Guid) of the object to check for a running workflow.
1160
+ * @param {string} workflowId - The ID (Guid) of the workflow to query.
1161
+ * @returns {Promise<object>} The API response containing the running workflow instance, or empty if none is active.
976
1162
  */
977
1163
  async GetRunningWorkflowForObject(objectId, workflowId) {
978
1164
  const resourceUri = this._httpHelper._config.ResourceUri.StudioApi.WorkflowHistoryRunningObject.replace("{workflowId}", workflowId).replace("{objectId}", objectId);
@@ -988,12 +1174,16 @@ var workflowManager_default = WorkflowManager;
988
1174
  // lib/studioApi/rolesAndPermissionsManager.js
989
1175
  init_cjs_shims();
990
1176
  var RolesAndPermissionsManager = class {
1177
+ /**
1178
+ * @param {object} httpHelper - The HTTP helper instance used to make API requests.
1179
+ */
991
1180
  constructor(httpHelper) {
992
1181
  this._httpHelper = httpHelper;
993
1182
  }
994
1183
  /**
995
- * Retrieves available features for the requesting user
996
- * @param {object} params - Optional URL parameters to include in the request
1184
+ * Retrieves available features for the requesting user.
1185
+ * @param {object} [params] - Optional URL parameters to include in the request.
1186
+ * @returns {Promise<object>} The API response containing the list of features available to the user.
997
1187
  */
998
1188
  async getUserFeatures(params) {
999
1189
  var resourceUri = this._httpHelper._config.ResourceUri.StudioApi.ResourceUserFeatures;
@@ -1014,6 +1204,18 @@ var import_path4 = __toESM(require("path"), 1);
1014
1204
  var __filename5 = (0, import_url4.fileURLToPath)(importMetaUrl);
1015
1205
  var __dirname4 = import_path4.default.dirname(__filename5);
1016
1206
  var StudioApi = class {
1207
+ /** @type {boolean} */
1208
+ isEnabled;
1209
+ /** @type {string|null} */
1210
+ baseUrl;
1211
+ /** @type {WorkflowManager} */
1212
+ workflow;
1213
+ /** @type {RolesAndPermissionsManager} */
1214
+ permissions;
1215
+ /**
1216
+ * @param {object} sessionToken - JWT session token from authentication.
1217
+ * @param {object} studioApiConfig - StudioApi configuration object returned by the VV configuration endpoint.
1218
+ */
1017
1219
  constructor(sessionToken, studioApiConfig) {
1018
1220
  if (!sessionToken["tokenType"] && sessionToken["tokenType"] != "jwt") {
1019
1221
  return;
@@ -1036,9 +1238,17 @@ init_cjs_shims();
1036
1238
  // lib/notificationsApi/userNotificationsManager.js
1037
1239
  init_cjs_shims();
1038
1240
  var UserNotificationsManager = class {
1241
+ /**
1242
+ * @param {object} httpHelper - The HTTP helper instance used to make API requests.
1243
+ */
1039
1244
  constructor(httpHelper) {
1040
1245
  this._httpHelper = httpHelper;
1041
1246
  }
1247
+ /**
1248
+ * Forces a UI refresh notification for a specific user.
1249
+ * @param {string} userGuid - The ID (Guid) of the user whose UI should be refreshed.
1250
+ * @returns {Promise<object>} The API response confirming the refresh notification was sent.
1251
+ */
1042
1252
  async forceUIRefresh(userGuid) {
1043
1253
  const resourceUri = this._httpHelper._config.ResourceUri.NotificationsApi.ForceUIRefresh.replace("{id}", userGuid);
1044
1254
  const url = this._httpHelper.getUrl(resourceUri);
@@ -1058,6 +1268,16 @@ var import_path5 = __toESM(require("path"), 1);
1058
1268
  var __filename6 = (0, import_url5.fileURLToPath)(importMetaUrl);
1059
1269
  var __dirname5 = import_path5.default.dirname(__filename6);
1060
1270
  var NotificationsApi = class {
1271
+ /** @type {boolean} */
1272
+ isEnabled;
1273
+ /** @type {string|null} */
1274
+ baseUrl;
1275
+ /** @type {UserNotificationsManager} */
1276
+ users;
1277
+ /**
1278
+ * @param {object} sessionToken - JWT session token from authentication.
1279
+ * @param {object} notificationsApiConfig - NotificationsApi configuration object returned by the VV configuration endpoint.
1280
+ */
1061
1281
  constructor(sessionToken, notificationsApiConfig) {
1062
1282
  if (!sessionToken["tokenType"] && sessionToken["tokenType"] != "jwt") {
1063
1283
  return;
@@ -1133,9 +1353,16 @@ var Constants = class {
1133
1353
  // lib/vvRestApi/configurationManager.js
1134
1354
  init_cjs_shims();
1135
1355
  var ConfigurationManager = class {
1356
+ /**
1357
+ * @param {object} httpHelper - The HTTP helper instance used to make API requests.
1358
+ */
1136
1359
  constructor(httpHelper) {
1137
1360
  this._httpHelper = httpHelper;
1138
1361
  }
1362
+ /**
1363
+ * Retrieves the configuration settings for the DocApi service.
1364
+ * @returns {Promise<string>} JSON string containing the DocApi configuration.
1365
+ */
1139
1366
  getDocApiConfig() {
1140
1367
  const url = this._httpHelper.getUrl(this._httpHelper._config.ResourceUri.ConfigurationDocApi);
1141
1368
  const opts = { method: "GET" };
@@ -1143,6 +1370,10 @@ var ConfigurationManager = class {
1143
1370
  const data = {};
1144
1371
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1145
1372
  }
1373
+ /**
1374
+ * Retrieves the configuration settings for the FormsApi service.
1375
+ * @returns {Promise<string>} JSON string containing the FormsApi configuration.
1376
+ */
1146
1377
  getFormsApiConfig() {
1147
1378
  const url = this._httpHelper.getUrl(this._httpHelper._config.ResourceUri.ConfigurationFormsApi);
1148
1379
  const opts = { method: "GET" };
@@ -1150,6 +1381,10 @@ var ConfigurationManager = class {
1150
1381
  const data = {};
1151
1382
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1152
1383
  }
1384
+ /**
1385
+ * Retrieves the configuration settings for the ObjectsApi service.
1386
+ * @returns {Promise<string>} JSON string containing the ObjectsApi configuration.
1387
+ */
1153
1388
  getObjectsApiConfig() {
1154
1389
  const url = this._httpHelper.getUrl(this._httpHelper._config.ResourceUri.ConfigurationObjectsApi);
1155
1390
  const opts = { method: "GET" };
@@ -1157,6 +1392,10 @@ var ConfigurationManager = class {
1157
1392
  const data = {};
1158
1393
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1159
1394
  }
1395
+ /**
1396
+ * Retrieves the configuration settings for the StudioApi service.
1397
+ * @returns {Promise<string>} JSON string containing the StudioApi configuration.
1398
+ */
1160
1399
  getStudioApiConfig() {
1161
1400
  const url = this._httpHelper.getUrl(this._httpHelper._config.ResourceUri.ConfigurationStudioApi);
1162
1401
  const opts = { method: "GET" };
@@ -1164,6 +1403,10 @@ var ConfigurationManager = class {
1164
1403
  const data = {};
1165
1404
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1166
1405
  }
1406
+ /**
1407
+ * Retrieves the configuration settings for the NotificationsApi service.
1408
+ * @returns {Promise<string>} JSON string containing the NotificationsApi configuration.
1409
+ */
1167
1410
  getNotificationsApiConfig() {
1168
1411
  const url = this._httpHelper.getUrl(this._httpHelper._config.ResourceUri.ConfigurationNotificationApi);
1169
1412
  const opts = { method: "GET" };
@@ -1176,14 +1419,44 @@ var ConfigurationManager = class {
1176
1419
  // lib/vvRestApi/emailManager.js
1177
1420
  init_cjs_shims();
1178
1421
  var EmailManager = class {
1422
+ /**
1423
+ * @param {object} httpHelper - The HTTP helper instance used to make API requests.
1424
+ */
1179
1425
  constructor(httpHelper) {
1180
1426
  this._httpHelper = httpHelper;
1181
1427
  }
1428
+ /**
1429
+ * Sends one or more emails.
1430
+ * @param {object} params - URL parameters to include in the request.
1431
+ * @param {object} data - The email data to submit in the request body.
1432
+ * @param {string} data.recipients - The recipient email address(es).
1433
+ * @param {string} data.body - The email body content.
1434
+ * @param {string} [data.ccRecipients] - CC recipient email address(es).
1435
+ * @param {string} [data.bccRecipients] - BCC recipient email address(es).
1436
+ * @param {string} [data.subject] - The email subject line.
1437
+ * @param {boolean} [data.hasAttachments] - Whether the email includes document attachments.
1438
+ * @param {string|string[]} [data.documents] - One or more document IDs (Guids) to attach. Used when hasAttachments is true.
1439
+ * @returns {Promise<string>} The API response confirming the emails were sent.
1440
+ */
1182
1441
  postEmails(params, data) {
1183
1442
  const url = this._httpHelper.getUrl(this._httpHelper._config.ResourceUri.Emails);
1184
1443
  const opts = { method: "POST" };
1185
1444
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1186
1445
  }
1446
+ /**
1447
+ * Sends one or more emails with file attachments.
1448
+ * @param {object} params - URL parameters to include in the request.
1449
+ * @param {object} data - The email data to submit in the request body.
1450
+ * @param {string} data.recipients - The recipient email address(es).
1451
+ * @param {string} data.body - The email body content.
1452
+ * @param {string} [data.ccRecipients] - CC recipient email address(es).
1453
+ * @param {string} [data.bccRecipients] - BCC recipient email address(es).
1454
+ * @param {string} [data.subject] - The email subject line.
1455
+ * @param {boolean} [data.hasAttachments] - Whether the email includes document attachments.
1456
+ * @param {string|string[]} [data.documents] - One or more document IDs (Guids) to attach alongside the direct file uploads.
1457
+ * @param {object[]} fileObjs - Array of file objects to attach directly to the email.
1458
+ * @returns {Promise<string>} The API response confirming the emails were sent.
1459
+ */
1187
1460
  postEmailsWithAttachments(params, data, fileObjs) {
1188
1461
  const url = this._httpHelper.getUrl(this._httpHelper._config.ResourceUri.Emails);
1189
1462
  const opts = { method: "POSTSTREAM" };
@@ -1260,22 +1533,37 @@ var FormFieldCollection = class {
1260
1533
  };
1261
1534
  var FormsManager = class {
1262
1535
  /**
1263
- * @param {*} httpHelper - HTTP helper instance
1536
+ * @param {object} httpHelper - HTTP helper instance
1264
1537
  */
1265
1538
  constructor(httpHelper) {
1266
1539
  this._httpHelper = httpHelper;
1267
1540
  }
1541
+ /**
1542
+ * Creates a ReturnField instance representing a form field value or error.
1543
+ * @param {string} id - The field ID.
1544
+ * @param {string} name - The field name.
1545
+ * @param {*} value - The field value.
1546
+ * @param {boolean} isError - Whether the field has an error.
1547
+ * @param {string} errorMessage - The error message if isError is true.
1548
+ * @returns {ReturnField} A new ReturnField instance.
1549
+ */
1268
1550
  returnField(id, name, value, isError, errorMessage) {
1269
1551
  return new ReturnField(id, name, value, isError, errorMessage);
1270
1552
  }
1553
+ /**
1554
+ * Retrieves available form templates in the vault.
1555
+ * @param {object} params - Optional query parameters for filtering and pagination.
1556
+ * @returns {Promise<string>} The API response containing the form templates.
1557
+ */
1271
1558
  getFormTemplates(params) {
1272
1559
  const url = this._httpHelper.getUrl(this._httpHelper._config.ResourceUri.FormTemplates);
1273
1560
  const opts = { method: "GET" };
1274
1561
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1275
1562
  }
1276
1563
  /**
1277
- * @param {string} templateName
1278
- * @returns {Promise<{formsManager: FormsManager, templateIdGuid: string, templateRevisionIdGuid: string, error?: string}>}
1564
+ * Looks up the GUID and revision GUID for a form template by its display name.
1565
+ * @param {string} templateName - The display name of the form template.
1566
+ * @returns {Promise<{formsManager: FormsManager, templateIdGuid: string, templateRevisionIdGuid: string, error?: string}>} A promise that resolves with the template IDs, or an error property if the lookup fails.
1279
1567
  */
1280
1568
  async getFormTemplateIdByName(templateName) {
1281
1569
  const params = {
@@ -1308,6 +1596,12 @@ var FormsManager = class {
1308
1596
  };
1309
1597
  }
1310
1598
  }
1599
+ /**
1600
+ * Retrieves form instances for a given form template. Accepts either a template GUID or template name.
1601
+ * @param {object} params - Optional query parameters for filtering and pagination.
1602
+ * @param {string} formTemplateId - The form template GUID or display name.
1603
+ * @returns {Promise<string>} The API response containing the form instances.
1604
+ */
1311
1605
  async getForms(params, formTemplateId) {
1312
1606
  if (!this.isGuid(formTemplateId)) {
1313
1607
  const resp = await this.getFormTemplateIdByName(formTemplateId);
@@ -1323,6 +1617,13 @@ var FormsManager = class {
1323
1617
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1324
1618
  }
1325
1619
  }
1620
+ /**
1621
+ * Sets an image field on a form instance.
1622
+ * @param {string} formId - The ID of the form instance.
1623
+ * @param {string} fieldId - The ID of the image field to set.
1624
+ * @param {string} imageId - The ID of the image to assign to the field.
1625
+ * @returns {Promise<string>} The API response confirming the update.
1626
+ */
1326
1627
  setFieldImage(formId, fieldId, imageId) {
1327
1628
  const resourceUri = this._httpHelper._config.ResourceUri.FormInstanceImage.replace("{id}", formId);
1328
1629
  const url = this._httpHelper.getUrl(resourceUri);
@@ -1331,12 +1632,26 @@ var FormsManager = class {
1331
1632
  const opts = { method: "PUT" };
1332
1633
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1333
1634
  }
1635
+ /**
1636
+ * Imports a form template from a file stream.
1637
+ * @param {object} data - Multipart metadata sent alongside the file stream.
1638
+ * @param {string} formTemplateId - The ID of the form template to import into.
1639
+ * @param {Uint8Array} buffer - The file content of the form template to import.
1640
+ * @returns {Promise<string>} The API response confirming the import.
1641
+ */
1334
1642
  importFormTemplate(data, formTemplateId, buffer) {
1335
1643
  const resourceUri = this._httpHelper._config.ResourceUri.FormTemplatesImport.replace("{id}", formTemplateId);
1336
1644
  const url = this._httpHelper.getUrl(resourceUri);
1337
1645
  const opts = { method: "PUTSTREAM" };
1338
1646
  return this._httpHelper.doVvClientRequest(url, opts, null, data, buffer);
1339
1647
  }
1648
+ /**
1649
+ * Creates a new form instance for a given template. Accepts either a template GUID or template name.
1650
+ * @param {object} params - Optional query parameters.
1651
+ * @param {{[key: string]: string}} data - Form field key-value pairs where each key is a field name or Guid ID and each value is the field's string value.
1652
+ * @param {string} formTemplateId - The form template GUID or display name.
1653
+ * @returns {Promise<string>} The API response containing the created form instance.
1654
+ */
1340
1655
  async postForms(params, data, formTemplateId) {
1341
1656
  if (!this.isGuid(formTemplateId)) {
1342
1657
  const resp = await this.getFormTemplateIdByName(formTemplateId);
@@ -1352,6 +1667,14 @@ var FormsManager = class {
1352
1667
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1353
1668
  }
1354
1669
  }
1670
+ /**
1671
+ * Creates a new revision of an existing form instance. Accepts either a template GUID or template name.
1672
+ * @param {object} params - Optional query parameters.
1673
+ * @param {{[key: string]: string}} data - Form field key-value pairs where each key is a field name or Guid ID and each value is the field's string value.
1674
+ * @param {string} formTemplateId - The form template GUID or display name.
1675
+ * @param {string} formId - The ID of the existing form instance to revise.
1676
+ * @returns {Promise<string>} The API response containing the new form revision.
1677
+ */
1355
1678
  async postFormRevision(params, data, formTemplateId, formId) {
1356
1679
  if (!this.isGuid(formTemplateId)) {
1357
1680
  const resp = await this.getFormTemplateIdByName(formTemplateId);
@@ -1367,11 +1690,24 @@ var FormsManager = class {
1367
1690
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1368
1691
  }
1369
1692
  }
1693
+ /**
1694
+ * Creates a new revision of a form instance identified directly by its form ID.
1695
+ * @param {object} params - Optional query parameters.
1696
+ * @param {{[key: string]: string}} data - Form field key-value pairs where each key is a field name or Guid ID and each value is the field's string value.
1697
+ * @param {string} formId - The ID of the form instance to revise.
1698
+ * @returns {Promise<string>} The API response containing the new form revision.
1699
+ */
1370
1700
  postFormRevisionByFormId(params, data, formId) {
1371
1701
  const url = this._httpHelper.getUrl(this._httpHelper._config.ResourceUri.FormsId).replace("{id}", formId);
1372
1702
  const opts = { method: "POST" };
1373
1703
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1374
1704
  }
1705
+ /**
1706
+ * Updates the originator (owner) of a form instance.
1707
+ * @param {string} formInstanceId - The ID of the form instance to update.
1708
+ * @param {string} newOriginatorUsID - The user ID of the new originator.
1709
+ * @returns {Promise<string>} The API response confirming the update.
1710
+ */
1375
1711
  updateFormInstanceOriginator(formInstanceId, newOriginatorUsID) {
1376
1712
  const resourceUri = this._httpHelper._config.ResourceUri.FormInstanceUpdateOriginator.replace("{id}", formInstanceId);
1377
1713
  const url = this._httpHelper.getUrl(resourceUri);
@@ -1380,6 +1716,12 @@ var FormsManager = class {
1380
1716
  const opts = { method: "PUT" };
1381
1717
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1382
1718
  }
1719
+ /**
1720
+ * Relates a form instance to another form instance by form ID.
1721
+ * @param {string} formId - The ID of the source form instance.
1722
+ * @param {string} relateToId - The ID of the form instance to relate to.
1723
+ * @returns {Promise<string>} The API response confirming the relation.
1724
+ */
1383
1725
  relateForm(formId, relateToId) {
1384
1726
  const resourceUri = this._httpHelper._config.ResourceUri.FormInstance.replace("{id}", formId);
1385
1727
  const url = this._httpHelper.getUrl(resourceUri + "/relateForm");
@@ -1388,6 +1730,12 @@ var FormsManager = class {
1388
1730
  const opts = { method: "PUT" };
1389
1731
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1390
1732
  }
1733
+ /**
1734
+ * Relates a form instance to another form instance by document ID.
1735
+ * @param {string} formId - The ID of the source form instance.
1736
+ * @param {string} relateToDocId - The document ID of the form instance to relate to.
1737
+ * @returns {Promise<string>} The API response confirming the relation.
1738
+ */
1391
1739
  relateFormByDocId(formId, relateToDocId) {
1392
1740
  const resourceUri = this._httpHelper._config.ResourceUri.FormInstance.replace("{id}", formId);
1393
1741
  const url = this._httpHelper.getUrl(resourceUri + "/relateForm");
@@ -1396,6 +1744,12 @@ var FormsManager = class {
1396
1744
  const opts = { method: "PUT" };
1397
1745
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1398
1746
  }
1747
+ /**
1748
+ * Relates a form instance to a document by document revision ID.
1749
+ * @param {string} formId - The ID of the form instance.
1750
+ * @param {string} relateToId - The revision ID of the document to relate to.
1751
+ * @returns {Promise<string>} The API response confirming the relation.
1752
+ */
1399
1753
  relateDocument(formId, relateToId) {
1400
1754
  const resourceUri = this._httpHelper._config.ResourceUri.FormInstance.replace("{id}", formId);
1401
1755
  const url = this._httpHelper.getUrl(resourceUri + "/relateDocument");
@@ -1404,6 +1758,12 @@ var FormsManager = class {
1404
1758
  const opts = { method: "PUT" };
1405
1759
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1406
1760
  }
1761
+ /**
1762
+ * Relates a form instance to a document by document ID.
1763
+ * @param {string} formId - The ID of the form instance.
1764
+ * @param {string} relateToDocId - The document ID to relate to.
1765
+ * @returns {Promise<string>} The API response confirming the relation.
1766
+ */
1407
1767
  relateDocumentByDocId(formId, relateToDocId) {
1408
1768
  const resourceUri = this._httpHelper._config.ResourceUri.FormInstance.replace("{id}", formId);
1409
1769
  const url = this._httpHelper.getUrl(resourceUri + "/relateDocument");
@@ -1412,6 +1772,12 @@ var FormsManager = class {
1412
1772
  const opts = { method: "PUT" };
1413
1773
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1414
1774
  }
1775
+ /**
1776
+ * Relates a form instance to a project by project ID.
1777
+ * @param {string} formId - The ID of the form instance.
1778
+ * @param {string} relateToId - The ID of the project to relate to.
1779
+ * @returns {Promise<string>} The API response confirming the relation.
1780
+ */
1415
1781
  relateProject(formId, relateToId) {
1416
1782
  const resourceUri = this._httpHelper._config.ResourceUri.FormInstance.replace("{id}", formId);
1417
1783
  const url = this._httpHelper.getUrl(resourceUri + "/relateProject");
@@ -1420,6 +1786,12 @@ var FormsManager = class {
1420
1786
  const opts = { method: "PUT" };
1421
1787
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1422
1788
  }
1789
+ /**
1790
+ * Relates a form instance to a project by project name.
1791
+ * @param {string} formId - The ID of the form instance.
1792
+ * @param {string} relateToProjectName - The name of the project to relate to.
1793
+ * @returns {Promise<string>} The API response confirming the relation.
1794
+ */
1423
1795
  relateProjectByName(formId, relateToProjectName) {
1424
1796
  const resourceUri = this._httpHelper._config.ResourceUri.FormInstance.replace("{id}", formId);
1425
1797
  const url = this._httpHelper.getUrl(resourceUri + "/relateProject");
@@ -1428,6 +1800,12 @@ var FormsManager = class {
1428
1800
  const opts = { method: "PUT" };
1429
1801
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1430
1802
  }
1803
+ /**
1804
+ * Removes a relationship between two form instances by form ID.
1805
+ * @param {string} formId - The ID of the source form instance.
1806
+ * @param {string} relateToId - The ID of the related form instance to unrelate.
1807
+ * @returns {Promise<string>} The API response confirming the unrelation.
1808
+ */
1431
1809
  unrelateForm(formId, relateToId) {
1432
1810
  const resourceUri = this._httpHelper._config.ResourceUri.FormInstance.replace("{id}", formId);
1433
1811
  const url = this._httpHelper.getUrl(resourceUri + "/unrelateForm");
@@ -1436,6 +1814,12 @@ var FormsManager = class {
1436
1814
  const opts = { method: "PUT" };
1437
1815
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1438
1816
  }
1817
+ /**
1818
+ * Removes a relationship between two form instances by document ID.
1819
+ * @param {string} formId - The ID of the source form instance.
1820
+ * @param {string} relateToDocId - The document ID of the related form instance to unrelate.
1821
+ * @returns {Promise<string>} The API response confirming the unrelation.
1822
+ */
1439
1823
  unrelateFormByDocId(formId, relateToDocId) {
1440
1824
  const resourceUri = this._httpHelper._config.ResourceUri.FormInstance.replace("{id}", formId);
1441
1825
  const url = this._httpHelper.getUrl(resourceUri + "/unrelateForm");
@@ -1444,6 +1828,12 @@ var FormsManager = class {
1444
1828
  const opts = { method: "PUT" };
1445
1829
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1446
1830
  }
1831
+ /**
1832
+ * Removes a relationship between a form instance and a document by document revision ID.
1833
+ * @param {string} formId - The ID of the form instance.
1834
+ * @param {string} relateToId - The revision ID of the related document to unrelate.
1835
+ * @returns {Promise<string>} The API response confirming the unrelation.
1836
+ */
1447
1837
  unrelateDocument(formId, relateToId) {
1448
1838
  const resourceUri = this._httpHelper._config.ResourceUri.FormInstance.replace("{id}", formId);
1449
1839
  const url = this._httpHelper.getUrl(resourceUri + "/unrelateDocument");
@@ -1452,6 +1842,12 @@ var FormsManager = class {
1452
1842
  const opts = { method: "PUT" };
1453
1843
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1454
1844
  }
1845
+ /**
1846
+ * Removes a relationship between a form instance and a document by document ID.
1847
+ * @param {string} formId - The ID of the form instance.
1848
+ * @param {string} relateToDocId - The document ID of the related document to unrelate.
1849
+ * @returns {Promise<string>} The API response confirming the unrelation.
1850
+ */
1455
1851
  unrelateDocumentByDocId(formId, relateToDocId) {
1456
1852
  const resourceUri = this._httpHelper._config.ResourceUri.FormInstance.replace("{id}", formId);
1457
1853
  const url = this._httpHelper.getUrl(resourceUri + "/unrelateDocument");
@@ -1460,6 +1856,12 @@ var FormsManager = class {
1460
1856
  const opts = { method: "PUT" };
1461
1857
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1462
1858
  }
1859
+ /**
1860
+ * Removes a relationship between a form instance and a project by project ID.
1861
+ * @param {string} formId - The ID of the form instance.
1862
+ * @param {string} relateToId - The ID of the related project to unrelate.
1863
+ * @returns {Promise<string>} The API response confirming the unrelation.
1864
+ */
1463
1865
  unrelateProject(formId, relateToId) {
1464
1866
  const resourceUri = this._httpHelper._config.ResourceUri.FormInstance.replace("{id}", formId);
1465
1867
  const url = this._httpHelper.getUrl(resourceUri + "/unrelateProject");
@@ -1468,6 +1870,12 @@ var FormsManager = class {
1468
1870
  const opts = { method: "PUT" };
1469
1871
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1470
1872
  }
1873
+ /**
1874
+ * Removes a relationship between a form instance and a project by project name.
1875
+ * @param {string} formId - The ID of the form instance.
1876
+ * @param {string} relateToProjectName - The name of the related project to unrelate.
1877
+ * @returns {Promise<string>} The API response confirming the unrelation.
1878
+ */
1471
1879
  unrelateProjectByName(formId, relateToProjectName) {
1472
1880
  const resourceUri = this._httpHelper._config.ResourceUri.FormInstance.replace("{id}", formId);
1473
1881
  const url = this._httpHelper.getUrl(resourceUri + "/unrelateProject");
@@ -1476,6 +1884,12 @@ var FormsManager = class {
1476
1884
  const opts = { method: "PUT" };
1477
1885
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1478
1886
  }
1887
+ /**
1888
+ * Retrieves documents related to a form instance.
1889
+ * @param {string} formId - The ID of the form instance.
1890
+ * @param {object} [params] - Optional query parameters for filtering and pagination.
1891
+ * @returns {Promise<string>} The API response containing the related documents.
1892
+ */
1479
1893
  getFormRelatedDocs(formId, params) {
1480
1894
  const resourceUri = this._httpHelper._config.ResourceUri.FormInstanceRelatedDocs.replace("{id}", formId);
1481
1895
  const url = this._httpHelper.getUrl(resourceUri);
@@ -1485,6 +1899,12 @@ var FormsManager = class {
1485
1899
  }
1486
1900
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1487
1901
  }
1902
+ /**
1903
+ * Retrieves form instances related to a given form instance.
1904
+ * @param {string} formId - The ID of the form instance.
1905
+ * @param {object} [params] - Optional query parameters for filtering and pagination.
1906
+ * @returns {Promise<string>} The API response containing the related form instances.
1907
+ */
1488
1908
  getFormRelatedForms(formId, params) {
1489
1909
  const resourceUri = this._httpHelper._config.ResourceUri.FormInstanceRelatedForms.replace("{id}", formId);
1490
1910
  const url = this._httpHelper.getUrl(resourceUri);
@@ -1494,6 +1914,11 @@ var FormsManager = class {
1494
1914
  }
1495
1915
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1496
1916
  }
1917
+ /**
1918
+ * Tests whether a string is a valid GUID.
1919
+ * @param {string} stringToTest - The string to test.
1920
+ * @returns {boolean} True if the string is a valid GUID, false otherwise.
1921
+ */
1497
1922
  isGuid(stringToTest) {
1498
1923
  let testString = stringToTest;
1499
1924
  if (testString[0] === "{") {
@@ -1502,30 +1927,57 @@ var FormsManager = class {
1502
1927
  const regexGuid = /^(\{){0,1}[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}(\}){0,1}$/gi;
1503
1928
  return regexGuid.test(testString);
1504
1929
  }
1930
+ /**
1931
+ * Retrieves a specific form instance by template ID and instance ID.
1932
+ * @param {string} templateId - The ID of the form template.
1933
+ * @param {string} instanceId - The ID of the form instance.
1934
+ * @returns {Promise<string>} The API response containing the form instance.
1935
+ */
1505
1936
  getFormInstanceById(templateId, instanceId) {
1506
1937
  const resourceUri = this._httpHelper._config.ResourceUri.FormId.replace("{id}", templateId).replace("{formId}", instanceId);
1507
1938
  const url = this._httpHelper.getUrl(resourceUri);
1508
1939
  const opts = { method: "GET" };
1509
1940
  return this._httpHelper.doVvClientRequest(url, opts, null, null);
1510
1941
  }
1942
+ /**
1943
+ * Retrieves a form instance as a PDF stream.
1944
+ * @param {string} templateId - The ID of the form template.
1945
+ * @param {string} instanceId - The ID of the form instance.
1946
+ * @returns {Promise<string>} The API response containing the PDF content stream.
1947
+ */
1511
1948
  getFormInstancePDF(templateId, instanceId) {
1512
1949
  const resourceUri = this._httpHelper._config.ResourceUri.FormIdPdf.replace("{id}", templateId).replace("{formId}", instanceId);
1513
1950
  const url = this._httpHelper.getUrl(resourceUri);
1514
1951
  const opts = { method: "GETSTREAM" };
1515
1952
  return this._httpHelper.doVvClientRequest(url, opts, null, null);
1516
1953
  }
1954
+ /**
1955
+ * Retrieves the field definitions for a form template.
1956
+ * @param {string} templateId - The ID of the form template.
1957
+ * @returns {Promise<string>} The API response containing the template's field definitions.
1958
+ */
1517
1959
  getFormTemplateFields(templateId) {
1518
1960
  const resourceUri = this._httpHelper._config.ResourceUri.FormDesignerFormsTemplatesIdFields.replace("{id}", templateId);
1519
1961
  const url = this._httpHelper.getUrl(resourceUri);
1520
1962
  const opts = { method: "GET" };
1521
1963
  return this._httpHelper.doVvClientRequest(url, opts, null, null);
1522
1964
  }
1965
+ /**
1966
+ * Deletes a form instance.
1967
+ * @param {string} instanceId - The ID of the form instance to delete.
1968
+ * @returns {Promise<string>} The API response confirming the deletion.
1969
+ */
1523
1970
  deleteFormInstance(instanceId) {
1524
1971
  const resourceUri = this._httpHelper._config.ResourceUri.FormInstance.replace("{id}", instanceId);
1525
1972
  const url = this._httpHelper.getUrl(resourceUri);
1526
1973
  const opts = { method: "DELETE" };
1527
1974
  return this._httpHelper.doVvClientRequest(url, opts, null, null);
1528
1975
  }
1976
+ /**
1977
+ * Releases a form template.
1978
+ * @param {string} formTemplateId - The ID of the form template to release.
1979
+ * @returns {Promise<string>} The API response confirming the release.
1980
+ */
1529
1981
  releaseFormTemplate(formTemplateId) {
1530
1982
  const resourceUri = this._httpHelper._config.ResourceUri.FormTemplatesRelease.replace("{id}", formTemplateId);
1531
1983
  const url = this._httpHelper.getUrl(resourceUri);
@@ -1537,57 +1989,117 @@ var FormsManager = class {
1537
1989
  // lib/vvRestApi/groupsManager.js
1538
1990
  init_cjs_shims();
1539
1991
  var GroupsManager = class {
1992
+ /**
1993
+ * @param {object} httpHelper - The HTTP helper instance used to make API requests.
1994
+ */
1540
1995
  constructor(httpHelper) {
1541
1996
  this._httpHelper = httpHelper;
1542
1997
  }
1998
+ /**
1999
+ * Retrieves a list of groups.
2000
+ * @param {object} params - URL parameters to include in the request.
2001
+ * @returns {Promise<string>} JSON string containing the list of groups.
2002
+ */
1543
2003
  getGroups(params) {
1544
2004
  const resourceUri = this._httpHelper._config.ResourceUri.GetGroups;
1545
2005
  const url = this._httpHelper.getUrl(resourceUri);
1546
2006
  const opts = { method: "GET" };
1547
2007
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1548
2008
  }
2009
+ /**
2010
+ * Retrieves a specific group by its ID.
2011
+ * @param {object} params - URL parameters to include in the request.
2012
+ * @param {string} groupId - The ID (Guid) of the group to retrieve.
2013
+ * @returns {Promise<string>} JSON string containing the group details.
2014
+ */
1549
2015
  getGroupById(params, groupId) {
1550
2016
  const resourceUri = this._httpHelper._config.ResourceUri.GroupById.replace("{id}", groupId);
1551
2017
  const url = this._httpHelper.getUrl(resourceUri);
1552
2018
  const opts = { method: "GET" };
1553
2019
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1554
2020
  }
2021
+ /**
2022
+ * Creates a new group.
2023
+ * @param {object} params - URL parameters to include in the request.
2024
+ * @param {object} formData - The group data to submit in the request body.
2025
+ * @returns {Promise<string>} JSON string containing the created group details.
2026
+ */
1555
2027
  addGroup(params, formData) {
1556
2028
  const resourceUri = this._httpHelper._config.ResourceUri.AddGroup;
1557
2029
  const url = this._httpHelper.getUrl(resourceUri);
1558
2030
  const opts = { method: "POST" };
1559
2031
  return this._httpHelper.doVvClientRequest(url, opts, params, formData);
1560
2032
  }
2033
+ /**
2034
+ * Updates an existing group by its ID.
2035
+ * @param {object} params - URL parameters to include in the request.
2036
+ * @param {string} groupId - The ID (Guid) of the group to update.
2037
+ * @param {object} formData - The updated group data to submit in the request body.
2038
+ * @returns {Promise<string>} JSON string confirming the group was updated.
2039
+ */
1561
2040
  updateGroup(params, groupId, formData) {
1562
2041
  const resourceUri = this._httpHelper._config.ResourceUri.UpdateGroup.replace("{id}", groupId);
1563
2042
  const url = this._httpHelper.getUrl(resourceUri);
1564
2043
  const opts = { method: "PUT" };
1565
2044
  return this._httpHelper.doVvClientRequest(url, opts, params, formData);
1566
2045
  }
2046
+ /**
2047
+ * Deletes a group by its ID.
2048
+ * @param {object} params - URL parameters to include in the request.
2049
+ * @param {string} groupId - The ID (Guid) of the group to delete.
2050
+ * @returns {Promise<string>} JSON string confirming the group was deleted.
2051
+ */
1567
2052
  deleteGroup(params, groupId) {
1568
2053
  const resourceUri = this._httpHelper._config.ResourceUri.DeleteGroup.replace("{id}", groupId);
1569
2054
  const url = this._httpHelper.getUrl(resourceUri);
1570
2055
  const opts = { method: "DELETE" };
1571
2056
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1572
2057
  }
2058
+ /**
2059
+ * Retrieves all users belonging to a specific group.
2060
+ * @param {object} params - URL parameters to include in the request.
2061
+ * @param {string} groupId - The ID (Guid) of the group whose users to retrieve.
2062
+ * @returns {Promise<string>} JSON string containing the list of users in the group.
2063
+ */
1573
2064
  getGroupsUsers(params, groupId) {
1574
2065
  const resourceUri = this._httpHelper._config.ResourceUri.GroupsUsers.replace("{id}", groupId);
1575
2066
  const url = this._httpHelper.getUrl(resourceUri);
1576
2067
  const opts = { method: "GET" };
1577
2068
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1578
2069
  }
2070
+ /**
2071
+ * Retrieves a specific user within a group.
2072
+ * @param {object} params - URL parameters to include in the request.
2073
+ * @param {string} groupId - The ID (Guid) of the group to look up the user in.
2074
+ * @param {string} userId - The ID (Guid) of the user to retrieve.
2075
+ * @returns {Promise<string>} JSON string containing the user's membership details within the group.
2076
+ */
1579
2077
  getGroupUser(params, groupId, userId) {
1580
2078
  const resourceUri = this._httpHelper._config.ResourceUri.GroupsAddUser.replace("{groupId}", groupId).replace("{userId}", userId);
1581
2079
  const url = this._httpHelper.getUrl(resourceUri);
1582
2080
  const opts = { method: "GET" };
1583
2081
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1584
2082
  }
2083
+ /**
2084
+ * Adds a user to a group.
2085
+ * @param {object} params - URL parameters to include in the request.
2086
+ * @param {string} groupId - The ID (Guid) of the group to add the user to.
2087
+ * @param {string} userId - The ID (Guid) of the user to add to the group.
2088
+ * @returns {Promise<string>} JSON string confirming the user was added to the group.
2089
+ */
1585
2090
  addUserToGroup(params, groupId, userId) {
1586
2091
  const resourceUri = this._httpHelper._config.ResourceUri.GroupsAddUser.replace("{groupId}", groupId).replace("{userId}", userId);
1587
2092
  const url = this._httpHelper.getUrl(resourceUri);
1588
2093
  const opts = { method: "PUT" };
1589
2094
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1590
2095
  }
2096
+ /**
2097
+ * Removes a user from a group.
2098
+ * @param {object} params - URL parameters to include in the request.
2099
+ * @param {string} groupId - The ID (Guid) of the group to remove the user from.
2100
+ * @param {string} userId - The ID (Guid) of the user to remove from the group.
2101
+ * @returns {Promise<string>} JSON string confirming the user was removed from the group.
2102
+ */
1591
2103
  removeUserFromGroup(params, groupId, userId) {
1592
2104
  const resourceUri = this._httpHelper._config.ResourceUri.GroupsAddUser.replace("{groupId}", groupId).replace("{userId}", userId);
1593
2105
  const url = this._httpHelper.getUrl(resourceUri);
@@ -1599,53 +2111,136 @@ var GroupsManager = class {
1599
2111
  // lib/vvRestApi/libraryManager.js
1600
2112
  init_cjs_shims();
1601
2113
  var LibraryManager = class {
2114
+ /**
2115
+ * @param {object} httpHelper - HTTP helper instance
2116
+ */
1602
2117
  constructor(httpHelper) {
1603
2118
  this._httpHelper = httpHelper;
1604
2119
  }
2120
+ /**
2121
+ * Retrieves all folders.
2122
+ * @param {object} params - Optional query parameters for filtering and pagination.
2123
+ * @returns {Promise<string>} The API response containing the list of folders.
2124
+ */
1605
2125
  getFolders(params) {
1606
2126
  const url = this._httpHelper.getUrl(this._httpHelper._config.ResourceUri.Folders);
1607
2127
  const opts = { method: "GET" };
1608
2128
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1609
2129
  }
2130
+ /**
2131
+ * Creates a new folder at the specified path.
2132
+ * @param {object} params - Optional query parameters.
2133
+ * @param {object} data - Folder properties to create.
2134
+ * @param {string} [data.name] - Folder name; if omitted, derived from the last segment of folderPath.
2135
+ * @param {string} [data.description] - Folder description.
2136
+ * @param {boolean} [data.allowRevisions] - Whether documents in this folder allow revisions.
2137
+ * @param {string} [data.formUploadControlId] - Guid of the form upload control to associate.
2138
+ * @param {string} [data.formId] - Guid of the form to associate with the folder.
2139
+ * @param {boolean} [data.inheritNamingConvention] - Whether to inherit the naming convention from the parent folder.
2140
+ * @param {boolean} [data.inheritRecordRetention] - Whether to inherit record retention settings from the parent folder.
2141
+ * @param {string} [data.defaultDocType] - Default document type for the folder.
2142
+ * @param {boolean} [data.docTypeRequired] - Whether a document type is required when uploading.
2143
+ * @param {string} folderPath - The full path where the folder should be created.
2144
+ * @returns {Promise<string>} The API response containing the created folder.
2145
+ */
1610
2146
  postFolderByPath(params, data, folderPath) {
1611
2147
  const url = this._httpHelper.getUrl(this._httpHelper._config.ResourceUri.Folders);
1612
2148
  data.folderpath = folderPath;
1613
2149
  const opts = { method: "POST" };
1614
2150
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1615
2151
  }
1616
- // Valid fields to be defined on the "data" parameter to be updated on the folder: name, description
2152
+ /**
2153
+ * Updates a folder's properties.
2154
+ * @param {object} params - Optional query parameters.
2155
+ * @param {object} data - Folder properties to update.
2156
+ * @param {string} [data.name] - New folder name.
2157
+ * @param {string} [data.description] - New folder description.
2158
+ * @param {string} [data.defaultDocType] - Default document type for the folder.
2159
+ * @param {boolean} [data.docTypeRequired] - Whether a document type is required when uploading.
2160
+ * @param {string} folderId - The ID of the folder to update.
2161
+ * @returns {Promise<string>} The API response containing the updated folder.
2162
+ */
1617
2163
  putFolder(params, data, folderId) {
1618
2164
  const url = this._httpHelper.getUrl(this._httpHelper._config.ResourceUri.FoldersId.replace("{id}", folderId));
1619
2165
  const opts = { method: "PUT" };
1620
2166
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1621
2167
  }
2168
+ /**
2169
+ * Deletes a folder.
2170
+ * @param {string} folderId - The ID of the folder to delete.
2171
+ * @returns {Promise<string>} The API response confirming the deletion.
2172
+ */
1622
2173
  deleteFolder(folderId) {
1623
2174
  const url = this._httpHelper.getUrl(this._httpHelper._config.ResourceUri.FoldersId.replace("{id}", folderId));
1624
2175
  const opts = { method: "DELETE" };
1625
2176
  return this._httpHelper.doVvClientRequest(url, opts, null, null);
1626
2177
  }
2178
+ /**
2179
+ * Copies a folder to a new location.
2180
+ * @param {object} params - Optional query parameters.
2181
+ * @param {object} data - Copy options.
2182
+ * @param {string} [data.sourceFolderId] - Guid of the folder to copy; use instead of sourceFolderPath.
2183
+ * @param {string} [data.sourceFolderPath] - Full path of the folder to copy; use instead of sourceFolderId.
2184
+ * @param {string} [data.targetFolderId] - Guid of the destination folder; use instead of targetFolderPath.
2185
+ * @param {string} [data.targetFolderPath] - Full path of the destination folder; use instead of targetFolderId.
2186
+ * @returns {Promise<string>} The API response confirming the copy operation.
2187
+ */
1627
2188
  copyFolder(params, data) {
1628
2189
  const url = this._httpHelper.getUrl(this._httpHelper._config.ResourceUri.FoldersCopy);
1629
2190
  const opts = { method: "POST" };
1630
2191
  return this._httpHelper.doVvClientRequest(url, opts, null, data);
1631
2192
  }
2193
+ /**
2194
+ * Moves a folder to a new location.
2195
+ * @param {object} params - Optional query parameters.
2196
+ * @param {object} data - Move options.
2197
+ * @param {string} [data.sourceFolderId] - Guid of the folder to move; use instead of sourceFolderPath.
2198
+ * @param {string} [data.sourceFolderPath] - Full path of the folder to move; use instead of sourceFolderId.
2199
+ * @param {string} [data.targetFolderId] - Guid of the destination folder; use instead of targetFolderPath.
2200
+ * @param {string} [data.targetFolderPath] - Full path of the destination folder; use instead of targetFolderId.
2201
+ * @returns {Promise<string>} The API response confirming the move operation.
2202
+ */
1632
2203
  moveFolder(params, data) {
1633
2204
  const url = this._httpHelper.getUrl(this._httpHelper._config.ResourceUri.FoldersMove);
1634
2205
  const opts = { method: "PUT" };
1635
2206
  return this._httpHelper.doVvClientRequest(url, opts, null, data);
1636
2207
  }
2208
+ /**
2209
+ * Retrieves documents within a specific folder.
2210
+ * @param {object} params - Optional query parameters for filtering and pagination.
2211
+ * @param {string} folderId - The ID of the folder to retrieve documents from.
2212
+ * @returns {Promise<string>} The API response containing the folder's documents.
2213
+ */
1637
2214
  getDocuments(params, folderId) {
1638
2215
  const resourceUri = this._httpHelper._config.ResourceUri.Documents.replace("{id}", folderId);
1639
2216
  const url = this._httpHelper.getUrl(resourceUri);
1640
2217
  const opts = { method: "GET" };
1641
2218
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1642
2219
  }
2220
+ /**
2221
+ * Retrieves a folder by its full path.
2222
+ * @param {object} params - Optional query parameters.
2223
+ * @param {string} folderPath - The full path of the folder to retrieve.
2224
+ * @returns {Promise<string>} The API response containing the folder.
2225
+ */
1643
2226
  getFolderByPath(params, folderPath) {
1644
2227
  const resourceUri = this._httpHelper._config.ResourceUri.Folders + "?folderpath=" + encodeURIComponent(folderPath);
1645
2228
  const url = this._httpHelper.getUrl(resourceUri);
1646
2229
  const opts = { method: "GET" };
1647
2230
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1648
2231
  }
2232
+ /**
2233
+ * Updates the index field override settings for a folder (query, dropdown list, required, default value).
2234
+ * @param {string} folderId - The ID of the folder.
2235
+ * @param {string} fieldId - The ID of the index field to configure.
2236
+ * @param {string} queryId - The ID of the query to use for the field's dropdown.
2237
+ * @param {string} displayField - The query field to display in the dropdown.
2238
+ * @param {string} valueField - The query field to use as the stored value.
2239
+ * @param {string} dropDownListId - The ID of a static dropdown list, if used instead of a query.
2240
+ * @param {boolean} required - Whether the field is required.
2241
+ * @param {string} defaultValue - The default value for the field.
2242
+ * @returns {Promise<string>} The API response confirming the update.
2243
+ */
1649
2244
  updateFolderIndexFieldOverrideSettings(folderId, fieldId, queryId, displayField, valueField, dropDownListId, required, defaultValue) {
1650
2245
  const data = {
1651
2246
  queryId,
@@ -1660,12 +2255,25 @@ var LibraryManager = class {
1660
2255
  const opts = { method: "PUT" };
1661
2256
  return this._httpHelper.doVvClientRequest(url, opts, null, data);
1662
2257
  }
2258
+ /**
2259
+ * Retrieves the index fields associated with a folder.
2260
+ * @param {object} params - Optional query parameters for filtering.
2261
+ * @param {string} folderId - The ID of the folder.
2262
+ * @returns {Promise<string>} The API response containing the folder's index fields.
2263
+ */
1663
2264
  getFolderIndexFields(params, folderId) {
1664
2265
  const resourceUri = this._httpHelper._config.ResourceUri.FolderIndexFields.replace("{id}", folderId);
1665
2266
  const url = this._httpHelper.getUrl(resourceUri);
1666
2267
  const opts = { method: "GET" };
1667
2268
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1668
2269
  }
2270
+ /**
2271
+ * Subscribes a user to alert notifications for a specific folder event.
2272
+ * @param {string} folderId - The ID of the folder to subscribe to.
2273
+ * @param {string} eventId - The ID of the event to subscribe to.
2274
+ * @param {string} userId - The ID of the user to subscribe.
2275
+ * @returns {Promise<string>} The API response confirming the subscription.
2276
+ */
1669
2277
  postFolderAlertSubscription(folderId, eventId, userId) {
1670
2278
  const resourceUri = this._httpHelper._config.ResourceUri.FolderAlertsId.replace("{folderId}", folderId).replace("{eventId}", eventId);
1671
2279
  const url = this._httpHelper.getUrl(resourceUri);
@@ -1675,6 +2283,13 @@ var LibraryManager = class {
1675
2283
  };
1676
2284
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1677
2285
  }
2286
+ /**
2287
+ * Removes a user's subscription to alert notifications for a specific folder event.
2288
+ * @param {string} folderId - The ID of the folder.
2289
+ * @param {string} eventId - The ID of the event to unsubscribe from.
2290
+ * @param {string} userId - The ID of the user to unsubscribe.
2291
+ * @returns {Promise<string>} The API response confirming the unsubscription.
2292
+ */
1678
2293
  deleteFolderAlertSubscription(folderId, eventId, userId) {
1679
2294
  const resourceUri = this._httpHelper._config.ResourceUri.FolderAlertsId.replace("{folderId}", folderId).replace("{eventId}", eventId);
1680
2295
  const url = this._httpHelper.getUrl(resourceUri);
@@ -1684,12 +2299,27 @@ var LibraryManager = class {
1684
2299
  };
1685
2300
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1686
2301
  }
2302
+ /**
2303
+ * Retrieves the security members (users and groups) assigned to a folder.
2304
+ * @param {object} params - Optional query parameters for filtering.
2305
+ * @param {string} folderId - The ID of the folder.
2306
+ * @returns {Promise<string>} The API response containing the folder's security members.
2307
+ */
1687
2308
  getFolderSecurityMembers(params, folderId) {
1688
2309
  const resourceUri = this._httpHelper._config.ResourceUri.FolderSecurity.replace("{folderId}", folderId);
1689
2310
  const url = this._httpHelper.getUrl(resourceUri);
1690
2311
  const opts = { method: "GET" };
1691
2312
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1692
2313
  }
2314
+ /**
2315
+ * Adds or updates a security member's role on a folder.
2316
+ * @param {string} folderId - The ID of the folder.
2317
+ * @param {string} memberId - The ID of the user or group.
2318
+ * @param {"user"|"group"} memberType - The type of member.
2319
+ * @param {string} securityRole - The security role to assign (e.g., `editor`, `viewer`).
2320
+ * @param {boolean} cascadeSecurityChanges - Whether to apply the change to all subfolders.
2321
+ * @returns {Promise<string>} The API response confirming the update.
2322
+ */
1693
2323
  putFolderSecurityMember(folderId, memberId, memberType, securityRole, cascadeSecurityChanges) {
1694
2324
  const resourceUri = this._httpHelper._config.ResourceUri.FolderSecurityId.replace("{folderId}", folderId).replace("{memberId}", memberId);
1695
2325
  const url = this._httpHelper.getUrl(resourceUri);
@@ -1701,6 +2331,13 @@ var LibraryManager = class {
1701
2331
  };
1702
2332
  return this._httpHelper.doVvClientRequest(url, opts, null, data);
1703
2333
  }
2334
+ /**
2335
+ * Removes a security member from a folder.
2336
+ * @param {string} folderId - The ID of the folder.
2337
+ * @param {string} memberId - The ID of the user or group to remove.
2338
+ * @param {boolean} cascadeSecurityChanges - Whether to remove the member from all subfolders.
2339
+ * @returns {Promise<string>} The API response confirming the deletion.
2340
+ */
1704
2341
  deleteFolderSecurityMember(folderId, memberId, cascadeSecurityChanges) {
1705
2342
  const resourceUri = this._httpHelper._config.ResourceUri.FolderSecurityId.replace("{folderId}", folderId).replace("{memberId}", memberId);
1706
2343
  const url = this._httpHelper.getUrl(resourceUri);
@@ -1715,44 +2352,101 @@ var LibraryManager = class {
1715
2352
  // lib/vvRestApi/sitesManager.js
1716
2353
  init_cjs_shims();
1717
2354
  var SitesManager = class {
2355
+ /**
2356
+ * @param {object} httpHelper - HTTP helper instance
2357
+ */
1718
2358
  constructor(httpHelper) {
1719
2359
  this._httpHelper = httpHelper;
1720
2360
  }
2361
+ /**
2362
+ * Retrieves all sites.
2363
+ * @param {object} params - Optional query parameters for filtering and pagination.
2364
+ * @returns {Promise<string>} The API response containing the list of sites.
2365
+ */
1721
2366
  getSites(params) {
1722
2367
  const url = this._httpHelper.getUrl(this._httpHelper._config.ResourceUri.Sites);
1723
2368
  const opts = { method: "GET" };
1724
2369
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1725
2370
  }
2371
+ /**
2372
+ * Creates a new site.
2373
+ * @param {object} params - Optional query parameters.
2374
+ * @param {object} data - Site properties to create.
2375
+ * @param {string} data.name - Site name (required).
2376
+ * @param {string} [data.description] - Site description.
2377
+ * @param {string} [data.sitetype] - Site type identifier.
2378
+ * @returns {Promise<string>} The API response containing the created site.
2379
+ */
1726
2380
  postSites(params, data) {
1727
2381
  const resourceUri = this._httpHelper._config.ResourceUri.Sites;
1728
2382
  const url = this._httpHelper.getUrl(resourceUri);
1729
2383
  const opts = { method: "POST" };
1730
2384
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1731
2385
  }
2386
+ /**
2387
+ * Updates an existing site.
2388
+ * @param {object} params - Optional query parameters.
2389
+ * @param {object} data - Site properties to update.
2390
+ * @param {string} [data.name] - New site name.
2391
+ * @param {string} [data.description] - New site description.
2392
+ * @param {string} siteId - The ID of the site to update.
2393
+ * @returns {Promise<string>} The API response containing the updated site.
2394
+ */
1732
2395
  putSites(params, data, siteId) {
1733
2396
  const resourceUri = this._httpHelper._config.ResourceUri.SiteById.replace("{id}", siteId);
1734
2397
  const url = this._httpHelper.getUrl(resourceUri);
1735
2398
  const opts = { method: "PUT" };
1736
2399
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1737
2400
  }
2401
+ /**
2402
+ * Retrieves all groups belonging to a site.
2403
+ * @param {object} params - Optional query parameters for filtering and pagination.
2404
+ * @param {string} siteId - The ID of the site.
2405
+ * @returns {Promise<string>} The API response containing the site's groups.
2406
+ */
1738
2407
  getGroups(params, siteId) {
1739
2408
  const resourceUri = this._httpHelper._config.ResourceUri.Groups.replace("{id}", siteId);
1740
2409
  const url = this._httpHelper.getUrl(resourceUri);
1741
2410
  const opts = { method: "GET" };
1742
2411
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1743
2412
  }
2413
+ /**
2414
+ * Creates a new group within a site.
2415
+ * @param {object} params - Optional query parameters.
2416
+ * @param {object} data - Group properties to create.
2417
+ * @param {string} data.name - Group name (required).
2418
+ * @param {string} [data.description] - Group description; defaults to name if omitted.
2419
+ * @param {string} siteId - The ID of the site to create the group in.
2420
+ * @returns {Promise<string>} The API response containing the created group.
2421
+ */
1744
2422
  postGroups(params, data, siteId) {
1745
2423
  const resourceUri = this._httpHelper._config.ResourceUri.Groups.replace("{id}", siteId);
1746
2424
  const url = this._httpHelper.getUrl(resourceUri);
1747
2425
  const opts = { method: "POST" };
1748
2426
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1749
2427
  }
2428
+ /**
2429
+ * Updates a group within a site.
2430
+ * @param {object} params - Optional query parameters.
2431
+ * @param {object} data - Group properties to update.
2432
+ * @param {string} [data.name] - New group name.
2433
+ * @param {string} [data.description] - New group description.
2434
+ * @param {string} siteId - The ID of the site the group belongs to.
2435
+ * @param {string} grId - The ID of the group to update.
2436
+ * @returns {Promise<string>} The API response containing the updated group.
2437
+ */
1750
2438
  putGroups(params, data, siteId, grId) {
1751
2439
  const resourceUri = this._httpHelper._config.ResourceUri.SiteGroupById.replace("{siteId}", siteId).replace("{groupId}", grId);
1752
2440
  const url = this._httpHelper.getUrl(resourceUri);
1753
2441
  const opts = { method: "PUT" };
1754
2442
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1755
2443
  }
2444
+ /**
2445
+ * Moves a user to a different site.
2446
+ * @param {string} userId - The ID of the user to move.
2447
+ * @param {string} newSiteId - The ID of the destination site.
2448
+ * @returns {Promise<string>} The API response confirming the site change.
2449
+ */
1756
2450
  changeUserSite(userId, newSiteId) {
1757
2451
  const resourceUri = this._httpHelper._config.ResourceUri.ChangeUserSite;
1758
2452
  const url = this._httpHelper.getUrl(resourceUri);
@@ -1763,18 +2457,37 @@ var SitesManager = class {
1763
2457
  };
1764
2458
  return this._httpHelper.doVvClientRequest(url, opts, null, data);
1765
2459
  }
2460
+ /**
2461
+ * Retrieves a specific site by its ID.
2462
+ * @param {object} params - Optional query parameters.
2463
+ * @param {string} siteId - The ID of the site to retrieve.
2464
+ * @returns {Promise<string>} The API response containing the site.
2465
+ */
1766
2466
  getSiteById(params, siteId) {
1767
2467
  const resourceUri = this._httpHelper._config.ResourceUri.SiteById.replace("{id}", siteId);
1768
2468
  const url = this._httpHelper.getUrl(resourceUri);
1769
2469
  const opts = { method: "GET" };
1770
2470
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1771
2471
  }
2472
+ /**
2473
+ * Deletes a site.
2474
+ * @param {object} params - Optional query parameters.
2475
+ * @param {string} siteId - The ID of the site to delete.
2476
+ * @returns {Promise<string>} The API response confirming the deletion.
2477
+ */
1772
2478
  deleteSite(params, siteId) {
1773
2479
  const resourceUri = this._httpHelper._config.ResourceUri.SiteById.replace("{id}", siteId);
1774
2480
  const url = this._httpHelper.getUrl(resourceUri);
1775
2481
  const opts = { method: "DELETE" };
1776
2482
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1777
2483
  }
2484
+ /**
2485
+ * Moves a group to a different site.
2486
+ * @param {object} params - Optional query parameters.
2487
+ * @param {string} groupId - The ID of the group to move.
2488
+ * @param {string} newSiteId - The ID of the destination site.
2489
+ * @returns {Promise<string>} The API response confirming the site change.
2490
+ */
1778
2491
  changeGroupSite(params, groupId, newSiteId) {
1779
2492
  const resourceUri = this._httpHelper._config.ResourceUri.ChangeGroupSite;
1780
2493
  const data = {
@@ -1790,62 +2503,160 @@ var SitesManager = class {
1790
2503
  // lib/vvRestApi/usersManager.js
1791
2504
  init_cjs_shims();
1792
2505
  var UsersManager = class {
2506
+ /**
2507
+ * @param {object} httpHelper - HTTP helper instance
2508
+ */
1793
2509
  constructor(httpHelper) {
1794
2510
  this._httpHelper = httpHelper;
1795
2511
  }
2512
+ /**
2513
+ * Retrieves all users belonging to a site.
2514
+ * @param {object} params - Optional query parameters for filtering and pagination.
2515
+ * @param {string} siteId - The ID of the site to retrieve users from.
2516
+ * @returns {Promise<string>} The API response containing the list of users.
2517
+ */
1796
2518
  getUsers(params, siteId) {
1797
2519
  const resourceUri = this._httpHelper._config.ResourceUri.Users.replace("{id}", siteId);
1798
2520
  const url = this._httpHelper.getUrl(resourceUri);
1799
2521
  const opts = { method: "GET" };
1800
2522
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1801
2523
  }
2524
+ /**
2525
+ * Creates a new user within a site.
2526
+ * @param {object} params - Optional query parameters.
2527
+ * @param {object} data - User properties to create.
2528
+ * @param {string} data.userId - Username (required if emailAddress is omitted; defaults to emailAddress when omitted).
2529
+ * @param {string} data.emailAddress - User email address (required if userId is omitted).
2530
+ * @param {string} [data.firstName] - User first name.
2531
+ * @param {string} [data.middleInitial] - User middle initial.
2532
+ * @param {string} [data.lastName] - User last name.
2533
+ * @param {string} [data.password] - Initial password.
2534
+ * @param {boolean} [data.mustChangePassword] - Whether the user must change their password on first login.
2535
+ * @param {boolean} [data.sendEmail] - Whether to send a welcome email; defaults to true.
2536
+ * @param {boolean} [data.passwordNeverExpires] - Whether the password never expires.
2537
+ * @param {string} [data.passwordExpires] - Date when the password expires.
2538
+ * @param {boolean} [data.getPasswordResetToken] - If true, the response includes a password reset token.
2539
+ * @param {string} [data.employeeId] - Employee ID.
2540
+ * @param {string} [data.employmentStatus] - Employment status.
2541
+ * @param {string} siteId - The ID of the site to create the user in.
2542
+ * @returns {Promise<string>} The API response containing the created user.
2543
+ */
1802
2544
  postUsers(params, data, siteId) {
1803
2545
  const resourceUri = this._httpHelper._config.ResourceUri.Users.replace("{id}", siteId);
1804
2546
  const url = this._httpHelper.getUrl(resourceUri);
1805
2547
  const opts = { method: "POST" };
1806
2548
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1807
2549
  }
2550
+ /**
2551
+ * Updates a user within a site.
2552
+ * @param {object} params - Optional query parameters.
2553
+ * @param {object} data - User properties to update.
2554
+ * @param {string} [data.firstName] - New first name.
2555
+ * @param {string} [data.middleInitial] - New middle initial.
2556
+ * @param {string} [data.lastName] - New last name.
2557
+ * @param {string} [data.emailAddress] - New email address.
2558
+ * @param {string} [data.userId] - New username.
2559
+ * @param {string} [data.password] - New password.
2560
+ * @param {boolean} [data.mustChangePassword] - Whether the user must change their password on next login.
2561
+ * @param {boolean} [data.passwordNeverExpires] - Whether the password never expires.
2562
+ * @param {string} [data.passwordExpires] - Date when the password expires.
2563
+ * @param {string} [data.employeeId] - Employee ID.
2564
+ * @param {string} [data.employmentStatus] - Employment status.
2565
+ * @param {string} siteId - The ID of the site the user belongs to.
2566
+ * @param {string} usId - The ID of the user to update.
2567
+ * @returns {Promise<string>} The API response containing the updated user.
2568
+ */
1808
2569
  putUsers(params, data, siteId, usId) {
1809
2570
  const resourceUri = this._httpHelper._config.ResourceUri.Users.replace("{id}", siteId);
1810
2571
  const url = this._httpHelper.getUrl(resourceUri + "/" + usId);
1811
2572
  const opts = { method: "PUT" };
1812
2573
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1813
2574
  }
2575
+ /**
2576
+ * Updates a user via the users endpoint (without site context).
2577
+ * When updating own profile: supports `newPassword`+`oldPassword`, `emailAddress`, and `firstName`+`lastName`.
2578
+ * When an admin updates another user: supports `isVaultAccess` and `enabled` in addition to profile fields.
2579
+ * @param {object} params - Optional query parameters.
2580
+ * @param {object} data - User properties to update.
2581
+ * @param {string} [data.firstName] - New first name.
2582
+ * @param {string} [data.lastName] - New last name.
2583
+ * @param {string} [data.emailAddress] - New email address.
2584
+ * @param {string} [data.newPassword] - New password (requires oldPassword).
2585
+ * @param {string} [data.oldPassword] - Current password (required when changing password).
2586
+ * @param {boolean} [data.isVaultAccess] - Whether the user has vault (account owner) access; admin only.
2587
+ * @param {boolean} [data.enabled] - Whether the user account is enabled; admin only.
2588
+ * @param {string} usId - The ID of the user to update.
2589
+ * @returns {Promise<string>} The API response containing the updated user.
2590
+ */
1814
2591
  putUsersEndpoint(params, data, usId) {
1815
2592
  const url = this._httpHelper.getUrl(this._httpHelper._config.ResourceUri.User + "/" + usId);
1816
2593
  const opts = { method: "PUT" };
1817
2594
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1818
2595
  }
2596
+ /**
2597
+ * Retrieves users matching optional query parameters.
2598
+ * @param {object} params - Optional query parameters for filtering and pagination.
2599
+ * @returns {Promise<string>} The API response containing the matching users.
2600
+ */
1819
2601
  getUser(params) {
1820
2602
  const resourceUri = this._httpHelper._config.ResourceUri.User;
1821
2603
  const url = this._httpHelper.getUrl(resourceUri);
1822
2604
  const opts = { method: "GET" };
1823
2605
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1824
2606
  }
2607
+ /**
2608
+ * Retrieves a specific user by their ID.
2609
+ * @param {object} params - Optional query parameters.
2610
+ * @param {string} usId - The ID of the user to retrieve.
2611
+ * @returns {Promise<string>} The API response containing the user.
2612
+ */
1825
2613
  getUserById(params, usId) {
1826
2614
  const resourceUri = this._httpHelper._config.ResourceUri.UserById.replace("{id}", usId);
1827
2615
  const url = this._httpHelper.getUrl(resourceUri);
1828
2616
  const opts = { method: "GET" };
1829
2617
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1830
2618
  }
2619
+ /**
2620
+ * Retrieves the groups a user belongs to.
2621
+ * @param {object} params - Optional query parameters for filtering and pagination.
2622
+ * @param {string} usId - The ID of the user.
2623
+ * @returns {Promise<string>} The API response containing the user's groups.
2624
+ */
1831
2625
  getUserGroups(params, usId) {
1832
2626
  const resourceUri = this._httpHelper._config.ResourceUri.UserGroups.replace("{id}", usId);
1833
2627
  const url = this._httpHelper.getUrl(resourceUri);
1834
2628
  const opts = { method: "GET" };
1835
2629
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1836
2630
  }
2631
+ /**
2632
+ * Retrieves the supervisors of a user.
2633
+ * @param {object} params - Optional query parameters for filtering and pagination.
2634
+ * @param {string} usId - The ID of the user.
2635
+ * @returns {Promise<string>} The API response containing the user's supervisors.
2636
+ */
1837
2637
  getUserSupervisors(params, usId) {
1838
2638
  const resourceUri = this._httpHelper._config.ResourceUri.UserSupervisors.replace("{id}", usId);
1839
2639
  const url = this._httpHelper.getUrl(resourceUri);
1840
2640
  const opts = { method: "GET" };
1841
2641
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1842
2642
  }
2643
+ /**
2644
+ * Retrieves the supervisees of a user.
2645
+ * @param {object} params - Optional query parameters for filtering and pagination.
2646
+ * @param {string} usId - The ID of the user.
2647
+ * @returns {Promise<string>} The API response containing the user's supervisees.
2648
+ */
1843
2649
  getUserSupervisees(params, usId) {
1844
2650
  const resourceUri = this._httpHelper._config.ResourceUri.UserSupervisees.replace("{id}", usId);
1845
2651
  const url = this._httpHelper.getUrl(resourceUri);
1846
2652
  const opts = { method: "GET" };
1847
2653
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1848
2654
  }
2655
+ /**
2656
+ * Retrieves a web login token for a user.
2657
+ * @param {string} usId - The ID of the user.
2658
+ * @returns {Promise<string>} The API response containing the user's login token.
2659
+ */
1849
2660
  getUserLoginToken(usId) {
1850
2661
  const resourceUri = this._httpHelper._config.ResourceUri.UserWebToken.replace("{id}", usId);
1851
2662
  const url = this._httpHelper.getUrl(resourceUri);
@@ -1853,6 +2664,11 @@ var UsersManager = class {
1853
2664
  const params = [];
1854
2665
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1855
2666
  }
2667
+ /**
2668
+ * Retrieves a JWT for the current user, optionally scoped to an audience.
2669
+ * @param {string} [audience] - The intended audience for the JWT.
2670
+ * @returns {Promise<string>} The API response containing the JWT token data.
2671
+ */
1856
2672
  getUserJwt(audience) {
1857
2673
  const resourceUri = this._httpHelper._config.ResourceUri.UsersGetJwt;
1858
2674
  const url = this._httpHelper.getUrl(resourceUri);
@@ -1863,6 +2679,10 @@ var UsersManager = class {
1863
2679
  }
1864
2680
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1865
2681
  }
2682
+ /**
2683
+ * Retrieves the currently authenticated user's profile.
2684
+ * @returns {Promise<string>} The API response containing the current user's data.
2685
+ */
1866
2686
  getCurrentUser() {
1867
2687
  const resourceUri = this._httpHelper._config.ResourceUri.UsersMe;
1868
2688
  const url = this._httpHelper.getUrl(resourceUri);
@@ -1870,6 +2690,12 @@ var UsersManager = class {
1870
2690
  const params = [];
1871
2691
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1872
2692
  }
2693
+ /**
2694
+ * Resets a user's password, optionally sending a notification email.
2695
+ * @param {string} usId - The ID of the user whose password to reset.
2696
+ * @param {boolean} [sendEmail=true] - Whether to send a password reset email to the user.
2697
+ * @returns {Promise<string>} The API response confirming the password reset.
2698
+ */
1873
2699
  resetPassword(usId, sendEmail = true) {
1874
2700
  const resourceUri = this._httpHelper._config.ResourceUri.UsersPassword.replace("{id}", usId);
1875
2701
  const url = this._httpHelper.getUrl(resourceUri);
@@ -1881,6 +2707,12 @@ var UsersManager = class {
1881
2707
  };
1882
2708
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
1883
2709
  }
2710
+ /**
2711
+ * Updates the username (userId) of an existing user.
2712
+ * @param {string} usId - The ID of the user to update.
2713
+ * @param {string} newUserId - The new username to assign.
2714
+ * @returns {Promise<string>} The API response confirming the update.
2715
+ */
1884
2716
  updateUserId(usId, newUserId) {
1885
2717
  const resourceUri = this._httpHelper._config.ResourceUri.UsersIdUserId.replace("{id}", usId);
1886
2718
  const url = this._httpHelper.getUrl(resourceUri);
@@ -1896,13 +2728,16 @@ var UsersManager = class {
1896
2728
  // lib/vvRestApi/currentUserManager.js
1897
2729
  init_cjs_shims();
1898
2730
  var CurrentUserManager = class {
2731
+ /**
2732
+ * @param {object} httpHelper - The HTTP helper instance used to make API requests.
2733
+ */
1899
2734
  constructor(httpHelper) {
1900
2735
  this._httpHelper = httpHelper;
1901
2736
  }
1902
2737
  /**
1903
2738
  * Gets the currently authenticated user's information.
1904
- * @param {Object} [params] - Optional query parameters.
1905
- * @returns {Promise<string>} A promise that resolves with the current user's information as a JSON string.
2739
+ * @param {object} [params] - Optional query parameters to include in the request.
2740
+ * @returns {Promise<string>} JSON string containing the current user's details.
1906
2741
  */
1907
2742
  async getCurrentUser(params) {
1908
2743
  var resourceUri = this._httpHelper._config.ResourceUri.UsersMe;
@@ -1915,9 +2750,20 @@ var CurrentUserManager = class {
1915
2750
  // lib/vvRestApi/scheduledProcessManager.js
1916
2751
  init_cjs_shims();
1917
2752
  var ScheduledProcessManager = class {
2753
+ /**
2754
+ * @param {object} httpHelper - The HTTP helper instance used to make API requests.
2755
+ */
1918
2756
  constructor(httpHelper) {
1919
2757
  this._httpHelper = httpHelper;
1920
2758
  }
2759
+ /**
2760
+ * Posts a completion status for a scheduled process.
2761
+ * @param {string} id - The ID of the scheduled process to complete.
2762
+ * @param {string} action - The action taken by the scheduled process.
2763
+ * @param {boolean|string} result - The result of the scheduled process execution.
2764
+ * @param {string} [message] - An optional message describing the result.
2765
+ * @returns {Promise<string>} JSON string confirming the completion was recorded.
2766
+ */
1921
2767
  postCompletion(id, action, result, message) {
1922
2768
  const url = this._httpHelper.getUrl(this._httpHelper._config.ResourceUri.ScheduledProcess) + "/" + id;
1923
2769
  const opts = { method: "POST" };
@@ -1932,6 +2778,10 @@ var ScheduledProcessManager = class {
1932
2778
  }
1933
2779
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1934
2780
  }
2781
+ /**
2782
+ * Triggers an immediate run of all pending scheduled processes.
2783
+ * @returns {Promise<string>} JSON string confirming the scheduled processes were triggered.
2784
+ */
1935
2785
  runAllScheduledProcesses() {
1936
2786
  const url = this._httpHelper.getUrl(this._httpHelper._config.ResourceUri.ScheduledProcess) + "/Run";
1937
2787
  const opts = { method: "PUT" };
@@ -1942,9 +2792,18 @@ var ScheduledProcessManager = class {
1942
2792
  // lib/vvRestApi/customQueryManager.js
1943
2793
  init_cjs_shims();
1944
2794
  var CustomQueryManager = class {
2795
+ /**
2796
+ * @param {object} httpHelper - The HTTP helper instance used to make API requests.
2797
+ */
1945
2798
  constructor(httpHelper) {
1946
2799
  this._httpHelper = httpHelper;
1947
2800
  }
2801
+ /**
2802
+ * Retrieves the results of a custom query by its name.
2803
+ * @param {string} queryName - The name of the custom query to execute.
2804
+ * @param {object} [params] - Optional URL parameters to include in the request.
2805
+ * @returns {Promise<string>} JSON string containing the custom query results.
2806
+ */
1948
2807
  getCustomQueryResultsByName(queryName, params) {
1949
2808
  const url = this._httpHelper.getUrl(this._httpHelper._config.ResourceUri.CustomQuery);
1950
2809
  const opts = { method: "GET" };
@@ -1954,6 +2813,12 @@ var CustomQueryManager = class {
1954
2813
  params.queryName = queryName;
1955
2814
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
1956
2815
  }
2816
+ /**
2817
+ * Retrieves the results of a custom query by its ID.
2818
+ * @param {string} id - The ID (Guid) of the custom query to execute.
2819
+ * @param {object} [params] - Optional URL parameters to include in the request.
2820
+ * @returns {Promise<string>} JSON string containing the custom query results.
2821
+ */
1957
2822
  getCustomQueryResultsById(id, params) {
1958
2823
  const url = this._httpHelper.getUrl(this._httpHelper._config.ResourceUri.CustomQuery + "/" + id);
1959
2824
  const opts = { method: "GET" };
@@ -1967,9 +2832,18 @@ var CustomQueryManager = class {
1967
2832
  // lib/vvRestApi/customerManager.js
1968
2833
  init_cjs_shims();
1969
2834
  var CustomerManager = class {
2835
+ /**
2836
+ * @param {object} httpHelper - The HTTP helper instance used to make API requests.
2837
+ */
1970
2838
  constructor(httpHelper) {
1971
2839
  this._httpHelper = httpHelper;
1972
2840
  }
2841
+ /**
2842
+ * Creates a new customer invitation.
2843
+ * @param {object} data - The invitation data to submit in the request body.
2844
+ * @param {string} [data.email] - The email address to send the invitation code to. If omitted, the invite code is returned in the response metadata instead.
2845
+ * @returns {Promise<string>} The API response containing the created invitation details.
2846
+ */
1973
2847
  createCustomerInvite(data) {
1974
2848
  const baseUrl = this._httpHelper._sessionToken.baseUrl;
1975
2849
  let url = baseUrl + "/api/v1/" + this._httpHelper._config.ResourceUri.CustomerInvite;
@@ -1978,6 +2852,14 @@ var CustomerManager = class {
1978
2852
  const opts = { method: "POST" };
1979
2853
  return this._httpHelper.doVvClientRequest(url, opts, "", data);
1980
2854
  }
2855
+ /**
2856
+ * Assigns a user to a customer.
2857
+ * @param {string} customerId - The ID (Guid) of the customer to assign the user to.
2858
+ * @param {object} data - The user assignment data to submit in the request body.
2859
+ * @param {string} data.userId - The username (authentication user ID) of the user to assign.
2860
+ * @param {boolean} [data.allowMultipleCustomers] - Whether to allow the user to belong to multiple customers if already assigned to another.
2861
+ * @returns {Promise<string>} The API response confirming the user assignment.
2862
+ */
1981
2863
  assignUser(customerId, data) {
1982
2864
  const baseUrl = this._httpHelper._sessionToken.baseUrl;
1983
2865
  const url = baseUrl + "/api/v1/" + this._httpHelper._config.ResourceUri.CustomerAssignUser.replace("{customerId}", customerId);
@@ -1991,15 +2873,31 @@ init_cjs_shims();
1991
2873
  var import_debug4 = __toESM(require("debug"), 1);
1992
2874
  var debug4 = (0, import_debug4.default)("visualvault:customer-db");
1993
2875
  var CustomerDatabaseManager = class {
2876
+ /**
2877
+ * @param {object} httpHelper - The HTTP helper instance used to make API requests.
2878
+ */
1994
2879
  constructor(httpHelper) {
1995
2880
  this._httpHelper = httpHelper;
1996
2881
  }
2882
+ /**
2883
+ * Assigns a user to a customer database.
2884
+ * @param {string} customerId - The ID (Guid) of the customer database to assign the user to.
2885
+ * @param {object} data - The user assignment data to submit in the request body.
2886
+ * @param {string} data.userId - The username (authentication user ID) of the user to assign.
2887
+ * @returns {Promise<string>} The API response confirming the user assignment.
2888
+ */
1997
2889
  assignUser(customerId, data) {
1998
2890
  const baseUrl = this._httpHelper._sessionToken.baseUrl;
1999
2891
  const url = baseUrl + "/api/v1/" + this._httpHelper._config.ResourceUri.CustomerDatabaseAssignUser.replace("{databaseId}", customerId);
2000
2892
  const opts = { method: "PUT" };
2001
2893
  return this._httpHelper.doVvClientRequest(url, opts, "", data);
2002
2894
  }
2895
+ /**
2896
+ * Removes a user from a customer database.
2897
+ * @param {string} authenticationUserId - The authentication user ID of the user to remove.
2898
+ * @param {string} databaseId - The ID (Guid) of the customer database to remove the user from.
2899
+ * @returns {Promise<string>} The API response confirming the user removal.
2900
+ */
2003
2901
  removeUser(authenticationUserId, databaseId) {
2004
2902
  const baseUrl = this._httpHelper._sessionToken.baseUrl;
2005
2903
  let url = baseUrl + "/api/v1" + this._httpHelper._config.ResourceUri.UserDelete.replace("{databaseId}", databaseId);
@@ -2014,21 +2912,49 @@ var CustomerDatabaseManager = class {
2014
2912
  // lib/vvRestApi/filesManager.js
2015
2913
  init_cjs_shims();
2016
2914
  var FilesManager = class {
2915
+ /**
2916
+ * @param {object} httpHelper - The HTTP helper instance used to make API requests.
2917
+ */
2017
2918
  constructor(httpHelper) {
2018
2919
  this._httpHelper = httpHelper;
2019
2920
  }
2921
+ /**
2922
+ * Downloads file bytes using a query string path.
2923
+ * @param {string} query - The query string to append to the files resource URI.
2924
+ * @returns {Promise<Buffer>} The API response containing the raw file bytes.
2925
+ */
2020
2926
  getFileBytesQuery(query) {
2021
2927
  const resourceUri = this._httpHelper._config.ResourceUri.FilesQuery + query;
2022
2928
  const url = this._httpHelper.getUrl(resourceUri);
2023
2929
  const opts = { method: "GETSTREAM" };
2024
2930
  return this._httpHelper.doVvClientRequest(url, opts, null, null);
2025
2931
  }
2932
+ /**
2933
+ * Downloads file bytes by file ID.
2934
+ * @param {string} id - The ID (Guid) of the file to download.
2935
+ * @returns {Promise<Buffer>} The API response containing the raw file bytes.
2936
+ */
2026
2937
  getFileBytesId(id) {
2027
2938
  const resourceUri = this._httpHelper._config.ResourceUri.FilesId.replace("{id}", id);
2028
2939
  const url = this._httpHelper.getUrl(resourceUri);
2029
2940
  const opts = { method: "GETSTREAM" };
2030
2941
  return this._httpHelper.doVvClientRequest(url, opts, null, null);
2031
2942
  }
2943
+ /**
2944
+ * Uploads a file to the VVRestApi.
2945
+ * @param {object} data - The file metadata to include in the request body.
2946
+ * @param {string} [data.fileId] - The file revision ID of the document to update. Required if documentId is not provided.
2947
+ * @param {string} [data.documentId] - The document ID of the document to update. Required if fileId is not provided.
2948
+ * @param {string} [data.fileName] - The filename to assign to the uploaded file.
2949
+ * @param {string} [data.revision] - The revision label to assign to the new revision.
2950
+ * @param {string} [data.changeReason] - The reason for uploading a new revision.
2951
+ * @param {string} [data.checkInDocumentState] - The document state after check-in: "Released", "Unreleased", or "Replace". Defaults to "Released".
2952
+ * @param {boolean} [data.checkIn] - Whether to check in the document after upload. Defaults to true.
2953
+ * @param {string} [data.indexFields] - JSON-serialized index fields; accepts an array of `{"fieldLabel": "value"}` objects or a single object with field labels as keys.
2954
+ * @param {string} [data.parameters] - JSON string with optional upload parameters: `source`, `command`, `ocrStatus`, `keepAnnotations`.
2955
+ * @param {Uint8Array} buffer - The raw file bytes to upload.
2956
+ * @returns {Promise<string>} The API response containing the uploaded file details.
2957
+ */
2032
2958
  postFile(data, buffer) {
2033
2959
  const resourceUri = this._httpHelper._config.ResourceUri.Files;
2034
2960
  const url = this._httpHelper.getUrl(resourceUri);
@@ -2040,9 +2966,19 @@ var FilesManager = class {
2040
2966
  // lib/vvRestApi/scriptsManager.js
2041
2967
  init_cjs_shims();
2042
2968
  var ScriptsManager = class {
2969
+ /**
2970
+ * @param {object} httpHelper - The HTTP helper instance used to make API requests.
2971
+ */
2043
2972
  constructor(httpHelper) {
2044
2973
  this._httpHelper = httpHelper;
2045
2974
  }
2975
+ /**
2976
+ * Executes a named web service script.
2977
+ * @param {string} serviceName - The name of the web service script to run.
2978
+ * @param {object} serviceData - The data to pass to the script in the request body.
2979
+ * @param {string} [usId] - The user session ID to run the script on behalf of.
2980
+ * @returns {Promise<string>} JSON string containing the script execution result.
2981
+ */
2046
2982
  runWebService(serviceName, serviceData, usId) {
2047
2983
  let resourceUri = this._httpHelper._config.ResourceUri.Scripts + "?name=" + serviceName;
2048
2984
  if (typeof usId !== "undefined" && usId !== null) {
@@ -2052,6 +2988,12 @@ var ScriptsManager = class {
2052
2988
  const opts = { method: "POST" };
2053
2989
  return this._httpHelper.doVvClientRequest(url, opts, null, serviceData);
2054
2990
  }
2991
+ /**
2992
+ * Completes a workflow web service execution and returns variables to the workflow.
2993
+ * @param {string} executionId - The ID of the workflow script execution to complete.
2994
+ * @param {object[]} workflowVariables - The workflow variables to return upon completion.
2995
+ * @returns {Promise<string>} JSON string confirming the workflow completion was recorded.
2996
+ */
2055
2997
  completeWorkflowWebService(executionId, workflowVariables) {
2056
2998
  const resourceUri = this._httpHelper._config.ResourceUri.ScriptsCompleteWf;
2057
2999
  const url = this._httpHelper.getUrl(resourceUri);
@@ -2067,57 +3009,135 @@ var ScriptsManager = class {
2067
3009
  // lib/vvRestApi/documentsManager.js
2068
3010
  init_cjs_shims();
2069
3011
  var DocumentsManager = class {
3012
+ /**
3013
+ * @param {object} httpHelper - HTTP helper instance
3014
+ */
2070
3015
  constructor(httpHelper) {
2071
3016
  this._httpHelper = httpHelper;
2072
3017
  }
3018
+ /**
3019
+ * Creates a new document record.
3020
+ * @param {object} data - Document metadata.
3021
+ * @param {string} data.folderId - The Guid of the destination folder.
3022
+ * @param {string} [data.name] - Display name for the document.
3023
+ * @param {string} [data.description] - Document description.
3024
+ * @param {string} [data.revision] - Revision label (e.g. "0").
3025
+ * @param {string} [data.documentState] - Check-in state (e.g. "Released", "Checked In").
3026
+ * @param {string} [data.filename] - File name for the document.
3027
+ * @param {number} [data.fileLength] - File size in bytes.
3028
+ * @param {string} [data.indexFields] - JSON-serialized index field key-value pairs.
3029
+ * @param {string} [data.allowNoFile] - Set to "true" to create without a file.
3030
+ * @returns {Promise<string>} The API response containing the created document.
3031
+ */
2073
3032
  postDoc(data) {
2074
3033
  const resourceUri = this._httpHelper._config.ResourceUri.DocumentsPost;
2075
3034
  const url = this._httpHelper.getUrl(resourceUri);
2076
3035
  const opts = { method: "POST" };
2077
3036
  return this._httpHelper.doVvClientRequest(url, opts, null, data);
2078
3037
  }
3038
+ /**
3039
+ * Creates a new document record with an attached file.
3040
+ * @param {object} data - Document metadata to create.
3041
+ * @param {string} data.folderId - The Guid of the destination folder.
3042
+ * @param {string} [data.name] - Display name for the document.
3043
+ * @param {string} [data.description] - Document description.
3044
+ * @param {string} [data.revision] - Revision label (e.g. "0").
3045
+ * @param {string} [data.documentState] - Check-in state (e.g. "Released", "Checked In").
3046
+ * @param {string} [data.filename] - File name for the document.
3047
+ * @param {number} [data.fileLength] - File size in bytes.
3048
+ * @param {string} [data.indexFields] - JSON-serialized index field key-value pairs.
3049
+ * @param {Uint8Array} fileData - The file content to upload.
3050
+ * @returns {Promise<string>} The API response containing the created document.
3051
+ */
2079
3052
  postDocWithFile(data, fileData) {
2080
3053
  const resourceUri = this._httpHelper._config.ResourceUri.DocumentsPost;
2081
3054
  const url = this._httpHelper.getUrl(resourceUri);
2082
3055
  const opts = { method: "POSTSTREAM" };
2083
3056
  return this._httpHelper.doVvClientRequest(url, opts, null, data, fileData);
2084
3057
  }
3058
+ /**
3059
+ * Copies a document to a new location.
3060
+ * @param {object} params - Optional query parameters.
3061
+ * @param {object} data - Copy options.
3062
+ * @param {string} data.folderId - The Guid of the destination folder to copy the document into.
3063
+ * @param {string} documentId - The Id of the document to copy.
3064
+ * @returns {Promise<string>} The API response containing the copied document.
3065
+ */
2085
3066
  copyDocument(params, data, documentId) {
2086
3067
  const resourceUri = this._httpHelper._config.ResourceUri.DocumentsIdCopy.replace("{id}", documentId);
2087
3068
  const url = this._httpHelper.getUrl(resourceUri);
2088
3069
  const opts = { method: "POST" };
2089
3070
  return this._httpHelper.doVvClientRequest(url, opts, null, data);
2090
3071
  }
3072
+ /**
3073
+ * Moves a document to a different folder.
3074
+ * @param {object} params - Optional query parameters.
3075
+ * @param {object} data - Move options.
3076
+ * @param {string} data.folderId - The Guid of the destination folder to move the document into.
3077
+ * @param {string} documentId - The Id of the document to move.
3078
+ * @returns {Promise<string>} The API response containing the updated document.
3079
+ */
2091
3080
  moveDocument(params, data, documentId) {
2092
3081
  const resourceUri = this._httpHelper._config.ResourceUri.DocumentsIdMove.replace("{id}", documentId);
2093
3082
  const url = this._httpHelper.getUrl(resourceUri);
2094
3083
  const opts = { method: "PUT" };
2095
3084
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
2096
3085
  }
3086
+ /**
3087
+ * Deletes a specific document.
3088
+ * @param {object} params - Optional query parameters.
3089
+ * @param {string} revisionId - The Id of the document revision to delete.
3090
+ * @returns {Promise<string>} The API response confirming the deletion.
3091
+ */
2097
3092
  deleteDocument(params, revisionId) {
2098
3093
  const resourceUri = this._httpHelper._config.ResourceUri.DocumentsId.replace("{id}", revisionId);
2099
3094
  const url = this._httpHelper.getUrl(resourceUri);
2100
3095
  const opts = { method: "DELETE" };
2101
3096
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2102
3097
  }
3098
+ /**
3099
+ * Retrieves metadata for a specific document.
3100
+ * @param {object} params - Optional query parameters.
3101
+ * @param {string} revisionId - The revision Id of the document to retrieve.
3102
+ * @returns {Promise<string>} The API response containing the document metadata.
3103
+ */
2103
3104
  getDocumentRevision(params, revisionId) {
2104
3105
  const resourceUri = this._httpHelper._config.ResourceUri.DocumentsId.replace("{id}", revisionId);
2105
3106
  const url = this._httpHelper.getUrl(resourceUri);
2106
3107
  const opts = { method: "GET" };
2107
3108
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2108
3109
  }
3110
+ /**
3111
+ * Retrieves a list of documents matching the given query parameters.
3112
+ * @param {object} params - Query parameters for filtering, sorting, and pagination.
3113
+ * @returns {Promise<string>} The API response containing the matching documents.
3114
+ */
2109
3115
  getDocuments(params) {
2110
3116
  const resourceUri = this._httpHelper._config.ResourceUri.DocumentsPost;
2111
3117
  const url = this._httpHelper.getUrl(resourceUri);
2112
3118
  const opts = { method: "GET" };
2113
3119
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2114
3120
  }
3121
+ /**
3122
+ * Updates the index fields on a document.
3123
+ * @param {object} data - Index field values to update.
3124
+ * @param {string} data.indexFields - JSON-serialized index fields; accepts a JSON array of `{"fieldLabel": "value"}` objects or a single `{"fieldLabel": "value"}` object where keys are field labels or Guid IDs.
3125
+ * @param {string} documentId - The Id of the document to update.
3126
+ * @returns {Promise<string>} The API response confirming the update.
3127
+ */
2115
3128
  putDocumentIndexFields(data, documentId) {
2116
3129
  const resourceUri = this._httpHelper._config.ResourceUri.DocumentIndexFields.replace("{id}", documentId);
2117
3130
  const url = this._httpHelper.getUrl(resourceUri);
2118
3131
  const opts = { method: "PUT" };
2119
3132
  return this._httpHelper.doVvClientRequest(url, opts, null, data);
2120
3133
  }
3134
+ /**
3135
+ * Subscribes a user to alert notifications for a specific document event.
3136
+ * @param {string} documentId - The Id of the document to subscribe to.
3137
+ * @param {string} eventId - The Id of the event to subscribe to.
3138
+ * @param {string} userId - The Id of the user to subscribe.
3139
+ * @returns {Promise<string>} The API response confirming the subscription.
3140
+ */
2121
3141
  postDocumentAlertSubscription(documentId, eventId, userId) {
2122
3142
  const resourceUri = this._httpHelper._config.ResourceUri.DocumentAlertsId.replace("{documentId}", documentId).replace("{eventId}", eventId);
2123
3143
  const url = this._httpHelper.getUrl(resourceUri);
@@ -2127,6 +3147,13 @@ var DocumentsManager = class {
2127
3147
  };
2128
3148
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2129
3149
  }
3150
+ /**
3151
+ * Removes a user's subscription to alert notifications for a specific document event.
3152
+ * @param {string} documentId - The Id of the document.
3153
+ * @param {string} eventId - The Id of the event to unsubscribe from.
3154
+ * @param {string} userId - The Id of the user to unsubscribe.
3155
+ * @returns {Promise<string>} The API response confirming the unsubscription.
3156
+ */
2130
3157
  deleteDocumentAlertSubscription(documentId, eventId, userId) {
2131
3158
  const resourceUri = this._httpHelper._config.ResourceUri.DocumentAlertsId.replace("{documentId}", documentId).replace("{eventId}", eventId);
2132
3159
  const url = this._httpHelper.getUrl(resourceUri);
@@ -2136,12 +3163,25 @@ var DocumentsManager = class {
2136
3163
  };
2137
3164
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2138
3165
  }
3166
+ /**
3167
+ * Retrieves OCR processing properties for a specific document revision.
3168
+ * @param {object} params - Optional query parameters.
3169
+ * @param {string} revisionId - The revision Id of the document.
3170
+ * @returns {Promise<string>} The API response containing the OCR properties.
3171
+ */
2139
3172
  getDocumentRevisionOcrProperties(params, revisionId) {
2140
3173
  const resourceUri = this._httpHelper._config.ResourceUri.DocumentsIdOcr.replace("{id}", revisionId);
2141
3174
  const url = this._httpHelper.getUrl(resourceUri);
2142
3175
  const opts = { method: "GET" };
2143
3176
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2144
3177
  }
3178
+ /**
3179
+ * Creates a relationship between two document revisions.
3180
+ * @param {string} revisionId - The Id of the source document revision.
3181
+ * @param {string} relateToRevisionId - The revision Id of the document to relate to.
3182
+ * @param {string} relateType - The type of relationship to create.
3183
+ * @returns {Promise<string>} The API response confirming the relation.
3184
+ */
2145
3185
  relateDocuments(revisionId, relateToRevisionId, relateType) {
2146
3186
  const resourceUri = this._httpHelper._config.ResourceUri.DocumentsIdRelateDocument.replace("{id}", revisionId);
2147
3187
  const url = this._httpHelper.getUrl(resourceUri);
@@ -2152,6 +3192,12 @@ var DocumentsManager = class {
2152
3192
  };
2153
3193
  return this._httpHelper.doVvClientRequest(url, opts, null, data);
2154
3194
  }
3195
+ /**
3196
+ * Sets or updates the expiration date on a document.
3197
+ * @param {string} documentId - The Id of the document to update.
3198
+ * @param {string} expirationDate - The expiration date in ISO 8601 format.
3199
+ * @returns {Promise<string>} The API response confirming the update.
3200
+ */
2155
3201
  updateDocumentExpiration(documentId, expirationDate) {
2156
3202
  const resourceUri = this._httpHelper._config.ResourceUri.DocumentsIdExpiration.replace("{id}", documentId);
2157
3203
  const url = this._httpHelper.getUrl(resourceUri);
@@ -2161,18 +3207,34 @@ var DocumentsManager = class {
2161
3207
  };
2162
3208
  return this._httpHelper.doVvClientRequest(url, opts, null, data);
2163
3209
  }
3210
+ /**
3211
+ * Retrieves the WebDAV URL for a document.
3212
+ * @param {string} documentId - The Id of the document.
3213
+ * @returns {Promise<string>} The API response containing the WebDAV URL.
3214
+ */
2164
3215
  getDocumentWebDavUrl(documentId) {
2165
3216
  const resourceUri = this._httpHelper._config.ResourceUri.DocumentsWebDavUrl.replace("{id}", documentId);
2166
3217
  const url = this._httpHelper.getUrl(resourceUri);
2167
3218
  const opts = { method: "GET" };
2168
3219
  return this._httpHelper.doVvClientRequest(url, opts, null, null);
2169
3220
  }
3221
+ /**
3222
+ * Retrieves the WOPI URL for a document.
3223
+ * @param {string} documentId - The Id of the document.
3224
+ * @returns {Promise<string>} The API response containing the WOPI URL.
3225
+ */
2170
3226
  getDocumentWopiUrl(documentId) {
2171
3227
  const resourceUri = this._httpHelper._config.ResourceUri.DocumentsWopiUrl.replace("{id}", documentId);
2172
3228
  const url = this._httpHelper.getUrl(resourceUri);
2173
3229
  const opts = { method: "GET" };
2174
3230
  return this._httpHelper.doVvClientRequest(url, opts, null, null);
2175
3231
  }
3232
+ /**
3233
+ * Initiates creation of a zip archive containing multiple documents.
3234
+ * @param {object} params - Optional query parameters.
3235
+ * @param {string[]} documentIds - Array of document Ids to include in the zip.
3236
+ * @returns {Promise<string>} The API response containing a download key for polling zip status.
3237
+ */
2176
3238
  createDocumentZipFile(params, documentIds) {
2177
3239
  const resourceUri = this._httpHelper._config.ResourceUri.CreateDocumentZipFile;
2178
3240
  const url = this._httpHelper.getUrl(resourceUri);
@@ -2180,24 +3242,47 @@ var DocumentsManager = class {
2180
3242
  const data = { documentDhIds: documentIds };
2181
3243
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
2182
3244
  }
3245
+ /**
3246
+ * Checks the status of a zip file creation request initiated by createDocumentZipFile.
3247
+ * @param {object} params - Optional query parameters.
3248
+ * @param {string} downloadKey - The download key returned from createDocumentZipFile.
3249
+ * @returns {Promise<string>} The API response containing the zip status and download URL.
3250
+ */
2183
3251
  getDocumentZipFileStatus(params, downloadKey) {
2184
3252
  const resourceUri = this._httpHelper._config.ResourceUri.GetDocumentZipFileStatus + `?downloadKey=${encodeURIComponent(downloadKey)}`;
2185
3253
  const url = this._httpHelper.getUrl(resourceUri);
2186
3254
  const opts = { method: "GET" };
2187
3255
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2188
3256
  }
3257
+ /**
3258
+ * Retrieves the index fields and their values for a specific document.
3259
+ * @param {object} params - Optional query parameters.
3260
+ * @param {string} documentId - The Id of the document.
3261
+ * @returns {Promise<string>} The API response containing the document's index fields.
3262
+ */
2189
3263
  getDocumentIndexFields(params, documentId) {
2190
3264
  const resourceUri = this._httpHelper._config.ResourceUri.DocumentIndexFields.replace("{id}", documentId);
2191
3265
  const url = this._httpHelper.getUrl(resourceUri);
2192
3266
  const opts = { method: "GET" };
2193
3267
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2194
3268
  }
3269
+ /**
3270
+ * Retrieves available document types defined in the vault.
3271
+ * @param {object} params - Optional query parameters for filtering.
3272
+ * @returns {Promise<string>} The API response containing the document types.
3273
+ */
2195
3274
  getDocumentTypes(params) {
2196
3275
  const resourceUri = this._httpHelper._config.ResourceUri.DocumentTypes;
2197
3276
  const url = this._httpHelper.getUrl(resourceUri);
2198
3277
  const opts = { method: "GET" };
2199
3278
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2200
3279
  }
3280
+ /**
3281
+ * Creates a new document type in the vault.
3282
+ * @param {object} params - Optional query parameters.
3283
+ * @param {string} name - The name of the document type to create.
3284
+ * @returns {Promise<string>} The API response containing the created document type.
3285
+ */
2201
3286
  createDocumentType(params, name) {
2202
3287
  const resourceUri = this._httpHelper._config.ResourceUri.DocumentTypes;
2203
3288
  const url = this._httpHelper.getUrl(resourceUri);
@@ -2205,18 +3290,34 @@ var DocumentsManager = class {
2205
3290
  const data = { documentTypeName: name };
2206
3291
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
2207
3292
  }
3293
+ /**
3294
+ * Retrieves saved document searches available to the current user.
3295
+ * @param {object} params - Optional query parameters for filtering.
3296
+ * @returns {Promise<string>} The API response containing the saved searches.
3297
+ */
2208
3298
  getSavedSearches(params) {
2209
3299
  const resourceUri = this._httpHelper._config.ResourceUri.SavedSearches;
2210
3300
  const url = this._httpHelper.getUrl(resourceUri);
2211
3301
  const opts = { method: "GET" };
2212
3302
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2213
3303
  }
3304
+ /**
3305
+ * Retrieves available document metadata fields defined in the vault.
3306
+ * @param {object} params - Optional query parameters for filtering.
3307
+ * @returns {Promise<string>} The API response containing the document fields.
3308
+ */
2214
3309
  getDocumentFields(params) {
2215
3310
  const resourceUri = this._httpHelper._config.ResourceUri.DocumentFields;
2216
3311
  const url = this._httpHelper.getUrl(resourceUri);
2217
3312
  const opts = { method: "GET" };
2218
3313
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2219
3314
  }
3315
+ /**
3316
+ * Retrieves the index fields associated with a saved search.
3317
+ * @param {object} params - Optional query parameters.
3318
+ * @param {string} savedSearchId - The Id of the saved search.
3319
+ * @returns {Promise<string>} The API response containing the saved search's index fields.
3320
+ */
2220
3321
  getSavedSearchIndexFields(params, savedSearchId) {
2221
3322
  const resourceUri = this._httpHelper._config.ResourceUri.SavedSearchIndexFields;
2222
3323
  const url = this._httpHelper.getUrl(resourceUri);
@@ -2224,24 +3325,46 @@ var DocumentsManager = class {
2224
3325
  const mergedParams = { ...params, savedSearchId };
2225
3326
  return this._httpHelper.doVvClientRequest(url, opts, mergedParams, null);
2226
3327
  }
3328
+ /**
3329
+ * Retrieves the most recently accessed documents for the current user.
3330
+ * @param {object} params - Optional query parameters for filtering and pagination.
3331
+ * @returns {Promise<string>} The API response containing the recent documents.
3332
+ */
2227
3333
  getLastDocuments(params) {
2228
3334
  const resourceUri = this._httpHelper._config.ResourceUri.LastDocuments;
2229
3335
  const url = this._httpHelper.getUrl(resourceUri);
2230
3336
  const opts = { method: "GET" };
2231
3337
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2232
3338
  }
3339
+ /**
3340
+ * Retrieves the most frequently accessed documents for the current user.
3341
+ * @param {object} params - Optional query parameters for filtering and pagination.
3342
+ * @returns {Promise<string>} The API response containing the frequent documents.
3343
+ */
2233
3344
  getFrequentDocuments(params) {
2234
3345
  const resourceUri = this._httpHelper._config.ResourceUri.FrequentDocuments;
2235
3346
  const url = this._httpHelper.getUrl(resourceUri);
2236
3347
  const opts = { method: "GET" };
2237
3348
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2238
3349
  }
3350
+ /**
3351
+ * Retrieves documents matching a saved search.
3352
+ * @param {object} params - Optional query parameters for filtering and pagination.
3353
+ * @param {string} savedSearchId - The Id of the saved search to execute.
3354
+ * @returns {Promise<string>} The API response containing the matching documents.
3355
+ */
2239
3356
  getSavedSearchDocuments(params, savedSearchId) {
2240
3357
  const resourceUri = this._httpHelper._config.ResourceUri.SavedSearchDocuments.replace("{savedSearchId}", savedSearchId);
2241
3358
  const url = this._httpHelper.getUrl(resourceUri);
2242
3359
  const opts = { method: "GET" };
2243
3360
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2244
3361
  }
3362
+ /**
3363
+ * Retrieves the default action link for a document.
3364
+ * @param {object} params - Optional query parameters.
3365
+ * @param {string} documentId - The Id of the document.
3366
+ * @returns {Promise<string>} The API response containing the default action link.
3367
+ */
2245
3368
  getDocumentDefaultLink(params, documentId) {
2246
3369
  const resourceUri = this._httpHelper._config.ResourceUri.DocumentDefaultAction.replace("{documentId}", documentId);
2247
3370
  const url = this._httpHelper.getUrl(resourceUri);
@@ -2253,9 +3376,19 @@ var DocumentsManager = class {
2253
3376
  // lib/vvRestApi/projectsManager.js
2254
3377
  init_cjs_shims();
2255
3378
  var ProjectsManager = class {
3379
+ /**
3380
+ * @param {object} httpHelper - The HTTP helper instance used to make API requests.
3381
+ */
2256
3382
  constructor(httpHelper) {
2257
3383
  this._httpHelper = httpHelper;
2258
3384
  }
3385
+ /**
3386
+ * Subscribes a user to alerts for a specific project event.
3387
+ * @param {string} projectId - The ID (Guid) of the project to subscribe to.
3388
+ * @param {string} eventId - The ID (Guid) of the project event to subscribe to.
3389
+ * @param {string} userId - The ID (Guid) of the user to subscribe.
3390
+ * @returns {Promise<string>} JSON string confirming the alert subscription was created.
3391
+ */
2259
3392
  postProjectAlertSubscription(projectId, eventId, userId) {
2260
3393
  const resourceUri = this._httpHelper._config.ResourceUri.ProjectAlertsId.replace("{projectId}", projectId).replace("{eventId}", eventId);
2261
3394
  const url = this._httpHelper.getUrl(resourceUri);
@@ -2265,6 +3398,13 @@ var ProjectsManager = class {
2265
3398
  };
2266
3399
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2267
3400
  }
3401
+ /**
3402
+ * Removes a user's subscription from alerts for a specific project event.
3403
+ * @param {string} projectId - The ID (Guid) of the project to unsubscribe from.
3404
+ * @param {string} eventId - The ID (Guid) of the project event to unsubscribe from.
3405
+ * @param {string} userId - The ID (Guid) of the user to unsubscribe.
3406
+ * @returns {Promise<string>} JSON string confirming the alert subscription was removed.
3407
+ */
2268
3408
  deleteProjectAlertSubscription(projectId, eventId, userId) {
2269
3409
  const resourceUri = this._httpHelper._config.ResourceUri.ProjectAlertsId.replace("{projectId}", projectId).replace("{eventId}", eventId);
2270
3410
  const url = this._httpHelper.getUrl(resourceUri);
@@ -2279,15 +3419,29 @@ var ProjectsManager = class {
2279
3419
  // lib/vvRestApi/indexFieldsManager.js
2280
3420
  init_cjs_shims();
2281
3421
  var IndexFieldsManager = class {
3422
+ /**
3423
+ * @param {object} httpHelper - The HTTP helper instance used to make API requests.
3424
+ */
2282
3425
  constructor(httpHelper) {
2283
3426
  this._httpHelper = httpHelper;
2284
3427
  }
3428
+ /**
3429
+ * Retrieves all index fields.
3430
+ * @param {object} params - URL parameters to include in the request.
3431
+ * @returns {Promise<string>} JSON string containing the list of index fields.
3432
+ */
2285
3433
  getIndexFields(params) {
2286
3434
  const resourceUri = this._httpHelper._config.ResourceUri.IndexFields;
2287
3435
  const url = this._httpHelper.getUrl(resourceUri);
2288
3436
  const opts = { method: "GET" };
2289
3437
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2290
3438
  }
3439
+ /**
3440
+ * Retrieves a specific index field by its ID.
3441
+ * @param {object} params - URL parameters to include in the request.
3442
+ * @param {string} id - The ID (Guid) of the index field to retrieve.
3443
+ * @returns {Promise<string>} JSON string containing the index field details.
3444
+ */
2291
3445
  getIndexField(params, id) {
2292
3446
  const resourceUri = this._httpHelper._config.ResourceUri.IndexFields + "/" + id;
2293
3447
  const url = this._httpHelper.getUrl(resourceUri);
@@ -2295,24 +3449,24 @@ var IndexFieldsManager = class {
2295
3449
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2296
3450
  }
2297
3451
  /**
2298
- * Payload for creating/updating index fields.
2299
- * @typedef {Object} IndexFieldData
3452
+ * Payload for creating or updating index fields.
3453
+ * @typedef {object} IndexFieldData
2300
3454
  * @property {string} fieldType
2301
3455
  * @property {string} label
2302
3456
  * @property {string} [description]
2303
3457
  * @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]
3458
+ * @property {string|null} [connectionId]
3459
+ * @property {string|null} [queryId]
3460
+ * @property {string|null} [queryDisplayField]
3461
+ * @property {string|null} [queryValueField]
3462
+ * @property {string|null} [dropDownListId]
3463
+ * @property {string|null} [defaultValue]
2310
3464
  */
2311
3465
  /**
2312
- * Create an index field
2313
- * @param {Object} params - Query parameters
2314
- * @param {IndexFieldData} data - Request body
2315
- * @returns {Promise<string>}
3466
+ * Creates a new index field.
3467
+ * @param {object} params - URL parameters to include in the request.
3468
+ * @param {IndexFieldData} data - The index field data to submit in the request body.
3469
+ * @returns {Promise<string>} JSON string containing the created index field details.
2316
3470
  */
2317
3471
  createIndexField(params, data) {
2318
3472
  const resourceUri = this._httpHelper._config.ResourceUri.IndexFields;
@@ -2321,11 +3475,11 @@ var IndexFieldsManager = class {
2321
3475
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
2322
3476
  }
2323
3477
  /**
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>}
3478
+ * Updates an existing index field by its ID.
3479
+ * @param {object} params - URL parameters to include in the request.
3480
+ * @param {string} id - The ID (Guid) of the index field to update.
3481
+ * @param {IndexFieldData} data - The updated index field data to submit in the request body.
3482
+ * @returns {Promise<string>} JSON string confirming the index field was updated.
2329
3483
  */
2330
3484
  updateIndexField(params, id, data) {
2331
3485
  const resourceUri = this._httpHelper._config.ResourceUri.IndexFields + "/" + id;
@@ -2333,12 +3487,25 @@ var IndexFieldsManager = class {
2333
3487
  const opts = { method: "PUT" };
2334
3488
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
2335
3489
  }
3490
+ /**
3491
+ * Deletes an index field by its ID.
3492
+ * @param {object} params - URL parameters to include in the request.
3493
+ * @param {string} id - The ID (Guid) of the index field to delete.
3494
+ * @returns {Promise<string>} JSON string confirming the index field was deleted.
3495
+ */
2336
3496
  deleteIndexField(params, id) {
2337
3497
  const resourceUri = this._httpHelper._config.ResourceUri.IndexFields + "/" + id;
2338
3498
  const url = this._httpHelper.getUrl(resourceUri);
2339
3499
  const opts = { method: "DELETE" };
2340
3500
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2341
3501
  }
3502
+ /**
3503
+ * Moves an index field to appear after a specified destination field.
3504
+ * @param {object} params - URL parameters to include in the request.
3505
+ * @param {string} sourceFieldId - The ID (Guid) of the index field to move.
3506
+ * @param {string} destinationFieldId - The ID (Guid) of the index field to place the source after.
3507
+ * @returns {Promise<string>} JSON string confirming the index field was moved.
3508
+ */
2342
3509
  moveIndexFieldAfter(params, sourceFieldId, destinationFieldId) {
2343
3510
  const resourceUri = this._httpHelper._config.ResourceUri.IndexFields + "/MoveIndexFieldAfter";
2344
3511
  const url = this._httpHelper.getUrl(resourceUri);
@@ -2346,6 +3513,12 @@ var IndexFieldsManager = class {
2346
3513
  const data = { sourceFieldId, destinationFieldId };
2347
3514
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
2348
3515
  }
3516
+ /**
3517
+ * Associates an index field with a folder.
3518
+ * @param {string} indexFieldId - The ID (Guid) of the index field to associate.
3519
+ * @param {string} folderId - The ID (Guid) of the folder to associate the index field with.
3520
+ * @returns {Promise<string>} JSON string confirming the index field was added to the folder.
3521
+ */
2349
3522
  addIndexFieldToFolder(indexFieldId, folderId) {
2350
3523
  const resourceUri = this._httpHelper._config.ResourceUri.IndexFieldsFolder.replace("{id}", indexFieldId).replace("{folderId}", folderId);
2351
3524
  const url = this._httpHelper.getUrl(resourceUri);
@@ -2357,9 +3530,17 @@ var IndexFieldsManager = class {
2357
3530
  // lib/vvRestApi/outsideProcessesManager.js
2358
3531
  init_cjs_shims();
2359
3532
  var OutsideProcessesManager = class {
3533
+ /**
3534
+ * @param {object} httpHelper - The HTTP helper instance used to make API requests.
3535
+ */
2360
3536
  constructor(httpHelper) {
2361
3537
  this._httpHelper = httpHelper;
2362
3538
  }
3539
+ /**
3540
+ * Retrieves a list of outside processes.
3541
+ * @param {object} params - URL parameters to include in the request.
3542
+ * @returns {Promise<string>} JSON string containing the list of outside processes.
3543
+ */
2363
3544
  getOutsideProcesses(params) {
2364
3545
  const resourceUri = this._httpHelper._config.ResourceUri.OutsideProcesses;
2365
3546
  const url = this._httpHelper.getUrl(resourceUri);
@@ -2371,9 +3552,20 @@ var OutsideProcessesManager = class {
2371
3552
  // lib/vvRestApi/securityMembersManager.js
2372
3553
  init_cjs_shims();
2373
3554
  var SecurityMembersManager = class {
3555
+ /**
3556
+ * @param {object} httpHelper - The HTTP helper instance used to make API requests.
3557
+ */
2374
3558
  constructor(httpHelper) {
2375
3559
  this._httpHelper = httpHelper;
2376
3560
  }
3561
+ /**
3562
+ * Adds a user or group as a security member to a parent resource.
3563
+ * @param {string} parentId - The ID (Guid) of the parent resource to add the member to.
3564
+ * @param {string} memberId - The ID (Guid) of the user or group to add as a member.
3565
+ * @param {string} roleType - The role to assign to the member on the parent resource.
3566
+ * @param {boolean} isGroup - Whether the member being added is a group.
3567
+ * @returns {Promise<string>} JSON string containing the created security member details.
3568
+ */
2377
3569
  addSecurityMember(parentId, memberId, roleType, isGroup) {
2378
3570
  const resourceUri = this._httpHelper._config.ResourceUri.SecurityMembers;
2379
3571
  const url = this._httpHelper.getUrl(resourceUri);
@@ -2386,6 +3578,11 @@ var SecurityMembersManager = class {
2386
3578
  };
2387
3579
  return this._httpHelper.doVvClientRequest(url, opts, null, postData);
2388
3580
  }
3581
+ /**
3582
+ * Retrieves all security members associated with a parent resource.
3583
+ * @param {string} parentId - The ID (Guid) of the parent resource whose members to retrieve.
3584
+ * @returns {Promise<string>} JSON string containing the list of security members.
3585
+ */
2389
3586
  getSecurityMembersForParentId(parentId) {
2390
3587
  const resourceUri = this._httpHelper._config.ResourceUri.SecurityMembers;
2391
3588
  const url = this._httpHelper.getUrl(resourceUri);
@@ -2395,6 +3592,12 @@ var SecurityMembersManager = class {
2395
3592
  };
2396
3593
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2397
3594
  }
3595
+ /**
3596
+ * Removes a security member from a parent resource.
3597
+ * @param {string} parentId - The ID (Guid) of the parent resource to remove the member from.
3598
+ * @param {string} memberId - The ID (Guid) of the user or group to remove.
3599
+ * @returns {Promise<string>} JSON string confirming the security member was removed.
3600
+ */
2398
3601
  removeSecurityMember(parentId, memberId) {
2399
3602
  const resourceUri = this._httpHelper._config.ResourceUri.SecurityMembers;
2400
3603
  const url = this._httpHelper.getUrl(resourceUri);
@@ -2405,6 +3608,13 @@ var SecurityMembersManager = class {
2405
3608
  };
2406
3609
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2407
3610
  }
3611
+ /**
3612
+ * Updates the role of an existing security member on a parent resource.
3613
+ * @param {string} parentId - The ID (Guid) of the parent resource containing the member.
3614
+ * @param {string} memberId - The ID (Guid) of the user or group whose role to update.
3615
+ * @param {string} roleType - The new role to assign to the member.
3616
+ * @returns {Promise<string>} JSON string confirming the security member role was updated.
3617
+ */
2408
3618
  updateSecurityMember(parentId, memberId, roleType) {
2409
3619
  const resourceUri = this._httpHelper._config.ResourceUri.SecurityMembers;
2410
3620
  const url = this._httpHelper.getUrl(resourceUri);
@@ -2421,9 +3631,16 @@ var SecurityMembersManager = class {
2421
3631
  // lib/vvRestApi/layoutsManager.js
2422
3632
  init_cjs_shims();
2423
3633
  var LayoutsManager = class {
3634
+ /**
3635
+ * @param {object} httpHelper - The HTTP helper instance used to make API requests.
3636
+ */
2424
3637
  constructor(httpHelper) {
2425
3638
  this._httpHelper = httpHelper;
2426
3639
  }
3640
+ /**
3641
+ * Retrieves the layout configuration for the current site.
3642
+ * @returns {Promise<string>} JSON string containing the layout configuration.
3643
+ */
2427
3644
  getLayout() {
2428
3645
  const resourceUri = this._httpHelper._config.ResourceUri.Layout;
2429
3646
  const url = this._httpHelper.getUrl(resourceUri);
@@ -2435,15 +3652,29 @@ var LayoutsManager = class {
2435
3652
  // lib/vvRestApi/reportsManager.js
2436
3653
  init_cjs_shims();
2437
3654
  var ReportsManager = class {
3655
+ /**
3656
+ * @param {object} httpHelper - The HTTP helper instance used to make API requests.
3657
+ */
2438
3658
  constructor(httpHelper) {
2439
3659
  this._httpHelper = httpHelper;
2440
3660
  }
3661
+ /**
3662
+ * Retrieves a list of available reports.
3663
+ * @param {object} params - URL parameters to include in the request.
3664
+ * @returns {Promise<string>} JSON string containing the list of reports.
3665
+ */
2441
3666
  getReports(params) {
2442
3667
  const resourceUri = this._httpHelper._config.ResourceUri.Reports;
2443
3668
  const url = this._httpHelper.getUrl(resourceUri);
2444
3669
  const opts = { method: "GET" };
2445
3670
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2446
3671
  }
3672
+ /**
3673
+ * Downloads a report as a PDF by its ID.
3674
+ * @param {string} reportId - The ID (Guid) of the report to download.
3675
+ * @param {object} params - URL parameters to include in the request.
3676
+ * @returns {Promise<Buffer>} The API response containing the raw PDF file bytes.
3677
+ */
2447
3678
  getReportPDF(reportId, params) {
2448
3679
  const resourceUri = this._httpHelper._config.ResourceUri.ReportServerPDF.replace("{id}", reportId);
2449
3680
  const url = this._httpHelper.getUrl(resourceUri);
@@ -2455,29 +3686,55 @@ var ReportsManager = class {
2455
3686
  // lib/vvRestApi/languageResourcesManager.js
2456
3687
  init_cjs_shims();
2457
3688
  var LanguageResourcesManager = class {
3689
+ /**
3690
+ * @param {object} httpHelper - The HTTP helper instance used to make API requests.
3691
+ * @param {string} baseUrl - The base URL of the VisualVault server.
3692
+ */
2458
3693
  constructor(httpHelper, baseUrl) {
2459
3694
  this._httpHelper = httpHelper;
2460
3695
  this._baseUrl = baseUrl;
2461
3696
  this._apiUrl = httpHelper._config.BaseApiUri;
2462
3697
  }
3698
+ /**
3699
+ * Retrieves available language areas.
3700
+ * @param {object} params - URL parameters to include in the request.
3701
+ * @returns {Promise<string>} JSON string containing the list of language areas.
3702
+ */
2463
3703
  getLanguageAreas(params) {
2464
3704
  const resourceUri = this._httpHelper._config.ResourceUri.LanguageAreas;
2465
3705
  const url = this._baseUrl + this._apiUrl + resourceUri;
2466
3706
  const opts = { method: "GET" };
2467
3707
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2468
3708
  }
3709
+ /**
3710
+ * Retrieves available languages.
3711
+ * @param {object} params - URL parameters to include in the request.
3712
+ * @returns {Promise<string>} JSON string containing the list of available languages.
3713
+ */
2469
3714
  getLanguages(params) {
2470
3715
  const resourceUri = this._httpHelper._config.ResourceUri.Languages;
2471
3716
  const url = this._baseUrl + this._apiUrl + resourceUri;
2472
3717
  const opts = { method: "GET" };
2473
3718
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2474
3719
  }
3720
+ /**
3721
+ * Exports language resource translations as a downloadable file.
3722
+ * @param {object} params - URL parameters to include in the request.
3723
+ * @returns {Promise<Buffer>} The API response containing the raw exported language file bytes.
3724
+ */
2475
3725
  exportLanguages(params) {
2476
3726
  const resourceUri = this._httpHelper._config.ResourceUri.ExportLanguages;
2477
3727
  const url = this._httpHelper.getUrl(resourceUri);
2478
3728
  const opts = { method: "GETSTREAM" };
2479
3729
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2480
3730
  }
3731
+ /**
3732
+ * Imports language resource translations from a file.
3733
+ * @param {object} params - URL parameters containing the target area and language (params.area, params.lang).
3734
+ * @param {Buffer} fileData - The raw file bytes of the language file to import.
3735
+ * @param {string} fileName - The name of the file being imported.
3736
+ * @returns {Promise<string>} JSON string confirming the language import was processed.
3737
+ */
2481
3738
  importLanguages(params, fileData, fileName) {
2482
3739
  const resourceUri = this._httpHelper._config.ResourceUri.ImportLanguages;
2483
3740
  const url = this._httpHelper.getUrl(resourceUri) + `?area=${params.area}&lang=${params.lang}`;
@@ -2490,27 +3747,55 @@ var LanguageResourcesManager = class {
2490
3747
  // lib/vvRestApi/dropdownListsManager.js
2491
3748
  init_cjs_shims();
2492
3749
  var DropdownListsManager = class {
3750
+ /**
3751
+ * @param {object} httpHelper - The HTTP helper instance used to make API requests.
3752
+ */
2493
3753
  constructor(httpHelper) {
2494
3754
  this._httpHelper = httpHelper;
2495
3755
  }
3756
+ /**
3757
+ * Retrieves all dropdown lists.
3758
+ * @param {object} params - URL parameters to include in the request.
3759
+ * @returns {Promise<string>} JSON string containing the list of dropdown lists.
3760
+ */
2496
3761
  getDropDownLists(params) {
2497
3762
  const resourceUri = this._httpHelper._config.ResourceUri.DropDownLists;
2498
3763
  const url = this._httpHelper.getUrl(resourceUri);
2499
3764
  const opts = { method: "GET" };
2500
3765
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2501
3766
  }
3767
+ /**
3768
+ * Retrieves a specific dropdown list by its ID.
3769
+ * @param {object} params - URL parameters to include in the request.
3770
+ * @param {string} listId - The ID (Guid) of the dropdown list to retrieve.
3771
+ * @returns {Promise<string>} JSON string containing the dropdown list details.
3772
+ */
2502
3773
  getDropDownListById(params, listId) {
2503
3774
  const resourceUri = this._httpHelper._config.ResourceUri.DropDownListsId.replace("{id}", listId);
2504
3775
  const url = this._httpHelper.getUrl(resourceUri);
2505
3776
  const opts = { method: "GET" };
2506
3777
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2507
3778
  }
3779
+ /**
3780
+ * Retrieves the items of a specific dropdown list by its ID.
3781
+ * @param {object} params - URL parameters to include in the request.
3782
+ * @param {string} listId - The ID (Guid) of the dropdown list whose items to retrieve.
3783
+ * @returns {Promise<string>} JSON string containing the dropdown list items.
3784
+ */
2508
3785
  getDropDownListItemsById(params, listId) {
2509
3786
  const resourceUri = this._httpHelper._config.ResourceUri.DropDownListsIdItems.replace("{id}", listId);
2510
3787
  const url = this._httpHelper.getUrl(resourceUri);
2511
3788
  const opts = { method: "GET" };
2512
3789
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2513
3790
  }
3791
+ /**
3792
+ * Creates a new dropdown list with the specified items.
3793
+ * @param {object} params - URL parameters to include in the request.
3794
+ * @param {string} ddName - The name of the new dropdown list.
3795
+ * @param {string} ddDescription - The description of the new dropdown list.
3796
+ * @param {object[]} ddItems - The items to include in the new dropdown list.
3797
+ * @returns {Promise<string>} JSON string containing the created dropdown list details.
3798
+ */
2514
3799
  addDropDownList(params, ddName, ddDescription, ddItems) {
2515
3800
  const resourceUri = this._httpHelper._config.ResourceUri.DropDownLists;
2516
3801
  const url = this._httpHelper.getUrl(resourceUri);
@@ -2522,12 +3807,27 @@ var DropdownListsManager = class {
2522
3807
  };
2523
3808
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
2524
3809
  }
3810
+ /**
3811
+ * Deletes a dropdown list by its ID.
3812
+ * @param {object} params - URL parameters to include in the request.
3813
+ * @param {string} listId - The ID (Guid) of the dropdown list to delete.
3814
+ * @returns {Promise<string>} JSON string confirming the dropdown list was deleted.
3815
+ */
2525
3816
  deleteDropDownList(params, listId) {
2526
3817
  const resourceUri = this._httpHelper._config.ResourceUri.DropDownListsId.replace("{id}", listId);
2527
3818
  const url = this._httpHelper.getUrl(resourceUri);
2528
3819
  const opts = { method: "DELETE" };
2529
3820
  return this._httpHelper.doVvClientRequest(url, opts, params, null);
2530
3821
  }
3822
+ /**
3823
+ * Updates an existing dropdown list by its ID.
3824
+ * @param {object} params - URL parameters to include in the request.
3825
+ * @param {string} listId - The ID (Guid) of the dropdown list to update.
3826
+ * @param {string} ddName - The updated name for the dropdown list.
3827
+ * @param {string} ddDescription - The updated description for the dropdown list.
3828
+ * @param {object[]} items - The updated items for the dropdown list.
3829
+ * @returns {Promise<string>} JSON string confirming the dropdown list was updated.
3830
+ */
2531
3831
  updateDropDownList(params, listId, ddName, ddDescription, items) {
2532
3832
  const resourceUri = this._httpHelper._config.ResourceUri.DropDownListsId.replace("{id}", listId);
2533
3833
  const url = this._httpHelper.getUrl(resourceUri);
@@ -2539,6 +3839,13 @@ var DropdownListsManager = class {
2539
3839
  };
2540
3840
  return this._httpHelper.doVvClientRequest(url, opts, params, data);
2541
3841
  }
3842
+ /**
3843
+ * Deletes one or more items from a dropdown list.
3844
+ * @param {object} params - URL parameters to include in the request.
3845
+ * @param {string} listId - The ID (Guid) of the dropdown list containing the items to delete.
3846
+ * @param {string[]} itemIds - Array of item IDs to delete from the dropdown list.
3847
+ * @returns {Promise<string>} JSON string confirming the items were deleted.
3848
+ */
2542
3849
  deleteDropDownListItem(params, listId, itemIds) {
2543
3850
  const resourceUri = this._httpHelper._config.ResourceUri.DropDownListsIdItems.replace("{id}", listId);
2544
3851
  const url = this._httpHelper.getUrl(resourceUri);
@@ -2553,51 +3860,51 @@ var debug5 = (0, import_debug5.default)("visualvault:api");
2553
3860
  var __filename7 = (0, import_url6.fileURLToPath)(importMetaUrl);
2554
3861
  var __dirname6 = import_path6.default.dirname(__filename7);
2555
3862
  var VVClient = class {
2556
- /** @type {*} */
3863
+ /** @type {Constants} */
2557
3864
  constants;
2558
- /** @type {*} */
3865
+ /** @type {ConfigurationManager} */
2559
3866
  configuration;
2560
- /** @type {*} */
3867
+ /** @type {CustomQueryManager} */
2561
3868
  customQuery;
2562
- /** @type {*} */
3869
+ /** @type {DocumentsManager} */
2563
3870
  documents;
2564
- /** @type {*} */
3871
+ /** @type {EmailManager} */
2565
3872
  email;
2566
- /** @type {*} */
3873
+ /** @type {FilesManager} */
2567
3874
  files;
2568
- /** @type {*} */
3875
+ /** @type {FormsManager} */
2569
3876
  forms;
2570
- /** @type {*} */
3877
+ /** @type {GroupsManager} */
2571
3878
  groups;
2572
- /** @type {*} */
3879
+ /** @type {LibraryManager} */
2573
3880
  library;
2574
- /** @type {*} */
3881
+ /** @type {SitesManager} */
2575
3882
  sites;
2576
- /** @type {*} */
3883
+ /** @type {UsersManager} */
2577
3884
  users;
2578
- /** @type {*} */
3885
+ /** @type {ScheduledProcessManager} */
2579
3886
  scheduledProcess;
2580
- /** @type {*} */
3887
+ /** @type {ScriptsManager} */
2581
3888
  scripts;
2582
- /** @type {*} */
3889
+ /** @type {ProjectsManager} */
2583
3890
  projects;
2584
- /** @type {*} */
3891
+ /** @type {CustomerManager} */
2585
3892
  customer;
2586
- /** @type {*} */
3893
+ /** @type {CustomerDatabaseManager} */
2587
3894
  customerDatabase;
2588
- /** @type {*} */
3895
+ /** @type {IndexFieldsManager} */
2589
3896
  indexFields;
2590
- /** @type {*} */
3897
+ /** @type {OutsideProcessesManager} */
2591
3898
  outsideProcesses;
2592
- /** @type {*} */
3899
+ /** @type {SecurityMembersManager} */
2593
3900
  securityMembers;
2594
- /** @type {*} */
3901
+ /** @type {LayoutsManager} */
2595
3902
  layouts;
2596
- /** @type {*} */
3903
+ /** @type {ReportsManager} */
2597
3904
  reports;
2598
- /** @type {*} */
3905
+ /** @type {LanguageResourcesManager} */
2599
3906
  languageResources;
2600
- /** @type {*} */
3907
+ /** @type {DropdownListsManager} */
2601
3908
  dropdownLists;
2602
3909
  /**
2603
3910
  * @param {*} sessionToken - Session token from authentication