@layerfi/components 0.1.99-alpha-1 → 0.1.99

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/index.d.ts CHANGED
@@ -77,21 +77,26 @@ declare module '@layerfi/components/api/layer/bankTransactions' {
77
77
  params?: GetBankTransactionsPaginatedParams | undefined;
78
78
  } | undefined) => () => Promise<GetBankTransactionsReturn>;
79
79
  export const categorizeBankTransaction: (baseUrl: string, accessToken: string | undefined, options?: {
80
- params?: Record<string, string | undefined> | undefined;
80
+ params?: {
81
+ businessId: string;
82
+ bankTransactionId: string;
83
+ } | undefined;
81
84
  body?: CategoryUpdate | undefined;
82
85
  } | undefined) => Promise<{
83
86
  data: BankTransaction;
84
- errors: unknown;
85
87
  }>;
88
+ export type MatchBankTransactionBody = {
89
+ match_id: string;
90
+ type: BankTransactionMatchType;
91
+ };
86
92
  export const matchBankTransaction: (baseUrl: string, accessToken: string | undefined, options?: {
87
- params?: Record<string, string | undefined> | undefined;
88
- body?: {
89
- match_id: string;
90
- type: BankTransactionMatchType;
93
+ params?: {
94
+ businessId: string;
95
+ bankTransactionId: string;
91
96
  } | undefined;
97
+ body?: MatchBankTransactionBody | undefined;
92
98
  } | undefined) => Promise<{
93
99
  data: BankTransactionMatch;
94
- errors: unknown;
95
100
  }>;
96
101
  export const getBankTransactionsExcel: (baseUrl: string, accessToken: string | undefined, options?: {
97
102
  params?: GetBankTransactionsBaseParams | undefined;
@@ -345,7 +350,7 @@ declare module '@layerfi/components/api/layer/linked_accounts' {
345
350
  } | undefined;
346
351
  body?: UpdateOpeningBalanceBody | undefined;
347
352
  } | undefined) => Promise<never>;
348
- export const getLinkedAccounts: (baseUrl: string, accessToken: string | undefined, options?: {
353
+ export const listExternalAccounts: (baseUrl: string, accessToken: string | undefined, options?: {
349
354
  params?: {
350
355
  businessId: string;
351
356
  } | undefined;
@@ -631,23 +636,6 @@ declare module '@layerfi/components/api/layer' {
631
636
  } | undefined) => () => Promise<{
632
637
  data: import("@layerfi/components/types").Business;
633
638
  }>;
634
- categorizeBankTransaction: (baseUrl: string, accessToken: string | undefined, options?: {
635
- params?: Record<string, string | undefined> | undefined;
636
- body?: import("@layerfi/components/types").CategoryUpdate | undefined;
637
- } | undefined) => Promise<{
638
- data: import("@layerfi/components/types").BankTransaction;
639
- errors: unknown;
640
- }>;
641
- matchBankTransaction: (baseUrl: string, accessToken: string | undefined, options?: {
642
- params?: Record<string, string | undefined> | undefined;
643
- body?: {
644
- match_id: string;
645
- type: import("@layerfi/components/types/bank_transactions").BankTransactionMatchType;
646
- } | undefined;
647
- } | undefined) => Promise<{
648
- data: import("@layerfi/components/types/bank_transactions").BankTransactionMatch;
649
- errors: unknown;
650
- }>;
651
639
  createAccount: (baseUrl: string, accessToken: string | undefined, options?: {
652
640
  params?: Record<string, string | undefined> | undefined;
653
641
  body?: import("@layerfi/components/types").NewAccount | undefined;
@@ -841,13 +829,6 @@ declare module '@layerfi/components/api/layer' {
841
829
  data?: import("@layerfi/components/types/general").S3PresignedUrl;
842
830
  error?: unknown;
843
831
  }>;
844
- getLinkedAccounts: (baseUrl: string, accessToken: string | undefined, options?: {
845
- params?: {
846
- businessId: string;
847
- } | undefined;
848
- } | undefined) => () => Promise<{
849
- data: import("@layerfi/components/types/linked_accounts").LinkedAccounts;
850
- }>;
851
832
  getJournal: (baseUrl: string, accessToken: string | undefined, options?: {
852
833
  params?: Record<string, string | undefined> | undefined;
853
834
  } | undefined) => () => Promise<{
@@ -2743,7 +2724,7 @@ declare module '@layerfi/components/components/Integrations/Integrations' {
2743
2724
  title?: string;
2744
2725
  };
2745
2726
  }
2746
- export const Integrations: (props: IntegrationsProps) => import("react/jsx-runtime").JSX.Element;
2727
+ export const unstable_Integrations: (props: IntegrationsProps) => import("react/jsx-runtime").JSX.Element;
2747
2728
  export const IntegrationsComponent: ({ elevated, stringOverrides, }: IntegrationsProps) => import("react/jsx-runtime").JSX.Element;
2748
2729
 
2749
2730
  }
@@ -3101,7 +3082,7 @@ declare module '@layerfi/components/components/LinkedAccounts/ConfirmationModal/
3101
3082
  export type AccountConfirmExcludeFormState = Record<string, boolean>;
3102
3083
  export function useConfirmAndExcludeMultiple({ onSuccess }: {
3103
3084
  onSuccess?: () => Awaitable<unknown>;
3104
- }): import("swr/mutation").SWRMutationResponse<true | undefined, any, () => {
3085
+ }): import("swr/mutation").SWRMutationResponse<true, any, () => {
3105
3086
  accessToken: string;
3106
3087
  apiUrl: string;
3107
3088
  businessId: string;
@@ -3198,7 +3179,7 @@ declare module '@layerfi/components/components/LinkedAccounts/OpeningBalanceModa
3198
3179
  } | OpeningBalanceAPIResponseValidationError | OpeningBalanceAPIResponseError;
3199
3180
  export function useBulkSetOpeningBalanceAndDate(data: OpeningBalanceData[], { onSuccess }: {
3200
3181
  onSuccess: (results: OpeningBalanceAPIResponseResult[]) => Awaitable<void>;
3201
- }): import("swr/mutation").SWRMutationResponse<true | undefined, any, () => {
3182
+ }): import("swr/mutation").SWRMutationResponse<true, any, () => {
3202
3183
  readonly accessToken: string;
3203
3184
  readonly apiUrl: string;
3204
3185
  readonly businessId: string;
@@ -4395,7 +4376,7 @@ declare module '@layerfi/components/components/Tooltip/useTooltip' {
4395
4376
  events: import("@floating-ui/react").FloatingEvents;
4396
4377
  dataRef: React.MutableRefObject<import("@floating-ui/react").ContextData>;
4397
4378
  nodeId: string | undefined;
4398
- floatingId: string;
4379
+ floatingId: string | undefined;
4399
4380
  refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
4400
4381
  elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
4401
4382
  };
@@ -4444,7 +4425,7 @@ declare module '@layerfi/components/components/Tooltip/useTooltip' {
4444
4425
  events: import("@floating-ui/react").FloatingEvents;
4445
4426
  dataRef: React.MutableRefObject<import("@floating-ui/react").ContextData>;
4446
4427
  nodeId: string | undefined;
4447
- floatingId: string;
4428
+ floatingId: string | undefined;
4448
4429
  refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
4449
4430
  elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
4450
4431
  };
@@ -4987,8 +4968,8 @@ declare module '@layerfi/components/contexts/BankTransactionsContext/BankTransac
4987
4968
  isValidating: boolean;
4988
4969
  refetch: () => void;
4989
4970
  error: any;
4990
- categorize: (id: import("@layerfi/components/types").BankTransaction["id"], newCategory: import("../../types").CategoryUpdate, notify?: boolean) => Promise<void>;
4991
- match: (id: import("@layerfi/components/types").BankTransaction["id"], matchId: import("../../types").BankTransaction["id"], notify?: boolean) => Promise<void>;
4971
+ categorize: (bankTransactionId: import("@layerfi/components/types").BankTransaction["id"], newCategory: import("../../types").CategoryUpdate, notify?: boolean) => Promise<void>;
4972
+ match: (bankTransactionId: import("@layerfi/components/types").BankTransaction["id"], suggestedMatchId: string, notify?: boolean) => Promise<void>;
4992
4973
  updateOneLocal: (newBankTransaction: import("@layerfi/components/types").BankTransaction) => void;
4993
4974
  shouldHideAfterCategorize: () => boolean;
4994
4975
  removeAfterCategorize: (bankTransaction: import("@layerfi/components/types").BankTransaction) => void;
@@ -5011,8 +4992,8 @@ declare module '@layerfi/components/contexts/BankTransactionsContext/BankTransac
5011
4992
  isValidating: boolean;
5012
4993
  refetch: () => void;
5013
4994
  error: any;
5014
- categorize: (id: import("@layerfi/components/types").BankTransaction["id"], newCategory: import("../../types").CategoryUpdate, notify?: boolean) => Promise<void>;
5015
- match: (id: import("@layerfi/components/types").BankTransaction["id"], matchId: import("../../types").BankTransaction["id"], notify?: boolean) => Promise<void>;
4995
+ categorize: (bankTransactionId: import("@layerfi/components/types").BankTransaction["id"], newCategory: import("../../types").CategoryUpdate, notify?: boolean) => Promise<void>;
4996
+ match: (bankTransactionId: import("@layerfi/components/types").BankTransaction["id"], suggestedMatchId: string, notify?: boolean) => Promise<void>;
5016
4997
  updateOneLocal: (newBankTransaction: import("@layerfi/components/types").BankTransaction) => void;
5017
4998
  shouldHideAfterCategorize: () => boolean;
5018
4999
  removeAfterCategorize: (bankTransaction: import("@layerfi/components/types").BankTransaction) => void;
@@ -5299,7 +5280,7 @@ declare module '@layerfi/components/hooks/bookkeeping/periods/tasks/useDeleteUpl
5299
5280
  };
5300
5281
  export function useDeleteUploadsOnTask(): import("swr/mutation").SWRMutationResponse<{
5301
5282
  data: import("@layerfi/components/types/tasks").RawTask;
5302
- } | undefined, any, () => {
5283
+ }, any, () => {
5303
5284
  readonly accessToken: string;
5304
5285
  readonly apiUrl: string;
5305
5286
  readonly businessId: string;
@@ -5315,7 +5296,7 @@ declare module '@layerfi/components/hooks/bookkeeping/periods/tasks/useSubmitRes
5315
5296
  };
5316
5297
  export function useSubmitUserResponseForTask(): import("swr/mutation").SWRMutationResponse<{
5317
5298
  data: import("@layerfi/components/types/tasks").RawTask;
5318
- } | undefined, any, () => {
5299
+ }, any, () => {
5319
5300
  readonly accessToken: string;
5320
5301
  readonly apiUrl: string;
5321
5302
  readonly businessId: string;
@@ -5331,7 +5312,7 @@ declare module '@layerfi/components/hooks/bookkeeping/periods/tasks/useUpdateTas
5331
5312
  };
5332
5313
  export function useUpdateTaskUploadDescription(): import("swr/mutation").SWRMutationResponse<{
5333
5314
  data: import("@layerfi/components/types/tasks").RawTask;
5334
- } | undefined, any, () => {
5315
+ }, any, () => {
5335
5316
  readonly accessToken: string;
5336
5317
  readonly apiUrl: string;
5337
5318
  readonly businessId: string;
@@ -5348,7 +5329,7 @@ declare module '@layerfi/components/hooks/bookkeeping/periods/tasks/useUploadDoc
5348
5329
  };
5349
5330
  export function useUploadDocumentsForTask(): import("swr/mutation").SWRMutationResponse<{
5350
5331
  data: import("@layerfi/components/types/file_upload").FileMetadata;
5351
- } | undefined, any, () => {
5332
+ }, any, () => {
5352
5333
  readonly accessToken: string;
5353
5334
  readonly apiUrl: string;
5354
5335
  readonly businessId: string;
@@ -5437,6 +5418,7 @@ declare module '@layerfi/components/hooks/bookkeeping/periods/useBookkeepingYear
5437
5418
  }
5438
5419
  declare module '@layerfi/components/hooks/bookkeeping/useBankAccounts' {
5439
5420
  import { BankAccount } from '@layerfi/components/types/linked_accounts';
5421
+ export const BANK_ACCOUNTS_TAG_KEY = "#bank-accounts";
5440
5422
  export const requiresNotification: (bankAccount: BankAccount) => boolean;
5441
5423
  export const useBankAccounts: () => {
5442
5424
  bankAccounts: BankAccount[];
@@ -5459,7 +5441,7 @@ declare module '@layerfi/components/hooks/bookkeeping/useBookkeepingStatus' {
5459
5441
  }
5460
5442
  declare module '@layerfi/components/hooks/business/useUpdateBusiness' {
5461
5443
  export const BUSINESS_TAG_KEY = "business";
5462
- export function useUpdateBusiness(): import("swr/mutation").SWRMutationResponse<import("../../types").Business | undefined, any, () => {
5444
+ export function useUpdateBusiness(): import("swr/mutation").SWRMutationResponse<import("../../types").Business, any, () => {
5463
5445
  readonly accessToken: string;
5464
5446
  readonly apiUrl: string;
5465
5447
  readonly businessId: string;
@@ -5552,7 +5534,7 @@ declare module '@layerfi/components/hooks/businessPersonnel/useCreateBusinessPer
5552
5534
  role: PersonnelRole;
5553
5535
  }>;
5554
5536
  };
5555
- export function useCreateBusinessPersonnel(): import("swr/mutation").SWRMutationResponse<BusinessPersonnel | undefined, any, () => {
5537
+ export function useCreateBusinessPersonnel(): import("swr/mutation").SWRMutationResponse<BusinessPersonnel, any, () => {
5556
5538
  readonly accessToken: string;
5557
5539
  readonly apiUrl: string;
5558
5540
  readonly businessId: string;
@@ -5565,7 +5547,7 @@ declare module '@layerfi/components/hooks/businessPersonnel/useUpdateBusinessPer
5565
5547
  import { type UpdateBusinessPersonnelBody } from '@layerfi/components/api/layer/businessPersonnel/updateBusinessPersonnel';
5566
5548
  export function useUpdateBusinessPersonnel({ businessPersonnelId }: {
5567
5549
  businessPersonnelId?: string;
5568
- }): import("swr/mutation").SWRMutationResponse<import("./types").BusinessPersonnel | undefined, any, () => {
5550
+ }): import("swr/mutation").SWRMutationResponse<import("./types").BusinessPersonnel, any, () => {
5569
5551
  readonly accessToken: string;
5570
5552
  readonly apiUrl: string;
5571
5553
  readonly businessId: string;
@@ -5648,8 +5630,8 @@ declare module '@layerfi/components/hooks/useBankTransactions/useAugmentedBankTr
5648
5630
  isValidating: boolean;
5649
5631
  refetch: () => void;
5650
5632
  error: any;
5651
- categorize: (id: BankTransaction["id"], newCategory: CategoryUpdate, notify?: boolean) => Promise<void>;
5652
- match: (id: BankTransaction["id"], matchId: BankTransaction["id"], notify?: boolean) => Promise<void>;
5633
+ categorize: (bankTransactionId: BankTransaction["id"], newCategory: CategoryUpdate, notify?: boolean) => Promise<void>;
5634
+ match: (bankTransactionId: BankTransaction["id"], suggestedMatchId: string, notify?: boolean) => Promise<void>;
5653
5635
  updateOneLocal: (newBankTransaction: BankTransaction) => void;
5654
5636
  shouldHideAfterCategorize: () => boolean;
5655
5637
  removeAfterCategorize: (bankTransaction: BankTransaction) => void;
@@ -5664,6 +5646,7 @@ declare module '@layerfi/components/hooks/useBankTransactions/useAugmentedBankTr
5664
5646
  }
5665
5647
  declare module '@layerfi/components/hooks/useBankTransactions/useBankTransactions' {
5666
5648
  import { type GetBankTransactionsReturn } from '@layerfi/components/api/layer/bankTransactions';
5649
+ export const BANK_TRANSACTIONS_TAG_KEY = "#bank-transactions";
5667
5650
  export type UseBankTransactionsOptions = {
5668
5651
  categorized?: boolean;
5669
5652
  direction?: 'INFLOW' | 'OUTFLOW';
@@ -5677,7 +5660,7 @@ declare module '@layerfi/components/hooks/useBankTransactions/useBankTransaction
5677
5660
  }
5678
5661
  declare module '@layerfi/components/hooks/useBankTransactions/useBankTransactionsDownload' {
5679
5662
  import type { UseBankTransactionsOptions } from '@layerfi/components/hooks/useBankTransactions/useBankTransactions';
5680
- export function useBankTransactionsDownload(): import("swr/mutation").SWRMutationResponse<import("../../types/general").S3PresignedUrl | undefined, any, () => {
5663
+ export function useBankTransactionsDownload(): import("swr/mutation").SWRMutationResponse<import("../../types/general").S3PresignedUrl, any, () => {
5681
5664
  readonly accessToken: string;
5682
5665
  readonly apiUrl: string;
5683
5666
  readonly businessId: string;
@@ -5692,6 +5675,43 @@ declare module '@layerfi/components/hooks/useBankTransactions/useBankTransaction
5692
5675
  bankTransactionId: BankTransaction['id'];
5693
5676
  }): import("swr").SWRResponse<import("../../types/bank_transactions").BankTransactionMetadata, any, any>;
5694
5677
 
5678
+ }
5679
+ declare module '@layerfi/components/hooks/useBankTransactions/useCategorizeBankTransaction' {
5680
+ import { type GetBankTransactionsReturn } from '@layerfi/components/api/layer/bankTransactions';
5681
+ import type { CategoryUpdate } from '@layerfi/components/types';
5682
+ import type { SWRInfiniteKeyedMutator } from 'swr/infinite';
5683
+ type CategorizeBankTransactionArgs = CategoryUpdate & {
5684
+ bankTransactionId: string;
5685
+ };
5686
+ type UseCategorizeBankTransactionOptions = {
5687
+ mutateBankTransactions: SWRInfiniteKeyedMutator<Array<GetBankTransactionsReturn>>;
5688
+ };
5689
+ export function useCategorizeBankTransaction({ mutateBankTransactions, }: UseCategorizeBankTransactionOptions): import("swr/mutation").SWRMutationResponse<import("../../types").BankTransaction, any, () => {
5690
+ accessToken: string;
5691
+ apiUrl: string;
5692
+ businessId: string;
5693
+ tags: string[];
5694
+ } | undefined, CategorizeBankTransactionArgs>;
5695
+ export {};
5696
+
5697
+ }
5698
+ declare module '@layerfi/components/hooks/useBankTransactions/useMatchBankTransaction' {
5699
+ import { type GetBankTransactionsReturn, type MatchBankTransactionBody } from '@layerfi/components/api/layer/bankTransactions';
5700
+ import type { SWRInfiniteKeyedMutator } from 'swr/infinite';
5701
+ type MatchBankTransactionArgs = MatchBankTransactionBody & {
5702
+ bankTransactionId: string;
5703
+ };
5704
+ type UseMatchBankTransactionOptions = {
5705
+ mutateBankTransactions: SWRInfiniteKeyedMutator<Array<GetBankTransactionsReturn>>;
5706
+ };
5707
+ export function useMatchBankTransaction({ mutateBankTransactions, }: UseMatchBankTransactionOptions): import("swr/mutation").SWRMutationResponse<import("../../types/bank_transactions").BankTransactionMatch, any, () => {
5708
+ accessToken: string;
5709
+ apiUrl: string;
5710
+ businessId: string;
5711
+ tags: string[];
5712
+ } | undefined, MatchBankTransactionArgs>;
5713
+ export {};
5714
+
5695
5715
  }
5696
5716
  declare module '@layerfi/components/hooks/useBankTransactions/useUpdateBankTransactionMetadata' {
5697
5717
  import type { Awaitable } from '@layerfi/components/types/utility/promises';
@@ -5701,7 +5721,7 @@ declare module '@layerfi/components/hooks/useBankTransactions/useUpdateBankTrans
5701
5721
  export function useUpdateBankTransactionMetadata({ bankTransactionId, onSuccess }: {
5702
5722
  bankTransactionId: string;
5703
5723
  onSuccess?: () => Awaitable<unknown>;
5704
- }): import("swr/mutation").SWRMutationResponse<import("../../types/bank_transactions").BankTransactionMetadata | undefined, any, () => {
5724
+ }): import("swr/mutation").SWRMutationResponse<import("../../types/bank_transactions").BankTransactionMetadata, any, () => {
5705
5725
  accessToken: string;
5706
5726
  apiUrl: string;
5707
5727
  businessId: string;
@@ -5779,7 +5799,7 @@ declare module '@layerfi/components/hooks/useChartOfAccounts/useCreateChildAccou
5779
5799
  type NewChildAccountWithParentAccountId = NewChildAccount & {
5780
5800
  accountId: string;
5781
5801
  };
5782
- export function useCreateChildAccount(): import("swr/mutation").SWRMutationResponse<import("../../types/chart_of_accounts").Account | undefined, any, () => {
5802
+ export function useCreateChildAccount(): import("swr/mutation").SWRMutationResponse<import("../../types/chart_of_accounts").Account, any, () => {
5783
5803
  readonly accessToken: string;
5784
5804
  readonly apiUrl: string;
5785
5805
  readonly businessId: string;
@@ -5977,6 +5997,11 @@ declare module '@layerfi/components/hooks/useLinkedAccounts/useLinkedAccounts' {
5977
5997
  export const useLinkedAccounts: UseLinkedAccounts;
5978
5998
  export {};
5979
5999
 
6000
+ }
6001
+ declare module '@layerfi/components/hooks/useLinkedAccounts/useListExternalAccounts' {
6002
+ export const EXTERNAL_ACCOUNTS_TAG_KEY = "#external-accounts";
6003
+ export function useListExternalAccounts(): import("swr").SWRResponse<import("../../types/linked_accounts").LinkedAccount[], any, any>;
6004
+
5980
6005
  }
5981
6006
  declare module '@layerfi/components/hooks/usePagination/index' {
5982
6007
  export { usePagination, DOTS } from '@layerfi/components/hooks/usePagination/usePagination';
@@ -6657,7 +6682,7 @@ declare module '@layerfi/components/index' {
6657
6682
  export { Onboarding } from '@layerfi/components/components/Onboarding/index';
6658
6683
  export { LinkedAccounts } from '@layerfi/components/components/LinkedAccounts/index';
6659
6684
  export { BankTransactions } from '@layerfi/components/components/BankTransactions/index';
6660
- export { Integrations } from '@layerfi/components/components/Integrations/Integrations';
6685
+ export { unstable_Integrations } from '@layerfi/components/components/Integrations/Integrations';
6661
6686
  export { Quickbooks } from '@layerfi/components/components/Quickbooks/index';
6662
6687
  export { ProfitAndLoss } from '@layerfi/components/components/ProfitAndLoss/index';
6663
6688
  export { BalanceSheet } from '@layerfi/components/components/BalanceSheet/index';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@layerfi/components",
3
- "version": "0.1.99-alpha-1",
3
+ "version": "0.1.99",
4
4
  "description": "Layer React Components",
5
5
  "main": "dist/cjs/index.cjs",
6
6
  "module": "dist/esm/index.mjs",
@@ -69,6 +69,7 @@
69
69
  "stylelint": "^16.19.1",
70
70
  "stylelint-config-standard": "^38.0.0",
71
71
  "stylelint-config-standard-scss": "^14.0.0",
72
+ "stylelint-order": "^7.0.0",
72
73
  "typescript": "^5.8.3",
73
74
  "typescript-eslint": "^8.32.0"
74
75
  },