@gewis/sudosos-client 0.0.0-develop.884f35f → 0.0.0-develop.88ba611
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 +110 -0
- package/dist/api.d.ts +48 -24
- package/dist/api.js +20 -5
- package/dist/base.js +1 -1
- package/package.json +4 -4
package/README.md
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# @gewis/sudosos-client
|
|
2
|
+
|
|
3
|
+
Auto-generated TypeScript-Axios client for the SudoSOS API. Published on npm as [`@gewis/sudosos-client`](https://www.npmjs.com/package/@gewis/sudosos-client).
|
|
4
|
+
|
|
5
|
+
This package lives inside the [SudoSOS Backend](https://github.com/GEWIS/sudosos-backend/tree/develop/client) monorepo (`client/`) and is generated from the backend's Swagger/OpenAPI spec.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @gewis/sudosos-client
|
|
13
|
+
# or
|
|
14
|
+
yarn add @gewis/sudosos-client
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
### Unauthorized API usage
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import { BannersApi, Configuration } from '@gewis/sudosos-client';
|
|
25
|
+
|
|
26
|
+
const configuration = new Configuration({
|
|
27
|
+
basePath: 'https://sudosos.gewis.nl/api/v1',
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const bannersApi = new BannersApi(configuration);
|
|
31
|
+
bannersApi.getAllOpenBanners().then((res) => {
|
|
32
|
+
console.log(res.data);
|
|
33
|
+
});
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Authorized API usage
|
|
37
|
+
|
|
38
|
+
All API methods accept a single object parameter (named properties, no positional `undefined` placeholders needed).
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
import { AuthenticateApi, BalanceApi, Configuration } from '@gewis/sudosos-client';
|
|
42
|
+
|
|
43
|
+
const basePath = 'https://sudosos.gewis.nl/api/v1';
|
|
44
|
+
const configuration = new Configuration({ basePath });
|
|
45
|
+
|
|
46
|
+
// Authenticate with an API key
|
|
47
|
+
const { data } = await new AuthenticateApi(configuration).keyAuthentication({
|
|
48
|
+
keyAuthenticationRequest: { key: 'API_KEY', userId: 0 },
|
|
49
|
+
});
|
|
50
|
+
const jwtToken = data.token;
|
|
51
|
+
|
|
52
|
+
// Use the token for authenticated requests
|
|
53
|
+
const authedConfig = new Configuration({
|
|
54
|
+
basePath,
|
|
55
|
+
accessToken: () => jwtToken,
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
const balanceApi = new BalanceApi(authedConfig);
|
|
59
|
+
balanceApi.getBalances().then((res) => {
|
|
60
|
+
console.log(res.data);
|
|
61
|
+
});
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
For a more complete integration example, see [sudosos-frontend-common](https://github.com/GEWIS/sudosos-frontend-common).
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## How the client is generated
|
|
69
|
+
|
|
70
|
+
The client is generated from the OpenAPI spec that the backend emits at build time (`out/swagger.json`). The generator is [`openapi-generator-cli`](https://openapi-generator.tech/) using the `typescript-axios` template with `useSingleRequestParameter=true`.
|
|
71
|
+
|
|
72
|
+
### Prerequisites
|
|
73
|
+
|
|
74
|
+
- Node.js 22+
|
|
75
|
+
- Java runtime (required by `openapi-generator-cli`)
|
|
76
|
+
- The backend's Swagger output must exist at `../out/swagger.json` — run `npm run swagger` from the backend root first
|
|
77
|
+
|
|
78
|
+
### Common commands
|
|
79
|
+
|
|
80
|
+
| Command | Description |
|
|
81
|
+
|---|---|
|
|
82
|
+
| `npm run gen` | Generate TypeScript source from `../out/swagger.json` into `src/` |
|
|
83
|
+
| `npm run build` | Compile `src/` to `dist/` |
|
|
84
|
+
| `npm run genbuild` | Run `gen` then `build` (full regeneration) |
|
|
85
|
+
| `npm run clean` | Remove `src/` and `dist/` |
|
|
86
|
+
|
|
87
|
+
### Regenerating after a backend change
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
# From the backend root — generate the OpenAPI spec first
|
|
91
|
+
npm run swagger # produces out/swagger.json
|
|
92
|
+
|
|
93
|
+
# Then regenerate the client
|
|
94
|
+
cd client
|
|
95
|
+
npm run genbuild
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Or use the one-shot helper from the backend root:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
npm run client:gen # runs npm run swagger, then cd client && npm install && npm run genbuild
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Contributing
|
|
107
|
+
|
|
108
|
+
This package is generated — do not edit files under `src/` by hand; they will be overwritten on the next `npm run gen`. To change the client's output, update the backend API and regenerate.
|
|
109
|
+
|
|
110
|
+
Issues and contributions go through the [SudoSOS Backend issue tracker](https://github.com/GEWIS/sudosos-backend/issues).
|
package/dist/api.d.ts
CHANGED
|
@@ -1880,7 +1880,7 @@ export interface CreatePointOfSaleRequest {
|
|
|
1880
1880
|
*/
|
|
1881
1881
|
'containers': Array<number>;
|
|
1882
1882
|
/**
|
|
1883
|
-
* ID of the user who will own the POS
|
|
1883
|
+
* ID of the user who will own the POS.
|
|
1884
1884
|
* @type {number}
|
|
1885
1885
|
* @memberof CreatePointOfSaleRequest
|
|
1886
1886
|
*/
|
|
@@ -3219,13 +3219,13 @@ export interface PaginatedBalanceResponse {
|
|
|
3219
3219
|
* @type {PaginationResult}
|
|
3220
3220
|
* @memberof PaginatedBalanceResponse
|
|
3221
3221
|
*/
|
|
3222
|
-
'_pagination'
|
|
3222
|
+
'_pagination': PaginationResult;
|
|
3223
3223
|
/**
|
|
3224
3224
|
* Returned balance responses
|
|
3225
3225
|
* @type {Array<BalanceResponse>}
|
|
3226
3226
|
* @memberof PaginatedBalanceResponse
|
|
3227
3227
|
*/
|
|
3228
|
-
'records'
|
|
3228
|
+
'records': Array<BalanceResponse>;
|
|
3229
3229
|
}
|
|
3230
3230
|
/**
|
|
3231
3231
|
* Paginated API Response for the `banner` entity.
|
|
@@ -3238,13 +3238,13 @@ export interface PaginatedBannerResponse {
|
|
|
3238
3238
|
* @type {PaginationResult}
|
|
3239
3239
|
* @memberof PaginatedBannerResponse
|
|
3240
3240
|
*/
|
|
3241
|
-
'_pagination'
|
|
3241
|
+
'_pagination': PaginationResult;
|
|
3242
3242
|
/**
|
|
3243
3243
|
* Returned banners
|
|
3244
3244
|
* @type {Array<BannerResponse>}
|
|
3245
3245
|
* @memberof PaginatedBannerResponse
|
|
3246
3246
|
*/
|
|
3247
|
-
'records'
|
|
3247
|
+
'records': Array<BannerResponse>;
|
|
3248
3248
|
}
|
|
3249
3249
|
/**
|
|
3250
3250
|
*
|
|
@@ -3409,13 +3409,13 @@ export interface PaginatedInactiveAdministrativeCostResponse {
|
|
|
3409
3409
|
* @type {PaginationResult}
|
|
3410
3410
|
* @memberof PaginatedInactiveAdministrativeCostResponse
|
|
3411
3411
|
*/
|
|
3412
|
-
'_pagination'
|
|
3412
|
+
'_pagination': PaginationResult;
|
|
3413
3413
|
/**
|
|
3414
3414
|
* Returned InactiveAdministrativeCost
|
|
3415
3415
|
* @type {Array<InactiveAdministrativeCostResponse>}
|
|
3416
3416
|
* @memberof PaginatedInactiveAdministrativeCostResponse
|
|
3417
3417
|
*/
|
|
3418
|
-
'records'
|
|
3418
|
+
'records': Array<InactiveAdministrativeCostResponse>;
|
|
3419
3419
|
}
|
|
3420
3420
|
/**
|
|
3421
3421
|
*
|
|
@@ -5120,23 +5120,23 @@ export interface TotalBalanceResponse {
|
|
|
5120
5120
|
*/
|
|
5121
5121
|
'date': string;
|
|
5122
5122
|
/**
|
|
5123
|
-
*
|
|
5124
|
-
* @type {
|
|
5123
|
+
*
|
|
5124
|
+
* @type {DineroObjectResponse}
|
|
5125
5125
|
* @memberof TotalBalanceResponse
|
|
5126
5126
|
*/
|
|
5127
|
-
'totalPositive':
|
|
5127
|
+
'totalPositive': DineroObjectResponse;
|
|
5128
5128
|
/**
|
|
5129
|
-
*
|
|
5130
|
-
* @type {
|
|
5129
|
+
*
|
|
5130
|
+
* @type {DineroObjectResponse}
|
|
5131
5131
|
* @memberof TotalBalanceResponse
|
|
5132
5132
|
*/
|
|
5133
|
-
'totalNegative':
|
|
5133
|
+
'totalNegative': DineroObjectResponse;
|
|
5134
5134
|
/**
|
|
5135
|
-
*
|
|
5136
|
-
* @type {UserTypeTotalBalanceResponse}
|
|
5135
|
+
* The total balances for the different user types
|
|
5136
|
+
* @type {Array<UserTypeTotalBalanceResponse>}
|
|
5137
5137
|
* @memberof TotalBalanceResponse
|
|
5138
5138
|
*/
|
|
5139
|
-
'userTypeBalances': UserTypeTotalBalanceResponse
|
|
5139
|
+
'userTypeBalances': Array<UserTypeTotalBalanceResponse>;
|
|
5140
5140
|
}
|
|
5141
5141
|
/**
|
|
5142
5142
|
*
|
|
@@ -10826,7 +10826,7 @@ export declare const InactiveAdministrativeCostsApiFp: (configuration?: Configur
|
|
|
10826
10826
|
* @param {*} [options] Override http request option.
|
|
10827
10827
|
* @throws {RequiredError}
|
|
10828
10828
|
*/
|
|
10829
|
-
handoutInactiveAdministrativeCostsUsers(handoutInactiveAdministrativeCostsRequest: HandoutInactiveAdministrativeCostsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<
|
|
10829
|
+
handoutInactiveAdministrativeCostsUsers(handoutInactiveAdministrativeCostsRequest: HandoutInactiveAdministrativeCostsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<InactiveAdministrativeCostResponse>>>;
|
|
10830
10830
|
/**
|
|
10831
10831
|
*
|
|
10832
10832
|
* @summary Notify all users which will pay administrative costs within a year
|
|
@@ -10904,7 +10904,7 @@ export declare const InactiveAdministrativeCostsApiFactory: (configuration?: Con
|
|
|
10904
10904
|
* @param {*} [options] Override http request option.
|
|
10905
10905
|
* @throws {RequiredError}
|
|
10906
10906
|
*/
|
|
10907
|
-
handoutInactiveAdministrativeCostsUsers(requestParameters: InactiveAdministrativeCostsApiHandoutInactiveAdministrativeCostsUsersRequest, options?: RawAxiosRequestConfig): AxiosPromise<
|
|
10907
|
+
handoutInactiveAdministrativeCostsUsers(requestParameters: InactiveAdministrativeCostsApiHandoutInactiveAdministrativeCostsUsersRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<InactiveAdministrativeCostResponse>>;
|
|
10908
10908
|
/**
|
|
10909
10909
|
*
|
|
10910
10910
|
* @summary Notify all users which will pay administrative costs within a year
|
|
@@ -11127,7 +11127,7 @@ export declare class InactiveAdministrativeCostsApi extends BaseAPI {
|
|
|
11127
11127
|
* @throws {RequiredError}
|
|
11128
11128
|
* @memberof InactiveAdministrativeCostsApi
|
|
11129
11129
|
*/
|
|
11130
|
-
handoutInactiveAdministrativeCostsUsers(requestParameters: InactiveAdministrativeCostsApiHandoutInactiveAdministrativeCostsUsersRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<
|
|
11130
|
+
handoutInactiveAdministrativeCostsUsers(requestParameters: InactiveAdministrativeCostsApiHandoutInactiveAdministrativeCostsUsersRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<InactiveAdministrativeCostResponse[], any, {}>>;
|
|
11131
11131
|
/**
|
|
11132
11132
|
*
|
|
11133
11133
|
* @summary Notify all users which will pay administrative costs within a year
|
|
@@ -11315,7 +11315,7 @@ export declare const InvoicesApiFp: (configuration?: Configuration) => {
|
|
|
11315
11315
|
* @param {*} [options] Override http request option.
|
|
11316
11316
|
* @throws {RequiredError}
|
|
11317
11317
|
*/
|
|
11318
|
-
getInvoicePdf(id: number, force?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<
|
|
11318
|
+
getInvoicePdf(id: number, force?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PdfUrlResponse>>;
|
|
11319
11319
|
/**
|
|
11320
11320
|
*
|
|
11321
11321
|
* @summary Returns a single invoice in the system.
|
|
@@ -11411,7 +11411,7 @@ export declare const InvoicesApiFactory: (configuration?: Configuration, basePat
|
|
|
11411
11411
|
* @param {*} [options] Override http request option.
|
|
11412
11412
|
* @throws {RequiredError}
|
|
11413
11413
|
*/
|
|
11414
|
-
getInvoicePdf(requestParameters: InvoicesApiGetInvoicePdfRequest, options?: RawAxiosRequestConfig): AxiosPromise<
|
|
11414
|
+
getInvoicePdf(requestParameters: InvoicesApiGetInvoicePdfRequest, options?: RawAxiosRequestConfig): AxiosPromise<PdfUrlResponse>;
|
|
11415
11415
|
/**
|
|
11416
11416
|
*
|
|
11417
11417
|
* @summary Returns a single invoice in the system.
|
|
@@ -11727,7 +11727,7 @@ export declare class InvoicesApi extends BaseAPI {
|
|
|
11727
11727
|
* @throws {RequiredError}
|
|
11728
11728
|
* @memberof InvoicesApi
|
|
11729
11729
|
*/
|
|
11730
|
-
getInvoicePdf(requestParameters: InvoicesApiGetInvoicePdfRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<
|
|
11730
|
+
getInvoicePdf(requestParameters: InvoicesApiGetInvoicePdfRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<PdfUrlResponse, any, {}>>;
|
|
11731
11731
|
/**
|
|
11732
11732
|
*
|
|
11733
11733
|
* @summary Returns a single invoice in the system.
|
|
@@ -15139,12 +15139,15 @@ export declare const TransfersApiAxiosParamCreator: (configuration?: Configurati
|
|
|
15139
15139
|
* @summary Returns all existing transfers
|
|
15140
15140
|
* @param {string} [fromDate] Start date for selected transfers (inclusive)
|
|
15141
15141
|
* @param {string} [tillDate] End date for selected transfers (exclusive)
|
|
15142
|
+
* @param {number} [fromId] Filter transfers from this user ID
|
|
15143
|
+
* @param {number} [toId] Filter transfers to this user ID
|
|
15144
|
+
* @param {string} [category] Restrict to a specific transfer category: deposit, payoutRequest, sellerPayout, invoice, creditInvoice, fine, waivedFines, writeOff, inactiveAdministrativeCost, manualCreation, manualDeletion
|
|
15142
15145
|
* @param {number} [take] How many transfers the endpoint should return
|
|
15143
15146
|
* @param {number} [skip] How many transfers should be skipped (for pagination)
|
|
15144
15147
|
* @param {*} [options] Override http request option.
|
|
15145
15148
|
* @throws {RequiredError}
|
|
15146
15149
|
*/
|
|
15147
|
-
getAllTransfers: (fromDate?: string, tillDate?: string, take?: number, skip?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
15150
|
+
getAllTransfers: (fromDate?: string, tillDate?: string, fromId?: number, toId?: number, category?: string, take?: number, skip?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
15148
15151
|
/**
|
|
15149
15152
|
*
|
|
15150
15153
|
* @summary Returns the requested transfer
|
|
@@ -15211,12 +15214,15 @@ export declare const TransfersApiFp: (configuration?: Configuration) => {
|
|
|
15211
15214
|
* @summary Returns all existing transfers
|
|
15212
15215
|
* @param {string} [fromDate] Start date for selected transfers (inclusive)
|
|
15213
15216
|
* @param {string} [tillDate] End date for selected transfers (exclusive)
|
|
15217
|
+
* @param {number} [fromId] Filter transfers from this user ID
|
|
15218
|
+
* @param {number} [toId] Filter transfers to this user ID
|
|
15219
|
+
* @param {string} [category] Restrict to a specific transfer category: deposit, payoutRequest, sellerPayout, invoice, creditInvoice, fine, waivedFines, writeOff, inactiveAdministrativeCost, manualCreation, manualDeletion
|
|
15214
15220
|
* @param {number} [take] How many transfers the endpoint should return
|
|
15215
15221
|
* @param {number} [skip] How many transfers should be skipped (for pagination)
|
|
15216
15222
|
* @param {*} [options] Override http request option.
|
|
15217
15223
|
* @throws {RequiredError}
|
|
15218
15224
|
*/
|
|
15219
|
-
getAllTransfers(fromDate?: string, tillDate?: string, take?: number, skip?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<TransferResponse>>>;
|
|
15225
|
+
getAllTransfers(fromDate?: string, tillDate?: string, fromId?: number, toId?: number, category?: string, take?: number, skip?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<TransferResponse>>>;
|
|
15220
15226
|
/**
|
|
15221
15227
|
*
|
|
15222
15228
|
* @summary Returns the requested transfer
|
|
@@ -15363,6 +15369,24 @@ export interface TransfersApiGetAllTransfersRequest {
|
|
|
15363
15369
|
* @memberof TransfersApiGetAllTransfers
|
|
15364
15370
|
*/
|
|
15365
15371
|
readonly tillDate?: string;
|
|
15372
|
+
/**
|
|
15373
|
+
* Filter transfers from this user ID
|
|
15374
|
+
* @type {number}
|
|
15375
|
+
* @memberof TransfersApiGetAllTransfers
|
|
15376
|
+
*/
|
|
15377
|
+
readonly fromId?: number;
|
|
15378
|
+
/**
|
|
15379
|
+
* Filter transfers to this user ID
|
|
15380
|
+
* @type {number}
|
|
15381
|
+
* @memberof TransfersApiGetAllTransfers
|
|
15382
|
+
*/
|
|
15383
|
+
readonly toId?: number;
|
|
15384
|
+
/**
|
|
15385
|
+
* Restrict to a specific transfer category: deposit, payoutRequest, sellerPayout, invoice, creditInvoice, fine, waivedFines, writeOff, inactiveAdministrativeCost, manualCreation, manualDeletion
|
|
15386
|
+
* @type {string}
|
|
15387
|
+
* @memberof TransfersApiGetAllTransfers
|
|
15388
|
+
*/
|
|
15389
|
+
readonly category?: string;
|
|
15366
15390
|
/**
|
|
15367
15391
|
* How many transfers the endpoint should return
|
|
15368
15392
|
* @type {number}
|
package/dist/api.js
CHANGED
|
@@ -11267,12 +11267,15 @@ const TransfersApiAxiosParamCreator = function (configuration) {
|
|
|
11267
11267
|
* @summary Returns all existing transfers
|
|
11268
11268
|
* @param {string} [fromDate] Start date for selected transfers (inclusive)
|
|
11269
11269
|
* @param {string} [tillDate] End date for selected transfers (exclusive)
|
|
11270
|
+
* @param {number} [fromId] Filter transfers from this user ID
|
|
11271
|
+
* @param {number} [toId] Filter transfers to this user ID
|
|
11272
|
+
* @param {string} [category] Restrict to a specific transfer category: deposit, payoutRequest, sellerPayout, invoice, creditInvoice, fine, waivedFines, writeOff, inactiveAdministrativeCost, manualCreation, manualDeletion
|
|
11270
11273
|
* @param {number} [take] How many transfers the endpoint should return
|
|
11271
11274
|
* @param {number} [skip] How many transfers should be skipped (for pagination)
|
|
11272
11275
|
* @param {*} [options] Override http request option.
|
|
11273
11276
|
* @throws {RequiredError}
|
|
11274
11277
|
*/
|
|
11275
|
-
getAllTransfers: async (fromDate, tillDate, take, skip, options = {}) => {
|
|
11278
|
+
getAllTransfers: async (fromDate, tillDate, fromId, toId, category, take, skip, options = {}) => {
|
|
11276
11279
|
const localVarPath = `/transfers`;
|
|
11277
11280
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
11278
11281
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -11292,6 +11295,15 @@ const TransfersApiAxiosParamCreator = function (configuration) {
|
|
|
11292
11295
|
if (tillDate !== undefined) {
|
|
11293
11296
|
localVarQueryParameter['tillDate'] = tillDate;
|
|
11294
11297
|
}
|
|
11298
|
+
if (fromId !== undefined) {
|
|
11299
|
+
localVarQueryParameter['fromId'] = fromId;
|
|
11300
|
+
}
|
|
11301
|
+
if (toId !== undefined) {
|
|
11302
|
+
localVarQueryParameter['toId'] = toId;
|
|
11303
|
+
}
|
|
11304
|
+
if (category !== undefined) {
|
|
11305
|
+
localVarQueryParameter['category'] = category;
|
|
11306
|
+
}
|
|
11295
11307
|
if (take !== undefined) {
|
|
11296
11308
|
localVarQueryParameter['take'] = take;
|
|
11297
11309
|
}
|
|
@@ -11503,13 +11515,16 @@ const TransfersApiFp = function (configuration) {
|
|
|
11503
11515
|
* @summary Returns all existing transfers
|
|
11504
11516
|
* @param {string} [fromDate] Start date for selected transfers (inclusive)
|
|
11505
11517
|
* @param {string} [tillDate] End date for selected transfers (exclusive)
|
|
11518
|
+
* @param {number} [fromId] Filter transfers from this user ID
|
|
11519
|
+
* @param {number} [toId] Filter transfers to this user ID
|
|
11520
|
+
* @param {string} [category] Restrict to a specific transfer category: deposit, payoutRequest, sellerPayout, invoice, creditInvoice, fine, waivedFines, writeOff, inactiveAdministrativeCost, manualCreation, manualDeletion
|
|
11506
11521
|
* @param {number} [take] How many transfers the endpoint should return
|
|
11507
11522
|
* @param {number} [skip] How many transfers should be skipped (for pagination)
|
|
11508
11523
|
* @param {*} [options] Override http request option.
|
|
11509
11524
|
* @throws {RequiredError}
|
|
11510
11525
|
*/
|
|
11511
|
-
async getAllTransfers(fromDate, tillDate, take, skip, options) {
|
|
11512
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getAllTransfers(fromDate, tillDate, take, skip, options);
|
|
11526
|
+
async getAllTransfers(fromDate, tillDate, fromId, toId, category, take, skip, options) {
|
|
11527
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getAllTransfers(fromDate, tillDate, fromId, toId, category, take, skip, options);
|
|
11513
11528
|
const index = configuration?.serverIndex ?? 0;
|
|
11514
11529
|
const operationBasePath = base_1.operationServerMap['TransfersApi.getAllTransfers']?.[index]?.url;
|
|
11515
11530
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath);
|
|
@@ -11611,7 +11626,7 @@ const TransfersApiFactory = function (configuration, basePath, axios) {
|
|
|
11611
11626
|
* @throws {RequiredError}
|
|
11612
11627
|
*/
|
|
11613
11628
|
getAllTransfers(requestParameters = {}, options) {
|
|
11614
|
-
return localVarFp.getAllTransfers(requestParameters.fromDate, requestParameters.tillDate, requestParameters.take, requestParameters.skip, options).then((request) => request(axios, basePath));
|
|
11629
|
+
return localVarFp.getAllTransfers(requestParameters.fromDate, requestParameters.tillDate, requestParameters.fromId, requestParameters.toId, requestParameters.category, requestParameters.take, requestParameters.skip, options).then((request) => request(axios, basePath));
|
|
11615
11630
|
},
|
|
11616
11631
|
/**
|
|
11617
11632
|
*
|
|
@@ -11694,7 +11709,7 @@ class TransfersApi extends base_1.BaseAPI {
|
|
|
11694
11709
|
* @memberof TransfersApi
|
|
11695
11710
|
*/
|
|
11696
11711
|
getAllTransfers(requestParameters = {}, options) {
|
|
11697
|
-
return (0, exports.TransfersApiFp)(this.configuration).getAllTransfers(requestParameters.fromDate, requestParameters.tillDate, requestParameters.take, requestParameters.skip, options).then((request) => request(this.axios, this.basePath));
|
|
11712
|
+
return (0, exports.TransfersApiFp)(this.configuration).getAllTransfers(requestParameters.fromDate, requestParameters.tillDate, requestParameters.fromId, requestParameters.toId, requestParameters.category, requestParameters.take, requestParameters.skip, options).then((request) => request(this.axios, this.basePath));
|
|
11698
11713
|
}
|
|
11699
11714
|
/**
|
|
11700
11715
|
*
|
package/dist/base.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
17
17
|
const axios_1 = require("axios");
|
|
18
|
-
exports.BASE_PATH = "http://
|
|
18
|
+
exports.BASE_PATH = "http://localhost:3000/api/v1".replace(/\/+$/, "");
|
|
19
19
|
/**
|
|
20
20
|
*
|
|
21
21
|
* @export
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gewis/sudosos-client",
|
|
3
|
-
"version": "0.0.0-develop.
|
|
3
|
+
"version": "0.0.0-develop.88ba611",
|
|
4
4
|
"description": "Auto-generated TypeScript-Axios client for the SudoSOS API",
|
|
5
5
|
"license": "AGPL-3.0-or-later",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
"clean": "rm -rf src dist"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"axios": "
|
|
19
|
+
"axios": "1.15.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@openapitools/openapi-generator-cli": "
|
|
23
|
-
"typescript": "
|
|
22
|
+
"@openapitools/openapi-generator-cli": "2.31.1",
|
|
23
|
+
"typescript": "5.9.3"
|
|
24
24
|
},
|
|
25
25
|
"repository": {
|
|
26
26
|
"type": "git",
|