@verdocs/js-sdk 4.2.5 → 4.2.7
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 +14 -16
- package/dist/index.d.ts +14 -16
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -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
|
@@ -152,19 +152,16 @@ interface ISigningSessionRequest {
|
|
|
152
152
|
* A Signing Session connects a caller to a role within an envelope, and can be used only for calls related to signing that envelope.
|
|
153
153
|
*/
|
|
154
154
|
interface ISigningSession {
|
|
155
|
-
profile_id: string;
|
|
156
|
-
envelope_id: string;
|
|
157
|
-
role: string;
|
|
158
|
-
email: string;
|
|
159
|
-
access_key: {
|
|
160
|
-
id: string;
|
|
161
|
-
type: string;
|
|
162
|
-
};
|
|
163
|
-
iss: string;
|
|
164
155
|
aud: string;
|
|
165
|
-
|
|
156
|
+
iss: string;
|
|
157
|
+
sub: string; // Verdocs profile_id
|
|
158
|
+
email: string;
|
|
159
|
+
email_verified: boolean;
|
|
166
160
|
iat: number;
|
|
167
|
-
|
|
161
|
+
exp: number;
|
|
162
|
+
"https://verdocs.com/session_type": "signing";
|
|
163
|
+
"https://verdocs.com/envelope_id": string;
|
|
164
|
+
"https://verdocs.com/role_name": string;
|
|
168
165
|
}
|
|
169
166
|
/**
|
|
170
167
|
* A User Session connects a caller to a Verdocs profile, and can be used for any operations that profile may perform.
|
|
@@ -172,11 +169,12 @@ interface ISigningSession {
|
|
|
172
169
|
interface IUserSession {
|
|
173
170
|
aud: string;
|
|
174
171
|
iss: string;
|
|
175
|
-
sub: string;
|
|
172
|
+
sub: string; // Auth0 user_id
|
|
176
173
|
email: string;
|
|
177
174
|
email_verified: boolean;
|
|
178
175
|
iat: number;
|
|
179
176
|
exp: number;
|
|
177
|
+
"https://verdocs.com/session_type": "user";
|
|
180
178
|
"https://verdocs.com/profile_id": string;
|
|
181
179
|
"https://verdocs.com/organization_id": string;
|
|
182
180
|
}
|
|
@@ -1435,11 +1433,11 @@ type TRecipientKbaStep = IRecipientKbaStepNone | IRecipientKbaStepComplete | IRe
|
|
|
1435
1433
|
* `recipient.kba_method` is set (not null), and `recipient.kba_completed` is false, this endpoint
|
|
1436
1434
|
* should be called to determine the next KBA step required.
|
|
1437
1435
|
*/
|
|
1438
|
-
declare const getKbaStep: (endpoint: VerdocsEndpoint,
|
|
1436
|
+
declare const getKbaStep: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string) => Promise<IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed>;
|
|
1439
1437
|
/**
|
|
1440
1438
|
* Submit a response to a KBA PIN challenge.
|
|
1441
1439
|
*/
|
|
1442
|
-
declare const submitKbaPin: (endpoint: VerdocsEndpoint,
|
|
1440
|
+
declare const submitKbaPin: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, pin: string) => Promise<IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed>;
|
|
1443
1441
|
interface IKbaIdentity {
|
|
1444
1442
|
firstName: string;
|
|
1445
1443
|
lastName: string;
|
|
@@ -1452,7 +1450,7 @@ interface IKbaIdentity {
|
|
|
1452
1450
|
/**
|
|
1453
1451
|
* Submit an identity response to a KBA challenge.
|
|
1454
1452
|
*/
|
|
1455
|
-
declare const submitKbaIdentity: (endpoint: VerdocsEndpoint,
|
|
1453
|
+
declare const submitKbaIdentity: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, identity: IKbaIdentity) => Promise<IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed>;
|
|
1456
1454
|
interface IKbaChallengeResponse {
|
|
1457
1455
|
responses: {
|
|
1458
1456
|
type: string;
|
|
@@ -1463,7 +1461,7 @@ interface IKbaChallengeResponse {
|
|
|
1463
1461
|
* Submit an identity response to a KBA challenge. Answers should be submitted in the same order as
|
|
1464
1462
|
* the challenges were listed in `IRecipientKbaStepChallenge.questions`.
|
|
1465
1463
|
*/
|
|
1466
|
-
declare const submitKbaChallengeResponse: (endpoint: VerdocsEndpoint,
|
|
1464
|
+
declare const submitKbaChallengeResponse: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, response: IKbaChallengeResponse) => Promise<IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed>;
|
|
1467
1465
|
/**
|
|
1468
1466
|
* Update a recipient's status block
|
|
1469
1467
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -152,19 +152,16 @@ interface ISigningSessionRequest {
|
|
|
152
152
|
* A Signing Session connects a caller to a role within an envelope, and can be used only for calls related to signing that envelope.
|
|
153
153
|
*/
|
|
154
154
|
interface ISigningSession {
|
|
155
|
-
profile_id: string;
|
|
156
|
-
envelope_id: string;
|
|
157
|
-
role: string;
|
|
158
|
-
email: string;
|
|
159
|
-
access_key: {
|
|
160
|
-
id: string;
|
|
161
|
-
type: string;
|
|
162
|
-
};
|
|
163
|
-
iss: string;
|
|
164
155
|
aud: string;
|
|
165
|
-
|
|
156
|
+
iss: string;
|
|
157
|
+
sub: string; // Verdocs profile_id
|
|
158
|
+
email: string;
|
|
159
|
+
email_verified: boolean;
|
|
166
160
|
iat: number;
|
|
167
|
-
|
|
161
|
+
exp: number;
|
|
162
|
+
"https://verdocs.com/session_type": "signing";
|
|
163
|
+
"https://verdocs.com/envelope_id": string;
|
|
164
|
+
"https://verdocs.com/role_name": string;
|
|
168
165
|
}
|
|
169
166
|
/**
|
|
170
167
|
* A User Session connects a caller to a Verdocs profile, and can be used for any operations that profile may perform.
|
|
@@ -172,11 +169,12 @@ interface ISigningSession {
|
|
|
172
169
|
interface IUserSession {
|
|
173
170
|
aud: string;
|
|
174
171
|
iss: string;
|
|
175
|
-
sub: string;
|
|
172
|
+
sub: string; // Auth0 user_id
|
|
176
173
|
email: string;
|
|
177
174
|
email_verified: boolean;
|
|
178
175
|
iat: number;
|
|
179
176
|
exp: number;
|
|
177
|
+
"https://verdocs.com/session_type": "user";
|
|
180
178
|
"https://verdocs.com/profile_id": string;
|
|
181
179
|
"https://verdocs.com/organization_id": string;
|
|
182
180
|
}
|
|
@@ -1435,11 +1433,11 @@ type TRecipientKbaStep = IRecipientKbaStepNone | IRecipientKbaStepComplete | IRe
|
|
|
1435
1433
|
* `recipient.kba_method` is set (not null), and `recipient.kba_completed` is false, this endpoint
|
|
1436
1434
|
* should be called to determine the next KBA step required.
|
|
1437
1435
|
*/
|
|
1438
|
-
declare const getKbaStep: (endpoint: VerdocsEndpoint,
|
|
1436
|
+
declare const getKbaStep: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string) => Promise<IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed>;
|
|
1439
1437
|
/**
|
|
1440
1438
|
* Submit a response to a KBA PIN challenge.
|
|
1441
1439
|
*/
|
|
1442
|
-
declare const submitKbaPin: (endpoint: VerdocsEndpoint,
|
|
1440
|
+
declare const submitKbaPin: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, pin: string) => Promise<IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed>;
|
|
1443
1441
|
interface IKbaIdentity {
|
|
1444
1442
|
firstName: string;
|
|
1445
1443
|
lastName: string;
|
|
@@ -1452,7 +1450,7 @@ interface IKbaIdentity {
|
|
|
1452
1450
|
/**
|
|
1453
1451
|
* Submit an identity response to a KBA challenge.
|
|
1454
1452
|
*/
|
|
1455
|
-
declare const submitKbaIdentity: (endpoint: VerdocsEndpoint,
|
|
1453
|
+
declare const submitKbaIdentity: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, identity: IKbaIdentity) => Promise<IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed>;
|
|
1456
1454
|
interface IKbaChallengeResponse {
|
|
1457
1455
|
responses: {
|
|
1458
1456
|
type: string;
|
|
@@ -1463,7 +1461,7 @@ interface IKbaChallengeResponse {
|
|
|
1463
1461
|
* Submit an identity response to a KBA challenge. Answers should be submitted in the same order as
|
|
1464
1462
|
* the challenges were listed in `IRecipientKbaStepChallenge.questions`.
|
|
1465
1463
|
*/
|
|
1466
|
-
declare const submitKbaChallengeResponse: (endpoint: VerdocsEndpoint,
|
|
1464
|
+
declare const submitKbaChallengeResponse: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, response: IKbaChallengeResponse) => Promise<IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed>;
|
|
1467
1465
|
/**
|
|
1468
1466
|
* Update a recipient's status block
|
|
1469
1467
|
*/
|
package/dist/index.js
CHANGED
|
@@ -1597,27 +1597,27 @@ const createInitials = (endpoint, name, initials) => {
|
|
|
1597
1597
|
* `recipient.kba_method` is set (not null), and `recipient.kba_completed` is false, this endpoint
|
|
1598
1598
|
* should be called to determine the next KBA step required.
|
|
1599
1599
|
*/
|
|
1600
|
-
const getKbaStep = (endpoint,
|
|
1601
|
-
.get(`/v2/kba/${
|
|
1600
|
+
const getKbaStep = (endpoint, envelope_id, role_name) => endpoint.api //
|
|
1601
|
+
.get(`/v2/kba/${envelope_id}/${encodeURIComponent(role_name)}`)
|
|
1602
1602
|
.then((r) => r.data);
|
|
1603
1603
|
/**
|
|
1604
1604
|
* Submit a response to a KBA PIN challenge.
|
|
1605
1605
|
*/
|
|
1606
|
-
const submitKbaPin = (endpoint,
|
|
1607
|
-
.post(`/v2/kba/pin`, {
|
|
1606
|
+
const submitKbaPin = (endpoint, envelope_id, role_name, pin) => endpoint.api //
|
|
1607
|
+
.post(`/v2/kba/pin`, { envelope_id, role_name, pin })
|
|
1608
1608
|
.then((r) => r.data);
|
|
1609
1609
|
/**
|
|
1610
1610
|
* Submit an identity response to a KBA challenge.
|
|
1611
1611
|
*/
|
|
1612
|
-
const submitKbaIdentity = (endpoint,
|
|
1613
|
-
.post(`/v2/kba/identity`, {
|
|
1612
|
+
const submitKbaIdentity = (endpoint, envelope_id, role_name, identity) => endpoint.api //
|
|
1613
|
+
.post(`/v2/kba/identity`, { envelope_id, role_name, identity })
|
|
1614
1614
|
.then((r) => r.data);
|
|
1615
1615
|
/**
|
|
1616
1616
|
* Submit an identity response to a KBA challenge. Answers should be submitted in the same order as
|
|
1617
1617
|
* the challenges were listed in `IRecipientKbaStepChallenge.questions`.
|
|
1618
1618
|
*/
|
|
1619
|
-
const submitKbaChallengeResponse = (endpoint,
|
|
1620
|
-
.post(`/v2/kba/response`, {
|
|
1619
|
+
const submitKbaChallengeResponse = (endpoint, envelope_id, role_name, response) => endpoint.api //
|
|
1620
|
+
.post(`/v2/kba/response`, { envelope_id, role_name, response })
|
|
1621
1621
|
.then((r) => r.data);
|
|
1622
1622
|
|
|
1623
1623
|
/**
|