@tammsyr/admin-api-client 1.0.4 → 1.0.6

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 CHANGED
@@ -1,6 +1,23 @@
1
1
  # @tammsyr/admin-api-client
2
2
 
3
- TypeScript client for TAMM Admin Service API - Auto-generated from OpenAPI specification.
3
+ TypeScript client for TAMM Admin Service API. Auto-generated from OpenAPI specification using [swagger-typescript-api](https://github.com/acacode/swagger-typescript-api).
4
+
5
+ ## Table of Contents
6
+
7
+ - [Installation](#installation)
8
+ - [Requirements](#requirements)
9
+ - [Quick Start](#quick-start)
10
+ - [API Reference](#api-reference)
11
+ - [Authentication](#authentication)
12
+ - [Configuration](#configuration)
13
+ - [Error Handling](#error-handling)
14
+ - [Types](#types)
15
+ - [Generation & Publishing](#generation--publishing)
16
+ - [Prerequisites](#prerequisites)
17
+ - [Generating the Client](#generating-the-client)
18
+ - [Publishing to npm](#publishing-to-npm)
19
+ - [npm Authentication](#npm-authentication)
20
+ - [Troubleshooting](#troubleshooting)
4
21
 
5
22
  ## Installation
6
23
 
@@ -8,58 +25,75 @@ TypeScript client for TAMM Admin Service API - Auto-generated from OpenAPI speci
8
25
  npm install @tammsyr/admin-api-client
9
26
  ```
10
27
 
28
+ **Peer dependency:** This package uses [axios](https://www.npmjs.com/package/axios) for HTTP requests. If your project doesn't already have it:
29
+
30
+ ```bash
31
+ npm install axios
32
+ ```
33
+
34
+ ## Requirements
35
+
36
+ - Node.js 18+
37
+ - TypeScript 5.x (optional, for type definitions)
38
+
11
39
  ## Quick Start
12
40
 
13
41
  ```typescript
14
42
  import { AdminApiClient } from '@tammsyr/admin-api-client';
15
43
 
16
- // Create client instance
17
- const adminClient = new AdminApiClient({
18
- baseURL: 'http://localhost:3006/admin/v1', // Include /admin/v1 prefix
19
- token: 'your-jwt-token', // Optional, can be set later
20
- });
44
+ async function main() {
45
+ const adminClient = new AdminApiClient({
46
+ baseURL: 'http://localhost:3006/admin/v1',
47
+ });
21
48
 
22
- // Login
23
- const loginResponse = await adminClient.auth.login({
24
- email: 'admin@example.com',
25
- password: 'password123',
26
- });
49
+ const loginResponse = await adminClient.auth.login({
50
+ email: 'admin@example.com',
51
+ password: 'password123',
52
+ });
27
53
 
28
- // Store token
29
- adminClient.setToken(loginResponse.data.accessToken);
54
+ adminClient.setToken(loginResponse.data.accessToken);
30
55
 
31
- // Use authenticated endpoints
32
- const admins = await adminClient.admins.getAll();
33
- const roles = await adminClient.roles.getAll();
34
- const permissions = await adminClient.permissions.getAll();
56
+ const admins = await adminClient.admins.getAll();
57
+ const roles = await adminClient.roles.getAll();
58
+ }
59
+
60
+ main().catch(console.error);
35
61
  ```
36
62
 
63
+ **Important:** The `baseURL` must include the `/admin/v1` path. The Admin Service serves all routes under that prefix.
64
+
37
65
  ## API Reference
38
66
 
39
67
  ### Available APIs
40
68
 
41
- - **`adminClient.auth`** - Authentication (login, logout)
42
- - **`adminClient.admins`** - Admin user management
43
- - **`adminClient.roles`** - Role management
44
- - **`adminClient.permissions`** - Permission management
45
- - **`adminClient.agents`** - Agent management
46
- - **`adminClient.agentBranches`** - Agent branch management
47
- - **`adminClient.agentSettlements`** - Agent settlement management
48
- - **`adminClient.kyc`** - KYC management
49
- - **`adminClient.notifications`** - Notification management
50
- - **`adminClient.activityLogs`** - Activity log queries
51
- - **`adminClient.seed`** - Database seeding (dev only)
52
-
53
- ### Authentication
69
+ | Property | Description |
70
+ | ------------------------------ | --------------------------------------- |
71
+ | `adminClient.auth` | Authentication (login, logout, refresh) |
72
+ | `adminClient.admins` | Admin user management |
73
+ | `adminClient.roles` | Role management |
74
+ | `adminClient.permissions` | Permission management |
75
+ | `adminClient.agents` | Agent management |
76
+ | `adminClient.agentBranches` | Agent branch management |
77
+ | `adminClient.agentSettlements` | Agent settlement management |
78
+ | `adminClient.kyc` | KYC management |
79
+ | `adminClient.notifications` | Notification management |
80
+ | `adminClient.activityLogs` | Activity log queries |
81
+ | `adminClient.seed` | Database seeding (dev only) |
82
+
83
+ ## Authentication
54
84
 
55
85
  ```typescript
56
86
  // Set token during initialization
57
87
  const client = new AdminApiClient({
58
- baseURL: 'http://localhost:3006',
88
+ baseURL: 'http://localhost:3006/admin/v1',
59
89
  token: 'your-token',
60
90
  });
61
91
 
62
- // Or set token later
92
+ // Or set token after login
93
+ const res = await client.auth.login({ email, password });
94
+ client.setToken(res.data.accessToken);
95
+
96
+ // Update token later
63
97
  client.setToken('new-token');
64
98
 
65
99
  // Clear token
@@ -72,15 +106,11 @@ client.clearToken();
72
106
  import { Admins, HttpClient } from '@tammsyr/admin-api-client';
73
107
 
74
108
  const httpClient = new HttpClient({
75
- baseURL: 'http://localhost:3006',
109
+ baseURL: 'http://localhost:3006/admin/v1',
76
110
  securityWorker: async (authData) => {
77
- const token = localStorage.getItem('admin_token');
111
+ const token = authData?.token ?? localStorage.getItem('admin_token');
78
112
  if (token) {
79
- return {
80
- headers: {
81
- Authorization: `Bearer ${token}`,
82
- },
83
- };
113
+ return { headers: { Authorization: `Bearer ${token}` } };
84
114
  }
85
115
  },
86
116
  secure: true,
@@ -90,18 +120,35 @@ const adminsApi = new Admins(httpClient);
90
120
  const allAdmins = await adminsApi.getAll();
91
121
  ```
92
122
 
93
- ## Types
123
+ ## Configuration
94
124
 
95
- All TypeScript types are exported:
125
+ ```typescript
126
+ const client = new AdminApiClient({
127
+ baseURL: 'http://localhost:3006/admin/v1',
128
+ timeout: 10000,
129
+ token: 'your-jwt-token',
130
+ headers: {
131
+ 'X-Custom-Header': 'value',
132
+ },
133
+ });
134
+ ```
135
+
136
+ | Option | Type | Default | Description |
137
+ | --------- | ------------------------ | ---------------------------------- | ------------------------------------------------- |
138
+ | `baseURL` | `string` | `'http://localhost:3006/admin/v1'` | Admin Service base URL (must include `/admin/v1`) |
139
+ | `timeout` | `number` | `10000` | Request timeout in ms |
140
+ | `token` | `string` | — | JWT token for authenticated requests |
141
+ | `headers` | `Record<string, string>` | `{}` | Additional request headers |
142
+
143
+ **Environment-based URL example:**
96
144
 
97
145
  ```typescript
98
- import type {
99
- LoginAdminDto,
100
- AdminUserDto,
101
- AdminRoleDto,
102
- AdminPermissionDto,
103
- // ... all other types
104
- } from '@tammsyr/admin-api-client';
146
+ const baseURL =
147
+ process.env.NODE_ENV === 'production'
148
+ ? 'https://admin.tamm.com/admin/v1'
149
+ : 'http://localhost:3006/admin/v1';
150
+
151
+ const client = new AdminApiClient({ baseURL });
105
152
  ```
106
153
 
107
154
  ## Error Handling
@@ -110,40 +157,186 @@ import type {
110
157
  try {
111
158
  const response = await adminClient.admins.create(adminData);
112
159
  console.log('Success:', response.data);
113
- } catch (error) {
114
- if (error.response) {
115
- // Server responded with error status
116
- console.error('API Error:', error.response.status, error.response.data);
160
+ } catch (err: any) {
161
+ if (err.response) {
162
+ console.error('API Error:', err.response.status, err.response.data);
117
163
  } else {
118
- // Network error
119
- console.error('Network Error:', error.message);
164
+ console.error('Network Error:', err.message);
120
165
  }
121
166
  }
122
167
  ```
123
168
 
124
- ## Configuration
169
+ ## Types
170
+
171
+ All request/response types are exported:
125
172
 
126
173
  ```typescript
127
- const client = new AdminApiClient({
128
- baseURL: 'http://localhost:3006', // Admin Service URL
129
- timeout: 10000, // Request timeout (ms)
130
- token: 'your-jwt-token', // Optional auth token
131
- headers: {
132
- // Custom headers
133
- 'X-Custom-Header': 'value',
134
- },
135
- });
174
+ import type {
175
+ AdminLoginRequestDto,
176
+ AdminUserDto,
177
+ AdminRoleDto,
178
+ AdminPermissionDto,
179
+ LoginData,
180
+ // ... other types
181
+ } from '@tammsyr/admin-api-client';
136
182
  ```
137
183
 
138
- ## Versioning
184
+ ---
185
+
186
+ ## Generation & Publishing
139
187
 
140
- This package follows semantic versioning. Check the [changelog](./CHANGELOG.md) for version history.
188
+ This section covers how to regenerate the client when the Admin Service API changes and how to publish a new version to npm.
141
189
 
142
- ## Support
190
+ ### Prerequisites
191
+
192
+ All commands are run from the **monorepo root** (`tamm-microservices/`).
193
+
194
+ | Tool | Purpose |
195
+ | ----------------------- | ---------------------------- |
196
+ | `swagger-typescript-api`| Generates the TS client |
197
+ | `typescript` | Compiles for publishing |
198
+ | `npm` account | Required for publishing |
199
+
200
+ Both tools are already listed in the root `devDependencies` — just run `npm install`.
201
+
202
+ ### Generating the Client
203
+
204
+ #### Step 1 — Start the Admin Service
205
+
206
+ The OpenAPI spec is fetched from the running server's Swagger endpoint at `http://localhost:3006/admin/docs-json`.
207
+
208
+ ```bash
209
+ npm run start:admin
210
+ ```
211
+
212
+ Wait until the service is fully started before proceeding.
213
+
214
+ #### Step 2 — Fetch the OpenAPI Spec
215
+
216
+ ```bash
217
+ npm run generate:admin-openapi-spec
218
+ ```
219
+
220
+ This saves the spec to `admin-openapi.json` at the monorepo root. You can also set a custom URL via the `ADMIN_SERVICE_URL` environment variable.
221
+
222
+ #### Step 3 — Generate the TypeScript Client
223
+
224
+ ```bash
225
+ npm run generate:admin-typescript-client
226
+ ```
227
+
228
+ Output is written to `generated/admin-client/`.
229
+
230
+ #### Combined Shortcut
231
+
232
+ Run Steps 2 and 3 together (Admin Service must already be running):
233
+
234
+ ```bash
235
+ npm run generate:admin-typescript-client:full
236
+ ```
237
+
238
+ #### Review Changes
239
+
240
+ ```bash
241
+ git diff admin-openapi.json
242
+ git diff generated/admin-client/
243
+ ```
244
+
245
+ ### Publishing to npm
246
+
247
+ #### 1. Bump the version and publish
248
+
249
+ ```bash
250
+ npm run publish:admin-client -- --version=<new-version>
251
+ ```
252
+
253
+ The script will:
254
+ 1. Update the version in `generated/admin-client/package.json`
255
+ 2. Run `tsc` to build the `dist/` folder
256
+ 3. Publish `@tammsyr/admin-api-client` to the public npm registry
257
+
258
+ #### 2. Dry-run first (recommended)
259
+
260
+ Verify everything looks correct without actually publishing:
261
+
262
+ ```bash
263
+ npm run publish:admin-client -- --dry-run
264
+ ```
265
+
266
+ #### 3. Version and publish together
267
+
268
+ ```bash
269
+ npm run publish:admin-client -- --version=1.0.6 --dry-run # verify
270
+ npm run publish:admin-client -- --version=1.0.6 # publish for real
271
+ ```
272
+
273
+ ### npm Authentication
274
+
275
+ You must be authenticated with npm to publish. There are two options:
276
+
277
+ #### Option A — npm login (interactive)
278
+
279
+ ```bash
280
+ npm login
281
+ ```
282
+
283
+ If 2FA is enabled on your account, you'll be prompted for a one-time password.
284
+
285
+ #### Option B — Access token (CI / non-interactive)
286
+
287
+ 1. Create a **Granular Access Token** on [npmjs.com](https://www.npmjs.com) with publish permissions for `@tammsyr/*`
288
+ 2. Set it as an environment variable before publishing:
289
+
290
+ ```powershell
291
+ # PowerShell
292
+ $env:NPM_TOKEN="YOUR_TOKEN_HERE"
293
+ npm run publish:admin-client -- --version=1.0.6
294
+ ```
295
+
296
+ ```bash
297
+ # Bash / Linux / macOS
298
+ export NPM_TOKEN="YOUR_TOKEN_HERE"
299
+ npm run publish:admin-client -- --version=1.0.6
300
+ ```
301
+
302
+ See [`docs/npm-2fa-setup.md`](../../docs/npm-2fa-setup.md) for detailed 2FA and token configuration.
303
+
304
+ ### Full End-to-End Example
305
+
306
+ ```bash
307
+ # 1. Start the Admin Service
308
+ npm run start:admin
309
+
310
+ # 2. (in another terminal) Generate the client
311
+ npm run generate:admin-typescript-client:full
312
+
313
+ # 3. Review changes
314
+ git diff admin-openapi.json generated/admin-client/
315
+
316
+ # 4. Dry-run publish
317
+ npm run publish:admin-client -- --version=1.0.6 --dry-run
318
+
319
+ # 5. Publish for real
320
+ npm run publish:admin-client -- --version=1.0.6
321
+
322
+ # 6. Commit
323
+ git add admin-openapi.json generated/admin-client/
324
+ git commit -m "chore: regenerate and publish admin client v1.0.6"
325
+ ```
326
+
327
+ ## Troubleshooting
328
+
329
+ | Problem | Solution |
330
+ | ------- | -------- |
331
+ | `generate:admin-openapi-spec` fails | Make sure the Admin Service is running (`npm run start:admin`) and reachable at `http://localhost:3006` |
332
+ | Generated code has TypeScript errors | Verify the OpenAPI spec is valid — check Swagger UI at `http://localhost:3006/admin/docs` |
333
+ | `403 Forbidden` on publish | Check npm auth (`npm whoami`), org membership (`npm org ls tammsyr`), and 2FA/token setup |
334
+ | `Two-factor authentication required` | Enable 2FA on npmjs.com or use a granular access token with bypass-2FA enabled |
335
+ | Version conflict on publish | Ensure the `--version` you're publishing doesn't already exist on the registry |
336
+
337
+ ## Versioning
143
338
 
144
- - **Issues**: Report problems with generated code
145
- - **API Changes**: Contact backend team
146
- - **Documentation**: See [workflow guide](../../docs/admin-typescript-client-workflow.md)
339
+ This package follows [semantic versioning](https://semver.org/).
147
340
 
148
341
  ## License
149
342
 
@@ -12,7 +12,7 @@ export declare class AgentBranches<SecurityDataType = unknown> {
12
12
  * @request GET:/agent-branches
13
13
  * @secure
14
14
  */
15
- listBranches: (query: ListBranchesParams, params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
15
+ listBranches: (query: ListBranchesParams, params?: RequestParams) => Promise<import("axios").AxiosResponse<ListBranchesData, any, {}>>;
16
16
  /**
17
17
  * No description
18
18
  *
@@ -22,7 +22,7 @@ export declare class AgentBranches<SecurityDataType = unknown> {
22
22
  * @request POST:/agent-branches
23
23
  * @secure
24
24
  */
25
- createBranch: (data: CreateBranchDto, params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
25
+ createBranch: (data: CreateBranchDto, params?: RequestParams) => Promise<import("axios").AxiosResponse<CreateBranchData, any, {}>>;
26
26
  /**
27
27
  * No description
28
28
  *
@@ -32,7 +32,7 @@ export declare class AgentBranches<SecurityDataType = unknown> {
32
32
  * @request GET:/agent-branches/{id}
33
33
  * @secure
34
34
  */
35
- getBranch: ({ id, ...query }: GetBranchParams, params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
35
+ getBranch: ({ id, ...query }: GetBranchParams, params?: RequestParams) => Promise<import("axios").AxiosResponse<GetBranchData, any, {}>>;
36
36
  /**
37
37
  * No description
38
38
  *
@@ -42,7 +42,7 @@ export declare class AgentBranches<SecurityDataType = unknown> {
42
42
  * @request PATCH:/agent-branches/{id}
43
43
  * @secure
44
44
  */
45
- updateBranch: ({ id, ...query }: UpdateBranchParams, data: UpdateBranchDto, params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
45
+ updateBranch: ({ id, ...query }: UpdateBranchParams, data: UpdateBranchDto, params?: RequestParams) => Promise<import("axios").AxiosResponse<UpdateBranchData, any, {}>>;
46
46
  /**
47
47
  * No description
48
48
  *
@@ -52,7 +52,7 @@ export declare class AgentBranches<SecurityDataType = unknown> {
52
52
  * @request DELETE:/agent-branches/{id}
53
53
  * @secure
54
54
  */
55
- deleteBranch: ({ id, ...query }: DeleteBranchParams, params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
55
+ deleteBranch: ({ id, ...query }: DeleteBranchParams, params?: RequestParams) => Promise<import("axios").AxiosResponse<DeleteBranchData, any, {}>>;
56
56
  /**
57
57
  * No description
58
58
  *
@@ -62,6 +62,6 @@ export declare class AgentBranches<SecurityDataType = unknown> {
62
62
  * @request PATCH:/agent-branches/{id}/status
63
63
  * @secure
64
64
  */
65
- updateBranchStatus: ({ id, ...query }: UpdateBranchStatusParams, data: UpdateBranchStatusDto, params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
65
+ updateBranchStatus: ({ id, ...query }: UpdateBranchStatusParams, data: UpdateBranchStatusDto, params?: RequestParams) => Promise<import("axios").AxiosResponse<UpdateBranchStatusData, any, {}>>;
66
66
  }
67
67
  //# sourceMappingURL=AgentBranches.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AgentBranches.d.ts","sourceRoot":"","sources":["../AgentBranches.ts"],"names":[],"mappings":"AAYA,OAAO,EAEL,eAAe,EAEf,kBAAkB,EAElB,eAAe,EAEf,kBAAkB,EAElB,eAAe,EACf,kBAAkB,EAElB,qBAAqB,EACrB,wBAAwB,EACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAe,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEvE,qBAAa,aAAa,C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AQ5D;IACL;;;;;;;;OAQG;IACH,SAAS,GAAI,kBAAkB,eAAe,EAAE,SAAQ,aAAkB,oEAMrE;IACL;;;;;;;;OAQG;IACH,YAAY,GACV,kBAAkB,kBAAkB,EACpC,MAAM,eAAe,EACrB,SAAQ,aAAkB,uEASvB;IACL;;;;;;;;OAQG;IACH,YAAY,GACV,kBAAkB,kBAAkB,EACpC,SAAQ,aAAkB,uEAOvB;IACL;;;;;;;;OAQG;IACH,kBAAkB,GAChB,kBAAkB,wBAAwB,EAC1C,MAAM,qBAAqB,EAC3B,SAAQ,aAAkB,6EASvB;CACN"}
@@ -12,7 +12,7 @@ export declare class AgentSettlements<SecurityDataType = unknown> {
12
12
  * @request GET:/agent-settlements
13
13
  * @secure
14
14
  */
15
- listSettlements: (query: ListSettlementsParams, params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
15
+ listSettlements: (query: ListSettlementsParams, params?: RequestParams) => Promise<import("axios").AxiosResponse<ListSettlementsData, any, {}>>;
16
16
  /**
17
17
  * No description
18
18
  *
@@ -22,7 +22,7 @@ export declare class AgentSettlements<SecurityDataType = unknown> {
22
22
  * @request POST:/agent-settlements
23
23
  * @secure
24
24
  */
25
- createSettlement: (data: CreateSettlementDto, params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
25
+ createSettlement: (data: CreateSettlementDto, params?: RequestParams) => Promise<import("axios").AxiosResponse<CreateSettlementData, any, {}>>;
26
26
  /**
27
27
  * No description
28
28
  *
@@ -32,7 +32,7 @@ export declare class AgentSettlements<SecurityDataType = unknown> {
32
32
  * @request GET:/agent-settlements/{id}
33
33
  * @secure
34
34
  */
35
- getSettlement: ({ id, ...query }: GetSettlementParams, params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
35
+ getSettlement: ({ id, ...query }: GetSettlementParams, params?: RequestParams) => Promise<import("axios").AxiosResponse<GetSettlementData, any, {}>>;
36
36
  /**
37
37
  * No description
38
38
  *
@@ -42,7 +42,7 @@ export declare class AgentSettlements<SecurityDataType = unknown> {
42
42
  * @request PATCH:/agent-settlements/{id}/status
43
43
  * @secure
44
44
  */
45
- updateSettlementStatus: ({ id, ...query }: UpdateSettlementStatusParams, data: UpdateSettlementStatusDto, params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
45
+ updateSettlementStatus: ({ id, ...query }: UpdateSettlementStatusParams, data: UpdateSettlementStatusDto, params?: RequestParams) => Promise<import("axios").AxiosResponse<UpdateSettlementStatusData, any, {}>>;
46
46
  /**
47
47
  * No description
48
48
  *
@@ -52,7 +52,7 @@ export declare class AgentSettlements<SecurityDataType = unknown> {
52
52
  * @request PATCH:/agent-settlements/{id}/amounts
53
53
  * @secure
54
54
  */
55
- updateSettlementAmounts: ({ id, ...query }: UpdateSettlementAmountsParams, data: UpdateSettlementAmountsDto, params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
55
+ updateSettlementAmounts: ({ id, ...query }: UpdateSettlementAmountsParams, data: UpdateSettlementAmountsDto, params?: RequestParams) => Promise<import("axios").AxiosResponse<UpdateSettlementAmountsData, any, {}>>;
56
56
  /**
57
57
  * No description
58
58
  *
@@ -62,7 +62,7 @@ export declare class AgentSettlements<SecurityDataType = unknown> {
62
62
  * @request GET:/agent-settlements/{id}/adjustments
63
63
  * @secure
64
64
  */
65
- getSettlementAdjustments: ({ id, ...query }: GetSettlementAdjustmentsParams, params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
65
+ getSettlementAdjustments: ({ id, ...query }: GetSettlementAdjustmentsParams, params?: RequestParams) => Promise<import("axios").AxiosResponse<GetSettlementAdjustmentsData, any, {}>>;
66
66
  /**
67
67
  * No description
68
68
  *
@@ -72,7 +72,7 @@ export declare class AgentSettlements<SecurityDataType = unknown> {
72
72
  * @request POST:/agent-settlements/{id}/adjustments
73
73
  * @secure
74
74
  */
75
- addSettlementAdjustment: ({ id, ...query }: AddSettlementAdjustmentParams, data: AddAdjustmentDto, params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
75
+ addSettlementAdjustment: ({ id, ...query }: AddSettlementAdjustmentParams, data: AddAdjustmentDto, params?: RequestParams) => Promise<import("axios").AxiosResponse<AddSettlementAdjustmentData, any, {}>>;
76
76
  /**
77
77
  * No description
78
78
  *
@@ -82,6 +82,6 @@ export declare class AgentSettlements<SecurityDataType = unknown> {
82
82
  * @request POST:/agent-settlements/adjustments/{adjustmentId}/approve
83
83
  * @secure
84
84
  */
85
- approveAdjustment: ({ adjustmentId, ...query }: ApproveAdjustmentParams, params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
85
+ approveAdjustment: ({ adjustmentId, ...query }: ApproveAdjustmentParams, params?: RequestParams) => Promise<import("axios").AxiosResponse<ApproveAdjustmentData, any, {}>>;
86
86
  }
87
87
  //# sourceMappingURL=AgentSettlements.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AgentSettlements.d.ts","sourceRoot":"","sources":["../AgentSettlements.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,gBAAgB,EAEhB,6BAA6B,EAE7B,uBAAuB,EAEvB,mBAAmB,EAEnB,8BAA8B,EAE9B,mBAAmB,EAEnB,qBAAqB,EAErB,0BAA0B,EAC1B,6BAA6B,EAE7B,yBAAyB,EACzB,4BAA4B,EAC7B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAe,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEvE,qBAAa,gBAAgB,CAAC,gBAAgB,GAAG,OAAO;IACtD,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC;gBAEvB,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC;IAI9C;;;;;;;;OAQG;IACH,eAAe,GACb,OAAO,qBAAqB,EAC5B,SAAQ,aAAkB,0DAQvB;IACL;;;;;;;;OAQG;IACH,gBAAgB,GAAI,MAAM,mBAAmB,EAAE,SAAQ,aAAkB,0DAQpE;IACL;;;;;;;;OA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