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