@firela/api-types 0.0.0-canary.a7bda42
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/README.md +40 -0
- package/dist/generated/core/ApiError.d.ts +11 -0
- package/dist/generated/core/ApiError.d.ts.map +1 -0
- package/dist/generated/core/ApiError.js +11 -0
- package/dist/generated/core/ApiRequestOptions.d.ts +14 -0
- package/dist/generated/core/ApiRequestOptions.d.ts.map +1 -0
- package/dist/generated/core/ApiRequestOptions.js +1 -0
- package/dist/generated/core/ApiResult.d.ts +8 -0
- package/dist/generated/core/ApiResult.d.ts.map +1 -0
- package/dist/generated/core/ApiResult.js +1 -0
- package/dist/generated/core/CancelablePromise.d.ts +27 -0
- package/dist/generated/core/CancelablePromise.d.ts.map +1 -0
- package/dist/generated/core/CancelablePromise.js +88 -0
- package/dist/generated/core/OpenAPI.d.ts +28 -0
- package/dist/generated/core/OpenAPI.d.ts.map +1 -0
- package/dist/generated/core/OpenAPI.js +29 -0
- package/dist/generated/core/request.d.ts +30 -0
- package/dist/generated/core/request.d.ts.map +1 -0
- package/dist/generated/core/request.js +297 -0
- package/dist/generated/index.d.ts +7 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/generated/index.js +7 -0
- package/dist/generated/schemas.gen.d.ts +771 -0
- package/dist/generated/schemas.gen.d.ts.map +1 -0
- package/dist/generated/schemas.gen.js +771 -0
- package/dist/generated/services.gen.d.ts +313 -0
- package/dist/generated/services.gen.d.ts.map +1 -0
- package/dist/generated/services.gen.js +705 -0
- package/dist/generated/types.gen.d.ts +1159 -0
- package/dist/generated/types.gen.d.ts.map +1 -0
- package/dist/generated/types.gen.js +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/package.json +31 -0
|
@@ -0,0 +1,705 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
import { OpenAPI } from './core/OpenAPI';
|
|
3
|
+
import { request as __request } from './core/request';
|
|
4
|
+
export class HealthService {
|
|
5
|
+
/**
|
|
6
|
+
* Health check
|
|
7
|
+
* Returns the health status of the API service
|
|
8
|
+
* @returns HealthResponse Service is healthy
|
|
9
|
+
* @throws ApiError
|
|
10
|
+
*/
|
|
11
|
+
static getHealth() {
|
|
12
|
+
return __request(OpenAPI, {
|
|
13
|
+
method: 'GET',
|
|
14
|
+
url: '/health'
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export class TransactionService {
|
|
19
|
+
/**
|
|
20
|
+
* List transactions
|
|
21
|
+
* Retrieve a paginated list of transactions for the specified region
|
|
22
|
+
* @param data The data for the request.
|
|
23
|
+
* @param data.region Region code for tenant context
|
|
24
|
+
* @param data.limit Maximum number of results (1-100)
|
|
25
|
+
* @param data.offset Number of items to skip
|
|
26
|
+
* @param data.dateFrom Filter from date (inclusive, ISO 8601)
|
|
27
|
+
* @param data.dateTo Filter to date (inclusive, ISO 8601)
|
|
28
|
+
* @param data.status Filter by transaction status
|
|
29
|
+
* @param data.search Search in narration and payee fields
|
|
30
|
+
* @param data.accountId Filter by account ID
|
|
31
|
+
* @returns TransactionListResponse List of transactions
|
|
32
|
+
* @throws ApiError
|
|
33
|
+
*/
|
|
34
|
+
static listTransactions(data) {
|
|
35
|
+
return __request(OpenAPI, {
|
|
36
|
+
method: 'GET',
|
|
37
|
+
url: '/{region}/bean/transactions',
|
|
38
|
+
path: {
|
|
39
|
+
region: data.region
|
|
40
|
+
},
|
|
41
|
+
query: {
|
|
42
|
+
limit: data.limit,
|
|
43
|
+
offset: data.offset,
|
|
44
|
+
dateFrom: data.dateFrom,
|
|
45
|
+
dateTo: data.dateTo,
|
|
46
|
+
status: data.status,
|
|
47
|
+
search: data.search,
|
|
48
|
+
accountId: data.accountId
|
|
49
|
+
},
|
|
50
|
+
errors: {
|
|
51
|
+
401: 'Authentication required'
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Create transaction
|
|
57
|
+
* Create a new double-entry transaction.
|
|
58
|
+
*
|
|
59
|
+
* A transaction must have at least 2 postings that balance (debits = credits).
|
|
60
|
+
* The system will automatically interpolate missing amounts if possible.
|
|
61
|
+
*
|
|
62
|
+
* @param data The data for the request.
|
|
63
|
+
* @param data.region Region code for tenant context
|
|
64
|
+
* @param data.requestBody
|
|
65
|
+
* @returns TransactionResponse Transaction created successfully
|
|
66
|
+
* @throws ApiError
|
|
67
|
+
*/
|
|
68
|
+
static createTransaction(data) {
|
|
69
|
+
return __request(OpenAPI, {
|
|
70
|
+
method: 'POST',
|
|
71
|
+
url: '/{region}/bean/transactions',
|
|
72
|
+
path: {
|
|
73
|
+
region: data.region
|
|
74
|
+
},
|
|
75
|
+
body: data.requestBody,
|
|
76
|
+
mediaType: 'application/json',
|
|
77
|
+
errors: {
|
|
78
|
+
400: 'Invalid request parameters',
|
|
79
|
+
401: 'Authentication required'
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Get transaction
|
|
85
|
+
* Retrieve a specific transaction by ID with full details
|
|
86
|
+
* @param data The data for the request.
|
|
87
|
+
* @param data.region Region code for tenant context
|
|
88
|
+
* @param data.id Transaction ID (CUID format)
|
|
89
|
+
* @returns TransactionDetail Transaction details
|
|
90
|
+
* @throws ApiError
|
|
91
|
+
*/
|
|
92
|
+
static getTransaction(data) {
|
|
93
|
+
return __request(OpenAPI, {
|
|
94
|
+
method: 'GET',
|
|
95
|
+
url: '/{region}/bean/transactions/{id}',
|
|
96
|
+
path: {
|
|
97
|
+
region: data.region,
|
|
98
|
+
id: data.id
|
|
99
|
+
},
|
|
100
|
+
errors: {
|
|
101
|
+
401: 'Authentication required',
|
|
102
|
+
404: 'Resource not found'
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Update transaction metadata
|
|
108
|
+
* Update transaction metadata fields (does not change postings)
|
|
109
|
+
* @param data The data for the request.
|
|
110
|
+
* @param data.region Region code for tenant context
|
|
111
|
+
* @param data.id Transaction ID (CUID format)
|
|
112
|
+
* @param data.requestBody
|
|
113
|
+
* @returns TransactionDetail Transaction updated
|
|
114
|
+
* @throws ApiError
|
|
115
|
+
*/
|
|
116
|
+
static updateTransaction(data) {
|
|
117
|
+
return __request(OpenAPI, {
|
|
118
|
+
method: 'PATCH',
|
|
119
|
+
url: '/{region}/bean/transactions/{id}',
|
|
120
|
+
path: {
|
|
121
|
+
region: data.region,
|
|
122
|
+
id: data.id
|
|
123
|
+
},
|
|
124
|
+
body: data.requestBody,
|
|
125
|
+
mediaType: 'application/json',
|
|
126
|
+
errors: {
|
|
127
|
+
400: 'Invalid request parameters',
|
|
128
|
+
401: 'Authentication required',
|
|
129
|
+
404: 'Resource not found'
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Void transaction
|
|
135
|
+
* Mark a transaction as voided (soft delete)
|
|
136
|
+
* @param data The data for the request.
|
|
137
|
+
* @param data.region Region code for tenant context
|
|
138
|
+
* @param data.id Transaction ID (CUID format)
|
|
139
|
+
* @returns void Transaction voided
|
|
140
|
+
* @throws ApiError
|
|
141
|
+
*/
|
|
142
|
+
static voidTransaction(data) {
|
|
143
|
+
return __request(OpenAPI, {
|
|
144
|
+
method: 'DELETE',
|
|
145
|
+
url: '/{region}/bean/transactions/{id}',
|
|
146
|
+
path: {
|
|
147
|
+
region: data.region,
|
|
148
|
+
id: data.id
|
|
149
|
+
},
|
|
150
|
+
errors: {
|
|
151
|
+
401: 'Authentication required',
|
|
152
|
+
404: 'Resource not found'
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
export class AccountService {
|
|
158
|
+
/**
|
|
159
|
+
* List accounts
|
|
160
|
+
* Retrieve all accounts for the specified region with optional filters
|
|
161
|
+
* @param data The data for the request.
|
|
162
|
+
* @param data.region Region code for tenant context
|
|
163
|
+
* @param data.type Filter by account type
|
|
164
|
+
* @param data.status Filter by account status
|
|
165
|
+
* @param data.isCustom Filter custom accounts only
|
|
166
|
+
* @param data.search Search in path and i18nKey
|
|
167
|
+
* @param data.limit
|
|
168
|
+
* @param data.offset
|
|
169
|
+
* @returns AccountListResponse List of accounts
|
|
170
|
+
* @throws ApiError
|
|
171
|
+
*/
|
|
172
|
+
static listAccounts(data) {
|
|
173
|
+
return __request(OpenAPI, {
|
|
174
|
+
method: 'GET',
|
|
175
|
+
url: '/{region}/bean/accounts',
|
|
176
|
+
path: {
|
|
177
|
+
region: data.region
|
|
178
|
+
},
|
|
179
|
+
query: {
|
|
180
|
+
type: data.type,
|
|
181
|
+
status: data.status,
|
|
182
|
+
isCustom: data.isCustom,
|
|
183
|
+
search: data.search,
|
|
184
|
+
limit: data.limit,
|
|
185
|
+
offset: data.offset
|
|
186
|
+
},
|
|
187
|
+
errors: {
|
|
188
|
+
401: 'Authentication required'
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Create account
|
|
194
|
+
* Create a new Beancount account
|
|
195
|
+
* @param data The data for the request.
|
|
196
|
+
* @param data.region Region code for tenant context
|
|
197
|
+
* @param data.requestBody
|
|
198
|
+
* @returns AccountResponse Account created
|
|
199
|
+
* @throws ApiError
|
|
200
|
+
*/
|
|
201
|
+
static createAccount(data) {
|
|
202
|
+
return __request(OpenAPI, {
|
|
203
|
+
method: 'POST',
|
|
204
|
+
url: '/{region}/bean/accounts',
|
|
205
|
+
path: {
|
|
206
|
+
region: data.region
|
|
207
|
+
},
|
|
208
|
+
body: data.requestBody,
|
|
209
|
+
mediaType: 'application/json',
|
|
210
|
+
errors: {
|
|
211
|
+
400: 'Invalid request parameters',
|
|
212
|
+
401: 'Authentication required'
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Get account
|
|
218
|
+
* Retrieve a specific account by ID
|
|
219
|
+
* @param data The data for the request.
|
|
220
|
+
* @param data.region Region code for tenant context
|
|
221
|
+
* @param data.id Account ID (UUID format)
|
|
222
|
+
* @returns AccountResponse Account details
|
|
223
|
+
* @throws ApiError
|
|
224
|
+
*/
|
|
225
|
+
static getAccount(data) {
|
|
226
|
+
return __request(OpenAPI, {
|
|
227
|
+
method: 'GET',
|
|
228
|
+
url: '/{region}/bean/accounts/{id}',
|
|
229
|
+
path: {
|
|
230
|
+
region: data.region,
|
|
231
|
+
id: data.id
|
|
232
|
+
},
|
|
233
|
+
errors: {
|
|
234
|
+
401: 'Authentication required',
|
|
235
|
+
404: 'Resource not found'
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Update account
|
|
241
|
+
* Update account properties
|
|
242
|
+
* @param data The data for the request.
|
|
243
|
+
* @param data.region Region code for tenant context
|
|
244
|
+
* @param data.id Account ID (UUID format)
|
|
245
|
+
* @param data.requestBody
|
|
246
|
+
* @returns AccountResponse Account updated
|
|
247
|
+
* @throws ApiError
|
|
248
|
+
*/
|
|
249
|
+
static updateAccount(data) {
|
|
250
|
+
return __request(OpenAPI, {
|
|
251
|
+
method: 'PUT',
|
|
252
|
+
url: '/{region}/bean/accounts/{id}',
|
|
253
|
+
path: {
|
|
254
|
+
region: data.region,
|
|
255
|
+
id: data.id
|
|
256
|
+
},
|
|
257
|
+
body: data.requestBody,
|
|
258
|
+
mediaType: 'application/json',
|
|
259
|
+
errors: {
|
|
260
|
+
400: 'Invalid request parameters',
|
|
261
|
+
401: 'Authentication required',
|
|
262
|
+
404: 'Resource not found'
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Delete account
|
|
268
|
+
* Delete an account (only if no postings reference it)
|
|
269
|
+
* @param data The data for the request.
|
|
270
|
+
* @param data.region Region code for tenant context
|
|
271
|
+
* @param data.id Account ID (UUID format)
|
|
272
|
+
* @returns void Account deleted
|
|
273
|
+
* @throws ApiError
|
|
274
|
+
*/
|
|
275
|
+
static deleteAccount(data) {
|
|
276
|
+
return __request(OpenAPI, {
|
|
277
|
+
method: 'DELETE',
|
|
278
|
+
url: '/{region}/bean/accounts/{id}',
|
|
279
|
+
path: {
|
|
280
|
+
region: data.region,
|
|
281
|
+
id: data.id
|
|
282
|
+
},
|
|
283
|
+
errors: {
|
|
284
|
+
401: 'Authentication required',
|
|
285
|
+
404: 'Resource not found',
|
|
286
|
+
409: 'Resource conflict (e.g., account has postings)'
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Close account
|
|
292
|
+
* Mark an account as closed
|
|
293
|
+
* @param data The data for the request.
|
|
294
|
+
* @param data.region Region code for tenant context
|
|
295
|
+
* @param data.id Account ID (UUID format)
|
|
296
|
+
* @returns AccountResponse Account closed
|
|
297
|
+
* @throws ApiError
|
|
298
|
+
*/
|
|
299
|
+
static closeAccount(data) {
|
|
300
|
+
return __request(OpenAPI, {
|
|
301
|
+
method: 'POST',
|
|
302
|
+
url: '/{region}/bean/accounts/{id}/close',
|
|
303
|
+
path: {
|
|
304
|
+
region: data.region,
|
|
305
|
+
id: data.id
|
|
306
|
+
},
|
|
307
|
+
errors: {
|
|
308
|
+
401: 'Authentication required',
|
|
309
|
+
404: 'Resource not found'
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Reopen account
|
|
315
|
+
* Reopen a previously closed account
|
|
316
|
+
* @param data The data for the request.
|
|
317
|
+
* @param data.region Region code for tenant context
|
|
318
|
+
* @param data.id Account ID (UUID format)
|
|
319
|
+
* @returns AccountResponse Account reopened
|
|
320
|
+
* @throws ApiError
|
|
321
|
+
*/
|
|
322
|
+
static reopenAccount(data) {
|
|
323
|
+
return __request(OpenAPI, {
|
|
324
|
+
method: 'POST',
|
|
325
|
+
url: '/{region}/bean/accounts/{id}/reopen',
|
|
326
|
+
path: {
|
|
327
|
+
region: data.region,
|
|
328
|
+
id: data.id
|
|
329
|
+
},
|
|
330
|
+
errors: {
|
|
331
|
+
401: 'Authentication required',
|
|
332
|
+
404: 'Resource not found'
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
export class CommodityService {
|
|
338
|
+
/**
|
|
339
|
+
* List commodities
|
|
340
|
+
* Retrieve all commodity definitions for the region
|
|
341
|
+
* @param data The data for the request.
|
|
342
|
+
* @param data.region Region code for tenant context
|
|
343
|
+
* @returns CommodityListResponse List of commodities
|
|
344
|
+
* @throws ApiError
|
|
345
|
+
*/
|
|
346
|
+
static listCommodities(data) {
|
|
347
|
+
return __request(OpenAPI, {
|
|
348
|
+
method: 'GET',
|
|
349
|
+
url: '/{region}/bean/commodities',
|
|
350
|
+
path: {
|
|
351
|
+
region: data.region
|
|
352
|
+
},
|
|
353
|
+
errors: {
|
|
354
|
+
401: 'Authentication required'
|
|
355
|
+
}
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Create commodity
|
|
360
|
+
* Create a new commodity/currency definition
|
|
361
|
+
* @param data The data for the request.
|
|
362
|
+
* @param data.region Region code for tenant context
|
|
363
|
+
* @param data.requestBody
|
|
364
|
+
* @returns CommodityResponse Commodity created
|
|
365
|
+
* @throws ApiError
|
|
366
|
+
*/
|
|
367
|
+
static createCommodity(data) {
|
|
368
|
+
return __request(OpenAPI, {
|
|
369
|
+
method: 'POST',
|
|
370
|
+
url: '/{region}/bean/commodities',
|
|
371
|
+
path: {
|
|
372
|
+
region: data.region
|
|
373
|
+
},
|
|
374
|
+
body: data.requestBody,
|
|
375
|
+
mediaType: 'application/json',
|
|
376
|
+
errors: {
|
|
377
|
+
400: 'Invalid request parameters',
|
|
378
|
+
401: 'Authentication required'
|
|
379
|
+
}
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Get commodity
|
|
384
|
+
* Retrieve a specific commodity by symbol
|
|
385
|
+
* @param data The data for the request.
|
|
386
|
+
* @param data.region Region code for tenant context
|
|
387
|
+
* @param data.symbol Commodity symbol (e.g., "USD", "AAPL")
|
|
388
|
+
* @returns CommodityResponse Commodity details
|
|
389
|
+
* @throws ApiError
|
|
390
|
+
*/
|
|
391
|
+
static getCommodity(data) {
|
|
392
|
+
return __request(OpenAPI, {
|
|
393
|
+
method: 'GET',
|
|
394
|
+
url: '/{region}/bean/commodities/{symbol}',
|
|
395
|
+
path: {
|
|
396
|
+
region: data.region,
|
|
397
|
+
symbol: data.symbol
|
|
398
|
+
},
|
|
399
|
+
errors: {
|
|
400
|
+
401: 'Authentication required',
|
|
401
|
+
404: 'Resource not found'
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* Update commodity
|
|
407
|
+
* Update commodity properties
|
|
408
|
+
* @param data The data for the request.
|
|
409
|
+
* @param data.region Region code for tenant context
|
|
410
|
+
* @param data.symbol Commodity symbol (e.g., "USD", "AAPL")
|
|
411
|
+
* @param data.requestBody
|
|
412
|
+
* @returns CommodityResponse Commodity updated
|
|
413
|
+
* @throws ApiError
|
|
414
|
+
*/
|
|
415
|
+
static updateCommodity(data) {
|
|
416
|
+
return __request(OpenAPI, {
|
|
417
|
+
method: 'PUT',
|
|
418
|
+
url: '/{region}/bean/commodities/{symbol}',
|
|
419
|
+
path: {
|
|
420
|
+
region: data.region,
|
|
421
|
+
symbol: data.symbol
|
|
422
|
+
},
|
|
423
|
+
body: data.requestBody,
|
|
424
|
+
mediaType: 'application/json',
|
|
425
|
+
errors: {
|
|
426
|
+
400: 'Invalid request parameters',
|
|
427
|
+
401: 'Authentication required',
|
|
428
|
+
404: 'Resource not found'
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Delete commodity
|
|
434
|
+
* Delete a commodity definition
|
|
435
|
+
* @param data The data for the request.
|
|
436
|
+
* @param data.region Region code for tenant context
|
|
437
|
+
* @param data.symbol Commodity symbol (e.g., "USD", "AAPL")
|
|
438
|
+
* @returns void Commodity deleted
|
|
439
|
+
* @throws ApiError
|
|
440
|
+
*/
|
|
441
|
+
static deleteCommodity(data) {
|
|
442
|
+
return __request(OpenAPI, {
|
|
443
|
+
method: 'DELETE',
|
|
444
|
+
url: '/{region}/bean/commodities/{symbol}',
|
|
445
|
+
path: {
|
|
446
|
+
region: data.region,
|
|
447
|
+
symbol: data.symbol
|
|
448
|
+
},
|
|
449
|
+
errors: {
|
|
450
|
+
401: 'Authentication required',
|
|
451
|
+
404: 'Resource not found'
|
|
452
|
+
}
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* Get or create commodity
|
|
457
|
+
* Get existing commodity or create if not exists
|
|
458
|
+
* @param data The data for the request.
|
|
459
|
+
* @param data.region Region code for tenant context
|
|
460
|
+
* @param data.symbol Commodity symbol (e.g., "USD", "AAPL")
|
|
461
|
+
* @param data.requestBody
|
|
462
|
+
* @returns CommodityResponse Commodity found or created
|
|
463
|
+
* @throws ApiError
|
|
464
|
+
*/
|
|
465
|
+
static ensureCommodity(data) {
|
|
466
|
+
return __request(OpenAPI, {
|
|
467
|
+
method: 'POST',
|
|
468
|
+
url: '/{region}/bean/commodities/{symbol}/ensure',
|
|
469
|
+
path: {
|
|
470
|
+
region: data.region,
|
|
471
|
+
symbol: data.symbol
|
|
472
|
+
},
|
|
473
|
+
body: data.requestBody,
|
|
474
|
+
mediaType: 'application/json',
|
|
475
|
+
errors: {
|
|
476
|
+
401: 'Authentication required'
|
|
477
|
+
}
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* Bulk create commodities
|
|
482
|
+
* Create multiple commodities at once
|
|
483
|
+
* @param data The data for the request.
|
|
484
|
+
* @param data.region Region code for tenant context
|
|
485
|
+
* @param data.requestBody
|
|
486
|
+
* @returns CommodityListResponse Commodities created
|
|
487
|
+
* @throws ApiError
|
|
488
|
+
*/
|
|
489
|
+
static bulkCreateCommodities(data) {
|
|
490
|
+
return __request(OpenAPI, {
|
|
491
|
+
method: 'POST',
|
|
492
|
+
url: '/{region}/bean/commodities/bulk',
|
|
493
|
+
path: {
|
|
494
|
+
region: data.region
|
|
495
|
+
},
|
|
496
|
+
body: data.requestBody,
|
|
497
|
+
mediaType: 'application/json',
|
|
498
|
+
errors: {
|
|
499
|
+
400: 'Invalid request parameters',
|
|
500
|
+
401: 'Authentication required'
|
|
501
|
+
}
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
export class PriceService {
|
|
506
|
+
/**
|
|
507
|
+
* List prices
|
|
508
|
+
* Retrieve all price quotes for the region
|
|
509
|
+
* @param data The data for the request.
|
|
510
|
+
* @param data.region Region code for tenant context
|
|
511
|
+
* @returns PriceListResponse List of prices
|
|
512
|
+
* @throws ApiError
|
|
513
|
+
*/
|
|
514
|
+
static listPrices(data) {
|
|
515
|
+
return __request(OpenAPI, {
|
|
516
|
+
method: 'GET',
|
|
517
|
+
url: '/{region}/bean/prices',
|
|
518
|
+
path: {
|
|
519
|
+
region: data.region
|
|
520
|
+
},
|
|
521
|
+
errors: {
|
|
522
|
+
401: 'Authentication required'
|
|
523
|
+
}
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* Create price
|
|
528
|
+
* Create a new price quote
|
|
529
|
+
* @param data The data for the request.
|
|
530
|
+
* @param data.region Region code for tenant context
|
|
531
|
+
* @param data.requestBody
|
|
532
|
+
* @returns PriceResponse Price created
|
|
533
|
+
* @throws ApiError
|
|
534
|
+
*/
|
|
535
|
+
static createPrice(data) {
|
|
536
|
+
return __request(OpenAPI, {
|
|
537
|
+
method: 'POST',
|
|
538
|
+
url: '/{region}/bean/prices',
|
|
539
|
+
path: {
|
|
540
|
+
region: data.region
|
|
541
|
+
},
|
|
542
|
+
body: data.requestBody,
|
|
543
|
+
mediaType: 'application/json',
|
|
544
|
+
errors: {
|
|
545
|
+
400: 'Invalid request parameters',
|
|
546
|
+
401: 'Authentication required'
|
|
547
|
+
}
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* Get price
|
|
552
|
+
* Retrieve a specific price quote by ID
|
|
553
|
+
* @param data The data for the request.
|
|
554
|
+
* @param data.region Region code for tenant context
|
|
555
|
+
* @param data.id Price ID (UUID format)
|
|
556
|
+
* @returns PriceResponse Price details
|
|
557
|
+
* @throws ApiError
|
|
558
|
+
*/
|
|
559
|
+
static getPrice(data) {
|
|
560
|
+
return __request(OpenAPI, {
|
|
561
|
+
method: 'GET',
|
|
562
|
+
url: '/{region}/bean/prices/{id}',
|
|
563
|
+
path: {
|
|
564
|
+
region: data.region,
|
|
565
|
+
id: data.id
|
|
566
|
+
},
|
|
567
|
+
errors: {
|
|
568
|
+
401: 'Authentication required',
|
|
569
|
+
404: 'Resource not found'
|
|
570
|
+
}
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* Update price
|
|
575
|
+
* Update a price quote
|
|
576
|
+
* @param data The data for the request.
|
|
577
|
+
* @param data.region Region code for tenant context
|
|
578
|
+
* @param data.id Price ID (UUID format)
|
|
579
|
+
* @param data.requestBody
|
|
580
|
+
* @returns PriceResponse Price updated
|
|
581
|
+
* @throws ApiError
|
|
582
|
+
*/
|
|
583
|
+
static updatePrice(data) {
|
|
584
|
+
return __request(OpenAPI, {
|
|
585
|
+
method: 'PUT',
|
|
586
|
+
url: '/{region}/bean/prices/{id}',
|
|
587
|
+
path: {
|
|
588
|
+
region: data.region,
|
|
589
|
+
id: data.id
|
|
590
|
+
},
|
|
591
|
+
body: data.requestBody,
|
|
592
|
+
mediaType: 'application/json',
|
|
593
|
+
errors: {
|
|
594
|
+
400: 'Invalid request parameters',
|
|
595
|
+
401: 'Authentication required',
|
|
596
|
+
404: 'Resource not found'
|
|
597
|
+
}
|
|
598
|
+
});
|
|
599
|
+
}
|
|
600
|
+
/**
|
|
601
|
+
* Delete price
|
|
602
|
+
* Delete a price quote
|
|
603
|
+
* @param data The data for the request.
|
|
604
|
+
* @param data.region Region code for tenant context
|
|
605
|
+
* @param data.id Price ID (UUID format)
|
|
606
|
+
* @returns void Price deleted
|
|
607
|
+
* @throws ApiError
|
|
608
|
+
*/
|
|
609
|
+
static deletePrice(data) {
|
|
610
|
+
return __request(OpenAPI, {
|
|
611
|
+
method: 'DELETE',
|
|
612
|
+
url: '/{region}/bean/prices/{id}',
|
|
613
|
+
path: {
|
|
614
|
+
region: data.region,
|
|
615
|
+
id: data.id
|
|
616
|
+
},
|
|
617
|
+
errors: {
|
|
618
|
+
401: 'Authentication required',
|
|
619
|
+
404: 'Resource not found'
|
|
620
|
+
}
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
/**
|
|
624
|
+
* Bulk create prices
|
|
625
|
+
* Create multiple price quotes at once
|
|
626
|
+
* @param data The data for the request.
|
|
627
|
+
* @param data.region Region code for tenant context
|
|
628
|
+
* @param data.requestBody
|
|
629
|
+
* @returns PriceListResponse Prices created
|
|
630
|
+
* @throws ApiError
|
|
631
|
+
*/
|
|
632
|
+
static bulkCreatePrices(data) {
|
|
633
|
+
return __request(OpenAPI, {
|
|
634
|
+
method: 'POST',
|
|
635
|
+
url: '/{region}/bean/prices/bulk',
|
|
636
|
+
path: {
|
|
637
|
+
region: data.region
|
|
638
|
+
},
|
|
639
|
+
body: data.requestBody,
|
|
640
|
+
mediaType: 'application/json',
|
|
641
|
+
errors: {
|
|
642
|
+
400: 'Invalid request parameters',
|
|
643
|
+
401: 'Authentication required'
|
|
644
|
+
}
|
|
645
|
+
});
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
export class BalanceService {
|
|
649
|
+
/**
|
|
650
|
+
* Query balance
|
|
651
|
+
* Get the balance of an account in a specific currency
|
|
652
|
+
* @param data The data for the request.
|
|
653
|
+
* @param data.region Region code for tenant context
|
|
654
|
+
* @param data.account Account path (e.g., "Assets:Bank:Checking")
|
|
655
|
+
* @param data.currency Currency code (e.g., "USD")
|
|
656
|
+
* @param data.date Query date (defaults to today)
|
|
657
|
+
* @returns BalanceResponse Balance result
|
|
658
|
+
* @throws ApiError
|
|
659
|
+
*/
|
|
660
|
+
static getBalance(data) {
|
|
661
|
+
return __request(OpenAPI, {
|
|
662
|
+
method: 'GET',
|
|
663
|
+
url: '/{region}/bean/balances',
|
|
664
|
+
path: {
|
|
665
|
+
region: data.region
|
|
666
|
+
},
|
|
667
|
+
query: {
|
|
668
|
+
account: data.account,
|
|
669
|
+
date: data.date,
|
|
670
|
+
currency: data.currency
|
|
671
|
+
},
|
|
672
|
+
errors: {
|
|
673
|
+
400: 'Invalid request parameters',
|
|
674
|
+
401: 'Authentication required'
|
|
675
|
+
}
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
/**
|
|
679
|
+
* Query multi-currency balance
|
|
680
|
+
* Get the balance of an account across all currencies
|
|
681
|
+
* @param data The data for the request.
|
|
682
|
+
* @param data.region Region code for tenant context
|
|
683
|
+
* @param data.account Account path (e.g., "Assets:Bank:Checking")
|
|
684
|
+
* @param data.date Query date (defaults to today)
|
|
685
|
+
* @returns MultiCurrencyBalanceResponse Multi-currency balance result
|
|
686
|
+
* @throws ApiError
|
|
687
|
+
*/
|
|
688
|
+
static getMultiCurrencyBalance(data) {
|
|
689
|
+
return __request(OpenAPI, {
|
|
690
|
+
method: 'GET',
|
|
691
|
+
url: '/{region}/bean/balances/multi-currency',
|
|
692
|
+
path: {
|
|
693
|
+
region: data.region
|
|
694
|
+
},
|
|
695
|
+
query: {
|
|
696
|
+
account: data.account,
|
|
697
|
+
date: data.date
|
|
698
|
+
},
|
|
699
|
+
errors: {
|
|
700
|
+
400: 'Invalid request parameters',
|
|
701
|
+
401: 'Authentication required'
|
|
702
|
+
}
|
|
703
|
+
});
|
|
704
|
+
}
|
|
705
|
+
}
|