/**
* Finix API
*/
///
///
import * as http from 'http';
import { CreateExternalLinkRequest } from '../model/createExternalLinkRequest';
import { CreateFileRequest } from '../model/createFileRequest';
import { ExternalLink } from '../model/externalLink';
import { ModelFile } from '../model/modelFile';
import { UploadFileRequest } from '../model/uploadFileRequest';
import { ListExternalLinksQueryParams } from '../model/listExternalLinksQueryParams';
import { ListFilesQueryParams } from '../model/listFilesQueryParams';
import { Authentication, Interceptor, finixList } from '../model/models';
import { HttpBasicAuth } from '../model/models';
export declare enum FilesApiApiKeys {
}
export declare class FilesApi {
protected _basePath: string;
protected _defaultHeaders: any;
protected _useQuerystring: boolean;
protected authentications: {
default: Authentication;
BasicAuth: HttpBasicAuth;
};
protected interceptors: Interceptor[];
constructor(basePath?: string);
constructor(username: string, password: string, basePath?: string);
set useQuerystring(value: boolean);
set basePath(basePath: string);
set defaultHeaders(defaultHeaders: any);
get defaultHeaders(): any;
get basePath(): string;
setDefaultAuthentication(auth: Authentication): void;
setApiKey(key: FilesApiApiKeys, value: string): void;
set username(username: string);
set password(password: string);
addInterceptor(interceptor: Interceptor): void;
/**
* Helper function.
* Create an `external_link` resource to share with users so they can upload files directly from their browser. For more info, see [Uploading files to Finix](/guides/onboarding/uploading-files-to-finix/).
* @summary Create an External Link
* @param fileId Your `File` ID.
* @param createExternalLinkRequest
*/
private createExternalLinkHelper;
/**
* Create an `external_link` resource to share with users so they can upload files directly from their browser. For more info, see [Uploading files to Finix](/guides/onboarding/uploading-files-to-finix/).
* @summary Create an External Link
* @param fileId Your `File` ID.
* @param createExternalLinkRequest
*/
createExternalLink(fileId: string, createExternalLinkRequest?: CreateExternalLinkRequest, options?: {
headers: {
[name: string]: string;
};
}): Promise;
/**
* Create an `external_link` resource to share with users so they can upload files directly from their browser. For more info, see [Uploading files to Finix](/guides/onboarding/uploading-files-to-finix/).
* @summary Create an External Link
* @param fileId Your `File` ID.
* @param createExternalLinkRequest
*/
createExternalLinkHttp(fileId: string, createExternalLinkRequest?: CreateExternalLinkRequest, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: ExternalLink;
rawBody: any;
}>;
/**
* Helper function.
* Before uploading a file, you need to create a `File` resource. Once created, you can [upload](/guides/onboarding/uploading-files-to-finix/#how-to-upload-a-file-to-finix) your file to the new `File` resource.
* @summary Create a File
* @param createFileRequest
*/
private createHelper;
/**
* Before uploading a file, you need to create a `File` resource. Once created, you can [upload](/guides/onboarding/uploading-files-to-finix/#how-to-upload-a-file-to-finix) your file to the new `File` resource.
* @summary Create a File
* @param createFileRequest
*/
create(createFileRequest?: CreateFileRequest, options?: {
headers: {
[name: string]: string;
};
}): Promise;
/**
* Before uploading a file, you need to create a `File` resource. Once created, you can [upload](/guides/onboarding/uploading-files-to-finix/#how-to-upload-a-file-to-finix) your file to the new `File` resource.
* @summary Create a File
* @param createFileRequest
*/
createHttp(createFileRequest?: CreateFileRequest, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: ModelFile;
rawBody: any;
}>;
/**
* Helper function.
* Download a file that was uploaded to a `File` resource.
* @summary Download a file
* @param fileId The ID of the `File` that was created to upload the file.
*/
private downloadHelper;
/**
* Download a file that was uploaded to a `File` resource.
* @summary Download a file
* @param fileId The ID of the `File` that was created to upload the file.
*/
download(fileId: string, options?: {
headers: {
[name: string]: string;
};
}): Promise;
/**
* Download a file that was uploaded to a `File` resource.
* @summary Download a file
* @param fileId The ID of the `File` that was created to upload the file.
*/
downloadHttp(fileId: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Buffer;
rawBody: any;
}>;
/**
* Helper function.
* Fetch a previously created `external_link` resource.
* @summary Fetch an External LInk
* @param fileId The ID of the `File` that has the links you want to retrieve.
* @param externalLinkId The ID of the `external_link` that you want to retireve.
*/
private getExternalLinkHelper;
/**
* Fetch a previously created `external_link` resource.
* @summary Fetch an External LInk
* @param fileId The ID of the `File` that has the links you want to retrieve.
* @param externalLinkId The ID of the `external_link` that you want to retireve.
*/
getExternalLink(fileId: string, externalLinkId: string, options?: {
headers: {
[name: string]: string;
};
}): Promise;
/**
* Fetch a previously created `external_link` resource.
* @summary Fetch an External LInk
* @param fileId The ID of the `File` that has the links you want to retrieve.
* @param externalLinkId The ID of the `external_link` that you want to retireve.
*/
getExternalLinkHttp(fileId: string, externalLinkId: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: ExternalLink;
rawBody: any;
}>;
/**
* Helper function.
* Retrieve the details of a `File` resource.
* @summary Fetch a File
* @param fileId Your `File` ID.
*/
private getHelper;
/**
* Retrieve the details of a `File` resource.
* @summary Fetch a File
* @param fileId Your `File` ID.
*/
get(fileId: string, options?: {
headers: {
[name: string]: string;
};
}): Promise;
/**
* Retrieve the details of a `File` resource.
* @summary Fetch a File
* @param fileId Your `File` ID.
*/
getHttp(fileId: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: ModelFile;
rawBody: any;
}>;
/**
* Helper function.
* List the previously created `external_links` for a `File`.
* @summary List All External Links
* @param fileId Your `File` ID.
*
*/
private listExternalLinksHelper;
/**
* List the previously created `external_links` for a `File`.
* @summary List All External Links
* @param fileId Your `File` ID.
*
*/
listExternalLinks(fileId: string, listExternalLinksQueryParams?: ListExternalLinksQueryParams, options?: {
headers: {
[name: string]: string;
};
}): Promise>;
/**
* List the previously created `external_links` for a `File`.
* @summary List All External Links
* @param fileId Your `File` ID.
*
*/
listExternalLinksHttp(fileId: string, listExternalLinksQueryParams?: ListExternalLinksQueryParams, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: finixList;
rawBody: any;
}>;
/**
* Helper function.
* List all the `File` resources you\'ve created.
* @summary List All Files
*/
private listHelper;
/**
* List all the `File` resources you\'ve created.
* @summary List All Files
*/
list(listFilesQueryParams?: ListFilesQueryParams, options?: {
headers: {
[name: string]: string;
};
}): Promise>;
/**
* List all the `File` resources you\'ve created.
* @summary List All Files
*/
listHttp(listFilesQueryParams?: ListFilesQueryParams, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: finixList;
rawBody: any;
}>;
/**
* Helper function.
* Upload files directly with a `multipart/form-data` request.
* @summary Upload files Directly
* @param fileId The ID of the `File` that was created to upload the file.
* @param uploadFileRequest
*/
private uploadHelper;
/**
* Upload files directly with a `multipart/form-data` request.
* @summary Upload files Directly
* @param fileId The ID of the `File` that was created to upload the file.
* @param uploadFileRequest
*/
upload(fileId: string, uploadFileRequest?: UploadFileRequest, options?: {
headers: {
[name: string]: string;
};
}): Promise;
/**
* Upload files directly with a `multipart/form-data` request.
* @summary Upload files Directly
* @param fileId The ID of the `File` that was created to upload the file.
* @param uploadFileRequest
*/
uploadHttp(fileId: string, uploadFileRequest?: UploadFileRequest, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: ModelFile;
rawBody: any;
}>;
/**
* Extracts page and links fields from response body and assigns as properties to finixList
*/
private embeddedHelper;
/**
* Extracts offset value from response body and determines if end of list has been reached
*/
private getOffsetQueryParam;
/**
* Extracts nextCursor value from response body and determines if end of list has been reached
*/
private getCursorQueryParam;
}