@verdocs/js-sdk 2.0.11 → 2.0.12

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.
@@ -117,6 +117,7 @@ export interface IDocument {
117
117
  fields?: IDocumentField[];
118
118
  profile?: IProfile;
119
119
  }
120
+ export declare type TDocumentUpdateResult = Omit<IDocument, 'histories' | 'recipients' | 'certificate' | 'document' | 'fields' | 'profile'>;
120
121
  export interface IActivityEntry {
121
122
  id: string;
122
123
  name: string;
@@ -195,7 +196,7 @@ export declare const getDocument: (endpoint: VerdocsEndpoint, documentId: string
195
196
  /**
196
197
  * Cancel a Document.
197
198
  */
198
- export declare const cancelDocument: (endpoint: VerdocsEndpoint, documentId: string) => Promise<IDocument>;
199
+ export declare const cancelDocument: (endpoint: VerdocsEndpoint, documentId: string) => Promise<TDocumentUpdateResult>;
199
200
  /**
200
201
  * Returns true if the recipient has a pending action. Note that this does not necessarily mean the recipient can act (yet).
201
202
  */
@@ -1,6 +1,6 @@
1
- import { IRecipient } from './Documents';
1
+ import { IInPersonAccessKey, TRecipientAction } from './Types';
2
2
  import { VerdocsEndpoint } from '../VerdocsEndpoint';
3
- export declare type TRecipientAction = 'submit' | 'decline' | 'prepare' | 'update';
3
+ import { IDocument, IRecipient } from './Documents';
4
4
  export interface IUpdateRecipientParams {
5
5
  new_full_name?: string;
6
6
  agreed?: boolean;
@@ -9,3 +9,10 @@ export interface IUpdateRecipientParams {
9
9
  * Update a recipient's status block
10
10
  */
11
11
  export declare const updateRecipientStatus: (endpoint: VerdocsEndpoint, documentId: string, roleName: string, action: TRecipientAction, params?: IUpdateRecipientParams) => Promise<IRecipient>;
12
+ export interface ISignerTokenResponse {
13
+ recipient: IRecipient;
14
+ envelope: IDocument;
15
+ signerToken: string;
16
+ inPersonAccessKey: IInPersonAccessKey;
17
+ }
18
+ export declare const getSignerToken: (endpoint: VerdocsEndpoint, documentId: string, roleName: string) => Promise<import("axios").AxiosResponse<ISignerTokenResponse, any>>;
@@ -55,3 +55,7 @@ export var updateRecipientStatus = function (endpoint, documentId, roleName, act
55
55
  .then(function (r) { return r.data; })];
56
56
  });
57
57
  }); };
58
+ export var getSignerToken = function (endpoint, documentId, roleName) {
59
+ return endpoint.api //
60
+ .get("/documents/".concat(documentId, "/recipients/").concat(encodeURIComponent(roleName), "/signer-token"));
61
+ };
@@ -1,3 +1,4 @@
1
+ export declare type TRecipientAction = 'submit' | 'decline' | 'prepare' | 'update';
1
2
  export interface ITemplateSummaryEntry {
2
3
  id: string;
3
4
  name: string;
@@ -41,3 +42,14 @@ export interface ISigningSession {
41
42
  iat: number;
42
43
  [key: string]: any;
43
44
  }
45
+ export interface IInPersonAccessKey {
46
+ id: string;
47
+ created_at: string;
48
+ recipient_name: string;
49
+ envelope_id: string;
50
+ type: 'in_person_link';
51
+ key: string;
52
+ expiration_date: string | null;
53
+ first_used: string | null;
54
+ last_used: string | null;
55
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdocs/js-sdk",
3
- "version": "2.0.11",
3
+ "version": "2.0.12",
4
4
  "private": false,
5
5
  "homepage": "https://github.com/Verdocs/js-sdk",
6
6
  "description": "Verdocs JS SDK",