FlatfileImporter

FlatfileImporter /

Hierarchy

  • EventEmitter

    • FlatfileImporter

Index

Constructors

Properties

Methods

Constructors

constructor

+ new FlatfileImporter(apiKey: string, options: object, customer?: CustomerObject): FlatfileImporter

Defined in index.ts:32

Parameters:

NameType
apiKeystring
optionsobject
customer?CustomerObject

Returns: FlatfileImporter

Properties

$ready

$ready: Promise<any>

Defined in index.ts:22

Promise that resolves when the handshake is completed between Flatfile.io and the adapter


Static Promise

Promise: PromiseConstructor = Promise

Defined in index.ts:16


Static prefixed

prefixed: string | boolean

Inherited from void

Defined in /Code/Flatfile/Adapter/node_modules/eventemitter3/index.d.ts:10

Methods

addListener

addListener(event: string | symbol, fn: ListenerFn, context?: any): this

Inherited from void

Defined in /Code/Flatfile/Adapter/node_modules/eventemitter3/index.d.ts:37

Parameters:

NameType
eventstring | symbol
fnListenerFn
context?any

Returns: this


close

close(): void

Defined in index.ts:182

Call close() from the parent window in order to hide the importer. You can do this after handling the import callback so your users don't have to click the confirmation button

Returns: void


displayError

displayError(msg: string): void

Defined in index.ts:127

This will display a dialog inside of the importer with an error icon and the message you pass. The user will be able to acknowledge the error and be returned to the import data spreadsheet to ideally fix any issues or attempt submitting again.

deprecated

Parameters:

NameType
msgstring

Returns: void


displayLoader

displayLoader(msg?: undefined | string): void

Defined in index.ts:115

This will display a progress indicator inside the importer if you anticipate that handling the output of the importer may take some time.

Parameters:

NameType
msg?undefined | string

Returns: void


displaySuccess

displaySuccess(msg: string): void

Defined in index.ts:149

This will display a dialog inside of the importer with a success icon and the message you pass.

Parameters:

NameType
msgstring

Returns: void


emit

emit(event: string | symbol, ...args: Array<any>): boolean

Inherited from void

Defined in /Code/Flatfile/Adapter/node_modules/eventemitter3/index.d.ts:31

Calls each of the listeners registered for a given event.

Parameters:

NameType
eventstring | symbol
...argsArray<any>

Returns: boolean


eventNames

eventNames(): Array<string | symbol>

Inherited from void

Defined in /Code/Flatfile/Adapter/node_modules/eventemitter3/index.d.ts:16

Return an array listing the events for which the emitter has registered listeners.

Returns: Array<string | symbol>


getMeta

getMeta(): object

Defined in index.ts:158

This will fetch the data from the importer

Returns: object


listenerCount

listenerCount(event: string | symbol): number

Inherited from void

Defined in /Code/Flatfile/Adapter/node_modules/eventemitter3/index.d.ts:26

Return the number of listeners listening to a given event.

Parameters:

NameType
eventstring | symbol

Returns: number


listeners

listeners(event: string | symbol): Array<ListenerFn>

Inherited from void

Defined in /Code/Flatfile/Adapter/node_modules/eventemitter3/index.d.ts:21

Return the listeners registered for a given event.

Parameters:

NameType
eventstring | symbol

Returns: Array<ListenerFn>


load

load(): Promise<Array<Object>>

Defined in index.ts:78

Use load() when you want a promise returned. This is necessary if you want to use async/await for an es6 implementation

deprecated

Returns: Promise<Array<Object>>


off

off(event: string | symbol, fn?: ListenerFn, context?: any, once?: undefined | false | true): this

Inherited from void

Defined in /Code/Flatfile/Adapter/node_modules/eventemitter3/index.d.ts:48

Parameters:

NameType
eventstring | symbol
fn?ListenerFn
context?any
once?undefined | false | true

Returns: this


on

on(event: string | symbol, fn: ListenerFn, context?: any): this

Inherited from void

Defined in /Code/Flatfile/Adapter/node_modules/eventemitter3/index.d.ts:36

Add a listener for a given event.

Parameters:

NameType
eventstring | symbol
fnListenerFn
context?any

Returns: this


once

once(event: string | symbol, fn: ListenerFn, context?: any): this

Inherited from void

Defined in /Code/Flatfile/Adapter/node_modules/eventemitter3/index.d.ts:42

Add a one-time listener for a given event.

Parameters:

NameType
eventstring | symbol
fnListenerFn
context?any

Returns: this


open

open(options: object): void

Defined in index.ts:62

Call open() to activate the importer overlay dialog.

Parameters:

NameTypeDefault
optionsobject{}

Returns: void


removeAllListeners

removeAllListeners(event?: string | symbol): this

Inherited from void

Defined in /Code/Flatfile/Adapter/node_modules/eventemitter3/index.d.ts:53

Remove all listeners, or those of the specified event.

Parameters:

NameType
event?string | symbol

Returns: this


removeListener

removeListener(event: string | symbol, fn?: ListenerFn, context?: any, once?: undefined | false | true): this

Inherited from void

Defined in /Code/Flatfile/Adapter/node_modules/eventemitter3/index.d.ts:47

Remove the listeners of a given event.

Parameters:

NameType
eventstring | symbol
fn?ListenerFn
context?any
once?undefined | false | true

Returns: this


requestCorrectionsFromUser

requestCorrectionsFromUser(msg: any): Promise<FlatfileResults>

Defined in index.ts:138

This will display a dialog inside of the importer with an error icon and the message you pass. The user will be able to acknowledge the error and be returned to the import data spreadsheet to ideally fix any issues or attempt submitting again.

Parameters:

NameType
msgany

Returns: Promise<FlatfileResults>


requestDataFromUser

requestDataFromUser(options: LoadOptionsObject): Promise<FlatfileResults>

Defined in index.ts:106

Use requestDataFromUser() when you want a promise returned. This is necessary if you want to use async/await for an es6 implementation

Parameters:

NameTypeDefault
optionsLoadOptionsObject{ }

Returns: Promise<FlatfileResults>


setCustomer

setCustomer(customer: CustomerObject): void

Defined in index.ts:171

Set the customer information for this import

Parameters:

NameType
customerCustomerObject

Returns: void


Static setMountUrl

setMountUrl(url: string): void

Defined in index.ts:55

This will by default always be https://www.flatfile.io/importer/:key unless you are an enterprise customer that is self-hosting the application. In which case, this will be the URL of your enterprise installd Flatfile importer index page

Parameters:

NameType
urlstring

Returns: void