UNPKG

notarize-node-client

Version:
237 lines (236 loc) 6.15 kB
/// <reference types="node" /> import type { Notarize, NotarizeOptions } from './'; export interface DocumentSubmission { resource: string | Buffer; filename?: string; requirement?: string; customerCanAnnotate?: boolean; witnessRequired?: boolean; pdfBookbarked?: boolean; trackingId?: string; textTagSyntax?: string; signingDestinations?: { signerIdentifier: string; type: string; pageNumber: number; x: number; y: number; height: number; width: string; fontSize: number; hint: string; }[]; authorizationHeader?: string; } export interface Signer { email: string; firstName?: string; middleName?: string; lastName?: string; phone?: { countryCode: string; number: string; }[]; address?: { line1?: string; line2?: string; city?: string; state?: string; postal?: string; country?: string; }; externalId?: string; entity?: string; capacity?: string; } export interface SignerInfo { email: string; firstName?: string; lastName?: string; dob?: string; address?: { line1?: string; line2?: string; city?: string; state?: string; postal?: string; country?: string; }; transactionAccessLink?: string; } export interface Transaction { id: string; dateCreated: string; dateUpdated: string; transactionName: string; externalId?: string; transactionType: string; requireSecondaryPhotoId: boolean; fileNumber: string; documents: Document[]; signerInfo: SignerInfo; cosignerInfo?: SignerInfo; streetAddress: { line1?: string; line2?: string; city?: string; state?: string; zipCode?: string; fullAddress?: string; }; status: string; notarizationRecord: string; messageToSigner: string; messageSignature: string; detailedStatus: string; auditTrailUrl: string; } export interface Document { id: string; dateCreated: string; dateUpdated: string; documentName: string; allowedActions?: string[]; requirement?: string; permissions: string[]; bundlePosition: number; isEnote: boolean; trackingId?: string; signedUrl?: string; processingState: string; processingError?: string; signingDestinations: SigningDestination[]; signingType: string; data?: string; } export interface NotarizedDocument { notarialActs: string[]; documentUrl: string; } export interface VerificationCredentials { retrievalId: string; retrievalPin: string; lastName: string; dateCompleted: string; } export interface SignerPhotoIdentification { primaryFront: string; primaryBack: string; secondaryFront?: string; } export interface NotarizationRecord { id: string; meetingStart: string; meetingEnd: string; notaryName: string; notaryRegistration: string; notaryCountyCity: string; signerInfo: SignerInfo; notarizedDocuments: NotarizedDocument[]; verificationCredentials: VerificationCredentials; signerPhotoIdentification: SignerPhotoIdentification; } export interface SigningDestination { signerIdentifier: string; type: string; pageNumber: number; x: number; y: number; height: number; width: string; fontSize: number; hint: string; } export declare class TransactionApi { client: Notarize; constructor(client: Notarize, options?: NotarizeOptions); retrieve(id: string): Promise<{ success: boolean; transaction?: Transaction; error?: string; }>; create(doc: { documents?: DocumentSubmission[]; signers: Signer[]; draft?: boolean; externalId?: string; transactionType?: string; transactionName?: string; suppressEmail?: boolean; messageToSigner?: string; messageSignature?: string; messageSubject?: string; requireNewSignerVerification?: boolean; requireSecondaryPhotoId?: boolean; notaryInstructions?: { notaryNote: string; }[]; expiry?: string; payer?: string; }): Promise<{ success: boolean; transaction?: Transaction; error?: string; }>; list(limit?: number, offset?: number): Promise<{ success: boolean; count?: number; transactions?: Transaction[]; error?: string; }>; addDocument(id: string, doc: DocumentSubmission): Promise<{ success: boolean; document?: Document; error?: string; }>; update(id: string, doc: { signers?: Signer[]; draft?: boolean; externalId?: string; transactionType?: string; transactionName?: string; suppressEmail?: boolean; messageToSigner?: string; messageSignature?: string; messageSubject?: string; requireSecondaryPhotoId?: boolean; notaryInstructions?: { notaryNote: string; }[]; expiry?: Date | string; payer?: string; allowSignerAnnotations?: boolean; }): Promise<{ success: boolean; transaction?: Transaction; errors?: string[]; }>; activate(id: string, suppressEmail?: boolean): Promise<{ success: boolean; transaction?: Transaction; error?: string; }>; delete(id: string): Promise<{ success: boolean; error?: string; message?: string; }>; resendEmail(id: string, messageToSigner?: string): Promise<{ success: boolean; transaction?: Transaction; error?: string; }>; resendSms(id: string, phone?: { countryCode: string; number: string; }): Promise<{ success: boolean; transaction?: Transaction; error?: string; }>; retrieveMeetingRecord(id: string): Promise<{ success: boolean; record?: NotarizationRecord; error?: string; }>; }