@abyss-project/banking 1.8.0 → 2.1.0

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.
Files changed (51) hide show
  1. package/.eslintrc.js +33 -33
  2. package/README.md +33 -33
  3. package/dist/api/banking-profile.api.d.ts +3 -1
  4. package/dist/api/banking-profile.api.js +17 -1
  5. package/dist/api/banking-profile.api.js.map +1 -1
  6. package/dist/index.d.ts +4 -0
  7. package/dist/index.js +4 -0
  8. package/dist/index.js.map +1 -1
  9. package/dist/types/enum/index.d.ts +0 -1
  10. package/dist/types/enum/index.js +0 -1
  11. package/dist/types/enum/index.js.map +1 -1
  12. package/dist/types/interface/api/requests/banking-profile.request.d.ts +29 -1
  13. package/dist/types/interface/api/responses/banking-profile.response.d.ts +9 -1
  14. package/dist/utils/currency-symbol.util.d.ts +3 -0
  15. package/dist/utils/currency-symbol.util.js +16 -0
  16. package/dist/utils/currency-symbol.util.js.map +1 -0
  17. package/dist/utils/index.d.ts +1 -0
  18. package/dist/utils/index.js +1 -0
  19. package/dist/utils/index.js.map +1 -1
  20. package/package.json +2 -2
  21. package/tsconfig.json +35 -35
  22. package/dist/api/saving-goal.api.d.ts +0 -6
  23. package/dist/api/saving-goal.api.js +0 -25
  24. package/dist/api/saving-goal.api.js.map +0 -1
  25. package/dist/api/view-account-analytics.api.d.ts +0 -37
  26. package/dist/api/view-account-analytics.api.js +0 -27
  27. package/dist/api/view-account-analytics.api.js.map +0 -1
  28. package/dist/api/view-account.api.d.ts +0 -14
  29. package/dist/api/view-account.api.js +0 -33
  30. package/dist/api/view-account.api.js.map +0 -1
  31. package/dist/types/enum/currency.enum.d.ts +0 -12
  32. package/dist/types/enum/currency.enum.js +0 -26
  33. package/dist/types/enum/currency.enum.js.map +0 -1
  34. package/dist/types/interface/api/requests/saving-goal.request.d.ts +0 -35
  35. package/dist/types/interface/api/requests/saving-goal.request.js +0 -3
  36. package/dist/types/interface/api/requests/saving-goal.request.js.map +0 -1
  37. package/dist/types/interface/api/requests/view-account.request.d.ts +0 -83
  38. package/dist/types/interface/api/requests/view-account.request.js +0 -3
  39. package/dist/types/interface/api/requests/view-account.request.js.map +0 -1
  40. package/dist/types/interface/api/responses/saving-goal.response.d.ts +0 -17
  41. package/dist/types/interface/api/responses/saving-goal.response.js +0 -3
  42. package/dist/types/interface/api/responses/saving-goal.response.js.map +0 -1
  43. package/dist/types/interface/api/responses/view-account.response.d.ts +0 -53
  44. package/dist/types/interface/api/responses/view-account.response.js +0 -3
  45. package/dist/types/interface/api/responses/view-account.response.js.map +0 -1
  46. package/dist/types/interface/models/saving-goal.model.d.ts +0 -28
  47. package/dist/types/interface/models/saving-goal.model.js +0 -10
  48. package/dist/types/interface/models/saving-goal.model.js.map +0 -1
  49. package/dist/types/interface/models/view-account.model.d.ts +0 -256
  50. package/dist/types/interface/models/view-account.model.js +0 -71
  51. package/dist/types/interface/models/view-account.model.js.map +0 -1
@@ -1,14 +0,0 @@
1
- import { IAttachViewAccountSourceBody, IAttachViewAccountSourceResponse, ICreateViewAccountBody, ICreateViewAccountResponse, IDeleteViewAccountResponse, IDeleteViewAccountSourceParams, IDeleteViewAccountSourceResponse, IGetPublicSharedViewAccountResponse, IGetViewAccountParams, IGetViewAccountResponse, IListViewAccountQuery, IListViewAccountResponse, IListViewAccountSourceParams, IListViewAccountSourceResponse, IListViewAccountTransactionParams, IListViewAccountTransactionQuery, IListViewAccountTransactionResponse, IMintViewAccountShareBody, IMintViewAccountShareParams, IMintViewAccountShareResponse, IRevokeViewAccountShareParams, IRevokeViewAccountShareResponse, IUpdateViewAccountBody, IUpdateViewAccountResponse } from '..';
2
- export declare const listViewAccount: (query?: IListViewAccountQuery) => Promise<IListViewAccountResponse>;
3
- export declare const getViewAccount: (params: IGetViewAccountParams) => Promise<IGetViewAccountResponse>;
4
- export declare const createViewAccount: (body: ICreateViewAccountBody) => Promise<ICreateViewAccountResponse>;
5
- export declare const updateViewAccount: (params: IGetViewAccountParams, body: IUpdateViewAccountBody) => Promise<IUpdateViewAccountResponse>;
6
- export declare const deleteViewAccount: (params: IGetViewAccountParams) => Promise<IDeleteViewAccountResponse>;
7
- export declare const listViewAccountSource: (params: IListViewAccountSourceParams) => Promise<IListViewAccountSourceResponse>;
8
- export declare const attachViewAccountSource: (params: IListViewAccountSourceParams, body: IAttachViewAccountSourceBody) => Promise<IAttachViewAccountSourceResponse>;
9
- export declare const deleteViewAccountSource: (params: IDeleteViewAccountSourceParams) => Promise<IDeleteViewAccountSourceResponse>;
10
- export declare const reingestViewAccountSource: (params: IDeleteViewAccountSourceParams) => Promise<IAttachViewAccountSourceResponse>;
11
- export declare const listViewAccountTransaction: (params: IListViewAccountTransactionParams, query?: IListViewAccountTransactionQuery) => Promise<IListViewAccountTransactionResponse>;
12
- export declare const mintViewAccountShare: (params: IMintViewAccountShareParams, body?: IMintViewAccountShareBody) => Promise<IMintViewAccountShareResponse>;
13
- export declare const revokeViewAccountShare: (params: IRevokeViewAccountShareParams) => Promise<IRevokeViewAccountShareResponse>;
14
- export declare const getPublicSharedViewAccount: (token: string) => Promise<IGetPublicSharedViewAccountResponse>;
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getPublicSharedViewAccount = exports.revokeViewAccountShare = exports.mintViewAccountShare = exports.listViewAccountTransaction = exports.reingestViewAccountSource = exports.deleteViewAccountSource = exports.attachViewAccountSource = exports.listViewAccountSource = exports.deleteViewAccount = exports.updateViewAccount = exports.createViewAccount = exports.getViewAccount = exports.listViewAccount = void 0;
4
- const __1 = require("..");
5
- const listViewAccount = async (query = {}) => (await __1.AbyssBankingCore.axios.get('banking/view', {
6
- params: query,
7
- })).data;
8
- exports.listViewAccount = listViewAccount;
9
- const getViewAccount = async (params) => (await __1.AbyssBankingCore.axios.get(`banking/view/${params.viewAccountId}`)).data;
10
- exports.getViewAccount = getViewAccount;
11
- const createViewAccount = async (body) => (await __1.AbyssBankingCore.axios.post('banking/view', body)).data;
12
- exports.createViewAccount = createViewAccount;
13
- const updateViewAccount = async (params, body) => (await __1.AbyssBankingCore.axios.put(`banking/view/${params.viewAccountId}`, body)).data;
14
- exports.updateViewAccount = updateViewAccount;
15
- const deleteViewAccount = async (params) => (await __1.AbyssBankingCore.axios.delete(`banking/view/${params.viewAccountId}`)).data;
16
- exports.deleteViewAccount = deleteViewAccount;
17
- const listViewAccountSource = async (params) => (await __1.AbyssBankingCore.axios.get(`banking/view/${params.viewAccountId}/source`)).data;
18
- exports.listViewAccountSource = listViewAccountSource;
19
- const attachViewAccountSource = async (params, body) => (await __1.AbyssBankingCore.axios.post(`banking/view/${params.viewAccountId}/source`, body)).data;
20
- exports.attachViewAccountSource = attachViewAccountSource;
21
- const deleteViewAccountSource = async (params) => (await __1.AbyssBankingCore.axios.delete(`banking/view/${params.viewAccountId}/source/${params.sourceId}`)).data;
22
- exports.deleteViewAccountSource = deleteViewAccountSource;
23
- const reingestViewAccountSource = async (params) => (await __1.AbyssBankingCore.axios.post(`banking/view/${params.viewAccountId}/source/${params.sourceId}/reingest`)).data;
24
- exports.reingestViewAccountSource = reingestViewAccountSource;
25
- const listViewAccountTransaction = async (params, query = {}) => (await __1.AbyssBankingCore.axios.get(`banking/view/${params.viewAccountId}/transaction`, { params: query })).data;
26
- exports.listViewAccountTransaction = listViewAccountTransaction;
27
- const mintViewAccountShare = async (params, body = {}) => (await __1.AbyssBankingCore.axios.post(`banking/view-share/owner/${params.viewAccountId}`, body)).data;
28
- exports.mintViewAccountShare = mintViewAccountShare;
29
- const revokeViewAccountShare = async (params) => (await __1.AbyssBankingCore.axios.delete(`banking/view-share/owner/${params.viewAccountId}`)).data;
30
- exports.revokeViewAccountShare = revokeViewAccountShare;
31
- const getPublicSharedViewAccount = async (token) => (await __1.AbyssBankingCore.axios.get(`banking/view-share/${token}`)).data;
32
- exports.getPublicSharedViewAccount = getPublicSharedViewAccount;
33
- //# sourceMappingURL=view-account.api.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"view-account.api.js","sourceRoot":"","sources":["../../src/api/view-account.api.ts"],"names":[],"mappings":"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"}
@@ -1,12 +0,0 @@
1
- export declare enum Currency {
2
- EUR = "EUR",
3
- USD = "USD",
4
- GBP = "GBP",
5
- CHF = "CHF",
6
- JPY = "JPY",
7
- CAD = "CAD",
8
- AUD = "AUD"
9
- }
10
- export declare const SUPPORTED_CURRENCIES: Currency[];
11
- export declare const CURRENCY_SYMBOLS: Record<Currency, string>;
12
- export declare const currencySymbol: (currency: string) => string;
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.currencySymbol = exports.CURRENCY_SYMBOLS = exports.SUPPORTED_CURRENCIES = exports.Currency = void 0;
4
- var Currency;
5
- (function (Currency) {
6
- Currency["EUR"] = "EUR";
7
- Currency["USD"] = "USD";
8
- Currency["GBP"] = "GBP";
9
- Currency["CHF"] = "CHF";
10
- Currency["JPY"] = "JPY";
11
- Currency["CAD"] = "CAD";
12
- Currency["AUD"] = "AUD";
13
- })(Currency || (exports.Currency = Currency = {}));
14
- exports.SUPPORTED_CURRENCIES = Object.values(Currency);
15
- exports.CURRENCY_SYMBOLS = {
16
- [Currency.EUR]: '€',
17
- [Currency.USD]: '$',
18
- [Currency.GBP]: '£',
19
- [Currency.CHF]: 'CHF',
20
- [Currency.JPY]: '¥',
21
- [Currency.CAD]: 'CA$',
22
- [Currency.AUD]: 'A$',
23
- };
24
- const currencySymbol = (currency) => exports.CURRENCY_SYMBOLS[currency] ?? currency;
25
- exports.currencySymbol = currencySymbol;
26
- //# sourceMappingURL=currency.enum.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"currency.enum.js","sourceRoot":"","sources":["../../../src/types/enum/currency.enum.ts"],"names":[],"mappings":";;;AAMA,IAAY,QAQX;AARD,WAAY,QAAQ;IAClB,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;AACb,CAAC,EARW,QAAQ,wBAAR,QAAQ,QAQnB;AAGY,QAAA,oBAAoB,GAAe,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAG3D,QAAA,gBAAgB,GAA6B;IACxD,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,GAAG;IACnB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,GAAG;IACnB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,GAAG;IACnB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,KAAK;IACrB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,GAAG;IACnB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,KAAK;IACrB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,IAAI;CACrB,CAAC;AAGK,MAAM,cAAc,GAAG,CAAC,QAAgB,EAAU,EAAE,CACzD,wBAAgB,CAAC,QAAoB,CAAC,IAAI,QAAQ,CAAC;AADxC,QAAA,cAAc,kBAC0B"}
@@ -1,35 +0,0 @@
1
- import { QueryPaginate } from '../type-message/base-paginate';
2
- import { SavingGoalStatus } from '../../models/saving-goal.model';
3
- export type IPaginateSavingGoalQuery = {
4
- status?: SavingGoalStatus;
5
- organizationId?: string;
6
- } & QueryPaginate;
7
- export interface ICreateSavingGoalBody {
8
- name: string;
9
- targetAmountCents: number;
10
- currency: string;
11
- targetDate: string;
12
- linkedBankAccountIds?: string[];
13
- organizationId?: string;
14
- }
15
- export interface IUpdateSavingGoalParams {
16
- savingGoalId: string;
17
- organizationId?: string;
18
- }
19
- export interface IUpdateSavingGoalBody {
20
- name?: string;
21
- targetAmountCents?: number;
22
- currency?: string;
23
- targetDate?: string;
24
- linkedBankAccountIds?: string[];
25
- status?: SavingGoalStatus;
26
- organizationId?: string;
27
- }
28
- export interface IDeleteSavingGoalParams {
29
- savingGoalId: string;
30
- organizationId?: string;
31
- }
32
- export interface IGetSavingGoalProgressParams {
33
- savingGoalId: string;
34
- organizationId?: string;
35
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=saving-goal.request.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"saving-goal.request.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/requests/saving-goal.request.ts"],"names":[],"mappings":""}
@@ -1,83 +0,0 @@
1
- import { BankingViewAccountStatus, BankingViewSourceKind, BankingViewSourceRef } from '../../models/view-account.model';
2
- import { QueryPaginate } from '../type-message/base-paginate';
3
- export interface IListViewAccountQuery extends QueryPaginate {
4
- organization_id?: string;
5
- project_id?: string;
6
- status?: BankingViewAccountStatus;
7
- order?: string;
8
- orderBy?: string;
9
- }
10
- export interface IGetViewAccountParams {
11
- viewAccountId: string;
12
- }
13
- export interface ICreateViewAccountBody {
14
- organization_id?: string;
15
- project_id?: string;
16
- label: string;
17
- currency?: string;
18
- period_start: string;
19
- period_end: string;
20
- zero_retention?: boolean;
21
- rule_set_version?: string;
22
- }
23
- export interface IUpdateViewAccountBody {
24
- label?: string;
25
- period_start?: string;
26
- period_end?: string;
27
- status?: BankingViewAccountStatus;
28
- zero_retention?: boolean;
29
- }
30
- export interface IAttachViewAccountSourceBody {
31
- kind: BankingViewSourceKind;
32
- label?: string;
33
- ref?: BankingViewSourceRef;
34
- payload_base64?: string;
35
- filename?: string;
36
- csv_mapping?: {
37
- date_col: string;
38
- amount_col: string;
39
- description_col: string;
40
- balance_col?: string;
41
- counterparty_col?: string;
42
- iban_col?: string;
43
- date_format?: string;
44
- decimal_separator?: '.' | ',';
45
- thousand_separator?: '.' | ',' | ' ' | '';
46
- encoding?: 'utf8' | 'latin1';
47
- skip_rows?: number;
48
- };
49
- }
50
- export interface IListViewAccountSourceParams {
51
- viewAccountId: string;
52
- }
53
- export interface IDeleteViewAccountSourceParams {
54
- viewAccountId: string;
55
- sourceId: string;
56
- }
57
- export interface IListViewAccountTransactionParams {
58
- viewAccountId: string;
59
- }
60
- export interface IListViewAccountTransactionQuery extends QueryPaginate {
61
- source_id?: string;
62
- primary_only?: boolean;
63
- classification?: string;
64
- date_from?: string;
65
- date_to?: string;
66
- amount_min?: number;
67
- amount_max?: number;
68
- q?: string;
69
- order?: string;
70
- orderBy?: string;
71
- }
72
- export interface IMintViewAccountShareParams {
73
- viewAccountId: string;
74
- }
75
- export interface IMintViewAccountShareBody {
76
- expires_in_days?: number;
77
- }
78
- export interface IRevokeViewAccountShareParams {
79
- viewAccountId: string;
80
- }
81
- export interface IGetPublicSharedViewAccountParams {
82
- token: string;
83
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=view-account.request.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"view-account.request.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/requests/view-account.request.ts"],"names":[],"mappings":""}
@@ -1,17 +0,0 @@
1
- import { IResponse } from '../type-message/response';
2
- import { BasePaginate } from '../type-message/base-paginate';
3
- import { ISavingGoal, ISavingGoalProgress } from '../../models/saving-goal.model';
4
- export type IPaginateSavingGoalData = BasePaginate<ISavingGoal>;
5
- export type IPaginateSavingGoalResponse = IResponse<IPaginateSavingGoalData>;
6
- export interface ICreateSavingGoalData {
7
- savingGoal: ISavingGoal;
8
- }
9
- export type ICreateSavingGoalResponse = IResponse<ICreateSavingGoalData>;
10
- export interface IUpdateSavingGoalData {
11
- savingGoal: ISavingGoal;
12
- }
13
- export type IUpdateSavingGoalResponse = IResponse<IUpdateSavingGoalData>;
14
- export interface IGetSavingGoalProgressData {
15
- progress: ISavingGoalProgress;
16
- }
17
- export type IGetSavingGoalProgressResponse = IResponse<IGetSavingGoalProgressData>;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=saving-goal.response.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"saving-goal.response.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/saving-goal.response.ts"],"names":[],"mappings":""}
@@ -1,53 +0,0 @@
1
- import { IBankingViewAccount, IBankingViewSource, IBankingViewTransaction } from '../../models/view-account.model';
2
- import { BasePaginate } from '../type-message/base-paginate';
3
- import { IResponse } from '../type-message/response';
4
- export interface IListViewAccountData extends BasePaginate<IBankingViewAccount> {
5
- }
6
- export type IListViewAccountResponse = IResponse<IListViewAccountData>;
7
- export type IGetViewAccountResponse = IResponse<{
8
- viewAccount: IBankingViewAccount;
9
- }>;
10
- export type ICreateViewAccountResponse = IResponse<{
11
- viewAccount: IBankingViewAccount;
12
- }>;
13
- export type IUpdateViewAccountResponse = IResponse<{
14
- viewAccount: IBankingViewAccount;
15
- }>;
16
- export type IDeleteViewAccountResponse = IResponse<{
17
- ok: true;
18
- }>;
19
- export type IListViewAccountSourceResponse = IResponse<{
20
- sources: IBankingViewSource[];
21
- }>;
22
- export type IAttachViewAccountSourceResponse = IResponse<{
23
- source: IBankingViewSource;
24
- }>;
25
- export type IDeleteViewAccountSourceResponse = IResponse<{
26
- ok: true;
27
- }>;
28
- export interface IListViewAccountTransactionData extends BasePaginate<IBankingViewTransaction> {
29
- }
30
- export type IListViewAccountTransactionResponse = IResponse<IListViewAccountTransactionData>;
31
- export type IMintViewAccountShareResponse = IResponse<{
32
- share_url: string;
33
- share_token: string;
34
- share_expires_at: string | null;
35
- }>;
36
- export type IRevokeViewAccountShareResponse = IResponse<{
37
- ok: true;
38
- }>;
39
- export type IGetPublicSharedViewAccountResponse = IResponse<{
40
- id: string;
41
- label: string;
42
- currency: string;
43
- period_start: string;
44
- period_end: string;
45
- share_expires_at: string | null;
46
- scoring: Record<string, unknown> | null;
47
- transactionsSummary: {
48
- total: number;
49
- credit: number;
50
- debit: number;
51
- distinctCounterparties: number;
52
- };
53
- }>;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=view-account.response.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"view-account.response.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/view-account.response.ts"],"names":[],"mappings":""}
@@ -1,28 +0,0 @@
1
- export declare enum SavingGoalStatus {
2
- ACTIVE = "active",
3
- COMPLETED = "completed",
4
- ARCHIVED = "archived"
5
- }
6
- export interface ISavingGoal {
7
- id?: string;
8
- userId: string | null;
9
- organizationId: string | null;
10
- name: string;
11
- targetAmountCents: number;
12
- currency: string;
13
- targetDate: string;
14
- currentAmountCents: number;
15
- linkedBankAccountIds: string[];
16
- status: SavingGoalStatus;
17
- createdAt?: Date;
18
- updatedAt?: Date;
19
- }
20
- export interface ISavingGoalProgress {
21
- goalId: string;
22
- currentCents: number;
23
- targetCents: number;
24
- percentage: number;
25
- daysRemaining: number;
26
- requiredMonthlySaving: number | null;
27
- currency: string;
28
- }
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SavingGoalStatus = void 0;
4
- var SavingGoalStatus;
5
- (function (SavingGoalStatus) {
6
- SavingGoalStatus["ACTIVE"] = "active";
7
- SavingGoalStatus["COMPLETED"] = "completed";
8
- SavingGoalStatus["ARCHIVED"] = "archived";
9
- })(SavingGoalStatus || (exports.SavingGoalStatus = SavingGoalStatus = {}));
10
- //# sourceMappingURL=saving-goal.model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"saving-goal.model.js","sourceRoot":"","sources":["../../../../src/types/interface/models/saving-goal.model.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,2CAAuB,CAAA;IACvB,yCAAqB,CAAA;AACvB,CAAC,EAJW,gBAAgB,gCAAhB,gBAAgB,QAI3B"}
@@ -1,256 +0,0 @@
1
- export declare enum BankingViewAccountStatus {
2
- DRAFT = "draft",
3
- INGESTING = "ingesting",
4
- READY = "ready",
5
- SCORED = "scored",
6
- ARCHIVED = "archived"
7
- }
8
- export declare enum BankingViewSourceKind {
9
- CSV = "csv",
10
- CAMT053 = "camt053",
11
- OFX = "ofx",
12
- QIF = "qif",
13
- RCB_EXTRACTION = "rcb_extraction",
14
- PSD2_LINK = "psd2_link",
15
- MANUAL = "manual"
16
- }
17
- export declare enum BankingViewSourceStatus {
18
- PENDING = "pending",
19
- PARSING = "parsing",
20
- INGESTED = "ingested",
21
- FAILED = "failed"
22
- }
23
- export declare enum BankingViewTransactionClassification {
24
- REVENUE = "revenue",
25
- EXPENSE_FIXED = "expense_fixed",
26
- EXPENSE_VARIABLE = "expense_variable",
27
- SALARY = "salary",
28
- TAX = "tax",
29
- DEBT_SERVICE = "debt_service",
30
- TRANSFER = "transfer",
31
- FEE = "fee",
32
- INCIDENT = "incident",
33
- CASH = "cash",
34
- OTHER = "other"
35
- }
36
- export declare enum BankingViewCounterpartyClassification {
37
- CUSTOMER = "customer",
38
- VENDOR = "vendor",
39
- SALARY = "salary",
40
- TAX_AUTHORITY = "tax_authority",
41
- FINANCIAL_INSTITUTION = "financial_institution",
42
- UTILITY = "utility",
43
- PERSONAL = "personal",
44
- RELATED_PARTY = "related_party",
45
- UNKNOWN = "unknown"
46
- }
47
- export declare enum BankingViewAnomalyKind {
48
- AMOUNT_OUTLIER = "amount_outlier",
49
- TIMING_OUTLIER = "timing_outlier",
50
- COUNTERPARTY_UNUSUAL = "counterparty_unusual",
51
- PATTERN_BREAK = "pattern_break",
52
- ROUND_NUMBER_TRANSFER = "round_number_transfer",
53
- CASH_DEPOSIT_ANOMALY = "cash_deposit_anomaly",
54
- SALARY_DELAY = "salary_delay",
55
- INTERCOMPANY_ROUND = "intercompany_round",
56
- WINDOW_DRESSING = "window_dressing",
57
- DIRECTOR_LOAN = "director_loan",
58
- PERSONAL_EXPENSE = "personal_expense",
59
- EXCESSIVE_CONSULTING = "excessive_consulting",
60
- FRIENDLY_INVOICE = "friendly_invoice"
61
- }
62
- export interface IBankingViewAccount {
63
- id?: string;
64
- userId?: string | null;
65
- organizationId?: string | null;
66
- projectId?: string | null;
67
- createdByUserId?: string | null;
68
- label: string;
69
- currency: string;
70
- periodStart: string;
71
- periodEnd: string;
72
- status?: BankingViewAccountStatus;
73
- shareToken?: string | null;
74
- shareExpiresAt?: string | Date | null;
75
- zeroRetention?: boolean;
76
- ruleSetVersion?: string;
77
- metaJson?: Record<string, unknown> | null;
78
- createdAt?: Date;
79
- updatedAt?: Date;
80
- }
81
- export interface IBankingViewSourceRefRcb {
82
- rcbExtractionId: string;
83
- }
84
- export interface IBankingViewSourceRefUpload {
85
- applicationFileId: string;
86
- filename: string;
87
- byteSize: number;
88
- }
89
- export interface IBankingViewSourcePsd2 {
90
- aggregatorLinkId: string;
91
- bankAccountId: string;
92
- }
93
- export type BankingViewSourceRef = IBankingViewSourceRefRcb | IBankingViewSourceRefUpload | IBankingViewSourcePsd2 | Record<string, unknown>;
94
- export interface IBankingViewSource {
95
- id?: string;
96
- viewAccountId: string;
97
- kind: BankingViewSourceKind;
98
- label?: string | null;
99
- refJson?: BankingViewSourceRef | null;
100
- status?: BankingViewSourceStatus;
101
- recordsCount?: number;
102
- errorJson?: {
103
- code?: string;
104
- message?: string;
105
- } | null;
106
- ingestedAt?: string | Date | null;
107
- createdAt?: Date;
108
- updatedAt?: Date;
109
- }
110
- export interface IBankingViewTransaction {
111
- id?: string;
112
- viewAccountId: string;
113
- sourceId: string;
114
- txDate: string;
115
- valueDate?: string | null;
116
- amountCents: number;
117
- currency: string;
118
- description: string;
119
- descriptionNormalized?: string | null;
120
- counterpartyName?: string | null;
121
- counterpartyIban?: string | null;
122
- counterpartyBic?: string | null;
123
- balanceCents?: number | null;
124
- dedupeKey: string;
125
- isPrimary?: boolean;
126
- possibleDuplicate?: boolean;
127
- isInterAccountTransfer?: boolean;
128
- classification?: BankingViewTransactionClassification | null;
129
- txMetadataJson?: Record<string, unknown> | null;
130
- createdAt?: Date;
131
- }
132
- export interface IBankingViewBalanceSnapshot {
133
- id?: string;
134
- viewAccountId: string;
135
- sourceId: string;
136
- snapDate: string;
137
- balanceCents: number;
138
- currency: string;
139
- createdAt?: Date;
140
- }
141
- export type BankingViewMetricConfidence = 'high' | 'medium' | 'low' | 'insufficient_data';
142
- export interface IBankingViewMetricResult {
143
- metricKey: string;
144
- value: number | string | null;
145
- unit?: string;
146
- confidence: BankingViewMetricConfidence;
147
- dataPoints?: number;
148
- percentileVsSector?: number | null;
149
- breakdown?: Record<string, unknown>;
150
- }
151
- export interface IBankingViewScoringRun {
152
- id?: string;
153
- viewAccountId: string;
154
- period: string;
155
- ruleSetVersion: string;
156
- metricsJson: Record<string, IBankingViewMetricResult>;
157
- confidenceJson?: Record<string, BankingViewMetricConfidence> | null;
158
- anomaliesJson?: IBankingViewAnomaly[] | null;
159
- qualitativeTellsJson?: IBankingViewQualitativeTell[] | null;
160
- forecastJson?: IBankingViewForecast | null;
161
- computedAt?: Date;
162
- }
163
- export interface IBankingViewCounterpartyEnrichment {
164
- id?: string;
165
- lookupKey: string;
166
- siren?: string | null;
167
- siret?: string | null;
168
- denomination?: string | null;
169
- nafCode?: string | null;
170
- addressJson?: Record<string, unknown> | null;
171
- headcountRange?: string | null;
172
- capitalSocialCents?: number | null;
173
- registeredAt?: string | null;
174
- classification?: BankingViewCounterpartyClassification | null;
175
- financialHealthJson?: Record<string, unknown> | null;
176
- source: string;
177
- cachedAt?: Date;
178
- expiresAt: string | Date;
179
- }
180
- export interface IBankingViewSectorBenchmark {
181
- id?: string;
182
- nafCode: string;
183
- sizeClass: string;
184
- metricKey: string;
185
- p25?: number | null;
186
- p50?: number | null;
187
- p75?: number | null;
188
- source: string;
189
- refreshedAt?: Date;
190
- }
191
- export interface IBankingViewAnomaly {
192
- id?: string;
193
- viewAccountId?: string;
194
- kind: BankingViewAnomalyKind;
195
- severity: 'low' | 'medium' | 'high';
196
- detectedAt: string;
197
- txDate?: string | null;
198
- evidenceJson: Record<string, unknown> | null;
199
- reviewStatus?: 'pending' | 'dismissed' | 'confirmed';
200
- }
201
- export interface IBankingViewQualitativeTell {
202
- kind: string;
203
- severity: 'low' | 'medium' | 'high';
204
- description: string;
205
- evidence: {
206
- transactionIds: string[];
207
- summary: Record<string, unknown>;
208
- };
209
- }
210
- export interface IBankingViewForecast {
211
- horizonDays: number;
212
- cashProjection: Array<{
213
- date: string;
214
- p10: number;
215
- p50: number;
216
- p90: number;
217
- }>;
218
- revenueProjection: Array<{
219
- month: string;
220
- p10: number;
221
- p50: number;
222
- p90: number;
223
- }> | null;
224
- expenseProjection: Array<{
225
- month: string;
226
- p10: number;
227
- p50: number;
228
- p90: number;
229
- }> | null;
230
- computedAt: string;
231
- }
232
- export interface IBankingViewCoverage {
233
- period: string;
234
- coverageDays: number;
235
- totalDays: number;
236
- percent: number;
237
- largestGapDays: number;
238
- gapsCount: number;
239
- gaps: Array<{
240
- start: string;
241
- end: string;
242
- days: number;
243
- }>;
244
- coverageBySource: Record<string, number>;
245
- }
246
- export interface IBankingViewIntegrity {
247
- score: number;
248
- mismatches: Array<{
249
- date: string;
250
- sourceA: string;
251
- balanceA: number;
252
- sourceB: string;
253
- balanceB: number;
254
- delta: number;
255
- }>;
256
- }