@verdocs/js-sdk 3.10.30 → 4.0.0
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/README.md +75 -0
- package/dist/index.d.mts +41294 -0
- package/dist/index.d.ts +41294 -0
- package/dist/index.js +3045 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +3036 -0
- package/dist/index.mjs.map +1 -0
- package/dist/package.json +85 -0
- package/dist/tsconfig.json +16 -0
- package/package.json +29 -12
- package/.github/workflows/generate-docs.yml +0 -41
- package/Envelopes/Envelopes.d.ts +0 -242
- package/Envelopes/Envelopes.js +0 -339
- package/Envelopes/Initials.d.ts +0 -15
- package/Envelopes/Initials.js +0 -13
- package/Envelopes/Permissions.d.ts +0 -52
- package/Envelopes/Permissions.js +0 -84
- package/Envelopes/Recipients.d.ts +0 -89
- package/Envelopes/Recipients.js +0 -112
- package/Envelopes/Reminders.d.ts +0 -23
- package/Envelopes/Reminders.js +0 -33
- package/Envelopes/Signatures.d.ts +0 -28
- package/Envelopes/Signatures.js +0 -37
- package/Envelopes/Types.d.ts +0 -390
- package/Envelopes/Types.js +0 -45
- package/Envelopes/index.d.ts +0 -7
- package/Envelopes/index.js +0 -7
- package/Organizations/ApiKeys.d.ts +0 -64
- package/Organizations/ApiKeys.js +0 -82
- package/Organizations/Groups.d.ts +0 -47
- package/Organizations/Groups.js +0 -76
- package/Organizations/Invitations.d.ts +0 -24
- package/Organizations/Invitations.js +0 -45
- package/Organizations/Members.d.ts +0 -12
- package/Organizations/Members.js +0 -30
- package/Organizations/Organizations.d.ts +0 -27
- package/Organizations/Organizations.js +0 -45
- package/Organizations/Types.d.ts +0 -104
- package/Organizations/Types.js +0 -1
- package/Organizations/Webhooks.d.ts +0 -34
- package/Organizations/Webhooks.js +0 -10
- package/Organizations/Whitelabel.d.ts +0 -31
- package/Organizations/Whitelabel.js +0 -38
- package/Organizations/index.d.ts +0 -16
- package/Organizations/index.js +0 -16
- package/Sessions/Types.d.ts +0 -54
- package/Sessions/Types.js +0 -1
- package/Sessions/index.d.ts +0 -6
- package/Sessions/index.js +0 -7
- package/Templates/Actions.d.ts +0 -26
- package/Templates/Actions.js +0 -104
- package/Templates/Fields.d.ts +0 -14
- package/Templates/Fields.js +0 -24
- package/Templates/Pages.d.ts +0 -30
- package/Templates/Pages.js +0 -41
- package/Templates/Permissions.d.ts +0 -73
- package/Templates/Permissions.js +0 -124
- package/Templates/Reminders.d.ts +0 -23
- package/Templates/Reminders.js +0 -33
- package/Templates/Roles.d.ts +0 -16
- package/Templates/Roles.js +0 -42
- package/Templates/Stars.d.ts +0 -10
- package/Templates/Stars.js +0 -16
- package/Templates/Tags.d.ts +0 -33
- package/Templates/Tags.js +0 -55
- package/Templates/TemplateDocuments.d.ts +0 -66
- package/Templates/TemplateDocuments.js +0 -139
- package/Templates/Templates.d.ts +0 -284
- package/Templates/Templates.js +0 -309
- package/Templates/Types.d.ts +0 -346
- package/Templates/Types.js +0 -29
- package/Templates/Validators.d.ts +0 -21
- package/Templates/Validators.js +0 -27
- package/Templates/index.d.ts +0 -11
- package/Templates/index.js +0 -11
- package/Users/Auth.d.ts +0 -123
- package/Users/Auth.js +0 -142
- package/Users/Billing.d.ts +0 -1
- package/Users/Billing.js +0 -2
- package/Users/Notifications.d.ts +0 -2
- package/Users/Notifications.js +0 -43
- package/Users/Profiles.d.ts +0 -151
- package/Users/Profiles.js +0 -179
- package/Users/Types.d.ts +0 -146
- package/Users/Types.js +0 -47
- package/Users/index.d.ts +0 -5
- package/Users/index.js +0 -5
- package/Utils/Colors.d.ts +0 -18
- package/Utils/Colors.js +0 -102
- package/Utils/DateTime.d.ts +0 -6
- package/Utils/DateTime.js +0 -79
- package/Utils/Fields.d.ts +0 -5
- package/Utils/Fields.js +0 -24
- package/Utils/Files.d.ts +0 -16
- package/Utils/Files.js +0 -42
- package/Utils/Locales.d.ts +0 -17
- package/Utils/Locales.js +0 -1358
- package/Utils/Primitives.d.ts +0 -18
- package/Utils/Primitives.js +0 -31
- package/Utils/Strings.d.ts +0 -9
- package/Utils/Strings.js +0 -28
- package/Utils/Token.d.ts +0 -19
- package/Utils/Token.js +0 -67
- package/Utils/globalThis.d.ts +0 -2
- package/Utils/globalThis.js +0 -52
- package/Utils/index.d.ts +0 -8
- package/Utils/index.js +0 -8
- package/VerdocsEndpoint.d.ts +0 -199
- package/VerdocsEndpoint.js +0 -319
- package/index.d.ts +0 -18
- package/index.js +0 -18
- package/tsconfig-typedoc.json +0 -26
package/Envelopes/Recipients.js
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
-
function step(op) {
|
|
15
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
-
switch (op[0]) {
|
|
20
|
-
case 0: case 1: t = op; break;
|
|
21
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
-
default:
|
|
25
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
-
if (t[2]) _.ops.pop();
|
|
30
|
-
_.trys.pop(); continue;
|
|
31
|
-
}
|
|
32
|
-
op = body.call(thisArg, _);
|
|
33
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* Update a recipient's status block
|
|
39
|
-
*/
|
|
40
|
-
export var updateRecipient = function (endpoint, envelopeId, roleName, params) { return __awaiter(void 0, void 0, void 0, function () {
|
|
41
|
-
return __generator(this, function (_a) {
|
|
42
|
-
return [2 /*return*/, endpoint.api //
|
|
43
|
-
.put("/envelopes/".concat(envelopeId, "/recipients/").concat(roleName), params)
|
|
44
|
-
.then(function (r) { return r.data; })];
|
|
45
|
-
});
|
|
46
|
-
}); };
|
|
47
|
-
/**
|
|
48
|
-
* Submit an envelope (signing is finished). Note that all fields must be valid/completed for this to succeed.
|
|
49
|
-
*/
|
|
50
|
-
export var envelopeRecipientSubmit = function (endpoint, envelopeId, roleName) {
|
|
51
|
-
return updateRecipient(endpoint, envelopeId, roleName, { action: 'submit' });
|
|
52
|
-
};
|
|
53
|
-
/**
|
|
54
|
-
* Decline to complete an envelope (signing will not terminated).
|
|
55
|
-
*/
|
|
56
|
-
export var envelopeRecipientDecline = function (endpoint, envelopeId, roleName) {
|
|
57
|
-
return updateRecipient(endpoint, envelopeId, roleName, { action: 'decline' });
|
|
58
|
-
};
|
|
59
|
-
/**
|
|
60
|
-
* Claim / change ownership of an envelope. This is a special-case operation only available in certain workflows.
|
|
61
|
-
*/
|
|
62
|
-
export var envelopeRecipientChangeOwner = function (endpoint, envelopeId, roleName, email, fullName) { return updateRecipient(endpoint, envelopeId, roleName, { action: 'owner_update', email: email, full_name: fullName }); };
|
|
63
|
-
/**
|
|
64
|
-
* Agree to electronic signing.
|
|
65
|
-
*/
|
|
66
|
-
export var envelopeRecipientAgree = function (endpoint, envelopeId, roleName, agreed) {
|
|
67
|
-
return updateRecipient(endpoint, envelopeId, roleName, { action: 'update', agreed: agreed });
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* Change a recipient's name.
|
|
71
|
-
*/
|
|
72
|
-
export var envelopeRecipientUpdateName = function (endpoint, envelopeId, roleName, fullName) {
|
|
73
|
-
return updateRecipient(endpoint, envelopeId, roleName, { action: 'update', new_full_name: fullName });
|
|
74
|
-
};
|
|
75
|
-
/**
|
|
76
|
-
* Change a recipient's name.
|
|
77
|
-
*/
|
|
78
|
-
export var envelopeRecipientPrepare = function (endpoint, envelopeId, roleName, recipients) {
|
|
79
|
-
return updateRecipient(endpoint, envelopeId, roleName, { action: 'prepare', recipients: recipients });
|
|
80
|
-
};
|
|
81
|
-
/**
|
|
82
|
-
* Get a signing token.
|
|
83
|
-
*/
|
|
84
|
-
export var getSignerToken = function (endpoint, envelopeId, roleName) {
|
|
85
|
-
return endpoint.api //
|
|
86
|
-
.get("/envelopes/".concat(envelopeId, "/recipients/").concat(encodeURIComponent(roleName), "/signer-token"))
|
|
87
|
-
.then(function (r) { return r.data; });
|
|
88
|
-
};
|
|
89
|
-
/**
|
|
90
|
-
* Get an in-person signing link.
|
|
91
|
-
*/
|
|
92
|
-
export var getInPersonLink = function (endpoint, envelopeId, roleName) {
|
|
93
|
-
return endpoint.api //
|
|
94
|
-
.get("/envelopes/".concat(envelopeId, "/recipients/").concat(encodeURIComponent(roleName), "?in_person_link=true"))
|
|
95
|
-
.then(function (r) { return r.data; });
|
|
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/Reminders.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { VerdocsEndpoint } from '../VerdocsEndpoint';
|
|
2
|
-
import { IReminder } from '../Templates/Types';
|
|
3
|
-
export interface ICreateEnvelopeReminderRequest {
|
|
4
|
-
setup_time: number;
|
|
5
|
-
interval_time: number;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Enable automatic reminders. setup_time is the number of days after the envelope is sent that the first reminder
|
|
9
|
-
* should be sent. interval_time is the number of days between reminders.
|
|
10
|
-
*/
|
|
11
|
-
export declare const createReminder: (endpoint: VerdocsEndpoint, envelopeId: string, params: ICreateEnvelopeReminderRequest) => Promise<IReminder>;
|
|
12
|
-
/**
|
|
13
|
-
* Get the reminder configuration for an envelope.
|
|
14
|
-
*/
|
|
15
|
-
export declare const getReminder: (endpoint: VerdocsEndpoint, envelopeId: string, reminderId: string) => Promise<IReminder>;
|
|
16
|
-
/**
|
|
17
|
-
* Update the reminder configuration for an envelope.
|
|
18
|
-
*/
|
|
19
|
-
export declare const updateReminder: (endpoint: VerdocsEndpoint, envelopeId: string, reminderId: string, params: ICreateEnvelopeReminderRequest) => Promise<IReminder>;
|
|
20
|
-
/**
|
|
21
|
-
* Delete the reminder configuration for an envelope.
|
|
22
|
-
*/
|
|
23
|
-
export declare const deleteReminder: (endpoint: VerdocsEndpoint, envelopeId: string, reminderId: string) => Promise<any>;
|
package/Envelopes/Reminders.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Enable automatic reminders. setup_time is the number of days after the envelope is sent that the first reminder
|
|
3
|
-
* should be sent. interval_time is the number of days between reminders.
|
|
4
|
-
*/
|
|
5
|
-
export var createReminder = function (endpoint, envelopeId, params) {
|
|
6
|
-
return endpoint.api //
|
|
7
|
-
.post("/envelopes/".concat(envelopeId, "/reminder/"), params)
|
|
8
|
-
.then(function (r) { return r.data; });
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Get the reminder configuration for an envelope.
|
|
12
|
-
*/
|
|
13
|
-
export var getReminder = function (endpoint, envelopeId, reminderId) {
|
|
14
|
-
return endpoint.api //
|
|
15
|
-
.get("/envelopes/".concat(envelopeId, "/reminder/").concat(reminderId))
|
|
16
|
-
.then(function (r) { return r.data; });
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Update the reminder configuration for an envelope.
|
|
20
|
-
*/
|
|
21
|
-
export var updateReminder = function (endpoint, envelopeId, reminderId, params) {
|
|
22
|
-
return endpoint.api //
|
|
23
|
-
.put("/envelopes/".concat(envelopeId, "/reminder/").concat(reminderId), params)
|
|
24
|
-
.then(function (r) { return r.data; });
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Delete the reminder configuration for an envelope.
|
|
28
|
-
*/
|
|
29
|
-
export var deleteReminder = function (endpoint, envelopeId, reminderId) {
|
|
30
|
-
return endpoint.api //
|
|
31
|
-
.delete("/envelopes/".concat(envelopeId, "/reminder/").concat(reminderId))
|
|
32
|
-
.then(function (r) { return r.data; });
|
|
33
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { VerdocsEndpoint } from '../VerdocsEndpoint';
|
|
2
|
-
export interface ISignature {
|
|
3
|
-
id: string;
|
|
4
|
-
profile_id: string;
|
|
5
|
-
url: string;
|
|
6
|
-
deleted: boolean;
|
|
7
|
-
created_at: string;
|
|
8
|
-
updated_at: string;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Create a signature block. In a typical signing workflow, the user is asked at the beginning of the process to "adopt"
|
|
12
|
-
* a signature block to be used for all signature fields in the document. Thus, this is typically called one time to
|
|
13
|
-
* create and store a signature block. Thereafter, the ID of the signature block may be re-used for each signature field
|
|
14
|
-
* to be "stamped" by the user.
|
|
15
|
-
*/
|
|
16
|
-
export declare const createSignature: (endpoint: VerdocsEndpoint, name: string, signature: Blob) => Promise<ISignature>;
|
|
17
|
-
/**
|
|
18
|
-
* Get the availbable signatures for a user.
|
|
19
|
-
*/
|
|
20
|
-
export declare const getSignatures: (endpoint: VerdocsEndpoint) => Promise<ISignature[]>;
|
|
21
|
-
/**
|
|
22
|
-
* Get a user's signature by ID.
|
|
23
|
-
*/
|
|
24
|
-
export declare const getSignature: (endpoint: VerdocsEndpoint, signatureId: string) => Promise<any>;
|
|
25
|
-
/**
|
|
26
|
-
* Delete a user's signature.
|
|
27
|
-
*/
|
|
28
|
-
export declare const deleteSignature: (endpoint: VerdocsEndpoint, signatureId: string) => Promise<any>;
|
package/Envelopes/Signatures.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Create a signature block. In a typical signing workflow, the user is asked at the beginning of the process to "adopt"
|
|
3
|
-
* a signature block to be used for all signature fields in the document. Thus, this is typically called one time to
|
|
4
|
-
* create and store a signature block. Thereafter, the ID of the signature block may be re-used for each signature field
|
|
5
|
-
* to be "stamped" by the user.
|
|
6
|
-
*/
|
|
7
|
-
export var createSignature = function (endpoint, name, signature) {
|
|
8
|
-
var data = new FormData();
|
|
9
|
-
data.append('signature', signature, name);
|
|
10
|
-
return endpoint.api //
|
|
11
|
-
.post("/signatures", data)
|
|
12
|
-
.then(function (r) { return r.data; });
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Get the availbable signatures for a user.
|
|
16
|
-
*/
|
|
17
|
-
export var getSignatures = function (endpoint) {
|
|
18
|
-
return endpoint.api //
|
|
19
|
-
.get('/signatures')
|
|
20
|
-
.then(function (r) { return r.data; });
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* Get a user's signature by ID.
|
|
24
|
-
*/
|
|
25
|
-
export var getSignature = function (endpoint, signatureId) {
|
|
26
|
-
return endpoint.api //
|
|
27
|
-
.get("/signatures/".concat(signatureId))
|
|
28
|
-
.then(function (r) { return r.data; });
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* Delete a user's signature.
|
|
32
|
-
*/
|
|
33
|
-
export var deleteSignature = function (endpoint, signatureId) {
|
|
34
|
-
return endpoint.api //
|
|
35
|
-
.delete("/signatures/".concat(signatureId))
|
|
36
|
-
.then(function (r) { return r.data; });
|
|
37
|
-
};
|
package/Envelopes/Types.d.ts
DELETED
|
@@ -1,390 +0,0 @@
|
|
|
1
|
-
import { IProfile } from '../Users/Types';
|
|
2
|
-
export interface ISigningSessionRequest {
|
|
3
|
-
envelopeId: string;
|
|
4
|
-
roleId: string;
|
|
5
|
-
inviteCode: string;
|
|
6
|
-
}
|
|
7
|
-
export interface IInPersonAccessKey {
|
|
8
|
-
id: string;
|
|
9
|
-
created_at: string;
|
|
10
|
-
recipient_name: string;
|
|
11
|
-
envelope_id: string;
|
|
12
|
-
type: 'in_person_link';
|
|
13
|
-
key: string;
|
|
14
|
-
expiration_date: string | null;
|
|
15
|
-
first_used: string | null;
|
|
16
|
-
last_used: string | null;
|
|
17
|
-
}
|
|
18
|
-
export interface IEmailAccessKey {
|
|
19
|
-
id: string;
|
|
20
|
-
created_at: string;
|
|
21
|
-
recipient_name: string;
|
|
22
|
-
envelope_id: string;
|
|
23
|
-
type: 'email';
|
|
24
|
-
key: string;
|
|
25
|
-
expiration_date: string | null;
|
|
26
|
-
first_used: string | null;
|
|
27
|
-
last_used: string | null;
|
|
28
|
-
}
|
|
29
|
-
export interface ISMSAccessKey {
|
|
30
|
-
id: string;
|
|
31
|
-
created_at: string;
|
|
32
|
-
recipient_name: string;
|
|
33
|
-
envelope_id: string;
|
|
34
|
-
type: 'sms';
|
|
35
|
-
key: string;
|
|
36
|
-
expiration_date: string | null;
|
|
37
|
-
first_used: string | null;
|
|
38
|
-
last_used: string | null;
|
|
39
|
-
}
|
|
40
|
-
export type TAccessKey = IInPersonAccessKey | IEmailAccessKey | ISMSAccessKey;
|
|
41
|
-
export declare enum RecipientActions {
|
|
42
|
-
SUBMIT = "submit",
|
|
43
|
-
DECLINE = "decline",
|
|
44
|
-
PREPARE = "prepare",
|
|
45
|
-
UPDATE = "update"
|
|
46
|
-
}
|
|
47
|
-
export type TRecipientAction = `${RecipientActions}`;
|
|
48
|
-
export declare enum EnvelopeStates {
|
|
49
|
-
COMPLETE = "complete",
|
|
50
|
-
PENDING = "pending",
|
|
51
|
-
IN_PROGRESS = "in progress",
|
|
52
|
-
DECLINED = "declined",
|
|
53
|
-
CANCELED = "canceled"
|
|
54
|
-
}
|
|
55
|
-
export type TEnvelopeStatus = `${EnvelopeStates}`;
|
|
56
|
-
export declare enum RecipientStates {
|
|
57
|
-
INVITED = "invited",
|
|
58
|
-
OPENED = "opened",
|
|
59
|
-
SIGNED = "signed",
|
|
60
|
-
SUBMITTED = "submitted",
|
|
61
|
-
CANCELED = "canceled",
|
|
62
|
-
PENDING = "pending",
|
|
63
|
-
DECLINED = "declined"
|
|
64
|
-
}
|
|
65
|
-
export type TRecipientStatus = `${RecipientStates}`;
|
|
66
|
-
export declare enum RecipientTypes {
|
|
67
|
-
SIGNER = "signer",
|
|
68
|
-
CC = "cc",
|
|
69
|
-
APPROVER = "approver"
|
|
70
|
-
}
|
|
71
|
-
export type TRecipientType = `${RecipientTypes}`;
|
|
72
|
-
/**
|
|
73
|
-
* One entry in an envelope search result.
|
|
74
|
-
* NOTE: Many of the fields here are undefined unless "summary=true" is included in the search terms
|
|
75
|
-
*/
|
|
76
|
-
export interface IEnvelopesSearchResultEntry {
|
|
77
|
-
id: string;
|
|
78
|
-
canceled_at: string;
|
|
79
|
-
/** @deprecated. New envelopes may have more than one certificate attached. */
|
|
80
|
-
certificate_document_id: string;
|
|
81
|
-
/** @deprecated. New envelopes may have more than one document attached. */
|
|
82
|
-
envelope_document_id: string;
|
|
83
|
-
created_at: string;
|
|
84
|
-
histories: IHistory[];
|
|
85
|
-
indexed_at: string;
|
|
86
|
-
name: string;
|
|
87
|
-
no_contact: boolean;
|
|
88
|
-
organization_id: string;
|
|
89
|
-
profile_id: string;
|
|
90
|
-
recipients: IRecipient[];
|
|
91
|
-
reminder_id: string | null;
|
|
92
|
-
status: TEnvelopeStatus;
|
|
93
|
-
/** Defaults to 'private'. If set to 'shared', this envelope will be visible to other users in the same organization. Ignored for personal profiles. */
|
|
94
|
-
visibility: 'private' | 'shared';
|
|
95
|
-
next_recipient: {
|
|
96
|
-
claimed: boolean;
|
|
97
|
-
email: string;
|
|
98
|
-
name: string;
|
|
99
|
-
profile_id: string;
|
|
100
|
-
status: TRecipientStatus;
|
|
101
|
-
type: TRecipientType;
|
|
102
|
-
};
|
|
103
|
-
template_id: string;
|
|
104
|
-
total_count: number;
|
|
105
|
-
updated_at: string;
|
|
106
|
-
}
|
|
107
|
-
export interface IEnvelopesSearchResult {
|
|
108
|
-
page: number;
|
|
109
|
-
total: number;
|
|
110
|
-
result: IEnvelopesSearchResultEntry[];
|
|
111
|
-
}
|
|
112
|
-
export interface IEnvelopesSummary {
|
|
113
|
-
action_required: {
|
|
114
|
-
page: number;
|
|
115
|
-
total: number;
|
|
116
|
-
result: IActivityEntry[];
|
|
117
|
-
};
|
|
118
|
-
completed: {
|
|
119
|
-
page: number;
|
|
120
|
-
total: number;
|
|
121
|
-
result: IActivityEntry[];
|
|
122
|
-
};
|
|
123
|
-
waiting_others: {
|
|
124
|
-
page: number;
|
|
125
|
-
total: number;
|
|
126
|
-
result: IActivityEntry[];
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
export interface IRecipient {
|
|
130
|
-
envelope_id: string;
|
|
131
|
-
role_name: string;
|
|
132
|
-
agreed: boolean;
|
|
133
|
-
claimed: boolean;
|
|
134
|
-
created_at: string;
|
|
135
|
-
delegated_to: string | null;
|
|
136
|
-
delegator: boolean;
|
|
137
|
-
email: string;
|
|
138
|
-
full_name: string;
|
|
139
|
-
in_app_access_key?: string;
|
|
140
|
-
key_used_to_conclude?: string;
|
|
141
|
-
message: string | null;
|
|
142
|
-
phone: string | null;
|
|
143
|
-
profile_id: string;
|
|
144
|
-
environment: string;
|
|
145
|
-
/**
|
|
146
|
-
* The sequence number indicates the order in which Recipients act. Multiple recipients may have the same sequence
|
|
147
|
-
* number, in which case they may act in parallel. (e.g. all Recipients at sequence 2 will receive invites once
|
|
148
|
-
* all Recipients at sequence 1 have signed.)
|
|
149
|
-
*/
|
|
150
|
-
sequence: number;
|
|
151
|
-
/**
|
|
152
|
-
* The order indicates the order in which recipients are listed in a single "level" of the workflow. Note that
|
|
153
|
-
* recipients at the same level may act in parallel despite this value. However, it can often be useful to visually
|
|
154
|
-
* arrange recipients to match related business processes so this field allows for that.
|
|
155
|
-
*/
|
|
156
|
-
order: number;
|
|
157
|
-
status: TRecipientStatus;
|
|
158
|
-
type: TRecipientType;
|
|
159
|
-
updated_at: string;
|
|
160
|
-
fields?: IEnvelopeField[];
|
|
161
|
-
}
|
|
162
|
-
export interface IEnvelopeDocument {
|
|
163
|
-
id: string;
|
|
164
|
-
envelope_id: string;
|
|
165
|
-
name: string;
|
|
166
|
-
url: string;
|
|
167
|
-
mime: string;
|
|
168
|
-
page_numbers: number;
|
|
169
|
-
template_document_id: string | null;
|
|
170
|
-
type: 'attachment' | 'certificate';
|
|
171
|
-
created_at: string;
|
|
172
|
-
updated_at: string;
|
|
173
|
-
}
|
|
174
|
-
export interface IEnvelopeFieldOptions {
|
|
175
|
-
/** The unique ID of the field */
|
|
176
|
-
id: string;
|
|
177
|
-
/** The X position of the field on the page. Self-placed fields will have an X value of 0. */
|
|
178
|
-
x: number;
|
|
179
|
-
/** The Y position of the field on the page. Self-placed fields will have an X value of 0. */
|
|
180
|
-
y: number;
|
|
181
|
-
/** For checkboxes, whether it is currently checked */
|
|
182
|
-
checked?: boolean;
|
|
183
|
-
/** For radio buttons, whether it is currently selected */
|
|
184
|
-
selected?: boolean;
|
|
185
|
-
/** The visible label for the field e.g. 'Not Applicable' */
|
|
186
|
-
value: string;
|
|
187
|
-
}
|
|
188
|
-
export interface IEnvelopeFieldSettings {
|
|
189
|
-
type?: string;
|
|
190
|
-
x: number;
|
|
191
|
-
y: number;
|
|
192
|
-
width?: number;
|
|
193
|
-
height?: number;
|
|
194
|
-
value?: number | string;
|
|
195
|
-
/** If the field has been filled in, this contains the current value */
|
|
196
|
-
result?: any;
|
|
197
|
-
/** Text field settings */
|
|
198
|
-
leading?: number;
|
|
199
|
-
alignment?: number;
|
|
200
|
-
upperCase?: boolean;
|
|
201
|
-
/** Dropdowns, checkboxes, radio groups */
|
|
202
|
-
options?: IEnvelopeFieldOptions[];
|
|
203
|
-
/** Signatures and Initials, result will be "signed" */
|
|
204
|
-
base64?: string;
|
|
205
|
-
hash?: string;
|
|
206
|
-
ip_address?: string;
|
|
207
|
-
signature_id?: string;
|
|
208
|
-
signed_at?: string;
|
|
209
|
-
/** Checkbox settings */
|
|
210
|
-
minimum_checked?: number;
|
|
211
|
-
maximum_checked?: number;
|
|
212
|
-
[key: string]: any;
|
|
213
|
-
}
|
|
214
|
-
export declare enum DocumentFieldTypes {
|
|
215
|
-
SIGNATURE = "signature",
|
|
216
|
-
INITIAL = "initial",
|
|
217
|
-
CHECKBOX_GROUP = "checkbox_group",
|
|
218
|
-
RADIO_BUTTON_GROUP = "radio_button_group",
|
|
219
|
-
TEXTBOX = "textbox",
|
|
220
|
-
TIMESTAMP = "timestamp",
|
|
221
|
-
DATE = "date",
|
|
222
|
-
DROPDOWN = "dropdown",
|
|
223
|
-
TEXTAREA = "textarea",
|
|
224
|
-
ATTACHMENT = "attachment",
|
|
225
|
-
PAYMENT = "payment"
|
|
226
|
-
}
|
|
227
|
-
export type TDocumentFieldType = `${DocumentFieldTypes}`;
|
|
228
|
-
export interface IEnvelopeField {
|
|
229
|
-
/** The ID of the envelope the field is for. */
|
|
230
|
-
envelope_id: string;
|
|
231
|
-
/** The ID of the document the field is for. */
|
|
232
|
-
document_id: string;
|
|
233
|
-
/** The machine name of the field, e.g. `checkbox_groupP1-18` */
|
|
234
|
-
name: string;
|
|
235
|
-
/** If set, the placeholder/label for the field. */
|
|
236
|
-
label: string | null;
|
|
237
|
-
/** The 1-based page number the field is displayed on. "Self-placed" fields that the user must apply will be on page 0. */
|
|
238
|
-
page: number;
|
|
239
|
-
/** The ID of the role in the recipients list, e.g. `Recipient 2` */
|
|
240
|
-
recipient_role: string;
|
|
241
|
-
/** The type of the field */
|
|
242
|
-
type: TDocumentFieldType;
|
|
243
|
-
/** If true, the field will be required */
|
|
244
|
-
required: boolean;
|
|
245
|
-
settings?: IEnvelopeFieldSettings;
|
|
246
|
-
validator: string | null;
|
|
247
|
-
/** Not sent by the server. Used in the UI to identify prepared fields. */
|
|
248
|
-
prepared?: boolean;
|
|
249
|
-
/** If set, the tab index for the field. */
|
|
250
|
-
tabindex: number;
|
|
251
|
-
/** The X position of the field. */
|
|
252
|
-
x: number;
|
|
253
|
-
/** The Y position of the field. */
|
|
254
|
-
y: number;
|
|
255
|
-
/** The width of the field. */
|
|
256
|
-
width: number;
|
|
257
|
-
/** The height of the field. */
|
|
258
|
-
height: number;
|
|
259
|
-
/** The default value for the field. */
|
|
260
|
-
default?: string;
|
|
261
|
-
/** The placeholder to show in the field. */
|
|
262
|
-
placeholder?: string;
|
|
263
|
-
/** For fields that support grouping (radio buttons and check boxes) the value selected will be stored under this name. */
|
|
264
|
-
group?: string;
|
|
265
|
-
}
|
|
266
|
-
/**
|
|
267
|
-
* An Envelope is a workflow wrapper that shepherds one or more Documents through the various recipients in a signing
|
|
268
|
-
* process.
|
|
269
|
-
*/
|
|
270
|
-
export interface IEnvelope {
|
|
271
|
-
id: string;
|
|
272
|
-
template_id: string;
|
|
273
|
-
name: string;
|
|
274
|
-
status: TEnvelopeStatus;
|
|
275
|
-
profile_id: string;
|
|
276
|
-
organization_id: string | null;
|
|
277
|
-
no_contact: boolean;
|
|
278
|
-
created_at: string;
|
|
279
|
-
updated_at: string;
|
|
280
|
-
canceled_at: string;
|
|
281
|
-
reminder_id: string | null;
|
|
282
|
-
/** @deprecated. New envelopes will support more than one document attachment so new code should no longer refer to this field. */
|
|
283
|
-
envelope_document_id: string;
|
|
284
|
-
/** @deprecated. New envelopes may have more than one certificate attached. */
|
|
285
|
-
certificate_document_id: string | null;
|
|
286
|
-
/** Defaults to 'private'. If set to 'shared', this envelope will be visible to other users in the same organization. Ignored for personal profiles. */
|
|
287
|
-
visibility: 'private' | 'shared';
|
|
288
|
-
histories: IHistory[];
|
|
289
|
-
recipients: IRecipient[];
|
|
290
|
-
profile?: IProfile | null;
|
|
291
|
-
certificate?: IEnvelopeDocument | null;
|
|
292
|
-
/** @deprecated. New code should use `documents[]`. */
|
|
293
|
-
document?: IEnvelopeDocument | null;
|
|
294
|
-
/** Documents attached to this envelope */
|
|
295
|
-
documents?: IEnvelopeDocument[] | null;
|
|
296
|
-
fields?: IEnvelopeField[];
|
|
297
|
-
}
|
|
298
|
-
export type TEnvelopeUpdateResult = Omit<IEnvelope, 'histories' | 'recipients' | 'certificate' | 'document' | 'fields' | 'profile'>;
|
|
299
|
-
export interface IActivityEntry {
|
|
300
|
-
id: string;
|
|
301
|
-
name: string;
|
|
302
|
-
canceled_at: string;
|
|
303
|
-
created_at: string;
|
|
304
|
-
updated_at: string;
|
|
305
|
-
profile_id: string;
|
|
306
|
-
status: TEnvelopeStatus;
|
|
307
|
-
template_id: string;
|
|
308
|
-
recipient: {
|
|
309
|
-
claimed: boolean;
|
|
310
|
-
email: string;
|
|
311
|
-
name: string;
|
|
312
|
-
profile_id: string;
|
|
313
|
-
status: TRecipientStatus;
|
|
314
|
-
type: TRecipientType;
|
|
315
|
-
};
|
|
316
|
-
}
|
|
317
|
-
export interface IHistory {
|
|
318
|
-
created_at: string;
|
|
319
|
-
envelope_id: string;
|
|
320
|
-
event: THistoryEvent;
|
|
321
|
-
event_detail: TEventDetail;
|
|
322
|
-
id: string;
|
|
323
|
-
role_name: string;
|
|
324
|
-
}
|
|
325
|
-
export interface IDocumentSearchOptions {
|
|
326
|
-
rows?: number;
|
|
327
|
-
page?: number;
|
|
328
|
-
sort_by?: 'updated_at' | 'created_at';
|
|
329
|
-
ascending?: boolean;
|
|
330
|
-
is_owner?: boolean;
|
|
331
|
-
is_recipient?: boolean;
|
|
332
|
-
envelope_status?: TEnvelopeStatus[];
|
|
333
|
-
recipient_status?: TEnvelopeStatus[];
|
|
334
|
-
}
|
|
335
|
-
export type THistoryEvent = 'recipient:signed' | 'recipient:opened' | 'recipient:submitted' | 'recipient:prepared' | 'recipient:claimed' | 'recipient:agreed' | 'recipient:invited' | 'recipient:delegated' | 'recipient:updated_info' | 'recipient:declined' | 'invitation:resent' | 'envelope:cc' | 'created' | 'completed' | 'canceled' | 'owner:updated_recipient_info' | 'owner:canceled' | 'owner:get_in_person_link';
|
|
336
|
-
export type TEventDetail = 'in_app' | 'mail' | 'signer' | 'sms' | 'reminder' | 'preparer' | 'manual' | 'in_person_link' | 'guest' | 'email' | '' | string;
|
|
337
|
-
export interface ICreateEnvelopeRole {
|
|
338
|
-
/** The type of role to create. Most participants in standard flows will be "signer" recipients. */
|
|
339
|
-
type: TRecipientType;
|
|
340
|
-
/**
|
|
341
|
-
* The Role name of the recipient. Please note this is not the person's name. It is the ID of the role, e.g.
|
|
342
|
-
* 'Recipient 1', 'Seller', etc. This must match one of the pre-defined roles in the template's Recipients list.
|
|
343
|
-
*/
|
|
344
|
-
name: string;
|
|
345
|
-
/** The full name of the recipient as it will be displayed in reports and queries, e.g. 'Paige Turner'. */
|
|
346
|
-
full_name: string;
|
|
347
|
-
/** The email address of the recipient. One of `email` or `phone` must be provided. */
|
|
348
|
-
email?: string;
|
|
349
|
-
/**
|
|
350
|
-
* The phone number of the recipient. One of `email` or `phone` must be provided. If `phone` is included, the
|
|
351
|
-
* recipient will receive an SMS notification for the document.
|
|
352
|
-
*/
|
|
353
|
-
phone?: string;
|
|
354
|
-
/**
|
|
355
|
-
* The 1-based sequence number for the recipient. This can be used to override the template's workflow. Recipients
|
|
356
|
-
* are processed in parallel for each matching sequence number (e.g. all recipients at level "1" may act in parallel)
|
|
357
|
-
* and in series between sequence numbers (e.g. all recipients at level "1" must complete their tasks before
|
|
358
|
-
* recipients at level "2" may act).
|
|
359
|
-
*/
|
|
360
|
-
sequence: number;
|
|
361
|
-
/** Whether the recipient may delegate their tasks to others. Should be false for most standard workflows. */
|
|
362
|
-
delegator: boolean;
|
|
363
|
-
/** A custom message to include in the email or SMS invitation. May be left blank for a default message. */
|
|
364
|
-
message: string;
|
|
365
|
-
}
|
|
366
|
-
export interface IEnvelopeSummary {
|
|
367
|
-
id: string;
|
|
368
|
-
profile_id: string;
|
|
369
|
-
organization_id: string | null;
|
|
370
|
-
name: string;
|
|
371
|
-
status: TEnvelopeStatus;
|
|
372
|
-
template_id: string;
|
|
373
|
-
created_at: string;
|
|
374
|
-
updated_at: string;
|
|
375
|
-
canceled_at: string;
|
|
376
|
-
envelope_document_id: string;
|
|
377
|
-
certificate_document_id: string | null;
|
|
378
|
-
reminder_id: string | null;
|
|
379
|
-
no_contact: boolean;
|
|
380
|
-
visibility: 'private' | 'shared';
|
|
381
|
-
documents: IEnvelopeDocument[];
|
|
382
|
-
recipients: IRecipient[];
|
|
383
|
-
fields: IEnvelopeField[];
|
|
384
|
-
}
|
|
385
|
-
export interface IEnvelopeSummaries {
|
|
386
|
-
page: number;
|
|
387
|
-
count: number;
|
|
388
|
-
total: number;
|
|
389
|
-
records: IEnvelopeSummary[];
|
|
390
|
-
}
|
package/Envelopes/Types.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
export var RecipientActions;
|
|
2
|
-
(function (RecipientActions) {
|
|
3
|
-
RecipientActions["SUBMIT"] = "submit";
|
|
4
|
-
RecipientActions["DECLINE"] = "decline";
|
|
5
|
-
RecipientActions["PREPARE"] = "prepare";
|
|
6
|
-
RecipientActions["UPDATE"] = "update";
|
|
7
|
-
})(RecipientActions || (RecipientActions = {}));
|
|
8
|
-
export var EnvelopeStates;
|
|
9
|
-
(function (EnvelopeStates) {
|
|
10
|
-
EnvelopeStates["COMPLETE"] = "complete";
|
|
11
|
-
EnvelopeStates["PENDING"] = "pending";
|
|
12
|
-
EnvelopeStates["IN_PROGRESS"] = "in progress";
|
|
13
|
-
EnvelopeStates["DECLINED"] = "declined";
|
|
14
|
-
EnvelopeStates["CANCELED"] = "canceled";
|
|
15
|
-
})(EnvelopeStates || (EnvelopeStates = {}));
|
|
16
|
-
export var RecipientStates;
|
|
17
|
-
(function (RecipientStates) {
|
|
18
|
-
RecipientStates["INVITED"] = "invited";
|
|
19
|
-
RecipientStates["OPENED"] = "opened";
|
|
20
|
-
RecipientStates["SIGNED"] = "signed";
|
|
21
|
-
RecipientStates["SUBMITTED"] = "submitted";
|
|
22
|
-
RecipientStates["CANCELED"] = "canceled";
|
|
23
|
-
RecipientStates["PENDING"] = "pending";
|
|
24
|
-
RecipientStates["DECLINED"] = "declined";
|
|
25
|
-
})(RecipientStates || (RecipientStates = {}));
|
|
26
|
-
export var RecipientTypes;
|
|
27
|
-
(function (RecipientTypes) {
|
|
28
|
-
RecipientTypes["SIGNER"] = "signer";
|
|
29
|
-
RecipientTypes["CC"] = "cc";
|
|
30
|
-
RecipientTypes["APPROVER"] = "approver";
|
|
31
|
-
})(RecipientTypes || (RecipientTypes = {}));
|
|
32
|
-
export var DocumentFieldTypes;
|
|
33
|
-
(function (DocumentFieldTypes) {
|
|
34
|
-
DocumentFieldTypes["SIGNATURE"] = "signature";
|
|
35
|
-
DocumentFieldTypes["INITIAL"] = "initial";
|
|
36
|
-
DocumentFieldTypes["CHECKBOX_GROUP"] = "checkbox_group";
|
|
37
|
-
DocumentFieldTypes["RADIO_BUTTON_GROUP"] = "radio_button_group";
|
|
38
|
-
DocumentFieldTypes["TEXTBOX"] = "textbox";
|
|
39
|
-
DocumentFieldTypes["TIMESTAMP"] = "timestamp";
|
|
40
|
-
DocumentFieldTypes["DATE"] = "date";
|
|
41
|
-
DocumentFieldTypes["DROPDOWN"] = "dropdown";
|
|
42
|
-
DocumentFieldTypes["TEXTAREA"] = "textarea";
|
|
43
|
-
DocumentFieldTypes["ATTACHMENT"] = "attachment";
|
|
44
|
-
DocumentFieldTypes["PAYMENT"] = "payment";
|
|
45
|
-
})(DocumentFieldTypes || (DocumentFieldTypes = {}));
|
package/Envelopes/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * as Envelopes from './Envelopes';
|
|
2
|
-
export * as Permissions from './Permissions';
|
|
3
|
-
export * as Recipients from './Recipients';
|
|
4
|
-
export * as Reminders from './Reminders';
|
|
5
|
-
export * as Signatures from './Signatures';
|
|
6
|
-
export * as Initials from './Initials';
|
|
7
|
-
export * as Types from './Types';
|