@verdocs/js-sdk 6.2.0-beta.6 → 6.2.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -8
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1732,7 +1732,7 @@ declare const updateEnvelope: (endpoint: VerdocsEndpoint, envelopeId: string, pa
|
|
|
1732
1732
|
* @apiBody value . Value to set.
|
|
1733
1733
|
* @apiSuccess IEnvelopeField . A copy of the newly-updated field.
|
|
1734
1734
|
*/
|
|
1735
|
-
declare const updateEnvelopeField: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string, fieldName: string, value:
|
|
1735
|
+
declare const updateEnvelopeField: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string, fieldName: string, value: string, prepared: boolean) => Promise<IEnvelopeField>;
|
|
1736
1736
|
/**
|
|
1737
1737
|
* Upload an attachment to an attachment field.
|
|
1738
1738
|
*/
|
|
@@ -3526,7 +3526,7 @@ declare const toggleTemplateStar: (endpoint: VerdocsEndpoint, templateId: string
|
|
|
3526
3526
|
* ```typescript
|
|
3527
3527
|
* import {TemplateDocument} from '@verdocs/js-sdk/Templates';
|
|
3528
3528
|
*
|
|
3529
|
-
* await TemplateDocument.createDocument(
|
|
3529
|
+
* await TemplateDocument.createDocument(VerdocsEndpoint.getDefault(), templateID, params);
|
|
3530
3530
|
* ```
|
|
3531
3531
|
*
|
|
3532
3532
|
* @group Template Documents
|
|
@@ -3540,16 +3540,16 @@ declare const createTemplateDocument: (endpoint: VerdocsEndpoint, template_id: s
|
|
|
3540
3540
|
* Delete a specific Document.
|
|
3541
3541
|
*
|
|
3542
3542
|
* ```typescript
|
|
3543
|
-
* import {
|
|
3543
|
+
* import {deleteTemplateDocument} from '@verdocs/js-sdk/Templates';
|
|
3544
3544
|
*
|
|
3545
|
-
* await
|
|
3545
|
+
* await deleteTemplateDocument(VerdocsEndpoint.getDefault(), documentID);
|
|
3546
3546
|
* ```
|
|
3547
3547
|
*
|
|
3548
3548
|
* @group Template Documents
|
|
3549
|
-
* @api DELETE /v2/
|
|
3549
|
+
* @api DELETE /v2/template-documents/:document_id Delete a template document
|
|
3550
3550
|
* @apiSuccess string . Success
|
|
3551
3551
|
*/
|
|
3552
|
-
declare const deleteTemplateDocument: (endpoint: VerdocsEndpoint,
|
|
3552
|
+
declare const deleteTemplateDocument: (endpoint: VerdocsEndpoint, documentId: string) => Promise<ITemplate>;
|
|
3553
3553
|
/**
|
|
3554
3554
|
* Get all metadata for a template document. Note that when called by non-creators (e.g. Org Collaborators)
|
|
3555
3555
|
* this will return only the **metadata** the caller is allowed to view.
|
package/dist/index.d.ts
CHANGED
|
@@ -1732,7 +1732,7 @@ declare const updateEnvelope: (endpoint: VerdocsEndpoint, envelopeId: string, pa
|
|
|
1732
1732
|
* @apiBody value . Value to set.
|
|
1733
1733
|
* @apiSuccess IEnvelopeField . A copy of the newly-updated field.
|
|
1734
1734
|
*/
|
|
1735
|
-
declare const updateEnvelopeField: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string, fieldName: string, value:
|
|
1735
|
+
declare const updateEnvelopeField: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string, fieldName: string, value: string, prepared: boolean) => Promise<IEnvelopeField>;
|
|
1736
1736
|
/**
|
|
1737
1737
|
* Upload an attachment to an attachment field.
|
|
1738
1738
|
*/
|
|
@@ -3526,7 +3526,7 @@ declare const toggleTemplateStar: (endpoint: VerdocsEndpoint, templateId: string
|
|
|
3526
3526
|
* ```typescript
|
|
3527
3527
|
* import {TemplateDocument} from '@verdocs/js-sdk/Templates';
|
|
3528
3528
|
*
|
|
3529
|
-
* await TemplateDocument.createDocument(
|
|
3529
|
+
* await TemplateDocument.createDocument(VerdocsEndpoint.getDefault(), templateID, params);
|
|
3530
3530
|
* ```
|
|
3531
3531
|
*
|
|
3532
3532
|
* @group Template Documents
|
|
@@ -3540,16 +3540,16 @@ declare const createTemplateDocument: (endpoint: VerdocsEndpoint, template_id: s
|
|
|
3540
3540
|
* Delete a specific Document.
|
|
3541
3541
|
*
|
|
3542
3542
|
* ```typescript
|
|
3543
|
-
* import {
|
|
3543
|
+
* import {deleteTemplateDocument} from '@verdocs/js-sdk/Templates';
|
|
3544
3544
|
*
|
|
3545
|
-
* await
|
|
3545
|
+
* await deleteTemplateDocument(VerdocsEndpoint.getDefault(), documentID);
|
|
3546
3546
|
* ```
|
|
3547
3547
|
*
|
|
3548
3548
|
* @group Template Documents
|
|
3549
|
-
* @api DELETE /v2/
|
|
3549
|
+
* @api DELETE /v2/template-documents/:document_id Delete a template document
|
|
3550
3550
|
* @apiSuccess string . Success
|
|
3551
3551
|
*/
|
|
3552
|
-
declare const deleteTemplateDocument: (endpoint: VerdocsEndpoint,
|
|
3552
|
+
declare const deleteTemplateDocument: (endpoint: VerdocsEndpoint, documentId: string) => Promise<ITemplate>;
|
|
3553
3553
|
/**
|
|
3554
3554
|
* Get all metadata for a template document. Note that when called by non-creators (e.g. Org Collaborators)
|
|
3555
3555
|
* this will return only the **metadata** the caller is allowed to view.
|
package/dist/index.js
CHANGED
|
@@ -1688,8 +1688,8 @@ const updateEnvelope = async (endpoint, envelopeId, params) => endpoint.api //
|
|
|
1688
1688
|
* @apiBody value . Value to set.
|
|
1689
1689
|
* @apiSuccess IEnvelopeField . A copy of the newly-updated field.
|
|
1690
1690
|
*/
|
|
1691
|
-
const updateEnvelopeField = async (endpoint, envelopeId, roleName, fieldName, value) => endpoint.api //
|
|
1692
|
-
.put(`/v2/envelopes/${envelopeId}/recipients/${roleName}/fields/${fieldName}`, { value })
|
|
1691
|
+
const updateEnvelopeField = async (endpoint, envelopeId, roleName, fieldName, value, prepared) => endpoint.api //
|
|
1692
|
+
.put(`/v2/envelopes/${envelopeId}/recipients/${roleName}/fields/${fieldName}`, { value, prepared })
|
|
1693
1693
|
.then((r) => r.data);
|
|
1694
1694
|
/**
|
|
1695
1695
|
* Upload an attachment to an attachment field.
|
|
@@ -1697,6 +1697,7 @@ const updateEnvelopeField = async (endpoint, envelopeId, roleName, fieldName, va
|
|
|
1697
1697
|
const uploadEnvelopeFieldAttachment = async (endpoint, envelopeId, roleName, fieldName, file, onUploadProgress) => {
|
|
1698
1698
|
const formData = new FormData();
|
|
1699
1699
|
formData.append('document', file, file.name);
|
|
1700
|
+
formData.append('value', '');
|
|
1700
1701
|
return endpoint.api //
|
|
1701
1702
|
.put(`/v2/envelopes/${envelopeId}/recipients/${roleName}/fields/${fieldName}`, formData, {
|
|
1702
1703
|
timeout: 120000,
|
|
@@ -2440,7 +2441,7 @@ const toggleTemplateStar = (endpoint, templateId) => endpoint.api //
|
|
|
2440
2441
|
* ```typescript
|
|
2441
2442
|
* import {TemplateDocument} from '@verdocs/js-sdk/Templates';
|
|
2442
2443
|
*
|
|
2443
|
-
* await TemplateDocument.createDocument(
|
|
2444
|
+
* await TemplateDocument.createDocument(VerdocsEndpoint.getDefault(), templateID, params);
|
|
2444
2445
|
* ```
|
|
2445
2446
|
*
|
|
2446
2447
|
* @group Template Documents
|
|
@@ -2468,17 +2469,17 @@ const createTemplateDocument = (endpoint, template_id, file, onUploadProgress) =
|
|
|
2468
2469
|
* Delete a specific Document.
|
|
2469
2470
|
*
|
|
2470
2471
|
* ```typescript
|
|
2471
|
-
* import {
|
|
2472
|
+
* import {deleteTemplateDocument} from '@verdocs/js-sdk/Templates';
|
|
2472
2473
|
*
|
|
2473
|
-
* await
|
|
2474
|
+
* await deleteTemplateDocument(VerdocsEndpoint.getDefault(), documentID);
|
|
2474
2475
|
* ```
|
|
2475
2476
|
*
|
|
2476
2477
|
* @group Template Documents
|
|
2477
|
-
* @api DELETE /v2/
|
|
2478
|
+
* @api DELETE /v2/template-documents/:document_id Delete a template document
|
|
2478
2479
|
* @apiSuccess string . Success
|
|
2479
2480
|
*/
|
|
2480
|
-
const deleteTemplateDocument = (endpoint,
|
|
2481
|
-
.delete(`/v2/
|
|
2481
|
+
const deleteTemplateDocument = (endpoint, documentId) => endpoint.api //
|
|
2482
|
+
.delete(`/v2/template-documents/${documentId}`)
|
|
2482
2483
|
.then((r) => r.data);
|
|
2483
2484
|
/**
|
|
2484
2485
|
* Get all metadata for a template document. Note that when called by non-creators (e.g. Org Collaborators)
|