Skip to content

Instantly share code, notes, and snippets.

@dboskovic
Created June 5, 2023 19:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dboskovic/0bff71aa561ac2be29ad74c3ddf1798f to your computer and use it in GitHub Desktop.
Save dboskovic/0bff71aa561ac2be29ad74c3ddf1798f to your computer and use it in GitHub Desktop.
flatfile-api.d.ts
// Generated by dts-bundle v0.7.3
// Dependencies for this module:
// ../stream
// ../@ungap/url-search-params
// ../axios
declare module '@flatfile/api' {
import { FlatfileClient } from "@flatfile/api/wrapper/FlatfileClient";
export * as Flatfile from "@flatfile/api/api";
export { FlatfileClient } from "@flatfile/api/wrapper/FlatfileClient";
export { FlatfileEnvironment } from "@flatfile/api/environments";
export { FlatfileError, FlatfileTimeoutError } from "@flatfile/api/errors";
const _default: FlatfileClient;
export default _default;
}
declare module '@flatfile/api/wrapper/FlatfileClient' {
import { FlatfileClient as FernClient } from "@flatfile/api/Client";
import * as environments from "@flatfile/api/environments";
import * as core from "@flatfile/api/core";
export namespace FlatfileClient {
interface Options {
/**
* @deprecated use apiUrl instead
*/
environment?: core.Supplier<environments.FlatfileEnvironment | string>;
apiUrl?: environments.FlatfileEnvironment | string;
token?: core.Supplier<string>;
}
}
export class FlatfileClient extends FernClient {
constructor(options?: FlatfileClient.Options);
}
}
declare module '@flatfile/api/api' {
export * from "@flatfile/api/api/resources";
}
declare module '@flatfile/api/environments' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export const FlatfileEnvironment: {
readonly Production: "https://platform.flatfile.com/api/v1";
};
export type FlatfileEnvironment = typeof FlatfileEnvironment.Production;
}
declare module '@flatfile/api/errors' {
export { FlatfileError } from "@flatfile/api/errors/FlatfileError";
export { FlatfileTimeoutError } from "@flatfile/api/errors/FlatfileTimeoutError";
}
declare module '@flatfile/api/Client' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as environments from "@flatfile/api/environments";
import * as core from "@flatfile/api/core";
import { Spaces } from "@flatfile/api/api/resources/spaces/client/Client";
import { Agents } from "@flatfile/api/api/resources/agents/client/Client";
import { Auth } from "@flatfile/api/api/resources/auth/client/Client";
import { Billing } from "@flatfile/api/api/resources/billing/client/Client";
import { Cells } from "@flatfile/api/api/resources/cells/client/Client";
import { Documents } from "@flatfile/api/api/resources/documents/client/Client";
import { Environments } from "@flatfile/api/api/resources/environments/client/Client";
import { Events } from "@flatfile/api/api/resources/events/client/Client";
import { Files } from "@flatfile/api/api/resources/files/client/Client";
import { Guests } from "@flatfile/api/api/resources/guests/client/Client";
import { Jobs } from "@flatfile/api/api/resources/jobs/client/Client";
import { Records } from "@flatfile/api/api/resources/records/client/Client";
import { Sheets } from "@flatfile/api/api/resources/sheets/client/Client";
import { Users } from "@flatfile/api/api/resources/users/client/Client";
import { Versions } from "@flatfile/api/api/resources/versions/client/Client";
import { Workbooks } from "@flatfile/api/api/resources/workbooks/client/Client";
export namespace FlatfileClient {
interface Options {
environment?: core.Supplier<environments.FlatfileEnvironment | string>;
token: core.Supplier<core.BearerToken>;
fetcher?: core.FetchFunction;
streamingFetcher?: core.StreamingFetchFunction;
}
}
export class FlatfileClient {
protected readonly options: FlatfileClient.Options;
constructor(options: FlatfileClient.Options);
protected _spaces: Spaces | undefined;
get spaces(): Spaces;
protected _agents: Agents | undefined;
get agents(): Agents;
protected _auth: Auth | undefined;
get auth(): Auth;
protected _billing: Billing | undefined;
get billing(): Billing;
protected _cells: Cells | undefined;
get cells(): Cells;
protected _documents: Documents | undefined;
get documents(): Documents;
protected _environments: Environments | undefined;
get environments(): Environments;
protected _events: Events | undefined;
get events(): Events;
protected _files: Files | undefined;
get files(): Files;
protected _guests: Guests | undefined;
get guests(): Guests;
protected _jobs: Jobs | undefined;
get jobs(): Jobs;
protected _records: Records | undefined;
get records(): Records;
protected _sheets: Sheets | undefined;
get sheets(): Sheets;
protected _users: Users | undefined;
get users(): Users;
protected _versions: Versions | undefined;
get versions(): Versions;
protected _workbooks: Workbooks | undefined;
get workbooks(): Workbooks;
}
}
declare module '@flatfile/api/core' {
export * as serialization from "@flatfile/api/core/schemas";
export * from "@flatfile/api/core/fetcher";
export * from "@flatfile/api/core/auth";
export * from "@flatfile/api/core/streaming-fetcher";
}
declare module '@flatfile/api/api/resources' {
export * as spaces from "@flatfile/api/api/resources/spaces";
export * as agents from "@flatfile/api/api/resources/agents";
export * from "@flatfile/api/api/resources/agents/types";
export * as auth from "@flatfile/api/api/resources/auth";
export * from "@flatfile/api/api/resources/auth/types";
export * as billing from "@flatfile/api/api/resources/billing";
export * from "@flatfile/api/api/resources/billing/types";
export * as cells from "@flatfile/api/api/resources/cells";
export * from "@flatfile/api/api/resources/cells/types";
export * as commons from "@flatfile/api/api/resources/commons";
export * from "@flatfile/api/api/resources/commons/types";
export * as documents from "@flatfile/api/api/resources/documents";
export * from "@flatfile/api/api/resources/documents/types";
export * as environments from "@flatfile/api/api/resources/environments";
export * from "@flatfile/api/api/resources/environments/types";
export * as events from "@flatfile/api/api/resources/events";
export * from "@flatfile/api/api/resources/events/types";
export * as files from "@flatfile/api/api/resources/files";
export * from "@flatfile/api/api/resources/files/types";
export * as guests from "@flatfile/api/api/resources/guests";
export * from "@flatfile/api/api/resources/guests/types";
export * as jobs from "@flatfile/api/api/resources/jobs";
export * from "@flatfile/api/api/resources/jobs/types";
export * as property from "@flatfile/api/api/resources/property";
export * from "@flatfile/api/api/resources/property/types";
export * as records from "@flatfile/api/api/resources/records";
export * from "@flatfile/api/api/resources/records/types";
export * as sheets from "@flatfile/api/api/resources/sheets";
export * from "@flatfile/api/api/resources/sheets/types";
export * as users from "@flatfile/api/api/resources/users";
export * from "@flatfile/api/api/resources/users/types";
export * as versions from "@flatfile/api/api/resources/versions";
export * from "@flatfile/api/api/resources/versions/types";
export * as workbooks from "@flatfile/api/api/resources/workbooks";
export * from "@flatfile/api/api/resources/workbooks/types";
export * from "@flatfile/api/api/resources/commons/errors";
export * from "@flatfile/api/api/resources/agents/client/requests";
export * from "@flatfile/api/api/resources/auth/client/requests";
export * from "@flatfile/api/api/resources/cells/client/requests";
export * from "@flatfile/api/api/resources/environments/client/requests";
export * from "@flatfile/api/api/resources/events/client/requests";
export * from "@flatfile/api/api/resources/files/client/requests";
export * from "@flatfile/api/api/resources/guests/client/requests";
export * from "@flatfile/api/api/resources/jobs/client/requests";
export * from "@flatfile/api/api/resources/records/client/requests";
export * from "@flatfile/api/api/resources/sheets/client/requests";
export * from "@flatfile/api/api/resources/users/client/requests";
export * from "@flatfile/api/api/resources/versions/client/requests";
export * from "@flatfile/api/api/resources/workbooks/client/requests";
}
declare module '@flatfile/api/errors/FlatfileError' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export class FlatfileError extends Error {
readonly statusCode?: number;
readonly body?: unknown;
constructor({ message, statusCode, body }: {
message?: string;
statusCode?: number;
body?: unknown;
});
}
}
declare module '@flatfile/api/errors/FlatfileTimeoutError' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export class FlatfileTimeoutError extends Error {
constructor();
}
}
declare module '@flatfile/api/api/resources/spaces/client/Client' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as environments from "@flatfile/api/environments";
import * as core from "@flatfile/api/core";
import * as Flatfile from "@flatfile/api/api";
export namespace Spaces {
interface Options {
environment?: core.Supplier<environments.FlatfileEnvironment | string>;
token: core.Supplier<core.BearerToken>;
fetcher?: core.FetchFunction;
streamingFetcher?: core.StreamingFetchFunction;
}
}
export class Spaces {
protected readonly options: Spaces.Options;
constructor(options: Spaces.Options);
/**
* Returns all spaces for an account or environment
* @throws {@link Flatfile.BadRequestError}
*/
list(request?: Flatfile.spaces.ListSpacesRequest): Promise<Flatfile.spaces.ListSpacesResponse>;
/**
* Creates a new space based on an existing Space Config
*/
create(request: Flatfile.spaces.SpaceConfig): Promise<Flatfile.spaces.SpaceResponse>;
/**
* Returns a single space
*/
get(spaceId: Flatfile.SpaceId): Promise<Flatfile.spaces.SpaceResponse>;
/**
* Delete a space
*/
delete(spaceId: Flatfile.SpaceId): Promise<Flatfile.Success>;
/**
* Update a space, to change the name for example
*/
update(spaceId: Flatfile.SpaceId, request: Flatfile.spaces.SpaceConfig): Promise<Flatfile.spaces.SpaceResponse>;
/**
* Sets archivedAt timestamp on a space
* @throws {@link Flatfile.BadRequestError}
* @throws {@link Flatfile.NotFoundError}
*/
archiveSpace(spaceId: Flatfile.SpaceId): Promise<Flatfile.Success>;
protected _getAuthorizationHeader(): Promise<string>;
}
}
declare module '@flatfile/api/api/resources/agents/client/Client' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as environments from "@flatfile/api/environments";
import * as core from "@flatfile/api/core";
import * as Flatfile from "@flatfile/api/api";
export namespace Agents {
interface Options {
environment?: core.Supplier<environments.FlatfileEnvironment | string>;
token: core.Supplier<core.BearerToken>;
fetcher?: core.FetchFunction;
streamingFetcher?: core.StreamingFetchFunction;
}
}
export class Agents {
protected readonly options: Agents.Options;
constructor(options: Agents.Options);
list(request: Flatfile.ListAgentsRequest): Promise<Flatfile.ListAgentsResponse>;
/**
* @throws {@link Flatfile.BadRequestError}
*/
create(request: Flatfile.CreateAgentsRequest): Promise<Flatfile.AgentResponse>;
/**
* @throws {@link Flatfile.BadRequestError}
* @throws {@link Flatfile.NotFoundError}
*/
get(agentId: Flatfile.AgentId, request: Flatfile.GetAgentRequest): Promise<Flatfile.AgentResponse>;
/**
* @throws {@link Flatfile.BadRequestError}
* @throws {@link Flatfile.NotFoundError}
*/
getAgentLogs(agentId: Flatfile.AgentId, request: Flatfile.GetAgentLogsRequest): Promise<Flatfile.GetAgentLogsResponse>;
/**
* @throws {@link Flatfile.BadRequestError}
* @throws {@link Flatfile.NotFoundError}
*/
getEnvironmentAgentLogs(request: Flatfile.GetEnvironmentAgentLogsRequest): Promise<Flatfile.GetAgentLogsResponse>;
/**
* Deletes a single agent
* @throws {@link Flatfile.BadRequestError}
* @throws {@link Flatfile.NotFoundError}
*/
delete(agentId: Flatfile.AgentId, request: Flatfile.DeleteAgentRequest): Promise<Flatfile.Success>;
protected _getAuthorizationHeader(): Promise<string>;
}
}
declare module '@flatfile/api/api/resources/auth/client/Client' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as environments from "@flatfile/api/environments";
import * as core from "@flatfile/api/core";
import * as Flatfile from "@flatfile/api/api";
export namespace Auth {
interface Options {
environment?: core.Supplier<environments.FlatfileEnvironment | string>;
token: core.Supplier<core.BearerToken>;
fetcher?: core.FetchFunction;
streamingFetcher?: core.StreamingFetchFunction;
}
}
export class Auth {
protected readonly options: Auth.Options;
constructor(options: Auth.Options);
/**
* @throws {@link Flatfile.BadRequestError}
* @throws {@link Flatfile.NotFoundError}
*/
getApiKeys(request: Flatfile.GetApiKeysRequest): Promise<Flatfile.ApiKeysResponse>;
protected _getAuthorizationHeader(): Promise<string>;
}
}
declare module '@flatfile/api/api/resources/billing/client/Client' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as environments from "@flatfile/api/environments";
import * as core from "@flatfile/api/core";
import * as Flatfile from "@flatfile/api/api";
export namespace Billing {
interface Options {
environment?: core.Supplier<environments.FlatfileEnvironment | string>;
token: core.Supplier<core.BearerToken>;
fetcher?: core.FetchFunction;
streamingFetcher?: core.StreamingFetchFunction;
}
}
export class Billing {
protected readonly options: Billing.Options;
constructor(options: Billing.Options);
/**
* List the available products
*/
list(): Promise<Flatfile.ProductsResponse>;
/**
* Creates a checkout session
*/
post(): Promise<Flatfile.CreateCheckoutSessionResponse>;
protected _getAuthorizationHeader(): Promise<string>;
}
}
declare module '@flatfile/api/api/resources/cells/client/Client' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as environments from "@flatfile/api/environments";
import * as core from "@flatfile/api/core";
import * as Flatfile from "@flatfile/api/api";
export namespace Cells {
interface Options {
environment?: core.Supplier<environments.FlatfileEnvironment | string>;
token: core.Supplier<core.BearerToken>;
fetcher?: core.FetchFunction;
streamingFetcher?: core.StreamingFetchFunction;
}
}
export class Cells {
protected readonly options: Cells.Options;
constructor(options: Cells.Options);
/**
* Returns record cell values grouped by all fields in the sheet
*/
getValues(sheetId: Flatfile.SheetId, request: Flatfile.GetFieldValuesRequest): Promise<Flatfile.CellsResponse>;
protected _getAuthorizationHeader(): Promise<string>;
}
}
declare module '@flatfile/api/api/resources/documents/client/Client' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as environments from "@flatfile/api/environments";
import * as core from "@flatfile/api/core";
import * as Flatfile from "@flatfile/api/api";
export namespace Documents {
interface Options {
environment?: core.Supplier<environments.FlatfileEnvironment | string>;
token: core.Supplier<core.BearerToken>;
fetcher?: core.FetchFunction;
streamingFetcher?: core.StreamingFetchFunction;
}
}
export class Documents {
protected readonly options: Documents.Options;
constructor(options: Documents.Options);
/**
* Returns all documents for a space
* @throws {@link Flatfile.BadRequestError}
* @throws {@link Flatfile.NotFoundError}
*/
list(spaceId: Flatfile.SpaceId): Promise<Flatfile.ListDocumentsResponse>;
/**
* Add a new document to the space
* @throws {@link Flatfile.BadRequestError}
* @throws {@link Flatfile.NotFoundError}
*/
create(spaceId: Flatfile.SpaceId, request: Flatfile.DocumentConfig): Promise<Flatfile.DocumentResponse>;
/**
* Returns a single document
* @throws {@link Flatfile.BadRequestError}
* @throws {@link Flatfile.NotFoundError}
*/
get(spaceId: Flatfile.SpaceId, documentId: Flatfile.DocumentId): Promise<Flatfile.DocumentResponse>;
/**
* updates a single document, for only the body and title
* @throws {@link Flatfile.BadRequestError}
* @throws {@link Flatfile.NotFoundError}
*/
update(spaceId: Flatfile.SpaceId, documentId: Flatfile.DocumentId, request: Flatfile.DocumentConfig): Promise<Flatfile.DocumentResponse>;
/**
* Deletes a single document
* @throws {@link Flatfile.BadRequestError}
* @throws {@link Flatfile.NotFoundError}
*/
delete(spaceId: Flatfile.SpaceId, documentId: Flatfile.DocumentId, request: Flatfile.EnvironmentConfig): Promise<Flatfile.Success>;
protected _getAuthorizationHeader(): Promise<string>;
}
}
declare module '@flatfile/api/api/resources/environments/client/Client' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as environments from "@flatfile/api/environments";
import * as core from "@flatfile/api/core";
import * as Flatfile from "@flatfile/api/api";
export namespace Environments {
interface Options {
environment?: core.Supplier<environments.FlatfileEnvironment | string>;
token: core.Supplier<core.BearerToken>;
fetcher?: core.FetchFunction;
streamingFetcher?: core.StreamingFetchFunction;
}
}
export class Environments {
protected readonly options: Environments.Options;
constructor(options: Environments.Options);
/**
* Get all environments
*/
list(request?: Flatfile.ListEnvironmentsRequest): Promise<Flatfile.ListEnvironmentsResponse>;
/**
* Create a new environment
*/
create(request: Flatfile.EnvironmentConfig): Promise<Flatfile.EnvironmentResponse>;
/**
* Returns a single environment
*/
get(environmentId: string): Promise<Flatfile.Environment>;
/**
* Updates a single environment, to change the name for example
*/
update(environmentId: string, request: Flatfile.EnvironmentConfig): Promise<Flatfile.Environment>;
/**
* Deletes a single environment
* @throws {@link Flatfile.BadRequestError}
* @throws {@link Flatfile.NotFoundError}
*/
delete(environmentId: string, request: Flatfile.EnvironmentConfig): Promise<Flatfile.Success>;
protected _getAuthorizationHeader(): Promise<string>;
}
}
declare module '@flatfile/api/api/resources/events/client/Client' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as environments from "@flatfile/api/environments";
import * as core from "@flatfile/api/core";
import * as Flatfile from "@flatfile/api/api";
export namespace Events {
interface Options {
environment?: core.Supplier<environments.FlatfileEnvironment | string>;
token: core.Supplier<core.BearerToken>;
fetcher?: core.FetchFunction;
streamingFetcher?: core.StreamingFetchFunction;
}
}
export class Events {
protected readonly options: Events.Options;
constructor(options: Events.Options);
/**
* Event topics that the Flatfile Platform emits.
*/
list(request: Flatfile.ListEventsRequest): Promise<Flatfile.ListAllEventsResponse>;
/**
* @throws {@link Flatfile.BadRequestError}
* @throws {@link Flatfile.NotFoundError}
*/
create(request: Flatfile.Event): Promise<Flatfile.EventResponse>;
get(eventId: Flatfile.EventId): Promise<Flatfile.EventResponse>;
ack(eventId: Flatfile.EventId): Promise<Flatfile.Success>;
/**
* Get a token which can be used to subscribe to events for this space
* @throws {@link Flatfile.BadRequestError}
* @throws {@link Flatfile.NotFoundError}
*/
getEventToken(request?: Flatfile.GetEventTokenRequest): Promise<Flatfile.spaces.EventTokenResponse>;
protected _getAuthorizationHeader(): Promise<string>;
}
}
declare module '@flatfile/api/api/resources/files/client/Client' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as environments from "@flatfile/api/environments";
import * as core from "@flatfile/api/core";
import * as Flatfile from "@flatfile/api/api";
import * as stream from "stream";
export namespace Files {
interface Options {
environment?: core.Supplier<environments.FlatfileEnvironment | string>;
token: core.Supplier<core.BearerToken>;
fetcher?: core.FetchFunction;
streamingFetcher?: core.StreamingFetchFunction;
}
}
export class Files {
protected readonly options: Files.Options;
constructor(options: Files.Options);
list(request?: Flatfile.ListFilesRequest): Promise<Flatfile.ListFilesResponse>;
upload(request: Flatfile.CreateFileRequest): Promise<Flatfile.FileResponse>;
get(fileId: string): Promise<Flatfile.FileResponse>;
delete(fileId: string): Promise<Flatfile.Success>;
/**
* Update a file, to change the workbook id for example
*/
update(fileId: string, request?: Flatfile.UpdateFileRequest): Promise<Flatfile.FileResponse>;
download(fileId: Flatfile.FileId): Promise<stream.Readable>;
protected _getAuthorizationHeader(): Promise<string>;
}
}
declare module '@flatfile/api/api/resources/guests/client/Client' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as environments from "@flatfile/api/environments";
import * as core from "@flatfile/api/core";
import * as Flatfile from "@flatfile/api/api";
export namespace Guests {
interface Options {
environment?: core.Supplier<environments.FlatfileEnvironment | string>;
token: core.Supplier<core.BearerToken>;
fetcher?: core.FetchFunction;
streamingFetcher?: core.StreamingFetchFunction;
}
}
export class Guests {
protected readonly options: Guests.Options;
constructor(options: Guests.Options);
/**
* Returns all guests
*/
list(request: Flatfile.ListGuestsRequest): Promise<Flatfile.ListGuestsResponse>;
/**
* Guests are only there to upload, edit, and download files and perform their tasks in a specific Space.
*/
create(request: Flatfile.GuestConfig[]): Promise<Flatfile.CreateGuestResponse>;
/**
* Returns a single guest
*/
get(guestId: Flatfile.GuestId): Promise<Flatfile.Guest>;
/**
* Deletes a single guest
*/
delete(guestId: Flatfile.GuestId): Promise<Flatfile.Success>;
/**
* Updates a single guest, for example to change name or email
*/
update(guestId: Flatfile.GuestId, request: Flatfile.GuestConfig): Promise<Flatfile.Guest>;
/**
* Guests can be created as a named guest on the Space or there’s a global link that will let anonymous guests into the space.
*/
invite(request: Flatfile.Invite[]): Promise<Flatfile.Success>;
protected _getAuthorizationHeader(): Promise<string>;
}
}
declare module '@flatfile/api/api/resources/jobs/client/Client' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as environments from "@flatfile/api/environments";
import * as core from "@flatfile/api/core";
import * as Flatfile from "@flatfile/api/api";
export namespace Jobs {
interface Options {
environment?: core.Supplier<environments.FlatfileEnvironment | string>;
token: core.Supplier<core.BearerToken>;
fetcher?: core.FetchFunction;
streamingFetcher?: core.StreamingFetchFunction;
}
}
export class Jobs {
protected readonly options: Jobs.Options;
constructor(options: Jobs.Options);
list(request?: Flatfile.ListJobsRequest): Promise<Flatfile.ListJobsResponse>;
create(request: Flatfile.JobConfig): Promise<Flatfile.JobResponse>;
get(jobId: Flatfile.JobId): Promise<Flatfile.JobResponse>;
update(jobId: Flatfile.JobId, request: Flatfile.JobUpdate): Promise<Flatfile.JobResponse>;
delete(jobId: Flatfile.JobId): Promise<Flatfile.Success>;
/**
* Execute a job and return the job
*/
execute(jobId: string): Promise<Flatfile.Success>;
/**
* Returns a single job's execution plan
*/
getExecutionPlan(jobId: Flatfile.JobId): Promise<Flatfile.JobPlan>;
/**
* Update a job's entire execution plan
*/
updateExecutionPlan(jobId: Flatfile.JobId, request: Flatfile.JobExecutionPlanConfig): Promise<Flatfile.JobPlan>;
/**
* Update a one or more individual fields on a job's execution plan
*/
updateExecutionPlanFields(jobId: string, request: Flatfile.JobExecutionPlanConfig): Promise<Flatfile.JobPlan>;
/**
* Acknowledge a job and return the job
*/
ack(jobId: Flatfile.JobId, request?: Flatfile.JobAckDetails): Promise<Flatfile.Job>;
/**
* Acknowledge a job outcome and return the job
*/
ackOutcome(jobId: Flatfile.JobId): Promise<Flatfile.Job>;
/**
* Complete a job and return the job
*/
complete(jobId: Flatfile.JobId, request?: Flatfile.JobOutcome): Promise<Flatfile.Job>;
/**
* Fail a job and return the job
*/
fail(jobId: Flatfile.JobId, request?: Flatfile.JobOutcome): Promise<Flatfile.Job>;
protected _getAuthorizationHeader(): Promise<string>;
}
}
declare module '@flatfile/api/api/resources/records/client/Client' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as environments from "@flatfile/api/environments";
import * as core from "@flatfile/api/core";
import * as Flatfile from "@flatfile/api/api";
export namespace Records {
interface Options {
environment?: core.Supplier<environments.FlatfileEnvironment | string>;
token: core.Supplier<core.BearerToken>;
fetcher?: core.FetchFunction;
streamingFetcher?: core.StreamingFetchFunction;
}
}
export class Records {
protected readonly options: Records.Options;
constructor(options: Records.Options);
/**
* Returns records from a sheet in a workbook
*/
get(sheetId: Flatfile.SheetId, request?: Flatfile.GetRecordsRequest): Promise<Flatfile.RecordsResponse>;
/**
* Updates existing records in a workbook sheet
*/
update(sheetId: Flatfile.SheetId, request: Flatfile.Records): Promise<Flatfile.VersionResponse>;
/**
* Adds records to a workbook sheet
*/
insert(sheetId: Flatfile.SheetId, request: Flatfile.RecordData[]): Promise<Flatfile.RecordsResponse>;
/**
* Deletes records from a workbook sheet
*/
delete(sheetId: Flatfile.SheetId, request?: Flatfile.DeleteRecordsRequest): Promise<Flatfile.Success>;
/**
* Searches for the given value in a field and returns the records that match the search criteria
*/
find(sheetId: Flatfile.SheetId, request: Flatfile.FindRecordsRequest): Promise<Flatfile.RecordsResponse>;
/**
* Searches for the given searchValue in a field and replaces all instances of that value with replaceValue
*/
findAndReplaceDeprecated(sheetId: Flatfile.SheetId, request: Flatfile.FindAndReplaceRecordRequestDeprecated): Promise<Flatfile.RecordsResponse>;
/**
* Searches for all values that match the 'find' value (globally or for a specific field via 'fieldKey') and replaces them with the 'replace' value. Wrap 'find' value in double quotes for exact match (""). Returns a versionId for the updated records
*/
findAndReplace(sheetId: Flatfile.SheetId, request: Flatfile.FindAndReplaceRecordRequest): Promise<Flatfile.VersionResponse>;
protected _getAuthorizationHeader(): Promise<string>;
}
}
declare module '@flatfile/api/api/resources/sheets/client/Client' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as environments from "@flatfile/api/environments";
import * as core from "@flatfile/api/core";
import * as Flatfile from "@flatfile/api/api";
export namespace Sheets {
interface Options {
environment?: core.Supplier<environments.FlatfileEnvironment | string>;
token: core.Supplier<core.BearerToken>;
fetcher?: core.FetchFunction;
streamingFetcher?: core.StreamingFetchFunction;
}
}
export class Sheets {
protected readonly options: Sheets.Options;
constructor(options: Sheets.Options);
/**
* Returns sheets in a workbook
*/
list(request: Flatfile.ListSheetsRequest): Promise<Flatfile.ListSheetsResponse>;
/**
* Returns a sheet in a workbook
*/
get(sheetId: Flatfile.SheetId): Promise<Flatfile.SheetResponse>;
/**
* Deletes a specific sheet from a workbook
* @throws {@link Flatfile.BadRequestError}
* @throws {@link Flatfile.NotFoundError}
*/
delete(sheetId: Flatfile.SheetId): Promise<Flatfile.Success>;
/**
* Trigger data hooks and validation to run on a sheet
* @throws {@link Flatfile.BadRequestError}
* @throws {@link Flatfile.NotFoundError}
*/
validate(sheetId: Flatfile.SheetId): Promise<Flatfile.Success>;
/**
* Returns records from a sheet in a workbook as a csv file
*/
getRecordsAsCsv(sheetId: Flatfile.SheetId, request?: Flatfile.GetRecordsCsvRequest): Promise<string>;
/**
* Returns counts of records from a sheet
*/
getRecordCounts(sheetId: Flatfile.SheetId, request?: Flatfile.GetRecordCountsRequest): Promise<Flatfile.RecordCountsResponse>;
protected _getAuthorizationHeader(): Promise<string>;
}
}
declare module '@flatfile/api/api/resources/users/client/Client' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as environments from "@flatfile/api/environments";
import * as core from "@flatfile/api/core";
import * as Flatfile from "@flatfile/api/api";
export namespace Users {
interface Options {
environment?: core.Supplier<environments.FlatfileEnvironment | string>;
token: core.Supplier<core.BearerToken>;
fetcher?: core.FetchFunction;
streamingFetcher?: core.StreamingFetchFunction;
}
}
export class Users {
protected readonly options: Users.Options;
constructor(options: Users.Options);
/**
* Gets a list of users
*/
list(request?: Flatfile.ListUsersRequest): Promise<Flatfile.ListUsersResponse>;
/**
* A user is a privileged user that logs in with a username and password.
*/
create(request: Flatfile.UserConfig): Promise<Flatfile.UserResponse>;
/**
* Gets a user
*/
get(userId: Flatfile.UserId): Promise<Flatfile.UserResponse>;
/**
* Gets all the api tokens for a user.
*/
listApiTokens(userId: Flatfile.UserId, request: Flatfile.ListApiTokensRequest): Promise<Flatfile.ListApiTokensResponse>;
/**
* Creates an api token for authenticating against Flatfile APIs.
*/
createApiToken(userId: Flatfile.UserId, request: Flatfile.CreateApiTokenRequest): Promise<void>;
/**
* Exchange an invitation for an access token
*/
exchangeToken(request?: Flatfile.ExchangeTokenRequest): Promise<Flatfile.ExchangeTokenResponse>;
protected _getAuthorizationHeader(): Promise<string>;
}
}
declare module '@flatfile/api/api/resources/versions/client/Client' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as environments from "@flatfile/api/environments";
import * as core from "@flatfile/api/core";
import * as Flatfile from "@flatfile/api/api";
export namespace Versions {
interface Options {
environment?: core.Supplier<environments.FlatfileEnvironment | string>;
token: core.Supplier<core.BearerToken>;
fetcher?: core.FetchFunction;
streamingFetcher?: core.StreamingFetchFunction;
}
}
export class Versions {
protected readonly options: Versions.Options;
constructor(options: Versions.Options);
/**
* Creates a new version id that can be used to group record updates
*/
createId(request?: Flatfile.VersionsPostRequestBody): Promise<Flatfile.VersionResponse>;
protected _getAuthorizationHeader(): Promise<string>;
}
}
declare module '@flatfile/api/api/resources/workbooks/client/Client' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as environments from "@flatfile/api/environments";
import * as core from "@flatfile/api/core";
import * as Flatfile from "@flatfile/api/api";
export namespace Workbooks {
interface Options {
environment?: core.Supplier<environments.FlatfileEnvironment | string>;
token: core.Supplier<core.BearerToken>;
fetcher?: core.FetchFunction;
streamingFetcher?: core.StreamingFetchFunction;
}
}
export class Workbooks {
protected readonly options: Workbooks.Options;
constructor(options: Workbooks.Options);
/**
* Returns all workbooks matching a filter for an account or space
*/
list(request?: Flatfile.ListWorkbooksRequest): Promise<Flatfile.ListWorkbooksResponse>;
/**
* Creates a workbook and adds it to a space
*/
create(request: Flatfile.CreateWorkbookConfig): Promise<Flatfile.WorkbookResponse>;
/**
* Returns a single workbook
*/
get(workbookId: Flatfile.WorkbookId): Promise<Flatfile.WorkbookResponse>;
/**
* Delete a workbook
*/
delete(workbookId: Flatfile.WorkbookId): Promise<Flatfile.Success>;
/**
* Updates a workbook
* @throws {@link Flatfile.BadRequestError}
* @throws {@link Flatfile.NotFoundError}
*/
update(workbookId: Flatfile.WorkbookId, request: Flatfile.UpdateWorkbookConfig): Promise<Flatfile.WorkbookResponse>;
/**
* Clones a workbook
* @throws {@link Flatfile.BadRequestError}
* @throws {@link Flatfile.NotFoundError}
*/
clone(workbookId: Flatfile.WorkbookId): Promise<Flatfile.WorkbookResponse>;
protected _getAuthorizationHeader(): Promise<string>;
}
}
declare module '@flatfile/api/core/schemas' {
export * from "@flatfile/api/core/schemas/builders";
export type { inferParsed, inferRaw, Schema, SchemaOptions } from "@flatfile/api/core/schemas/Schema";
}
declare module '@flatfile/api/core/fetcher' {
export type { APIResponse } from "@flatfile/api/core/fetcher/APIResponse";
export { fetcher } from "@flatfile/api/core/fetcher/Fetcher";
export type { Fetcher, FetchFunction } from "@flatfile/api/core/fetcher/Fetcher";
export { Supplier } from "@flatfile/api/core/fetcher/Supplier";
}
declare module '@flatfile/api/core/auth' {
export { BasicAuth } from "@flatfile/api/core/auth/BasicAuth";
export { BearerToken } from "@flatfile/api/core/auth/BearerToken";
}
declare module '@flatfile/api/core/streaming-fetcher' {
export { streamingFetcher } from "@flatfile/api/core/streaming-fetcher/StreamingFetcher";
export type { StreamingFetcher, StreamingFetchFunction } from "@flatfile/api/core/streaming-fetcher/StreamingFetcher";
}
declare module '@flatfile/api/api/resources/spaces' {
export * from "@flatfile/api/api/resources/spaces/types";
export * from "@flatfile/api/api/resources/spaces/client";
}
declare module '@flatfile/api/api/resources/agents' {
export * from "@flatfile/api/api/resources/agents/types";
export * from "@flatfile/api/api/resources/agents/client";
}
declare module '@flatfile/api/api/resources/agents/types' {
export * from "@flatfile/api/api/resources/agents/types/ListAgentsResponse";
export * from "@flatfile/api/api/resources/agents/types/AgentResponse";
export * from "@flatfile/api/api/resources/agents/types/AgentConfig";
export * from "@flatfile/api/api/resources/agents/types/Agent";
export * from "@flatfile/api/api/resources/agents/types/Compiler";
export * from "@flatfile/api/api/resources/agents/types/GetAgentLogsResponse";
export * from "@flatfile/api/api/resources/agents/types/AgentLog";
}
declare module '@flatfile/api/api/resources/auth' {
export * from "@flatfile/api/api/resources/auth/types";
export * from "@flatfile/api/api/resources/auth/client";
}
declare module '@flatfile/api/api/resources/auth/types' {
export * from "@flatfile/api/api/resources/auth/types/ApiKeysResponse";
export * from "@flatfile/api/api/resources/auth/types/ApiKeyType";
export * from "@flatfile/api/api/resources/auth/types/ApiKeyOperation";
export * from "@flatfile/api/api/resources/auth/types/ApiKey";
}
declare module '@flatfile/api/api/resources/billing' {
export * from "@flatfile/api/api/resources/billing/types";
export * from "@flatfile/api/api/resources/billing/client";
}
declare module '@flatfile/api/api/resources/billing/types' {
export * from "@flatfile/api/api/resources/billing/types/ProductsResponse";
export * from "@flatfile/api/api/resources/billing/types/CreateCheckoutSessionResponse";
export * from "@flatfile/api/api/resources/billing/types/StripeProduct";
export * from "@flatfile/api/api/resources/billing/types/CheckoutSession";
}
declare module '@flatfile/api/api/resources/cells' {
export * from "@flatfile/api/api/resources/cells/types";
export * from "@flatfile/api/api/resources/cells/client";
}
declare module '@flatfile/api/api/resources/cells/types' {
export * from "@flatfile/api/api/resources/cells/types/CellsResponse";
export * from "@flatfile/api/api/resources/cells/types/CellsResponseData";
export * from "@flatfile/api/api/resources/cells/types/CellValueWithCounts";
}
declare module '@flatfile/api/api/resources/commons' {
export * from "@flatfile/api/api/resources/commons/types";
export * from "@flatfile/api/api/resources/commons/errors";
}
declare module '@flatfile/api/api/resources/commons/types' {
export * from "@flatfile/api/api/resources/commons/types/AgentId";
export * from "@flatfile/api/api/resources/commons/types/AccountId";
export * from "@flatfile/api/api/resources/commons/types/DocumentId";
export * from "@flatfile/api/api/resources/commons/types/GuestId";
export * from "@flatfile/api/api/resources/commons/types/EnvironmentId";
export * from "@flatfile/api/api/resources/commons/types/FileId";
export * from "@flatfile/api/api/resources/commons/types/SpaceId";
export * from "@flatfile/api/api/resources/commons/types/WorkbookId";
export * from "@flatfile/api/api/resources/commons/types/EventId";
export * from "@flatfile/api/api/resources/commons/types/SheetId";
export * from "@flatfile/api/api/resources/commons/types/VersionId";
export * from "@flatfile/api/api/resources/commons/types/JobId";
export * from "@flatfile/api/api/resources/commons/types/UserId";
export * from "@flatfile/api/api/resources/commons/types/SpaceConfigId";
export * from "@flatfile/api/api/resources/commons/types/RecordId";
export * from "@flatfile/api/api/resources/commons/types/Pagination";
export * from "@flatfile/api/api/resources/commons/types/Action";
export * from "@flatfile/api/api/resources/commons/types/ActionMode";
export * from "@flatfile/api/api/resources/commons/types/SortDirection";
export * from "@flatfile/api/api/resources/commons/types/Success";
export * from "@flatfile/api/api/resources/commons/types/SuccessData";
export * from "@flatfile/api/api/resources/commons/types/Error_";
export * from "@flatfile/api/api/resources/commons/types/Filter";
export * from "@flatfile/api/api/resources/commons/types/FilterField";
export * from "@flatfile/api/api/resources/commons/types/SearchField";
export * from "@flatfile/api/api/resources/commons/types/SearchValue";
export * from "@flatfile/api/api/resources/commons/types/SortField";
}
declare module '@flatfile/api/api/resources/documents' {
export * from "@flatfile/api/api/resources/documents/types";
export * from "@flatfile/api/api/resources/documents/client";
}
declare module '@flatfile/api/api/resources/documents/types' {
export * from "@flatfile/api/api/resources/documents/types/ListDocumentsResponse";
export * from "@flatfile/api/api/resources/documents/types/DocumentResponse";
export * from "@flatfile/api/api/resources/documents/types/DocumentConfig";
export * from "@flatfile/api/api/resources/documents/types/Document";
}
declare module '@flatfile/api/api/resources/environments' {
export * from "@flatfile/api/api/resources/environments/types";
export * from "@flatfile/api/api/resources/environments/client";
}
declare module '@flatfile/api/api/resources/environments/types' {
export * from "@flatfile/api/api/resources/environments/types/ListEnvironmentsResponse";
export * from "@flatfile/api/api/resources/environments/types/EnvironmentResponse";
export * from "@flatfile/api/api/resources/environments/types/Environment";
export * from "@flatfile/api/api/resources/environments/types/EnvironmentConfig";
export * from "@flatfile/api/api/resources/environments/types/GuestAuthenticationEnum";
}
declare module '@flatfile/api/api/resources/events' {
export * from "@flatfile/api/api/resources/events/types";
export * from "@flatfile/api/api/resources/events/client";
}
declare module '@flatfile/api/api/resources/events/types' {
export * from "@flatfile/api/api/resources/events/types/ListAllEventsResponse";
export * from "@flatfile/api/api/resources/events/types/EventResponse";
export * from "@flatfile/api/api/resources/events/types/Event";
export * from "@flatfile/api/api/resources/events/types/SpaceAddedEvent";
export * from "@flatfile/api/api/resources/events/types/SpaceRemovedEvent";
export * from "@flatfile/api/api/resources/events/types/WorkbookAddedEvent";
export * from "@flatfile/api/api/resources/events/types/WorkbookRemovedEvent";
export * from "@flatfile/api/api/resources/events/types/WorkbookUpdatedEvent";
export * from "@flatfile/api/api/resources/events/types/UserAddedEvent";
export * from "@flatfile/api/api/resources/events/types/UserRemovedEvent";
export * from "@flatfile/api/api/resources/events/types/UserOnlineEvent";
export * from "@flatfile/api/api/resources/events/types/UserOfflineEvent";
export * from "@flatfile/api/api/resources/events/types/UploadStartedEvent";
export * from "@flatfile/api/api/resources/events/types/UploadFailedEvent";
export * from "@flatfile/api/api/resources/events/types/UploadCompletedEvent";
export * from "@flatfile/api/api/resources/events/types/JobStartedEvent";
export * from "@flatfile/api/api/resources/events/types/JobWaitingEvent";
export * from "@flatfile/api/api/resources/events/types/JobUpdatedEvent";
export * from "@flatfile/api/api/resources/events/types/JobFailedEvent";
export * from "@flatfile/api/api/resources/events/types/JobCompletedEvent";
export * from "@flatfile/api/api/resources/events/types/JobDeletedEvent";
export * from "@flatfile/api/api/resources/events/types/RecordsCreatedEvent";
export * from "@flatfile/api/api/resources/events/types/RecordsUpdatedEvent";
export * from "@flatfile/api/api/resources/events/types/RecordsDeletedEvent";
export * from "@flatfile/api/api/resources/events/types/SheetValidatedEvent";
export * from "@flatfile/api/api/resources/events/types/ActionTriggeredEvent";
export * from "@flatfile/api/api/resources/events/types/FileDeletedEvent";
export * from "@flatfile/api/api/resources/events/types/ClientInitializedEvent";
export * from "@flatfile/api/api/resources/events/types/RecordsPayload";
export * from "@flatfile/api/api/resources/events/types/JobPayload";
export * from "@flatfile/api/api/resources/events/types/JobFailedPayload";
export * from "@flatfile/api/api/resources/events/types/JobPayloadType";
export * from "@flatfile/api/api/resources/events/types/JobOperationType";
export * from "@flatfile/api/api/resources/events/types/BaseEvent";
export * from "@flatfile/api/api/resources/events/types/EventTopic";
export * from "@flatfile/api/api/resources/events/types/Domain";
export * from "@flatfile/api/api/resources/events/types/Context";
export * from "@flatfile/api/api/resources/events/types/ActionName";
export * from "@flatfile/api/api/resources/events/types/Progress";
export * from "@flatfile/api/api/resources/events/types/EventAttributes";
export * from "@flatfile/api/api/resources/events/types/SheetSlug";
export * from "@flatfile/api/api/resources/events/types/Origin";
}
declare module '@flatfile/api/api/resources/files' {
export * from "@flatfile/api/api/resources/files/types";
export * from "@flatfile/api/api/resources/files/client";
}
declare module '@flatfile/api/api/resources/files/types' {
export * from "@flatfile/api/api/resources/files/types/ListFilesResponse";
export * from "@flatfile/api/api/resources/files/types/FileResponse";
export * from "@flatfile/api/api/resources/files/types/File_";
export * from "@flatfile/api/api/resources/files/types/ModelFileStatusEnum";
export * from "@flatfile/api/api/resources/files/types/Mode";
}
declare module '@flatfile/api/api/resources/guests' {
export * from "@flatfile/api/api/resources/guests/types";
export * from "@flatfile/api/api/resources/guests/client";
}
declare module '@flatfile/api/api/resources/guests/types' {
export * from "@flatfile/api/api/resources/guests/types/ListGuestsResponse";
export * from "@flatfile/api/api/resources/guests/types/CreateGuestResponse";
export * from "@flatfile/api/api/resources/guests/types/Guest";
export * from "@flatfile/api/api/resources/guests/types/GuestConfig";
export * from "@flatfile/api/api/resources/guests/types/GuestWorkbook";
export * from "@flatfile/api/api/resources/guests/types/GuestSpace";
export * from "@flatfile/api/api/resources/guests/types/Invite";
}
declare module '@flatfile/api/api/resources/jobs' {
export * from "@flatfile/api/api/resources/jobs/types";
export * from "@flatfile/api/api/resources/jobs/client";
}
declare module '@flatfile/api/api/resources/jobs/types' {
export * from "@flatfile/api/api/resources/jobs/types/ListJobsResponse";
export * from "@flatfile/api/api/resources/jobs/types/JobResponse";
export * from "@flatfile/api/api/resources/jobs/types/Job";
export * from "@flatfile/api/api/resources/jobs/types/JobConfig";
export * from "@flatfile/api/api/resources/jobs/types/JobUpdate";
export * from "@flatfile/api/api/resources/jobs/types/JobUpdateConfig";
export * from "@flatfile/api/api/resources/jobs/types/JobSource";
export * from "@flatfile/api/api/resources/jobs/types/JobDestination";
export * from "@flatfile/api/api/resources/jobs/types/DeleteJobConfig";
export * from "@flatfile/api/api/resources/jobs/types/FileJobConfig";
export * from "@flatfile/api/api/resources/jobs/types/MutateJobConfig";
export * from "@flatfile/api/api/resources/jobs/types/AiAssistJobConfig";
export * from "@flatfile/api/api/resources/jobs/types/Driver";
export * from "@flatfile/api/api/resources/jobs/types/Trigger";
export * from "@flatfile/api/api/resources/jobs/types/PipelineJobConfig";
export * from "@flatfile/api/api/resources/jobs/types/JobType";
export * from "@flatfile/api/api/resources/jobs/types/JobStatus";
export * from "@flatfile/api/api/resources/jobs/types/JobMode";
export * from "@flatfile/api/api/resources/jobs/types/JobPlan";
export * from "@flatfile/api/api/resources/jobs/types/JobExecutionPlanConfig";
export * from "@flatfile/api/api/resources/jobs/types/JobAckDetails";
export * from "@flatfile/api/api/resources/jobs/types/JobOutcome";
export * from "@flatfile/api/api/resources/jobs/types/JobExecutionPlan";
export * from "@flatfile/api/api/resources/jobs/types/Edge";
export * from "@flatfile/api/api/resources/jobs/types/SourceField";
export * from "@flatfile/api/api/resources/jobs/types/DestinationField";
export * from "@flatfile/api/api/resources/jobs/types/EnumDetails";
export * from "@flatfile/api/api/resources/jobs/types/Metadata";
export * from "@flatfile/api/api/resources/jobs/types/Certainty";
export * from "@flatfile/api/api/resources/jobs/types/CategoryMapping";
export * from "@flatfile/api/api/resources/jobs/types/FindAndReplaceJobConfig";
export * from "@flatfile/api/api/resources/jobs/types/ExportJobConfig";
export * from "@flatfile/api/api/resources/jobs/types/ExportOptions";
export * from "@flatfile/api/api/resources/jobs/types/EmptyObject";
}
declare module '@flatfile/api/api/resources/property' {
export * from "@flatfile/api/api/resources/property/types";
}
declare module '@flatfile/api/api/resources/property/types' {
export * from "@flatfile/api/api/resources/property/types/Property";
export * from "@flatfile/api/api/resources/property/types/BaseProperty";
export * from "@flatfile/api/api/resources/property/types/ArrayableProperty";
export * from "@flatfile/api/api/resources/property/types/StringProperty";
export * from "@flatfile/api/api/resources/property/types/NumberProperty";
export * from "@flatfile/api/api/resources/property/types/NumberConfig";
export * from "@flatfile/api/api/resources/property/types/BooleanProperty";
export * from "@flatfile/api/api/resources/property/types/BooleanPropertyConfig";
export * from "@flatfile/api/api/resources/property/types/DateProperty";
export * from "@flatfile/api/api/resources/property/types/EnumProperty";
export * from "@flatfile/api/api/resources/property/types/EnumPropertyConfig";
export * from "@flatfile/api/api/resources/property/types/EnumPropertyOption";
export * from "@flatfile/api/api/resources/property/types/ReferenceProperty";
export * from "@flatfile/api/api/resources/property/types/ReferencePropertyConfig";
export * from "@flatfile/api/api/resources/property/types/ReferencePropertyRelationship";
export * from "@flatfile/api/api/resources/property/types/Constraint";
export * from "@flatfile/api/api/resources/property/types/UniqueConstraint";
export * from "@flatfile/api/api/resources/property/types/UniqueConstraintConfig";
export * from "@flatfile/api/api/resources/property/types/StringConfig";
export * from "@flatfile/api/api/resources/property/types/StringConfigOptions";
}
declare module '@flatfile/api/api/resources/records' {
export * from "@flatfile/api/api/resources/records/types";
export * from "@flatfile/api/api/resources/records/client";
}
declare module '@flatfile/api/api/resources/records/types' {
export * from "@flatfile/api/api/resources/records/types/RecordsResponse";
export * from "@flatfile/api/api/resources/records/types/RecordsResponseData";
export * from "@flatfile/api/api/resources/records/types/RecordCounts";
export * from "@flatfile/api/api/resources/records/types/RecordsWithLinks";
export * from "@flatfile/api/api/resources/records/types/RecordWithLinks";
export * from "@flatfile/api/api/resources/records/types/RecordDataWithLinks";
export * from "@flatfile/api/api/resources/records/types/CellValueWithLinks";
export * from "@flatfile/api/api/resources/records/types/Records";
export * from "@flatfile/api/api/resources/records/types/Record_";
export * from "@flatfile/api/api/resources/records/types/RecordData";
export * from "@flatfile/api/api/resources/records/types/CellValue";
export * from "@flatfile/api/api/resources/records/types/CellValueUnion";
export * from "@flatfile/api/api/resources/records/types/ValidationMessage";
export * from "@flatfile/api/api/resources/records/types/ValidationType";
export * from "@flatfile/api/api/resources/records/types/ValidationSource";
}
declare module '@flatfile/api/api/resources/sheets' {
export * from "@flatfile/api/api/resources/sheets/types";
export * from "@flatfile/api/api/resources/sheets/client";
}
declare module '@flatfile/api/api/resources/sheets/types' {
export * from "@flatfile/api/api/resources/sheets/types/ListSheetsResponse";
export * from "@flatfile/api/api/resources/sheets/types/SheetResponse";
export * from "@flatfile/api/api/resources/sheets/types/Sheet";
export * from "@flatfile/api/api/resources/sheets/types/SheetConfig";
export * from "@flatfile/api/api/resources/sheets/types/RecordCountsResponse";
export * from "@flatfile/api/api/resources/sheets/types/RecordCountsResponseData";
export * from "@flatfile/api/api/resources/sheets/types/SheetAccess";
}
declare module '@flatfile/api/api/resources/users' {
export * from "@flatfile/api/api/resources/users/types";
export * from "@flatfile/api/api/resources/users/client";
}
declare module '@flatfile/api/api/resources/users/types' {
export * from "@flatfile/api/api/resources/users/types/ListUsersResponse";
export * from "@flatfile/api/api/resources/users/types/UserResponse";
export * from "@flatfile/api/api/resources/users/types/User";
export * from "@flatfile/api/api/resources/users/types/UserConfig";
export * from "@flatfile/api/api/resources/users/types/ListApiTokensResponse";
export * from "@flatfile/api/api/resources/users/types/ApiToken";
export * from "@flatfile/api/api/resources/users/types/ExchangeTokenResponse";
export * from "@flatfile/api/api/resources/users/types/ExchangeTokenData";
}
declare module '@flatfile/api/api/resources/versions' {
export * from "@flatfile/api/api/resources/versions/types";
export * from "@flatfile/api/api/resources/versions/client";
}
declare module '@flatfile/api/api/resources/versions/types' {
export * from "@flatfile/api/api/resources/versions/types/VersionResponse";
}
declare module '@flatfile/api/api/resources/workbooks' {
export * from "@flatfile/api/api/resources/workbooks/types";
export * from "@flatfile/api/api/resources/workbooks/client";
}
declare module '@flatfile/api/api/resources/workbooks/types' {
export * from "@flatfile/api/api/resources/workbooks/types/ListWorkbooksResponse";
export * from "@flatfile/api/api/resources/workbooks/types/WorkbookResponse";
export * from "@flatfile/api/api/resources/workbooks/types/Workbook";
export * from "@flatfile/api/api/resources/workbooks/types/CreateWorkbookConfig";
export * from "@flatfile/api/api/resources/workbooks/types/UpdateWorkbookConfig";
}
declare module '@flatfile/api/api/resources/commons/errors' {
export * from "@flatfile/api/api/resources/commons/errors/BadRequestError";
export * from "@flatfile/api/api/resources/commons/errors/NotFoundError";
}
declare module '@flatfile/api/api/resources/agents/client/requests' {
export { ListAgentsRequest } from "@flatfile/api/api/resources/agents/client/requests/ListAgentsRequest";
export { CreateAgentsRequest } from "@flatfile/api/api/resources/agents/client/requests/CreateAgentsRequest";
export { GetAgentRequest } from "@flatfile/api/api/resources/agents/client/requests/GetAgentRequest";
export { GetAgentLogsRequest } from "@flatfile/api/api/resources/agents/client/requests/GetAgentLogsRequest";
export { GetEnvironmentAgentLogsRequest } from "@flatfile/api/api/resources/agents/client/requests/GetEnvironmentAgentLogsRequest";
export { DeleteAgentRequest } from "@flatfile/api/api/resources/agents/client/requests/DeleteAgentRequest";
}
declare module '@flatfile/api/api/resources/auth/client/requests' {
export { GetApiKeysRequest } from "@flatfile/api/api/resources/auth/client/requests/GetApiKeysRequest";
}
declare module '@flatfile/api/api/resources/cells/client/requests' {
export { GetFieldValuesRequest } from "@flatfile/api/api/resources/cells/client/requests/GetFieldValuesRequest";
}
declare module '@flatfile/api/api/resources/environments/client/requests' {
export { ListEnvironmentsRequest } from "@flatfile/api/api/resources/environments/client/requests/ListEnvironmentsRequest";
}
declare module '@flatfile/api/api/resources/events/client/requests' {
export { ListEventsRequest } from "@flatfile/api/api/resources/events/client/requests/ListEventsRequest";
export { GetEventTokenRequest } from "@flatfile/api/api/resources/events/client/requests/GetEventTokenRequest";
}
declare module '@flatfile/api/api/resources/files/client/requests' {
export { ListFilesRequest } from "@flatfile/api/api/resources/files/client/requests/ListFilesRequest";
export { CreateFileRequest } from "@flatfile/api/api/resources/files/client/requests/CreateFileRequest";
export { UpdateFileRequest } from "@flatfile/api/api/resources/files/client/requests/UpdateFileRequest";
}
declare module '@flatfile/api/api/resources/guests/client/requests' {
export { ListGuestsRequest } from "@flatfile/api/api/resources/guests/client/requests/ListGuestsRequest";
}
declare module '@flatfile/api/api/resources/jobs/client/requests' {
export { ListJobsRequest } from "@flatfile/api/api/resources/jobs/client/requests/ListJobsRequest";
}
declare module '@flatfile/api/api/resources/records/client/requests' {
export { GetRecordsRequest } from "@flatfile/api/api/resources/records/client/requests/GetRecordsRequest";
export { DeleteRecordsRequest } from "@flatfile/api/api/resources/records/client/requests/DeleteRecordsRequest";
export { FindRecordsRequest } from "@flatfile/api/api/resources/records/client/requests/FindRecordsRequest";
export { FindAndReplaceRecordRequestDeprecated } from "@flatfile/api/api/resources/records/client/requests/FindAndReplaceRecordRequestDeprecated";
export { FindAndReplaceRecordRequest } from "@flatfile/api/api/resources/records/client/requests/FindAndReplaceRecordRequest";
}
declare module '@flatfile/api/api/resources/sheets/client/requests' {
export { ListSheetsRequest } from "@flatfile/api/api/resources/sheets/client/requests/ListSheetsRequest";
export { GetRecordsCsvRequest } from "@flatfile/api/api/resources/sheets/client/requests/GetRecordsCsvRequest";
export { GetRecordCountsRequest } from "@flatfile/api/api/resources/sheets/client/requests/GetRecordCountsRequest";
}
declare module '@flatfile/api/api/resources/users/client/requests' {
export { ListUsersRequest } from "@flatfile/api/api/resources/users/client/requests/ListUsersRequest";
export { ListApiTokensRequest } from "@flatfile/api/api/resources/users/client/requests/ListApiTokensRequest";
export { CreateApiTokenRequest } from "@flatfile/api/api/resources/users/client/requests/CreateApiTokenRequest";
export { ExchangeTokenRequest } from "@flatfile/api/api/resources/users/client/requests/ExchangeTokenRequest";
}
declare module '@flatfile/api/api/resources/versions/client/requests' {
export { VersionsPostRequestBody } from "@flatfile/api/api/resources/versions/client/requests/VersionsPostRequestBody";
}
declare module '@flatfile/api/api/resources/workbooks/client/requests' {
export { ListWorkbooksRequest } from "@flatfile/api/api/resources/workbooks/client/requests/ListWorkbooksRequest";
}
declare module '@flatfile/api/core/schemas/builders' {
export * from "@flatfile/api/core/schemas/builders/date";
export * from "@flatfile/api/core/schemas/builders/enum";
export * from "@flatfile/api/core/schemas/builders/lazy";
export * from "@flatfile/api/core/schemas/builders/list";
export * from "@flatfile/api/core/schemas/builders/literals";
export * from "@flatfile/api/core/schemas/builders/object";
export * from "@flatfile/api/core/schemas/builders/object-like";
export * from "@flatfile/api/core/schemas/builders/primitives";
export * from "@flatfile/api/core/schemas/builders/record";
export * from "@flatfile/api/core/schemas/builders/schema-utils";
export * from "@flatfile/api/core/schemas/builders/set";
export * from "@flatfile/api/core/schemas/builders/undiscriminated-union";
export * from "@flatfile/api/core/schemas/builders/union";
}
declare module '@flatfile/api/core/schemas/Schema' {
import { SchemaUtils } from "@flatfile/api/core/schemas/builders";
import { MaybePromise } from "@flatfile/api/core/schemas/utils/MaybePromise";
export type Schema<Raw = unknown, Parsed = unknown> = BaseSchema<Raw, Parsed> & SchemaUtils<Raw, Parsed>;
export type inferRaw<S extends Schema> = S extends Schema<infer Raw, any> ? Raw : never;
export type inferParsed<S extends Schema> = S extends Schema<any, infer Parsed> ? Parsed : never;
export interface BaseSchema<Raw, Parsed> {
parse: (raw: unknown, opts?: SchemaOptions) => MaybePromise<MaybeValid<Parsed>>;
json: (parsed: unknown, opts?: SchemaOptions) => MaybePromise<MaybeValid<Raw>>;
getType: () => SchemaType | Promise<SchemaType>;
}
export const SchemaType: {
readonly DATE: "date";
readonly ENUM: "enum";
readonly LIST: "list";
readonly STRING_LITERAL: "stringLiteral";
readonly OBJECT: "object";
readonly ANY: "any";
readonly BOOLEAN: "boolean";
readonly NUMBER: "number";
readonly STRING: "string";
readonly UNKNOWN: "unknown";
readonly RECORD: "record";
readonly SET: "set";
readonly UNION: "union";
readonly UNDISCRIMINATED_UNION: "undiscriminatedUnion";
readonly OPTIONAL: "optional";
};
export type SchemaType = typeof SchemaType[keyof typeof SchemaType];
export type MaybeValid<T> = Valid<T> | Invalid;
export interface Valid<T> {
ok: true;
value: T;
}
export interface Invalid {
ok: false;
errors: ValidationError[];
}
export interface ValidationError {
path: string[];
message: string;
}
export interface SchemaOptions {
/**
* how to handle unrecognized keys in objects
*
* @default "fail"
*/
unrecognizedObjectKeys?: "fail" | "passthrough" | "strip";
/**
* whether to fail when an unrecognized discriminant value is
* encountered in a union
*
* @default false
*/
allowUnrecognizedUnionMembers?: boolean;
/**
* whether to fail when an unrecognized enum value is encountered
*
* @default false
*/
allowUnrecognizedEnumValues?: boolean;
/**
* whether to allow data that doesn't conform to the schema.
* invalid data is passed through without transformation.
*
* when this is enabled, .parse() and .json() will always
* return `ok: true`. `.parseOrThrow()` and `.jsonOrThrow()`
* will never fail.
*
* @default false
*/
skipValidation?: boolean;
/**
* each validation failure contains a "path" property, which is
* the breadcrumbs to the offending node in the JSON. you can supply
* a prefix that is prepended to all the errors' paths. this can be
* helpful for zurg's internal debug logging.
*/
breadcrumbsPrefix?: string[];
}
}
declare module '@flatfile/api/core/fetcher/APIResponse' {
export type APIResponse<Success, Failure> = SuccessfulResponse<Success> | FailedResponse<Failure>;
export interface SuccessfulResponse<T> {
ok: true;
body: T;
}
export interface FailedResponse<T> {
ok: false;
error: T;
}
}
declare module '@flatfile/api/core/fetcher/Fetcher' {
import { default as URLSearchParams } from "@ungap/url-search-params";
import { AxiosAdapter, AxiosProgressEvent } from "axios";
import { APIResponse } from "@flatfile/api/core/fetcher/APIResponse";
export type FetchFunction = <R = unknown>(args: Fetcher.Args) => Promise<APIResponse<R, Fetcher.Error>>;
export namespace Fetcher {
interface Args {
url: string;
method: string;
contentType?: string;
headers?: Record<string, string | undefined>;
queryParameters?: URLSearchParams;
body?: unknown;
timeoutMs?: number;
withCredentials?: boolean;
responseType?: "json" | "blob";
adapter?: AxiosAdapter;
onUploadProgress?: (event: AxiosProgressEvent) => void;
}
type Error = FailedStatusCodeError | NonJsonError | TimeoutError | UnknownError;
interface FailedStatusCodeError {
reason: "status-code";
statusCode: number;
body: unknown;
}
interface NonJsonError {
reason: "non-json";
statusCode: number;
rawBody: string;
}
interface TimeoutError {
reason: "timeout";
}
interface UnknownError {
reason: "unknown";
errorMessage: string;
}
}
export const fetcher: FetchFunction;
}
declare module '@flatfile/api/core/fetcher/Supplier' {
export type Supplier<T> = T | Promise<T> | (() => T | Promise<T>);
export const Supplier: {
get: <T>(supplier: Supplier<T>) => Promise<T>;
};
}
declare module '@flatfile/api/core/auth/BasicAuth' {
export interface BasicAuth {
username: string;
password: string;
}
export const BasicAuth: {
toAuthorizationHeader: (basicAuth: BasicAuth | undefined) => string | undefined;
fromAuthorizationHeader: (header: string) => BasicAuth;
};
}
declare module '@flatfile/api/core/auth/BearerToken' {
export type BearerToken = string;
export const BearerToken: {
toAuthorizationHeader: (token: BearerToken | undefined) => string | undefined;
fromAuthorizationHeader: (header: string) => BearerToken;
};
}
declare module '@flatfile/api/core/streaming-fetcher/StreamingFetcher' {
import { default as URLSearchParams } from "@ungap/url-search-params";
import { AxiosAdapter, AxiosProgressEvent } from "axios";
import { Readable } from "stream";
export type StreamingFetchFunction = (args: StreamingFetcher.Args) => Promise<Readable>;
export namespace StreamingFetcher {
interface Args {
url: string;
method: string;
headers?: Record<string, string | undefined>;
queryParameters?: URLSearchParams;
body?: unknown;
timeoutMs?: number;
withCredentials?: boolean;
adapter?: AxiosAdapter;
onUploadProgress?: (event: AxiosProgressEvent) => void;
onDownloadProgress?: (event: AxiosProgressEvent) => void;
onData?: (data: unknown) => void;
onError?: (err: unknown) => void;
onFinish?: () => void;
abortController?: AbortController;
responseChunkPrefix?: string;
terminator?: string;
}
}
export const streamingFetcher: StreamingFetchFunction;
}
declare module '@flatfile/api/api/resources/spaces/types' {
export * from "@flatfile/api/api/resources/spaces/types/ListSpacesResponse";
export * from "@flatfile/api/api/resources/spaces/types/SpaceResponse";
export * from "@flatfile/api/api/resources/spaces/types/Space";
export * from "@flatfile/api/api/resources/spaces/types/SpaceConfig";
export * from "@flatfile/api/api/resources/spaces/types/EventTokenResponse";
export * from "@flatfile/api/api/resources/spaces/types/EventToken";
export * from "@flatfile/api/api/resources/spaces/types/GetSpacesSortField";
export * from "@flatfile/api/api/resources/spaces/types/SpaceAccess";
}
declare module '@flatfile/api/api/resources/spaces/client' {
export * from "@flatfile/api/api/resources/spaces/client/requests";
}
declare module '@flatfile/api/api/resources/agents/client' {
export * from "@flatfile/api/api/resources/agents/client/requests";
}
declare module '@flatfile/api/api/resources/agents/types/ListAgentsResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* @example
* {
* data: [{
* id: "123",
* topics: [Flatfile.EventTopic.FileCreated],
* compiler: Flatfile.Compiler.Js,
* source: "module.exports = { routeEvent: async (...args) => { console.log(args) } }"
* }]
* }
*/
export interface ListAgentsResponse {
data: Flatfile.Agent[];
}
}
declare module '@flatfile/api/api/resources/agents/types/AgentResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* @example
* {
* data: {
* id: "123",
* topics: [Flatfile.EventTopic.FileCreated],
* compiler: Flatfile.Compiler.Js,
* source: "module.exports = { routeEvent: async (...args) => { console.log(args) } }"
* }
* }
*/
export interface AgentResponse {
data: Flatfile.Agent;
}
}
declare module '@flatfile/api/api/resources/agents/types/AgentConfig' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* Properties used to create a new agent
*
* @example
* {
* topics: [Flatfile.EventTopic.FileCreated],
* compiler: Flatfile.Compiler.Js,
* source: "module.exports = { routeEvent: async (...args) => { console.log(args) } }"
* }
*/
export interface AgentConfig {
/** The topics the agent should listen for */
topics?: Flatfile.EventTopic[];
/** The compiler of the agent */
compiler?: Flatfile.Compiler;
/** The source of the agent */
source?: string;
}
}
declare module '@flatfile/api/api/resources/agents/types/Agent' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* @example
* {
* id: "123",
* topics: [Flatfile.EventTopic.FileCreated],
* compiler: Flatfile.Compiler.Js,
* source: "module.exports = { routeEvent: async (...args) => { console.log(args) } }"
* }
*/
export interface Agent extends Flatfile.AgentConfig {
id: Flatfile.AgentId;
}
}
declare module '@flatfile/api/api/resources/agents/types/Compiler' {
/**
* The compiler of the agent
*
* @example
* Flatfile.Compiler.Js
*/
export type Compiler = "js";
export const Compiler: {
readonly Js: "js";
};
}
declare module '@flatfile/api/api/resources/agents/types/GetAgentLogsResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* @example
* {
* pagination: {
* currentPage: 3,
* pageCount: 50,
* totalCount: 100
* },
* data: [{
* eventId: "us_evt_9cuesESa7W9cuesE",
* success: true,
* createdAt: new Date("2022-09-18T00:19:57.007Z"),
* completedAt: new Date("2022-09-18T00:20:04.007Z"),
* log: "SUCCESS"
* }]
* }
*/
export interface GetAgentLogsResponse {
pagination?: Flatfile.Pagination;
data: Flatfile.AgentLog[];
}
}
declare module '@flatfile/api/api/resources/agents/types/AgentLog' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* A log of an agent execution
*
* @example
* {
* eventId: "us_evt_9cuesESa7W9cuesE",
* success: true,
* createdAt: new Date("2022-09-18T00:19:57.007Z"),
* completedAt: new Date("2022-09-18T00:20:04.007Z"),
* log: "SUCCESS"
* }
*/
export interface AgentLog {
eventId: Flatfile.EventId;
/** Whether the agent execution was successful */
success: boolean;
createdAt: Date;
completedAt: Date;
/** The log of the agent execution */
log?: string;
}
}
declare module '@flatfile/api/api/resources/auth/client' {
export * from "@flatfile/api/api/resources/auth/client/requests";
}
declare module '@flatfile/api/api/resources/auth/types/ApiKeysResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface ApiKeysResponse {
data: Flatfile.ApiKey[];
}
}
declare module '@flatfile/api/api/resources/auth/types/ApiKeyType' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export type ApiKeyType = "PUBLISHABLE" | "SECRET";
export const ApiKeyType: {
readonly Publishable: "PUBLISHABLE";
readonly Secret: "SECRET";
};
}
declare module '@flatfile/api/api/resources/auth/types/ApiKeyOperation' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export interface ApiKeyOperation {
path: string;
method: string;
}
}
declare module '@flatfile/api/api/resources/auth/types/ApiKey' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* API Key used for authenticating against our APIs
*/
export interface ApiKey {
id: string;
rawKey: string;
type: Flatfile.ApiKeyType;
environmentId?: Flatfile.EnvironmentId;
accountId?: Flatfile.AccountId;
operations: Flatfile.ApiKeyOperation[];
createdAt: Date;
updatedAt?: Date;
expireAt: Date;
secret?: string;
}
}
declare module '@flatfile/api/api/resources/billing/client' {
export {};
}
declare module '@flatfile/api/api/resources/billing/types/ProductsResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface ProductsResponse {
data: Flatfile.StripeProduct[];
}
}
declare module '@flatfile/api/api/resources/billing/types/CreateCheckoutSessionResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface CreateCheckoutSessionResponse {
data: Flatfile.CheckoutSession;
}
}
declare module '@flatfile/api/api/resources/billing/types/StripeProduct' {
/**
* A product as returned by Stripe
*/
export interface StripeProduct {
id: string;
object: string;
active: boolean;
attributes: string[];
created: number;
defaultPrice: string;
description: string;
images: string[];
livemode: boolean;
metadata?: unknown;
name: string;
packageDimensions: string;
shippable: boolean;
statementDescriptor: string;
taxCode: string;
type: string;
unitLabel: string;
updated: number;
url: string;
}
}
declare module '@flatfile/api/api/resources/billing/types/CheckoutSession' {
/**
* A Checkout Session as returned by Stripe
*/
export interface CheckoutSession {
id?: string;
object?: string;
}
}
declare module '@flatfile/api/api/resources/cells/client' {
export * from "@flatfile/api/api/resources/cells/client/requests";
}
declare module '@flatfile/api/api/resources/cells/types/CellsResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface CellsResponse {
data: Flatfile.CellsResponseData;
}
}
declare module '@flatfile/api/api/resources/cells/types/CellsResponseData' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* Cell values grouped by field key
*/
export type CellsResponseData = Record<string, Flatfile.CellValueWithCounts[]>;
}
declare module '@flatfile/api/api/resources/cells/types/CellValueWithCounts' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface CellValueWithCounts extends Flatfile.CellValue {
counts?: Flatfile.RecordCounts;
}
}
declare module '@flatfile/api/api/resources/commons/types/AgentId' {
/**
* Agent ID
*
* @example
* "us_ag_qGZbKwDW"
*/
export type AgentId = string;
}
declare module '@flatfile/api/api/resources/commons/types/AccountId' {
/**
* Account ID
*
* @example
* "us_acc_uj6s91wc"
*/
export type AccountId = string;
}
declare module '@flatfile/api/api/resources/commons/types/DocumentId' {
/**
* Document ID
*
* @example
* "us_dc_KwDW6cfH"
*/
export type DocumentId = string;
}
declare module '@flatfile/api/api/resources/commons/types/GuestId' {
/**
* Guest ID
*
* @example
* "us_g_5ue7P9cU"
*/
export type GuestId = string;
}
declare module '@flatfile/api/api/resources/commons/types/EnvironmentId' {
/**
* Environment ID
*
* @example
* "us_env_hVXkXs0b"
*/
export type EnvironmentId = string;
}
declare module '@flatfile/api/api/resources/commons/types/FileId' {
/**
* File ID
*
* @example
* "us_fl_qGZbKwDW"
*/
export type FileId = string;
}
declare module '@flatfile/api/api/resources/commons/types/SpaceId' {
/**
* Space ID
*
* @example
* "us_sp_DrdXetPN"
*/
export type SpaceId = string;
}
declare module '@flatfile/api/api/resources/commons/types/WorkbookId' {
/**
* Workbook ID
*
* @example
* "us_wb_qGZbKwDW"
*/
export type WorkbookId = string;
}
declare module '@flatfile/api/api/resources/commons/types/EventId' {
/**
* Event ID
*
* @example
* "us_evt_9cuesESa7W9cuesE"
*/
export type EventId = string;
}
declare module '@flatfile/api/api/resources/commons/types/SheetId' {
/**
* Sheet ID
*
* @example
* "us_sh_fHfzjzHb"
*/
export type SheetId = string;
}
declare module '@flatfile/api/api/resources/commons/types/VersionId' {
/**
* Version ID
*
* @example
* "us_vr_jte4tzVn"
*/
export type VersionId = string;
}
declare module '@flatfile/api/api/resources/commons/types/JobId' {
/**
* Pipeline Job ID
*
* @example
* "us_jb_UQg89Drd"
*/
export type JobId = string;
}
declare module '@flatfile/api/api/resources/commons/types/UserId' {
/**
* User ID
*
* @example
* "us_usr_a7Ws9cue"
*/
export type UserId = string;
}
declare module '@flatfile/api/api/resources/commons/types/SpaceConfigId' {
/**
* Space Config ID
*
* @example
* "us_sc_uj691wck"
*/
export type SpaceConfigId = string;
}
declare module '@flatfile/api/api/resources/commons/types/RecordId' {
/**
* Record ID
*
* @example
* "us_rc_a7W9cuesESa7W9cu"
*/
export type RecordId = string;
}
declare module '@flatfile/api/api/resources/commons/types/Pagination' {
/**
* pagination info
*
* @example
* {
* currentPage: 3,
* pageCount: 50,
* totalCount: 100
* }
*/
export interface Pagination {
/** current page of results */
currentPage: number;
/** total number of pages of results */
pageCount: number;
/** total available results */
totalCount: number;
}
}
declare module '@flatfile/api/api/resources/commons/types/Action' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface Action {
slug?: string;
operation?: string;
mode?: Flatfile.ActionMode;
label: string;
type?: string;
description?: string;
primary?: boolean;
confirm?: boolean;
}
}
declare module '@flatfile/api/api/resources/commons/types/ActionMode' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export type ActionMode = "foreground" | "background";
export const ActionMode: {
readonly Foreground: "foreground";
readonly Background: "background";
};
}
declare module '@flatfile/api/api/resources/commons/types/SortDirection' {
/**
* Sort direction - asc (ascending) or desc (descending)
*
* @example
* Flatfile.SortDirection.Asc
*/
export type SortDirection = "asc" | "desc";
export const SortDirection: {
readonly Asc: "asc";
readonly Desc: "desc";
};
}
declare module '@flatfile/api/api/resources/commons/types/Success' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* Informs whether or not a request was successful
*
* @example
* {
* data: {
* success: true
* }
* }
*/
export interface Success {
data: Flatfile.SuccessData;
}
}
declare module '@flatfile/api/api/resources/commons/types/SuccessData' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export interface SuccessData {
success: boolean;
}
}
declare module '@flatfile/api/api/resources/commons/types/Error_' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export interface Error_ {
key?: string;
message: string;
}
}
declare module '@flatfile/api/api/resources/commons/types/Filter' {
/**
* Options to filter records
*/
export type Filter = "valid" | "error" | "all" | "none";
export const Filter: {
readonly Valid: "valid";
readonly Error: "error";
readonly All: "all";
readonly None: "none";
};
}
declare module '@flatfile/api/api/resources/commons/types/FilterField' {
/**
* Use this to narrow the valid/error filter results to a specific field
*/
export type FilterField = string;
}
declare module '@flatfile/api/api/resources/commons/types/SearchField' {
/**
* Use this to narrow the searchValue results to a specific field
*/
export type SearchField = string;
}
declare module '@flatfile/api/api/resources/commons/types/SearchValue' {
/**
* Search the entire sheet for the given value, returning matching rows
*/
export type SearchValue = string;
}
declare module '@flatfile/api/api/resources/commons/types/SortField' {
/**
* Name of field by which to sort records
*/
export type SortField = string;
}
declare module '@flatfile/api/api/resources/documents/client' {
export {};
}
declare module '@flatfile/api/api/resources/documents/types/ListDocumentsResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface ListDocumentsResponse {
data: Flatfile.Document[];
}
}
declare module '@flatfile/api/api/resources/documents/types/DocumentResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface DocumentResponse {
data: Flatfile.Document;
}
}
declare module '@flatfile/api/api/resources/documents/types/DocumentConfig' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export interface DocumentConfig {
title: string;
body: string;
}
}
declare module '@flatfile/api/api/resources/documents/types/Document' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* A document (markdown components) belong to a space
*/
export interface Document extends Flatfile.DocumentConfig {
id: Flatfile.DocumentId;
spaceId?: Flatfile.SpaceId;
}
}
declare module '@flatfile/api/api/resources/environments/client' {
export * from "@flatfile/api/api/resources/environments/client/requests";
}
declare module '@flatfile/api/api/resources/environments/types/ListEnvironmentsResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface ListEnvironmentsResponse {
data: Flatfile.Environment[];
pagination?: Flatfile.Pagination;
}
}
declare module '@flatfile/api/api/resources/environments/types/EnvironmentResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface EnvironmentResponse {
data: Flatfile.Environment;
}
}
declare module '@flatfile/api/api/resources/environments/types/Environment' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* @example
* {
* name: "dev",
* isProd: false,
* guestAuthentication: [Flatfile.GuestAuthenticationEnum.MagicLink],
* id: "us_env_hVXkXs0b",
* accountId: "us_acc_uj6s91wc"
* }
*/
export interface Environment extends Flatfile.EnvironmentConfig {
id: Flatfile.EnvironmentId;
accountId?: Flatfile.AccountId;
}
}
declare module '@flatfile/api/api/resources/environments/types/EnvironmentConfig' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* Properties used to create a new environment
*
* @example
* {
* name: "dev",
* isProd: false,
* guestAuthentication: [Flatfile.GuestAuthenticationEnum.MagicLink]
* }
*/
export interface EnvironmentConfig {
/** The name of the environment */
name: string;
/** Whether or not the environment is a production environment */
isProd: boolean;
guestAuthentication?: Flatfile.GuestAuthenticationEnum[];
features?: Record<string, unknown>;
}
}
declare module '@flatfile/api/api/resources/environments/types/GuestAuthenticationEnum' {
/**
* The type of authentication to use for guests
*/
export type GuestAuthenticationEnum = "shared_link" | "magic_link";
export const GuestAuthenticationEnum: {
readonly SharedLink: "shared_link";
readonly MagicLink: "magic_link";
};
}
declare module '@flatfile/api/api/resources/events/client' {
export * from "@flatfile/api/api/resources/events/client/requests";
}
declare module '@flatfile/api/api/resources/events/types/ListAllEventsResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface ListAllEventsResponse {
data: Flatfile.Event[];
}
}
declare module '@flatfile/api/api/resources/events/types/EventResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface EventResponse {
data: Flatfile.Event;
}
}
declare module '@flatfile/api/api/resources/events/types/Event' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* Properties used to create a new event
*/
export type Event = Flatfile.Event.SpaceAdded | Flatfile.Event.SpaceRemoved | Flatfile.Event.WorkbookAdded | Flatfile.Event.WorkbookUpdated | Flatfile.Event.WorkbookRemoved | Flatfile.Event.UserAdded | Flatfile.Event.UserRemoved | Flatfile.Event.UserOnline | Flatfile.Event.UserOffline | Flatfile.Event.UploadStarted | Flatfile.Event.UploadFailed | Flatfile.Event.UploadCompleted | Flatfile.Event.JobStarted | Flatfile.Event.JobWaiting | Flatfile.Event.JobUpdated | Flatfile.Event.JobFailed | Flatfile.Event.JobCompleted | Flatfile.Event.JobDeleted | Flatfile.Event.RecordsCreated | Flatfile.Event.RecordsUpdated | Flatfile.Event.RecordsDeleted | Flatfile.Event.SheetValidated | Flatfile.Event.ActionTriggered | Flatfile.Event.FileDeleted | Flatfile.Event.ClientInitialized;
export namespace Event {
interface SpaceAdded extends Flatfile.SpaceAddedEvent {
type: "space:added";
}
interface SpaceRemoved extends Flatfile.SpaceRemovedEvent {
type: "space:removed";
}
interface WorkbookAdded extends Flatfile.WorkbookAddedEvent {
type: "workbook:added";
}
interface WorkbookUpdated extends Flatfile.WorkbookUpdatedEvent {
type: "workbook:updated";
}
interface WorkbookRemoved extends Flatfile.WorkbookRemovedEvent {
type: "workbook:removed";
}
interface UserAdded extends Flatfile.UserAddedEvent {
type: "user:added";
}
interface UserRemoved extends Flatfile.UserRemovedEvent {
type: "user:removed";
}
interface UserOnline extends Flatfile.UserOnlineEvent {
type: "user:online";
}
interface UserOffline extends Flatfile.UserOfflineEvent {
type: "user:offline";
}
interface UploadStarted extends Flatfile.UploadStartedEvent {
type: "upload:started";
}
interface UploadFailed extends Flatfile.UploadFailedEvent {
type: "upload:failed";
}
interface UploadCompleted extends Flatfile.UploadCompletedEvent {
type: "upload:completed";
}
interface JobStarted extends Flatfile.JobStartedEvent {
type: "job:started";
}
interface JobWaiting extends Flatfile.JobWaitingEvent {
type: "job:waiting";
}
interface JobUpdated extends Flatfile.JobUpdatedEvent {
type: "job:updated";
}
interface JobFailed extends Flatfile.JobFailedEvent {
type: "job:failed";
}
interface JobCompleted extends Flatfile.JobCompletedEvent {
type: "job_completed";
}
interface JobDeleted extends Flatfile.JobDeletedEvent {
type: "job:deleted";
}
interface RecordsCreated extends Flatfile.RecordsCreatedEvent {
type: "records:created";
}
interface RecordsUpdated extends Flatfile.RecordsUpdatedEvent {
type: "records:updated";
}
interface RecordsDeleted extends Flatfile.RecordsDeletedEvent {
type: "records:deleted";
}
interface SheetValidated extends Flatfile.SheetValidatedEvent {
type: "sheet:validated";
}
interface ActionTriggered extends Flatfile.ActionTriggeredEvent {
type: "action:triggered";
}
interface FileDeleted extends Flatfile.FileDeletedEvent {
type: "file:deleted";
}
interface ClientInitialized extends Flatfile.ClientInitializedEvent {
type: "client:init";
}
}
}
declare module '@flatfile/api/api/resources/events/types/SpaceAddedEvent' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface SpaceAddedEvent extends Flatfile.BaseEvent {
payload: Record<string, unknown>;
}
}
declare module '@flatfile/api/api/resources/events/types/SpaceRemovedEvent' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface SpaceRemovedEvent extends Flatfile.BaseEvent {
payload: Record<string, unknown>;
}
}
declare module '@flatfile/api/api/resources/events/types/WorkbookAddedEvent' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface WorkbookAddedEvent extends Flatfile.BaseEvent {
payload: Record<string, unknown>;
}
}
declare module '@flatfile/api/api/resources/events/types/WorkbookRemovedEvent' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface WorkbookRemovedEvent extends Flatfile.BaseEvent {
payload: Record<string, unknown>;
}
}
declare module '@flatfile/api/api/resources/events/types/WorkbookUpdatedEvent' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface WorkbookUpdatedEvent extends Flatfile.BaseEvent {
payload: Record<string, unknown>;
}
}
declare module '@flatfile/api/api/resources/events/types/UserAddedEvent' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface UserAddedEvent extends Flatfile.BaseEvent {
payload: Record<string, unknown>;
}
}
declare module '@flatfile/api/api/resources/events/types/UserRemovedEvent' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface UserRemovedEvent extends Flatfile.BaseEvent {
payload: Record<string, unknown>;
}
}
declare module '@flatfile/api/api/resources/events/types/UserOnlineEvent' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface UserOnlineEvent extends Flatfile.BaseEvent {
payload: Record<string, unknown>;
}
}
declare module '@flatfile/api/api/resources/events/types/UserOfflineEvent' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface UserOfflineEvent extends Flatfile.BaseEvent {
payload: Record<string, unknown>;
}
}
declare module '@flatfile/api/api/resources/events/types/UploadStartedEvent' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface UploadStartedEvent extends Flatfile.BaseEvent {
payload: Record<string, unknown>;
}
}
declare module '@flatfile/api/api/resources/events/types/UploadFailedEvent' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface UploadFailedEvent extends Flatfile.BaseEvent {
payload: Record<string, unknown>;
}
}
declare module '@flatfile/api/api/resources/events/types/UploadCompletedEvent' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface UploadCompletedEvent extends Flatfile.BaseEvent {
payload: Record<string, unknown>;
}
}
declare module '@flatfile/api/api/resources/events/types/JobStartedEvent' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface JobStartedEvent extends Flatfile.BaseEvent {
payload: Flatfile.JobPayload;
}
}
declare module '@flatfile/api/api/resources/events/types/JobWaitingEvent' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface JobWaitingEvent extends Flatfile.BaseEvent {
payload: Record<string, unknown>;
}
}
declare module '@flatfile/api/api/resources/events/types/JobUpdatedEvent' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface JobUpdatedEvent extends Flatfile.BaseEvent {
payload: Flatfile.JobPayload;
}
}
declare module '@flatfile/api/api/resources/events/types/JobFailedEvent' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface JobFailedEvent extends Flatfile.BaseEvent {
payload: Flatfile.JobFailedPayload;
}
}
declare module '@flatfile/api/api/resources/events/types/JobCompletedEvent' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface JobCompletedEvent extends Flatfile.BaseEvent {
payload: Flatfile.JobPayload;
}
}
declare module '@flatfile/api/api/resources/events/types/JobDeletedEvent' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface JobDeletedEvent extends Flatfile.BaseEvent {
payload: Record<string, unknown>;
}
}
declare module '@flatfile/api/api/resources/events/types/RecordsCreatedEvent' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface RecordsCreatedEvent extends Flatfile.BaseEvent {
payload: Flatfile.RecordsPayload;
}
}
declare module '@flatfile/api/api/resources/events/types/RecordsUpdatedEvent' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface RecordsUpdatedEvent extends Flatfile.BaseEvent {
payload: Flatfile.RecordsPayload;
}
}
declare module '@flatfile/api/api/resources/events/types/RecordsDeletedEvent' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface RecordsDeletedEvent extends Flatfile.BaseEvent {
payload: Record<string, unknown>;
}
}
declare module '@flatfile/api/api/resources/events/types/SheetValidatedEvent' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface SheetValidatedEvent extends Flatfile.BaseEvent {
payload: Record<string, unknown>;
}
}
declare module '@flatfile/api/api/resources/events/types/ActionTriggeredEvent' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface ActionTriggeredEvent extends Flatfile.BaseEvent {
payload: Record<string, unknown>;
}
}
declare module '@flatfile/api/api/resources/events/types/FileDeletedEvent' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface FileDeletedEvent extends Flatfile.BaseEvent {
payload: Record<string, unknown>;
}
}
declare module '@flatfile/api/api/resources/events/types/ClientInitializedEvent' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface ClientInitializedEvent extends Flatfile.BaseEvent {
payload: Record<string, unknown>;
}
}
declare module '@flatfile/api/api/resources/events/types/RecordsPayload' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export interface RecordsPayload {
count: number;
}
}
declare module '@flatfile/api/api/resources/events/types/JobPayload' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface JobPayload {
type: Flatfile.JobPayloadType;
operation: Flatfile.JobOperationType;
}
}
declare module '@flatfile/api/api/resources/events/types/JobFailedPayload' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface JobFailedPayload extends Flatfile.JobPayload {
err: string;
}
}
declare module '@flatfile/api/api/resources/events/types/JobPayloadType' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export type JobPayloadType = "FILE" | "PIPELINE";
export const JobPayloadType: {
readonly File: "FILE";
readonly Pipeline: "PIPELINE";
};
}
declare module '@flatfile/api/api/resources/events/types/JobOperationType' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export type JobOperationType = "EXTRACT" | "MAP";
export const JobOperationType: {
readonly Extract: "EXTRACT";
readonly Map: "MAP";
};
}
declare module '@flatfile/api/api/resources/events/types/BaseEvent' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface BaseEvent {
/** The domain of the event */
domain: Flatfile.Domain;
topic: Flatfile.EventTopic;
/** The context of the event */
context: Flatfile.Context;
/** The attributes of the event */
attributes?: Flatfile.EventAttributes;
/** The callback url to acknowledge the event */
callbackUrl?: string;
/** The url to retrieve the data associated with the event */
dataUrl?: string;
/** Date the event was created */
createdAt: Date;
/** Date the event was deleted */
deletedAt?: Date;
/** Date the event was acknowledged */
acknowledgedAt?: string;
/** The actor (user or system) who acknowledged the event */
acknowledgedBy?: string;
target?: string;
origin?: Flatfile.Origin;
}
}
declare module '@flatfile/api/api/resources/events/types/EventTopic' {
/**
* The topic of the event
*
* @example
* Flatfile.EventTopic.FileCreated
*/
export type EventTopic = "agent:created" | "agent:updated" | "agent:deleted" | "space:created" | "space:updated" | "space:deleted" | "workbook:created" | "workbook:updated" | "workbook:deleted" | "sheet:created" | "sheet:updated" | "sheet:deleted" | "record:created" | "record:updated" | "record:deleted" | "file:created" | "file:updated" | "file:deleted" | "job:created" | "job:updated" | "job:deleted" | "job:completed" | "job:ready" | "job:scheduled" | "job:outcome_acknowledged" | "job:failed" | "commit:created" | "commit:updated" | "layer:created";
export const EventTopic: {
readonly AgentCreated: "agent:created";
readonly AgentUpdated: "agent:updated";
readonly AgentDeleted: "agent:deleted";
readonly SpaceCreated: "space:created";
readonly SpaceUpdated: "space:updated";
readonly SpaceDeleted: "space:deleted";
readonly WorkbookCreated: "workbook:created";
readonly WorkbookUpdated: "workbook:updated";
readonly WorkbookDeleted: "workbook:deleted";
readonly SheetCreated: "sheet:created";
readonly SheetUpdated: "sheet:updated";
readonly SheetDeleted: "sheet:deleted";
readonly RecordCreated: "record:created";
readonly RecordUpdated: "record:updated";
readonly RecordDeleted: "record:deleted";
readonly FileCreated: "file:created";
readonly FileUpdated: "file:updated";
readonly FileDeleted: "file:deleted";
readonly JobCreated: "job:created";
readonly JobUpdated: "job:updated";
readonly JobDeleted: "job:deleted";
readonly JobCompleted: "job:completed";
readonly JobReady: "job:ready";
readonly JobScheduled: "job:scheduled";
readonly JobOutcomeAcknowledged: "job:outcome_acknowledged";
readonly JobFailed: "job:failed";
readonly CommitCreated: "commit:created";
readonly CommitUpdated: "commit:updated";
readonly LayerCreated: "layer:created";
};
}
declare module '@flatfile/api/api/resources/events/types/Domain' {
/**
* The domain of the event
*
* @example
* Flatfile.Domain.Job
*/
export type Domain = "file" | "space" | "workbook" | "job";
export const Domain: {
readonly File: "file";
readonly Space: "space";
readonly Workbook: "workbook";
readonly Job: "job";
};
}
declare module '@flatfile/api/api/resources/events/types/Context' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* The context of the event
*/
export interface Context {
actionName?: Flatfile.ActionName;
accountId: Flatfile.AccountId;
environmentId: Flatfile.EnvironmentId;
spaceId?: Flatfile.SpaceId;
workbookId?: Flatfile.WorkbookId;
sheetId?: Flatfile.SheetId;
sheetSlug?: Flatfile.SheetSlug;
versionId?: Flatfile.VersionId;
jobId?: Flatfile.JobId;
fileId?: Flatfile.FileId;
precedingEventId?: Flatfile.EventId;
/** Can be a UserId, GuestId, or AgentId */
actorId?: string;
}
}
declare module '@flatfile/api/api/resources/events/types/ActionName' {
/**
* Name of an action
*/
export type ActionName = string;
}
declare module '@flatfile/api/api/resources/events/types/Progress' {
/**
* The progress of the event within a collection of iterable events
*/
export interface Progress {
/** The current progress of the event */
current?: number;
/** The total number of events in this group */
total?: number;
/** The percent complete of the event group */
percent?: number;
}
}
declare module '@flatfile/api/api/resources/events/types/EventAttributes' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* The attributes of the event
*/
export interface EventAttributes {
/** Date the related entity was last updated */
targetUpdatedAt?: Date;
/** The progress of the event within a collection of iterable events */
progress?: Flatfile.Progress;
}
}
declare module '@flatfile/api/api/resources/events/types/SheetSlug' {
/**
* Sheet Slug
*/
export type SheetSlug = string;
}
declare module '@flatfile/api/api/resources/events/types/Origin' {
/**
* The origin resource of the event
*/
export interface Origin {
id?: string;
slug?: string;
}
}
declare module '@flatfile/api/api/resources/files/client' {
export * from "@flatfile/api/api/resources/files/client/requests";
}
declare module '@flatfile/api/api/resources/files/types/ListFilesResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface ListFilesResponse {
pagination?: Flatfile.Pagination;
data: Flatfile.File_[];
}
}
declare module '@flatfile/api/api/resources/files/types/FileResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface FileResponse {
data: Flatfile.File_;
}
}
declare module '@flatfile/api/api/resources/files/types/File_' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* Any uploaded file of any type
*/
export interface File_ {
id: Flatfile.FileId;
/** Original filename */
name: string;
/** Extension of the file */
ext: string;
/** MIME Type of the file */
mimetype: string;
/** Text encoding of the file */
encoding: string;
/** Status of the file */
status: Flatfile.ModelFileStatusEnum;
/** Size of file in bytes */
size: number;
/** Number of bytes that have been uploaded so far (useful for progress tracking) */
bytesReceived: number;
/** Date the file was created */
createdAt: string;
/** Date the file was last updated */
updatedAt: string;
spaceId: Flatfile.SpaceId;
workbookId?: Flatfile.WorkbookId;
sheetId?: Flatfile.SheetId;
actions?: Flatfile.Action[];
}
}
declare module '@flatfile/api/api/resources/files/types/ModelFileStatusEnum' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export type ModelFileStatusEnum = "partial" | "complete" | "archived" | "purged" | "failed";
export const ModelFileStatusEnum: {
readonly Partial: "partial";
readonly Complete: "complete";
readonly Archived: "archived";
readonly Purged: "purged";
readonly Failed: "failed";
};
}
declare module '@flatfile/api/api/resources/files/types/Mode' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export type Mode = "import" | "export";
export const Mode: {
readonly Import: "import";
readonly Export: "export";
};
}
declare module '@flatfile/api/api/resources/guests/client' {
export * from "@flatfile/api/api/resources/guests/client/requests";
}
declare module '@flatfile/api/api/resources/guests/types/ListGuestsResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface ListGuestsResponse {
data: Flatfile.Guest[];
}
}
declare module '@flatfile/api/api/resources/guests/types/CreateGuestResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface CreateGuestResponse {
data: Flatfile.Guest[];
}
}
declare module '@flatfile/api/api/resources/guests/types/Guest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface Guest extends Flatfile.GuestConfig {
id: Flatfile.GuestId;
/** Date the guest object was created */
createdAt: Date;
/** Date the guest object was last updated */
updatedAt: Date;
}
}
declare module '@flatfile/api/api/resources/guests/types/GuestConfig' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* Configurations for the guests
*/
export interface GuestConfig {
environmentId: Flatfile.EnvironmentId;
email: string;
name: string;
spaces: Flatfile.GuestSpace[];
workbooks?: Flatfile.GuestWorkbook[];
}
}
declare module '@flatfile/api/api/resources/guests/types/GuestWorkbook' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface GuestWorkbook {
id: Flatfile.WorkbookId;
}
}
declare module '@flatfile/api/api/resources/guests/types/GuestSpace' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface GuestSpace {
id: Flatfile.SpaceId;
lastAccessed?: Date;
}
}
declare module '@flatfile/api/api/resources/guests/types/Invite' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface Invite {
guestId: Flatfile.GuestId;
spaceId: Flatfile.SpaceId;
/** Message to send with the invite */
message: string;
}
}
declare module '@flatfile/api/api/resources/jobs/client' {
export * from "@flatfile/api/api/resources/jobs/client/requests";
}
declare module '@flatfile/api/api/resources/jobs/types/ListJobsResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface ListJobsResponse {
pagination?: Flatfile.Pagination;
data: Flatfile.Job[];
}
}
declare module '@flatfile/api/api/resources/jobs/types/JobResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface JobResponse {
data: Flatfile.Job;
}
}
declare module '@flatfile/api/api/resources/jobs/types/Job' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* A single unit of work that will execute asynchronously
*/
export interface Job extends Flatfile.JobConfig {
id: Flatfile.JobId;
/** Date the item was created */
createdAt: Date;
/** Date the item was last updated */
updatedAt: Date;
/** the time that the job started at */
startedAt?: Date;
/** the time that the job finished at */
finishedAt?: Date;
/** the time that the job's outcome has been acknowledged by a user */
outcomeAcknowledgedAt?: Date;
}
}
declare module '@flatfile/api/api/resources/jobs/types/JobConfig' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* A single unit of work that a pipeline will execute
*/
export interface JobConfig {
/** The type of job */
type: Flatfile.JobType;
/** the type of operation to perform on the data. For example, "export". */
operation: string;
source: Flatfile.JobSource;
destination?: Flatfile.JobDestination;
config?: Flatfile.JobUpdateConfig;
/** the type of trigger to use for this job */
trigger?: Flatfile.Trigger;
/** the status of the job */
status?: Flatfile.JobStatus;
/** the progress of the job */
progress?: number;
fileId?: Flatfile.FileId;
/** the mode of the job */
mode?: Flatfile.JobMode;
/** Input parameters for this job type. */
input?: Record<string, unknown>;
/** Outcome summary of job. */
outcome?: Record<string, unknown>;
/** Current status of job in text */
info?: string;
/** Indicates if Flatfile is managing the control flow of this job or if it is being manually tracked. */
managed: boolean;
}
}
declare module '@flatfile/api/api/resources/jobs/types/JobUpdate' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* A single unit of work that will be executed
*/
export interface JobUpdate {
config?: Flatfile.JobUpdateConfig;
/** the status of the job */
status?: Flatfile.JobStatus;
/** the progress of the job */
progress?: number;
/** the time that the job's outcome has been acknowledged by a user */
outcomeAcknowledgedAt?: Date;
}
}
declare module '@flatfile/api/api/resources/jobs/types/JobUpdateConfig' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export type JobUpdateConfig = Flatfile.DeleteJobConfig | Flatfile.FileJobConfig | Flatfile.PipelineJobConfig | Flatfile.ExportJobConfig | Flatfile.MutateJobConfig | Flatfile.AiAssistJobConfig | Flatfile.FindAndReplaceJobConfig | Flatfile.EmptyObject;
}
declare module '@flatfile/api/api/resources/jobs/types/JobSource' {
/**
* The id of a file, workbook, or sheet
*/
export type JobSource = string;
}
declare module '@flatfile/api/api/resources/jobs/types/JobDestination' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* The id of the workbook where extracted file data will be sent
*/
export type JobDestination = Flatfile.WorkbookId;
}
declare module '@flatfile/api/api/resources/jobs/types/DeleteJobConfig' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* The configuration for a delete job
*/
export interface DeleteJobConfig {
filter?: Flatfile.Filter;
filterField?: Flatfile.FilterField;
searchValue?: Flatfile.SearchValue;
searchField?: Flatfile.SearchField;
sheet: Flatfile.SheetId;
exceptions?: Flatfile.RecordId[];
}
}
declare module '@flatfile/api/api/resources/jobs/types/FileJobConfig' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface FileJobConfig {
/** The driver to use for extracting data from the file */
driver: Flatfile.Driver;
}
}
declare module '@flatfile/api/api/resources/jobs/types/MutateJobConfig' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface MutateJobConfig {
sheetId: Flatfile.SheetId;
/** A JavaScript function that will be run on each record in the sheet, it should return a mutated record. */
mutateRecord: string;
/** If the mutation was generated through some sort of id-ed process, this links this job and that process. */
mutationId?: string;
}
}
declare module '@flatfile/api/api/resources/jobs/types/AiAssistJobConfig' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export interface AiAssistJobConfig {
model: string;
command: string;
modelParams?: Record<string, unknown>;
/** This will be generated by the AI not by you. */
mutateRecord?: string;
/** This will be generated by the AI not by you. */
metadata?: Record<string, unknown>;
}
}
declare module '@flatfile/api/api/resources/jobs/types/Driver' {
/**
* The driver to use for extracting data from the file
*/
export type Driver = "csv";
export const Driver: {
readonly Csv: "csv";
};
}
declare module '@flatfile/api/api/resources/jobs/types/Trigger' {
/**
* the type of trigger to use for this job
*/
export type Trigger = "manual" | "immediate";
export const Trigger: {
readonly Manual: "manual";
readonly Immediate: "immediate";
};
}
declare module '@flatfile/api/api/resources/jobs/types/PipelineJobConfig' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface PipelineJobConfig {
sourceSheetId: Flatfile.SheetId;
destinationSheetId: Flatfile.SheetId;
}
}
declare module '@flatfile/api/api/resources/jobs/types/JobType' {
/**
* The type of job
*/
export type JobType = "file" | "workbook" | "sheet";
export const JobType: {
readonly File: "file";
readonly Workbook: "workbook";
readonly Sheet: "sheet";
};
}
declare module '@flatfile/api/api/resources/jobs/types/JobStatus' {
/**
* the status of the job
*/
export type JobStatus = "planning" | "ready" | "executing" | "complete" | "failed";
export const JobStatus: {
readonly Planning: "planning";
readonly Ready: "ready";
readonly Executing: "executing";
readonly Complete: "complete";
readonly Failed: "failed";
};
}
declare module '@flatfile/api/api/resources/jobs/types/JobMode' {
/**
* the mode of the job
*/
export type JobMode = "foreground" | "background";
export const JobMode: {
readonly Foreground: "foreground";
readonly Background: "background";
};
}
declare module '@flatfile/api/api/resources/jobs/types/JobPlan' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* The job/plan tuple that contains the full plan and the jobs status
*/
export interface JobPlan {
job?: Flatfile.Job;
plan?: Flatfile.JobExecutionPlan;
}
}
declare module '@flatfile/api/api/resources/jobs/types/JobExecutionPlanConfig' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface JobExecutionPlanConfig extends Flatfile.JobExecutionPlan {
fileId: Flatfile.FileId;
jobId: Flatfile.JobId;
}
}
declare module '@flatfile/api/api/resources/jobs/types/JobAckDetails' {
/**
* Details about the user who acknowledged the job
*/
export interface JobAckDetails {
info?: string;
progress?: number;
}
}
declare module '@flatfile/api/api/resources/jobs/types/JobOutcome' {
/**
* Outcome summary of a job
*/
export interface JobOutcome {
outcome?: Record<string, unknown>;
info?: string;
}
}
declare module '@flatfile/api/api/resources/jobs/types/JobExecutionPlan' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* The execution plan for a job, for example, for a map job, the execution plan is the mapping of the source sheet to the destination sheet.
*/
export interface JobExecutionPlan {
fieldMapping?: Flatfile.Edge[];
unmappedSourceFields?: Flatfile.SourceField[];
unmappedDestinationFields?: Flatfile.DestinationField[];
/** The number of rows to skip before reading data from the document */
headerRowCount?: number;
}
}
declare module '@flatfile/api/api/resources/jobs/types/Edge' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface Edge {
sourceField: Flatfile.Property;
destinationField: Flatfile.Property;
preview?: string[];
/** Only available if one or more of the destination fields is of type enum. Provides category mapping. */
enumDetails?: Flatfile.EnumDetails;
metadata?: Flatfile.Metadata;
}
}
declare module '@flatfile/api/api/resources/jobs/types/SourceField' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface SourceField {
sourceField: Flatfile.Property;
preview?: string[];
}
}
declare module '@flatfile/api/api/resources/jobs/types/DestinationField' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface DestinationField {
/** Only available if one or more of the destination fields is of type enum. Provides category mapping. */
enumDetails?: Flatfile.EnumDetails;
destinationField: Flatfile.Property;
preview?: string[];
}
}
declare module '@flatfile/api/api/resources/jobs/types/EnumDetails' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* Only available if one or more of the destination fields is of type enum. Provides category mapping.
*/
export interface EnumDetails {
mapping?: Flatfile.CategoryMapping[];
unusedSourceValues?: string[];
unusedDestinationValues?: string[];
}
}
declare module '@flatfile/api/api/resources/jobs/types/Metadata' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface Metadata {
certainty?: Flatfile.Certainty;
source?: string;
}
}
declare module '@flatfile/api/api/resources/jobs/types/Certainty' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export type Certainty = "absolute" | "strong" | "moderate" | "weak";
export const Certainty: {
readonly Absolute: "absolute";
readonly Strong: "strong";
readonly Moderate: "moderate";
readonly Weak: "weak";
};
}
declare module '@flatfile/api/api/resources/jobs/types/CategoryMapping' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export interface CategoryMapping {
sourceValue?: string;
destinationValue?: string;
}
}
declare module '@flatfile/api/api/resources/jobs/types/FindAndReplaceJobConfig' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface FindAndReplaceJobConfig {
filter?: Flatfile.Filter;
filterField?: Flatfile.FilterField;
searchValue?: Flatfile.SearchValue;
searchField?: Flatfile.SearchField;
/**
* 'A list of record ids to search within. If filter "all" is also specified, then this is a list of record ids to exclude from the search.'
*
*/
ids?: Flatfile.RecordId[];
/** A value to find for a given field in a sheet. Wrap the value in "" for exact match */
find?: Flatfile.CellValueUnion;
/** The value to replace found values with */
replace?: Flatfile.CellValueUnion;
/** The value to replace found values with */
fieldKey: string;
}
}
declare module '@flatfile/api/api/resources/jobs/types/ExportJobConfig' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface ExportJobConfig {
options: Flatfile.ExportOptions;
}
}
declare module '@flatfile/api/api/resources/jobs/types/ExportOptions' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface ExportOptions {
versionId?: Flatfile.VersionId;
sortField?: Flatfile.SortField;
sortDirection?: Flatfile.SortDirection;
filter?: Flatfile.Filter;
filterField?: Flatfile.FilterField;
searchValue?: Flatfile.SearchValue;
searchField?: Flatfile.SearchField;
/**
* 'A list of record ids to export. If filter is also specified, then this is a list of record ids to exclude from the download.'
*
*/
ids: Flatfile.RecordId[];
}
}
declare module '@flatfile/api/api/resources/jobs/types/EmptyObject' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export interface EmptyObject {
}
}
declare module '@flatfile/api/api/resources/property/types/Property' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* @example
* {
* type: "string",
* key: "code",
* label: "Product Code",
* description: "Unique identifier defining an individual product.",
* constraints: [{
* type: "unique",
* config: {
* caseSensitive: false
* }
* }],
* config: {
* size: Flatfile.StringConfigOptions.Tiny
* }
* }
*
* @example
* {
* type: "number",
* key: "price",
* config: {
* decimalPlaces: 2
* }
* }
*
* @example
* {
* type: "boolean",
* key: "editable",
* config: {
* allowIndeterminate: true
* }
* }
*
* @example
* {
* type: "date"
* }
*
* @example
* {
* type: "enum",
* key: "category",
* label: "Product Category",
* isArray: false,
* multi: true,
* config: {
* allowCustom: false,
* options: [{
* value: 9,
* label: "Kitchenware",
* icon: "pots-and-pans",
* color: "#f00000",
* meta: {
* "product_code_prefix": "KI-"
* }
* }, {
* value: 9,
* label: "Clothing",
* meta: {
* "product_code_prefix": "CL-"
* }
* }]
* }
* }
*
* @example
* {
* type: "reference",
* key: "user reference",
* config: {
* ref: "/sheet/users/3",
* relationship: Flatfile.ReferencePropertyRelationship.HasMany,
* key: "id"
* }
* }
*/
export type Property = Flatfile.Property.String | Flatfile.Property.Number | Flatfile.Property.Boolean | Flatfile.Property.Date_ | Flatfile.Property.Enum | Flatfile.Property.Reference;
export namespace Property {
interface String extends Flatfile.StringProperty {
type: "string";
}
interface Number extends Flatfile.NumberProperty {
type: "number";
}
interface Boolean extends Flatfile.BooleanProperty {
type: "boolean";
}
interface Date_ extends Flatfile.DateProperty {
type: "date";
}
interface Enum extends Flatfile.EnumProperty {
type: "enum";
}
interface Reference extends Flatfile.ReferenceProperty {
type: "reference";
}
}
}
declare module '@flatfile/api/api/resources/property/types/BaseProperty' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface BaseProperty {
key: string;
/** User friendly field name */
label?: string;
description?: string;
constraints?: Flatfile.Constraint[];
readonly?: boolean;
/** Useful for any contextual metadata regarding the schema. Store any valid json here. */
metadata?: unknown;
}
}
declare module '@flatfile/api/api/resources/property/types/ArrayableProperty' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export interface ArrayableProperty {
/** Will allow multiple values and store as an array */
isArray?: boolean;
}
}
declare module '@flatfile/api/api/resources/property/types/StringProperty' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* Defines a property that should be stored and read as a basic string. Database engines should expect any length of text to be provided here unless explicitly defined in the config.
*/
export interface StringProperty extends Flatfile.BaseProperty {
config?: Flatfile.StringConfig;
}
}
declare module '@flatfile/api/api/resources/property/types/NumberProperty' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* Defines a property that should be stored and read as either an integer or floating point number. Database engines should look at the configuration to determine ideal storage format.
*/
export interface NumberProperty extends Flatfile.BaseProperty, Flatfile.ArrayableProperty {
config?: Flatfile.NumberConfig;
}
}
declare module '@flatfile/api/api/resources/property/types/NumberConfig' {
/**
* @example
* {
* decimalPlaces: 2
* }
*/
export interface NumberConfig {
/** Number of decimal places to round data to */
decimalPlaces: number;
}
}
declare module '@flatfile/api/api/resources/property/types/BooleanProperty' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* A `true` or `false` value type. Matching engines should attempt to resolve all common ways of representing this value and it should usually be displayed as a checkbox.
*/
export interface BooleanProperty extends Flatfile.BaseProperty {
config?: Flatfile.BooleanPropertyConfig;
}
}
declare module '@flatfile/api/api/resources/property/types/BooleanPropertyConfig' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export interface BooleanPropertyConfig {
/** Allow a neither true or false state to be stored as `null` */
allowIndeterminate: boolean;
}
}
declare module '@flatfile/api/api/resources/property/types/DateProperty' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* Store a field as a GMT date. Data hooks must convert this value into a `YYYY-MM-DD` format in order for it to be considered a valid value. Datetime should be a separate and future supported value as it must consider timezone.
*/
export interface DateProperty extends Flatfile.BaseProperty {
}
}
declare module '@flatfile/api/api/resources/property/types/EnumProperty' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* Defines an enumerated list of options for the user to select from. Matching tooling attempts to resolve incoming data assigment to a valid option. The maximum number of options for this list is `100`. For larger lists, users should use the reference or future `lookup` types.
*/
export interface EnumProperty extends Flatfile.BaseProperty, Flatfile.ArrayableProperty {
/** Will allow multiple values and store / provide the values in an array if set. Not all field types support arrays. */
multi?: boolean;
config: Flatfile.EnumPropertyConfig;
}
}
declare module '@flatfile/api/api/resources/property/types/EnumPropertyConfig' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface EnumPropertyConfig {
/** Permit the user to create new options for this specific field. */
allowCustom?: boolean;
options: Flatfile.EnumPropertyOption[];
}
}
declare module '@flatfile/api/api/resources/property/types/EnumPropertyOption' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export interface EnumPropertyOption {
/** A visual label for this option, defaults to value if not provided */
label?: string;
/** An optional color to assign this option */
color?: string;
/** A reference pointer to a previously registered icon */
icon?: string;
/** An arbitrary JSON object to be associated with this option and made available to hooks */
meta?: Record<string, unknown>;
/** The value or ID of this option. This value will be sent in egress. The type is a string | integer | boolean. */
value?: unknown;
}
}
declare module '@flatfile/api/api/resources/property/types/ReferenceProperty' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* Defines a reference to another sheet. Links should be established automatically by the matching engine or similar upon an evaluation of unique or similar columns between datasets.
*/
export interface ReferenceProperty extends Flatfile.BaseProperty, Flatfile.ArrayableProperty {
config: Flatfile.ReferencePropertyConfig;
}
}
declare module '@flatfile/api/api/resources/property/types/ReferencePropertyConfig' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface ReferencePropertyConfig {
/** Full path reference to a sheet configuration. Must be in the same workbook. */
ref: string;
/** Key of the property to use as the reference key. Defaults to `id` */
key: string;
/** The type of relationship this defines */
relationship: Flatfile.ReferencePropertyRelationship;
}
}
declare module '@flatfile/api/api/resources/property/types/ReferencePropertyRelationship' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export type ReferencePropertyRelationship = "has-one" | "has-many";
export const ReferencePropertyRelationship: {
readonly HasOne: "has-one";
readonly HasMany: "has-many";
};
}
declare module '@flatfile/api/api/resources/property/types/Constraint' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export type Constraint = Flatfile.Constraint.Required | Flatfile.Constraint.Unique | Flatfile.Constraint.Computed;
export namespace Constraint {
interface Required {
type: "required";
}
interface Unique extends Flatfile.UniqueConstraint {
type: "unique";
}
interface Computed {
type: "computed";
}
}
}
declare module '@flatfile/api/api/resources/property/types/UniqueConstraint' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface UniqueConstraint {
config?: Flatfile.UniqueConstraintConfig;
}
}
declare module '@flatfile/api/api/resources/property/types/UniqueConstraintConfig' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export interface UniqueConstraintConfig {
/** Ignore casing when determining uniqueness */
caseSensitive?: boolean;
/** Do not flag empty values as duplicate */
ignoreEmpty?: boolean;
}
}
declare module '@flatfile/api/api/resources/property/types/StringConfig' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface StringConfig {
size: Flatfile.StringConfigOptions;
}
}
declare module '@flatfile/api/api/resources/property/types/StringConfigOptions' {
/**
* How much text should be storeable in this field
*/
export type StringConfigOptions =
}
declare module '@flatfile/api/api/resources/records/client' {
export * from "@flatfile/api/api/resources/records/client/requests";
}
declare module '@flatfile/api/api/resources/records/types/RecordsResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface RecordsResponse {
data: Flatfile.RecordsResponseData;
}
}
declare module '@flatfile/api/api/resources/records/types/RecordsResponseData' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* A list of records with optional record counts
*/
export interface RecordsResponseData extends Flatfile.Success {
records?: Flatfile.RecordsWithLinks;
counts?: Flatfile.RecordCounts;
versionId?: Flatfile.VersionId;
}
}
declare module '@flatfile/api/api/resources/records/types/RecordCounts' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export interface RecordCounts {
total: number;
valid: number;
error: number;
errorsByField?: Record<string, number>;
}
}
declare module '@flatfile/api/api/resources/records/types/RecordsWithLinks' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* List of Record objects, including links to related rows
*/
export type RecordsWithLinks = Flatfile.RecordWithLinks[];
}
declare module '@flatfile/api/api/resources/records/types/RecordWithLinks' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* A single row of data in a Sheet, including links to related rows
*/
export interface RecordWithLinks {
id: Flatfile.RecordId;
values: Flatfile.RecordDataWithLinks;
valid?: boolean;
messages?: Flatfile.ValidationMessage[];
metadata?: Record<string, unknown>;
}
}
declare module '@flatfile/api/api/resources/records/types/RecordDataWithLinks' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* A single row of data in a Sheet, including links to related rows
*/
export type RecordDataWithLinks = Record<string, Flatfile.CellValueWithLinks>;
}
declare module '@flatfile/api/api/resources/records/types/CellValueWithLinks' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface CellValueWithLinks extends Flatfile.CellValue {
links?: Flatfile.Records;
}
}
declare module '@flatfile/api/api/resources/records/types/Records' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* List of Record objects
*/
export type Records = Flatfile.Record_[];
}
declare module '@flatfile/api/api/resources/records/types/Record_' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* A single row of data in a Sheet
*/
export interface Record_ {
id: Flatfile.RecordId;
values: Flatfile.RecordData;
valid?: boolean;
messages?: Flatfile.ValidationMessage[];
metadata?: Record<string, unknown>;
}
}
declare module '@flatfile/api/api/resources/records/types/RecordData' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* A single row of data in a Sheet
*/
export type RecordData = Record<string, Flatfile.CellValue>;
}
declare module '@flatfile/api/api/resources/records/types/CellValue' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface CellValue {
valid?: boolean;
messages?: Flatfile.ValidationMessage[];
value?: Flatfile.CellValueUnion;
updatedAt?: Date;
}
}
declare module '@flatfile/api/api/resources/records/types/CellValueUnion' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export type CellValueUnion = string | number | boolean;
}
declare module '@flatfile/api/api/resources/records/types/ValidationMessage' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* Record data validation messages
*/
export interface ValidationMessage {
type?: Flatfile.ValidationType;
source?: Flatfile.ValidationSource;
message?: string;
}
}
declare module '@flatfile/api/api/resources/records/types/ValidationType' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export type ValidationType = "error" | "warn" | "info";
export const ValidationType: {
readonly Error: "error";
readonly Warn: "warn";
readonly Info: "info";
};
}
declare module '@flatfile/api/api/resources/records/types/ValidationSource' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export type ValidationSource = "required-constraint" | "unique-constraint" | "custom-logic" | "unlinked" | "invalid-option";
export const ValidationSource: {
readonly RequiredConstraint: "required-constraint";
readonly UniqueConstraint: "unique-constraint";
readonly CustomLogic: "custom-logic";
readonly Unlinked: "unlinked";
readonly InvalidOption: "invalid-option";
};
}
declare module '@flatfile/api/api/resources/sheets/client' {
export * from "@flatfile/api/api/resources/sheets/client/requests";
}
declare module '@flatfile/api/api/resources/sheets/types/ListSheetsResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface ListSheetsResponse {
data: Flatfile.Sheet[];
}
}
declare module '@flatfile/api/api/resources/sheets/types/SheetResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface SheetResponse {
data: Flatfile.Sheet;
}
}
declare module '@flatfile/api/api/resources/sheets/types/Sheet' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* A place to store tabular data
*/
export interface Sheet {
id: Flatfile.SheetId;
workbookId: Flatfile.WorkbookId;
name: string;
config?: Flatfile.SheetConfig;
countRecords?: Flatfile.RecordCounts;
}
}
declare module '@flatfile/api/api/resources/sheets/types/SheetConfig' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* Describes shape of data as well as behavior
*/
export interface SheetConfig {
name: string;
description?: string;
slug?: string;
readonly?: boolean;
access?: Flatfile.SheetAccess[];
fields: Flatfile.Property[];
actions?: Flatfile.Action[];
}
}
declare module '@flatfile/api/api/resources/sheets/types/RecordCountsResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface RecordCountsResponse {
data: Flatfile.RecordCountsResponseData;
}
}
declare module '@flatfile/api/api/resources/sheets/types/RecordCountsResponseData' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface RecordCountsResponseData extends Flatfile.Success {
counts?: Flatfile.RecordCounts;
}
}
declare module '@flatfile/api/api/resources/sheets/types/SheetAccess' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export type SheetAccess = "*" | "add" | "edit" | "delete" | "import";
export const SheetAccess: {
readonly All: "*";
readonly Add: "add";
readonly Edit: "edit";
readonly Delete: "delete";
readonly Import: "import";
};
}
declare module '@flatfile/api/api/resources/users/client' {
export * from "@flatfile/api/api/resources/users/client/requests";
}
declare module '@flatfile/api/api/resources/users/types/ListUsersResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface ListUsersResponse {
data: Flatfile.User[];
}
}
declare module '@flatfile/api/api/resources/users/types/UserResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface UserResponse {
data: Flatfile.User;
}
}
declare module '@flatfile/api/api/resources/users/types/User' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* Configurations for the user
*/
export interface User extends Flatfile.UserConfig {
id: Flatfile.UserId;
}
}
declare module '@flatfile/api/api/resources/users/types/UserConfig' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* Properties used to create a new user
*/
export interface UserConfig {
email: string;
name: string;
accountId: Flatfile.AccountId;
}
}
declare module '@flatfile/api/api/resources/users/types/ListApiTokensResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* List of api tokens without secrets
*/
export interface ListApiTokensResponse {
pagination?: Flatfile.Pagination;
data: Flatfile.ApiToken[];
}
}
declare module '@flatfile/api/api/resources/users/types/ApiToken' {
/**
* Client id and secret used for authenticating against our APIs
*/
export interface ApiToken {
clientId: string;
description: string;
metadata: Record<string, unknown>;
createdAt: Date;
secret?: string;
}
}
declare module '@flatfile/api/api/resources/users/types/ExchangeTokenResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface ExchangeTokenResponse {
data: Flatfile.ExchangeTokenData;
}
}
declare module '@flatfile/api/api/resources/users/types/ExchangeTokenData' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export interface ExchangeTokenData {
/** Whether the provided token was valid */
valid: boolean;
/** The refreshed token, if the provided token was valid */
token?: string;
/** The email address the recovery email was sent to, if the provided token was not valid */
sentTo?: string;
}
}
declare module '@flatfile/api/api/resources/versions/client' {
export * from "@flatfile/api/api/resources/versions/client/requests";
}
declare module '@flatfile/api/api/resources/versions/types/VersionResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface VersionResponse {
versionId: Flatfile.VersionId;
}
}
declare module '@flatfile/api/api/resources/workbooks/client' {
export * from "@flatfile/api/api/resources/workbooks/client/requests";
}
declare module '@flatfile/api/api/resources/workbooks/types/ListWorkbooksResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface ListWorkbooksResponse {
data: Flatfile.Workbook[];
}
}
declare module '@flatfile/api/api/resources/workbooks/types/WorkbookResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface WorkbookResponse {
data: Flatfile.Workbook;
}
}
declare module '@flatfile/api/api/resources/workbooks/types/Workbook' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* A collection of one or more sheets
*/
export interface Workbook {
id: Flatfile.WorkbookId;
name?: string;
spaceId: Flatfile.SpaceId;
environmentId?: Flatfile.EnvironmentId;
sheets?: Flatfile.Sheet[];
labels?: string[];
actions?: Flatfile.Action[];
/** Date the workbook was last updated */
updatedAt: Date;
/** Date the workbook was created */
createdAt: Date;
}
}
declare module '@flatfile/api/api/resources/workbooks/types/CreateWorkbookConfig' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* Properties used to create a new Workbook
*/
export interface CreateWorkbookConfig {
name: string;
labels?: string[];
spaceId?: Flatfile.SpaceId;
environmentId?: Flatfile.EnvironmentId;
/** Sheets must be <= 50 */
sheets?: Flatfile.SheetConfig[];
actions?: Flatfile.Action[];
}
}
declare module '@flatfile/api/api/resources/workbooks/types/UpdateWorkbookConfig' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* Properties used to create a new Workbook
*/
export interface UpdateWorkbookConfig {
name?: string;
labels?: string[];
spaceId?: Flatfile.SpaceId;
environmentId?: Flatfile.EnvironmentId;
/** Sheets must be <= 50 */
sheets?: Flatfile.SheetConfig[];
actions?: Flatfile.Action[];
}
}
declare module '@flatfile/api/api/resources/commons/errors/BadRequestError' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as errors from "@flatfile/api/errors";
import * as Flatfile from "@flatfile/api/api";
export class BadRequestError extends errors.FlatfileError {
constructor(body: Flatfile.Error_[]);
}
}
declare module '@flatfile/api/api/resources/commons/errors/NotFoundError' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as errors from "@flatfile/api/errors";
import * as Flatfile from "@flatfile/api/api";
export class NotFoundError extends errors.FlatfileError {
constructor(body: Flatfile.Error_[]);
}
}
declare module '@flatfile/api/api/resources/agents/client/requests/ListAgentsRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface ListAgentsRequest {
environmentId: Flatfile.EnvironmentId;
}
}
declare module '@flatfile/api/api/resources/agents/client/requests/CreateAgentsRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface CreateAgentsRequest {
environmentId: Flatfile.EnvironmentId;
body: Flatfile.AgentConfig;
}
}
declare module '@flatfile/api/api/resources/agents/client/requests/GetAgentRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface GetAgentRequest {
environmentId: Flatfile.EnvironmentId;
}
}
declare module '@flatfile/api/api/resources/agents/client/requests/GetAgentLogsRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface GetAgentLogsRequest {
environmentId: Flatfile.EnvironmentId;
}
}
declare module '@flatfile/api/api/resources/agents/client/requests/GetEnvironmentAgentLogsRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface GetEnvironmentAgentLogsRequest {
environmentId: Flatfile.EnvironmentId;
/**
* Number of logs to return in a page (default 20)
*/
pageSize?: number;
/**
* Based on pageSize, which page of records to return
*/
pageNumber?: number;
}
}
declare module '@flatfile/api/api/resources/agents/client/requests/DeleteAgentRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface DeleteAgentRequest {
environmentId: Flatfile.EnvironmentId;
body: Flatfile.AgentConfig;
}
}
declare module '@flatfile/api/api/resources/auth/client/requests/GetApiKeysRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface GetApiKeysRequest {
/**
* ID of environment to search
*/
environmentId: Flatfile.EnvironmentId;
}
}
declare module '@flatfile/api/api/resources/cells/client/requests/GetFieldValuesRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface GetFieldValuesRequest {
/**
* Returns results from the given field only. Otherwise all field cells are returned
*
*/
fieldKey: string;
sortField?: Flatfile.SortField;
sortDirection?: Flatfile.SortDirection;
/**
* Options to filter records
*/
filter?: Flatfile.Filter;
/**
* Name of field by which to filter records
*/
filterField?: string;
/**
* Number of records to return in a page (default 1000 if pageNumber included)
*/
pageSize?: number;
/**
* Based on pageSize, which page of records to return
*/
pageNumber?: number;
/**
* When true, excludes duplicate values
*/
distinct?: boolean;
/**
* When both distinct and includeCounts are true, the count of distinct field values will be returned
*/
includeCounts?: boolean;
/**
* A value to find for a given field in a sheet. Wrap the value in "" for exact match
*/
searchValue?: string;
}
}
declare module '@flatfile/api/api/resources/environments/client/requests/ListEnvironmentsRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export interface ListEnvironmentsRequest {
/**
* Number of environments to return in a page (default 10)
*/
pageSize?: number;
/**
* Based on pageSize, which page of environments to return
*/
pageNumber?: number;
}
}
declare module '@flatfile/api/api/resources/events/client/requests/ListEventsRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface ListEventsRequest {
environmentId: Flatfile.EnvironmentId;
spaceId?: string;
/**
* Filter by event domain
*/
domain?: string;
/**
* Filter by event topic
*/
topic?: string;
/**
* Filter by event timestamp
*/
since?: string;
/**
* Number of tokens to return in a page (default 10)
*/
pageSize?: number;
/**
* Based on pageSize, which page of records to return
*/
pageNumber?: number;
/**
* Include acknowledged events
*/
includeAcknowledged?: boolean;
}
}
declare module '@flatfile/api/api/resources/events/client/requests/GetEventTokenRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface GetEventTokenRequest {
/**
* The space id
*/
spaceId?: Flatfile.SpaceId;
/**
* The scope of the event stream (space or environment id)
*/
scope?: string;
}
}
declare module '@flatfile/api/api/resources/files/client/requests/ListFilesRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface ListFilesRequest {
spaceId?: string;
/**
* Number of jobs to return in a page (default 20)
*/
pageSize?: number;
/**
* Based on pageSize, which page of jobs to return
*/
pageNumber?: number;
/**
* The storage mode of file to fetch, defaults to "import"
*/
mode?: Flatfile.Mode;
}
}
declare module '@flatfile/api/api/resources/files/client/requests/CreateFileRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface CreateFileRequest {
spaceId: Flatfile.SpaceId;
environmentId: Flatfile.EnvironmentId;
/** The storage mode of file to insert, defaults to "import" */
mode?: Flatfile.Mode;
/** A binary payload containing the file contents */
file: string;
}
}
declare module '@flatfile/api/api/resources/files/client/requests/UpdateFileRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface UpdateFileRequest {
workbookId?: Flatfile.WorkbookId;
/** The name of the file */
name?: string;
/** The storage mode of file to update */
mode?: Flatfile.Mode;
/** Status of the file */
status?: Flatfile.ModelFileStatusEnum;
/** The actions attached to the file */
actions?: Flatfile.Action[];
}
}
declare module '@flatfile/api/api/resources/guests/client/requests/ListGuestsRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface ListGuestsRequest {
/**
* ID of space to return
*/
spaceId: Flatfile.SpaceId;
/**
* Email of guest to return
*/
email?: string;
}
}
declare module '@flatfile/api/api/resources/jobs/client/requests/ListJobsRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface ListJobsRequest {
environmentId?: Flatfile.EnvironmentId;
spaceId?: Flatfile.SpaceId;
workbookId?: Flatfile.WorkbookId;
fileId?: Flatfile.FileId;
/**
* Number of jobs to return in a page (default 20)
*/
pageSize?: number;
/**
* Based on pageSize, which page of jobs to return
*/
pageNumber?: number;
sortDirection?: Flatfile.SortDirection;
}
}
declare module '@flatfile/api/api/resources/records/client/requests/GetRecordsRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface GetRecordsRequest {
versionId?: string;
untilVersionId?: Flatfile.VersionId;
sinceVersionId?: Flatfile.VersionId;
sortField?: Flatfile.SortField;
sortDirection?: Flatfile.SortDirection;
filter?: Flatfile.Filter;
/**
* Name of field by which to filter records
*/
filterField?: Flatfile.FilterField;
searchValue?: Flatfile.SearchValue;
searchField?: Flatfile.SearchField;
/**
* A list of record ids to fetch. If filter "all" is also specified, then this is a list of record ids to exclude from the results.
*
*/
ids?: Flatfile.RecordId | Flatfile.RecordId[];
/**
* Number of records to return in a page (default 1000 if pageNumber included)
*/
pageSize?: number;
/**
* Based on pageSize, which page of records to return
*/
pageNumber?: number;
/**
* Include counts for the total records, valid records and records with errors
*/
includeCounts?: boolean;
/**
* If true, linked records will be included in the results. Defaults to false.
*/
includeLinks?: boolean;
/**
* Include error messages, defaults to false.
*/
includeLMessages?: boolean;
/**
* if "for" is provided, the query parameters will be pulled from the event payload
*/
for?: Flatfile.EventId;
/**
* An FFQL query used to filter the result set
*/
q?: string;
}
}
declare module '@flatfile/api/api/resources/records/client/requests/DeleteRecordsRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface DeleteRecordsRequest {
/**
* A list of record ids
*/
ids?: Flatfile.RecordId | Flatfile.RecordId[];
}
}
declare module '@flatfile/api/api/resources/records/client/requests/FindRecordsRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export interface FindRecordsRequest {
/**
* The unique key used to identify a field in a sheet
*/
fieldKey: string;
/**
* The value to search for
*/
searchValue: string;
/**
* Number of records to return in a page (default 1000 if pageNumber included)
*/
pageSize?: number;
/**
* Based on pageSize, which page of records to return
*/
pageNumber?: number;
}
}
declare module '@flatfile/api/api/resources/records/client/requests/FindAndReplaceRecordRequestDeprecated' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface FindAndReplaceRecordRequestDeprecated {
/**
* A unique key used to identify a field in a sheet
*/
fieldKey: string;
/**
* A value to find for a given field in a sheet. Wrap the value in "" for exact match
*/
searchValue: string;
filter?: Flatfile.Filter;
/**
* Number of records to return in a page (default 1000 if pageNumber included)
*/
pageSize?: number;
/**
* Based on pageSize, which page of records to return
*/
pageNumber?: number;
/** The value to replace found values with */
replace?: unknown;
}
}
declare module '@flatfile/api/api/resources/records/client/requests/FindAndReplaceRecordRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface FindAndReplaceRecordRequest {
filter?: Flatfile.Filter;
/**
* Name of field by which to filter records
*/
filterField?: Flatfile.FilterField;
searchValue?: Flatfile.SearchValue;
searchField?: Flatfile.SearchField;
/**
* A list of record ids to search within. If filter "all" is also specified, then this is a list of record ids to exclude from the search.
*
*/
ids?: Flatfile.RecordId | Flatfile.RecordId[];
/** A value to find for a given field in a sheet. Wrap the value in "" for exact match */
find?: Flatfile.CellValueUnion;
/** The value to replace found values with */
replace?: Flatfile.CellValueUnion;
/** The value to replace found values with */
fieldKey: string;
}
}
declare module '@flatfile/api/api/resources/sheets/client/requests/ListSheetsRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface ListSheetsRequest {
/**
* ID of workbook
*/
workbookId: Flatfile.WorkbookId;
}
}
declare module '@flatfile/api/api/resources/sheets/client/requests/GetRecordsCsvRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface GetRecordsCsvRequest {
versionId?: string;
sinceVersionId?: Flatfile.VersionId;
sortField?: Flatfile.SortField;
/**
* Sort direction - asc (ascending) or desc (descending)
*/
sortDirection?: Flatfile.SortDirection;
/**
* Options to filter records
*/
filter?: Flatfile.Filter;
filterField?: Flatfile.FilterField;
searchValue?: Flatfile.SearchValue;
searchField?: Flatfile.SearchField;
/**
* A list of record ids to download. If filter "all" is also specified, then this is a list of record ids to exclude from the download.
*
*/
ids?: Flatfile.RecordId | Flatfile.RecordId[];
}
}
declare module '@flatfile/api/api/resources/sheets/client/requests/GetRecordCountsRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface GetRecordCountsRequest {
versionId?: string;
sinceVersionId?: Flatfile.VersionId;
/**
* Options to filter records
*/
filter?: Flatfile.Filter;
filterField?: Flatfile.FilterField;
searchValue?: Flatfile.SearchValue;
searchField?: Flatfile.SearchField;
/**
* If true, the error counts for each field will also be returned
*/
byField?: boolean;
/**
* An FFQL query used to filter the result set to be counted
*/
q?: string;
}
}
declare module '@flatfile/api/api/resources/users/client/requests/ListUsersRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export interface ListUsersRequest {
/**
* Email of guest to return
*/
email?: string;
}
}
declare module '@flatfile/api/api/resources/users/client/requests/ListApiTokensRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export interface ListApiTokensRequest {
tenantId: string;
/**
* Number of tokens to return in a page (default 10)
*/
pageSize?: number;
/**
* Based on pageSize, which page of records to return
*/
pageNumber?: number;
}
}
declare module '@flatfile/api/api/resources/users/client/requests/CreateApiTokenRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export interface CreateApiTokenRequest {
tenantId: string;
}
}
declare module '@flatfile/api/api/resources/users/client/requests/ExchangeTokenRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export interface ExchangeTokenRequest {
/** The token to use for the request */
token?: string;
/** The invited guest's email, required if no token */
email?: string;
/** The spaceId, required if no token */
spaceId?: string;
}
}
declare module '@flatfile/api/api/resources/versions/client/requests/VersionsPostRequestBody' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface VersionsPostRequestBody {
sheetId?: Flatfile.SheetId;
parentVersionId?: Flatfile.VersionId;
}
}
declare module '@flatfile/api/api/resources/workbooks/client/requests/ListWorkbooksRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface ListWorkbooksRequest {
spaceId?: Flatfile.SpaceId;
/**
* Include counts for the workbook
*/
includeCounts?: boolean;
}
}
declare module '@flatfile/api/core/schemas/builders/date' {
export { date } from "@flatfile/api/core/schemas/builders/date/date";
}
declare module '@flatfile/api/core/schemas/builders/enum' {
export { enum_ } from "@flatfile/api/core/schemas/builders/enum/enum";
}
declare module '@flatfile/api/core/schemas/builders/lazy' {
export { lazy } from "@flatfile/api/core/schemas/builders/lazy/lazy";
export type { SchemaGetter } from "@flatfile/api/core/schemas/builders/lazy/lazy";
export { lazyObject } from "@flatfile/api/core/schemas/builders/lazy/lazyObject";
}
declare module '@flatfile/api/core/schemas/builders/list' {
export { list } from "@flatfile/api/core/schemas/builders/list/list";
}
declare module '@flatfile/api/core/schemas/builders/literals' {
export { stringLiteral } from "@flatfile/api/core/schemas/builders/literals/stringLiteral";
}
declare module '@flatfile/api/core/schemas/builders/object' {
export { getObjectUtils, object } from "@flatfile/api/core/schemas/builders/object/object";
export { isProperty, property } from "@flatfile/api/core/schemas/builders/object/property";
export type { Property } from "@flatfile/api/core/schemas/builders/object/property";
export type { BaseObjectSchema, inferObjectSchemaFromPropertySchemas, inferParsedObject, inferParsedObjectFromPropertySchemas, inferParsedPropertySchema, inferRawKey, inferRawObject, inferRawObjectFromPropertySchemas, inferRawPropertySchema, ObjectSchema, ObjectUtils, PropertySchemas, } from "@flatfile/api/core/schemas/builders/object/types";
}
declare module '@flatfile/api/core/schemas/builders/object-like' {
export { getObjectLikeUtils, withParsedProperties } from "@flatfile/api/core/schemas/builders/object-like/getObjectLikeUtils";
export type { ObjectLikeSchema, ObjectLikeUtils } from "@flatfile/api/core/schemas/builders/object-like/types";
}
declare module '@flatfile/api/core/schemas/builders/primitives' {
export { any } from "@flatfile/api/core/schemas/builders/primitives/any";
export { boolean } from "@flatfile/api/core/schemas/builders/primitives/boolean";
export { number } from "@flatfile/api/core/schemas/builders/primitives/number";
export { string } from "@flatfile/api/core/schemas/builders/primitives/string";
export { unknown } from "@flatfile/api/core/schemas/builders/primitives/unknown";
}
declare module '@flatfile/api/core/schemas/builders/record' {
export { record } from "@flatfile/api/core/schemas/builders/record/record";
export type { BaseRecordSchema, RecordSchema } from "@flatfile/api/core/schemas/builders/record/types";
}
declare module '@flatfile/api/core/schemas/builders/schema-utils' {
export { getSchemaUtils, optional, transform } from "@flatfile/api/core/schemas/builders/schema-utils/getSchemaUtils";
export type { SchemaUtils } from "@flatfile/api/core/schemas/builders/schema-utils/getSchemaUtils";
export { JsonError } from "@flatfile/api/core/schemas/builders/schema-utils/JsonError";
export { ParseError } from "@flatfile/api/core/schemas/builders/schema-utils/ParseError";
}
declare module '@flatfile/api/core/schemas/builders/set' {
export { set } from "@flatfile/api/core/schemas/builders/set/set";
}
declare module '@flatfile/api/core/schemas/builders/undiscriminated-union' {
export type { inferParsedUnidiscriminatedUnionSchema, inferRawUnidiscriminatedUnionSchema, UndiscriminatedUnionSchema, } from "@flatfile/api/core/schemas/builders/undiscriminated-union/types";
export { undiscriminatedUnion } from "@flatfile/api/core/schemas/builders/undiscriminated-union/undiscriminatedUnion";
}
declare module '@flatfile/api/core/schemas/builders/union' {
export { discriminant } from "@flatfile/api/core/schemas/builders/union/discriminant";
export type { Discriminant } from "@flatfile/api/core/schemas/builders/union/discriminant";
export type { inferParsedDiscriminant, inferParsedUnion, inferRawDiscriminant, inferRawUnion, UnionSubtypes, } from "@flatfile/api/core/schemas/builders/union/types";
export { union } from "@flatfile/api/core/schemas/builders/union/union";
}
declare module '@flatfile/api/core/schemas/utils/MaybePromise' {
export type MaybePromise<T> = T | Promise<T>;
}
declare module '@flatfile/api/api/resources/spaces/types/ListSpacesResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface ListSpacesResponse {
pagination?: Flatfile.Pagination;
data: Flatfile.spaces.Space[];
}
}
declare module '@flatfile/api/api/resources/spaces/types/SpaceResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface SpaceResponse {
data: Flatfile.spaces.Space;
}
}
declare module '@flatfile/api/api/resources/spaces/types/Space' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* A place to store your workbooks
*/
export interface Space extends Flatfile.spaces.SpaceConfig {
id: Flatfile.SpaceId;
/** Amount of workbooks in the space */
workbookCount?: number;
/** Amount of files in the space */
filesCount?: number;
createdByUserId?: Flatfile.UserId;
/** User name who created space */
createdByUserName?: string;
/** Date when space was created */
createdAt: Date;
/** Date when space was updated */
updatedAt: Date;
/** Date when space was archived */
archivedAt?: Date;
/** Guest link to the space */
guestLink?: string;
accessToken?: string;
}
}
declare module '@flatfile/api/api/resources/spaces/types/SpaceConfig' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* Properties used to create a new Space
*/
export interface SpaceConfig {
spaceConfigId?: Flatfile.SpaceConfigId;
environmentId: Flatfile.EnvironmentId;
primaryWorkbookId?: Flatfile.WorkbookId;
/** The name of the space */
name?: string;
/** The display order */
displayOrder?: number;
/** Metadata for the space */
metadata?: unknown;
actions?: Flatfile.Action[];
guestAuthentication?: Flatfile.GuestAuthenticationEnum[];
access?: Flatfile.spaces.SpaceAccess[];
autoConfigure?: boolean;
}
}
declare module '@flatfile/api/api/resources/spaces/types/EventTokenResponse' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface EventTokenResponse {
data: Flatfile.spaces.EventToken;
}
}
declare module '@flatfile/api/api/resources/spaces/types/EventToken' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
/**
* Properties used to allow users to connect to the event bus
*/
export interface EventToken {
accountId?: Flatfile.AccountId;
/** The id of the event bus to subscribe to */
subscribeKey?: string;
/** Time to live in minutes */
ttl?: number;
token?: string;
}
}
declare module '@flatfile/api/api/resources/spaces/types/GetSpacesSortField' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export type GetSpacesSortField = "name" | "workbooksCount" | "filesCount" | "environmentId" | "createdByUserName";
export const GetSpacesSortField: {
readonly Name: "name";
readonly WorkbooksCount: "workbooksCount";
readonly FilesCount: "filesCount";
readonly EnvironmentId: "environmentId";
readonly CreatedByUserName: "createdByUserName";
};
}
declare module '@flatfile/api/api/resources/spaces/types/SpaceAccess' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
export type SpaceAccess = "*" | "upload";
export const SpaceAccess: {
readonly All: "*";
readonly Upload: "upload";
};
}
declare module '@flatfile/api/api/resources/spaces/client/requests' {
export { ListSpacesRequest } from "@flatfile/api/api/resources/spaces/client/requests/ListSpacesRequest";
}
declare module '@flatfile/api/core/schemas/builders/date/date' {
import { Schema } from "@flatfile/api/core/schemas/Schema";
export function date(): Schema<string, Date>;
}
declare module '@flatfile/api/core/schemas/builders/enum/enum' {
import { Schema } from "@flatfile/api/core/schemas/Schema";
export function enum_<U extends string, E extends U[]>(values: E): Schema<E[number], E[number]>;
}
declare module '@flatfile/api/core/schemas/builders/lazy/lazy' {
import { BaseSchema, Schema } from "@flatfile/api/core/schemas/Schema";
export type SchemaGetter<SchemaType extends Schema<any, any>> = () => SchemaType | Promise<SchemaType>;
export function lazy<Raw, Parsed>(getter: SchemaGetter<Schema<Raw, Parsed>>): Schema<Raw, Parsed>;
export function constructLazyBaseSchema<Raw, Parsed>(getter: SchemaGetter<Schema<Raw, Parsed>>): BaseSchema<Raw, Parsed>;
export function getMemoizedSchema<SchemaType extends Schema<any, any>>(getter: SchemaGetter<SchemaType>): Promise<SchemaType>;
}
declare module '@flatfile/api/core/schemas/builders/lazy/lazyObject' {
import { ObjectSchema } from "@flatfile/api/core/schemas/builders/object/types";
import { SchemaGetter } from "@flatfile/api/core/schemas/builders/lazy/lazy";
export function lazyObject<Raw, Parsed>(getter: SchemaGetter<ObjectSchema<Raw, Parsed>>): ObjectSchema<Raw, Parsed>;
}
declare module '@flatfile/api/core/schemas/builders/list/list' {
import { Schema } from "@flatfile/api/core/schemas/Schema";
export function list<Raw, Parsed>(schema: Schema<Raw, Parsed>): Schema<Raw[], Parsed[]>;
}
declare module '@flatfile/api/core/schemas/builders/literals/stringLiteral' {
import { Schema } from "@flatfile/api/core/schemas/Schema";
export function stringLiteral<V extends string>(literal: V): Schema<V, V>;
}
declare module '@flatfile/api/core/schemas/builders/object/object' {
import { BaseObjectSchema, inferObjectSchemaFromPropertySchemas, ObjectUtils, PropertySchemas } from "@flatfile/api/core/schemas/builders/object/types";
export function object<ParsedKeys extends string, T extends PropertySchemas<ParsedKeys>>(schemas: T): inferObjectSchemaFromPropertySchemas<T>;
export function getObjectUtils<Raw, Parsed>(schema: BaseObjectSchema<Raw, Parsed>): ObjectUtils<Raw, Parsed>;
}
declare module '@flatfile/api/core/schemas/builders/object/property' {
import { Schema } from "@flatfile/api/core/schemas/Schema";
export function property<RawKey extends string, RawValue, ParsedValue>(rawKey: RawKey, valueSchema: Schema<RawValue, ParsedValue>): Property<RawKey, RawValue, ParsedValue>;
export interface Property<RawKey extends string, RawValue, ParsedValue> {
rawKey: RawKey;
valueSchema: Schema<RawValue, ParsedValue>;
isProperty: true;
}
export function isProperty<O extends Property<any, any, any>>(maybeProperty: unknown): maybeProperty is O;
}
declare module '@flatfile/api/core/schemas/builders/object/types' {
import { BaseSchema, inferParsed, inferRaw, Schema } from "@flatfile/api/core/schemas/Schema";
import { addQuestionMarksToNullableProperties } from "@flatfile/api/core/schemas/utils/addQuestionMarksToNullableProperties";
import { ObjectLikeUtils } from "@flatfile/api/core/schemas/builders/object-like";
import { SchemaUtils } from "@flatfile/api/core/schemas/builders/schema-utils";
import { Property } from "@flatfile/api/core/schemas/builders/object/property";
export type ObjectSchema<Raw, Parsed> = BaseObjectSchema<Raw, Parsed> & ObjectLikeUtils<Raw, Parsed> & ObjectUtils<Raw, Parsed> & SchemaUtils<Raw, Parsed>;
export interface BaseObjectSchema<Raw, Parsed> extends BaseSchema<Raw, Parsed> {
_getRawProperties: () => Promise<(keyof Raw)[]>;
_getParsedProperties: () => Promise<(keyof Parsed)[]>;
}
export interface ObjectUtils<Raw, Parsed> {
extend: <RawExtension, ParsedExtension>(schemas: ObjectSchema<RawExtension, ParsedExtension>) => ObjectSchema<Raw & RawExtension, Parsed & ParsedExtension>;
}
export type inferRawObject<O extends ObjectSchema<any, any>> = O extends ObjectSchema<infer Raw, any> ? Raw : never;
export type inferParsedObject<O extends ObjectSchema<any, any>> = O extends ObjectSchema<any, infer Parsed> ? Parsed : never;
export type inferObjectSchemaFromPropertySchemas<T extends PropertySchemas<keyof T>> = ObjectSchema<inferRawObjectFromPropertySchemas<T>, inferParsedObjectFromPropertySchemas<T>>;
export type inferRawObjectFromPropertySchemas<T extends PropertySchemas<keyof T>> = addQuestionMarksToNullableProperties<{
[ParsedKey in keyof T as inferRawKey<ParsedKey, T[ParsedKey]>]: inferRawPropertySchema<T[ParsedKey]>;
}>;
export type inferParsedObjectFromPropertySchemas<T extends PropertySchemas<keyof T>> = addQuestionMarksToNullableProperties<{
[K in keyof T]: inferParsedPropertySchema<T[K]>;
}>;
export type PropertySchemas<ParsedKeys extends string | number | symbol> = Record<ParsedKeys, Property<any, any, any> | Schema<any, any>>;
export type inferRawPropertySchema<P extends Property<any, any, any> | Schema<any, any>> = P extends Property<any, infer Raw, any> ? Raw : P extends Schema<any, any> ? inferRaw<P> : never;
export type inferParsedPropertySchema<P extends Property<any, any, any> | Schema<any, any>> = P extends Property<any, any, infer Parsed> ? Parsed : P extends Schema<any, any> ? inferParsed<P> : never;
export type inferRawKey<ParsedKey extends string | number | symbol, P extends Property<any, any, any> | Schema<any, any>> = P extends Property<infer Raw, any, any> ? Raw : ParsedKey;
}
declare module '@flatfile/api/core/schemas/builders/object-like/getObjectLikeUtils' {
import { BaseSchema } from "@flatfile/api/core/schemas/Schema";
import { ObjectLikeSchema, ObjectLikeUtils } from "@flatfile/api/core/schemas/builders/object-like/types";
export function getObjectLikeUtils<Raw, Parsed>(schema: BaseSchema<Raw, Parsed>): ObjectLikeUtils<Raw, Parsed>;
/**
* object-like utils are defined in one file to resolve issues with circular imports
*/
export function withParsedProperties<RawObjectShape, ParsedObjectShape, Properties>(objectLike: BaseSchema<RawObjectShape, ParsedObjectShape>, properties: {
[K in keyof Properties]: Properties[K] | ((parsed: ParsedObjectShape) => Properties[K]);
}): ObjectLikeSchema<RawObjectShape, ParsedObjectShape & Properties>;
}
declare module '@flatfile/api/core/schemas/builders/object-like/types' {
import { BaseSchema, Schema } from "@flatfile/api/core/schemas/Schema";
export type ObjectLikeSchema<Raw, Parsed> = Schema<Raw, Parsed> & BaseSchema<Raw, Parsed> & ObjectLikeUtils<Raw, Parsed>;
export interface ObjectLikeUtils<Raw, Parsed> {
withParsedProperties: <T extends Record<string, any>>(properties: {
[K in keyof T]: T[K] | ((parsed: Parsed) => T[K]);
}) => ObjectLikeSchema<Raw, Parsed & T>;
}
}
declare module '@flatfile/api/core/schemas/builders/primitives/any' {
export const any: () => import("../../Schema").Schema<any, any>;
}
declare module '@flatfile/api/core/schemas/builders/primitives/boolean' {
export const boolean: () => import("../../Schema").Schema<boolean, boolean>;
}
declare module '@flatfile/api/core/schemas/builders/primitives/number' {
export const number: () => import("../../Schema").Schema<number, number>;
}
declare module '@flatfile/api/core/schemas/builders/primitives/string' {
export const string: () => import("../../Schema").Schema<string, string>;
}
declare module '@flatfile/api/core/schemas/builders/primitives/unknown' {
export const unknown: () => import("../../Schema").Schema<unknown, unknown>;
}
declare module '@flatfile/api/core/schemas/builders/record/record' {
import { Schema } from "@flatfile/api/core/schemas/Schema";
import { RecordSchema } from "@flatfile/api/core/schemas/builders/record/types";
export function record<RawKey extends string | number, RawValue, ParsedValue, ParsedKey extends string | number>(keySchema: Schema<RawKey, ParsedKey>, valueSchema: Schema<RawValue, ParsedValue>): RecordSchema<RawKey, RawValue, ParsedKey, ParsedValue>;
}
declare module '@flatfile/api/core/schemas/builders/record/types' {
import { BaseSchema } from "@flatfile/api/core/schemas/Schema";
import { SchemaUtils } from "@flatfile/api/core/schemas/builders/schema-utils";
export type RecordSchema<RawKey extends string | number, RawValue, ParsedKey extends string | number, ParsedValue> = BaseRecordSchema<RawKey, RawValue, ParsedKey, ParsedValue> & SchemaUtils<Record<RawKey, RawValue>, Record<ParsedKey, ParsedValue>>;
export type BaseRecordSchema<RawKey extends string | number, RawValue, ParsedKey extends string | number, ParsedValue> = BaseSchema<Record<RawKey, RawValue>, Record<ParsedKey, ParsedValue>>;
}
declare module '@flatfile/api/core/schemas/builders/schema-utils/getSchemaUtils' {
import { BaseSchema, Schema, SchemaOptions } from "@flatfile/api/core/schemas/Schema";
export interface SchemaUtils<Raw, Parsed> {
optional: () => Schema<Raw | null | undefined, Parsed | undefined>;
transform: <Transformed>(transformer: SchemaTransformer<Parsed, Transformed>) => Schema<Raw, Transformed>;
parseOrThrow: (raw: unknown, opts?: SchemaOptions) => Promise<Parsed>;
jsonOrThrow: (raw: unknown, opts?: SchemaOptions) => Promise<Raw>;
}
export interface SchemaTransformer<Parsed, Transformed> {
transform: (parsed: Parsed) => Transformed;
untransform: (transformed: any) => Parsed;
}
export function getSchemaUtils<Raw, Parsed>(schema: BaseSchema<Raw, Parsed>): SchemaUtils<Raw, Parsed>;
/**
* schema utils are defined in one file to resolve issues with circular imports
*/
export function optional<Raw, Parsed>(schema: BaseSchema<Raw, Parsed>): Schema<Raw | null | undefined, Parsed | undefined>;
export function transform<Raw, Parsed, Transformed>(schema: BaseSchema<Raw, Parsed>, transformer: SchemaTransformer<Parsed, Transformed>): Schema<Raw, Transformed>;
}
declare module '@flatfile/api/core/schemas/builders/schema-utils/JsonError' {
import { ValidationError } from "@flatfile/api/core/schemas/Schema";
export class JsonError extends Error {
readonly errors: ValidationError[];
constructor(errors: ValidationError[]);
}
}
declare module '@flatfile/api/core/schemas/builders/schema-utils/ParseError' {
import { ValidationError } from "@flatfile/api/core/schemas/Schema";
export class ParseError extends Error {
readonly errors: ValidationError[];
constructor(errors: ValidationError[]);
}
}
declare module '@flatfile/api/core/schemas/builders/set/set' {
import { Schema } from "@flatfile/api/core/schemas/Schema";
export function set<Raw, Parsed>(schema: Schema<Raw, Parsed>): Schema<Raw[], Set<Parsed>>;
}
declare module '@flatfile/api/core/schemas/builders/undiscriminated-union/types' {
import { inferParsed, inferRaw, Schema } from "@flatfile/api/core/schemas/Schema";
export type UndiscriminatedUnionSchema<Schemas extends [...Schema[]]> = Schema<inferRawUnidiscriminatedUnionSchema<Schemas>, inferParsedUnidiscriminatedUnionSchema<Schemas>>;
export type inferRawUnidiscriminatedUnionSchema<Schemas extends [...Schema[]]> = inferRaw<Schemas[number]>;
export type inferParsedUnidiscriminatedUnionSchema<Schemas extends [...Schema[]]> = inferParsed<Schemas[number]>;
}
declare module '@flatfile/api/core/schemas/builders/undiscriminated-union/undiscriminatedUnion' {
import { Schema } from "@flatfile/api/core/schemas/Schema";
import { inferParsedUnidiscriminatedUnionSchema, inferRawUnidiscriminatedUnionSchema } from "@flatfile/api/core/schemas/builders/undiscriminated-union/types";
export function undiscriminatedUnion<Schemas extends [Schema<any, any>, ...Schema<any, any>[]]>(schemas: Schemas): Schema<inferRawUnidiscriminatedUnionSchema<Schemas>, inferParsedUnidiscriminatedUnionSchema<Schemas>>;
}
declare module '@flatfile/api/core/schemas/builders/union/discriminant' {
export function discriminant<RawDiscriminant extends string, ParsedDiscriminant extends string>(parsedDiscriminant: ParsedDiscriminant, rawDiscriminant: RawDiscriminant): Discriminant<RawDiscriminant, ParsedDiscriminant>;
export interface Discriminant<RawDiscriminant extends string, ParsedDiscriminant extends string> {
parsedDiscriminant: ParsedDiscriminant;
rawDiscriminant: RawDiscriminant;
}
}
declare module '@flatfile/api/core/schemas/builders/union/types' {
import { inferParsedObject, inferRawObject, ObjectSchema } from "@flatfile/api/core/schemas/builders/object";
import { Discriminant } from "@flatfile/api/core/schemas/builders/union/discriminant";
export type UnionSubtypes<DiscriminantValues extends string | number | symbol> = {
[K in DiscriminantValues]: ObjectSchema<any, any>;
};
export type inferRawUnion<D extends string | Discriminant<any, any>, U extends UnionSubtypes<keyof U>> = {
[K in keyof U]: Record<inferRawDiscriminant<D>, K> & inferRawObject<U[K]>;
}[keyof U];
export type inferParsedUnion<D extends string | Discriminant<any, any>, U extends UnionSubtypes<keyof U>> = {
[K in keyof U]: Record<inferParsedDiscriminant<D>, K> & inferParsedObject<U[K]>;
}[keyof U];
export type inferRawDiscriminant<D extends string | Discriminant<any, any>> = D extends string ? D : D extends Discriminant<infer Raw, any> ? Raw : never;
export type inferParsedDiscriminant<D extends string | Discriminant<any, any>> = D extends string ? D : D extends Discriminant<any, infer Parsed> ? Parsed : never;
}
declare module '@flatfile/api/core/schemas/builders/union/union' {
import { ObjectLikeSchema } from "@flatfile/api/core/schemas/builders/object-like";
import { Discriminant } from "@flatfile/api/core/schemas/builders/union/discriminant";
import { inferParsedUnion, inferRawUnion, UnionSubtypes } from "@flatfile/api/core/schemas/builders/union/types";
export function union<D extends string | Discriminant<any, any>, U extends UnionSubtypes<any>>(discriminant: D, union: U): ObjectLikeSchema<inferRawUnion<D, U>, inferParsedUnion<D, U>>;
}
declare module '@flatfile/api/api/resources/spaces/client/requests/ListSpacesRequest' {
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as Flatfile from "@flatfile/api/api";
export interface ListSpacesRequest {
environmentId?: string;
/**
* Number of spaces to return in a page (default 10)
*/
pageSize?: number;
/**
* Based on pageSize, which page of records to return
*/
pageNumber?: number;
search?: string;
archived?: boolean;
sortField?: Flatfile.spaces.GetSpacesSortField;
sortDirection?: Flatfile.SortDirection;
}
}
declare module '@flatfile/api/core/schemas/utils/addQuestionMarksToNullableProperties' {
export type addQuestionMarksToNullableProperties<T> = {
[K in OptionalKeys<T>]?: T[K];
} & Pick<T, RequiredKeys<T>>;
export type OptionalKeys<T> = {
[K in keyof T]-?: undefined extends T[K] ? K : null extends T[K] ? K : 1 extends (any extends T[K] ? 0 : 1) ? never : K;
}[keyof T];
export type RequiredKeys<T> = Exclude<keyof T, OptionalKeys<T>>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment