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