Skip to content

Commit

Permalink
Version 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethan Lowry authored and EthanML committed Oct 19, 2023
1 parent 34ebec0 commit 998b2c5
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"name": "@moneykit/connect",
"description": "MoneyKit Connect launcher for web.",
"version": "0.1.10",
"version": "0.2.0",
"author": "MoneyKit",
"repository": {
"type": "git",
"url": "https://github.com/moneykit/connect-js.git"
},
"types": "./types/index.d.ts",
"dependencies": {
"query-string": "^8.1.0"
},
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { default as MoneyKit } from "./lib/connect-launcher";
export * from "./lib/connect-launcher";
export default MoneyKit;
56 changes: 56 additions & 0 deletions types/lib/connect-launcher.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import { ThemeTypographyTextStyle, moneyui } from "../../../ui-theme/src";
import type { Theme, ThemeTypographyStyle } from "../../../ui-theme/src";
export type Institution = {
avatar: string | null;
avatar_dark: string | null;
color: string;
color_dark: string | null;
country: string;
domain: string;
id: string;
logo: string | null;
logo_dark: string | null;
name: string;
is_curated: boolean;
};
export type AccountType = "depository.cash" | "depository.checking" | "depository.savings" | "depository.prepaid" | "depository.other" | "credit_card" | "loan.general" | "loan.mortgage" | "loan.other" | "investment" | "other";
export type LinkedInstitution = Institution & {
selectedAccounts: {
account_id: string;
account_type: AccountType;
name: string;
account_mask: string | null;
}[];
trackedScreens: {
tag: string;
name: string;
duration: number;
}[];
};
export type MoneyKitDevice = "mobile" | "desktop";
export type MoneyKitOptions = {
applicationName?: string;
theme?: Theme;
device?: MoneyKitDevice;
stepTimers?: boolean;
containerID?: string;
};
type LinkSuccessCallback = (exchangeableToken: string, institution: LinkedInstitution) => void;
type RelinkSuccessCallback = (institution: LinkedInstitution) => void;
type LinkExitCallback = () => void;
type LinkEventCallback = (event: Record<string, unknown>) => void;
declare class MoneyKit {
options: MoneyKitOptions;
constructor(options?: MoneyKitOptions);
link(linkSessionToken: string, onLinkSuccess?: LinkSuccessCallback, onLinkExit?: LinkExitCallback, onLinkEvent?: (event: Record<string, unknown>) => void): void;
relink(linkSessionToken: string, onRelinkSuccess?: RelinkSuccessCallback, onRelinkExit?: LinkExitCallback, onRelinkEvent?: (event: Record<string, unknown>) => void): void;
continue(redirectURL: string, onLinkSuccess?: LinkSuccessCallback, onLinkExit?: LinkExitCallback, // TODO: Pass optional error and metadata.
onLinkEvent?: LinkEventCallback): void;
__linkDirect(linkSessionToken: string, onLinkSuccess?: LinkSuccessCallback, onLinkExit?: LinkExitCallback, onLinkEvent?: (event: Record<string, unknown>) => void): void;
private startLink;
private linkParametersFromOptions;
private launch;
}
export default MoneyKit;
export { moneyui, type Theme, ThemeTypographyTextStyle, type ThemeTypographyStyle, };
export declare const themeTypographyStyleForTextStyle: (theme: Theme, textStyle: ThemeTypographyTextStyle) => ThemeTypographyStyle;

0 comments on commit 998b2c5

Please sign in to comment.