@firela/api-types 0.0.0-canary.04678d31 → 0.0.0-canary.04c04789
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.mts +235 -10
- package/dist/index.d.ts +235 -10
- package/dist/index.js +4 -2
- package/dist/index.mjs +4 -2
- package/package.json +1 -1
- package/src/generated/schemas.gen.ts +384 -4
- package/src/generated/services.gen.ts +38 -2
- package/src/generated/types.gen.ts +313 -8
|
@@ -595,7 +595,7 @@ export type PostingResponseDto = {
|
|
|
595
595
|
*/
|
|
596
596
|
account: string;
|
|
597
597
|
/**
|
|
598
|
-
* Amount as decimal string. Typed optional but always present in responses: interpolation fills any MISSING posting before it is persisted or returned.
|
|
598
|
+
* Amount as decimal string. Typed optional but always present in responses: interpolation fills any MISSING posting before it is persisted or returned. Carries the raw Beancount sign (credit-normal accounts such as Income post negative — the accounting truth, ADR-0126); renderers must not infer economic semantics from this sign.
|
|
599
599
|
*/
|
|
600
600
|
units?: string;
|
|
601
601
|
/**
|
|
@@ -830,7 +830,7 @@ export type PostingDetailDto = {
|
|
|
830
830
|
*/
|
|
831
831
|
account: string;
|
|
832
832
|
/**
|
|
833
|
-
* Amount as decimal string. Typed optional but always present in responses: interpolation fills any MISSING posting before it is persisted or returned.
|
|
833
|
+
* Amount as decimal string. Typed optional but always present in responses: interpolation fills any MISSING posting before it is persisted or returned. Carries the raw Beancount sign (credit-normal accounts such as Income post negative — the accounting truth, ADR-0126); renderers must not infer economic semantics from this sign.
|
|
834
834
|
*/
|
|
835
835
|
units?: string;
|
|
836
836
|
/**
|
|
@@ -976,6 +976,101 @@ export type flag2 =
|
|
|
976
976
|
*/
|
|
977
977
|
export type status2 = 'ACTIVE' | 'VOIDED' | 'SUPERSEDED';
|
|
978
978
|
|
|
979
|
+
export type TransactionListItemDto = {
|
|
980
|
+
/**
|
|
981
|
+
* Transaction ID
|
|
982
|
+
*/
|
|
983
|
+
id: string;
|
|
984
|
+
/**
|
|
985
|
+
* Transaction date
|
|
986
|
+
*/
|
|
987
|
+
date: string;
|
|
988
|
+
/**
|
|
989
|
+
* Transaction flag
|
|
990
|
+
*/
|
|
991
|
+
flag?:
|
|
992
|
+
| 'CLEARED'
|
|
993
|
+
| 'PENDING'
|
|
994
|
+
| 'PADDING'
|
|
995
|
+
| 'SUMMARIZE'
|
|
996
|
+
| 'TRANSFER'
|
|
997
|
+
| 'CONVERSIONS';
|
|
998
|
+
/**
|
|
999
|
+
* Custom flag (if not using standard flags)
|
|
1000
|
+
*/
|
|
1001
|
+
customFlag?: string;
|
|
1002
|
+
/**
|
|
1003
|
+
* Payee name
|
|
1004
|
+
*/
|
|
1005
|
+
payee?: string;
|
|
1006
|
+
/**
|
|
1007
|
+
* Transaction narration
|
|
1008
|
+
*/
|
|
1009
|
+
narration: string;
|
|
1010
|
+
/**
|
|
1011
|
+
* Transaction tags
|
|
1012
|
+
*/
|
|
1013
|
+
tags: Array<string>;
|
|
1014
|
+
/**
|
|
1015
|
+
* Transaction links
|
|
1016
|
+
*/
|
|
1017
|
+
links: Array<string>;
|
|
1018
|
+
/**
|
|
1019
|
+
* Transaction metadata
|
|
1020
|
+
*/
|
|
1021
|
+
meta?: {
|
|
1022
|
+
[key: string]: unknown;
|
|
1023
|
+
};
|
|
1024
|
+
/**
|
|
1025
|
+
* Transaction status
|
|
1026
|
+
*/
|
|
1027
|
+
status: 'ACTIVE' | 'VOIDED' | 'SUPERSEDED';
|
|
1028
|
+
/**
|
|
1029
|
+
* Source type (free-form string from transaction metadata, e.g. import, api)
|
|
1030
|
+
*/
|
|
1031
|
+
sourceType?: string;
|
|
1032
|
+
/**
|
|
1033
|
+
* Source platform (e.g., alipay, wechat)
|
|
1034
|
+
*/
|
|
1035
|
+
sourcePlatform?: string;
|
|
1036
|
+
/**
|
|
1037
|
+
* Transaction postings
|
|
1038
|
+
*/
|
|
1039
|
+
postings: Array<PostingDetailDto>;
|
|
1040
|
+
/**
|
|
1041
|
+
* Created at timestamp
|
|
1042
|
+
*/
|
|
1043
|
+
createdAt: string;
|
|
1044
|
+
/**
|
|
1045
|
+
* Voided at timestamp (if voided)
|
|
1046
|
+
*/
|
|
1047
|
+
voidedAt?: string;
|
|
1048
|
+
/**
|
|
1049
|
+
* User ID who voided this transaction
|
|
1050
|
+
*/
|
|
1051
|
+
voidedBy?: string;
|
|
1052
|
+
/**
|
|
1053
|
+
* Correction reason (if voided or superseded)
|
|
1054
|
+
*/
|
|
1055
|
+
correctionReason?: string;
|
|
1056
|
+
/**
|
|
1057
|
+
* ID of the transaction that supersedes this one (set when status=SUPERSEDED)
|
|
1058
|
+
*/
|
|
1059
|
+
supersededBy?: string;
|
|
1060
|
+
/**
|
|
1061
|
+
* ID of the transaction this one corrected/replaced (back-link on the replacement)
|
|
1062
|
+
*/
|
|
1063
|
+
originalTxn?: string;
|
|
1064
|
+
/**
|
|
1065
|
+
* Per-leg sign-normalized row amount for the category viewpoint (ADR-0126): each posting on the category account set contributes its unitsNumber with Income-root legs negated and Expenses-root legs identity. Positive under normal booking but NOT clamped (explicit negative expense legs and net-flip refund months stay negative). Omitted outside the category viewpoint.
|
|
1066
|
+
*/
|
|
1067
|
+
viewpointAmount?: string;
|
|
1068
|
+
/**
|
|
1069
|
+
* Currency of viewpointAmount. A row spanning multiple currencies takes the largest-magnitude currency group (known simplification, ADR-0126). Omitted outside the category viewpoint.
|
|
1070
|
+
*/
|
|
1071
|
+
viewpointCurrency?: string;
|
|
1072
|
+
};
|
|
1073
|
+
|
|
979
1074
|
export type BalanceByCurrencyDto = {
|
|
980
1075
|
/**
|
|
981
1076
|
* ISO 4217 currency code
|
|
@@ -1004,7 +1099,7 @@ export type ExchangeRateWarningDto = {
|
|
|
1004
1099
|
|
|
1005
1100
|
export type TransactionListSummaryDto = {
|
|
1006
1101
|
/**
|
|
1007
|
-
* Partial converted total in base currency (rated currencies only
|
|
1102
|
+
* Partial converted total in base currency (rated currencies only). Sign by viewpoint (ADR-0126): account viewpoint keeps the raw Beancount sign (income negative); category viewpoint is per-leg sign-normalized (Income legs negated, Expenses legs identity — positive under normal booking, not clamped). When warnings is non-empty this excludes currencies missing an FX rate; may be "0.00" if ALL non-base currencies lack a rate. Converted at the dateTo (or current) available rate.
|
|
1008
1103
|
*/
|
|
1009
1104
|
totalAmount: string;
|
|
1010
1105
|
/**
|
|
@@ -1021,11 +1116,32 @@ export type TransactionListSummaryDto = {
|
|
|
1021
1116
|
warnings?: Array<ExchangeRateWarningDto>;
|
|
1022
1117
|
};
|
|
1023
1118
|
|
|
1119
|
+
export type TransactionListViewpointDto = {
|
|
1120
|
+
/**
|
|
1121
|
+
* Viewpoint type (only category drill-down carries a viewpoint today)
|
|
1122
|
+
*/
|
|
1123
|
+
type: 'category';
|
|
1124
|
+
/**
|
|
1125
|
+
* Flow root the category account set is restricted to
|
|
1126
|
+
*/
|
|
1127
|
+
flow: 'income' | 'expense';
|
|
1128
|
+
};
|
|
1129
|
+
|
|
1130
|
+
/**
|
|
1131
|
+
* Viewpoint type (only category drill-down carries a viewpoint today)
|
|
1132
|
+
*/
|
|
1133
|
+
export type type2 = 'category';
|
|
1134
|
+
|
|
1135
|
+
/**
|
|
1136
|
+
* Flow root the category account set is restricted to
|
|
1137
|
+
*/
|
|
1138
|
+
export type flow = 'income' | 'expense';
|
|
1139
|
+
|
|
1024
1140
|
export type TransactionListResponseDto = {
|
|
1025
1141
|
/**
|
|
1026
1142
|
* List of transactions
|
|
1027
1143
|
*/
|
|
1028
|
-
data: Array<
|
|
1144
|
+
data: Array<TransactionListItemDto>;
|
|
1029
1145
|
/**
|
|
1030
1146
|
* Total count of matching transactions
|
|
1031
1147
|
*/
|
|
@@ -1042,6 +1158,10 @@ export type TransactionListResponseDto = {
|
|
|
1042
1158
|
* Amount summary for the full filtered set (#514). Present only when the request has a single account OR category viewpoint; omitted for search-only / plain-list / dual-perspective requests.
|
|
1043
1159
|
*/
|
|
1044
1160
|
summary?: TransactionListSummaryDto;
|
|
1161
|
+
/**
|
|
1162
|
+
* Viewpoint metadata (ADR-0126). Present only for a single category filter (category + flow, no accountId); dual-perspective requests are viewpoint-less (raw signs, no viewpointAmount).
|
|
1163
|
+
*/
|
|
1164
|
+
viewpoint?: TransactionListViewpointDto;
|
|
1045
1165
|
};
|
|
1046
1166
|
|
|
1047
1167
|
export type TagSuggestionDto = {
|
|
@@ -1253,7 +1373,7 @@ export type ReviewSummaryDto = {
|
|
|
1253
1373
|
/**
|
|
1254
1374
|
* Review type
|
|
1255
1375
|
*/
|
|
1256
|
-
export type
|
|
1376
|
+
export type type3 =
|
|
1257
1377
|
| 'DUPLICATE'
|
|
1258
1378
|
| 'RULE_MATCH'
|
|
1259
1379
|
| 'PAYEE_MATCH'
|
|
@@ -4973,7 +5093,7 @@ export type PlatformListItemDto = {
|
|
|
4973
5093
|
/**
|
|
4974
5094
|
* Platform type
|
|
4975
5095
|
*/
|
|
4976
|
-
export type
|
|
5096
|
+
export type type4 =
|
|
4977
5097
|
| 'BANK'
|
|
4978
5098
|
| 'BROKERAGE'
|
|
4979
5099
|
| 'CRYPTO_EXCHANGE'
|
|
@@ -5805,7 +5925,7 @@ export type HoldingPnlWarningDto = {
|
|
|
5805
5925
|
/**
|
|
5806
5926
|
* Warning type
|
|
5807
5927
|
*/
|
|
5808
|
-
export type
|
|
5928
|
+
export type type5 =
|
|
5809
5929
|
| 'MISSING_COST_FX_RATE'
|
|
5810
5930
|
| 'MISSING_MARKET_FX_RATE'
|
|
5811
5931
|
| 'MISSING_SALE_PRICE'
|
|
@@ -5844,6 +5964,120 @@ export type AnonymousLoginResponseDto = {
|
|
|
5844
5964
|
authToken: string;
|
|
5845
5965
|
};
|
|
5846
5966
|
|
|
5967
|
+
export type ParserContributionMetaDto = {
|
|
5968
|
+
/**
|
|
5969
|
+
* Institution slug (lowercase kebab-case)
|
|
5970
|
+
*/
|
|
5971
|
+
institution: string;
|
|
5972
|
+
region:
|
|
5973
|
+
| 'cn'
|
|
5974
|
+
| 'us'
|
|
5975
|
+
| 'de'
|
|
5976
|
+
| 'fr'
|
|
5977
|
+
| 'gb'
|
|
5978
|
+
| 'hk'
|
|
5979
|
+
| 'jp'
|
|
5980
|
+
| 'sg'
|
|
5981
|
+
| 'au'
|
|
5982
|
+
| 'ca'
|
|
5983
|
+
| 'other';
|
|
5984
|
+
accountType: 'checking' | 'savings' | 'credit' | 'debit' | 'investment';
|
|
5985
|
+
format: 'csv' | 'xlsx' | 'pdf' | 'ofx' | 'qif';
|
|
5986
|
+
institutionDisplayName?: string;
|
|
5987
|
+
encoding?: string;
|
|
5988
|
+
delimiter?: ',' | ';' | ' ' | '|';
|
|
5989
|
+
/**
|
|
5990
|
+
* Header row count; the client omits the field when it is 1
|
|
5991
|
+
*/
|
|
5992
|
+
headerRows?: number;
|
|
5993
|
+
notes?: string;
|
|
5994
|
+
};
|
|
5995
|
+
|
|
5996
|
+
export type region =
|
|
5997
|
+
| 'cn'
|
|
5998
|
+
| 'us'
|
|
5999
|
+
| 'de'
|
|
6000
|
+
| 'fr'
|
|
6001
|
+
| 'gb'
|
|
6002
|
+
| 'hk'
|
|
6003
|
+
| 'jp'
|
|
6004
|
+
| 'sg'
|
|
6005
|
+
| 'au'
|
|
6006
|
+
| 'ca'
|
|
6007
|
+
| 'other';
|
|
6008
|
+
|
|
6009
|
+
export type accountType =
|
|
6010
|
+
| 'checking'
|
|
6011
|
+
| 'savings'
|
|
6012
|
+
| 'credit'
|
|
6013
|
+
| 'debit'
|
|
6014
|
+
| 'investment';
|
|
6015
|
+
|
|
6016
|
+
export type format = 'csv' | 'xlsx' | 'pdf' | 'ofx' | 'qif';
|
|
6017
|
+
|
|
6018
|
+
export type delimiter = ',' | ';' | ' ' | '|';
|
|
6019
|
+
|
|
6020
|
+
export type ParserContributionSamplesDto = {
|
|
6021
|
+
/**
|
|
6022
|
+
* Client-sanitized sample rows (key = column name, value = cell)
|
|
6023
|
+
*/
|
|
6024
|
+
rows: Array<string>;
|
|
6025
|
+
rawHeaders?: Array<string>;
|
|
6026
|
+
};
|
|
6027
|
+
|
|
6028
|
+
export type FieldHintDto = {
|
|
6029
|
+
columnName: string;
|
|
6030
|
+
/**
|
|
6031
|
+
* Date format, e.g. yyyy-MM-dd HH:mm
|
|
6032
|
+
*/
|
|
6033
|
+
format?: string;
|
|
6034
|
+
signConvention?: 'negative-expense' | 'positive-expense' | 'separate-columns';
|
|
6035
|
+
creditColumn?: string;
|
|
6036
|
+
debitColumn?: string;
|
|
6037
|
+
};
|
|
6038
|
+
|
|
6039
|
+
export type signConvention =
|
|
6040
|
+
| 'negative-expense'
|
|
6041
|
+
| 'positive-expense'
|
|
6042
|
+
| 'separate-columns';
|
|
6043
|
+
|
|
6044
|
+
export type ParserContributionFieldHintsDto = {
|
|
6045
|
+
date: FieldHintDto;
|
|
6046
|
+
amount: FieldHintDto;
|
|
6047
|
+
description?: FieldHintDto;
|
|
6048
|
+
balance?: FieldHintDto;
|
|
6049
|
+
payee?: FieldHintDto;
|
|
6050
|
+
reference?: FieldHintDto;
|
|
6051
|
+
category?: FieldHintDto;
|
|
6052
|
+
};
|
|
6053
|
+
|
|
6054
|
+
export type ExpectedTransactionDto = {
|
|
6055
|
+
date: string;
|
|
6056
|
+
amount: number;
|
|
6057
|
+
description: string;
|
|
6058
|
+
payee?: string;
|
|
6059
|
+
category?: string;
|
|
6060
|
+
};
|
|
6061
|
+
|
|
6062
|
+
export type ParserContributionExamplesDto = {
|
|
6063
|
+
expectedTransactions: Array<ExpectedTransactionDto>;
|
|
6064
|
+
};
|
|
6065
|
+
|
|
6066
|
+
export type ParserContributionRequestDto = {
|
|
6067
|
+
meta: ParserContributionMetaDto;
|
|
6068
|
+
samples: ParserContributionSamplesDto;
|
|
6069
|
+
fieldHints: ParserContributionFieldHintsDto;
|
|
6070
|
+
/**
|
|
6071
|
+
* Omitted entirely by the client when empty
|
|
6072
|
+
*/
|
|
6073
|
+
examples?: ParserContributionExamplesDto;
|
|
6074
|
+
};
|
|
6075
|
+
|
|
6076
|
+
export type ParserContributionRelayResponseDto = {
|
|
6077
|
+
issueUrl: string;
|
|
6078
|
+
issueNumber: number;
|
|
6079
|
+
};
|
|
6080
|
+
|
|
5847
6081
|
export type SymbolSearchResultDto = {
|
|
5848
6082
|
symbol: string;
|
|
5849
6083
|
name?: {
|
|
@@ -6459,7 +6693,7 @@ export type TransactionControllerListData = {
|
|
|
6459
6693
|
*/
|
|
6460
6694
|
accountId?: string;
|
|
6461
6695
|
/**
|
|
6462
|
-
* Filter by ADR-0075 functional category (Group segment); matches any posting to an
|
|
6696
|
+
* Filter by ADR-0075 functional category (Group segment); matches any posting to an account whose derived Group segment equals this value. Must be accompanied by flow (ADR-0126).
|
|
6463
6697
|
*/
|
|
6464
6698
|
category?: string;
|
|
6465
6699
|
/**
|
|
@@ -6470,6 +6704,10 @@ export type TransactionControllerListData = {
|
|
|
6470
6704
|
* Filter by end date (inclusive), format: YYYY-MM-DD
|
|
6471
6705
|
*/
|
|
6472
6706
|
dateTo?: string;
|
|
6707
|
+
/**
|
|
6708
|
+
* Required when category is present (400 otherwise) and vice versa (ADR-0126). Restricts the category account set to the flow root (income → Income:, expense → Expenses:) and drives the per-leg sign normalization of row viewpointAmount and the summary. OpenAPI cannot express conditional requiredness — the pairing is enforced at runtime.
|
|
6709
|
+
*/
|
|
6710
|
+
flow?: 'income' | 'expense';
|
|
6473
6711
|
/**
|
|
6474
6712
|
* Number of items per page (1-100, default: 20)
|
|
6475
6713
|
*/
|
|
@@ -10545,6 +10783,42 @@ export type AuthControllerAccessTokenLoginData = {
|
|
|
10545
10783
|
|
|
10546
10784
|
export type AuthControllerAccessTokenLoginResponse = AnonymousLoginResponseDto;
|
|
10547
10785
|
|
|
10786
|
+
export type ParserContributionControllerCreateData = {
|
|
10787
|
+
/**
|
|
10788
|
+
* Region code for tenant context (routing only; the institution region rides in the payload meta)
|
|
10789
|
+
*/
|
|
10790
|
+
region:
|
|
10791
|
+
| 'ad'
|
|
10792
|
+
| 'ae'
|
|
10793
|
+
| 'af'
|
|
10794
|
+
| 'ag'
|
|
10795
|
+
| 'al'
|
|
10796
|
+
| 'am'
|
|
10797
|
+
| 'ao'
|
|
10798
|
+
| 'au'
|
|
10799
|
+
| 'br'
|
|
10800
|
+
| 'ca'
|
|
10801
|
+
| 'cn'
|
|
10802
|
+
| 'de'
|
|
10803
|
+
| 'dz'
|
|
10804
|
+
| 'es'
|
|
10805
|
+
| 'fr'
|
|
10806
|
+
| 'gb'
|
|
10807
|
+
| 'hk'
|
|
10808
|
+
| 'in'
|
|
10809
|
+
| 'it'
|
|
10810
|
+
| 'jp'
|
|
10811
|
+
| 'kr'
|
|
10812
|
+
| 'nl'
|
|
10813
|
+
| 'sg'
|
|
10814
|
+
| 'tw'
|
|
10815
|
+
| 'us';
|
|
10816
|
+
requestBody: ParserContributionRequestDto;
|
|
10817
|
+
};
|
|
10818
|
+
|
|
10819
|
+
export type ParserContributionControllerCreateResponse =
|
|
10820
|
+
ParserContributionRelayResponseDto;
|
|
10821
|
+
|
|
10548
10822
|
export type CacheControllerFlushCacheResponse = unknown;
|
|
10549
10823
|
|
|
10550
10824
|
export type ExchangeRateControllerGetExchangeRateData = {
|
|
@@ -12862,6 +13136,37 @@ export type $OpenApiTs = {
|
|
|
12862
13136
|
};
|
|
12863
13137
|
};
|
|
12864
13138
|
};
|
|
13139
|
+
'/api/v1/{region}/community/parser-contributions': {
|
|
13140
|
+
post: {
|
|
13141
|
+
req: ParserContributionControllerCreateData;
|
|
13142
|
+
res: {
|
|
13143
|
+
/**
|
|
13144
|
+
* Issue created by the bot
|
|
13145
|
+
*/
|
|
13146
|
+
201: ParserContributionRelayResponseDto;
|
|
13147
|
+
/**
|
|
13148
|
+
* Unauthorized
|
|
13149
|
+
*/
|
|
13150
|
+
401: ApiProblemResponseDto;
|
|
13151
|
+
/**
|
|
13152
|
+
* Validation failed (institution slug, empty samples, row/cell size limits)
|
|
13153
|
+
*/
|
|
13154
|
+
422: ApiProblemResponseDto;
|
|
13155
|
+
/**
|
|
13156
|
+
* Rate limited (5 submissions per user per hour)
|
|
13157
|
+
*/
|
|
13158
|
+
429: ApiProblemResponseDto;
|
|
13159
|
+
/**
|
|
13160
|
+
* Relay not configured on this deployment — clients fall back to the clipboard flow
|
|
13161
|
+
*/
|
|
13162
|
+
501: ApiProblemResponseDto;
|
|
13163
|
+
/**
|
|
13164
|
+
* GitHub bot failure (upstream), safe to retry
|
|
13165
|
+
*/
|
|
13166
|
+
502: ApiProblemResponseDto;
|
|
13167
|
+
};
|
|
13168
|
+
};
|
|
13169
|
+
};
|
|
12865
13170
|
'/api/v1/cache/flush': {
|
|
12866
13171
|
post: {
|
|
12867
13172
|
res: {
|