sowhat-types 1.0.0 → 2.0.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.
- package/index.d.ts +253 -0
- package/index.js +51 -0
- package/index.ts +4 -2
- package/package.json +17 -3
- package/asset/create-asset-co-owner.ts +0 -5
- package/user/user.ts +0 -10
package/index.d.ts
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
declare enum AuthenticationMethodEnum {
|
|
2
|
+
PHONE = "PHONE",
|
|
3
|
+
EMAIL = "EMAIL"
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
declare enum MobilityTypeEnum {
|
|
7
|
+
CAR = "CAR",
|
|
8
|
+
MOTORCYCLE = "MOTORCYCLE",
|
|
9
|
+
BICYCLE = "BICYCLE",
|
|
10
|
+
OTHER = "OTHER"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare enum BankAccountSchemeNameEnum {
|
|
14
|
+
IBAN = "IBAN",
|
|
15
|
+
BBAN = "BBAN",
|
|
16
|
+
SORT_CODE_ACCOUNT_NUMBER = "SORT_CODE_ACCOUNT_NUMBER",
|
|
17
|
+
CPAN = "CPAN",
|
|
18
|
+
TPAN = "TPAN"
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare enum BankAccountTransactionTypeEnum {
|
|
22
|
+
TRANSFER = "TRANSFER",// Transfer
|
|
23
|
+
ORDER = "ORDER",// Order
|
|
24
|
+
CHECK = "CHECK",// Check
|
|
25
|
+
DEPOSIT = "DEPOSIT",// Mandatory/voluntary deposits, contributions, money transfers
|
|
26
|
+
PAYBACK = "PAYBACK",// Payback
|
|
27
|
+
WITHDRAWAL = "WITHDRAWAL",// Withdrawal
|
|
28
|
+
LOAN_REPAYMENT = "LOAN_REPAYMENT",// Loan payment
|
|
29
|
+
BANK = "BANK",// Bank fees
|
|
30
|
+
CARD = "CARD",// Card operation
|
|
31
|
+
DEFERRED_CARD = "DEFERRED_CARD",// Deferred card operation
|
|
32
|
+
SUMMARY_CARD = "SUMMARY_CARD",// Monthly debit of a deferred card
|
|
33
|
+
UNKNOWN = "UNKNOWN",//Unknown transaction type
|
|
34
|
+
MARKET_ORDER = "MARKET_ORDER",// Market order
|
|
35
|
+
MARKET_FEE = "MARKET_FEE",// Fees regarding a market order
|
|
36
|
+
ARBITRAGE = "ARBITRAGE",// Arbitrage
|
|
37
|
+
PROFIT = "PROFIT"
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
declare enum BankAccountTypeEnum {
|
|
41
|
+
CHECKING = "CHECKING",
|
|
42
|
+
SAVINGS = "SAVINGS",
|
|
43
|
+
OTHER = "OTHER"
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
interface CreateAssetCoOwnerInput {
|
|
47
|
+
id: string;
|
|
48
|
+
coOwnershipShare: number;
|
|
49
|
+
coOwnerFinancialShare: number;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
interface CreateAssetDateOfAcquisitionInput {
|
|
53
|
+
month: number;
|
|
54
|
+
year: number;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
interface FetchUserBankAccountsInput {
|
|
58
|
+
userId: string;
|
|
59
|
+
accountId: number;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
interface CreateMobilityInput {
|
|
63
|
+
userId: string;
|
|
64
|
+
customTitle: string;
|
|
65
|
+
customImage: string | null;
|
|
66
|
+
price: number;
|
|
67
|
+
licenceNumber: string | null;
|
|
68
|
+
dateOfAcquisition: CreateAssetDateOfAcquisitionInput | null;
|
|
69
|
+
mobilityType: MobilityTypeEnum;
|
|
70
|
+
mileage: number | null;
|
|
71
|
+
note: string | null;
|
|
72
|
+
gotLoan: boolean;
|
|
73
|
+
coOwner: CreateAssetCoOwnerInput | null;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
interface CreateRealEstateInput {
|
|
77
|
+
userId: string;
|
|
78
|
+
gotLoan: boolean;
|
|
79
|
+
customTitle: string;
|
|
80
|
+
customImage: string | null;
|
|
81
|
+
price: number;
|
|
82
|
+
note: string | null;
|
|
83
|
+
isMainResidence: boolean;
|
|
84
|
+
coOwner: CreateAssetCoOwnerInput | null;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
interface BankAccountBalancesResponse {
|
|
88
|
+
/**
|
|
89
|
+
* total balance for checking type accounts
|
|
90
|
+
*/
|
|
91
|
+
checking: number | null;
|
|
92
|
+
/**
|
|
93
|
+
* total incoming balance for checking type accounts
|
|
94
|
+
*/
|
|
95
|
+
incomingChecking: number | null;
|
|
96
|
+
/**
|
|
97
|
+
* total balance for savings type accounts
|
|
98
|
+
*/
|
|
99
|
+
savings: number | null;
|
|
100
|
+
/**
|
|
101
|
+
* total incoming balance for savings type accounts
|
|
102
|
+
*/
|
|
103
|
+
incomingSavings: number | null;
|
|
104
|
+
/**
|
|
105
|
+
* e.g. '€'
|
|
106
|
+
*/
|
|
107
|
+
currency: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
interface BankAccountOriginalTransactionResponse {
|
|
111
|
+
value: number;
|
|
112
|
+
currency: string;
|
|
113
|
+
commission: number | null;
|
|
114
|
+
commissionCurrency: string | null;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
interface BankAccountTransactionCounterpartyResponse {
|
|
118
|
+
label: string | null;
|
|
119
|
+
accountScheme: BankAccountSchemeNameEnum | null;
|
|
120
|
+
type: string | null;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
interface BankAccountTransactionExtraDataResponse {
|
|
124
|
+
datetime: Date | null;
|
|
125
|
+
counterparty: BankAccountTransactionCounterpartyResponse | null;
|
|
126
|
+
country: string | null;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
interface BankAccountTransactionWordingResponse {
|
|
130
|
+
original: string;
|
|
131
|
+
stemmed: string;
|
|
132
|
+
simplified: string;
|
|
133
|
+
/**
|
|
134
|
+
* The one that can be edited by the user and update in the transaction by Powens API
|
|
135
|
+
*/
|
|
136
|
+
custom: string | null;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
interface BankAccountTransactionResponse {
|
|
140
|
+
id: string;
|
|
141
|
+
accountId: string;
|
|
142
|
+
date: Date;
|
|
143
|
+
value: number | null;
|
|
144
|
+
currency: string | null;
|
|
145
|
+
wording: BankAccountTransactionWordingResponse;
|
|
146
|
+
coming: boolean;
|
|
147
|
+
active: boolean;
|
|
148
|
+
comment: string | null;
|
|
149
|
+
lastUpdate: Date | null;
|
|
150
|
+
deleted: Date | null;
|
|
151
|
+
cardNumber: string | null;
|
|
152
|
+
type: BankAccountTransactionTypeEnum;
|
|
153
|
+
new: boolean;
|
|
154
|
+
originalTransaction: BankAccountOriginalTransactionResponse | null;
|
|
155
|
+
extraData: BankAccountTransactionExtraDataResponse;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
interface BankAccountTransactionsResponse {
|
|
159
|
+
transactions: BankAccountTransactionResponse[];
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
interface BankAccountResponse {
|
|
163
|
+
id: number;
|
|
164
|
+
balance: number | null;
|
|
165
|
+
name: string;
|
|
166
|
+
originalName: string;
|
|
167
|
+
currency: string;
|
|
168
|
+
type: BankAccountTypeEnum;
|
|
169
|
+
gotLoan: boolean;
|
|
170
|
+
iban: string | null;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
interface BankAccountsResponse {
|
|
174
|
+
accounts: BankAccountResponse[];
|
|
175
|
+
balances: BankAccountBalancesResponse | null;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
interface CryptocurrencyResponse {
|
|
179
|
+
id: string;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
interface MobilityDeletedResponse {
|
|
183
|
+
deleted: boolean;
|
|
184
|
+
errorMessage: string | null;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
interface AssetCoOwnerResponse {
|
|
188
|
+
id: string;
|
|
189
|
+
customName: string;
|
|
190
|
+
coOwnershipShare: number;
|
|
191
|
+
coOwnerFinancialShare: number;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
interface AssetDateOfAcquisitionResponse {
|
|
195
|
+
month: number;
|
|
196
|
+
year: number;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
interface MobilityResponse {
|
|
200
|
+
id: string;
|
|
201
|
+
userId: string;
|
|
202
|
+
customImage: string | null;
|
|
203
|
+
customTitle: string;
|
|
204
|
+
price: number;
|
|
205
|
+
licenceNumber: string | null;
|
|
206
|
+
dateOfAcquisition: AssetDateOfAcquisitionResponse | null;
|
|
207
|
+
mobilityType: MobilityTypeEnum;
|
|
208
|
+
mileage: number | null;
|
|
209
|
+
note: string | null;
|
|
210
|
+
gotLoan: boolean;
|
|
211
|
+
coOwner: AssetCoOwnerResponse | null;
|
|
212
|
+
createdAt: Date;
|
|
213
|
+
updatedAt: Date;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
interface OtherAssetResponse {
|
|
217
|
+
id: string;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
interface RealEstateDeletedResponse {
|
|
221
|
+
deleted: boolean;
|
|
222
|
+
errorMessage: string | null;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
interface RealEstateResponse {
|
|
226
|
+
id: string;
|
|
227
|
+
userId: string;
|
|
228
|
+
gotLoan: boolean;
|
|
229
|
+
customTitle: string;
|
|
230
|
+
customImage: string | null;
|
|
231
|
+
price: number;
|
|
232
|
+
note: string | null;
|
|
233
|
+
isMainResidence: boolean;
|
|
234
|
+
coOwner: AssetCoOwnerResponse | null;
|
|
235
|
+
createdAt: Date;
|
|
236
|
+
updatedAt: Date;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
interface StockExchangeResponse {
|
|
240
|
+
id: string;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
interface AssetsResponse {
|
|
244
|
+
realEstateAssets: RealEstateResponse[];
|
|
245
|
+
mobilityAssets: MobilityResponse[];
|
|
246
|
+
cryptocurrencyAssets: CryptocurrencyResponse[];
|
|
247
|
+
stockExchangeAssets: StockExchangeResponse[];
|
|
248
|
+
otherAssets: OtherAssetResponse[];
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
type ExactMatch<T, U extends T> = T & Record<keyof T, keyof U>;
|
|
252
|
+
|
|
253
|
+
export { type AssetCoOwnerResponse, type AssetDateOfAcquisitionResponse, type AssetsResponse, AuthenticationMethodEnum, type BankAccountBalancesResponse, type BankAccountOriginalTransactionResponse, type BankAccountResponse, BankAccountSchemeNameEnum, type BankAccountTransactionCounterpartyResponse, type BankAccountTransactionExtraDataResponse, type BankAccountTransactionResponse, BankAccountTransactionTypeEnum, type BankAccountTransactionWordingResponse, type BankAccountTransactionsResponse, BankAccountTypeEnum, type BankAccountsResponse, type CreateAssetCoOwnerInput, type CreateAssetDateOfAcquisitionInput, type CreateMobilityInput, type CreateRealEstateInput, type CryptocurrencyResponse, type ExactMatch, type FetchUserBankAccountsInput, type MobilityDeletedResponse, type MobilityResponse, MobilityTypeEnum, type OtherAssetResponse, type RealEstateDeletedResponse, type RealEstateResponse, type StockExchangeResponse };
|
package/index.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var AuthenticationMethodEnum;
|
|
2
|
+
(function (AuthenticationMethodEnum) {
|
|
3
|
+
AuthenticationMethodEnum["PHONE"] = "PHONE";
|
|
4
|
+
AuthenticationMethodEnum["EMAIL"] = "EMAIL";
|
|
5
|
+
})(AuthenticationMethodEnum || (AuthenticationMethodEnum = {}));
|
|
6
|
+
|
|
7
|
+
var MobilityTypeEnum;
|
|
8
|
+
(function (MobilityTypeEnum) {
|
|
9
|
+
MobilityTypeEnum["CAR"] = "CAR";
|
|
10
|
+
MobilityTypeEnum["MOTORCYCLE"] = "MOTORCYCLE";
|
|
11
|
+
MobilityTypeEnum["BICYCLE"] = "BICYCLE";
|
|
12
|
+
MobilityTypeEnum["OTHER"] = "OTHER";
|
|
13
|
+
})(MobilityTypeEnum || (MobilityTypeEnum = {}));
|
|
14
|
+
|
|
15
|
+
var BankAccountSchemeNameEnum;
|
|
16
|
+
(function (BankAccountSchemeNameEnum) {
|
|
17
|
+
BankAccountSchemeNameEnum["IBAN"] = "IBAN";
|
|
18
|
+
BankAccountSchemeNameEnum["BBAN"] = "BBAN";
|
|
19
|
+
BankAccountSchemeNameEnum["SORT_CODE_ACCOUNT_NUMBER"] = "SORT_CODE_ACCOUNT_NUMBER";
|
|
20
|
+
BankAccountSchemeNameEnum["CPAN"] = "CPAN";
|
|
21
|
+
BankAccountSchemeNameEnum["TPAN"] = "TPAN";
|
|
22
|
+
})(BankAccountSchemeNameEnum || (BankAccountSchemeNameEnum = {}));
|
|
23
|
+
|
|
24
|
+
var BankAccountTransactionTypeEnum;
|
|
25
|
+
(function (BankAccountTransactionTypeEnum) {
|
|
26
|
+
BankAccountTransactionTypeEnum["TRANSFER"] = "TRANSFER";
|
|
27
|
+
BankAccountTransactionTypeEnum["ORDER"] = "ORDER";
|
|
28
|
+
BankAccountTransactionTypeEnum["CHECK"] = "CHECK";
|
|
29
|
+
BankAccountTransactionTypeEnum["DEPOSIT"] = "DEPOSIT";
|
|
30
|
+
BankAccountTransactionTypeEnum["PAYBACK"] = "PAYBACK";
|
|
31
|
+
BankAccountTransactionTypeEnum["WITHDRAWAL"] = "WITHDRAWAL";
|
|
32
|
+
BankAccountTransactionTypeEnum["LOAN_REPAYMENT"] = "LOAN_REPAYMENT";
|
|
33
|
+
BankAccountTransactionTypeEnum["BANK"] = "BANK";
|
|
34
|
+
BankAccountTransactionTypeEnum["CARD"] = "CARD";
|
|
35
|
+
BankAccountTransactionTypeEnum["DEFERRED_CARD"] = "DEFERRED_CARD";
|
|
36
|
+
BankAccountTransactionTypeEnum["SUMMARY_CARD"] = "SUMMARY_CARD";
|
|
37
|
+
BankAccountTransactionTypeEnum["UNKNOWN"] = "UNKNOWN";
|
|
38
|
+
BankAccountTransactionTypeEnum["MARKET_ORDER"] = "MARKET_ORDER";
|
|
39
|
+
BankAccountTransactionTypeEnum["MARKET_FEE"] = "MARKET_FEE";
|
|
40
|
+
BankAccountTransactionTypeEnum["ARBITRAGE"] = "ARBITRAGE";
|
|
41
|
+
BankAccountTransactionTypeEnum["PROFIT"] = "PROFIT";
|
|
42
|
+
})(BankAccountTransactionTypeEnum || (BankAccountTransactionTypeEnum = {}));
|
|
43
|
+
|
|
44
|
+
var BankAccountTypeEnum;
|
|
45
|
+
(function (BankAccountTypeEnum) {
|
|
46
|
+
BankAccountTypeEnum["CHECKING"] = "CHECKING";
|
|
47
|
+
BankAccountTypeEnum["SAVINGS"] = "SAVINGS";
|
|
48
|
+
BankAccountTypeEnum["OTHER"] = "OTHER";
|
|
49
|
+
})(BankAccountTypeEnum || (BankAccountTypeEnum = {}));
|
|
50
|
+
|
|
51
|
+
export { AuthenticationMethodEnum, BankAccountSchemeNameEnum, BankAccountTransactionTypeEnum, BankAccountTypeEnum, MobilityTypeEnum };
|
package/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sowhat-types",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"description": "sowhat types",
|
|
5
6
|
"main": "index.ts",
|
|
6
7
|
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
9
|
+
"publish-on-npm": "npm run prepublish:only && npm publish",
|
|
10
|
+
"prepublish:only": "tsc && rollup -c"
|
|
8
11
|
},
|
|
9
12
|
"author": "hugobayoud",
|
|
10
|
-
"license": "ISC"
|
|
13
|
+
"license": "ISC",
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"rollup": "^4.19.1",
|
|
16
|
+
"typescript": "^5.5.4"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"index.js",
|
|
20
|
+
"index.d.ts"
|
|
21
|
+
],
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"rollup-plugin-dts": "^6.1.1"
|
|
24
|
+
}
|
|
11
25
|
}
|