@finagraph/strongbox-finconnect-react
Version:
React components to integrate with Finagraph Strongbox
181 lines (180 loc) • 8.33 kB
TypeScript
import { ClientBase as ApiClientBase, IDelegatedAccessToken } from './ClientBase';
import { Connection, FinancialImportParameters, FinancialImportStatus, FinancialRecordReference, ConnectionRequestParameters, ConnectionRequestDescriptor, ConnectionRequest, ConnectionsList, InitializeOrganizationParameters } from './strongbox.models';
export interface IFinancialRecordsClient {
/**
* Monitor a financial import
* @param orgId An identifier for the organization for which financials are being imported.
* @param financialRecordId An identifier for the Financial Record representing the imported financials.
* @return Ok
*/
getImportStatus(orgId: string, financialRecordId: string): Promise<NexusApiResponse<FinancialImportStatus>>;
/**
* Import financials on demand
* @param orgId An identifier for the organization for which financials will be imported.
* @return Created
*/
import(orgId: string, body: FinancialImportParameters): Promise<NexusApiResponse<FinancialRecordReference>>;
}
export declare class FinancialRecordsClient extends ApiClientBase implements IFinancialRecordsClient {
private http;
private baseUrl;
protected jsonParseReviver: ((key: string, value: any) => any) | undefined;
constructor(configuration: IDelegatedAccessToken, baseUrl?: string, http?: {
fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
});
/**
* Monitor a financial import
* @param orgId An identifier for the organization for which financials are being imported.
* @param financialRecordId An identifier for the Financial Record representing the imported financials.
* @return Ok
*/
getImportStatus(orgId: string, financialRecordId: string): Promise<NexusApiResponse<FinancialImportStatus>>;
protected processGetImportStatus(response: Response): Promise<NexusApiResponse<FinancialImportStatus>>;
/**
* Import financials on demand
* @param orgId An identifier for the organization for which financials will be imported.
* @return Created
*/
import(orgId: string, body: FinancialImportParameters): Promise<NexusApiResponse<FinancialRecordReference>>;
protected processImport(response: Response): Promise<NexusApiResponse<FinancialRecordReference>>;
}
export interface IConnectionsClient {
/**
* Create a Connection Request
* @param orgId An identifier for the organization for which the Connection Request will be created.
* @param body Parameters for creating the Connection Request.
* @return Created.
*/
createRequest(orgId: string, body: ConnectionRequestParameters): Promise<NexusApiResponse<ConnectionRequestDescriptor>>;
/**
* Delete a Connection
* @param orgId An identifier for the Organization associated with the Connection.
* @param id An identifier for the Connection.
* @return No Content.
*/
delete(orgId: string, id: string): Promise<NexusApiResponse<void>>;
/**
* Get an existing Connection
* @param orgId An identifier for the Organization associated with the Connection.
* @param id An identifier for the Connection.
* @return Ok.
*/
get(orgId: string, id: string): Promise<NexusApiResponse<Connection>>;
/**
* Get the status of a Connection Request
* @param orgId An identifier for the organization for which the Connection Request was created.
* @param id An identifier for the Connection Request.
* @return Ok.
*/
getRequest(orgId: string, id: string): Promise<NexusApiResponse<ConnectionRequest>>;
/**
* List Connections
* @param orgId An identifier for the organization for which the Connections are being listed.
* @return Ok.
*/
list(orgId: string): Promise<NexusApiResponse<ConnectionsList>>;
}
export declare class ConnectionsClient extends ApiClientBase implements IConnectionsClient {
private http;
private baseUrl;
protected jsonParseReviver: ((key: string, value: any) => any) | undefined;
constructor(configuration: IDelegatedAccessToken, baseUrl?: string, http?: {
fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
});
/**
* Create a Connection Request
* @param orgId An identifier for the organization for which the Connection Request will be created.
* @param body Parameters for creating the Connection Request.
* @return Created.
*/
createRequest(orgId: string, body: ConnectionRequestParameters): Promise<NexusApiResponse<ConnectionRequestDescriptor>>;
protected processCreateRequest(response: Response): Promise<NexusApiResponse<ConnectionRequestDescriptor>>;
/**
* Delete a Connection
* @param orgId An identifier for the Organization associated with the Connection.
* @param id An identifier for the Connection.
* @return No Content.
*/
delete(orgId: string, id: string): Promise<NexusApiResponse<void>>;
protected processDelete(response: Response): Promise<NexusApiResponse<void>>;
/**
* Get an existing Connection
* @param orgId An identifier for the Organization associated with the Connection.
* @param id An identifier for the Connection.
* @return Ok.
*/
get(orgId: string, id: string): Promise<NexusApiResponse<Connection>>;
protected processGet(response: Response): Promise<NexusApiResponse<Connection>>;
/**
* Get the status of a Connection Request
* @param orgId An identifier for the organization for which the Connection Request was created.
* @param id An identifier for the Connection Request.
* @return Ok.
*/
getRequest(orgId: string, id: string): Promise<NexusApiResponse<ConnectionRequest>>;
protected processGetRequest(response: Response): Promise<NexusApiResponse<ConnectionRequest>>;
/**
* List Connections
* @param orgId An identifier for the organization for which the Connections are being listed.
* @return Ok.
*/
list(orgId: string): Promise<NexusApiResponse<ConnectionsList>>;
protected processList(response: Response): Promise<NexusApiResponse<ConnectionsList>>;
}
export interface IWebPortalClient {
/**
* Initialize a listed Organization
* @param orgId An identifier for the Organization to initialize.
* @param body The request to initialize the Organization.
* @return Success
*/
initializeOrganization(orgId: string, body: InitializeOrganizationParameters): Promise<NexusApiResponse<void>>;
}
export declare class WebPortalClient extends ApiClientBase implements IWebPortalClient {
private http;
private baseUrl;
protected jsonParseReviver: ((key: string, value: any) => any) | undefined;
constructor(configuration: IDelegatedAccessToken, baseUrl?: string, http?: {
fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
});
/**
* Initialize a listed Organization
* @param orgId An identifier for the Organization to initialize.
* @param body The request to initialize the Organization.
* @return Success
*/
initializeOrganization(orgId: string, body: InitializeOrganizationParameters): Promise<NexusApiResponse<void>>;
protected processInitializeOrganization(response: Response): Promise<NexusApiResponse<void>>;
}
export declare class NexusApiResponse<TResult> {
status: number;
headers: {
[key: string]: any;
};
result: TResult;
constructor(status: number, headers: {
[key: string]: any;
}, result: TResult);
}
export interface FileResponse {
data: Blob;
status: number;
fileName?: string;
headers?: {
[name: string]: any;
};
}
export declare class NexusApiException extends Error {
message: string;
status: number;
response: string;
headers: {
[key: string]: any;
};
result: any;
constructor(message: string, status: number, response: string, headers: {
[key: string]: any;
}, result: any);
protected isNexusApiException: boolean;
static isNexusApiException(obj: any): obj is NexusApiException;
}