@layerfi/components 0.1.92 → 0.1.93
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/cjs/index.cjs +38 -24
- package/dist/esm/index.mjs +38 -24
- package/dist/index.css +1 -0
- package/dist/index.d.ts +53 -1
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -117,7 +117,7 @@ var import_react16 = require("react");
|
|
|
117
117
|
var import_react14 = require("react");
|
|
118
118
|
|
|
119
119
|
// package.json
|
|
120
|
-
var version = "0.1.
|
|
120
|
+
var version = "0.1.93";
|
|
121
121
|
|
|
122
122
|
// src/models/APIError.ts
|
|
123
123
|
var APIError = class _APIError extends Error {
|
|
@@ -287,6 +287,12 @@ var getBalanceSheetCSV = get(
|
|
|
287
287
|
return `/v1/businesses/${businessId}/reports/balance-sheet/exports/csv?${parameters}`;
|
|
288
288
|
}
|
|
289
289
|
);
|
|
290
|
+
var getBalanceSheetExcel = get(
|
|
291
|
+
({ businessId, effectiveDate }) => {
|
|
292
|
+
const parameters = toDefinedSearchParameters({ effectiveDate });
|
|
293
|
+
return `/v1/businesses/${businessId}/reports/balance-sheet/exports/excel?${parameters}`;
|
|
294
|
+
}
|
|
295
|
+
);
|
|
290
296
|
|
|
291
297
|
// src/api/layer/bankTransactions.ts
|
|
292
298
|
var getBankTransactions = get(
|
|
@@ -326,6 +332,10 @@ var getBankTransactionsCsv = get((params) => {
|
|
|
326
332
|
const { businessId, startDate, endDate, categorized, category, month, year } = params;
|
|
327
333
|
return `/v1/businesses/${businessId}/reports/transactions/exports/csv?${startDate ? `start_date=${encodeURIComponent(startDate)}&` : ""}${endDate ? `end_date=${encodeURIComponent(endDate)}&` : ""}${month ? `month=${encodeURIComponent(month)}&` : ""}${year ? `year=${encodeURIComponent(year)}&` : ""}${categorized ? `categorized=${categorized}&` : ""}${category ? `category=${encodeURIComponent(category)}&` : ""}`;
|
|
328
334
|
});
|
|
335
|
+
var getBankTransactionsExcel = get((params) => {
|
|
336
|
+
const { businessId, startDate, endDate, categorized, category, month, year } = params;
|
|
337
|
+
return `/v1/businesses/${businessId}/reports/transactions/exports/excel?${startDate ? `start_date=${encodeURIComponent(startDate)}&` : ""}${endDate ? `end_date=${encodeURIComponent(endDate)}&` : ""}${month ? `month=${encodeURIComponent(month)}&` : ""}${year ? `year=${encodeURIComponent(year)}&` : ""}${categorized ? `categorized=${categorized}&` : ""}${category ? `category=${encodeURIComponent(category)}&` : ""}`;
|
|
338
|
+
});
|
|
329
339
|
var getBankTransactionMetadata = get(
|
|
330
340
|
({ businessId, bankTransactionId }) => `/v1/businesses/${businessId}/bank-transactions/${bankTransactionId}/metadata`
|
|
331
341
|
);
|
|
@@ -485,6 +495,12 @@ var getProfitAndLossCsv = (apiUrl, accessToken, params) => {
|
|
|
485
495
|
({ businessId: businessId2 }) => `/v1/businesses/${businessId2}/reports/profit-and-loss/exports/csv?${startDate ? `start_date=${encodeURIComponent(toLocalDateString(startDate))}` : ""}${endDate ? `&end_date=${encodeURIComponent(toLocalDateString(endDate))}` : ""}${month ? `&month=${month}` : ""}${year ? `&year=${year}` : ""}${reportingBasis ? `&reporting_basis=${reportingBasis}` : ""}${tagKey ? `&tag_key=${tagKey}` : ""}${tagValues ? `&tag_values=${tagValues}` : ""}${moneyFormat ? `&money_format=${moneyFormat}` : ""}`
|
|
486
496
|
)(apiUrl, accessToken, { params: { businessId } });
|
|
487
497
|
};
|
|
498
|
+
var getProfitAndLossExcel = (apiUrl, accessToken, params) => {
|
|
499
|
+
const { businessId, startDate, endDate, month, year, tagKey, tagValues, reportingBasis, moneyFormat } = params;
|
|
500
|
+
return get(
|
|
501
|
+
({ businessId: businessId2 }) => `/v1/businesses/${businessId2}/reports/profit-and-loss/exports/excel?${startDate ? `start_date=${encodeURIComponent(toLocalDateString(startDate))}` : ""}${endDate ? `&end_date=${encodeURIComponent(toLocalDateString(endDate))}` : ""}${month ? `&month=${month}` : ""}${year ? `&year=${year}` : ""}${reportingBasis ? `&reporting_basis=${reportingBasis}` : ""}${tagKey ? `&tag_key=${tagKey}` : ""}${tagValues ? `&tag_values=${tagValues}` : ""}${moneyFormat ? `&money_format=${moneyFormat}` : ""}`
|
|
502
|
+
)(apiUrl, accessToken, { params: { businessId } });
|
|
503
|
+
};
|
|
488
504
|
var profitAndLossComparisonCsv = post(
|
|
489
505
|
({ businessId, moneyFormat }) => `/v1/businesses/${businessId}/reports/profit-and-loss/exports/comparison-csv?money_format=${moneyFormat ? moneyFormat : "DOLLAR_STRING"}`
|
|
490
506
|
);
|
|
@@ -527,7 +543,10 @@ var Layer = {
|
|
|
527
543
|
createAccount,
|
|
528
544
|
updateAccount,
|
|
529
545
|
getBalanceSheet,
|
|
546
|
+
getBalanceSheetCSV,
|
|
547
|
+
getBalanceSheetExcel,
|
|
530
548
|
getBankTransactionsCsv,
|
|
549
|
+
getBankTransactionsExcel,
|
|
531
550
|
getBankTransactionMetadata,
|
|
532
551
|
listBankTransactionDocuments,
|
|
533
552
|
getBankTransactionDocument,
|
|
@@ -547,6 +566,7 @@ var Layer = {
|
|
|
547
566
|
getProfitAndLoss,
|
|
548
567
|
getProfitAndLossSummaries,
|
|
549
568
|
getProfitAndLossCsv,
|
|
569
|
+
getProfitAndLossExcel,
|
|
550
570
|
getLinkedAccounts,
|
|
551
571
|
getJournal,
|
|
552
572
|
getJournalEntriesCSV,
|
|
@@ -12158,7 +12178,7 @@ var DownloadButton2 = ({
|
|
|
12158
12178
|
var _a;
|
|
12159
12179
|
setIsDownloading(true);
|
|
12160
12180
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear().toString();
|
|
12161
|
-
const
|
|
12181
|
+
const getBankTransactionsExcel2 = Layer.getBankTransactionsExcel(
|
|
12162
12182
|
apiUrl,
|
|
12163
12183
|
auth == null ? void 0 : auth.access_token,
|
|
12164
12184
|
{
|
|
@@ -12169,7 +12189,7 @@ var DownloadButton2 = ({
|
|
|
12169
12189
|
}
|
|
12170
12190
|
);
|
|
12171
12191
|
try {
|
|
12172
|
-
const result = yield
|
|
12192
|
+
const result = yield getBankTransactionsExcel2();
|
|
12173
12193
|
if ((_a = result == null ? void 0 : result.data) == null ? void 0 : _a.presignedUrl) {
|
|
12174
12194
|
window.location.href = result.data.presignedUrl;
|
|
12175
12195
|
setRequestFailed(false);
|
|
@@ -15287,7 +15307,7 @@ var ProfitAndLossDownloadButton = ({
|
|
|
15287
15307
|
const handleClick = () => __async(void 0, null, function* () {
|
|
15288
15308
|
var _a;
|
|
15289
15309
|
setIsDownloading(true);
|
|
15290
|
-
const
|
|
15310
|
+
const getProfitAndLossExcel2 = Layer.getProfitAndLossExcel(
|
|
15291
15311
|
apiUrl,
|
|
15292
15312
|
auth == null ? void 0 : auth.access_token,
|
|
15293
15313
|
{
|
|
@@ -15300,7 +15320,7 @@ var ProfitAndLossDownloadButton = ({
|
|
|
15300
15320
|
}
|
|
15301
15321
|
);
|
|
15302
15322
|
try {
|
|
15303
|
-
const result = useComparisonPnl ? yield getProfitAndLossComparisonCsv(dateRange, moneyFormat) : yield
|
|
15323
|
+
const result = useComparisonPnl ? yield getProfitAndLossComparisonCsv(dateRange, moneyFormat) : yield getProfitAndLossExcel2();
|
|
15304
15324
|
if ((_a = result == null ? void 0 : result.data) == null ? void 0 : _a.presignedUrl) {
|
|
15305
15325
|
window.location.href = result.data.presignedUrl;
|
|
15306
15326
|
setRequestFailed(false);
|
|
@@ -17266,7 +17286,7 @@ function buildKey8({
|
|
|
17266
17286
|
apiUrl,
|
|
17267
17287
|
businessId,
|
|
17268
17288
|
effectiveDate,
|
|
17269
|
-
tags: ["#balance-sheet", "#exports", "#
|
|
17289
|
+
tags: ["#balance-sheet", "#exports", "#excel"]
|
|
17270
17290
|
};
|
|
17271
17291
|
}
|
|
17272
17292
|
}
|
|
@@ -17281,7 +17301,7 @@ function useBalanceSheetDownload({
|
|
|
17281
17301
|
businessId,
|
|
17282
17302
|
effectiveDate
|
|
17283
17303
|
})),
|
|
17284
|
-
({ accessToken, apiUrl, businessId: businessId2, effectiveDate: effectiveDate2 }) =>
|
|
17304
|
+
({ accessToken, apiUrl, businessId: businessId2, effectiveDate: effectiveDate2 }) => getBalanceSheetExcel(
|
|
17285
17305
|
apiUrl,
|
|
17286
17306
|
accessToken,
|
|
17287
17307
|
{
|
|
@@ -22683,20 +22703,14 @@ function LinkAccountsLinkStep() {
|
|
|
22683
22703
|
Empty: /* @__PURE__ */ (0, import_jsx_runtime247.jsxs)(VStack, { gap: "xl", pbe: "md", children: [
|
|
22684
22704
|
/* @__PURE__ */ (0, import_jsx_runtime247.jsx)(Text, { status: "disabled", children: "Connect your bank accounts and credit cards to automatically import your business transactions." }),
|
|
22685
22705
|
/* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
|
|
22686
|
-
|
|
22706
|
+
Button,
|
|
22687
22707
|
{
|
|
22688
|
-
|
|
22689
|
-
|
|
22690
|
-
|
|
22691
|
-
|
|
22692
|
-
|
|
22693
|
-
|
|
22694
|
-
onClick: () => addConnection("PLAID"),
|
|
22695
|
-
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(Link_default, { size: 12 }),
|
|
22696
|
-
disabled: loadingStatus !== "complete",
|
|
22697
|
-
children: "Connect"
|
|
22698
|
-
}
|
|
22699
|
-
)
|
|
22708
|
+
onClick: () => addConnection("PLAID"),
|
|
22709
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(Link_default, { size: 12 }),
|
|
22710
|
+
disabled: loadingStatus !== "complete",
|
|
22711
|
+
fullWidth: false,
|
|
22712
|
+
style: { maxWidth: "fit-content" },
|
|
22713
|
+
children: "Connect my bank"
|
|
22700
22714
|
}
|
|
22701
22715
|
)
|
|
22702
22716
|
] }),
|
|
@@ -22709,16 +22723,16 @@ function LinkAccountsLinkStep() {
|
|
|
22709
22723
|
/* @__PURE__ */ (0, import_jsx_runtime247.jsx)(VStack, { pbs: "xl", children: /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
|
|
22710
22724
|
ActionableRow,
|
|
22711
22725
|
{
|
|
22712
|
-
|
|
22713
|
-
title: "Connect my next bank account",
|
|
22714
|
-
description: "Import data with one simple integration.",
|
|
22726
|
+
title: "Do you use any other bank accounts or credit cards for your business?",
|
|
22715
22727
|
button: /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
|
|
22716
22728
|
Button,
|
|
22717
22729
|
{
|
|
22718
22730
|
onClick: () => addConnection("PLAID"),
|
|
22719
22731
|
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(Link_default, { size: 12 }),
|
|
22720
22732
|
disabled: loadingStatus !== "complete",
|
|
22721
|
-
|
|
22733
|
+
fullWidth: false,
|
|
22734
|
+
style: { width: "auto", minWidth: "fit-content" },
|
|
22735
|
+
children: "Link another bank"
|
|
22722
22736
|
}
|
|
22723
22737
|
)
|
|
22724
22738
|
}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -58,7 +58,7 @@ import { useState as useState8 } from "react";
|
|
|
58
58
|
import { useReducer, useEffect as useEffect4 } from "react";
|
|
59
59
|
|
|
60
60
|
// package.json
|
|
61
|
-
var version = "0.1.
|
|
61
|
+
var version = "0.1.93";
|
|
62
62
|
|
|
63
63
|
// src/models/APIError.ts
|
|
64
64
|
var APIError = class _APIError extends Error {
|
|
@@ -228,6 +228,12 @@ var getBalanceSheetCSV = get(
|
|
|
228
228
|
return `/v1/businesses/${businessId}/reports/balance-sheet/exports/csv?${parameters}`;
|
|
229
229
|
}
|
|
230
230
|
);
|
|
231
|
+
var getBalanceSheetExcel = get(
|
|
232
|
+
({ businessId, effectiveDate }) => {
|
|
233
|
+
const parameters = toDefinedSearchParameters({ effectiveDate });
|
|
234
|
+
return `/v1/businesses/${businessId}/reports/balance-sheet/exports/excel?${parameters}`;
|
|
235
|
+
}
|
|
236
|
+
);
|
|
231
237
|
|
|
232
238
|
// src/api/layer/bankTransactions.ts
|
|
233
239
|
var getBankTransactions = get(
|
|
@@ -267,6 +273,10 @@ var getBankTransactionsCsv = get((params) => {
|
|
|
267
273
|
const { businessId, startDate, endDate, categorized, category, month, year } = params;
|
|
268
274
|
return `/v1/businesses/${businessId}/reports/transactions/exports/csv?${startDate ? `start_date=${encodeURIComponent(startDate)}&` : ""}${endDate ? `end_date=${encodeURIComponent(endDate)}&` : ""}${month ? `month=${encodeURIComponent(month)}&` : ""}${year ? `year=${encodeURIComponent(year)}&` : ""}${categorized ? `categorized=${categorized}&` : ""}${category ? `category=${encodeURIComponent(category)}&` : ""}`;
|
|
269
275
|
});
|
|
276
|
+
var getBankTransactionsExcel = get((params) => {
|
|
277
|
+
const { businessId, startDate, endDate, categorized, category, month, year } = params;
|
|
278
|
+
return `/v1/businesses/${businessId}/reports/transactions/exports/excel?${startDate ? `start_date=${encodeURIComponent(startDate)}&` : ""}${endDate ? `end_date=${encodeURIComponent(endDate)}&` : ""}${month ? `month=${encodeURIComponent(month)}&` : ""}${year ? `year=${encodeURIComponent(year)}&` : ""}${categorized ? `categorized=${categorized}&` : ""}${category ? `category=${encodeURIComponent(category)}&` : ""}`;
|
|
279
|
+
});
|
|
270
280
|
var getBankTransactionMetadata = get(
|
|
271
281
|
({ businessId, bankTransactionId }) => `/v1/businesses/${businessId}/bank-transactions/${bankTransactionId}/metadata`
|
|
272
282
|
);
|
|
@@ -426,6 +436,12 @@ var getProfitAndLossCsv = (apiUrl, accessToken, params) => {
|
|
|
426
436
|
({ businessId: businessId2 }) => `/v1/businesses/${businessId2}/reports/profit-and-loss/exports/csv?${startDate ? `start_date=${encodeURIComponent(toLocalDateString(startDate))}` : ""}${endDate ? `&end_date=${encodeURIComponent(toLocalDateString(endDate))}` : ""}${month ? `&month=${month}` : ""}${year ? `&year=${year}` : ""}${reportingBasis ? `&reporting_basis=${reportingBasis}` : ""}${tagKey ? `&tag_key=${tagKey}` : ""}${tagValues ? `&tag_values=${tagValues}` : ""}${moneyFormat ? `&money_format=${moneyFormat}` : ""}`
|
|
427
437
|
)(apiUrl, accessToken, { params: { businessId } });
|
|
428
438
|
};
|
|
439
|
+
var getProfitAndLossExcel = (apiUrl, accessToken, params) => {
|
|
440
|
+
const { businessId, startDate, endDate, month, year, tagKey, tagValues, reportingBasis, moneyFormat } = params;
|
|
441
|
+
return get(
|
|
442
|
+
({ businessId: businessId2 }) => `/v1/businesses/${businessId2}/reports/profit-and-loss/exports/excel?${startDate ? `start_date=${encodeURIComponent(toLocalDateString(startDate))}` : ""}${endDate ? `&end_date=${encodeURIComponent(toLocalDateString(endDate))}` : ""}${month ? `&month=${month}` : ""}${year ? `&year=${year}` : ""}${reportingBasis ? `&reporting_basis=${reportingBasis}` : ""}${tagKey ? `&tag_key=${tagKey}` : ""}${tagValues ? `&tag_values=${tagValues}` : ""}${moneyFormat ? `&money_format=${moneyFormat}` : ""}`
|
|
443
|
+
)(apiUrl, accessToken, { params: { businessId } });
|
|
444
|
+
};
|
|
429
445
|
var profitAndLossComparisonCsv = post(
|
|
430
446
|
({ businessId, moneyFormat }) => `/v1/businesses/${businessId}/reports/profit-and-loss/exports/comparison-csv?money_format=${moneyFormat ? moneyFormat : "DOLLAR_STRING"}`
|
|
431
447
|
);
|
|
@@ -468,7 +484,10 @@ var Layer = {
|
|
|
468
484
|
createAccount,
|
|
469
485
|
updateAccount,
|
|
470
486
|
getBalanceSheet,
|
|
487
|
+
getBalanceSheetCSV,
|
|
488
|
+
getBalanceSheetExcel,
|
|
471
489
|
getBankTransactionsCsv,
|
|
490
|
+
getBankTransactionsExcel,
|
|
472
491
|
getBankTransactionMetadata,
|
|
473
492
|
listBankTransactionDocuments,
|
|
474
493
|
getBankTransactionDocument,
|
|
@@ -488,6 +507,7 @@ var Layer = {
|
|
|
488
507
|
getProfitAndLoss,
|
|
489
508
|
getProfitAndLossSummaries,
|
|
490
509
|
getProfitAndLossCsv,
|
|
510
|
+
getProfitAndLossExcel,
|
|
491
511
|
getLinkedAccounts,
|
|
492
512
|
getJournal,
|
|
493
513
|
getJournalEntriesCSV,
|
|
@@ -12167,7 +12187,7 @@ var DownloadButton2 = ({
|
|
|
12167
12187
|
var _a;
|
|
12168
12188
|
setIsDownloading(true);
|
|
12169
12189
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear().toString();
|
|
12170
|
-
const
|
|
12190
|
+
const getBankTransactionsExcel2 = Layer.getBankTransactionsExcel(
|
|
12171
12191
|
apiUrl,
|
|
12172
12192
|
auth == null ? void 0 : auth.access_token,
|
|
12173
12193
|
{
|
|
@@ -12178,7 +12198,7 @@ var DownloadButton2 = ({
|
|
|
12178
12198
|
}
|
|
12179
12199
|
);
|
|
12180
12200
|
try {
|
|
12181
|
-
const result = yield
|
|
12201
|
+
const result = yield getBankTransactionsExcel2();
|
|
12182
12202
|
if ((_a = result == null ? void 0 : result.data) == null ? void 0 : _a.presignedUrl) {
|
|
12183
12203
|
window.location.href = result.data.presignedUrl;
|
|
12184
12204
|
setRequestFailed(false);
|
|
@@ -15324,7 +15344,7 @@ var ProfitAndLossDownloadButton = ({
|
|
|
15324
15344
|
const handleClick = () => __async(void 0, null, function* () {
|
|
15325
15345
|
var _a;
|
|
15326
15346
|
setIsDownloading(true);
|
|
15327
|
-
const
|
|
15347
|
+
const getProfitAndLossExcel2 = Layer.getProfitAndLossExcel(
|
|
15328
15348
|
apiUrl,
|
|
15329
15349
|
auth == null ? void 0 : auth.access_token,
|
|
15330
15350
|
{
|
|
@@ -15337,7 +15357,7 @@ var ProfitAndLossDownloadButton = ({
|
|
|
15337
15357
|
}
|
|
15338
15358
|
);
|
|
15339
15359
|
try {
|
|
15340
|
-
const result = useComparisonPnl ? yield getProfitAndLossComparisonCsv(dateRange, moneyFormat) : yield
|
|
15360
|
+
const result = useComparisonPnl ? yield getProfitAndLossComparisonCsv(dateRange, moneyFormat) : yield getProfitAndLossExcel2();
|
|
15341
15361
|
if ((_a = result == null ? void 0 : result.data) == null ? void 0 : _a.presignedUrl) {
|
|
15342
15362
|
window.location.href = result.data.presignedUrl;
|
|
15343
15363
|
setRequestFailed(false);
|
|
@@ -17305,7 +17325,7 @@ function buildKey8({
|
|
|
17305
17325
|
apiUrl,
|
|
17306
17326
|
businessId,
|
|
17307
17327
|
effectiveDate,
|
|
17308
|
-
tags: ["#balance-sheet", "#exports", "#
|
|
17328
|
+
tags: ["#balance-sheet", "#exports", "#excel"]
|
|
17309
17329
|
};
|
|
17310
17330
|
}
|
|
17311
17331
|
}
|
|
@@ -17320,7 +17340,7 @@ function useBalanceSheetDownload({
|
|
|
17320
17340
|
businessId,
|
|
17321
17341
|
effectiveDate
|
|
17322
17342
|
})),
|
|
17323
|
-
({ accessToken, apiUrl, businessId: businessId2, effectiveDate: effectiveDate2 }) =>
|
|
17343
|
+
({ accessToken, apiUrl, businessId: businessId2, effectiveDate: effectiveDate2 }) => getBalanceSheetExcel(
|
|
17324
17344
|
apiUrl,
|
|
17325
17345
|
accessToken,
|
|
17326
17346
|
{
|
|
@@ -22734,20 +22754,14 @@ function LinkAccountsLinkStep() {
|
|
|
22734
22754
|
Empty: /* @__PURE__ */ jsxs157(VStack, { gap: "xl", pbe: "md", children: [
|
|
22735
22755
|
/* @__PURE__ */ jsx246(Text, { status: "disabled", children: "Connect your bank accounts and credit cards to automatically import your business transactions." }),
|
|
22736
22756
|
/* @__PURE__ */ jsx246(
|
|
22737
|
-
|
|
22757
|
+
Button,
|
|
22738
22758
|
{
|
|
22739
|
-
|
|
22740
|
-
|
|
22741
|
-
|
|
22742
|
-
|
|
22743
|
-
|
|
22744
|
-
|
|
22745
|
-
onClick: () => addConnection("PLAID"),
|
|
22746
|
-
rightIcon: /* @__PURE__ */ jsx246(Link_default, { size: 12 }),
|
|
22747
|
-
disabled: loadingStatus !== "complete",
|
|
22748
|
-
children: "Connect"
|
|
22749
|
-
}
|
|
22750
|
-
)
|
|
22759
|
+
onClick: () => addConnection("PLAID"),
|
|
22760
|
+
rightIcon: /* @__PURE__ */ jsx246(Link_default, { size: 12 }),
|
|
22761
|
+
disabled: loadingStatus !== "complete",
|
|
22762
|
+
fullWidth: false,
|
|
22763
|
+
style: { maxWidth: "fit-content" },
|
|
22764
|
+
children: "Connect my bank"
|
|
22751
22765
|
}
|
|
22752
22766
|
)
|
|
22753
22767
|
] }),
|
|
@@ -22760,16 +22774,16 @@ function LinkAccountsLinkStep() {
|
|
|
22760
22774
|
/* @__PURE__ */ jsx246(VStack, { pbs: "xl", children: /* @__PURE__ */ jsx246(
|
|
22761
22775
|
ActionableRow,
|
|
22762
22776
|
{
|
|
22763
|
-
|
|
22764
|
-
title: "Connect my next bank account",
|
|
22765
|
-
description: "Import data with one simple integration.",
|
|
22777
|
+
title: "Do you use any other bank accounts or credit cards for your business?",
|
|
22766
22778
|
button: /* @__PURE__ */ jsx246(
|
|
22767
22779
|
Button,
|
|
22768
22780
|
{
|
|
22769
22781
|
onClick: () => addConnection("PLAID"),
|
|
22770
22782
|
rightIcon: /* @__PURE__ */ jsx246(Link_default, { size: 12 }),
|
|
22771
22783
|
disabled: loadingStatus !== "complete",
|
|
22772
|
-
|
|
22784
|
+
fullWidth: false,
|
|
22785
|
+
style: { width: "auto", minWidth: "fit-content" },
|
|
22786
|
+
children: "Link another bank"
|
|
22773
22787
|
}
|
|
22774
22788
|
)
|
|
22775
22789
|
}
|
package/dist/index.css
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -36,6 +36,11 @@ declare module '@layerfi/components/api/layer/balance_sheet' {
|
|
|
36
36
|
} | undefined) => () => Promise<{
|
|
37
37
|
data: S3PresignedUrl;
|
|
38
38
|
}>;
|
|
39
|
+
export const getBalanceSheetExcel: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
40
|
+
params?: GetBalanceSheetParams | undefined;
|
|
41
|
+
} | undefined) => () => Promise<{
|
|
42
|
+
data: S3PresignedUrl;
|
|
43
|
+
}>;
|
|
39
44
|
export {};
|
|
40
45
|
|
|
41
46
|
}
|
|
@@ -85,7 +90,7 @@ declare module '@layerfi/components/api/layer/bankTransactions' {
|
|
|
85
90
|
data: BankTransactionMatch;
|
|
86
91
|
errors: unknown;
|
|
87
92
|
}>;
|
|
88
|
-
export interface
|
|
93
|
+
export interface GetBankTransactionsExportParams extends Record<string, string | undefined> {
|
|
89
94
|
businessId: string;
|
|
90
95
|
startDate?: string;
|
|
91
96
|
endDate?: string;
|
|
@@ -100,6 +105,12 @@ declare module '@layerfi/components/api/layer/bankTransactions' {
|
|
|
100
105
|
data?: S3PresignedUrl;
|
|
101
106
|
error?: unknown;
|
|
102
107
|
}>;
|
|
108
|
+
export const getBankTransactionsExcel: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
109
|
+
params?: Record<string, string | undefined> | undefined;
|
|
110
|
+
} | undefined) => () => Promise<{
|
|
111
|
+
data?: S3PresignedUrl;
|
|
112
|
+
error?: unknown;
|
|
113
|
+
}>;
|
|
103
114
|
export const getBankTransactionMetadata: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
104
115
|
params?: Record<string, string | undefined> | undefined;
|
|
105
116
|
} | undefined) => () => Promise<{
|
|
@@ -482,6 +493,10 @@ declare module '@layerfi/components/api/layer/profit_and_loss' {
|
|
|
482
493
|
data?: S3PresignedUrl;
|
|
483
494
|
error?: unknown;
|
|
484
495
|
}>;
|
|
496
|
+
export const getProfitAndLossExcel: (apiUrl: string, accessToken: string | undefined, params: GetProfitAndLossCsvParams) => () => Promise<{
|
|
497
|
+
data?: S3PresignedUrl;
|
|
498
|
+
error?: unknown;
|
|
499
|
+
}>;
|
|
485
500
|
export const profitAndLossComparisonCsv: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
486
501
|
params?: Record<string, string | undefined> | undefined;
|
|
487
502
|
body?: Record<string, unknown> | undefined;
|
|
@@ -661,12 +676,34 @@ declare module '@layerfi/components/api/layer' {
|
|
|
661
676
|
} | undefined) => () => Promise<{
|
|
662
677
|
data: import("@layerfi/components/types").BalanceSheet;
|
|
663
678
|
}>;
|
|
679
|
+
getBalanceSheetCSV: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
680
|
+
params?: {
|
|
681
|
+
businessId: string;
|
|
682
|
+
effectiveDate: Date;
|
|
683
|
+
} | undefined;
|
|
684
|
+
} | undefined) => () => Promise<{
|
|
685
|
+
data: import("@layerfi/components/types/general").S3PresignedUrl;
|
|
686
|
+
}>;
|
|
687
|
+
getBalanceSheetExcel: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
688
|
+
params?: {
|
|
689
|
+
businessId: string;
|
|
690
|
+
effectiveDate: Date;
|
|
691
|
+
} | undefined;
|
|
692
|
+
} | undefined) => () => Promise<{
|
|
693
|
+
data: import("@layerfi/components/types/general").S3PresignedUrl;
|
|
694
|
+
}>;
|
|
664
695
|
getBankTransactionsCsv: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
665
696
|
params?: Record<string, string | undefined> | undefined;
|
|
666
697
|
} | undefined) => () => Promise<{
|
|
667
698
|
data?: import("@layerfi/components/types/general").S3PresignedUrl;
|
|
668
699
|
error?: unknown;
|
|
669
700
|
}>;
|
|
701
|
+
getBankTransactionsExcel: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
702
|
+
params?: Record<string, string | undefined> | undefined;
|
|
703
|
+
} | undefined) => () => Promise<{
|
|
704
|
+
data?: import("@layerfi/components/types/general").S3PresignedUrl;
|
|
705
|
+
error?: unknown;
|
|
706
|
+
}>;
|
|
670
707
|
getBankTransactionMetadata: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
671
708
|
params?: Record<string, string | undefined> | undefined;
|
|
672
709
|
} | undefined) => () => Promise<{
|
|
@@ -803,6 +840,21 @@ declare module '@layerfi/components/api/layer' {
|
|
|
803
840
|
data?: import("@layerfi/components/types/general").S3PresignedUrl;
|
|
804
841
|
error?: unknown;
|
|
805
842
|
}>;
|
|
843
|
+
getProfitAndLossExcel: (apiUrl: string, accessToken: string | undefined, params: {
|
|
844
|
+
businessId: string;
|
|
845
|
+
startDate?: Date;
|
|
846
|
+
endDate?: Date;
|
|
847
|
+
month?: string;
|
|
848
|
+
year?: string;
|
|
849
|
+
tagKey?: string;
|
|
850
|
+
tagValues?: string;
|
|
851
|
+
reportingBasis?: string;
|
|
852
|
+
} & {
|
|
853
|
+
moneyFormat?: string;
|
|
854
|
+
}) => () => Promise<{
|
|
855
|
+
data?: import("@layerfi/components/types/general").S3PresignedUrl;
|
|
856
|
+
error?: unknown;
|
|
857
|
+
}>;
|
|
806
858
|
getLinkedAccounts: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
807
859
|
params?: {
|
|
808
860
|
businessId: string;
|