@verdocs/js-sdk 3.0.33 → 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.
- package/Envelopes/Envelopes.d.ts +12 -0
- package/Envelopes/Envelopes.js +23 -0
- package/Envelopes/Recipients.d.ts +18 -1
- package/Envelopes/Recipients.js +22 -0
- package/Envelopes/Types.d.ts +3 -2
- package/package.json +1 -1
package/Envelopes/Envelopes.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export interface ICreateEnvelopeRequest {
|
|
|
5
5
|
template_id: string;
|
|
6
6
|
roles: ICreateEnvelopeRole[];
|
|
7
7
|
name: string;
|
|
8
|
+
environment?: string;
|
|
8
9
|
}
|
|
9
10
|
/**
|
|
10
11
|
* Create an envelope
|
|
@@ -120,3 +121,14 @@ export declare const updateEnvelopeFieldSignature: (endpoint: VerdocsEndpoint, e
|
|
|
120
121
|
* signature for a Recipient, then call `Documents.updateDocumentFieldSignature()` to attach it to a field.
|
|
121
122
|
*/
|
|
122
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[]>;
|
package/Envelopes/Envelopes.js
CHANGED
|
@@ -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
|
|
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>;
|
package/Envelopes/Recipients.js
CHANGED
|
@@ -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/Envelopes/Types.d.ts
CHANGED
|
@@ -91,20 +91,21 @@ export interface IEnvelopesSummary {
|
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
export interface IRecipient {
|
|
94
|
+
envelope_id: string;
|
|
95
|
+
role_name: string;
|
|
94
96
|
agreed: boolean;
|
|
95
97
|
claimed: boolean;
|
|
96
98
|
created_at: string;
|
|
97
99
|
delegated_to: string | null;
|
|
98
100
|
delegator: boolean;
|
|
99
101
|
email: string;
|
|
100
|
-
envelope_id: string;
|
|
101
102
|
full_name: string;
|
|
102
103
|
in_app_access_key?: string;
|
|
103
104
|
key_used_to_conclude?: string;
|
|
104
105
|
message: string | null;
|
|
105
106
|
phone: string | null;
|
|
106
107
|
profile_id: string;
|
|
107
|
-
|
|
108
|
+
environment: string;
|
|
108
109
|
/**
|
|
109
110
|
* The sequence number indicates the order in which Recipients act. Multiple recipients may have the same sequence
|
|
110
111
|
* number, in which case they may act in parallel. (e.g. all Recipients at sequence 2 will receive invites once
|