@verdocs/js-sdk 3.8.8 → 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 +20 -1
- package/Envelopes/Envelopes.js +14 -0
- package/Envelopes/Types.d.ts +25 -0
- package/Templates/Templates.d.ts +1 -0
- package/Templates/Types.d.ts +1 -1
- package/package.json +1 -1
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
|
+
}
|
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