@verdocs/js-sdk 4.2.27 → 4.2.28
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 +93 -106
- package/dist/index.d.ts +93 -106
- package/dist/index.js +44 -38
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +45 -38
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -847,8 +847,6 @@ interface ITemplateField {
|
|
|
847
847
|
placeholder: string | null;
|
|
848
848
|
/** For fields that support grouping (radio buttons and check boxes) the value selected will be stored under this name. */
|
|
849
849
|
group: string | null;
|
|
850
|
-
// @deprecated. Use settings instead.
|
|
851
|
-
setting?: ITemplateFieldSetting | null;
|
|
852
850
|
}
|
|
853
851
|
interface ITextFieldSetting {
|
|
854
852
|
x: number;
|
|
@@ -2111,16 +2109,34 @@ declare const canPerformTemplateAction: (profile: IProfile | null | undefined, a
|
|
|
2111
2109
|
declare const hasRequiredPermissions: (profile: IProfile | null | undefined, permissions: TPermission[]) => boolean;
|
|
2112
2110
|
/**
|
|
2113
2111
|
* Add a field to a template.
|
|
2112
|
+
*
|
|
2113
|
+
* ```typescript
|
|
2114
|
+
* import {createField} from '@verdocs/js-sdk/Templates';
|
|
2115
|
+
*
|
|
2116
|
+
* await createField((VerdocsEndpoint.getDefault(), template_id, { ... });
|
|
2117
|
+
* ```
|
|
2114
2118
|
*/
|
|
2115
2119
|
declare const createField: (endpoint: VerdocsEndpoint, templateId: string, params: ITemplateField) => Promise<ITemplateField>;
|
|
2116
2120
|
/**
|
|
2117
2121
|
* Update a template field.
|
|
2122
|
+
*
|
|
2123
|
+
* ```typescript
|
|
2124
|
+
* import {updateField} from '@verdocs/js-sdk/Templates';
|
|
2125
|
+
*
|
|
2126
|
+
* await updateField((VerdocsEndpoint.getDefault(), template_id, field_name, { ... });
|
|
2127
|
+
* ```
|
|
2118
2128
|
*/
|
|
2119
|
-
declare const updateField: (endpoint: VerdocsEndpoint, templateId: string,
|
|
2129
|
+
declare const updateField: (endpoint: VerdocsEndpoint, templateId: string, name: string, params: Partial<ITemplateField>) => Promise<ITemplateField>;
|
|
2120
2130
|
/**
|
|
2121
|
-
*
|
|
2131
|
+
* Remove a field from a template.
|
|
2132
|
+
*
|
|
2133
|
+
* ```typescript
|
|
2134
|
+
* import {deleteField} from '@verdocs/js-sdk/Templates';
|
|
2135
|
+
*
|
|
2136
|
+
* await deleteField((VerdocsEndpoint.getDefault(), template_id, field_name);
|
|
2137
|
+
* ```
|
|
2122
2138
|
*/
|
|
2123
|
-
declare const deleteField: (endpoint: VerdocsEndpoint, templateId: string,
|
|
2139
|
+
declare const deleteField: (endpoint: VerdocsEndpoint, templateId: string, name: string) => Promise<any>;
|
|
2124
2140
|
/**
|
|
2125
2141
|
* Check to see if the user created the template.
|
|
2126
2142
|
*/
|
|
@@ -2239,6 +2255,58 @@ declare const updateTemplateRole: (endpoint: VerdocsEndpoint, template_id: strin
|
|
|
2239
2255
|
* ```
|
|
2240
2256
|
*/
|
|
2241
2257
|
declare const deleteTemplateRole: (endpoint: VerdocsEndpoint, template_id: string, name: string) => Promise<any>;
|
|
2258
|
+
interface ITemplateTag {
|
|
2259
|
+
tag_name: string;
|
|
2260
|
+
template_id: string;
|
|
2261
|
+
}
|
|
2262
|
+
interface ITag {
|
|
2263
|
+
name: string;
|
|
2264
|
+
featured?: boolean;
|
|
2265
|
+
organization_id?: string;
|
|
2266
|
+
created_at?: string;
|
|
2267
|
+
}
|
|
2268
|
+
interface IStar {
|
|
2269
|
+
template_id: string;
|
|
2270
|
+
profile_id: string;
|
|
2271
|
+
}
|
|
2272
|
+
interface ITemplateSearchResult {
|
|
2273
|
+
page: number;
|
|
2274
|
+
row: number;
|
|
2275
|
+
total: number;
|
|
2276
|
+
result: ITemplate[];
|
|
2277
|
+
}
|
|
2278
|
+
/**
|
|
2279
|
+
* Get the template stars for a template.
|
|
2280
|
+
*/
|
|
2281
|
+
declare const getStars: (endpoint: VerdocsEndpoint, templateId: string) => Promise<IStar[]>;
|
|
2282
|
+
/**
|
|
2283
|
+
* Toggle the template star for a template.
|
|
2284
|
+
*/
|
|
2285
|
+
declare const toggleStar: (endpoint: VerdocsEndpoint, templateId: string) => Promise<ITemplate>;
|
|
2286
|
+
/**
|
|
2287
|
+
* Apply a tag to a template.
|
|
2288
|
+
*/
|
|
2289
|
+
declare const addTemplateTag: (endpoint: VerdocsEndpoint, templateId: string, params: ITag) => Promise<ITemplateTag>;
|
|
2290
|
+
/**
|
|
2291
|
+
* Get all tags for a template.
|
|
2292
|
+
*/
|
|
2293
|
+
declare const getTemplateTags: (endpoint: VerdocsEndpoint, templateId: string) => Promise<ITemplateTag[]>;
|
|
2294
|
+
/**
|
|
2295
|
+
* Remove a tag from a template.
|
|
2296
|
+
*/
|
|
2297
|
+
declare const deleteTemplateTag: (endpoint: VerdocsEndpoint, templateId: string, tagName: string) => Promise<any>;
|
|
2298
|
+
/**
|
|
2299
|
+
* Create an Organization-wide tag.
|
|
2300
|
+
*/
|
|
2301
|
+
declare const createTag: (endpoint: VerdocsEndpoint, name: string) => Promise<ITag>;
|
|
2302
|
+
/**
|
|
2303
|
+
* Get an Organization-wide tag.
|
|
2304
|
+
*/
|
|
2305
|
+
declare const getTag: (endpoint: VerdocsEndpoint, name: string) => Promise<ITag>;
|
|
2306
|
+
/**
|
|
2307
|
+
* Get all tags available for use by an Organization.
|
|
2308
|
+
*/
|
|
2309
|
+
declare const getAllTags: (endpoint: VerdocsEndpoint) => Promise<ITag[]>;
|
|
2242
2310
|
/**
|
|
2243
2311
|
* Given a `rgba(r,g,b,a)` string value, returns the hex equivalent, dropping the alpha channel.
|
|
2244
2312
|
*/
|
|
@@ -2345,77 +2413,6 @@ declare const decodeJWTBody: (token: string) => any;
|
|
|
2345
2413
|
* the presence of the `document_id` field, which will only be present for signing sessions.
|
|
2346
2414
|
*/
|
|
2347
2415
|
declare const decodeAccessTokenBody: (token: string) => TSession;
|
|
2348
|
-
interface ITemplateSearchParams {
|
|
2349
|
-
id?: string;
|
|
2350
|
-
name?: string;
|
|
2351
|
-
sender?: string;
|
|
2352
|
-
description?: string;
|
|
2353
|
-
profile_id?: string;
|
|
2354
|
-
organization_id?: string;
|
|
2355
|
-
updated_at?: ITimePeriod;
|
|
2356
|
-
created_at?: ITimePeriod;
|
|
2357
|
-
last_used_at?: ITimePeriod;
|
|
2358
|
-
is_personal?: boolean;
|
|
2359
|
-
is_public?: boolean;
|
|
2360
|
-
tags?: string[];
|
|
2361
|
-
document_name?: string;
|
|
2362
|
-
sort_by?: TSortTemplateBy;
|
|
2363
|
-
ascending?: boolean;
|
|
2364
|
-
row?: number;
|
|
2365
|
-
page?: number;
|
|
2366
|
-
}
|
|
2367
|
-
interface ITemplateTag {
|
|
2368
|
-
tag_name: string;
|
|
2369
|
-
template_id: string;
|
|
2370
|
-
}
|
|
2371
|
-
interface ITag {
|
|
2372
|
-
name: string;
|
|
2373
|
-
featured?: boolean;
|
|
2374
|
-
organization_id?: string;
|
|
2375
|
-
created_at?: string;
|
|
2376
|
-
}
|
|
2377
|
-
interface IStar {
|
|
2378
|
-
template_id: string;
|
|
2379
|
-
profile_id: string;
|
|
2380
|
-
}
|
|
2381
|
-
interface ITemplateSearchResult {
|
|
2382
|
-
page: number;
|
|
2383
|
-
row: number;
|
|
2384
|
-
total: number;
|
|
2385
|
-
result: ITemplate[];
|
|
2386
|
-
}
|
|
2387
|
-
/**
|
|
2388
|
-
* Get the template stars for a template.
|
|
2389
|
-
*/
|
|
2390
|
-
declare const getStars: (endpoint: VerdocsEndpoint, templateId: string) => Promise<IStar[]>;
|
|
2391
|
-
/**
|
|
2392
|
-
* Toggle the template star for a template.
|
|
2393
|
-
*/
|
|
2394
|
-
declare const toggleStar: (endpoint: VerdocsEndpoint, templateId: string) => Promise<ITemplate>;
|
|
2395
|
-
/**
|
|
2396
|
-
* Apply a tag to a template.
|
|
2397
|
-
*/
|
|
2398
|
-
declare const addTemplateTag: (endpoint: VerdocsEndpoint, templateId: string, params: ITag) => Promise<ITemplateTag>;
|
|
2399
|
-
/**
|
|
2400
|
-
* Get all tags for a template.
|
|
2401
|
-
*/
|
|
2402
|
-
declare const getTemplateTags: (endpoint: VerdocsEndpoint, templateId: string) => Promise<ITemplateTag[]>;
|
|
2403
|
-
/**
|
|
2404
|
-
* Remove a tag from a template.
|
|
2405
|
-
*/
|
|
2406
|
-
declare const deleteTemplateTag: (endpoint: VerdocsEndpoint, templateId: string, tagName: string) => Promise<any>;
|
|
2407
|
-
/**
|
|
2408
|
-
* Create an Organization-wide tag.
|
|
2409
|
-
*/
|
|
2410
|
-
declare const createTag: (endpoint: VerdocsEndpoint, name: string) => Promise<ITag>;
|
|
2411
|
-
/**
|
|
2412
|
-
* Get an Organization-wide tag.
|
|
2413
|
-
*/
|
|
2414
|
-
declare const getTag: (endpoint: VerdocsEndpoint, name: string) => Promise<ITag>;
|
|
2415
|
-
/**
|
|
2416
|
-
* Get all tags available for use by an Organization.
|
|
2417
|
-
*/
|
|
2418
|
-
declare const getAllTags: (endpoint: VerdocsEndpoint) => Promise<ITag[]>;
|
|
2419
2416
|
interface IGetTemplatesParams {
|
|
2420
2417
|
is_starred?: boolean;
|
|
2421
2418
|
is_creator?: boolean;
|
|
@@ -2425,12 +2422,12 @@ interface IGetTemplatesParams {
|
|
|
2425
2422
|
* Get all templates accessible by the caller, with optional filters.
|
|
2426
2423
|
*
|
|
2427
2424
|
* ```typescript
|
|
2428
|
-
* import {
|
|
2425
|
+
* import {getTemplates} from '@verdocs/js-sdk/Templates';
|
|
2429
2426
|
*
|
|
2430
|
-
* await
|
|
2431
|
-
* await
|
|
2432
|
-
* await
|
|
2433
|
-
* await
|
|
2427
|
+
* await getTemplates((VerdocsEndpoint.getDefault());
|
|
2428
|
+
* await getTemplates((VerdocsEndpoint.getDefault(), { is_starred: true });
|
|
2429
|
+
* await getTemplates((VerdocsEndpoint.getDefault(), { is_creator: true });
|
|
2430
|
+
* await getTemplates((VerdocsEndpoint.getDefault(), { is_organization: true });
|
|
2434
2431
|
* ```
|
|
2435
2432
|
*/
|
|
2436
2433
|
declare const getTemplates: (endpoint: VerdocsEndpoint, params?: IGetTemplatesParams) => Promise<ITemplate[]>;
|
|
@@ -2447,9 +2444,9 @@ declare const getTemplates: (endpoint: VerdocsEndpoint, params?: IGetTemplatesPa
|
|
|
2447
2444
|
* Lists all templates accessible by the caller, with optional filters.
|
|
2448
2445
|
*
|
|
2449
2446
|
* ```typescript
|
|
2450
|
-
* import {
|
|
2447
|
+
* import {listTemplates} from '@verdocs/js-sdk/Templates';
|
|
2451
2448
|
*
|
|
2452
|
-
* await
|
|
2449
|
+
* await listTemplates((VerdocsEndpoint.getDefault(), { sharing: 'personal', sort: 'last_used_at' });
|
|
2453
2450
|
* ```
|
|
2454
2451
|
*/
|
|
2455
2452
|
// export const listTemplates = (endpoint: VerdocsEndpoint, params?: IListTemplatesParams) =>
|
|
@@ -2460,9 +2457,9 @@ declare const getTemplates: (endpoint: VerdocsEndpoint, params?: IGetTemplatesPa
|
|
|
2460
2457
|
* Get one template by its ID.
|
|
2461
2458
|
*
|
|
2462
2459
|
* ```typescript
|
|
2463
|
-
* import {
|
|
2460
|
+
* import {getTemplate} from '@verdocs/js-sdk/Templates';
|
|
2464
2461
|
*
|
|
2465
|
-
* const template = await
|
|
2462
|
+
* const template = await getTemplate((VerdocsEndpoint.getDefault(), '83da3d70-7857-4392-b876-c4592a304bc9');
|
|
2466
2463
|
* ```
|
|
2467
2464
|
*/
|
|
2468
2465
|
declare const getTemplate: (endpoint: VerdocsEndpoint, templateId: string) => Promise<ITemplate>;
|
|
@@ -2524,9 +2521,9 @@ interface ITemplateCreateParams {
|
|
|
2524
2521
|
* Create a template.
|
|
2525
2522
|
*
|
|
2526
2523
|
* ```typescript
|
|
2527
|
-
* import {
|
|
2524
|
+
* import {createTemplate} from '@verdocs/js-sdk/Templates';
|
|
2528
2525
|
*
|
|
2529
|
-
* const newTemplate = await
|
|
2526
|
+
* const newTemplate = await createTemplate((VerdocsEndpoint.getDefault(), {...});
|
|
2530
2527
|
* ```
|
|
2531
2528
|
*/
|
|
2532
2529
|
declare const createTemplate: (endpoint: VerdocsEndpoint, params: ITemplateCreateParams, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<ITemplate>;
|
|
@@ -2548,9 +2545,9 @@ interface ITemplateCreateFromSharepointParams {
|
|
|
2548
2545
|
* Create a template from a Sharepoint asset.
|
|
2549
2546
|
*
|
|
2550
2547
|
* ```typescript
|
|
2551
|
-
* import {
|
|
2548
|
+
* import {createTemplateFromSharepoint} from '@verdocs/js-sdk/Templates';
|
|
2552
2549
|
*
|
|
2553
|
-
* const newTemplate = await
|
|
2550
|
+
* const newTemplate = await createTemplateFromSharepoint((VerdocsEndpoint.getDefault(), {...});
|
|
2554
2551
|
* ```
|
|
2555
2552
|
*/
|
|
2556
2553
|
declare const createTemplateFromSharepoint: (endpoint: VerdocsEndpoint, params: ITemplateCreateFromSharepointParams) => Promise<ITemplate>;
|
|
@@ -2558,9 +2555,9 @@ declare const createTemplateFromSharepoint: (endpoint: VerdocsEndpoint, params:
|
|
|
2558
2555
|
* Update a template.
|
|
2559
2556
|
*
|
|
2560
2557
|
* ```typescript
|
|
2561
|
-
* import {
|
|
2558
|
+
* import {updateTemplate} from '@verdocs/js-sdk/Templates';
|
|
2562
2559
|
*
|
|
2563
|
-
* const updatedTemplate = await
|
|
2560
|
+
* const updatedTemplate = await updateTemplate((VerdocsEndpoint.getDefault(), '83da3d70-7857-4392-b876-c4592a304bc9', { name: 'New Name' });
|
|
2564
2561
|
* ```
|
|
2565
2562
|
*/
|
|
2566
2563
|
declare const updateTemplate: (endpoint: VerdocsEndpoint, templateId: string, params: Partial<ITemplateCreateParams>) => Promise<ITemplate>;
|
|
@@ -2568,22 +2565,12 @@ declare const updateTemplate: (endpoint: VerdocsEndpoint, templateId: string, pa
|
|
|
2568
2565
|
* Delete a template.
|
|
2569
2566
|
*
|
|
2570
2567
|
* ```typescript
|
|
2571
|
-
* import {
|
|
2568
|
+
* import {deleteTemplate} from '@verdocs/js-sdk/Templates';
|
|
2572
2569
|
*
|
|
2573
|
-
* await
|
|
2570
|
+
* await deleteTemplate((VerdocsEndpoint.getDefault(), '83da3d70-7857-4392-b876-c4592a304bc9');
|
|
2574
2571
|
* ```
|
|
2575
2572
|
*/
|
|
2576
2573
|
declare const deleteTemplate: (endpoint: VerdocsEndpoint, templateId: string) => Promise<any>;
|
|
2577
|
-
/**
|
|
2578
|
-
* Search for templates matching various criteria.
|
|
2579
|
-
*
|
|
2580
|
-
* ```typescript
|
|
2581
|
-
* import {Templates} from '@verdocs/js-sdk/Templates';
|
|
2582
|
-
*
|
|
2583
|
-
* const {result, page, total} = await Templates.search((VerdocsEndpoint.getDefault(), { ... });
|
|
2584
|
-
* ```
|
|
2585
|
-
*/
|
|
2586
|
-
declare const searchTemplates: (endpoint: VerdocsEndpoint, params: ITemplateSearchParams) => Promise<ITemplateSearchResult>;
|
|
2587
2574
|
interface ISearchTimeRange {
|
|
2588
2575
|
start_time: string;
|
|
2589
2576
|
end_time: string;
|
|
@@ -2619,12 +2606,12 @@ interface ITemplateListParams {
|
|
|
2619
2606
|
page?: number;
|
|
2620
2607
|
}
|
|
2621
2608
|
/**
|
|
2622
|
-
* List
|
|
2609
|
+
* List
|
|
2623
2610
|
*
|
|
2624
2611
|
* ```typescript
|
|
2625
2612
|
* import {Templates} from '@verdocs/js-sdk/Templates';
|
|
2626
2613
|
*
|
|
2627
|
-
* const {totals, templates} = await
|
|
2614
|
+
* const {totals, templates} = await listTemplates((VerdocsEndpoint.getDefault(), { q: 'test', sort: 'created_at' }); * ```
|
|
2628
2615
|
*/
|
|
2629
2616
|
declare const listTemplates: (endpoint: VerdocsEndpoint, params?: ITemplateListParams) => Promise<{
|
|
2630
2617
|
total: number;
|
|
@@ -2710,4 +2697,4 @@ declare const isValidEmail: (email: string | undefined) => boolean;
|
|
|
2710
2697
|
declare const isValidPhone: (phone: string | undefined) => boolean;
|
|
2711
2698
|
declare const isValidRoleName: (value: string, roles: IRole[]) => boolean;
|
|
2712
2699
|
declare const isValidTag: (value: string, tags: string[]) => boolean;
|
|
2713
|
-
export { TRequestStatus, TTemplateSenderType, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, FIELD_TYPES, DEFAULT_FIELD_WIDTHS, DEFAULT_FIELD_HEIGHTS, DEFAULT_FIELD_SETTINGS, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IRecipient, IReminder, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelopesSummary, getEnvelopeRecipients, getEnvelope, getEnvelopeDocument, getDocumentDownloadLink, getDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, updateEnvelopeField, updateEnvelopeFieldSignature, updateEnvelopeFieldInitials, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, getFieldAttachment, getEnvelopeDocumentPageDisplayUri, ITimeRange, IListEnvelopesParams, getEnvelopes, createInitials, IRecipientKbaStepNone, IRecipientKbaStepComplete, IRecipientKbaStepPin, IRecipientKbaStepIdentity, IRecipientKbaStepChallenge, IRecipientKbaStepFailed, TRecipientKbaStep, getKbaStep, submitKbaPin, IKbaIdentity, submitKbaIdentity, IKbaChallengeResponse, submitKbaChallengeResponse, updateRecipient, envelopeRecipientSubmit, envelopeRecipientDecline, envelopeRecipientChangeOwner, envelopeRecipientAgree, envelopeRecipientUpdateName, envelopeRecipientPrepare, ISignerTokenResponse, getSigningSession, getSignerToken, getInPersonLink, sendDelegate, resendInvitation, createEnvelopeReminder, getEnvelopeReminder, updateEnvelopeReminder, deleteEnvelopeReminder, userIsEnvelopeOwner, userIsEnvelopeRecipient, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, userCanSignNow, getNextRecipient, createSignature, getSignatures, getSignature, deleteSignature, IEnvelopesSearchResult, IEnvelopesSummary, IDocumentSearchOptions, ICreateEnvelopeRole, IEnvelopeSummaries, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeRequest, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getGroups, getGroup, createGroup, addGroupMember, deleteGroupMember, updateGroup, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, getOrganization, updateOrganization, updateOrganizationLogo, updateOrganizationThumbnail, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, IAcceptOrganizationInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, TTemplatePermissionCreatePublic, TTemplatePermissionCreateOrg, TTemplatePermissionCreatePersonal, TTemplatePermissionDelete, TTemplatePermissionVisibility, TTemplateMemberRead, TTemplateMemberWrite, TTemplateMemberDelete, TTemplateMemberVisibility, TTemplatePermission, TAccountPermissionOwnerAdd, TAccountPermissionOwnerRemove, TAccountPermissionAdminAdd, TAccountPermissionAdminRemove, TAccountPermissionMemberView, TAccountPermissionMemberAdd, TAccountPermissionMemberRemove, TAccountPermission, TOrgPermissionCreate, TOrgPermissionView, TOrgPermissionUpdate, TOrgPermissionDelete, TOrgPermissionTransfer, TOrgPermissionList, TOrgPermission, TEnvelopePermissionCreate, TEnvelopePermissionCancel, TEnvelopePermissionView, TEnvelopePermissionOrg, TEnvelopePermission, TPermission, TRole, RolePermissions, userHasPermissions, ISigningSession, IUserSession, IIdToken, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, userIsTemplateCreator, userHasSharedTemplate, userCanCreatePersonalTemplate, userCanCreateOrgTemplate, userCanCreatePublicTemplate, userCanReadTemplate, userCanUpdateTemplate, userCanMakeTemplatePrivate, userCanMakeTemplateShared, userCanMakeTemplatePublic, userCanChangeOrgVisibility, userCanDeleteTemplate, userCanSendTemplate, userCanCreateTemplate, userCanBuildTemplate, getFieldsForRole, userCanPreviewTemplate, ICreateTemplateReminderRequest, createTemplateReminder, getTemplateReminder, updateTemplateReminder, deleteTemplateReminder, createTemplateRole, updateTemplateRole, deleteTemplateRole, getStars, toggleStar, addTemplateTag, getTemplateTags, deleteTemplateTag, createTag, getTag, getAllTags, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate,
|
|
2700
|
+
export { TRequestStatus, TTemplateSenderType, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, FIELD_TYPES, DEFAULT_FIELD_WIDTHS, DEFAULT_FIELD_HEIGHTS, DEFAULT_FIELD_SETTINGS, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IRecipient, IReminder, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelopesSummary, getEnvelopeRecipients, getEnvelope, getEnvelopeDocument, getDocumentDownloadLink, getDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, updateEnvelopeField, updateEnvelopeFieldSignature, updateEnvelopeFieldInitials, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, getFieldAttachment, getEnvelopeDocumentPageDisplayUri, ITimeRange, IListEnvelopesParams, getEnvelopes, createInitials, IRecipientKbaStepNone, IRecipientKbaStepComplete, IRecipientKbaStepPin, IRecipientKbaStepIdentity, IRecipientKbaStepChallenge, IRecipientKbaStepFailed, TRecipientKbaStep, getKbaStep, submitKbaPin, IKbaIdentity, submitKbaIdentity, IKbaChallengeResponse, submitKbaChallengeResponse, updateRecipient, envelopeRecipientSubmit, envelopeRecipientDecline, envelopeRecipientChangeOwner, envelopeRecipientAgree, envelopeRecipientUpdateName, envelopeRecipientPrepare, ISignerTokenResponse, getSigningSession, getSignerToken, getInPersonLink, sendDelegate, resendInvitation, createEnvelopeReminder, getEnvelopeReminder, updateEnvelopeReminder, deleteEnvelopeReminder, userIsEnvelopeOwner, userIsEnvelopeRecipient, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, userCanSignNow, getNextRecipient, createSignature, getSignatures, getSignature, deleteSignature, IEnvelopesSearchResult, IEnvelopesSummary, IDocumentSearchOptions, ICreateEnvelopeRole, IEnvelopeSummaries, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeRequest, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getGroups, getGroup, createGroup, addGroupMember, deleteGroupMember, updateGroup, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, getOrganization, updateOrganization, updateOrganizationLogo, updateOrganizationThumbnail, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, IAcceptOrganizationInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, TTemplatePermissionCreatePublic, TTemplatePermissionCreateOrg, TTemplatePermissionCreatePersonal, TTemplatePermissionDelete, TTemplatePermissionVisibility, TTemplateMemberRead, TTemplateMemberWrite, TTemplateMemberDelete, TTemplateMemberVisibility, TTemplatePermission, TAccountPermissionOwnerAdd, TAccountPermissionOwnerRemove, TAccountPermissionAdminAdd, TAccountPermissionAdminRemove, TAccountPermissionMemberView, TAccountPermissionMemberAdd, TAccountPermissionMemberRemove, TAccountPermission, TOrgPermissionCreate, TOrgPermissionView, TOrgPermissionUpdate, TOrgPermissionDelete, TOrgPermissionTransfer, TOrgPermissionList, TOrgPermission, TEnvelopePermissionCreate, TEnvelopePermissionCancel, TEnvelopePermissionView, TEnvelopePermissionOrg, TEnvelopePermission, TPermission, TRole, RolePermissions, userHasPermissions, ISigningSession, IUserSession, IIdToken, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, userIsTemplateCreator, userHasSharedTemplate, userCanCreatePersonalTemplate, userCanCreateOrgTemplate, userCanCreatePublicTemplate, userCanReadTemplate, userCanUpdateTemplate, userCanMakeTemplatePrivate, userCanMakeTemplateShared, userCanMakeTemplatePublic, userCanChangeOrgVisibility, userCanDeleteTemplate, userCanSendTemplate, userCanCreateTemplate, userCanBuildTemplate, getFieldsForRole, userCanPreviewTemplate, ICreateTemplateReminderRequest, createTemplateReminder, getTemplateReminder, updateTemplateReminder, deleteTemplateReminder, createTemplateRole, updateTemplateRole, deleteTemplateRole, getStars, toggleStar, addTemplateTag, getTemplateTags, deleteTemplateTag, createTag, getTag, getAllTags, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, ISearchTimeRange, IGetTemplateSummarySortBy, IGetTemplateSummaryParams, ITemplateListParams, listTemplates, getTemplateDocuments, getTemplateDocument, createTemplateDocument, deleteTemplateDocument, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, ITemplateTag, ITag, IStar, ITemplateSearchResult, IValidator, getValidators, getValidator, isValidEmail, isValidPhone, isValidRoleName, isValidTag, IROPCRequest, IClientCredentialsRequest, IRefreshTokenRequest, TAuthenticationRequest, authenticate, refreshToken, changePassword, resetPassword, resendVerification, verifyEmail, getMyUser, getNotifications, getProfiles, getCurrentProfile, switchProfile, updateProfile, deleteProfile, createProfile, updateProfilePhoto, ICreateProfileRequest, IUpdateProfileRequest, IAuthenticateResponse, IChangePasswordRequest, IChangePasswordResponse, IResetPasswordRequest, IResetPasswordResponse, IVerifyEmailRequest, getRGB, getRGBA, nameToRGBA, getRoleColor, formatShortTimeAgo, timePeriod, getRTop, getRLeft, getRValue, blobToBase64, rescale, fileToDataUrl, downloadBlob, Countries, getCountryByCode, isFrenchGuiana, isGuadeloupe, isMartinique, isMayotte, getPlusOneCountry, isCanada, isAmericanSamoa, isDominicanRepublic, isPuertoRico, getMatchingCountry, integerSequence, formatFullName, formatInitials, fullNameToInitials, capitalize, convertToE164, AtoB, decodeJWTBody, decodeAccessTokenBody, IFileWithData, ICountry, ITimePeriod };
|
package/dist/index.d.ts
CHANGED
|
@@ -847,8 +847,6 @@ interface ITemplateField {
|
|
|
847
847
|
placeholder: string | null;
|
|
848
848
|
/** For fields that support grouping (radio buttons and check boxes) the value selected will be stored under this name. */
|
|
849
849
|
group: string | null;
|
|
850
|
-
// @deprecated. Use settings instead.
|
|
851
|
-
setting?: ITemplateFieldSetting | null;
|
|
852
850
|
}
|
|
853
851
|
interface ITextFieldSetting {
|
|
854
852
|
x: number;
|
|
@@ -2111,16 +2109,34 @@ declare const canPerformTemplateAction: (profile: IProfile | null | undefined, a
|
|
|
2111
2109
|
declare const hasRequiredPermissions: (profile: IProfile | null | undefined, permissions: TPermission[]) => boolean;
|
|
2112
2110
|
/**
|
|
2113
2111
|
* Add a field to a template.
|
|
2112
|
+
*
|
|
2113
|
+
* ```typescript
|
|
2114
|
+
* import {createField} from '@verdocs/js-sdk/Templates';
|
|
2115
|
+
*
|
|
2116
|
+
* await createField((VerdocsEndpoint.getDefault(), template_id, { ... });
|
|
2117
|
+
* ```
|
|
2114
2118
|
*/
|
|
2115
2119
|
declare const createField: (endpoint: VerdocsEndpoint, templateId: string, params: ITemplateField) => Promise<ITemplateField>;
|
|
2116
2120
|
/**
|
|
2117
2121
|
* Update a template field.
|
|
2122
|
+
*
|
|
2123
|
+
* ```typescript
|
|
2124
|
+
* import {updateField} from '@verdocs/js-sdk/Templates';
|
|
2125
|
+
*
|
|
2126
|
+
* await updateField((VerdocsEndpoint.getDefault(), template_id, field_name, { ... });
|
|
2127
|
+
* ```
|
|
2118
2128
|
*/
|
|
2119
|
-
declare const updateField: (endpoint: VerdocsEndpoint, templateId: string,
|
|
2129
|
+
declare const updateField: (endpoint: VerdocsEndpoint, templateId: string, name: string, params: Partial<ITemplateField>) => Promise<ITemplateField>;
|
|
2120
2130
|
/**
|
|
2121
|
-
*
|
|
2131
|
+
* Remove a field from a template.
|
|
2132
|
+
*
|
|
2133
|
+
* ```typescript
|
|
2134
|
+
* import {deleteField} from '@verdocs/js-sdk/Templates';
|
|
2135
|
+
*
|
|
2136
|
+
* await deleteField((VerdocsEndpoint.getDefault(), template_id, field_name);
|
|
2137
|
+
* ```
|
|
2122
2138
|
*/
|
|
2123
|
-
declare const deleteField: (endpoint: VerdocsEndpoint, templateId: string,
|
|
2139
|
+
declare const deleteField: (endpoint: VerdocsEndpoint, templateId: string, name: string) => Promise<any>;
|
|
2124
2140
|
/**
|
|
2125
2141
|
* Check to see if the user created the template.
|
|
2126
2142
|
*/
|
|
@@ -2239,6 +2255,58 @@ declare const updateTemplateRole: (endpoint: VerdocsEndpoint, template_id: strin
|
|
|
2239
2255
|
* ```
|
|
2240
2256
|
*/
|
|
2241
2257
|
declare const deleteTemplateRole: (endpoint: VerdocsEndpoint, template_id: string, name: string) => Promise<any>;
|
|
2258
|
+
interface ITemplateTag {
|
|
2259
|
+
tag_name: string;
|
|
2260
|
+
template_id: string;
|
|
2261
|
+
}
|
|
2262
|
+
interface ITag {
|
|
2263
|
+
name: string;
|
|
2264
|
+
featured?: boolean;
|
|
2265
|
+
organization_id?: string;
|
|
2266
|
+
created_at?: string;
|
|
2267
|
+
}
|
|
2268
|
+
interface IStar {
|
|
2269
|
+
template_id: string;
|
|
2270
|
+
profile_id: string;
|
|
2271
|
+
}
|
|
2272
|
+
interface ITemplateSearchResult {
|
|
2273
|
+
page: number;
|
|
2274
|
+
row: number;
|
|
2275
|
+
total: number;
|
|
2276
|
+
result: ITemplate[];
|
|
2277
|
+
}
|
|
2278
|
+
/**
|
|
2279
|
+
* Get the template stars for a template.
|
|
2280
|
+
*/
|
|
2281
|
+
declare const getStars: (endpoint: VerdocsEndpoint, templateId: string) => Promise<IStar[]>;
|
|
2282
|
+
/**
|
|
2283
|
+
* Toggle the template star for a template.
|
|
2284
|
+
*/
|
|
2285
|
+
declare const toggleStar: (endpoint: VerdocsEndpoint, templateId: string) => Promise<ITemplate>;
|
|
2286
|
+
/**
|
|
2287
|
+
* Apply a tag to a template.
|
|
2288
|
+
*/
|
|
2289
|
+
declare const addTemplateTag: (endpoint: VerdocsEndpoint, templateId: string, params: ITag) => Promise<ITemplateTag>;
|
|
2290
|
+
/**
|
|
2291
|
+
* Get all tags for a template.
|
|
2292
|
+
*/
|
|
2293
|
+
declare const getTemplateTags: (endpoint: VerdocsEndpoint, templateId: string) => Promise<ITemplateTag[]>;
|
|
2294
|
+
/**
|
|
2295
|
+
* Remove a tag from a template.
|
|
2296
|
+
*/
|
|
2297
|
+
declare const deleteTemplateTag: (endpoint: VerdocsEndpoint, templateId: string, tagName: string) => Promise<any>;
|
|
2298
|
+
/**
|
|
2299
|
+
* Create an Organization-wide tag.
|
|
2300
|
+
*/
|
|
2301
|
+
declare const createTag: (endpoint: VerdocsEndpoint, name: string) => Promise<ITag>;
|
|
2302
|
+
/**
|
|
2303
|
+
* Get an Organization-wide tag.
|
|
2304
|
+
*/
|
|
2305
|
+
declare const getTag: (endpoint: VerdocsEndpoint, name: string) => Promise<ITag>;
|
|
2306
|
+
/**
|
|
2307
|
+
* Get all tags available for use by an Organization.
|
|
2308
|
+
*/
|
|
2309
|
+
declare const getAllTags: (endpoint: VerdocsEndpoint) => Promise<ITag[]>;
|
|
2242
2310
|
/**
|
|
2243
2311
|
* Given a `rgba(r,g,b,a)` string value, returns the hex equivalent, dropping the alpha channel.
|
|
2244
2312
|
*/
|
|
@@ -2345,77 +2413,6 @@ declare const decodeJWTBody: (token: string) => any;
|
|
|
2345
2413
|
* the presence of the `document_id` field, which will only be present for signing sessions.
|
|
2346
2414
|
*/
|
|
2347
2415
|
declare const decodeAccessTokenBody: (token: string) => TSession;
|
|
2348
|
-
interface ITemplateSearchParams {
|
|
2349
|
-
id?: string;
|
|
2350
|
-
name?: string;
|
|
2351
|
-
sender?: string;
|
|
2352
|
-
description?: string;
|
|
2353
|
-
profile_id?: string;
|
|
2354
|
-
organization_id?: string;
|
|
2355
|
-
updated_at?: ITimePeriod;
|
|
2356
|
-
created_at?: ITimePeriod;
|
|
2357
|
-
last_used_at?: ITimePeriod;
|
|
2358
|
-
is_personal?: boolean;
|
|
2359
|
-
is_public?: boolean;
|
|
2360
|
-
tags?: string[];
|
|
2361
|
-
document_name?: string;
|
|
2362
|
-
sort_by?: TSortTemplateBy;
|
|
2363
|
-
ascending?: boolean;
|
|
2364
|
-
row?: number;
|
|
2365
|
-
page?: number;
|
|
2366
|
-
}
|
|
2367
|
-
interface ITemplateTag {
|
|
2368
|
-
tag_name: string;
|
|
2369
|
-
template_id: string;
|
|
2370
|
-
}
|
|
2371
|
-
interface ITag {
|
|
2372
|
-
name: string;
|
|
2373
|
-
featured?: boolean;
|
|
2374
|
-
organization_id?: string;
|
|
2375
|
-
created_at?: string;
|
|
2376
|
-
}
|
|
2377
|
-
interface IStar {
|
|
2378
|
-
template_id: string;
|
|
2379
|
-
profile_id: string;
|
|
2380
|
-
}
|
|
2381
|
-
interface ITemplateSearchResult {
|
|
2382
|
-
page: number;
|
|
2383
|
-
row: number;
|
|
2384
|
-
total: number;
|
|
2385
|
-
result: ITemplate[];
|
|
2386
|
-
}
|
|
2387
|
-
/**
|
|
2388
|
-
* Get the template stars for a template.
|
|
2389
|
-
*/
|
|
2390
|
-
declare const getStars: (endpoint: VerdocsEndpoint, templateId: string) => Promise<IStar[]>;
|
|
2391
|
-
/**
|
|
2392
|
-
* Toggle the template star for a template.
|
|
2393
|
-
*/
|
|
2394
|
-
declare const toggleStar: (endpoint: VerdocsEndpoint, templateId: string) => Promise<ITemplate>;
|
|
2395
|
-
/**
|
|
2396
|
-
* Apply a tag to a template.
|
|
2397
|
-
*/
|
|
2398
|
-
declare const addTemplateTag: (endpoint: VerdocsEndpoint, templateId: string, params: ITag) => Promise<ITemplateTag>;
|
|
2399
|
-
/**
|
|
2400
|
-
* Get all tags for a template.
|
|
2401
|
-
*/
|
|
2402
|
-
declare const getTemplateTags: (endpoint: VerdocsEndpoint, templateId: string) => Promise<ITemplateTag[]>;
|
|
2403
|
-
/**
|
|
2404
|
-
* Remove a tag from a template.
|
|
2405
|
-
*/
|
|
2406
|
-
declare const deleteTemplateTag: (endpoint: VerdocsEndpoint, templateId: string, tagName: string) => Promise<any>;
|
|
2407
|
-
/**
|
|
2408
|
-
* Create an Organization-wide tag.
|
|
2409
|
-
*/
|
|
2410
|
-
declare const createTag: (endpoint: VerdocsEndpoint, name: string) => Promise<ITag>;
|
|
2411
|
-
/**
|
|
2412
|
-
* Get an Organization-wide tag.
|
|
2413
|
-
*/
|
|
2414
|
-
declare const getTag: (endpoint: VerdocsEndpoint, name: string) => Promise<ITag>;
|
|
2415
|
-
/**
|
|
2416
|
-
* Get all tags available for use by an Organization.
|
|
2417
|
-
*/
|
|
2418
|
-
declare const getAllTags: (endpoint: VerdocsEndpoint) => Promise<ITag[]>;
|
|
2419
2416
|
interface IGetTemplatesParams {
|
|
2420
2417
|
is_starred?: boolean;
|
|
2421
2418
|
is_creator?: boolean;
|
|
@@ -2425,12 +2422,12 @@ interface IGetTemplatesParams {
|
|
|
2425
2422
|
* Get all templates accessible by the caller, with optional filters.
|
|
2426
2423
|
*
|
|
2427
2424
|
* ```typescript
|
|
2428
|
-
* import {
|
|
2425
|
+
* import {getTemplates} from '@verdocs/js-sdk/Templates';
|
|
2429
2426
|
*
|
|
2430
|
-
* await
|
|
2431
|
-
* await
|
|
2432
|
-
* await
|
|
2433
|
-
* await
|
|
2427
|
+
* await getTemplates((VerdocsEndpoint.getDefault());
|
|
2428
|
+
* await getTemplates((VerdocsEndpoint.getDefault(), { is_starred: true });
|
|
2429
|
+
* await getTemplates((VerdocsEndpoint.getDefault(), { is_creator: true });
|
|
2430
|
+
* await getTemplates((VerdocsEndpoint.getDefault(), { is_organization: true });
|
|
2434
2431
|
* ```
|
|
2435
2432
|
*/
|
|
2436
2433
|
declare const getTemplates: (endpoint: VerdocsEndpoint, params?: IGetTemplatesParams) => Promise<ITemplate[]>;
|
|
@@ -2447,9 +2444,9 @@ declare const getTemplates: (endpoint: VerdocsEndpoint, params?: IGetTemplatesPa
|
|
|
2447
2444
|
* Lists all templates accessible by the caller, with optional filters.
|
|
2448
2445
|
*
|
|
2449
2446
|
* ```typescript
|
|
2450
|
-
* import {
|
|
2447
|
+
* import {listTemplates} from '@verdocs/js-sdk/Templates';
|
|
2451
2448
|
*
|
|
2452
|
-
* await
|
|
2449
|
+
* await listTemplates((VerdocsEndpoint.getDefault(), { sharing: 'personal', sort: 'last_used_at' });
|
|
2453
2450
|
* ```
|
|
2454
2451
|
*/
|
|
2455
2452
|
// export const listTemplates = (endpoint: VerdocsEndpoint, params?: IListTemplatesParams) =>
|
|
@@ -2460,9 +2457,9 @@ declare const getTemplates: (endpoint: VerdocsEndpoint, params?: IGetTemplatesPa
|
|
|
2460
2457
|
* Get one template by its ID.
|
|
2461
2458
|
*
|
|
2462
2459
|
* ```typescript
|
|
2463
|
-
* import {
|
|
2460
|
+
* import {getTemplate} from '@verdocs/js-sdk/Templates';
|
|
2464
2461
|
*
|
|
2465
|
-
* const template = await
|
|
2462
|
+
* const template = await getTemplate((VerdocsEndpoint.getDefault(), '83da3d70-7857-4392-b876-c4592a304bc9');
|
|
2466
2463
|
* ```
|
|
2467
2464
|
*/
|
|
2468
2465
|
declare const getTemplate: (endpoint: VerdocsEndpoint, templateId: string) => Promise<ITemplate>;
|
|
@@ -2524,9 +2521,9 @@ interface ITemplateCreateParams {
|
|
|
2524
2521
|
* Create a template.
|
|
2525
2522
|
*
|
|
2526
2523
|
* ```typescript
|
|
2527
|
-
* import {
|
|
2524
|
+
* import {createTemplate} from '@verdocs/js-sdk/Templates';
|
|
2528
2525
|
*
|
|
2529
|
-
* const newTemplate = await
|
|
2526
|
+
* const newTemplate = await createTemplate((VerdocsEndpoint.getDefault(), {...});
|
|
2530
2527
|
* ```
|
|
2531
2528
|
*/
|
|
2532
2529
|
declare const createTemplate: (endpoint: VerdocsEndpoint, params: ITemplateCreateParams, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<ITemplate>;
|
|
@@ -2548,9 +2545,9 @@ interface ITemplateCreateFromSharepointParams {
|
|
|
2548
2545
|
* Create a template from a Sharepoint asset.
|
|
2549
2546
|
*
|
|
2550
2547
|
* ```typescript
|
|
2551
|
-
* import {
|
|
2548
|
+
* import {createTemplateFromSharepoint} from '@verdocs/js-sdk/Templates';
|
|
2552
2549
|
*
|
|
2553
|
-
* const newTemplate = await
|
|
2550
|
+
* const newTemplate = await createTemplateFromSharepoint((VerdocsEndpoint.getDefault(), {...});
|
|
2554
2551
|
* ```
|
|
2555
2552
|
*/
|
|
2556
2553
|
declare const createTemplateFromSharepoint: (endpoint: VerdocsEndpoint, params: ITemplateCreateFromSharepointParams) => Promise<ITemplate>;
|
|
@@ -2558,9 +2555,9 @@ declare const createTemplateFromSharepoint: (endpoint: VerdocsEndpoint, params:
|
|
|
2558
2555
|
* Update a template.
|
|
2559
2556
|
*
|
|
2560
2557
|
* ```typescript
|
|
2561
|
-
* import {
|
|
2558
|
+
* import {updateTemplate} from '@verdocs/js-sdk/Templates';
|
|
2562
2559
|
*
|
|
2563
|
-
* const updatedTemplate = await
|
|
2560
|
+
* const updatedTemplate = await updateTemplate((VerdocsEndpoint.getDefault(), '83da3d70-7857-4392-b876-c4592a304bc9', { name: 'New Name' });
|
|
2564
2561
|
* ```
|
|
2565
2562
|
*/
|
|
2566
2563
|
declare const updateTemplate: (endpoint: VerdocsEndpoint, templateId: string, params: Partial<ITemplateCreateParams>) => Promise<ITemplate>;
|
|
@@ -2568,22 +2565,12 @@ declare const updateTemplate: (endpoint: VerdocsEndpoint, templateId: string, pa
|
|
|
2568
2565
|
* Delete a template.
|
|
2569
2566
|
*
|
|
2570
2567
|
* ```typescript
|
|
2571
|
-
* import {
|
|
2568
|
+
* import {deleteTemplate} from '@verdocs/js-sdk/Templates';
|
|
2572
2569
|
*
|
|
2573
|
-
* await
|
|
2570
|
+
* await deleteTemplate((VerdocsEndpoint.getDefault(), '83da3d70-7857-4392-b876-c4592a304bc9');
|
|
2574
2571
|
* ```
|
|
2575
2572
|
*/
|
|
2576
2573
|
declare const deleteTemplate: (endpoint: VerdocsEndpoint, templateId: string) => Promise<any>;
|
|
2577
|
-
/**
|
|
2578
|
-
* Search for templates matching various criteria.
|
|
2579
|
-
*
|
|
2580
|
-
* ```typescript
|
|
2581
|
-
* import {Templates} from '@verdocs/js-sdk/Templates';
|
|
2582
|
-
*
|
|
2583
|
-
* const {result, page, total} = await Templates.search((VerdocsEndpoint.getDefault(), { ... });
|
|
2584
|
-
* ```
|
|
2585
|
-
*/
|
|
2586
|
-
declare const searchTemplates: (endpoint: VerdocsEndpoint, params: ITemplateSearchParams) => Promise<ITemplateSearchResult>;
|
|
2587
2574
|
interface ISearchTimeRange {
|
|
2588
2575
|
start_time: string;
|
|
2589
2576
|
end_time: string;
|
|
@@ -2619,12 +2606,12 @@ interface ITemplateListParams {
|
|
|
2619
2606
|
page?: number;
|
|
2620
2607
|
}
|
|
2621
2608
|
/**
|
|
2622
|
-
* List
|
|
2609
|
+
* List
|
|
2623
2610
|
*
|
|
2624
2611
|
* ```typescript
|
|
2625
2612
|
* import {Templates} from '@verdocs/js-sdk/Templates';
|
|
2626
2613
|
*
|
|
2627
|
-
* const {totals, templates} = await
|
|
2614
|
+
* const {totals, templates} = await listTemplates((VerdocsEndpoint.getDefault(), { q: 'test', sort: 'created_at' }); * ```
|
|
2628
2615
|
*/
|
|
2629
2616
|
declare const listTemplates: (endpoint: VerdocsEndpoint, params?: ITemplateListParams) => Promise<{
|
|
2630
2617
|
total: number;
|
|
@@ -2710,4 +2697,4 @@ declare const isValidEmail: (email: string | undefined) => boolean;
|
|
|
2710
2697
|
declare const isValidPhone: (phone: string | undefined) => boolean;
|
|
2711
2698
|
declare const isValidRoleName: (value: string, roles: IRole[]) => boolean;
|
|
2712
2699
|
declare const isValidTag: (value: string, tags: string[]) => boolean;
|
|
2713
|
-
export { TRequestStatus, TTemplateSenderType, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, FIELD_TYPES, DEFAULT_FIELD_WIDTHS, DEFAULT_FIELD_HEIGHTS, DEFAULT_FIELD_SETTINGS, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IRecipient, IReminder, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelopesSummary, getEnvelopeRecipients, getEnvelope, getEnvelopeDocument, getDocumentDownloadLink, getDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, updateEnvelopeField, updateEnvelopeFieldSignature, updateEnvelopeFieldInitials, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, getFieldAttachment, getEnvelopeDocumentPageDisplayUri, ITimeRange, IListEnvelopesParams, getEnvelopes, createInitials, IRecipientKbaStepNone, IRecipientKbaStepComplete, IRecipientKbaStepPin, IRecipientKbaStepIdentity, IRecipientKbaStepChallenge, IRecipientKbaStepFailed, TRecipientKbaStep, getKbaStep, submitKbaPin, IKbaIdentity, submitKbaIdentity, IKbaChallengeResponse, submitKbaChallengeResponse, updateRecipient, envelopeRecipientSubmit, envelopeRecipientDecline, envelopeRecipientChangeOwner, envelopeRecipientAgree, envelopeRecipientUpdateName, envelopeRecipientPrepare, ISignerTokenResponse, getSigningSession, getSignerToken, getInPersonLink, sendDelegate, resendInvitation, createEnvelopeReminder, getEnvelopeReminder, updateEnvelopeReminder, deleteEnvelopeReminder, userIsEnvelopeOwner, userIsEnvelopeRecipient, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, userCanSignNow, getNextRecipient, createSignature, getSignatures, getSignature, deleteSignature, IEnvelopesSearchResult, IEnvelopesSummary, IDocumentSearchOptions, ICreateEnvelopeRole, IEnvelopeSummaries, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeRequest, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getGroups, getGroup, createGroup, addGroupMember, deleteGroupMember, updateGroup, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, getOrganization, updateOrganization, updateOrganizationLogo, updateOrganizationThumbnail, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, IAcceptOrganizationInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, TTemplatePermissionCreatePublic, TTemplatePermissionCreateOrg, TTemplatePermissionCreatePersonal, TTemplatePermissionDelete, TTemplatePermissionVisibility, TTemplateMemberRead, TTemplateMemberWrite, TTemplateMemberDelete, TTemplateMemberVisibility, TTemplatePermission, TAccountPermissionOwnerAdd, TAccountPermissionOwnerRemove, TAccountPermissionAdminAdd, TAccountPermissionAdminRemove, TAccountPermissionMemberView, TAccountPermissionMemberAdd, TAccountPermissionMemberRemove, TAccountPermission, TOrgPermissionCreate, TOrgPermissionView, TOrgPermissionUpdate, TOrgPermissionDelete, TOrgPermissionTransfer, TOrgPermissionList, TOrgPermission, TEnvelopePermissionCreate, TEnvelopePermissionCancel, TEnvelopePermissionView, TEnvelopePermissionOrg, TEnvelopePermission, TPermission, TRole, RolePermissions, userHasPermissions, ISigningSession, IUserSession, IIdToken, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, userIsTemplateCreator, userHasSharedTemplate, userCanCreatePersonalTemplate, userCanCreateOrgTemplate, userCanCreatePublicTemplate, userCanReadTemplate, userCanUpdateTemplate, userCanMakeTemplatePrivate, userCanMakeTemplateShared, userCanMakeTemplatePublic, userCanChangeOrgVisibility, userCanDeleteTemplate, userCanSendTemplate, userCanCreateTemplate, userCanBuildTemplate, getFieldsForRole, userCanPreviewTemplate, ICreateTemplateReminderRequest, createTemplateReminder, getTemplateReminder, updateTemplateReminder, deleteTemplateReminder, createTemplateRole, updateTemplateRole, deleteTemplateRole, getStars, toggleStar, addTemplateTag, getTemplateTags, deleteTemplateTag, createTag, getTag, getAllTags, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate,
|
|
2700
|
+
export { TRequestStatus, TTemplateSenderType, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, FIELD_TYPES, DEFAULT_FIELD_WIDTHS, DEFAULT_FIELD_HEIGHTS, DEFAULT_FIELD_SETTINGS, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IRecipient, IReminder, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelopesSummary, getEnvelopeRecipients, getEnvelope, getEnvelopeDocument, getDocumentDownloadLink, getDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, updateEnvelopeField, updateEnvelopeFieldSignature, updateEnvelopeFieldInitials, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, getFieldAttachment, getEnvelopeDocumentPageDisplayUri, ITimeRange, IListEnvelopesParams, getEnvelopes, createInitials, IRecipientKbaStepNone, IRecipientKbaStepComplete, IRecipientKbaStepPin, IRecipientKbaStepIdentity, IRecipientKbaStepChallenge, IRecipientKbaStepFailed, TRecipientKbaStep, getKbaStep, submitKbaPin, IKbaIdentity, submitKbaIdentity, IKbaChallengeResponse, submitKbaChallengeResponse, updateRecipient, envelopeRecipientSubmit, envelopeRecipientDecline, envelopeRecipientChangeOwner, envelopeRecipientAgree, envelopeRecipientUpdateName, envelopeRecipientPrepare, ISignerTokenResponse, getSigningSession, getSignerToken, getInPersonLink, sendDelegate, resendInvitation, createEnvelopeReminder, getEnvelopeReminder, updateEnvelopeReminder, deleteEnvelopeReminder, userIsEnvelopeOwner, userIsEnvelopeRecipient, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, userCanSignNow, getNextRecipient, createSignature, getSignatures, getSignature, deleteSignature, IEnvelopesSearchResult, IEnvelopesSummary, IDocumentSearchOptions, ICreateEnvelopeRole, IEnvelopeSummaries, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeRequest, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getGroups, getGroup, createGroup, addGroupMember, deleteGroupMember, updateGroup, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, getOrganization, updateOrganization, updateOrganizationLogo, updateOrganizationThumbnail, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, IAcceptOrganizationInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, TTemplatePermissionCreatePublic, TTemplatePermissionCreateOrg, TTemplatePermissionCreatePersonal, TTemplatePermissionDelete, TTemplatePermissionVisibility, TTemplateMemberRead, TTemplateMemberWrite, TTemplateMemberDelete, TTemplateMemberVisibility, TTemplatePermission, TAccountPermissionOwnerAdd, TAccountPermissionOwnerRemove, TAccountPermissionAdminAdd, TAccountPermissionAdminRemove, TAccountPermissionMemberView, TAccountPermissionMemberAdd, TAccountPermissionMemberRemove, TAccountPermission, TOrgPermissionCreate, TOrgPermissionView, TOrgPermissionUpdate, TOrgPermissionDelete, TOrgPermissionTransfer, TOrgPermissionList, TOrgPermission, TEnvelopePermissionCreate, TEnvelopePermissionCancel, TEnvelopePermissionView, TEnvelopePermissionOrg, TEnvelopePermission, TPermission, TRole, RolePermissions, userHasPermissions, ISigningSession, IUserSession, IIdToken, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, userIsTemplateCreator, userHasSharedTemplate, userCanCreatePersonalTemplate, userCanCreateOrgTemplate, userCanCreatePublicTemplate, userCanReadTemplate, userCanUpdateTemplate, userCanMakeTemplatePrivate, userCanMakeTemplateShared, userCanMakeTemplatePublic, userCanChangeOrgVisibility, userCanDeleteTemplate, userCanSendTemplate, userCanCreateTemplate, userCanBuildTemplate, getFieldsForRole, userCanPreviewTemplate, ICreateTemplateReminderRequest, createTemplateReminder, getTemplateReminder, updateTemplateReminder, deleteTemplateReminder, createTemplateRole, updateTemplateRole, deleteTemplateRole, getStars, toggleStar, addTemplateTag, getTemplateTags, deleteTemplateTag, createTag, getTag, getAllTags, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, ISearchTimeRange, IGetTemplateSummarySortBy, IGetTemplateSummaryParams, ITemplateListParams, listTemplates, getTemplateDocuments, getTemplateDocument, createTemplateDocument, deleteTemplateDocument, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, ITemplateTag, ITag, IStar, ITemplateSearchResult, IValidator, getValidators, getValidator, isValidEmail, isValidPhone, isValidRoleName, isValidTag, IROPCRequest, IClientCredentialsRequest, IRefreshTokenRequest, TAuthenticationRequest, authenticate, refreshToken, changePassword, resetPassword, resendVerification, verifyEmail, getMyUser, getNotifications, getProfiles, getCurrentProfile, switchProfile, updateProfile, deleteProfile, createProfile, updateProfilePhoto, ICreateProfileRequest, IUpdateProfileRequest, IAuthenticateResponse, IChangePasswordRequest, IChangePasswordResponse, IResetPasswordRequest, IResetPasswordResponse, IVerifyEmailRequest, getRGB, getRGBA, nameToRGBA, getRoleColor, formatShortTimeAgo, timePeriod, getRTop, getRLeft, getRValue, blobToBase64, rescale, fileToDataUrl, downloadBlob, Countries, getCountryByCode, isFrenchGuiana, isGuadeloupe, isMartinique, isMayotte, getPlusOneCountry, isCanada, isAmericanSamoa, isDominicanRepublic, isPuertoRico, getMatchingCountry, integerSequence, formatFullName, formatInitials, fullNameToInitials, capitalize, convertToE164, AtoB, decodeJWTBody, decodeAccessTokenBody, IFileWithData, ICountry, ITimePeriod };
|