New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@flatfile/sdk

Package Overview
Dependencies
Maintainers
16
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flatfile/sdk - npm Package Compare versions

Comparing version 2.0.0-rc5 to 2.0.0-rc6

dist/errors/UnauthorizedError.d.ts

1

dist/errors/FlatfileError.d.ts
export declare class FlatfileError extends Error {
code: string;
debug: string;
name: string;
userMessage: string;
constructor(message?: string);
}

26

dist/Flatfile.d.ts

@@ -1,5 +0,7 @@

import { ApiService } from './graphql/api';
import { ImportSession } from './importer/ImportSession';
import { FlatfileError } from './errors/FlatfileError';
import { ApiService } from './graphql/ApiService';
import { IChunkOptions, ImportSession } from './importer/ImportSession';
import { IteratorCallback } from './lib/RecordChunkIterator';
import { TypedEventManager } from './lib/TypedEventManager';
import { IEvents, IFlatfileConfig, IFlatfileImporterConfig, IRawToken, JsonWebToken } from './types';
import { TypedEventManager } from './utils/TypedEventManager';
export declare class Flatfile extends TypedEventManager<IEvents> {

@@ -22,6 +24,12 @@ /**

*/
startOrResumeImportSession(options?: {
open?: 'iframe' | 'window';
}): Promise<ImportSession>;
startOrResumeImportSession(options?: IOpenOptions): Promise<ImportSession>;
/**
* Simple function that abstracts away some of the complexity for a single line call
* also provides some level of backwards compatability
*/
requestDataFromUser(): this;
requestDataFromUser(opts: DataReqOptions): this;
requestDataFromUser(callback: IteratorCallback, opts?: DataReqOptions): this;
handleError(error: FlatfileError): void;
/**
* Generate a token that only works for an embed development mode.

@@ -44,1 +52,7 @@ * This keeps the "hello world" effort very low but doesn't impact security.

}
interface IOpenOptions {
open?: 'iframe' | 'window';
autoContinue?: boolean;
}
declare type DataReqOptions = IOpenOptions & IChunkOptions;
export {};

@@ -1,2 +0,2 @@

import { ELevel, ERecordStatus, TRecordData } from '../service/FlatfileRecord';
import { ELevel, ERecordStatus, TRecordData } from '../../service/FlatfileRecord';
export interface IRowResponse {

@@ -3,0 +3,0 @@ id: number;

import { Flatfile } from '../Flatfile';
import { TypedEventManager } from '../lib/TypedEventManager';
import { IEvents } from '../types';
import { TypedEventManager } from '../utils/TypedEventManager';
export declare class DeprecatedImporter extends TypedEventManager<IEvents> {

@@ -5,0 +5,0 @@ ff: Flatfile;

@@ -1,2 +0,2 @@

import { ImportSession } from './ImportSession';
import { ImportSession, IUrlOptions } from './ImportSession';
export declare class ImportFrame {

@@ -6,3 +6,3 @@ private batch;

constructor(batch: ImportSession);
open(): this;
open(options?: IUrlOptions): this;
/**

@@ -9,0 +9,0 @@ * todo: handle the close better, support cleaner transition

import { Flatfile } from '../Flatfile';
import { GetFinalDatabaseViewResponse } from '../graphql/queries/GET_FINAL_DATABASE_VIEW';
import { TPrimitive } from '../graphql/service/FlatfileRecord';
import { PartialRejection } from '../graphql/service/PartialRejection';
import { RecordsChunk } from '../graphql/service/RecordsChunk';
import { TypedEventManager } from '../utils/TypedEventManager';
import { IteratorCallback } from '../lib/RecordChunkIterator';
import { TypedEventManager } from '../lib/TypedEventManager';
import { TPrimitive } from '../service/FlatfileRecord';
import { ImportFrame } from './ImportFrame';

@@ -18,4 +17,8 @@ export declare class ImportSession extends TypedEventManager<IBatchEvents> {

*/
openInEmbeddedIframe(): ImportFrame;
openInEmbeddedIframe(options?: IUrlOptions): ImportFrame;
/**
* Open the import in a new window and listen for data
*/
openInNewWindow(options?: IUrlOptions): Window;
/**
* Returns the iframe helper, useful in more advanced implementations

@@ -28,3 +31,5 @@ */

*/
updateEnvironment(env: Record<string, TPrimitive>): Promise<void>;
updateEnvironment(env: Record<string, TPrimitive>): Promise<{
success: boolean;
}>;
/**

@@ -35,10 +40,4 @@ * Chunk and handle data response

*/
processPendingRecords(cb: (chunk: RecordsChunk, next: (res?: PartialRejection) => void) => Promise<void> | void, options?: {
chunkSize?: number;
}): Promise<this>;
processPendingRecords(cb: IteratorCallback, options?: IChunkOptions): Promise<void>;
/**
* Open the import in a new window and listen for data
*/
openInNewWindow(): Window;
/**
* @todo make this less lines and more readable

@@ -51,3 +50,3 @@ */

*/
get signedImportUrl(): string;
signedImportUrl(options?: IUrlOptions): string;
}

@@ -75,4 +74,10 @@ export interface IBatchEvents {

workspaceId: string;
workbookId: string;
workbookId?: string;
schemaIds: string[];
}
export interface IChunkOptions {
chunkSize?: number;
}
export interface IUrlOptions {
autoContinue?: boolean;
}

@@ -7,9 +7,10 @@ export * from './types';

export * from './importer/flatfileImporter';
export * from './graphql/api';
export * from './graphql/service/ClientResponse';
export * from './graphql/service/FlatfileRecord';
export * from './graphql/service/PartialRejection';
export * from './graphql/service/RecordError';
export * from './graphql/service/RecordMutation';
export * from './graphql/service/RecordsChunk';
export * from './utils/serializeHook';
export * from './graphql/ApiService';
export * from './service/ClientResponse';
export * from './service/FlatfileRecord';
export * from './service/PartialRejection';
export * from './service/RecordError';
export * from './service/RecordMutation';
export * from './service/RecordsChunk';
export * from './lib/RecordChunkIterator';
export * from './lib/serializeHook';

@@ -0,1 +1,2 @@

import { FlatfileError } from './errors/FlatfileError';
import { GetFinalDatabaseViewResponse } from './graphql/queries/GET_FINAL_DATABASE_VIEW';

@@ -22,3 +23,3 @@ export interface IFlatfileImporterConfig {

error: {
error: Error;
error: FlatfileError;
};

@@ -25,0 +26,0 @@ launch: {

{
"name": "@flatfile/sdk",
"version": "2.0.0-rc5",
"version": "2.0.0-rc6",
"description": "Flatfile SDK",

@@ -52,2 +52,3 @@ "private": false,

"@types/react-dom": "^17.0.8",
"@types/simple-mock": "^0.8.2",
"@types/styled-components": "^5.1.10",

@@ -80,2 +81,3 @@ "@typescript-eslint/eslint-plugin": "^4.28.0",

"react-highlight": "^0.14.0",
"simple-mock": "^0.8.0",
"style-loader": "^3.3.1",

@@ -99,2 +101,3 @@ "styled-components": "^5.3.0",

],
"collectCoverage": false,
"moduleNameMapper": {

@@ -101,0 +104,0 @@ "src/(.*)": "<rootDir>/src/$1",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc