@verdocs/js-sdk 3.0.35 → 3.0.36

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.
@@ -121,3 +121,14 @@ export declare const updateEnvelopeFieldSignature: (endpoint: VerdocsEndpoint, e
121
121
  * signature for a Recipient, then call `Documents.updateDocumentFieldSignature()` to attach it to a field.
122
122
  */
123
123
  export declare const updateEnvelopeFieldInitials: (endpoint: VerdocsEndpoint, envelopeId: string, fieldName: string, initialId: string) => Promise<IDocumentFieldSettings>;
124
+ /**
125
+ * Get the attached file for an attachment field (if any)
126
+ */
127
+ export declare const getFieldAttachment: (endpoint: VerdocsEndpoint, envelopeId: string, fieldName: string) => Promise<any>;
128
+ /**
129
+ * Get all of the envelopes that were sent using a given template.
130
+ * NOTE: This endpoint will be retired soon. Its response is not paginated and it is typically used only to retrieve
131
+ * "submitted data" for a template. A new endpoint will be introduced to provide this function more directly.
132
+ * @deprecated
133
+ */
134
+ export declare const getEnvelopesByTemplateId: (endpoint: VerdocsEndpoint, templateId: string) => Promise<IEnvelope[]>;
@@ -227,3 +227,26 @@ export var updateEnvelopeFieldInitials = function (endpoint, envelopeId, fieldNa
227
227
  .then(function (r) { return r.data; })];
228
228
  });
229
229
  }); };
230
+ /**
231
+ * Get the attached file for an attachment field (if any)
232
+ */
233
+ export var getFieldAttachment = function (endpoint, envelopeId, fieldName) { return __awaiter(void 0, void 0, void 0, function () {
234
+ return __generator(this, function (_a) {
235
+ return [2 /*return*/, endpoint.api //
236
+ .get("/envelopes/".concat(envelopeId, "/fields/").concat(fieldName, "/document"), { responseType: 'blob' })
237
+ .then(function (r) { return r.data; })];
238
+ });
239
+ }); };
240
+ /**
241
+ * Get all of the envelopes that were sent using a given template.
242
+ * NOTE: This endpoint will be retired soon. Its response is not paginated and it is typically used only to retrieve
243
+ * "submitted data" for a template. A new endpoint will be introduced to provide this function more directly.
244
+ * @deprecated
245
+ */
246
+ export var getEnvelopesByTemplateId = function (endpoint, templateId) { return __awaiter(void 0, void 0, void 0, function () {
247
+ return __generator(this, function (_a) {
248
+ return [2 /*return*/, endpoint.api //
249
+ .get("/envelopes?template_id=".concat(templateId))
250
+ .then(function (r) { return r.data; })];
251
+ });
252
+ }); };
@@ -62,5 +62,22 @@ export interface ISignerTokenResponse {
62
62
  signerToken: string;
63
63
  inPersonAccessKey: IInPersonAccessKey;
64
64
  }
65
+ /**
66
+ * Get a signing token.
67
+ */
65
68
  export declare const getSignerToken: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string) => Promise<ISignerTokenResponse>;
66
- export declare const getInPersonLink: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string) => Promise<ISignerTokenResponse>;
69
+ export interface IInPersonLinkResponse {
70
+ link: string;
71
+ }
72
+ /**
73
+ * Get an in-person signing link.
74
+ */
75
+ export declare const getInPersonLink: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string) => Promise<IInPersonLinkResponse>;
76
+ /**
77
+ * Send a delegation request.
78
+ */
79
+ export declare const sendDelegate: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string) => Promise<IEnvelope>;
80
+ /**
81
+ * Resend a recipient's invitation.
82
+ */
83
+ export declare const resendInvitation: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string) => Promise<any>;
@@ -78,13 +78,35 @@ export var envelopeRecipientUpdateName = function (endpoint, envelopeId, roleNam
78
78
  export var envelopeRecipientPrepare = function (endpoint, envelopeId, roleName, recipients) {
79
79
  return updateRecipient(endpoint, envelopeId, roleName, { action: 'prepare', recipients: recipients });
80
80
  };
81
+ /**
82
+ * Get a signing token.
83
+ */
81
84
  export var getSignerToken = function (endpoint, envelopeId, roleName) {
82
85
  return endpoint.api //
83
86
  .get("/envelopes/".concat(envelopeId, "/recipients/").concat(encodeURIComponent(roleName), "/signer-token"))
84
87
  .then(function (r) { return r.data; });
85
88
  };
89
+ /**
90
+ * Get an in-person signing link.
91
+ */
86
92
  export var getInPersonLink = function (endpoint, envelopeId, roleName) {
87
93
  return endpoint.api //
88
94
  .get("/envelopes/".concat(envelopeId, "/recipients/").concat(encodeURIComponent(roleName), "?in_person_link=true"))
89
95
  .then(function (r) { return r.data; });
90
96
  };
97
+ /**
98
+ * Send a delegation request.
99
+ */
100
+ export var sendDelegate = function (endpoint, envelopeId, roleName) {
101
+ return endpoint.api //
102
+ .post("/envelopes/".concat(envelopeId, "/recipients/").concat(encodeURIComponent(roleName), "/delegate"))
103
+ .then(function (r) { return r.data; });
104
+ };
105
+ /**
106
+ * Resend a recipient's invitation.
107
+ */
108
+ export var resendInvitation = function (endpoint, envelopeId, roleName) {
109
+ return endpoint.api //
110
+ .post("/envelopes/".concat(envelopeId, "/recipients/").concat(encodeURIComponent(roleName), "/resend_invitation"))
111
+ .then(function (r) { return r.data; });
112
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdocs/js-sdk",
3
- "version": "3.0.35",
3
+ "version": "3.0.36",
4
4
  "private": false,
5
5
  "homepage": "https://github.com/Verdocs/js-sdk",
6
6
  "description": "Verdocs JS SDK",