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