@verdocs/js-sdk 3.8.7 → 3.9.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/Envelopes/Envelopes.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IEnvelope, IEnvelopesSummary, IRecipient, IEnvelopeDocument, IEnvelopeFieldSettings } from './Types';
|
|
1
|
+
import { IEnvelope, IEnvelopesSummary, IRecipient, IEnvelopeDocument, IEnvelopeFieldSettings, IEnvelopeSummaries } from './Types';
|
|
2
2
|
import { ICreateEnvelopeRole, IEnvelopesSearchResult, ISigningSessionRequest } from './Types';
|
|
3
3
|
import { TEnvelopeUpdateResult, TEnvelopeStatus, TRecipientStatus } from './Types';
|
|
4
4
|
import { VerdocsEndpoint } from '../VerdocsEndpoint';
|
|
@@ -199,3 +199,22 @@ export declare const getEnvelopeDocumentPageDisplayUri: (endpoint: VerdocsEndpoi
|
|
|
199
199
|
* to avoid unnecessary repeat server calls.
|
|
200
200
|
*/
|
|
201
201
|
export declare const throttledGetEnvelope: (endpoint: VerdocsEndpoint, envelopeId: string) => IEnvelope | Promise<IEnvelope>;
|
|
202
|
+
export interface IListEnvelopesParams {
|
|
203
|
+
name?: string;
|
|
204
|
+
sharing?: 'all' | 'personal' | 'shared' | 'public';
|
|
205
|
+
starred?: 'all' | 'starred' | 'unstarred';
|
|
206
|
+
sort?: 'name' | 'created_at' | 'updated_at' | 'last_used_at' | 'counter' | 'star_counter';
|
|
207
|
+
direction?: 'asc' | 'desc';
|
|
208
|
+
page?: number;
|
|
209
|
+
rows?: number;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Lists all templates accessible by the caller, with optional filters.
|
|
213
|
+
*
|
|
214
|
+
* ```typescript
|
|
215
|
+
* import {Envelopes} from '@verdocs/js-sdk/Templates';
|
|
216
|
+
*
|
|
217
|
+
* await Envelopes.listEnvelopes((VerdocsEndpoint.getDefault(), { name: 'test', sort: 'updated_at' });
|
|
218
|
+
* ```
|
|
219
|
+
*/
|
|
220
|
+
export declare const listEnvelopes: (endpoint: VerdocsEndpoint, params?: IListEnvelopesParams) => Promise<IEnvelopeSummaries>;
|
package/Envelopes/Envelopes.js
CHANGED
|
@@ -305,3 +305,17 @@ export var throttledGetEnvelope = function (endpoint, envelopeId) {
|
|
|
305
305
|
return envelope;
|
|
306
306
|
});
|
|
307
307
|
};
|
|
308
|
+
/**
|
|
309
|
+
* Lists all templates accessible by the caller, with optional filters.
|
|
310
|
+
*
|
|
311
|
+
* ```typescript
|
|
312
|
+
* import {Envelopes} from '@verdocs/js-sdk/Templates';
|
|
313
|
+
*
|
|
314
|
+
* await Envelopes.listEnvelopes((VerdocsEndpoint.getDefault(), { name: 'test', sort: 'updated_at' });
|
|
315
|
+
* ```
|
|
316
|
+
*/
|
|
317
|
+
export var listEnvelopes = function (endpoint, params) {
|
|
318
|
+
return endpoint.api //
|
|
319
|
+
.post('/envelopes/list', params, { baseURL: endpoint.getBaseURLv2() })
|
|
320
|
+
.then(function (r) { return r.data; });
|
|
321
|
+
};
|
package/Envelopes/Types.d.ts
CHANGED
|
@@ -363,3 +363,28 @@ export interface ICreateEnvelopeRole {
|
|
|
363
363
|
/** A custom message to include in the email or SMS invitation. May be left blank for a default message. */
|
|
364
364
|
message: string;
|
|
365
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
|
+
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { IGroup, IGroupDetail } from './Types';
|
|
11
11
|
import { VerdocsEndpoint } from '../VerdocsEndpoint';
|
|
12
|
+
import { IPermission } from '../Users/Types';
|
|
12
13
|
/**
|
|
13
14
|
* Get a list of groups for a given organization. The caller must have admin access to the organization.
|
|
14
15
|
*
|
|
@@ -42,5 +43,5 @@ export declare const getGroup: (endpoint: VerdocsEndpoint, organizationId: strin
|
|
|
42
43
|
export declare const getMembers: (endpoint: VerdocsEndpoint, organizationId: string, groupId: string) => Promise<any>;
|
|
43
44
|
export declare const addMembers: (endpoint: VerdocsEndpoint, organizationId: string, groupId: string, params: any) => Promise<any>;
|
|
44
45
|
export declare const deleteMembers: (endpoint: VerdocsEndpoint, organizationId: string, groupId: string, params: any) => Promise<any>;
|
|
45
|
-
export declare const addPermission: (endpoint: VerdocsEndpoint, organizationId: string, groupId: string, permissionId: string
|
|
46
|
+
export declare const addPermission: (endpoint: VerdocsEndpoint, organizationId: string, groupId: string, permissionId: string) => Promise<IPermission>;
|
|
46
47
|
export declare const deletePermission: (endpoint: VerdocsEndpoint, organizationId: string, groupId: string, permissionId: string) => Promise<any>;
|
package/Organizations/Groups.js
CHANGED
|
@@ -64,9 +64,9 @@ export var deleteMembers = function (endpoint, organizationId, groupId, params)
|
|
|
64
64
|
.put("/organizations/".concat(organizationId, "/groups/").concat(groupId, "/delete_members"), params)
|
|
65
65
|
.then(function (r) { return r.data; });
|
|
66
66
|
};
|
|
67
|
-
export var addPermission = function (endpoint, organizationId, groupId, permissionId
|
|
67
|
+
export var addPermission = function (endpoint, organizationId, groupId, permissionId) {
|
|
68
68
|
return endpoint.api //
|
|
69
|
-
.post("/organizations/".concat(organizationId, "/groups/").concat(groupId, "/permissions/").concat(permissionId),
|
|
69
|
+
.post("/organizations/".concat(organizationId, "/groups/").concat(groupId, "/permissions/").concat(permissionId), {})
|
|
70
70
|
.then(function (r) { return r.data; });
|
|
71
71
|
};
|
|
72
72
|
export var deletePermission = function (endpoint, organizationId, groupId, permissionId) {
|
package/Templates/Templates.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export interface IListTemplatesParams {
|
|
|
29
29
|
sharing?: 'all' | 'personal' | 'shared' | 'public';
|
|
30
30
|
starred?: 'all' | 'starred' | 'unstarred';
|
|
31
31
|
sort?: 'name' | 'created_at' | 'updated_at' | 'last_used_at' | 'counter' | 'star_counter';
|
|
32
|
+
direction?: 'asc' | 'desc';
|
|
32
33
|
page?: number;
|
|
33
34
|
rows?: number;
|
|
34
35
|
}
|
package/Templates/Types.d.ts
CHANGED