@verdocs/js-sdk 4.2.28 → 4.2.31

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 CHANGED
@@ -2307,116 +2307,29 @@ declare const getTag: (endpoint: VerdocsEndpoint, name: string) => Promise<ITag>
2307
2307
  * Get all tags available for use by an Organization.
2308
2308
  */
2309
2309
  declare const getAllTags: (endpoint: VerdocsEndpoint) => Promise<ITag[]>;
2310
- /**
2311
- * Given a `rgba(r,g,b,a)` string value, returns the hex equivalent, dropping the alpha channel.
2312
- */
2313
- declare function getRGB(rgba: string): string;
2314
- /**
2315
- * Given a signer role index, return the color code for that signer.
2316
- */
2317
- declare function getRGBA(roleIndex: number): "rgba(255, 193, 7, 0.4)" | "rgba(134, 134, 134, 0.3)" | "rgba(156, 39, 176, .4)" | "rgba(33, 150, 243, .4)" | "rgba(220, 231, 117, 0.3)" | "rgba(121, 134, 203, 0.3)" | "rgba(77, 182, 172, 0.3)" | "rgba(255, 202, 165, 0.3)" | "rgba(2, 247, 190, 0.3)" | "rgba(255, 138, 101, 0.3)" | "rgba(82, 255, 79, 0.3)" | "rgba(229, 115, 155, 0.3)";
2318
- /**
2319
- * Given a role name, return a color code for it. This works by computing a hash code so the specific color returned
2320
- * is not specified explicitly, but will be the same for every call with the same input value.
2321
- */
2322
- declare function nameToRGBA(str: string): string | undefined;
2323
- /**
2324
- * Helper function to obtain a color code given a role name given various possible inputs.
2325
- */
2326
- declare function getRoleColor(name: string, roles: TRole[], index?: number): string | undefined;
2327
- interface IFileWithData {
2328
- lastModified: number;
2329
- size: number;
2330
- type: string;
2331
- name: string;
2332
- data: string;
2333
- }
2334
- interface ICountry {
2335
- code: string;
2336
- name: string;
2337
- value: string;
2338
- }
2339
- interface ITimePeriod {
2340
- start_time: string;
2341
- end_time: string;
2342
- }
2343
- declare const formatShortTimeAgo: (val: any) => string;
2344
- declare function timePeriod(type: string): ITimePeriod | null;
2345
- declare function getRTop(y: number, fieldHeight: number, iTextHeight: number, yRatio: number): number;
2346
- declare function getRLeft(x: number, ratio: number): number;
2347
- declare function getRValue(y: number, ratio: number): number;
2348
- declare function blobToBase64(image: Blob): Promise<unknown>;
2349
- declare function rescale(r: number, n: number): number;
2350
- /**
2351
- * Given a File, extract the file's content as a base64 encoded data URL. The response will have a prefix that
2352
- * includes the MIME type of the file, e.g. "data:image/jpeg;base64,iVBORw0K......"
2353
- */
2354
- declare const fileToDataUrl: (file: File) => Promise<IFileWithData>;
2355
- /**
2356
- * Trigger a download dialog to save a blob as a file on disk.
2357
- */
2358
- declare const downloadBlob: (blob: Blob, name?: string) => void;
2359
- declare const Countries: ICountry[];
2360
- declare function getCountryByCode(code: string): ICountry | null;
2361
- declare function isFrenchGuiana(code: string): boolean;
2362
- declare function isGuadeloupe(code: string): boolean;
2363
- declare function isMartinique(code: string): boolean;
2364
- declare function isMayotte(code: string): boolean;
2365
- declare function getPlusOneCountry(code: string): ICountry | null;
2366
- declare function isCanada(code: string): boolean;
2367
- declare function isAmericanSamoa(code: string): boolean;
2368
- declare function isDominicanRepublic(code: string): boolean;
2369
- declare function isPuertoRico(code: string): boolean;
2370
- // need to finish
2371
- declare function getMatchingCountry(code: string, substrings: number): number;
2372
- /**
2373
- * Create an array containing a sequence of integers, e.g. [START, START+1, START+2, ...] This is frequently useful
2374
- * in rendering operations when there is no source array to .map() across.
2375
- */
2376
- declare const integerSequence: (start: number, count: number) => number[];
2377
- /**
2378
- * Format a profile's full name
2379
- */
2380
- declare const formatFullName: (profile?: IProfile) => string;
2381
- /**
2382
- * Format a profile's initials
2383
- */
2384
- declare const formatInitials: (profile?: IProfile) => string;
2385
- /**
2386
- * Generate suggested initials for a full name, e.g. "John Doe" will yield "JD".
2387
- */
2388
- declare const fullNameToInitials: (name: string) => string;
2389
- /**
2390
- * Capitalize the first letter of a string.
2391
- */
2392
- declare const capitalize: (str: string) => string;
2393
- /**
2394
- * Convert a phone-number-like string to E164 format.
2395
- * @see https://46elks.com/kb/e164
2396
- */
2397
- declare const convertToE164: (input: string) => string;
2398
- /**
2399
- * Simplified, Node/Browser-safe alternative to atob() for base64 decoding.
2400
- * Modified from https://github.com/MaxArt2501/base64-js/blob/master/base64.js
2401
- */
2402
- declare const AtoB: (str: string) => string;
2403
- /**
2404
- * Decode the body of a JWT. This helper may allow front-end applications to avoid a dependency on `jsonwebtoken` in
2405
- * many cases. Note that this should only be used for true JWTs. Opaque tokens will cause this to throw.
2406
- */
2407
- declare const decodeJWTBody: (token: string) => any;
2408
- /**
2409
- * Decode the body of an Verdocs access token. Note that raw tokens contain namespaced fields, e.g.
2410
- * `https://verdocs.com/profile_id`. To make these tokens easier to use in front-end code, this name-spacing
2411
- * will be removed. Note that user and signing sessions have different access token formats. The calling
2412
- * application should distinguish between the two based on the context of the authenticated session, or by
2413
- * the presence of the `document_id` field, which will only be present for signing sessions.
2414
- */
2415
- declare const decodeAccessTokenBody: (token: string) => TSession;
2310
+ type ITemplateSortBy = "created_at" | "updated_at" | "name" | "last_used_at" | "counter" | "star_counter";
2416
2311
  interface IGetTemplatesParams {
2312
+ /** List only those templates whose names, descriptions, etc contain this search term. */
2313
+ q?: string;
2314
+ /** List only those templates with at least one "star". */
2417
2315
  is_starred?: boolean;
2316
+ /** List only those templates created by the caller. */
2418
2317
  is_creator?: boolean;
2419
- is_organization?: boolean;
2318
+ /**
2319
+ * List only personal templates. To list shared templates, set this to false and is_public to false.
2320
+ * To list all templates, omit this field.
2321
+ */
2322
+ is_personal?: boolean;
2323
+ /** List only public templates */
2324
+ is_public?: boolean;
2325
+ /** Sort order */
2326
+ sort_by?: TSortTemplateBy;
2327
+ /** Set to true or false to control the sort order. Omit this field to sort dates descending, names ascending. */
2328
+ ascending?: boolean;
2329
+ /** Number of rows to retrieve. Defaults to 10. */
2330
+ rows?: number;
2331
+ /** Page to retrieve (0-based). Defaults to 0. */
2332
+ page?: number;
2420
2333
  }
2421
2334
  /**
2422
2335
  * Get all templates accessible by the caller, with optional filters.
@@ -2430,29 +2343,12 @@ interface IGetTemplatesParams {
2430
2343
  * await getTemplates((VerdocsEndpoint.getDefault(), { is_organization: true });
2431
2344
  * ```
2432
2345
  */
2433
- declare const getTemplates: (endpoint: VerdocsEndpoint, params?: IGetTemplatesParams) => Promise<ITemplate[]>;
2434
- // export interface IListTemplatesParams {
2435
- // name?: string;
2436
- // sharing?: 'all' | 'personal' | 'shared' | 'public';
2437
- // starred?: 'all' | 'starred' | 'unstarred';
2438
- // sort?: 'name' | 'created_at' | 'updated_at' | 'last_used_at' | 'counter' | 'star_counter';
2439
- // direction?: 'asc' | 'desc';
2440
- // page?: number;
2441
- // rows?: number;
2442
- // }
2443
- /**
2444
- * Lists all templates accessible by the caller, with optional filters.
2445
- *
2446
- * ```typescript
2447
- * import {listTemplates} from '@verdocs/js-sdk/Templates';
2448
- *
2449
- * await listTemplates((VerdocsEndpoint.getDefault(), { sharing: 'personal', sort: 'last_used_at' });
2450
- * ```
2451
- */
2452
- // export const listTemplates = (endpoint: VerdocsEndpoint, params?: IListTemplatesParams) =>
2453
- // endpoint.api //
2454
- // .post<ITemplateSummaries>('/templates/list', params, {baseURL: endpoint.getBaseURLv2()})
2455
- // .then((r) => r.data);
2346
+ declare const getTemplates: (endpoint: VerdocsEndpoint, params?: IGetTemplatesParams) => Promise<{
2347
+ count: number;
2348
+ rows: number;
2349
+ page: number;
2350
+ templates: ITemplate[];
2351
+ }>;
2456
2352
  /**
2457
2353
  * Get one template by its ID.
2458
2354
  *
@@ -2571,54 +2467,6 @@ declare const updateTemplate: (endpoint: VerdocsEndpoint, templateId: string, pa
2571
2467
  * ```
2572
2468
  */
2573
2469
  declare const deleteTemplate: (endpoint: VerdocsEndpoint, templateId: string) => Promise<any>;
2574
- interface ISearchTimeRange {
2575
- start_time: string;
2576
- end_time: string;
2577
- }
2578
- type IGetTemplateSummarySortBy = "created_at" | "updated_at" | "name" | "last_used_at" | "counter" | "star_counter";
2579
- interface IGetTemplateSummaryParams {
2580
- id?: string;
2581
- name?: string;
2582
- sender?: string;
2583
- profile_id?: string;
2584
- organization_id?: string;
2585
- description?: string;
2586
- created_at?: ISearchTimeRange;
2587
- updated_at?: ISearchTimeRange;
2588
- last_used_at?: ISearchTimeRange;
2589
- is_personal?: boolean;
2590
- is_public?: boolean;
2591
- is_starred?: boolean;
2592
- sort_by?: IGetTemplateSummarySortBy;
2593
- ascending?: boolean;
2594
- row?: number;
2595
- page?: number;
2596
- }
2597
- interface ITemplateListParams {
2598
- status?: string[];
2599
- q?: string;
2600
- created_at?: ITimePeriod;
2601
- is_personal?: boolean;
2602
- is_public?: boolean;
2603
- sort_by?: TSortTemplateBy;
2604
- ascending?: boolean;
2605
- rows?: number;
2606
- page?: number;
2607
- }
2608
- /**
2609
- * List
2610
- *
2611
- * ```typescript
2612
- * import {Templates} from '@verdocs/js-sdk/Templates';
2613
- *
2614
- * const {totals, templates} = await listTemplates((VerdocsEndpoint.getDefault(), { q: 'test', sort: 'created_at' }); * ```
2615
- */
2616
- declare const listTemplates: (endpoint: VerdocsEndpoint, params?: ITemplateListParams) => Promise<{
2617
- total: number;
2618
- rows: number;
2619
- page: number;
2620
- templates: ITemplate[];
2621
- }>;
2622
2470
  /**
2623
2471
  * Get all the Template Documents associated to a particular Template.
2624
2472
  *
@@ -2697,4 +2545,105 @@ declare const isValidEmail: (email: string | undefined) => boolean;
2697
2545
  declare const isValidPhone: (phone: string | undefined) => boolean;
2698
2546
  declare const isValidRoleName: (value: string, roles: IRole[]) => boolean;
2699
2547
  declare const isValidTag: (value: string, tags: string[]) => boolean;
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 };
2548
+ /**
2549
+ * Given a `rgba(r,g,b,a)` string value, returns the hex equivalent, dropping the alpha channel.
2550
+ */
2551
+ declare function getRGB(rgba: string): string;
2552
+ /**
2553
+ * Given a signer role index, return the color code for that signer.
2554
+ */
2555
+ declare function getRGBA(roleIndex: number): "rgba(255, 193, 7, 0.4)" | "rgba(134, 134, 134, 0.3)" | "rgba(156, 39, 176, .4)" | "rgba(33, 150, 243, .4)" | "rgba(220, 231, 117, 0.3)" | "rgba(121, 134, 203, 0.3)" | "rgba(77, 182, 172, 0.3)" | "rgba(255, 202, 165, 0.3)" | "rgba(2, 247, 190, 0.3)" | "rgba(255, 138, 101, 0.3)" | "rgba(82, 255, 79, 0.3)" | "rgba(229, 115, 155, 0.3)";
2556
+ /**
2557
+ * Given a role name, return a color code for it. This works by computing a hash code so the specific color returned
2558
+ * is not specified explicitly, but will be the same for every call with the same input value.
2559
+ */
2560
+ declare function nameToRGBA(str: string): string | undefined;
2561
+ /**
2562
+ * Helper function to obtain a color code given a role name given various possible inputs.
2563
+ */
2564
+ declare function getRoleColor(name: string, roles: TRole[], index?: number): string | undefined;
2565
+ declare const formatShortTimeAgo: (val: any) => string;
2566
+ declare function getRTop(y: number, fieldHeight: number, iTextHeight: number, yRatio: number): number;
2567
+ declare function getRLeft(x: number, ratio: number): number;
2568
+ declare function getRValue(y: number, ratio: number): number;
2569
+ declare function blobToBase64(image: Blob): Promise<unknown>;
2570
+ declare function rescale(r: number, n: number): number;
2571
+ interface IFileWithData {
2572
+ lastModified: number;
2573
+ size: number;
2574
+ type: string;
2575
+ name: string;
2576
+ data: string;
2577
+ }
2578
+ interface ICountry {
2579
+ code: string;
2580
+ name: string;
2581
+ value: string;
2582
+ }
2583
+ /**
2584
+ * Given a File, extract the file's content as a base64 encoded data URL. The response will have a prefix that
2585
+ * includes the MIME type of the file, e.g. "data:image/jpeg;base64,iVBORw0K......"
2586
+ */
2587
+ declare const fileToDataUrl: (file: File) => Promise<IFileWithData>;
2588
+ /**
2589
+ * Trigger a download dialog to save a blob as a file on disk.
2590
+ */
2591
+ declare const downloadBlob: (blob: Blob, name?: string) => void;
2592
+ declare const Countries: ICountry[];
2593
+ declare function getCountryByCode(code: string): ICountry | null;
2594
+ declare function isFrenchGuiana(code: string): boolean;
2595
+ declare function isGuadeloupe(code: string): boolean;
2596
+ declare function isMartinique(code: string): boolean;
2597
+ declare function isMayotte(code: string): boolean;
2598
+ declare function getPlusOneCountry(code: string): ICountry | null;
2599
+ declare function isCanada(code: string): boolean;
2600
+ declare function isAmericanSamoa(code: string): boolean;
2601
+ declare function isDominicanRepublic(code: string): boolean;
2602
+ declare function isPuertoRico(code: string): boolean;
2603
+ // need to finish
2604
+ declare function getMatchingCountry(code: string, substrings: number): number;
2605
+ /**
2606
+ * Create an array containing a sequence of integers, e.g. [START, START+1, START+2, ...] This is frequently useful
2607
+ * in rendering operations when there is no source array to .map() across.
2608
+ */
2609
+ declare const integerSequence: (start: number, count: number) => number[];
2610
+ /**
2611
+ * Format a profile's full name
2612
+ */
2613
+ declare const formatFullName: (profile?: IProfile) => string;
2614
+ /**
2615
+ * Format a profile's initials
2616
+ */
2617
+ declare const formatInitials: (profile?: IProfile) => string;
2618
+ /**
2619
+ * Generate suggested initials for a full name, e.g. "John Doe" will yield "JD".
2620
+ */
2621
+ declare const fullNameToInitials: (name: string) => string;
2622
+ /**
2623
+ * Capitalize the first letter of a string.
2624
+ */
2625
+ declare const capitalize: (str: string) => string;
2626
+ /**
2627
+ * Convert a phone-number-like string to E164 format.
2628
+ * @see https://46elks.com/kb/e164
2629
+ */
2630
+ declare const convertToE164: (input: string) => string;
2631
+ /**
2632
+ * Simplified, Node/Browser-safe alternative to atob() for base64 decoding.
2633
+ * Modified from https://github.com/MaxArt2501/base64-js/blob/master/base64.js
2634
+ */
2635
+ declare const AtoB: (str: string) => string;
2636
+ /**
2637
+ * Decode the body of a JWT. This helper may allow front-end applications to avoid a dependency on `jsonwebtoken` in
2638
+ * many cases. Note that this should only be used for true JWTs. Opaque tokens will cause this to throw.
2639
+ */
2640
+ declare const decodeJWTBody: (token: string) => any;
2641
+ /**
2642
+ * Decode the body of an Verdocs access token. Note that raw tokens contain namespaced fields, e.g.
2643
+ * `https://verdocs.com/profile_id`. To make these tokens easier to use in front-end code, this name-spacing
2644
+ * will be removed. Note that user and signing sessions have different access token formats. The calling
2645
+ * application should distinguish between the two based on the context of the authenticated session, or by
2646
+ * the presence of the `document_id` field, which will only be present for signing sessions.
2647
+ */
2648
+ declare const decodeAccessTokenBody: (token: string) => TSession;
2649
+ 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, ITemplateSortBy, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, 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, 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 };