@layerfi/components 0.1.20 → 0.1.21
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 +1685 -981
- package/dist/esm/index.js.map +4 -4
- package/dist/index.d.ts +336 -22
- package/dist/index.js +1796 -1098
- package/dist/index.js.map +4 -4
- package/dist/styles/index.css +227 -2
- package/dist/styles/index.css.map +3 -3
- package/package.json +1 -1
- package/.idea/layer-react.iml +0 -9
- package/.idea/misc.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/vcs.xml +0 -6
package/dist/index.d.ts
CHANGED
|
@@ -78,6 +78,15 @@ declare module '@layerfi/components/api/layer/bankTransactions' {
|
|
|
78
78
|
errors: unknown;
|
|
79
79
|
}>;
|
|
80
80
|
|
|
81
|
+
}
|
|
82
|
+
declare module '@layerfi/components/api/layer/business' {
|
|
83
|
+
import { Business } from '@layerfi/components/types';
|
|
84
|
+
export const getBusiness: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
85
|
+
params?: Record<string, string | undefined> | undefined;
|
|
86
|
+
} | undefined) => () => Promise<{
|
|
87
|
+
data: Business;
|
|
88
|
+
}>;
|
|
89
|
+
|
|
81
90
|
}
|
|
82
91
|
declare module '@layerfi/components/api/layer/categories' {
|
|
83
92
|
import { Category } from '@layerfi/components/types';
|
|
@@ -146,6 +155,12 @@ declare module '@layerfi/components/api/layer/journal' {
|
|
|
146
155
|
}
|
|
147
156
|
declare module '@layerfi/components/api/layer/linked_accounts' {
|
|
148
157
|
import { LinkedAccounts, PublicToken } from '@layerfi/components/types/linked_accounts';
|
|
158
|
+
export const syncConnection: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
159
|
+
params?: {
|
|
160
|
+
businessId: string;
|
|
161
|
+
} | undefined;
|
|
162
|
+
body?: Record<string, unknown> | undefined;
|
|
163
|
+
} | undefined) => Promise<Record<string, unknown>>;
|
|
149
164
|
export const getLinkedAccounts: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
150
165
|
params?: {
|
|
151
166
|
businessId: string;
|
|
@@ -215,7 +230,14 @@ declare module '@layerfi/components/api/layer/linked_accounts' {
|
|
|
215
230
|
export const unlinkPlaidItem: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
216
231
|
params?: {
|
|
217
232
|
businessId: string;
|
|
218
|
-
|
|
233
|
+
plaidItemPlaidId: string;
|
|
234
|
+
} | undefined;
|
|
235
|
+
body?: Record<string, unknown> | undefined;
|
|
236
|
+
} | undefined) => Promise<Record<string, unknown>>;
|
|
237
|
+
export const breakPlaidItemConnection: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
238
|
+
params?: {
|
|
239
|
+
businessId: string;
|
|
240
|
+
plaidItemPlaidId: string;
|
|
219
241
|
} | undefined;
|
|
220
242
|
body?: Record<string, unknown> | undefined;
|
|
221
243
|
} | undefined) => Promise<Record<string, unknown>>;
|
|
@@ -223,12 +245,40 @@ declare module '@layerfi/components/api/layer/linked_accounts' {
|
|
|
223
245
|
}
|
|
224
246
|
declare module '@layerfi/components/api/layer/profit_and_loss' {
|
|
225
247
|
import { ProfitAndLoss } from '@layerfi/components/types';
|
|
248
|
+
import { ProfitAndLossSummaries } from '@layerfi/components/types/profit_and_loss';
|
|
226
249
|
export const getProfitAndLoss: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
227
250
|
params?: Record<string, string | undefined> | undefined;
|
|
228
251
|
} | undefined) => () => Promise<{
|
|
229
252
|
data?: ProfitAndLoss | undefined;
|
|
230
253
|
error?: unknown;
|
|
231
254
|
}>;
|
|
255
|
+
export const getProfitAndLossSummaries: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
256
|
+
params?: Record<string, string | undefined> | undefined;
|
|
257
|
+
} | undefined) => () => Promise<{
|
|
258
|
+
data?: ProfitAndLossSummaries | undefined;
|
|
259
|
+
error?: unknown;
|
|
260
|
+
}>;
|
|
261
|
+
|
|
262
|
+
}
|
|
263
|
+
declare module '@layerfi/components/api/layer/tasks' {
|
|
264
|
+
import { TaskTypes } from '@layerfi/components/types/tasks';
|
|
265
|
+
export const getTasks: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
266
|
+
params?: Record<string, string | undefined> | undefined;
|
|
267
|
+
} | undefined) => () => Promise<{
|
|
268
|
+
data: TaskTypes[];
|
|
269
|
+
}>;
|
|
270
|
+
export const submitResponseToTask: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
271
|
+
params?: Record<string, string | undefined> | undefined;
|
|
272
|
+
body?: Record<string, unknown> | undefined;
|
|
273
|
+
} | undefined) => Promise<{
|
|
274
|
+
data: TaskTypes;
|
|
275
|
+
}>;
|
|
276
|
+
export const markTaskAsComplete: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
277
|
+
params?: Record<string, string | undefined> | undefined;
|
|
278
|
+
body?: Record<string, unknown> | undefined;
|
|
279
|
+
} | undefined) => Promise<{
|
|
280
|
+
data: TaskTypes;
|
|
281
|
+
}>;
|
|
232
282
|
|
|
233
283
|
}
|
|
234
284
|
declare module '@layerfi/components/api/layer' {
|
|
@@ -239,6 +289,11 @@ declare module '@layerfi/components/api/layer' {
|
|
|
239
289
|
authenticationUrl?: string | undefined;
|
|
240
290
|
scope: string;
|
|
241
291
|
}) => () => Promise<import("@layerfi/components/types").OAuthResponse>;
|
|
292
|
+
getBusiness: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
293
|
+
params?: Record<string, string | undefined> | undefined;
|
|
294
|
+
} | undefined) => () => Promise<{
|
|
295
|
+
data: import("@layerfi/components/types").Business;
|
|
296
|
+
}>;
|
|
242
297
|
categorizeBankTransaction: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
243
298
|
params?: Record<string, string | undefined> | undefined;
|
|
244
299
|
body?: import("@layerfi/components/types").CategoryUpdate | undefined;
|
|
@@ -308,6 +363,12 @@ declare module '@layerfi/components/api/layer' {
|
|
|
308
363
|
data?: import("@layerfi/components/types").ProfitAndLoss | undefined;
|
|
309
364
|
error?: unknown;
|
|
310
365
|
}>;
|
|
366
|
+
getProfitAndLossSummaries: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
367
|
+
params?: Record<string, string | undefined> | undefined;
|
|
368
|
+
} | undefined) => () => Promise<{
|
|
369
|
+
data?: import("@layerfi/components/types/profit_and_loss").ProfitAndLossSummaries | undefined;
|
|
370
|
+
error?: unknown;
|
|
371
|
+
}>;
|
|
311
372
|
getLinkedAccounts: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
312
373
|
params?: {
|
|
313
374
|
businessId: string;
|
|
@@ -364,7 +425,7 @@ declare module '@layerfi/components/api/layer' {
|
|
|
364
425
|
unlinkPlaidItem: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
365
426
|
params?: {
|
|
366
427
|
businessId: string;
|
|
367
|
-
|
|
428
|
+
plaidItemPlaidId: string;
|
|
368
429
|
} | undefined;
|
|
369
430
|
body?: Record<string, unknown> | undefined;
|
|
370
431
|
} | undefined) => Promise<Record<string, unknown>>;
|
|
@@ -382,6 +443,30 @@ declare module '@layerfi/components/api/layer' {
|
|
|
382
443
|
} | undefined;
|
|
383
444
|
body?: Record<string, unknown> | undefined;
|
|
384
445
|
} | undefined) => Promise<Record<string, unknown>>;
|
|
446
|
+
getTasks: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
447
|
+
params?: Record<string, string | undefined> | undefined;
|
|
448
|
+
} | undefined) => () => Promise<{
|
|
449
|
+
data: import("@layerfi/components/types/tasks").TaskTypes[];
|
|
450
|
+
}>;
|
|
451
|
+
submitResponseToTask: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
452
|
+
params?: Record<string, string | undefined> | undefined;
|
|
453
|
+
body?: Record<string, unknown> | undefined;
|
|
454
|
+
} | undefined) => Promise<{
|
|
455
|
+
data: import("@layerfi/components/types/tasks").TaskTypes;
|
|
456
|
+
}>;
|
|
457
|
+
breakPlaidItemConnection: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
458
|
+
params?: {
|
|
459
|
+
businessId: string;
|
|
460
|
+
plaidItemPlaidId: string;
|
|
461
|
+
} | undefined;
|
|
462
|
+
body?: Record<string, unknown> | undefined;
|
|
463
|
+
} | undefined) => Promise<Record<string, unknown>>;
|
|
464
|
+
syncConnection: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
465
|
+
params?: {
|
|
466
|
+
businessId: string;
|
|
467
|
+
} | undefined;
|
|
468
|
+
body?: Record<string, unknown> | undefined;
|
|
469
|
+
} | undefined) => Promise<Record<string, unknown>>;
|
|
385
470
|
};
|
|
386
471
|
|
|
387
472
|
}
|
|
@@ -896,8 +981,10 @@ declare module '@layerfi/components/components/DateMonthPicker/DateMonthPicker'
|
|
|
896
981
|
interface DateMonthPickerProps {
|
|
897
982
|
dateRange: DateRange;
|
|
898
983
|
changeDateRange: (dateRange: Partial<DateRange>) => void;
|
|
984
|
+
enableFutureDates?: boolean;
|
|
985
|
+
minDate?: Date;
|
|
899
986
|
}
|
|
900
|
-
export const DateMonthPicker: ({ dateRange, changeDateRange, }: DateMonthPickerProps) => React.JSX.Element;
|
|
987
|
+
export const DateMonthPicker: ({ dateRange, changeDateRange, enableFutureDates, minDate, }: DateMonthPickerProps) => React.JSX.Element;
|
|
901
988
|
export {};
|
|
902
989
|
|
|
903
990
|
}
|
|
@@ -998,18 +1085,14 @@ declare module '@layerfi/components/components/Hello/index' {
|
|
|
998
1085
|
}
|
|
999
1086
|
declare module '@layerfi/components/components/HoverMenu/HoverMenu' {
|
|
1000
1087
|
import React, { ReactNode } from 'react';
|
|
1001
|
-
import { Source } from '@layerfi/components/types/linked_accounts';
|
|
1002
1088
|
export interface HoverMenuProps {
|
|
1003
1089
|
children: ReactNode;
|
|
1004
1090
|
config: {
|
|
1005
1091
|
name: string;
|
|
1006
|
-
action: (
|
|
1092
|
+
action: () => void;
|
|
1007
1093
|
}[];
|
|
1008
|
-
connectionId: string;
|
|
1009
|
-
accountId: string;
|
|
1010
|
-
source: Source;
|
|
1011
1094
|
}
|
|
1012
|
-
export const HoverMenu: ({ children, config
|
|
1095
|
+
export const HoverMenu: ({ children, config }: HoverMenuProps) => React.JSX.Element;
|
|
1013
1096
|
|
|
1014
1097
|
}
|
|
1015
1098
|
declare module '@layerfi/components/components/HoverMenu/index' {
|
|
@@ -1254,13 +1337,30 @@ declare module '@layerfi/components/components/LinkedAccountOptions/LinkedAccoun
|
|
|
1254
1337
|
interface LinkedAccountOptionsProps extends HoverMenuProps {
|
|
1255
1338
|
showLedgerBalance?: boolean;
|
|
1256
1339
|
}
|
|
1257
|
-
export const LinkedAccountOptions: ({ children, config,
|
|
1340
|
+
export const LinkedAccountOptions: ({ children, config, showLedgerBalance, }: LinkedAccountOptionsProps) => React.JSX.Element;
|
|
1258
1341
|
export {};
|
|
1259
1342
|
|
|
1260
1343
|
}
|
|
1261
1344
|
declare module '@layerfi/components/components/LinkedAccountOptions/index' {
|
|
1262
1345
|
export { LinkedAccountOptions } from '@layerfi/components/components/LinkedAccountOptions/LinkedAccountOptions';
|
|
1263
1346
|
|
|
1347
|
+
}
|
|
1348
|
+
declare module '@layerfi/components/components/LinkedAccountPill/LinkedAccountPill' {
|
|
1349
|
+
import React from 'react';
|
|
1350
|
+
type Props = {
|
|
1351
|
+
text: string;
|
|
1352
|
+
config: {
|
|
1353
|
+
name: string;
|
|
1354
|
+
action: () => void;
|
|
1355
|
+
}[];
|
|
1356
|
+
};
|
|
1357
|
+
export const LinkedAccountPill: ({ text, config }: Props) => React.JSX.Element;
|
|
1358
|
+
export {};
|
|
1359
|
+
|
|
1360
|
+
}
|
|
1361
|
+
declare module '@layerfi/components/components/LinkedAccountPill/index' {
|
|
1362
|
+
export { LinkedAccountPill } from '@layerfi/components/components/LinkedAccountPill/LinkedAccountPill';
|
|
1363
|
+
|
|
1264
1364
|
}
|
|
1265
1365
|
declare module '@layerfi/components/components/LinkedAccountThumb/LinkedAccountThumb' {
|
|
1266
1366
|
import React from 'react';
|
|
@@ -1269,8 +1369,15 @@ declare module '@layerfi/components/components/LinkedAccountThumb/LinkedAccountT
|
|
|
1269
1369
|
account: LinkedAccount;
|
|
1270
1370
|
asWidget?: boolean;
|
|
1271
1371
|
showLedgerBalance?: boolean;
|
|
1372
|
+
pillConfig?: {
|
|
1373
|
+
text: string;
|
|
1374
|
+
config: {
|
|
1375
|
+
name: string;
|
|
1376
|
+
action: () => void;
|
|
1377
|
+
}[];
|
|
1378
|
+
};
|
|
1272
1379
|
}
|
|
1273
|
-
export const LinkedAccountThumb: ({ account, asWidget, showLedgerBalance, }: LinkedAccountThumbProps) => React.JSX.Element;
|
|
1380
|
+
export const LinkedAccountThumb: ({ account, asWidget, showLedgerBalance, pillConfig, }: LinkedAccountThumbProps) => React.JSX.Element;
|
|
1274
1381
|
|
|
1275
1382
|
}
|
|
1276
1383
|
declare module '@layerfi/components/components/LinkedAccountThumb/index' {
|
|
@@ -1401,6 +1508,17 @@ declare module '@layerfi/components/components/Panel/Panel' {
|
|
|
1401
1508
|
declare module '@layerfi/components/components/Panel/index' {
|
|
1402
1509
|
export { Panel } from '@layerfi/components/components/Panel/Panel';
|
|
1403
1510
|
|
|
1511
|
+
}
|
|
1512
|
+
declare module '@layerfi/components/components/Pill/Pill' {
|
|
1513
|
+
import React, { PropsWithChildren } from 'react';
|
|
1514
|
+
type PillKind = 'default' | 'info' | 'success' | 'warning' | 'error';
|
|
1515
|
+
type Props = PropsWithChildren & {
|
|
1516
|
+
kind?: PillKind;
|
|
1517
|
+
onHover?: () => void;
|
|
1518
|
+
};
|
|
1519
|
+
export const Pill: ({ children, kind, onHover }: Props) => React.JSX.Element;
|
|
1520
|
+
export {};
|
|
1521
|
+
|
|
1404
1522
|
}
|
|
1405
1523
|
declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
|
|
1406
1524
|
import React, { PropsWithChildren } from 'react';
|
|
@@ -1658,6 +1776,58 @@ declare module '@layerfi/components/components/SkeletonLoader/SkeletonLoader' {
|
|
|
1658
1776
|
declare module '@layerfi/components/components/SkeletonLoader/index' {
|
|
1659
1777
|
export { SkeletonLoader } from '@layerfi/components/components/SkeletonLoader/SkeletonLoader';
|
|
1660
1778
|
|
|
1779
|
+
}
|
|
1780
|
+
declare module '@layerfi/components/components/Tasks/Tasks' {
|
|
1781
|
+
import React from 'react';
|
|
1782
|
+
export const Tasks: () => React.JSX.Element;
|
|
1783
|
+
export const TasksComponent: () => React.JSX.Element;
|
|
1784
|
+
|
|
1785
|
+
}
|
|
1786
|
+
declare module '@layerfi/components/components/Tasks/index' {
|
|
1787
|
+
export { Tasks } from '@layerfi/components/components/Tasks/Tasks';
|
|
1788
|
+
|
|
1789
|
+
}
|
|
1790
|
+
declare module '@layerfi/components/components/TasksHeader/TasksHeader' {
|
|
1791
|
+
import React from 'react';
|
|
1792
|
+
export const TasksHeader: () => React.JSX.Element;
|
|
1793
|
+
|
|
1794
|
+
}
|
|
1795
|
+
declare module '@layerfi/components/components/TasksHeader/index' {
|
|
1796
|
+
export { TasksHeader } from '@layerfi/components/components/TasksHeader/TasksHeader';
|
|
1797
|
+
|
|
1798
|
+
}
|
|
1799
|
+
declare module '@layerfi/components/components/TasksList/TasksList' {
|
|
1800
|
+
import React from 'react';
|
|
1801
|
+
export const TasksList: ({ pageSize }: {
|
|
1802
|
+
pageSize?: number | undefined;
|
|
1803
|
+
}) => React.JSX.Element;
|
|
1804
|
+
|
|
1805
|
+
}
|
|
1806
|
+
declare module '@layerfi/components/components/TasksList/index' {
|
|
1807
|
+
export { TasksList } from '@layerfi/components/components/TasksList/TasksList';
|
|
1808
|
+
|
|
1809
|
+
}
|
|
1810
|
+
declare module '@layerfi/components/components/TasksListItem/TasksListItem' {
|
|
1811
|
+
import React from 'react';
|
|
1812
|
+
import { TaskTypes } from '@layerfi/components/types/tasks';
|
|
1813
|
+
export const TasksListItem: ({ task, index, }: {
|
|
1814
|
+
task: TaskTypes;
|
|
1815
|
+
index: number;
|
|
1816
|
+
}) => React.JSX.Element;
|
|
1817
|
+
|
|
1818
|
+
}
|
|
1819
|
+
declare module '@layerfi/components/components/TasksListItem/index' {
|
|
1820
|
+
export { TasksListItem } from '@layerfi/components/components/TasksListItem/TasksListItem';
|
|
1821
|
+
|
|
1822
|
+
}
|
|
1823
|
+
declare module '@layerfi/components/components/TasksPending/TasksPending' {
|
|
1824
|
+
import React from 'react';
|
|
1825
|
+
export const TasksPending: () => React.JSX.Element;
|
|
1826
|
+
|
|
1827
|
+
}
|
|
1828
|
+
declare module '@layerfi/components/components/TasksPending/index' {
|
|
1829
|
+
export { TasksPending } from '@layerfi/components/components/TasksPending/TasksPending';
|
|
1830
|
+
|
|
1661
1831
|
}
|
|
1662
1832
|
declare module '@layerfi/components/components/Textarea/Textarea' {
|
|
1663
1833
|
import React, { HTMLProps } from 'react';
|
|
@@ -1941,6 +2111,10 @@ declare module '@layerfi/components/config/charts' {
|
|
|
1941
2111
|
color: string;
|
|
1942
2112
|
opacity: number;
|
|
1943
2113
|
}[];
|
|
2114
|
+
export const TASKS_CHARTS_COLORS: {
|
|
2115
|
+
done: string;
|
|
2116
|
+
pending: string;
|
|
2117
|
+
};
|
|
1944
2118
|
|
|
1945
2119
|
}
|
|
1946
2120
|
declare module '@layerfi/components/config/general' {
|
|
@@ -2125,13 +2299,35 @@ declare module '@layerfi/components/contexts/LinkedAccountsContext/LinkedAccount
|
|
|
2125
2299
|
removeConnection: (source: import("@layerfi/components/types/linked_accounts").Source, sourceId: string) => void;
|
|
2126
2300
|
repairConnection: (source: import("@layerfi/components/types/linked_accounts").Source, sourceId: string) => void;
|
|
2127
2301
|
refetchAccounts: () => void;
|
|
2302
|
+
syncAccounts: () => void;
|
|
2128
2303
|
unlinkAccount: (source: import("@layerfi/components/types/linked_accounts").Source, accountId: string) => void;
|
|
2304
|
+
confirmAccount: (source: import("@layerfi/components/types/linked_accounts").Source, accountId: string) => void;
|
|
2305
|
+
denyAccount: (source: import("@layerfi/components/types/linked_accounts").Source, accountId: string) => void;
|
|
2306
|
+
breakConnection: (source: import("@layerfi/components/types/linked_accounts").Source, connectionExternalId: string) => void;
|
|
2129
2307
|
}>;
|
|
2130
2308
|
|
|
2131
2309
|
}
|
|
2132
2310
|
declare module '@layerfi/components/contexts/LinkedAccountsContext/index' {
|
|
2133
2311
|
export { LinkedAccountsContext } from '@layerfi/components/contexts/LinkedAccountsContext/LinkedAccountsContext';
|
|
2134
2312
|
|
|
2313
|
+
}
|
|
2314
|
+
declare module '@layerfi/components/contexts/TasksContext/TasksContext' {
|
|
2315
|
+
/// <reference types="react" />
|
|
2316
|
+
import { useTasks } from '@layerfi/components/hooks/useTasks/index';
|
|
2317
|
+
export type TasksContextType = ReturnType<typeof useTasks>;
|
|
2318
|
+
export const TasksContext: import("react").Context<{
|
|
2319
|
+
data?: import("@layerfi/components/types/tasks").TaskTypes[] | undefined;
|
|
2320
|
+
isLoading?: boolean | undefined;
|
|
2321
|
+
isValidating?: boolean | undefined;
|
|
2322
|
+
error?: unknown;
|
|
2323
|
+
refetch: () => void;
|
|
2324
|
+
submitResponseToTask: (taskId: string, userResponse: string) => void;
|
|
2325
|
+
}>;
|
|
2326
|
+
|
|
2327
|
+
}
|
|
2328
|
+
declare module '@layerfi/components/contexts/TasksContext/index' {
|
|
2329
|
+
export { TasksContext } from '@layerfi/components/contexts/TasksContext/TasksContext';
|
|
2330
|
+
|
|
2135
2331
|
}
|
|
2136
2332
|
declare module '@layerfi/components/hooks/useBalanceSheet/index' {
|
|
2137
2333
|
export { useBalanceSheet } from '@layerfi/components/hooks/useBalanceSheet/useBalanceSheet';
|
|
@@ -2340,7 +2536,11 @@ declare module '@layerfi/components/hooks/useLinkedAccounts/useLinkedAccounts' {
|
|
|
2340
2536
|
removeConnection: (source: Source, sourceId: string) => void;
|
|
2341
2537
|
repairConnection: (source: Source, sourceId: string) => void;
|
|
2342
2538
|
refetchAccounts: () => void;
|
|
2539
|
+
syncAccounts: () => void;
|
|
2343
2540
|
unlinkAccount: (source: Source, accountId: string) => void;
|
|
2541
|
+
confirmAccount: (source: Source, accountId: string) => void;
|
|
2542
|
+
denyAccount: (source: Source, accountId: string) => void;
|
|
2543
|
+
breakConnection: (source: Source, connectionExternalId: string) => void;
|
|
2344
2544
|
};
|
|
2345
2545
|
export const useLinkedAccounts: UseLinkedAccounts;
|
|
2346
2546
|
export {};
|
|
@@ -2409,8 +2609,9 @@ declare module '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss' {
|
|
|
2409
2609
|
|
|
2410
2610
|
}
|
|
2411
2611
|
declare module '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLossLTM' {
|
|
2412
|
-
import {
|
|
2612
|
+
import { ReportingBasis } from '@layerfi/components/types';
|
|
2413
2613
|
import { LoadedStatus } from '@layerfi/components/types/general';
|
|
2614
|
+
import { ProfitAndLossSummary } from '@layerfi/components/types/profit_and_loss';
|
|
2414
2615
|
type UseProfitAndLossLTMProps = {
|
|
2415
2616
|
currentDate: Date;
|
|
2416
2617
|
tagFilter?: {
|
|
@@ -2419,17 +2620,15 @@ declare module '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLossLTM'
|
|
|
2419
2620
|
};
|
|
2420
2621
|
reportingBasis?: ReportingBasis;
|
|
2421
2622
|
};
|
|
2623
|
+
export interface ProfitAndLossSummaryData extends ProfitAndLossSummary {
|
|
2624
|
+
isLoading?: boolean;
|
|
2625
|
+
}
|
|
2422
2626
|
type UseProfitAndLossLTMReturn = (props?: UseProfitAndLossLTMProps) => {
|
|
2423
|
-
data:
|
|
2424
|
-
data: ProfitAndLoss | undefined;
|
|
2425
|
-
isLoading: boolean;
|
|
2426
|
-
error: any;
|
|
2427
|
-
startDate: Date;
|
|
2428
|
-
endDate: Date;
|
|
2429
|
-
}[];
|
|
2627
|
+
data: ProfitAndLossSummaryData[];
|
|
2430
2628
|
isLoading?: boolean;
|
|
2431
2629
|
loaded?: LoadedStatus;
|
|
2432
2630
|
error?: any;
|
|
2631
|
+
pullData: (date: Date) => void;
|
|
2433
2632
|
};
|
|
2434
2633
|
/**
|
|
2435
2634
|
* Hooks fetch Last Twelve Months sending 12 requests (one for each month).
|
|
@@ -2462,6 +2661,24 @@ declare module '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLossQuery
|
|
|
2462
2661
|
export const useProfitAndLossQuery: UseProfitAndLossQueryReturn;
|
|
2463
2662
|
export {};
|
|
2464
2663
|
|
|
2664
|
+
}
|
|
2665
|
+
declare module '@layerfi/components/hooks/useTasks/index' {
|
|
2666
|
+
export { useTasks } from '@layerfi/components/hooks/useTasks/useTasks';
|
|
2667
|
+
|
|
2668
|
+
}
|
|
2669
|
+
declare module '@layerfi/components/hooks/useTasks/useTasks' {
|
|
2670
|
+
import { TaskTypes } from '@layerfi/components/types/tasks';
|
|
2671
|
+
type UseTasks = () => {
|
|
2672
|
+
data?: TaskTypes[];
|
|
2673
|
+
isLoading?: boolean;
|
|
2674
|
+
isValidating?: boolean;
|
|
2675
|
+
error?: unknown;
|
|
2676
|
+
refetch: () => void;
|
|
2677
|
+
submitResponseToTask: (taskId: string, userResponse: string) => void;
|
|
2678
|
+
};
|
|
2679
|
+
export const useTasks: UseTasks;
|
|
2680
|
+
export {};
|
|
2681
|
+
|
|
2465
2682
|
}
|
|
2466
2683
|
declare module '@layerfi/components/icons/AlertCircle' {
|
|
2467
2684
|
import * as React from 'react';
|
|
@@ -2629,6 +2846,13 @@ declare module '@layerfi/components/icons/PlusIcon' {
|
|
|
2629
2846
|
const PlusIcon: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
2630
2847
|
export default PlusIcon;
|
|
2631
2848
|
|
|
2849
|
+
}
|
|
2850
|
+
declare module '@layerfi/components/icons/ProgressIcon' {
|
|
2851
|
+
import * as React from 'react';
|
|
2852
|
+
import { IconSvgProps } from '@layerfi/components/icons/types';
|
|
2853
|
+
const ProgressIcon: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
2854
|
+
export default ProgressIcon;
|
|
2855
|
+
|
|
2632
2856
|
}
|
|
2633
2857
|
declare module '@layerfi/components/icons/RefreshCcw' {
|
|
2634
2858
|
import * as React from 'react';
|
|
@@ -2657,6 +2881,13 @@ declare module '@layerfi/components/icons/ScissorsFullOpen' {
|
|
|
2657
2881
|
const ScissorsFullOpen: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
2658
2882
|
export default ScissorsFullOpen;
|
|
2659
2883
|
|
|
2884
|
+
}
|
|
2885
|
+
declare module '@layerfi/components/icons/SmileIcon' {
|
|
2886
|
+
import * as React from 'react';
|
|
2887
|
+
import { IconSvgProps } from '@layerfi/components/icons/types';
|
|
2888
|
+
const SmileIcon: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
2889
|
+
export default SmileIcon;
|
|
2890
|
+
|
|
2660
2891
|
}
|
|
2661
2892
|
declare module '@layerfi/components/icons/SortArrows' {
|
|
2662
2893
|
import * as React from 'react';
|
|
@@ -2712,6 +2943,7 @@ declare module '@layerfi/components/index' {
|
|
|
2712
2943
|
export { useLayerContext } from '@layerfi/components/hooks/useLayerContext/index';
|
|
2713
2944
|
export { Journal } from '@layerfi/components/components/Journal/index';
|
|
2714
2945
|
export { Onboarding } from '@layerfi/components/components/Onboarding/index';
|
|
2946
|
+
export { Tasks } from '@layerfi/components/components/Tasks/index';
|
|
2715
2947
|
export { AccountingOverview } from '@layerfi/components/views/AccountingOverview/index';
|
|
2716
2948
|
export { BankTransactionsWithLinkedAccounts } from '@layerfi/components/views/BankTransactionsWithLinkedAccounts/index';
|
|
2717
2949
|
export { Reports } from '@layerfi/components/views/Reports/index';
|
|
@@ -2875,6 +3107,26 @@ declare module '@layerfi/components/types/bank_transactions' {
|
|
|
2875
3107
|
};
|
|
2876
3108
|
}
|
|
2877
3109
|
|
|
3110
|
+
}
|
|
3111
|
+
declare module '@layerfi/components/types/business' {
|
|
3112
|
+
export interface Business {
|
|
3113
|
+
id: string;
|
|
3114
|
+
activation_at?: string;
|
|
3115
|
+
archived_at?: string;
|
|
3116
|
+
entity_type?: string;
|
|
3117
|
+
external_id?: string;
|
|
3118
|
+
imported_at?: string;
|
|
3119
|
+
industry?: string;
|
|
3120
|
+
legal_name?: string;
|
|
3121
|
+
phone_number?: string;
|
|
3122
|
+
sms_categorization_start_date?: string;
|
|
3123
|
+
sms_enabled?: boolean;
|
|
3124
|
+
tin?: string;
|
|
3125
|
+
type?: string;
|
|
3126
|
+
updated_at?: string;
|
|
3127
|
+
us_state?: string;
|
|
3128
|
+
}
|
|
3129
|
+
|
|
2878
3130
|
}
|
|
2879
3131
|
declare module '@layerfi/components/types/categories' {
|
|
2880
3132
|
export enum CategorizationStatus {
|
|
@@ -3063,17 +3315,19 @@ declare module '@layerfi/components/types/journal' {
|
|
|
3063
3315
|
|
|
3064
3316
|
}
|
|
3065
3317
|
declare module '@layerfi/components/types/layer_context' {
|
|
3066
|
-
import { Category } from '@layerfi/components/types';
|
|
3318
|
+
import { Business, Category } from '@layerfi/components/types';
|
|
3067
3319
|
import { ExpiringOAuthResponse } from '@layerfi/components/types/authentication';
|
|
3068
3320
|
export type LayerContextValues = {
|
|
3069
3321
|
auth: ExpiringOAuthResponse;
|
|
3070
3322
|
businessId: string;
|
|
3323
|
+
business?: Business;
|
|
3071
3324
|
categories: Category[];
|
|
3072
3325
|
apiUrl: string;
|
|
3073
3326
|
theme?: LayerThemeConfig;
|
|
3074
3327
|
colors: ColorsPalette;
|
|
3075
3328
|
usePlaidSandbox?: boolean;
|
|
3076
3329
|
onboardingStep?: OnboardingStep;
|
|
3330
|
+
environment: string;
|
|
3077
3331
|
};
|
|
3078
3332
|
export type LayerContextHelpers = {
|
|
3079
3333
|
getColor: (shade: number) => ColorsPaletteOption | undefined;
|
|
@@ -3122,15 +3376,22 @@ declare module '@layerfi/components/types/layer_context' {
|
|
|
3122
3376
|
export type OnboardingStep = undefined | 'connectAccount' | 'complete';
|
|
3123
3377
|
export enum LayerContextActionName {
|
|
3124
3378
|
setAuth = "LayerContext.setAuth",
|
|
3379
|
+
setBusiness = "LayerContext.setBusiness",
|
|
3125
3380
|
setCategories = "LayerContext.setCategories",
|
|
3126
3381
|
setTheme = "LayerContext.setTheme",
|
|
3127
|
-
setOnboardingStep = "LayerContext.setOnboardingStep"
|
|
3382
|
+
setOnboardingStep = "LayerContext.setOnboardingStep",
|
|
3383
|
+
setColors = "LayerContext.setColors"
|
|
3128
3384
|
}
|
|
3129
3385
|
export type LayerContextAction = {
|
|
3130
3386
|
type: LayerContextActionName.setAuth;
|
|
3131
3387
|
payload: {
|
|
3132
3388
|
auth: LayerContextValues['auth'];
|
|
3133
3389
|
};
|
|
3390
|
+
} | {
|
|
3391
|
+
type: LayerContextActionName.setBusiness;
|
|
3392
|
+
payload: {
|
|
3393
|
+
business: LayerContextValues['business'];
|
|
3394
|
+
};
|
|
3134
3395
|
} | {
|
|
3135
3396
|
type: LayerContextActionName.setCategories;
|
|
3136
3397
|
payload: {
|
|
@@ -3146,6 +3407,11 @@ declare module '@layerfi/components/types/layer_context' {
|
|
|
3146
3407
|
payload: {
|
|
3147
3408
|
onboardingStep: LayerContextValues['onboardingStep'];
|
|
3148
3409
|
};
|
|
3410
|
+
} | {
|
|
3411
|
+
type: LayerContextActionName.setColors;
|
|
3412
|
+
payload: {
|
|
3413
|
+
colors: LayerContextValues['colors'];
|
|
3414
|
+
};
|
|
3149
3415
|
};
|
|
3150
3416
|
|
|
3151
3417
|
}
|
|
@@ -3280,7 +3546,8 @@ declare module '@layerfi/components/types/linked_accounts' {
|
|
|
3280
3546
|
logo: string | null;
|
|
3281
3547
|
};
|
|
3282
3548
|
mask?: string;
|
|
3283
|
-
connection_id
|
|
3549
|
+
connection_id?: string;
|
|
3550
|
+
connection_external_id?: string;
|
|
3284
3551
|
connection_needs_repair_as_of: string | null;
|
|
3285
3552
|
requires_user_confirmation_as_of: string | null;
|
|
3286
3553
|
}
|
|
@@ -3309,6 +3576,45 @@ declare module '@layerfi/components/types/profit_and_loss' {
|
|
|
3309
3576
|
personal_expenses?: LineItem | null;
|
|
3310
3577
|
fully_categorized: boolean;
|
|
3311
3578
|
}
|
|
3579
|
+
export interface ProfitAndLossSummary {
|
|
3580
|
+
year: number;
|
|
3581
|
+
month: number;
|
|
3582
|
+
income: number;
|
|
3583
|
+
costOfGoodsSold: number;
|
|
3584
|
+
grossProfit: number;
|
|
3585
|
+
operatingExpenses: number;
|
|
3586
|
+
profitBeforeTaxes: number;
|
|
3587
|
+
taxes: number;
|
|
3588
|
+
netProfit: number;
|
|
3589
|
+
fullyCategorized: boolean;
|
|
3590
|
+
totalExpenses: number;
|
|
3591
|
+
uncategorizedInflows: number;
|
|
3592
|
+
uncategorizedOutflows: number;
|
|
3593
|
+
}
|
|
3594
|
+
export interface ProfitAndLossSummaries {
|
|
3595
|
+
type: 'Profit_And_Loss_Summaries';
|
|
3596
|
+
months: ProfitAndLossSummary[];
|
|
3597
|
+
}
|
|
3598
|
+
|
|
3599
|
+
}
|
|
3600
|
+
declare module '@layerfi/components/types/tasks' {
|
|
3601
|
+
export interface TaskTypes {
|
|
3602
|
+
id: string;
|
|
3603
|
+
question: string;
|
|
3604
|
+
status: TasksStatusType;
|
|
3605
|
+
title: string;
|
|
3606
|
+
transaction_id: string | null;
|
|
3607
|
+
type: string;
|
|
3608
|
+
user_marked_completed_at: string;
|
|
3609
|
+
user_response: string;
|
|
3610
|
+
user_response_type: TasksResponseType;
|
|
3611
|
+
archived_at: string | null;
|
|
3612
|
+
completed_at: string;
|
|
3613
|
+
created_at: string;
|
|
3614
|
+
updated_at: string;
|
|
3615
|
+
}
|
|
3616
|
+
export type TasksStatusType = 'COMPLETED' | 'TODO';
|
|
3617
|
+
export type TasksResponseType = 'FREE_RESPONSE';
|
|
3312
3618
|
|
|
3313
3619
|
}
|
|
3314
3620
|
declare module '@layerfi/components/types' {
|
|
@@ -3323,6 +3629,7 @@ declare module '@layerfi/components/types' {
|
|
|
3323
3629
|
export { ChartOfAccounts, Account, NewAccount, EditAccount, } from '@layerfi/components/types/chart_of_accounts';
|
|
3324
3630
|
export { LedgerAccountLineItems as LedgerAccounts, LedgerAccountLineItem, LedgerAccountsAccount, LedgerAccountsEntry, } from '@layerfi/components/types/ledger_accounts';
|
|
3325
3631
|
export { SortDirection } from '@layerfi/components/types/general';
|
|
3632
|
+
export { Business } from '@layerfi/components/types/business';
|
|
3326
3633
|
export interface FormError {
|
|
3327
3634
|
field: string;
|
|
3328
3635
|
message: string;
|
|
@@ -3337,6 +3644,13 @@ declare module '@layerfi/components/types' {
|
|
|
3337
3644
|
};
|
|
3338
3645
|
export type ReportingBasis = 'CASH' | 'ACCRUAL';
|
|
3339
3646
|
|
|
3647
|
+
}
|
|
3648
|
+
declare module '@layerfi/components/utils/business' {
|
|
3649
|
+
import { Business } from '@layerfi/components/types';
|
|
3650
|
+
export const getActivationDate: (business?: Business) => Date | undefined;
|
|
3651
|
+
export const getEarliestDateToBrowse: (business?: Business) => Date | undefined;
|
|
3652
|
+
export const isDateAllowedToBrowse: (date: Date, business?: Business) => boolean;
|
|
3653
|
+
|
|
3340
3654
|
}
|
|
3341
3655
|
declare module '@layerfi/components/utils/colors' {
|
|
3342
3656
|
import { LayerThemeConfig, ColorsPalette } from '@layerfi/components/types/layer_context';
|