@layerfi/components 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.js +359 -155
- package/dist/esm/index.js.map +4 -4
- package/dist/index.css +106 -0
- package/dist/index.css.map +7 -0
- package/dist/index.d.ts +47 -15
- package/dist/index.esm.css +106 -0
- package/dist/index.esm.css.map +7 -0
- package/dist/index.esm.js +252 -0
- package/dist/index.esm.js.map +7 -0
- package/dist/index.js +374 -170
- package/dist/index.js.map +4 -4
- package/dist/styles/index.css +64 -1
- package/dist/styles/index.css.map +3 -3
- package/package.json +1 -1
- package/.vim_backups/%Users%danieloneel%repos%components%package.json +0 -0
- package/.vim_backups/%Users%danieloneel%repos%components%src%providers%LayerProvider%LayerProvider.tsx +0 -0
- package/index.d.ts +0 -1088
package/index.d.ts
DELETED
|
@@ -1,1088 +0,0 @@
|
|
|
1
|
-
declare module '@layerfi/components/api/layer/authenticate' {
|
|
2
|
-
import { OAuthResponse } from '@layerfi/components/types';
|
|
3
|
-
type AuthenticationArguments = {
|
|
4
|
-
appId: string;
|
|
5
|
-
appSecret: string;
|
|
6
|
-
authenticationUrl?: string;
|
|
7
|
-
clientId: string;
|
|
8
|
-
scope: string;
|
|
9
|
-
};
|
|
10
|
-
export const authenticate: ({ appId, appSecret, authenticationUrl, clientId, scope, }: AuthenticationArguments) => () => Promise<OAuthResponse>;
|
|
11
|
-
export {};
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
declare module '@layerfi/components/api/layer/authenticated_http' {
|
|
15
|
-
export type HTTPVerb = 'get' | 'put' | 'post' | 'patch' | 'options' | 'delete';
|
|
16
|
-
export const get: <Return extends Record<string, unknown> = Record<string, unknown>, Params extends Record<string, string | undefined> = Record<string, string | undefined>>(url: (params: Params) => string) => (baseUrl: string, accessToken: string | undefined, options?: {
|
|
17
|
-
params?: Params | undefined;
|
|
18
|
-
} | undefined) => () => Promise<Return>;
|
|
19
|
-
export const request: (verb: HTTPVerb) => <Return extends Record<string, unknown> = Record<string, unknown>, Body_1 extends Record<string, unknown> = Record<string, unknown>, Params extends Record<string, string | undefined> = Record<string, string | undefined>>(url: (params: Params) => string) => (baseUrl: string, accessToken: string | undefined, options?: {
|
|
20
|
-
params?: Params | undefined;
|
|
21
|
-
body?: Body_1 | undefined;
|
|
22
|
-
} | undefined) => Promise<Return>;
|
|
23
|
-
export const post: <Return extends Record<string, unknown> = Record<string, unknown>, Body_1 extends Record<string, unknown> = Record<string, unknown>, Params extends Record<string, string | undefined> = Record<string, string | undefined>>(url: (params: Params) => string) => (baseUrl: string, accessToken: string | undefined, options?: {
|
|
24
|
-
params?: Params | undefined;
|
|
25
|
-
body?: Body_1 | undefined;
|
|
26
|
-
} | undefined) => Promise<Return>;
|
|
27
|
-
export const put: <Return extends Record<string, unknown> = Record<string, unknown>, Body_1 extends Record<string, unknown> = Record<string, unknown>, Params extends Record<string, string | undefined> = Record<string, string | undefined>>(url: (params: Params) => string) => (baseUrl: string, accessToken: string | undefined, options?: {
|
|
28
|
-
params?: Params | undefined;
|
|
29
|
-
body?: Body_1 | undefined;
|
|
30
|
-
} | undefined) => Promise<Return>;
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
declare module '@layerfi/components/api/layer/balance_sheet' {
|
|
34
|
-
import { BalanceSheet } from '@layerfi/components/types';
|
|
35
|
-
export interface GetBalanceSheetParams {
|
|
36
|
-
businessId: string;
|
|
37
|
-
date: string;
|
|
38
|
-
}
|
|
39
|
-
export const getBalanceSheet: (_token: string, _params: {
|
|
40
|
-
params: GetBalanceSheetParams;
|
|
41
|
-
}) => () => BalanceSheet;
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
declare module '@layerfi/components/api/layer/bankTransactions' {
|
|
45
|
-
import { CategoryUpdate, BankTransaction, Metadata } from '@layerfi/components/types';
|
|
46
|
-
export type GetBankTransactionsReturn = {
|
|
47
|
-
data?: BankTransaction[];
|
|
48
|
-
meta?: Metadata;
|
|
49
|
-
error?: unknown;
|
|
50
|
-
};
|
|
51
|
-
export interface GetBankTransactionsParams extends Record<string, string | undefined> {
|
|
52
|
-
businessId: string;
|
|
53
|
-
sortOrder?: 'ASC' | 'DESC';
|
|
54
|
-
sortBy?: string;
|
|
55
|
-
}
|
|
56
|
-
export const getBankTransactions: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
57
|
-
params?: GetBankTransactionsParams | undefined;
|
|
58
|
-
} | undefined) => () => Promise<GetBankTransactionsReturn>;
|
|
59
|
-
export const categorizeBankTransaction: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
60
|
-
params?: Record<string, string | undefined> | undefined;
|
|
61
|
-
body?: CategoryUpdate | undefined;
|
|
62
|
-
} | undefined) => Promise<{
|
|
63
|
-
data: BankTransaction;
|
|
64
|
-
errors: unknown;
|
|
65
|
-
}>;
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
declare module '@layerfi/components/api/layer/categories' {
|
|
69
|
-
import { Category } from '@layerfi/components/types';
|
|
70
|
-
export const getCategories: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
71
|
-
params?: Record<string, string | undefined> | undefined;
|
|
72
|
-
} | undefined) => () => Promise<{
|
|
73
|
-
data: {
|
|
74
|
-
type: 'Category_List';
|
|
75
|
-
categories: Category[];
|
|
76
|
-
};
|
|
77
|
-
}>;
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
declare module '@layerfi/components/api/layer/chart_of_accounts' {
|
|
81
|
-
import { AccountAlternate, ChartOfAccounts, NewAccount } from '@layerfi/components/types';
|
|
82
|
-
export const getChartOfAccounts: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
83
|
-
params?: Record<string, string | undefined> | undefined;
|
|
84
|
-
} | undefined) => () => Promise<{
|
|
85
|
-
data: ChartOfAccounts;
|
|
86
|
-
}>;
|
|
87
|
-
export const createAccount: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
88
|
-
params?: Record<string, string | undefined> | undefined;
|
|
89
|
-
body?: NewAccount | undefined;
|
|
90
|
-
} | undefined) => Promise<{
|
|
91
|
-
data: AccountAlternate;
|
|
92
|
-
}>;
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
declare module '@layerfi/components/api/layer/profit_and_loss' {
|
|
96
|
-
import { ProfitAndLoss } from '@layerfi/components/types';
|
|
97
|
-
export const getProfitAndLoss: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
98
|
-
params?: Record<string, string | undefined> | undefined;
|
|
99
|
-
} | undefined) => () => Promise<{
|
|
100
|
-
data?: ProfitAndLoss | undefined;
|
|
101
|
-
error?: unknown;
|
|
102
|
-
}>;
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
declare module '@layerfi/components/api/layer' {
|
|
106
|
-
export const Layer: {
|
|
107
|
-
authenticate: ({ appId, appSecret, authenticationUrl, clientId, scope, }: {
|
|
108
|
-
appId: string;
|
|
109
|
-
appSecret: string;
|
|
110
|
-
authenticationUrl?: string | undefined;
|
|
111
|
-
clientId: string;
|
|
112
|
-
scope: string;
|
|
113
|
-
}) => () => Promise<import("@layerfi/components/types").OAuthResponse>;
|
|
114
|
-
categorizeBankTransaction: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
115
|
-
params?: Record<string, string | undefined> | undefined;
|
|
116
|
-
body?: import("@layerfi/components/types").CategoryUpdate | undefined;
|
|
117
|
-
} | undefined) => Promise<{
|
|
118
|
-
data: import("@layerfi/components/types").BankTransaction;
|
|
119
|
-
errors: unknown;
|
|
120
|
-
}>;
|
|
121
|
-
createAccount: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
122
|
-
params?: Record<string, string | undefined> | undefined;
|
|
123
|
-
body?: import("@layerfi/components/types").NewAccount | undefined;
|
|
124
|
-
} | undefined) => Promise<{
|
|
125
|
-
data: import("@layerfi/components/types").AccountAlternate;
|
|
126
|
-
}>;
|
|
127
|
-
getBalanceSheet: (_token: string, _params: {
|
|
128
|
-
params: import("@layerfi/components/api/layer/balance_sheet").GetBalanceSheetParams;
|
|
129
|
-
}) => () => import("@layerfi/components/types").BalanceSheet;
|
|
130
|
-
getBankTransactions: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
131
|
-
params?: import("@layerfi/components/api/layer/bankTransactions").GetBankTransactionsParams | undefined;
|
|
132
|
-
} | undefined) => () => Promise<import("@layerfi/components/api/layer/bankTransactions").GetBankTransactionsReturn>;
|
|
133
|
-
getCategories: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
134
|
-
params?: Record<string, string | undefined> | undefined;
|
|
135
|
-
} | undefined) => () => Promise<{
|
|
136
|
-
data: {
|
|
137
|
-
type: "Category_List";
|
|
138
|
-
categories: import("@layerfi/components/types").Category[];
|
|
139
|
-
};
|
|
140
|
-
}>;
|
|
141
|
-
getChartOfAccounts: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
142
|
-
params?: Record<string, string | undefined> | undefined;
|
|
143
|
-
} | undefined) => () => Promise<{
|
|
144
|
-
data: import("@layerfi/components/types").ChartOfAccounts;
|
|
145
|
-
}>;
|
|
146
|
-
getProfitAndLoss: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
147
|
-
params?: Record<string, string | undefined> | undefined;
|
|
148
|
-
} | undefined) => () => Promise<{
|
|
149
|
-
data?: import("@layerfi/components/types").ProfitAndLoss | undefined;
|
|
150
|
-
error?: unknown;
|
|
151
|
-
}>;
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
}
|
|
155
|
-
declare module '@layerfi/components/api/util' {
|
|
156
|
-
export const formStringFromObject: (object: Record<string, string | number | boolean>) => string;
|
|
157
|
-
|
|
158
|
-
}
|
|
159
|
-
declare module '@layerfi/components/components/BalanceSheet/BalanceSheet' {
|
|
160
|
-
import React from 'react';
|
|
161
|
-
export const BalanceSheet: () => React.JSX.Element;
|
|
162
|
-
|
|
163
|
-
}
|
|
164
|
-
declare module '@layerfi/components/components/BalanceSheet/index' {
|
|
165
|
-
export { BalanceSheet } from '@layerfi/components/components/BalanceSheet/BalanceSheet';
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
declare module '@layerfi/components/components/BalanceSheetDatePicker/BalanceSheetDatePicker' {
|
|
169
|
-
import React from 'react';
|
|
170
|
-
type Props = {
|
|
171
|
-
value: Date;
|
|
172
|
-
onChange: React.ChangeEventHandler<HTMLInputElement>;
|
|
173
|
-
};
|
|
174
|
-
export const BalanceSheetDatePicker: ({ value, onChange }: Props) => React.JSX.Element;
|
|
175
|
-
export {};
|
|
176
|
-
|
|
177
|
-
}
|
|
178
|
-
declare module '@layerfi/components/components/BalanceSheetDatePicker/index' {
|
|
179
|
-
export { BalanceSheetDatePicker } from '@layerfi/components/components/BalanceSheetDatePicker/BalanceSheetDatePicker';
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
declare module '@layerfi/components/components/BalanceSheetRow/BalanceSheetRow' {
|
|
183
|
-
import React from 'react';
|
|
184
|
-
import { LineItem } from '@layerfi/components/types';
|
|
185
|
-
type Props = {
|
|
186
|
-
depth?: number;
|
|
187
|
-
maxDepth?: number;
|
|
188
|
-
lineItem?: LineItem | null;
|
|
189
|
-
variant?: string;
|
|
190
|
-
summarize?: boolean;
|
|
191
|
-
};
|
|
192
|
-
export const BalanceSheetRow: ({ lineItem, depth, maxDepth, variant, summarize, }: Props) => React.JSX.Element | null;
|
|
193
|
-
export {};
|
|
194
|
-
|
|
195
|
-
}
|
|
196
|
-
declare module '@layerfi/components/components/BalanceSheetRow/index' {
|
|
197
|
-
export { BalanceSheetRow } from '@layerfi/components/components/BalanceSheetRow/BalanceSheetRow';
|
|
198
|
-
|
|
199
|
-
}
|
|
200
|
-
declare module '@layerfi/components/components/BankTransactionRow/BankTransactionRow' {
|
|
201
|
-
import React from 'react';
|
|
202
|
-
import { BankTransaction } from '@layerfi/components/types';
|
|
203
|
-
type Props = {
|
|
204
|
-
dateFormat: string;
|
|
205
|
-
bankTransaction: BankTransaction;
|
|
206
|
-
isOpen: boolean;
|
|
207
|
-
toggleOpen: (id: string) => void;
|
|
208
|
-
editable: boolean;
|
|
209
|
-
};
|
|
210
|
-
export const BankTransactionRow: ({ dateFormat, bankTransaction, isOpen, toggleOpen, editable, }: Props) => React.JSX.Element | null;
|
|
211
|
-
export {};
|
|
212
|
-
|
|
213
|
-
}
|
|
214
|
-
declare module '@layerfi/components/components/BankTransactionRow/index' {
|
|
215
|
-
export { BankTransactionRow } from '@layerfi/components/components/BankTransactionRow/BankTransactionRow';
|
|
216
|
-
|
|
217
|
-
}
|
|
218
|
-
declare module '@layerfi/components/components/BankTransactions/BankTransactions' {
|
|
219
|
-
import React from 'react';
|
|
220
|
-
export const BankTransactions: () => React.JSX.Element;
|
|
221
|
-
|
|
222
|
-
}
|
|
223
|
-
declare module '@layerfi/components/components/BankTransactions/index' {
|
|
224
|
-
export { BankTransactions } from '@layerfi/components/components/BankTransactions/BankTransactions';
|
|
225
|
-
|
|
226
|
-
}
|
|
227
|
-
declare module '@layerfi/components/components/Button/Button' {
|
|
228
|
-
import React, { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
229
|
-
export enum ButtonVariant {
|
|
230
|
-
primary = "primary",
|
|
231
|
-
secondary = "secondary"
|
|
232
|
-
}
|
|
233
|
-
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
234
|
-
variant?: ButtonVariant;
|
|
235
|
-
leftIcon?: ReactNode;
|
|
236
|
-
rightIcon?: ReactNode;
|
|
237
|
-
}
|
|
238
|
-
export const Button: ({ className, children, variant, leftIcon, rightIcon, ...props }: ButtonProps) => React.JSX.Element;
|
|
239
|
-
|
|
240
|
-
}
|
|
241
|
-
declare module '@layerfi/components/components/Button/index' {
|
|
242
|
-
export { Button } from '@layerfi/components/components/Button/Button';
|
|
243
|
-
|
|
244
|
-
}
|
|
245
|
-
declare module '@layerfi/components/components/CategoryMenu/CategoryMenu' {
|
|
246
|
-
import React from 'react';
|
|
247
|
-
import { BankTransaction, Category } from '@layerfi/components/types';
|
|
248
|
-
type Props = {
|
|
249
|
-
name?: string;
|
|
250
|
-
bankTransaction: BankTransaction;
|
|
251
|
-
value: Category | undefined;
|
|
252
|
-
onChange: (newValue: Category) => void;
|
|
253
|
-
disabled?: boolean;
|
|
254
|
-
className?: string;
|
|
255
|
-
};
|
|
256
|
-
export const CategoryMenu: ({ bankTransaction, name, value, onChange, disabled, className, }: Props) => React.JSX.Element;
|
|
257
|
-
export {};
|
|
258
|
-
|
|
259
|
-
}
|
|
260
|
-
declare module '@layerfi/components/components/CategoryMenu/index' {
|
|
261
|
-
export { CategoryMenu } from '@layerfi/components/components/CategoryMenu/CategoryMenu';
|
|
262
|
-
|
|
263
|
-
}
|
|
264
|
-
declare module '@layerfi/components/components/ChartOfAccounts/ChartOfAccounts' {
|
|
265
|
-
import React from 'react';
|
|
266
|
-
export const ChartOfAccounts: () => React.JSX.Element;
|
|
267
|
-
|
|
268
|
-
}
|
|
269
|
-
declare module '@layerfi/components/components/ChartOfAccounts/index' {
|
|
270
|
-
export { ChartOfAccounts } from '@layerfi/components/components/ChartOfAccounts/ChartOfAccounts';
|
|
271
|
-
|
|
272
|
-
}
|
|
273
|
-
declare module '@layerfi/components/components/ChartOfAccountsNewForm/ChartOfAccountsNewForm' {
|
|
274
|
-
import React from 'react';
|
|
275
|
-
export const ChartOfAccountsNewForm: () => React.JSX.Element;
|
|
276
|
-
|
|
277
|
-
}
|
|
278
|
-
declare module '@layerfi/components/components/ChartOfAccountsNewForm/index' {
|
|
279
|
-
export { ChartOfAccountsNewForm } from '@layerfi/components/components/ChartOfAccountsNewForm/ChartOfAccountsNewForm';
|
|
280
|
-
|
|
281
|
-
}
|
|
282
|
-
declare module '@layerfi/components/components/ChartOfAccountsRow/ChartOfAccountsRow' {
|
|
283
|
-
import React from 'react';
|
|
284
|
-
import { Account } from '@layerfi/components/types';
|
|
285
|
-
type Props = {
|
|
286
|
-
account: Account;
|
|
287
|
-
depth?: number;
|
|
288
|
-
};
|
|
289
|
-
export const ChartOfAccountsRow: ({ account, depth }: Props) => React.JSX.Element;
|
|
290
|
-
export {};
|
|
291
|
-
|
|
292
|
-
}
|
|
293
|
-
declare module '@layerfi/components/components/ChartOfAccountsRow/index' {
|
|
294
|
-
export { ChartOfAccountsRow } from '@layerfi/components/components/ChartOfAccountsRow/ChartOfAccountsRow';
|
|
295
|
-
|
|
296
|
-
}
|
|
297
|
-
declare module '@layerfi/components/components/Container/Container' {
|
|
298
|
-
import React, { ReactNode } from 'react';
|
|
299
|
-
export interface ContainerProps {
|
|
300
|
-
name: string;
|
|
301
|
-
className?: string;
|
|
302
|
-
children: ReactNode;
|
|
303
|
-
}
|
|
304
|
-
export const Container: ({ name, className, children }: ContainerProps) => React.JSX.Element;
|
|
305
|
-
|
|
306
|
-
}
|
|
307
|
-
declare module '@layerfi/components/components/Container/Header' {
|
|
308
|
-
import React, { ReactNode } from 'react';
|
|
309
|
-
export interface HeaderProps {
|
|
310
|
-
className?: string;
|
|
311
|
-
children: ReactNode;
|
|
312
|
-
}
|
|
313
|
-
export const Header: ({ className, children }: HeaderProps) => React.JSX.Element;
|
|
314
|
-
|
|
315
|
-
}
|
|
316
|
-
declare module '@layerfi/components/components/Container/index' {
|
|
317
|
-
export { Container } from '@layerfi/components/components/Container/Container';
|
|
318
|
-
export { Header } from '@layerfi/components/components/Container/Header';
|
|
319
|
-
|
|
320
|
-
}
|
|
321
|
-
declare module '@layerfi/components/components/ExpandedBankTransactionRow/ExpandedBankTransactionRow' {
|
|
322
|
-
import React from 'react';
|
|
323
|
-
import { BankTransaction } from '@layerfi/components/types';
|
|
324
|
-
type Props = {
|
|
325
|
-
bankTransaction: BankTransaction;
|
|
326
|
-
close?: () => void;
|
|
327
|
-
isOpen?: boolean;
|
|
328
|
-
};
|
|
329
|
-
export type SaveHandle = {
|
|
330
|
-
save: () => void;
|
|
331
|
-
};
|
|
332
|
-
export const ExpandedBankTransactionRow: React.ForwardRefExoticComponent<Props & React.RefAttributes<SaveHandle>>;
|
|
333
|
-
export {};
|
|
334
|
-
|
|
335
|
-
}
|
|
336
|
-
declare module '@layerfi/components/components/ExpandedBankTransactionRow/index' {
|
|
337
|
-
export { ExpandedBankTransactionRow } from '@layerfi/components/components/ExpandedBankTransactionRow/ExpandedBankTransactionRow';
|
|
338
|
-
|
|
339
|
-
}
|
|
340
|
-
declare module '@layerfi/components/components/Hello/Hello' {
|
|
341
|
-
import React from 'react';
|
|
342
|
-
type Props = {
|
|
343
|
-
user?: string | undefined;
|
|
344
|
-
};
|
|
345
|
-
export const Hello: ({ user }: Props) => React.JSX.Element;
|
|
346
|
-
export {};
|
|
347
|
-
|
|
348
|
-
}
|
|
349
|
-
declare module '@layerfi/components/components/Hello/index' {
|
|
350
|
-
export { Hello } from '@layerfi/components/components/Hello/Hello';
|
|
351
|
-
|
|
352
|
-
}
|
|
353
|
-
declare module '@layerfi/components/components/Input/FileInput' {
|
|
354
|
-
import React from 'react';
|
|
355
|
-
export interface FileInputProps {
|
|
356
|
-
text?: string;
|
|
357
|
-
onUpload?: (file: File) => void;
|
|
358
|
-
}
|
|
359
|
-
export const FileInput: ({ text, onUpload }: FileInputProps) => React.JSX.Element;
|
|
360
|
-
|
|
361
|
-
}
|
|
362
|
-
declare module '@layerfi/components/components/Input/Input' {
|
|
363
|
-
import React, { HTMLProps } from 'react';
|
|
364
|
-
export const Input: ({ className, ...props }: HTMLProps<HTMLInputElement>) => React.JSX.Element;
|
|
365
|
-
|
|
366
|
-
}
|
|
367
|
-
declare module '@layerfi/components/components/Input/InputGroup' {
|
|
368
|
-
import React, { ReactNode } from 'react';
|
|
369
|
-
export interface InputGroupProps {
|
|
370
|
-
label?: string;
|
|
371
|
-
name?: string;
|
|
372
|
-
className?: string;
|
|
373
|
-
children?: ReactNode;
|
|
374
|
-
}
|
|
375
|
-
export const InputGroup: ({ label, name, className, children, }: InputGroupProps) => React.JSX.Element;
|
|
376
|
-
|
|
377
|
-
}
|
|
378
|
-
declare module '@layerfi/components/components/Input/index' {
|
|
379
|
-
export { Input } from '@layerfi/components/components/Input/Input';
|
|
380
|
-
export { InputGroup } from '@layerfi/components/components/Input/InputGroup';
|
|
381
|
-
export { FileInput } from '@layerfi/components/components/Input/FileInput';
|
|
382
|
-
|
|
383
|
-
}
|
|
384
|
-
declare module '@layerfi/components/components/Pill/Pill' {
|
|
385
|
-
import React, { PropsWithChildren } from 'react';
|
|
386
|
-
export const Pill: ({ children }: PropsWithChildren) => React.JSX.Element;
|
|
387
|
-
|
|
388
|
-
}
|
|
389
|
-
declare module '@layerfi/components/components/Pill/index' {
|
|
390
|
-
export { Pill } from '@layerfi/components/components/Pill/Pill';
|
|
391
|
-
|
|
392
|
-
}
|
|
393
|
-
declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
|
|
394
|
-
import React, { PropsWithChildren } from 'react';
|
|
395
|
-
const ProfitAndLoss: {
|
|
396
|
-
({ children }: PropsWithChildren): React.JSX.Element;
|
|
397
|
-
Chart: () => React.JSX.Element;
|
|
398
|
-
Context: React.Context<{
|
|
399
|
-
data: import("@layerfi/components/types").ProfitAndLoss | undefined;
|
|
400
|
-
isLoading: boolean;
|
|
401
|
-
error: unknown;
|
|
402
|
-
dateRange: import("@layerfi/components/types").DateRange;
|
|
403
|
-
changeDateRange: (dateRange: Partial<import("@layerfi/components/types").DateRange>) => void;
|
|
404
|
-
}>;
|
|
405
|
-
DatePicker: () => React.JSX.Element;
|
|
406
|
-
Summaries: () => React.JSX.Element;
|
|
407
|
-
Table: () => React.JSX.Element;
|
|
408
|
-
};
|
|
409
|
-
export { ProfitAndLoss };
|
|
410
|
-
|
|
411
|
-
}
|
|
412
|
-
declare module '@layerfi/components/components/ProfitAndLoss/index' {
|
|
413
|
-
export { ProfitAndLoss } from '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss';
|
|
414
|
-
|
|
415
|
-
}
|
|
416
|
-
declare module '@layerfi/components/components/ProfitAndLossChart/Indicator' {
|
|
417
|
-
import React from 'react';
|
|
418
|
-
import { Props as BaseProps } from 'recharts/types/component/Label';
|
|
419
|
-
type Props = BaseProps & {
|
|
420
|
-
animateFrom: number;
|
|
421
|
-
setAnimateFrom: (x: number) => void;
|
|
422
|
-
};
|
|
423
|
-
export const Indicator: ({ viewBox, className, animateFrom, setAnimateFrom, }: Props) => React.JSX.Element | null;
|
|
424
|
-
export {};
|
|
425
|
-
|
|
426
|
-
}
|
|
427
|
-
declare module '@layerfi/components/components/ProfitAndLossChart/ProfitAndLossChart' {
|
|
428
|
-
import React from 'react';
|
|
429
|
-
export const ProfitAndLossChart: () => React.JSX.Element;
|
|
430
|
-
|
|
431
|
-
}
|
|
432
|
-
declare module '@layerfi/components/components/ProfitAndLossChart/index' {
|
|
433
|
-
export { ProfitAndLossChart } from '@layerfi/components/components/ProfitAndLossChart/ProfitAndLossChart';
|
|
434
|
-
|
|
435
|
-
}
|
|
436
|
-
declare module '@layerfi/components/components/ProfitAndLossDatePicker/ProfitAndLossDatePicker' {
|
|
437
|
-
import React from 'react';
|
|
438
|
-
export const ProfitAndLossDatePicker: () => React.JSX.Element;
|
|
439
|
-
|
|
440
|
-
}
|
|
441
|
-
declare module '@layerfi/components/components/ProfitAndLossDatePicker/index' {
|
|
442
|
-
export { ProfitAndLossDatePicker } from '@layerfi/components/components/ProfitAndLossDatePicker/ProfitAndLossDatePicker';
|
|
443
|
-
|
|
444
|
-
}
|
|
445
|
-
declare module '@layerfi/components/components/ProfitAndLossRow/ProfitAndLossRow' {
|
|
446
|
-
import React from 'react';
|
|
447
|
-
import { Direction, LineItem } from '@layerfi/components/types';
|
|
448
|
-
type Props = {
|
|
449
|
-
variant?: string;
|
|
450
|
-
depth?: number;
|
|
451
|
-
maxDepth?: number;
|
|
452
|
-
lineItem?: LineItem | null;
|
|
453
|
-
direction?: Direction;
|
|
454
|
-
summarize?: boolean;
|
|
455
|
-
};
|
|
456
|
-
export const ProfitAndLossRow: ({ variant, lineItem, depth, maxDepth, direction, summarize, }: Props) => React.JSX.Element | null;
|
|
457
|
-
export {};
|
|
458
|
-
|
|
459
|
-
}
|
|
460
|
-
declare module '@layerfi/components/components/ProfitAndLossRow/index' {
|
|
461
|
-
export { ProfitAndLossRow } from '@layerfi/components/components/ProfitAndLossRow/ProfitAndLossRow';
|
|
462
|
-
|
|
463
|
-
}
|
|
464
|
-
declare module '@layerfi/components/components/ProfitAndLossSummaries/ProfitAndLossSummaries' {
|
|
465
|
-
import React from 'react';
|
|
466
|
-
export const ProfitAndLossSummaries: () => React.JSX.Element;
|
|
467
|
-
|
|
468
|
-
}
|
|
469
|
-
declare module '@layerfi/components/components/ProfitAndLossSummaries/index' {
|
|
470
|
-
export { ProfitAndLossSummaries } from '@layerfi/components/components/ProfitAndLossSummaries/ProfitAndLossSummaries';
|
|
471
|
-
|
|
472
|
-
}
|
|
473
|
-
declare module '@layerfi/components/components/ProfitAndLossTable/ProfitAndLossTable' {
|
|
474
|
-
import React from 'react';
|
|
475
|
-
export const ProfitAndLossTable: () => React.JSX.Element;
|
|
476
|
-
|
|
477
|
-
}
|
|
478
|
-
declare module '@layerfi/components/components/ProfitAndLossTable/empty_profit_and_loss_report' {
|
|
479
|
-
import { ProfitAndLoss } from '@layerfi/components/types';
|
|
480
|
-
const _default: ProfitAndLoss;
|
|
481
|
-
export default _default;
|
|
482
|
-
|
|
483
|
-
}
|
|
484
|
-
declare module '@layerfi/components/components/ProfitAndLossTable/index' {
|
|
485
|
-
export { ProfitAndLossTable } from '@layerfi/components/components/ProfitAndLossTable/ProfitAndLossTable';
|
|
486
|
-
|
|
487
|
-
}
|
|
488
|
-
declare module '@layerfi/components/components/RadioButtonGroup/RadioButton' {
|
|
489
|
-
import React from 'react';
|
|
490
|
-
type Props = {
|
|
491
|
-
checked: boolean;
|
|
492
|
-
label: string;
|
|
493
|
-
name: string;
|
|
494
|
-
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
495
|
-
value: string;
|
|
496
|
-
disabled?: boolean;
|
|
497
|
-
size: 'small' | 'large';
|
|
498
|
-
};
|
|
499
|
-
export const RadioButton: ({ checked, label, name, onChange, value, disabled, size, }: Props) => React.JSX.Element;
|
|
500
|
-
export {};
|
|
501
|
-
|
|
502
|
-
}
|
|
503
|
-
declare module '@layerfi/components/components/RadioButtonGroup/RadioButtonGroup' {
|
|
504
|
-
import React from 'react';
|
|
505
|
-
export type RadioButtonLabel = {
|
|
506
|
-
label: string;
|
|
507
|
-
value: string;
|
|
508
|
-
disabled?: boolean;
|
|
509
|
-
};
|
|
510
|
-
type Props = {
|
|
511
|
-
name: string;
|
|
512
|
-
size?: 'small' | 'large';
|
|
513
|
-
buttons: RadioButtonLabel[];
|
|
514
|
-
selected?: RadioButtonLabel['value'];
|
|
515
|
-
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
516
|
-
};
|
|
517
|
-
export const RadioButtonGroup: ({ name, size, buttons, onChange, selected, }: Props) => React.JSX.Element;
|
|
518
|
-
export {};
|
|
519
|
-
|
|
520
|
-
}
|
|
521
|
-
declare module '@layerfi/components/components/RadioButtonGroup/index' {
|
|
522
|
-
export { RadioButtonGroup } from '@layerfi/components/components/RadioButtonGroup/RadioButtonGroup';
|
|
523
|
-
|
|
524
|
-
}
|
|
525
|
-
declare module '@layerfi/components/components/SkeletonBalanceSheetRow/SkeletonBalanceSheetRow' {
|
|
526
|
-
import React, { PropsWithChildren } from 'react';
|
|
527
|
-
type Props = PropsWithChildren;
|
|
528
|
-
export const SkeletonBalanceSheetRow: ({ children }: Props) => React.JSX.Element;
|
|
529
|
-
export {};
|
|
530
|
-
|
|
531
|
-
}
|
|
532
|
-
declare module '@layerfi/components/components/SkeletonBalanceSheetRow/index' {
|
|
533
|
-
export { SkeletonBalanceSheetRow } from '@layerfi/components/components/SkeletonBalanceSheetRow/SkeletonBalanceSheetRow';
|
|
534
|
-
|
|
535
|
-
}
|
|
536
|
-
declare module '@layerfi/components/components/Textarea/Textarea' {
|
|
537
|
-
import React, { HTMLProps } from 'react';
|
|
538
|
-
export const Textarea: ({ className, ...props }: HTMLProps<HTMLTextAreaElement>) => React.JSX.Element;
|
|
539
|
-
|
|
540
|
-
}
|
|
541
|
-
declare module '@layerfi/components/components/Textarea/index' {
|
|
542
|
-
export { Textarea } from '@layerfi/components/components/Textarea/Textarea';
|
|
543
|
-
|
|
544
|
-
}
|
|
545
|
-
declare module '@layerfi/components/components/Toggle/Toggle' {
|
|
546
|
-
import React, { ChangeEvent, ReactNode } from 'react';
|
|
547
|
-
export interface Option {
|
|
548
|
-
label: string;
|
|
549
|
-
value: string;
|
|
550
|
-
disabled?: boolean;
|
|
551
|
-
leftIcon?: ReactNode;
|
|
552
|
-
}
|
|
553
|
-
export enum ToggleSize {
|
|
554
|
-
medium = "medium",
|
|
555
|
-
small = "small"
|
|
556
|
-
}
|
|
557
|
-
export interface ToggleProps {
|
|
558
|
-
name: string;
|
|
559
|
-
size?: ToggleSize;
|
|
560
|
-
options: Option[];
|
|
561
|
-
selected?: Option['value'];
|
|
562
|
-
onChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
563
|
-
}
|
|
564
|
-
export const Toggle: ({ name, options, selected, onChange, size, }: ToggleProps) => React.JSX.Element;
|
|
565
|
-
|
|
566
|
-
}
|
|
567
|
-
declare module '@layerfi/components/components/Toggle/index' {
|
|
568
|
-
export { Toggle } from '@layerfi/components/components/Toggle/Toggle';
|
|
569
|
-
|
|
570
|
-
}
|
|
571
|
-
declare module '@layerfi/components/components/Typography/Heading' {
|
|
572
|
-
import React, { ReactNode } from 'react';
|
|
573
|
-
export enum HeadingSize {
|
|
574
|
-
primary = "primary",
|
|
575
|
-
secondary = "secondary"
|
|
576
|
-
}
|
|
577
|
-
export interface HeadingProps {
|
|
578
|
-
as?: React.ElementType;
|
|
579
|
-
className?: string;
|
|
580
|
-
children: ReactNode;
|
|
581
|
-
size?: HeadingSize;
|
|
582
|
-
}
|
|
583
|
-
export const Heading: ({ as: Component, className, children, size, }: HeadingProps) => React.JSX.Element;
|
|
584
|
-
|
|
585
|
-
}
|
|
586
|
-
declare module '@layerfi/components/components/Typography/Text' {
|
|
587
|
-
import React, { ReactNode } from 'react';
|
|
588
|
-
export enum TextSize {
|
|
589
|
-
md = "md",
|
|
590
|
-
sm = "sm"
|
|
591
|
-
}
|
|
592
|
-
export enum TextWeight {
|
|
593
|
-
normal = "normal",
|
|
594
|
-
bold = "bold"
|
|
595
|
-
}
|
|
596
|
-
export interface TextProps {
|
|
597
|
-
as?: React.ElementType;
|
|
598
|
-
className?: string;
|
|
599
|
-
children: ReactNode;
|
|
600
|
-
size?: TextSize;
|
|
601
|
-
weight?: TextWeight;
|
|
602
|
-
htmlFor?: string;
|
|
603
|
-
}
|
|
604
|
-
export const Text: ({ as: Component, className, children, size, weight, ...props }: TextProps) => React.JSX.Element;
|
|
605
|
-
|
|
606
|
-
}
|
|
607
|
-
declare module '@layerfi/components/components/Typography/index' {
|
|
608
|
-
export { Text, TextSize, TextWeight } from '@layerfi/components/components/Typography/Text';
|
|
609
|
-
export { Heading, HeadingSize } from '@layerfi/components/components/Typography/Heading';
|
|
610
|
-
|
|
611
|
-
}
|
|
612
|
-
declare module '@layerfi/components/contexts/LayerContext/LayerContext' {
|
|
613
|
-
/// <reference types="react" />
|
|
614
|
-
import { LayerContextValues } from '@layerfi/components/types';
|
|
615
|
-
export const LayerContext: import("react").Context<LayerContextValues>;
|
|
616
|
-
|
|
617
|
-
}
|
|
618
|
-
declare module '@layerfi/components/contexts/LayerContext/index' {
|
|
619
|
-
export { LayerContext } from '@layerfi/components/contexts/LayerContext/LayerContext';
|
|
620
|
-
|
|
621
|
-
}
|
|
622
|
-
declare module '@layerfi/components/hooks/useBalanceSheet/index' {
|
|
623
|
-
export { useBalanceSheet } from '@layerfi/components/hooks/useBalanceSheet/useBalanceSheet';
|
|
624
|
-
|
|
625
|
-
}
|
|
626
|
-
declare module '@layerfi/components/hooks/useBalanceSheet/useBalanceSheet' {
|
|
627
|
-
import { BalanceSheet } from '@layerfi/components/types';
|
|
628
|
-
type UseBalanceSheet = (date?: Date) => {
|
|
629
|
-
data: BalanceSheet | undefined;
|
|
630
|
-
isLoading: boolean;
|
|
631
|
-
error: unknown;
|
|
632
|
-
};
|
|
633
|
-
export const useBalanceSheet: UseBalanceSheet;
|
|
634
|
-
export {};
|
|
635
|
-
|
|
636
|
-
}
|
|
637
|
-
declare module '@layerfi/components/hooks/useBankTransactions/index' {
|
|
638
|
-
export { useBankTransactions } from '@layerfi/components/hooks/useBankTransactions/useBankTransactions';
|
|
639
|
-
|
|
640
|
-
}
|
|
641
|
-
declare module '@layerfi/components/hooks/useBankTransactions/useBankTransactions' {
|
|
642
|
-
import { BankTransaction, CategoryUpdate, Metadata } from '@layerfi/components/types';
|
|
643
|
-
type UseBankTransactions = () => {
|
|
644
|
-
data: BankTransaction[];
|
|
645
|
-
metadata: Metadata;
|
|
646
|
-
isLoading: boolean;
|
|
647
|
-
error: unknown;
|
|
648
|
-
categorize: (id: BankTransaction['id'], newCategory: CategoryUpdate) => Promise<void>;
|
|
649
|
-
updateOneLocal: (bankTransaction: BankTransaction) => void;
|
|
650
|
-
};
|
|
651
|
-
export const useBankTransactions: UseBankTransactions;
|
|
652
|
-
export {};
|
|
653
|
-
|
|
654
|
-
}
|
|
655
|
-
declare module '@layerfi/components/hooks/useChartOfAccounts/index' {
|
|
656
|
-
export { useChartOfAccounts } from '@layerfi/components/hooks/useChartOfAccounts/useChartOfAccounts';
|
|
657
|
-
|
|
658
|
-
}
|
|
659
|
-
declare module '@layerfi/components/hooks/useChartOfAccounts/useChartOfAccounts' {
|
|
660
|
-
import { AccountAlternate, ChartOfAccounts, NewAccount } from '@layerfi/components/types';
|
|
661
|
-
type UseChartOfAccounts = () => {
|
|
662
|
-
data: ChartOfAccounts | undefined;
|
|
663
|
-
isLoading: boolean;
|
|
664
|
-
error: unknown;
|
|
665
|
-
create: (newAccount: NewAccount) => Promise<AccountAlternate>;
|
|
666
|
-
};
|
|
667
|
-
export const useChartOfAccounts: UseChartOfAccounts;
|
|
668
|
-
export {};
|
|
669
|
-
|
|
670
|
-
}
|
|
671
|
-
declare module '@layerfi/components/hooks/useLayerContext/index' {
|
|
672
|
-
export { useLayerContext } from '@layerfi/components/hooks/useLayerContext/useLayerContext';
|
|
673
|
-
|
|
674
|
-
}
|
|
675
|
-
declare module '@layerfi/components/hooks/useLayerContext/useLayerContext' {
|
|
676
|
-
export const useLayerContext: () => import("@layerfi/components/types").LayerContextValues;
|
|
677
|
-
|
|
678
|
-
}
|
|
679
|
-
declare module '@layerfi/components/hooks/useProfitAndLoss/index' {
|
|
680
|
-
export { useProfitAndLoss } from '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss';
|
|
681
|
-
|
|
682
|
-
}
|
|
683
|
-
declare module '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss' {
|
|
684
|
-
import { ProfitAndLoss, DateRange } from '@layerfi/components/types';
|
|
685
|
-
type Props = DateRange;
|
|
686
|
-
type UseProfitAndLoss = (props?: Props) => {
|
|
687
|
-
data: ProfitAndLoss | undefined;
|
|
688
|
-
isLoading: boolean;
|
|
689
|
-
error: unknown;
|
|
690
|
-
dateRange: DateRange;
|
|
691
|
-
changeDateRange: (dateRange: Partial<DateRange>) => void;
|
|
692
|
-
};
|
|
693
|
-
export const useProfitAndLoss: UseProfitAndLoss;
|
|
694
|
-
export {};
|
|
695
|
-
|
|
696
|
-
}
|
|
697
|
-
declare module '@layerfi/components/icons/Calendar' {
|
|
698
|
-
import * as React from 'react';
|
|
699
|
-
import { SVGProps } from 'react';
|
|
700
|
-
const Calendar: (props: SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
701
|
-
export default Calendar;
|
|
702
|
-
|
|
703
|
-
}
|
|
704
|
-
declare module '@layerfi/components/icons/CheckedCircle' {
|
|
705
|
-
import * as React from 'react';
|
|
706
|
-
import { SVGProps } from 'react';
|
|
707
|
-
type Props = SVGProps<SVGSVGElement> & {
|
|
708
|
-
size: SVGProps<SVGSVGElement>['width'];
|
|
709
|
-
fillColor: string;
|
|
710
|
-
strokeColor: string;
|
|
711
|
-
};
|
|
712
|
-
const CheckedCircle: ({ fillColor, strokeColor, size, ...props }: Props) => React.JSX.Element;
|
|
713
|
-
export default CheckedCircle;
|
|
714
|
-
|
|
715
|
-
}
|
|
716
|
-
declare module '@layerfi/components/icons/ChevronDown' {
|
|
717
|
-
import * as React from 'react';
|
|
718
|
-
import { IconSvgProps } from '@layerfi/components/icons/types';
|
|
719
|
-
const ChevronDown: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
720
|
-
export default ChevronDown;
|
|
721
|
-
|
|
722
|
-
}
|
|
723
|
-
declare module '@layerfi/components/icons/ChevronLeft' {
|
|
724
|
-
import * as React from 'react';
|
|
725
|
-
import { SVGProps } from 'react';
|
|
726
|
-
type Props = {
|
|
727
|
-
strokeColor?: string;
|
|
728
|
-
size?: number;
|
|
729
|
-
};
|
|
730
|
-
const ChevronLeft: ({ strokeColor, size, ...props }: Props & SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
731
|
-
export default ChevronLeft;
|
|
732
|
-
|
|
733
|
-
}
|
|
734
|
-
declare module '@layerfi/components/icons/ChevronRight' {
|
|
735
|
-
import * as React from 'react';
|
|
736
|
-
import { SVGProps } from 'react';
|
|
737
|
-
type Props = SVGProps<SVGSVGElement> & {
|
|
738
|
-
size: SVGProps<SVGSVGElement>['width'];
|
|
739
|
-
};
|
|
740
|
-
const ChavronRight: ({ size, ...props }: Props) => React.JSX.Element;
|
|
741
|
-
export default ChavronRight;
|
|
742
|
-
|
|
743
|
-
}
|
|
744
|
-
declare module '@layerfi/components/icons/DownloadCloud' {
|
|
745
|
-
import * as React from 'react';
|
|
746
|
-
import { SVGProps } from 'react';
|
|
747
|
-
const DownloadCloud: (props: SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
748
|
-
export default DownloadCloud;
|
|
749
|
-
|
|
750
|
-
}
|
|
751
|
-
declare module '@layerfi/components/icons/FolderPlus' {
|
|
752
|
-
import * as React from 'react';
|
|
753
|
-
import { IconSvgProps } from '@layerfi/components/icons/types';
|
|
754
|
-
const FolderPlus: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
755
|
-
export default FolderPlus;
|
|
756
|
-
|
|
757
|
-
}
|
|
758
|
-
declare module '@layerfi/components/icons/Link' {
|
|
759
|
-
import * as React from 'react';
|
|
760
|
-
import { SVGProps } from 'react';
|
|
761
|
-
type Props = SVGProps<SVGSVGElement> & {
|
|
762
|
-
size: SVGProps<SVGSVGElement>['width'];
|
|
763
|
-
};
|
|
764
|
-
const Link: ({ size, ...props }: Props) => React.JSX.Element;
|
|
765
|
-
export default Link;
|
|
766
|
-
|
|
767
|
-
}
|
|
768
|
-
declare module '@layerfi/components/icons/LinkBroken' {
|
|
769
|
-
import * as React from 'react';
|
|
770
|
-
import { SVGProps } from 'react';
|
|
771
|
-
type Props = SVGProps<SVGSVGElement> & {
|
|
772
|
-
size: SVGProps<SVGSVGElement>['width'];
|
|
773
|
-
};
|
|
774
|
-
const LinkBroken: ({ size, ...props }: Props) => React.JSX.Element;
|
|
775
|
-
export default LinkBroken;
|
|
776
|
-
|
|
777
|
-
}
|
|
778
|
-
declare module '@layerfi/components/icons/RefreshCcw' {
|
|
779
|
-
import * as React from 'react';
|
|
780
|
-
import { IconSvgProps } from '@layerfi/components/icons/types';
|
|
781
|
-
const RefreshCcw: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
782
|
-
export default RefreshCcw;
|
|
783
|
-
|
|
784
|
-
}
|
|
785
|
-
declare module '@layerfi/components/icons/UploadCloud' {
|
|
786
|
-
import * as React from 'react';
|
|
787
|
-
import { IconSvgProps } from '@layerfi/components/icons/types';
|
|
788
|
-
const UploadCloud: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
789
|
-
export default UploadCloud;
|
|
790
|
-
|
|
791
|
-
}
|
|
792
|
-
declare module '@layerfi/components/icons/types' {
|
|
793
|
-
import { SVGProps } from 'react';
|
|
794
|
-
export type IconSvgProps = SVGProps<SVGSVGElement> & {
|
|
795
|
-
size?: SVGProps<SVGSVGElement>['width'];
|
|
796
|
-
};
|
|
797
|
-
|
|
798
|
-
}
|
|
799
|
-
declare module '@layerfi/components/index' {
|
|
800
|
-
export { BalanceSheet } from '@layerfi/components/components/BalanceSheet/index';
|
|
801
|
-
export { BankTransactions } from '@layerfi/components/components/BankTransactions/index';
|
|
802
|
-
export { Hello } from '@layerfi/components/components/Hello/index';
|
|
803
|
-
export { ProfitAndLoss } from '@layerfi/components/components/ProfitAndLoss/index';
|
|
804
|
-
export { LayerProvider } from '@layerfi/components/providers/LayerProvider/index';
|
|
805
|
-
export { ChartOfAccounts } from '@layerfi/components/components/ChartOfAccounts/index';
|
|
806
|
-
|
|
807
|
-
}
|
|
808
|
-
declare module '@layerfi/components/models/APIError' {
|
|
809
|
-
export interface APIErrorMessage {
|
|
810
|
-
type?: string;
|
|
811
|
-
description?: string;
|
|
812
|
-
}
|
|
813
|
-
export class APIError extends Error {
|
|
814
|
-
code?: number;
|
|
815
|
-
info?: string;
|
|
816
|
-
messages?: APIErrorMessage[];
|
|
817
|
-
constructor(message: string, code?: number, messages?: APIErrorMessage[]);
|
|
818
|
-
getMessage(): string;
|
|
819
|
-
getAllMessages(): (string | undefined)[] | undefined;
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
}
|
|
823
|
-
declare module '@layerfi/components/models/Money' {
|
|
824
|
-
export const centsToDollars: (cents?: number) => string;
|
|
825
|
-
export const dollarsToCents: (dollars?: string) => number;
|
|
826
|
-
const _default: {
|
|
827
|
-
centsToDollars: (cents?: number) => string;
|
|
828
|
-
dollarsToCents: (dollars?: string) => number;
|
|
829
|
-
};
|
|
830
|
-
export default _default;
|
|
831
|
-
|
|
832
|
-
}
|
|
833
|
-
declare module '@layerfi/components/providers/LayerProvider/LayerProvider' {
|
|
834
|
-
import React, { PropsWithChildren } from 'react';
|
|
835
|
-
type LayerEnvironmentConfig = {
|
|
836
|
-
url: string;
|
|
837
|
-
scope: string;
|
|
838
|
-
apiUrl: string;
|
|
839
|
-
};
|
|
840
|
-
export const LayerEnvironment: Record<string, LayerEnvironmentConfig>;
|
|
841
|
-
type Props = {
|
|
842
|
-
businessId: string;
|
|
843
|
-
appId: string;
|
|
844
|
-
appSecret: string;
|
|
845
|
-
clientId: string;
|
|
846
|
-
environment?: keyof typeof LayerEnvironment;
|
|
847
|
-
};
|
|
848
|
-
export const LayerProvider: ({ appId, appSecret, businessId, children, clientId, environment, }: PropsWithChildren<Props>) => React.JSX.Element;
|
|
849
|
-
export {};
|
|
850
|
-
|
|
851
|
-
}
|
|
852
|
-
declare module '@layerfi/components/providers/LayerProvider/index' {
|
|
853
|
-
export { LayerProvider } from '@layerfi/components/providers/LayerProvider/LayerProvider';
|
|
854
|
-
|
|
855
|
-
}
|
|
856
|
-
declare module '@layerfi/components/types/api' {
|
|
857
|
-
export interface PaginationMetadata {
|
|
858
|
-
sort_by?: string;
|
|
859
|
-
sort_order: string;
|
|
860
|
-
cursor?: string;
|
|
861
|
-
has_more: boolean;
|
|
862
|
-
}
|
|
863
|
-
export type Metadata = {
|
|
864
|
-
pagination?: PaginationMetadata;
|
|
865
|
-
};
|
|
866
|
-
|
|
867
|
-
}
|
|
868
|
-
declare module '@layerfi/components/types/authentication' {
|
|
869
|
-
export type OAuthResponse = {
|
|
870
|
-
access_token: string;
|
|
871
|
-
token_type: string;
|
|
872
|
-
expires_in: number;
|
|
873
|
-
};
|
|
874
|
-
export type ExpiringOAuthResponse = OAuthResponse & {
|
|
875
|
-
expires_at: Date;
|
|
876
|
-
};
|
|
877
|
-
|
|
878
|
-
}
|
|
879
|
-
declare module '@layerfi/components/types/balance_sheet' {
|
|
880
|
-
import { LineItem } from '@layerfi/components/types/line_item';
|
|
881
|
-
export interface BalanceSheet {
|
|
882
|
-
business_id: string;
|
|
883
|
-
type: 'Balance_Sheet';
|
|
884
|
-
start_date: string;
|
|
885
|
-
end_date: string;
|
|
886
|
-
assets: LineItem[];
|
|
887
|
-
liabilities_and_equity: LineItem[];
|
|
888
|
-
fully_categorized: boolean;
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
}
|
|
892
|
-
declare module '@layerfi/components/types/bank_transactions' {
|
|
893
|
-
import { Categorization, CategorizationStatus, Category } from '@layerfi/components/types/categories';
|
|
894
|
-
export enum Direction {
|
|
895
|
-
CREDIT = "CREDIT",
|
|
896
|
-
DEBIT = "DEBIT"
|
|
897
|
-
}
|
|
898
|
-
export interface BankTransaction extends Record<string, unknown> {
|
|
899
|
-
type: 'Bank_Transaction';
|
|
900
|
-
account_name?: string;
|
|
901
|
-
business_id: string;
|
|
902
|
-
recently_categorized?: boolean;
|
|
903
|
-
id: string;
|
|
904
|
-
date: string;
|
|
905
|
-
source: string;
|
|
906
|
-
source_transaction_id: string;
|
|
907
|
-
source_account_id: string;
|
|
908
|
-
imported_at: string;
|
|
909
|
-
description: string | null;
|
|
910
|
-
amount: number;
|
|
911
|
-
direction: Direction;
|
|
912
|
-
counterparty_name: string;
|
|
913
|
-
category: Category;
|
|
914
|
-
categorization_status: CategorizationStatus;
|
|
915
|
-
categorization_flow: Categorization;
|
|
916
|
-
categorization_method: string;
|
|
917
|
-
error?: string;
|
|
918
|
-
processing?: boolean;
|
|
919
|
-
}
|
|
920
|
-
|
|
921
|
-
}
|
|
922
|
-
declare module '@layerfi/components/types/categories' {
|
|
923
|
-
export enum CategorizationStatus {
|
|
924
|
-
PENDING = "PENDING",
|
|
925
|
-
READY_FOR_INPUT = "READY_FOR_INPUT",
|
|
926
|
-
LAYER_REVIEW = "LAYER_REVIEW",
|
|
927
|
-
CATEGORIZED = "CATEGORIZED",
|
|
928
|
-
SPLIT = "SPLIT",
|
|
929
|
-
JOURNALING = "JOURNALING"
|
|
930
|
-
}
|
|
931
|
-
export interface Category {
|
|
932
|
-
id: string;
|
|
933
|
-
type: string;
|
|
934
|
-
display_name: string;
|
|
935
|
-
category: string;
|
|
936
|
-
stable_name?: string;
|
|
937
|
-
subCategories?: Category[];
|
|
938
|
-
}
|
|
939
|
-
export enum CategorizationType {
|
|
940
|
-
AUTO = "AUTO",
|
|
941
|
-
ASK_FROM_SUGGESTIONS = "ASK_FROM_SUGGESTIONS",
|
|
942
|
-
MEALS = "MEALS",
|
|
943
|
-
BUSINESS_TRAVEL_TRANSPORTATION = "BUSINESS_TRAVEL_TRANSPORTATION"
|
|
944
|
-
}
|
|
945
|
-
export interface AutoCategorization {
|
|
946
|
-
type: CategorizationType.AUTO;
|
|
947
|
-
category: Category;
|
|
948
|
-
}
|
|
949
|
-
export interface SuggestedCategorization {
|
|
950
|
-
type: CategorizationType;
|
|
951
|
-
suggestions: Category[];
|
|
952
|
-
}
|
|
953
|
-
export type Categorization = AutoCategorization | SuggestedCategorization;
|
|
954
|
-
export type SingleCategoryUpdate = {
|
|
955
|
-
type: 'Category';
|
|
956
|
-
category: {
|
|
957
|
-
type: 'StableName';
|
|
958
|
-
stable_name: string;
|
|
959
|
-
};
|
|
960
|
-
};
|
|
961
|
-
export type SplitCategoryUpdate = {
|
|
962
|
-
type: 'Split';
|
|
963
|
-
entries: {
|
|
964
|
-
category: string;
|
|
965
|
-
amount: number;
|
|
966
|
-
}[];
|
|
967
|
-
};
|
|
968
|
-
export type CategoryUpdate = SingleCategoryUpdate | SplitCategoryUpdate;
|
|
969
|
-
|
|
970
|
-
}
|
|
971
|
-
declare module '@layerfi/components/types/chart_of_accounts' {
|
|
972
|
-
import { Direction } from '@layerfi/components/types/bank_transactions';
|
|
973
|
-
import { Category } from '@layerfi/components/types/categories';
|
|
974
|
-
export interface ChartOfAccounts {
|
|
975
|
-
name: string;
|
|
976
|
-
accounts: Account[];
|
|
977
|
-
}
|
|
978
|
-
export interface Account {
|
|
979
|
-
id: string;
|
|
980
|
-
number: number;
|
|
981
|
-
pnlCategory?: Category;
|
|
982
|
-
headerForPnlCategory?: Category;
|
|
983
|
-
name: string;
|
|
984
|
-
accountStableName?: string;
|
|
985
|
-
description?: string;
|
|
986
|
-
scheduleCLine?: string;
|
|
987
|
-
scheduleCLineDescription?: string;
|
|
988
|
-
subAccounts?: Account[];
|
|
989
|
-
hidePnl: boolean;
|
|
990
|
-
showInPnlIfEmpty: boolean;
|
|
991
|
-
normality: Direction;
|
|
992
|
-
balance: number;
|
|
993
|
-
selfOnlyBalance: number;
|
|
994
|
-
}
|
|
995
|
-
export interface AccountAlternate {
|
|
996
|
-
type: 'Ledger_Account';
|
|
997
|
-
id: string;
|
|
998
|
-
name: string;
|
|
999
|
-
stable_name: string | null;
|
|
1000
|
-
normality: Direction;
|
|
1001
|
-
pnl_category: string | null;
|
|
1002
|
-
}
|
|
1003
|
-
export type NewAccount = {
|
|
1004
|
-
name: string;
|
|
1005
|
-
normality: Direction;
|
|
1006
|
-
parent_id: {
|
|
1007
|
-
type: 'AccountId';
|
|
1008
|
-
id: string;
|
|
1009
|
-
};
|
|
1010
|
-
description: string;
|
|
1011
|
-
};
|
|
1012
|
-
|
|
1013
|
-
}
|
|
1014
|
-
declare module '@layerfi/components/types/layer_context' {
|
|
1015
|
-
import { Category } from '@layerfi/components/types';
|
|
1016
|
-
import { ExpiringOAuthResponse } from '@layerfi/components/types/authentication';
|
|
1017
|
-
export type LayerContextValues = {
|
|
1018
|
-
auth: ExpiringOAuthResponse;
|
|
1019
|
-
businessId: string;
|
|
1020
|
-
categories: Category[];
|
|
1021
|
-
apiUrl: string;
|
|
1022
|
-
};
|
|
1023
|
-
export enum LayerContextActionName {
|
|
1024
|
-
setAuth = "LayerContext.setAuth",
|
|
1025
|
-
setCategories = "LayerContext.setCategories"
|
|
1026
|
-
}
|
|
1027
|
-
export type LayerContextAction = {
|
|
1028
|
-
type: LayerContextActionName.setAuth;
|
|
1029
|
-
payload: {
|
|
1030
|
-
auth: LayerContextValues['auth'];
|
|
1031
|
-
};
|
|
1032
|
-
} | {
|
|
1033
|
-
type: LayerContextActionName.setCategories;
|
|
1034
|
-
payload: {
|
|
1035
|
-
categories: LayerContextValues['categories'];
|
|
1036
|
-
};
|
|
1037
|
-
};
|
|
1038
|
-
|
|
1039
|
-
}
|
|
1040
|
-
declare module '@layerfi/components/types/line_item' {
|
|
1041
|
-
export interface LineItem {
|
|
1042
|
-
name?: string;
|
|
1043
|
-
display_name: string;
|
|
1044
|
-
value: number | undefined;
|
|
1045
|
-
line_items?: LineItem[] | null;
|
|
1046
|
-
}
|
|
1047
|
-
|
|
1048
|
-
}
|
|
1049
|
-
declare module '@layerfi/components/types/profit_and_loss' {
|
|
1050
|
-
import { LineItem } from '@layerfi/components/types/line_item';
|
|
1051
|
-
export interface ProfitAndLoss {
|
|
1052
|
-
type: 'Profit_And_Loss';
|
|
1053
|
-
business_id: string;
|
|
1054
|
-
start_date: string;
|
|
1055
|
-
end_date: string;
|
|
1056
|
-
income: LineItem;
|
|
1057
|
-
cost_of_goods_sold?: LineItem | null;
|
|
1058
|
-
gross_profit: number;
|
|
1059
|
-
expenses: LineItem;
|
|
1060
|
-
profit_before_taxes: number;
|
|
1061
|
-
taxes: LineItem;
|
|
1062
|
-
net_profit: number;
|
|
1063
|
-
other_outflows?: LineItem | null;
|
|
1064
|
-
personal_expenses?: LineItem | null;
|
|
1065
|
-
fully_categorized: boolean;
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
|
-
}
|
|
1069
|
-
declare module '@layerfi/components/types' {
|
|
1070
|
-
export { OAuthResponse } from '@layerfi/components/types/authentication';
|
|
1071
|
-
export { LayerContextValues, LayerContextActionName, LayerContextAction, } from '@layerfi/components/types/layer_context';
|
|
1072
|
-
export { Metadata } from '@layerfi/components/types/api';
|
|
1073
|
-
export { ProfitAndLoss } from '@layerfi/components/types/profit_and_loss';
|
|
1074
|
-
export { LineItem } from '@layerfi/components/types/line_item';
|
|
1075
|
-
export { BalanceSheet } from '@layerfi/components/types/balance_sheet';
|
|
1076
|
-
export { Direction, BankTransaction } from '@layerfi/components/types/bank_transactions';
|
|
1077
|
-
export { CategorizationStatus, Category, CategorizationType, AutoCategorization, SuggestedCategorization, SingleCategoryUpdate, SplitCategoryUpdate, CategoryUpdate, } from '@layerfi/components/types/categories';
|
|
1078
|
-
export { AccountAlternate, ChartOfAccounts, Account, NewAccount, } from '@layerfi/components/types/chart_of_accounts';
|
|
1079
|
-
export type DateRange<T = Date> = {
|
|
1080
|
-
startDate: T;
|
|
1081
|
-
endDate: T;
|
|
1082
|
-
};
|
|
1083
|
-
|
|
1084
|
-
}
|
|
1085
|
-
declare module '@layerfi/components' {
|
|
1086
|
-
import main = require('@layerfi/components/index');
|
|
1087
|
-
export = main;
|
|
1088
|
-
}
|