🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@types/hellosign-embedded

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/hellosign-embedded - npm Package Compare versions

Comparing version
1.2.8
to
2.0.0
+158
-227
hellosign-embedded/index.d.ts

@@ -1,272 +0,203 @@

// Type definitions for hellosign-embedded v1.2.0
// Project: https://github.com/HelloFax/hellosign-embedded
// Type definitions for hellosign-embedded 2.0
// Project: https://github.com/hellosign/hellosign-embedded
// Definitions by: Brian Surowiec <https://github.com/xt0rted>
// Ali Zhdanov <https://github.com/alizhdanov>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.8
export declare module HelloSign {
interface SignedMessageEvent {
event: 'signature_request_signed';
signature_id: string;
interface ClassNames {
BASE: 'x-hellosign-embedded';
BASE_IN_MODAL: 'x-hellosign-embedded--in-modal';
IFRAME: 'x-hellosign-embedded__iframe';
MODAL_CLOSE: 'x-hellosign-embedded__modal-close';
MODAL_CLOSE_BTN: 'x-hellosign-embedded__modal-close-button';
MODAL_CONTENT: 'x-hellosign-embedded__modal-content';
MODAL_SCREEN: 'x-hellosign-embedded__modal-screen';
}
interface DeclinedMessageEvent {
event: 'signature_request_declined';
signature_id: string;
interface Events {
ERROR: 'error';
SEND: 'send';
CANCEL: 'cancel';
CLOSE: 'close';
CREATE_TEMPLATE: 'createTemplate';
DECLINE: 'decline';
FINISH: 'finish';
MESSAGE: 'message';
OPEN: 'open';
READY: 'ready';
REASSIGN: 'reassign';
SIGN: 'sign';
}
interface CanceledMessageEvent {
event: 'signature_request_canceled';
interface Locales {
CS_CZ: 'cs_CZ';
DA_DK: 'da_DK';
DE_DE: 'de_DE';
EN_US: 'en_US';
ES_ES: 'es_ES';
ES_MX: 'es_MX';
FR_FR: 'fr_FR';
IT_IT: 'it_IT';
JA_JP: 'ja_JP';
NL_NL: 'nl_NL';
PL_PL: 'pl_PL';
PT_BR: 'pt_BR';
SV_SE: 'sv_SE';
ZH_CN: 'zh_CN';
}
interface SentMessageEvent {
event: 'signature_request_sent';
signature_request_id: string;
signature_request_info: {
title: string;
message: string;
signatures: Array<{
signature_id: string;
signer_email_address: string;
signer_name: string;
order: number;
status_code: string;
signed_at: number;
last_viewed_at: number;
last_reminded_at: number;
has_pin: boolean;
}>;
cc_email_addresses: Array<string>;
};
interface Messages {
APP_CONFIGURE: 'hellosign:configure';
APP_ERROR: 'hellosign:error';
APP_INITIALIZE: 'hellosign:initialize';
APP_VERIFY_DOMAIN_REQUEST: 'hellosign:verifyDomainRequest';
APP_VERIFY_DOMAIN_RESPONSE: 'hellosign:verifyDomainResponse';
USER_CANCEL_REQUEST: 'hellosign:userCancelRequest';
USER_CREATE_TEMPLATE: 'hellosign:userCreateTemplate';
USER_DECLINE_REQUEST: 'hellosign:userDeclineRequest';
USER_FINISH_REQUEST: 'hellosign:userFinishRequest';
USER_REASSIGN_REQUEST: 'hellosign:userReassignRequest';
USER_SEND_REQUEST: 'hellosign:userSendRequest';
USER_SIGN_REQUEST: 'hellosign:userSignRequest';
}
interface TemplateCreatedMessageEvent {
event: 'template_created';
template_id: string;
template_info: {
export interface Options {
allowCancel?: boolean;
clientId?: string;
container?: HTMLElement;
debug?: boolean;
hideHeader?: boolean;
locale?: Locales[keyof Locales];
redirectTo?: string;
requestingEmail?: string;
skipDomainVerification?: boolean;
testMode?: boolean;
timeout?: number;
whiteLabeling?: object;
}
interface Singature {
signer_name: string;
signer_email_address: string;
order?: number;
}
interface SendEventPayload {
signatureRequestId: string;
signatureRequestInfo: {
title: string;
message: string;
signer_roles: Array<{
name: string;
order: number;
}>;
cc_roles: Array<{
name: string;
}>;
signatures: Singature[];
ccEmailAddresses: string[];
};
}
interface ErrorMessageEvent {
event: 'error';
description: string;
interface SignEventPayload {
signatureId: string;
}
type MessageEvent = SignedMessageEvent | DeclinedMessageEvent |
CanceledMessageEvent | SentMessageEvent | TemplateCreatedMessageEvent |
ErrorMessageEvent;
interface ErrorEventPyload {
signatureId: string;
code: string;
}
interface ClientCultures {
/**
* English (United States)
*
* @default en_US
*/
EN_US: string;
interface SignerRole {
name: string;
order?: number;
}
/**
* French (France)
*
* @default fr_FR
*/
FR_FR: string;
interface CreateTemplateEventPyload {
templateId: string;
templateInfo: {
title: string;
message: string;
signerRoles: SignerRole;
ccRoles: string;
};
}
/**
* German (Germany)
*
* @default de_DE
*/
DE_DE: string;
interface DeclineEventPyload {
signatureId: string;
reason: string;
}
/**
* Swedish (Sweden)
*
* @default sv_SE
*/
SV_SE: string;
interface MessageEventPayload {
type: Messages;
payload?: object;
}
/**
* Chinese (China)
*
* @default zh_CN
*/
ZH_CN: string;
interface OpenEventPayload {
url: string;
iFrameUrl: string;
}
/**
* Danish (Denmark)
*
* @default da_DK
*/
DA_DK: string;
interface ReadyEventPayload {
signatureId: string;
}
/**
* Dutch (The Netherlands)
* @default nl_NL
*/
NL_NL: string;
/**
* The available client UI cultures
*/
supportedCultures: string[];
interface ReassignEventPayload {
signatureId: string;
name: string;
email: string;
reason: string;
}
interface OpenParameters {
/**
* The url to open in the child frame
*/
url?: string;
type CB = (d: any) => void;
/**
* Where to go after the signature is completed
*/
redirectUrl?: string;
class HelloSign {
constructor(opts?: Options);
/**
* Whether a cancel button should be displayed
*
* @default true
*/
allowCancel?: boolean;
static classNames: ClassNames;
/**
* A listener for X-window messages coming from the child frame
*/
messageListener?: (eventData: MessageEvent) => void;
static events: Events;
/**
* One of the HelloSign.CULTURES.supportedCultures
*
* @default HelloSign.CULTURES.EN_US
*/
userCulture?: string;
static locales: Locales;
/**
* When true, debugging statements will be written to the console
*
* @default false
*/
debug?: boolean;
static messages: Messages;
/**
* When true, domain verification step will be skipped if and only if the Signature Request was created with test_mode=1
*
* @default false
*/
skipDomainVerification?: boolean;
static version: string;
/**
* DOM element that will contain the iframe on the page (defaults to document.body)
*/
container?: Element;
readonly element: HTMLElement;
/**
* Height of the iFrame (only applicable when a container is specified)
*/
height?: number;
readonly isOpen: boolean;
/**
* When true, the header will be hidden.
* This is only functional for customers with embedded branding enabled.
*
* @default false
*/
hideHeader?: boolean;
readonly isReady: boolean;
/**
* The version of the embedded user experience to display to signers (1 = legacy, 2 = responsive).
* This option is only honored if your account has accessed the API prior to Nov 14, 2015.
*/
uxVersion?: number;
open: (url: string, opts?: Options) => void;
/**
* The email of the person issuing a signature request.
* Required for allowing 'Me + Others' requests
*/
requester?: string;
close: () => void;
/**
* An associative array to be used to customize the app's signer page
*/
whiteLabelingOptions?: Object;
}
on(name: Events['CLOSE'] | Events['CANCEL'] | Events['FINISH'], cb: () => void): void;
on(name: Events['CREATE_TEMPLATE'], cb: (data: CreateTemplateEventPyload) => void): void;
on(name: Events['DECLINE'], cb: (data: DeclineEventPyload) => void): void;
on(name: Events['ERROR'], cb: (data: ErrorEventPyload) => void): void;
on(name: Events['MESSAGE'], cb: (data: MessageEventPayload) => void): void;
on(name: Events['OPEN'], cb: (data: OpenEventPayload) => void): void;
on(name: Events['READY'], cb: (data: ReadyEventPayload) => void): void;
on(name: Events['REASSIGN'], cb: (data: ReassignEventPayload) => void): void;
on(name: Events['SEND'], cb: (data: SendEventPayload) => void): void;
on(name: Events['SIGN'], cb: (data: SignEventPayload) => void): void;
interface HelloSignStatic {
/**
* The available client UI cultures
*/
CULTURES: ClientCultures;
once(name: Events['CLOSE'] | Events['CANCEL'] | Events['FINISH'], cb: () => void): void;
once(name: Events['CREATE_TEMPLATE'], cb: (data: CreateTemplateEventPyload) => void): void;
once(name: Events['DECLINE'], cb: (data: DeclineEventPyload) => void): void;
once(name: Events['ERROR'], cb: (data: ErrorEventPyload) => void): void;
once(name: Events['MESSAGE'], cb: (data: MessageEventPayload) => void): void;
once(name: Events['OPEN'], cb: (data: OpenEventPayload) => void): void;
once(name: Events['READY'], cb: (data: ReadyEventPayload) => void): void;
once(name: Events['REASSIGN'], cb: (data: ReassignEventPayload) => void): void;
once(name: Events['SEND'], cb: (data: SendEventPayload) => void): void;
once(name: Events['SIGN'], cb: (data: SignEventPayload) => void): void;
/**
* The signature request was signed
*
* @default signature_request_signed
*/
EVENT_SIGNED: string;
/**
* The signature request was declined
*
* @default signature_request_declined
*/
EVENT_DECLINED: string;
/**
* The user closed the iFrame before completing
*
* @default signature_request_canceled
*/
EVENT_CANCELED: string;
/**
* The user sent a signature request
*
* @default signature_request_sent
*/
EVENT_SENT: string;
/**
* The template was created or edited
*
* @default template_created
*/
EVENT_TEMPLATE_CREATED: string;
/**
* An error occurred in the iFrame
*
* @default error
*/
EVENT_ERROR: string;
/**
* Initialize using your HelloSign API client ID.
*
* @param appClientId The API client ID the request is for.
*/
init(appClientId: string): void;
/**
* Open the signing window.
*
* @param params The options to use when opening the signing window.
*/
open(params: OpenParameters): void;
/**
* Close the signing window.
*/
close(): void;
off(name: Events['CLOSE'] | Events['CLOSE'] | Events['CREATE_TEMPLATE'] | Events['DECLINE'] |
Events['ERROR'] | Events['FINISH'] | Events['MESSAGE'] | Events['OPEN'] | Events['READY'] |
Events['REASSIGN'] | Events['SEND'] | Events['SIGN'],
cb?: CB): void;
}
}
declare var HelloSign: HelloSign.HelloSignStatic;
export as namespace HelloSign;
export as namespace HelloSign;
export default HelloSign.HelloSign;
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
Copyright (c) Microsoft Corporation.

@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

{
"name": "@types/hellosign-embedded",
"version": "1.2.8",
"version": "2.0.0",
"description": "TypeScript definitions for hellosign-embedded",

@@ -9,14 +9,22 @@ "license": "MIT",

"name": "Brian Surowiec",
"url": "https://github.com/xt0rted"
"url": "https://github.com/xt0rted",
"githubUsername": "xt0rted"
},
{
"name": "Ali Zhdanov",
"url": "https://github.com/alizhdanov",
"githubUsername": "alizhdanov"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/hellosign-embedded"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "d1a21050f01867958c20a6881f2b429b332ef881cba62b8c06b242f5bcbb9562",
"typeScriptVersion": "2.0"
"typesPublisherContentHash": "80b10639da8873a4719f3aee7b90c6399f2784fd13dfcb57bdfa6fd5172f88eb",
"typeScriptVersion": "3.8"
}

@@ -5,13 +5,13 @@ # Installation

# Summary
This package contains type definitions for hellosign-embedded (https://github.com/HelloFax/hellosign-embedded).
This package contains type definitions for hellosign-embedded (https://github.com/hellosign/hellosign-embedded).
# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hellosign-embedded
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hellosign-embedded.
Additional Details
* Last updated: Mon, 21 Aug 2017 21:55:03 GMT
### Additional Details
* Last updated: Mon, 23 Nov 2020 18:56:30 GMT
* Dependencies: none
* Global values: HelloSign
* Global values: `HelloSign`
# Credits
These definitions were written by Brian Surowiec <https://github.com/xt0rted>.
These definitions were written by [Brian Surowiec](https://github.com/xt0rted), and [Ali Zhdanov](https://github.com/alizhdanov).