tuix-mcp-host-client 0.0.1

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.
Files changed (102) hide show
  1. package/.openapi-generator/FILES +47 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +48 -0
  5. package/apis/ClientApi.js +771 -0
  6. package/apis/ClientApi.js.map +1 -0
  7. package/apis/ClientApi.ts +1142 -0
  8. package/apis/index.js +20 -0
  9. package/apis/index.js.map +1 -0
  10. package/apis/index.ts +3 -0
  11. package/docs/APIKeyDTO.md +40 -0
  12. package/docs/AccountDTO.md +34 -0
  13. package/docs/ApplicationDTO.md +44 -0
  14. package/docs/ApplicationMCPServerDTO.md +36 -0
  15. package/docs/ApplicationWithApplicationCountDTO.md +46 -0
  16. package/docs/ClientApi.md +1397 -0
  17. package/docs/CreateAPIKeyRequestDTO.md +34 -0
  18. package/docs/CreateAPIKeyResponseDTO.md +42 -0
  19. package/docs/CreateAccountDTO.md +36 -0
  20. package/docs/CreateApplicationDTO.md +38 -0
  21. package/docs/CreateMCPServerDTO.md +36 -0
  22. package/docs/ErrorDTO.md +34 -0
  23. package/docs/GetAPIKeysResponseDTO.md +42 -0
  24. package/docs/InternalStreamChatRequest.md +36 -0
  25. package/docs/InternalStreamCreateSessionRequest.md +34 -0
  26. package/docs/InternalStreamCreateSessionResponse.md +38 -0
  27. package/docs/MCPServerDTO.md +38 -0
  28. package/docs/PaginatedApplicationsDTO.md +42 -0
  29. package/docs/PaginatedMCPServerDTO.md +42 -0
  30. package/docs/UpdateApplicationDTO.md +38 -0
  31. package/docs/UpdateMCPServerDTO.md +36 -0
  32. package/index.js +22 -0
  33. package/index.js.map +1 -0
  34. package/index.ts +5 -0
  35. package/models/APIKeyDTO.js +55 -0
  36. package/models/APIKeyDTO.js.map +1 -0
  37. package/models/APIKeyDTO.ts +89 -0
  38. package/models/AccountDTO.js +49 -0
  39. package/models/AccountDTO.js.map +1 -0
  40. package/models/AccountDTO.ts +65 -0
  41. package/models/ApplicationDTO.js +59 -0
  42. package/models/ApplicationDTO.js.map +1 -0
  43. package/models/ApplicationDTO.ts +105 -0
  44. package/models/ApplicationMCPServerDTO.js +51 -0
  45. package/models/ApplicationMCPServerDTO.js.map +1 -0
  46. package/models/ApplicationMCPServerDTO.ts +73 -0
  47. package/models/ApplicationWithApplicationCountDTO.js +61 -0
  48. package/models/ApplicationWithApplicationCountDTO.js.map +1 -0
  49. package/models/ApplicationWithApplicationCountDTO.ts +113 -0
  50. package/models/CreateAPIKeyRequestDTO.js +51 -0
  51. package/models/CreateAPIKeyRequestDTO.js.map +1 -0
  52. package/models/CreateAPIKeyRequestDTO.ts +66 -0
  53. package/models/CreateAPIKeyResponseDTO.js +57 -0
  54. package/models/CreateAPIKeyResponseDTO.js.map +1 -0
  55. package/models/CreateAPIKeyResponseDTO.ts +97 -0
  56. package/models/CreateAccountDTO.js +55 -0
  57. package/models/CreateAccountDTO.js.map +1 -0
  58. package/models/CreateAccountDTO.ts +75 -0
  59. package/models/CreateApplicationDTO.js +59 -0
  60. package/models/CreateApplicationDTO.js.map +1 -0
  61. package/models/CreateApplicationDTO.ts +84 -0
  62. package/models/CreateMCPServerDTO.js +51 -0
  63. package/models/CreateMCPServerDTO.js.map +1 -0
  64. package/models/CreateMCPServerDTO.ts +73 -0
  65. package/models/ErrorDTO.js +49 -0
  66. package/models/ErrorDTO.js.map +1 -0
  67. package/models/ErrorDTO.ts +65 -0
  68. package/models/GetAPIKeysResponseDTO.js +58 -0
  69. package/models/GetAPIKeysResponseDTO.js.map +1 -0
  70. package/models/GetAPIKeysResponseDTO.ts +105 -0
  71. package/models/InternalStreamChatRequest.js +51 -0
  72. package/models/InternalStreamChatRequest.js.map +1 -0
  73. package/models/InternalStreamChatRequest.ts +73 -0
  74. package/models/InternalStreamCreateSessionRequest.js +49 -0
  75. package/models/InternalStreamCreateSessionRequest.js.map +1 -0
  76. package/models/InternalStreamCreateSessionRequest.ts +65 -0
  77. package/models/InternalStreamCreateSessionResponse.js +53 -0
  78. package/models/InternalStreamCreateSessionResponse.js.map +1 -0
  79. package/models/InternalStreamCreateSessionResponse.ts +81 -0
  80. package/models/MCPServerDTO.js +53 -0
  81. package/models/MCPServerDTO.js.map +1 -0
  82. package/models/MCPServerDTO.ts +81 -0
  83. package/models/PaginatedApplicationsDTO.js +68 -0
  84. package/models/PaginatedApplicationsDTO.js.map +1 -0
  85. package/models/PaginatedApplicationsDTO.ts +110 -0
  86. package/models/PaginatedMCPServerDTO.js +58 -0
  87. package/models/PaginatedMCPServerDTO.js.map +1 -0
  88. package/models/PaginatedMCPServerDTO.ts +105 -0
  89. package/models/UpdateApplicationDTO.js +53 -0
  90. package/models/UpdateApplicationDTO.js.map +1 -0
  91. package/models/UpdateApplicationDTO.ts +81 -0
  92. package/models/UpdateMCPServerDTO.js +51 -0
  93. package/models/UpdateMCPServerDTO.js.map +1 -0
  94. package/models/UpdateMCPServerDTO.ts +73 -0
  95. package/models/index.js +39 -0
  96. package/models/index.js.map +1 -0
  97. package/models/index.ts +22 -0
  98. package/package.json +17 -0
  99. package/runtime.js +330 -0
  100. package/runtime.js.map +1 -0
  101. package/runtime.ts +432 -0
  102. package/tsconfig.build.tsbuildinfo +1 -0
@@ -0,0 +1,1142 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Tuix MCP Host API
5
+ * Service managing MCP servers for Tuix applications.
6
+ *
7
+ * The version of the OpenAPI document: 0.0.1
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ AccountDTO,
19
+ ApplicationDTO,
20
+ ApplicationMCPServerDTO,
21
+ CreateAPIKeyRequestDTO,
22
+ CreateAPIKeyResponseDTO,
23
+ CreateAccountDTO,
24
+ CreateApplicationDTO,
25
+ CreateMCPServerDTO,
26
+ ErrorDTO,
27
+ GetAPIKeysResponseDTO,
28
+ InternalStreamChatRequest,
29
+ InternalStreamCreateSessionRequest,
30
+ InternalStreamCreateSessionResponse,
31
+ MCPServerDTO,
32
+ PaginatedApplicationsDTO,
33
+ PaginatedMCPServerDTO,
34
+ UpdateApplicationDTO,
35
+ UpdateMCPServerDTO,
36
+ } from '../models/index';
37
+ import {
38
+ AccountDTOFromJSON,
39
+ AccountDTOToJSON,
40
+ ApplicationDTOFromJSON,
41
+ ApplicationDTOToJSON,
42
+ ApplicationMCPServerDTOFromJSON,
43
+ ApplicationMCPServerDTOToJSON,
44
+ CreateAPIKeyRequestDTOFromJSON,
45
+ CreateAPIKeyRequestDTOToJSON,
46
+ CreateAPIKeyResponseDTOFromJSON,
47
+ CreateAPIKeyResponseDTOToJSON,
48
+ CreateAccountDTOFromJSON,
49
+ CreateAccountDTOToJSON,
50
+ CreateApplicationDTOFromJSON,
51
+ CreateApplicationDTOToJSON,
52
+ CreateMCPServerDTOFromJSON,
53
+ CreateMCPServerDTOToJSON,
54
+ ErrorDTOFromJSON,
55
+ ErrorDTOToJSON,
56
+ GetAPIKeysResponseDTOFromJSON,
57
+ GetAPIKeysResponseDTOToJSON,
58
+ InternalStreamChatRequestFromJSON,
59
+ InternalStreamChatRequestToJSON,
60
+ InternalStreamCreateSessionRequestFromJSON,
61
+ InternalStreamCreateSessionRequestToJSON,
62
+ InternalStreamCreateSessionResponseFromJSON,
63
+ InternalStreamCreateSessionResponseToJSON,
64
+ MCPServerDTOFromJSON,
65
+ MCPServerDTOToJSON,
66
+ PaginatedApplicationsDTOFromJSON,
67
+ PaginatedApplicationsDTOToJSON,
68
+ PaginatedMCPServerDTOFromJSON,
69
+ PaginatedMCPServerDTOToJSON,
70
+ UpdateApplicationDTOFromJSON,
71
+ UpdateApplicationDTOToJSON,
72
+ UpdateMCPServerDTOFromJSON,
73
+ UpdateMCPServerDTOToJSON,
74
+ } from '../models/index';
75
+
76
+ export interface ApiKeysGetRequest {
77
+ page?: number;
78
+ pageSize?: number;
79
+ }
80
+
81
+ export interface ApiKeysIdDeleteRequest {
82
+ id: string;
83
+ }
84
+
85
+ export interface ApiKeysPostRequest {
86
+ createAPIKeyRequestDTO: CreateAPIKeyRequestDTO;
87
+ }
88
+
89
+ export interface AttachMCPServerRequest {
90
+ applicationId: string;
91
+ applicationMCPServerDTO: ApplicationMCPServerDTO;
92
+ }
93
+
94
+ export interface ChatStreamRequest {
95
+ applicationId: string;
96
+ internalStreamChatRequest: InternalStreamChatRequest;
97
+ }
98
+
99
+ export interface CreateAccountRequest {
100
+ createAccountDTO: CreateAccountDTO;
101
+ }
102
+
103
+ export interface CreateApplicationRequest {
104
+ createApplicationDTO: CreateApplicationDTO;
105
+ }
106
+
107
+ export interface CreateMCPServerRequest {
108
+ createMCPServerDTO: CreateMCPServerDTO;
109
+ }
110
+
111
+ export interface CreateSessionRequest {
112
+ applicationId: string;
113
+ internalStreamCreateSessionRequest: InternalStreamCreateSessionRequest;
114
+ }
115
+
116
+ export interface DeleteApplicationRequest {
117
+ applicationId: string;
118
+ }
119
+
120
+ export interface DeleteMCPServerRequest {
121
+ mcpServerId: string;
122
+ }
123
+
124
+ export interface DeleteSessionRequest {
125
+ applicationId: string;
126
+ sessionId: string;
127
+ }
128
+
129
+ export interface DetachMCPServerRequest {
130
+ applicationId: string;
131
+ mcpServerId: string;
132
+ }
133
+
134
+ export interface GetApplicationByIDRequest {
135
+ applicationId: string;
136
+ }
137
+
138
+ export interface GetApplicationMCPServersRequest {
139
+ applicationId: string;
140
+ page?: number;
141
+ pageSize?: number;
142
+ }
143
+
144
+ export interface GetApplicationsRequest {
145
+ page?: number;
146
+ pageSize?: number;
147
+ }
148
+
149
+ export interface GetMCPServersRequest {
150
+ page?: number;
151
+ pageSize?: number;
152
+ }
153
+
154
+ export interface UpdateApplicationRequest {
155
+ applicationId: string;
156
+ updateApplicationDTO: UpdateApplicationDTO;
157
+ }
158
+
159
+ export interface UpdateMCPServerRequest {
160
+ mcpServerId: string;
161
+ updateMCPServerDTO: UpdateMCPServerDTO;
162
+ }
163
+
164
+ /**
165
+ *
166
+ */
167
+ export class ClientApi extends runtime.BaseAPI {
168
+
169
+ /**
170
+ * Creates request options for apiKeysGet without sending the request
171
+ */
172
+ async apiKeysGetRequestOpts(requestParameters: ApiKeysGetRequest): Promise<runtime.RequestOpts> {
173
+ const queryParameters: any = {};
174
+
175
+ if (requestParameters['page'] != null) {
176
+ queryParameters['page'] = requestParameters['page'];
177
+ }
178
+
179
+ if (requestParameters['pageSize'] != null) {
180
+ queryParameters['page_size'] = requestParameters['pageSize'];
181
+ }
182
+
183
+ const headerParameters: runtime.HTTPHeaders = {};
184
+
185
+
186
+ let urlPath = `/api-keys`;
187
+
188
+ return {
189
+ path: urlPath,
190
+ method: 'GET',
191
+ headers: headerParameters,
192
+ query: queryParameters,
193
+ };
194
+ }
195
+
196
+ /**
197
+ * Retrieve all API keys associated with the authenticated user\'s account with pagination.
198
+ * Get all API keys for the authenticated user
199
+ */
200
+ async apiKeysGetRaw(requestParameters: ApiKeysGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetAPIKeysResponseDTO>> {
201
+ const requestOptions = await this.apiKeysGetRequestOpts(requestParameters);
202
+ const response = await this.request(requestOptions, initOverrides);
203
+
204
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetAPIKeysResponseDTOFromJSON(jsonValue));
205
+ }
206
+
207
+ /**
208
+ * Retrieve all API keys associated with the authenticated user\'s account with pagination.
209
+ * Get all API keys for the authenticated user
210
+ */
211
+ async apiKeysGet(requestParameters: ApiKeysGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAPIKeysResponseDTO> {
212
+ const response = await this.apiKeysGetRaw(requestParameters, initOverrides);
213
+ return await response.value();
214
+ }
215
+
216
+ /**
217
+ * Creates request options for apiKeysIdDelete without sending the request
218
+ */
219
+ async apiKeysIdDeleteRequestOpts(requestParameters: ApiKeysIdDeleteRequest): Promise<runtime.RequestOpts> {
220
+ if (requestParameters['id'] == null) {
221
+ throw new runtime.RequiredError(
222
+ 'id',
223
+ 'Required parameter "id" was null or undefined when calling apiKeysIdDelete().'
224
+ );
225
+ }
226
+
227
+ const queryParameters: any = {};
228
+
229
+ const headerParameters: runtime.HTTPHeaders = {};
230
+
231
+
232
+ let urlPath = `/api-keys/{id}`;
233
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
234
+
235
+ return {
236
+ path: urlPath,
237
+ method: 'DELETE',
238
+ headers: headerParameters,
239
+ query: queryParameters,
240
+ };
241
+ }
242
+
243
+ /**
244
+ * Delete a specific API key belonging to the authenticated user.
245
+ * Delete an API key
246
+ */
247
+ async apiKeysIdDeleteRaw(requestParameters: ApiKeysIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
248
+ const requestOptions = await this.apiKeysIdDeleteRequestOpts(requestParameters);
249
+ const response = await this.request(requestOptions, initOverrides);
250
+
251
+ return new runtime.VoidApiResponse(response);
252
+ }
253
+
254
+ /**
255
+ * Delete a specific API key belonging to the authenticated user.
256
+ * Delete an API key
257
+ */
258
+ async apiKeysIdDelete(requestParameters: ApiKeysIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
259
+ await this.apiKeysIdDeleteRaw(requestParameters, initOverrides);
260
+ }
261
+
262
+ /**
263
+ * Creates request options for apiKeysPost without sending the request
264
+ */
265
+ async apiKeysPostRequestOpts(requestParameters: ApiKeysPostRequest): Promise<runtime.RequestOpts> {
266
+ if (requestParameters['createAPIKeyRequestDTO'] == null) {
267
+ throw new runtime.RequiredError(
268
+ 'createAPIKeyRequestDTO',
269
+ 'Required parameter "createAPIKeyRequestDTO" was null or undefined when calling apiKeysPost().'
270
+ );
271
+ }
272
+
273
+ const queryParameters: any = {};
274
+
275
+ const headerParameters: runtime.HTTPHeaders = {};
276
+
277
+ headerParameters['Content-Type'] = 'application/json';
278
+
279
+
280
+ let urlPath = `/api-keys`;
281
+
282
+ return {
283
+ path: urlPath,
284
+ method: 'POST',
285
+ headers: headerParameters,
286
+ query: queryParameters,
287
+ body: CreateAPIKeyRequestDTOToJSON(requestParameters['createAPIKeyRequestDTO']),
288
+ };
289
+ }
290
+
291
+ /**
292
+ * Create a new API key for accessing the RAG service.
293
+ * Create a new API key
294
+ */
295
+ async apiKeysPostRaw(requestParameters: ApiKeysPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateAPIKeyResponseDTO>> {
296
+ const requestOptions = await this.apiKeysPostRequestOpts(requestParameters);
297
+ const response = await this.request(requestOptions, initOverrides);
298
+
299
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateAPIKeyResponseDTOFromJSON(jsonValue));
300
+ }
301
+
302
+ /**
303
+ * Create a new API key for accessing the RAG service.
304
+ * Create a new API key
305
+ */
306
+ async apiKeysPost(requestParameters: ApiKeysPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateAPIKeyResponseDTO> {
307
+ const response = await this.apiKeysPostRaw(requestParameters, initOverrides);
308
+ return await response.value();
309
+ }
310
+
311
+ /**
312
+ * Creates request options for attachMCPServer without sending the request
313
+ */
314
+ async attachMCPServerRequestOpts(requestParameters: AttachMCPServerRequest): Promise<runtime.RequestOpts> {
315
+ if (requestParameters['applicationId'] == null) {
316
+ throw new runtime.RequiredError(
317
+ 'applicationId',
318
+ 'Required parameter "applicationId" was null or undefined when calling attachMCPServer().'
319
+ );
320
+ }
321
+
322
+ if (requestParameters['applicationMCPServerDTO'] == null) {
323
+ throw new runtime.RequiredError(
324
+ 'applicationMCPServerDTO',
325
+ 'Required parameter "applicationMCPServerDTO" was null or undefined when calling attachMCPServer().'
326
+ );
327
+ }
328
+
329
+ const queryParameters: any = {};
330
+
331
+ const headerParameters: runtime.HTTPHeaders = {};
332
+
333
+ headerParameters['Content-Type'] = 'application/json';
334
+
335
+
336
+ let urlPath = `/applications/{applicationId}/mcp-servers`;
337
+ urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
338
+
339
+ return {
340
+ path: urlPath,
341
+ method: 'POST',
342
+ headers: headerParameters,
343
+ query: queryParameters,
344
+ body: ApplicationMCPServerDTOToJSON(requestParameters['applicationMCPServerDTO']),
345
+ };
346
+ }
347
+
348
+ /**
349
+ * Attach an existing MCP server to the specified application within the authenticated account
350
+ * Attach MCP server to application
351
+ */
352
+ async attachMCPServerRaw(requestParameters: AttachMCPServerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
353
+ const requestOptions = await this.attachMCPServerRequestOpts(requestParameters);
354
+ const response = await this.request(requestOptions, initOverrides);
355
+
356
+ return new runtime.VoidApiResponse(response);
357
+ }
358
+
359
+ /**
360
+ * Attach an existing MCP server to the specified application within the authenticated account
361
+ * Attach MCP server to application
362
+ */
363
+ async attachMCPServer(requestParameters: AttachMCPServerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
364
+ await this.attachMCPServerRaw(requestParameters, initOverrides);
365
+ }
366
+
367
+ /**
368
+ * Creates request options for chatStream without sending the request
369
+ */
370
+ async chatStreamRequestOpts(requestParameters: ChatStreamRequest): Promise<runtime.RequestOpts> {
371
+ if (requestParameters['applicationId'] == null) {
372
+ throw new runtime.RequiredError(
373
+ 'applicationId',
374
+ 'Required parameter "applicationId" was null or undefined when calling chatStream().'
375
+ );
376
+ }
377
+
378
+ if (requestParameters['internalStreamChatRequest'] == null) {
379
+ throw new runtime.RequiredError(
380
+ 'internalStreamChatRequest',
381
+ 'Required parameter "internalStreamChatRequest" was null or undefined when calling chatStream().'
382
+ );
383
+ }
384
+
385
+ const queryParameters: any = {};
386
+
387
+ const headerParameters: runtime.HTTPHeaders = {};
388
+
389
+ headerParameters['Content-Type'] = 'application/json';
390
+
391
+
392
+ let urlPath = `/applications/{applicationId}/stream/session/chat`;
393
+ urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
394
+
395
+ return {
396
+ path: urlPath,
397
+ method: 'POST',
398
+ headers: headerParameters,
399
+ query: queryParameters,
400
+ body: InternalStreamChatRequestToJSON(requestParameters['internalStreamChatRequest']),
401
+ };
402
+ }
403
+
404
+ /**
405
+ * chat with streaming response
406
+ * chat with streaming response
407
+ */
408
+ async chatStreamRaw(requestParameters: ChatStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
409
+ const requestOptions = await this.chatStreamRequestOpts(requestParameters);
410
+ const response = await this.request(requestOptions, initOverrides);
411
+
412
+ if (this.isJsonMime(response.headers.get('content-type'))) {
413
+ return new runtime.JSONApiResponse<string>(response);
414
+ } else {
415
+ return new runtime.TextApiResponse(response) as any;
416
+ }
417
+ }
418
+
419
+ /**
420
+ * chat with streaming response
421
+ * chat with streaming response
422
+ */
423
+ async chatStream(requestParameters: ChatStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string> {
424
+ const response = await this.chatStreamRaw(requestParameters, initOverrides);
425
+ return await response.value();
426
+ }
427
+
428
+ /**
429
+ * Creates request options for createAccount without sending the request
430
+ */
431
+ async createAccountRequestOpts(requestParameters: CreateAccountRequest): Promise<runtime.RequestOpts> {
432
+ if (requestParameters['createAccountDTO'] == null) {
433
+ throw new runtime.RequiredError(
434
+ 'createAccountDTO',
435
+ 'Required parameter "createAccountDTO" was null or undefined when calling createAccount().'
436
+ );
437
+ }
438
+
439
+ const queryParameters: any = {};
440
+
441
+ const headerParameters: runtime.HTTPHeaders = {};
442
+
443
+ headerParameters['Content-Type'] = 'application/json';
444
+
445
+
446
+ let urlPath = `/accounts`;
447
+
448
+ return {
449
+ path: urlPath,
450
+ method: 'POST',
451
+ headers: headerParameters,
452
+ query: queryParameters,
453
+ body: CreateAccountDTOToJSON(requestParameters['createAccountDTO']),
454
+ };
455
+ }
456
+
457
+ /**
458
+ * Create an account
459
+ * Creates a new account
460
+ */
461
+ async createAccountRaw(requestParameters: CreateAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountDTO>> {
462
+ const requestOptions = await this.createAccountRequestOpts(requestParameters);
463
+ const response = await this.request(requestOptions, initOverrides);
464
+
465
+ return new runtime.JSONApiResponse(response, (jsonValue) => AccountDTOFromJSON(jsonValue));
466
+ }
467
+
468
+ /**
469
+ * Create an account
470
+ * Creates a new account
471
+ */
472
+ async createAccount(requestParameters: CreateAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountDTO> {
473
+ const response = await this.createAccountRaw(requestParameters, initOverrides);
474
+ return await response.value();
475
+ }
476
+
477
+ /**
478
+ * Creates request options for createApplication without sending the request
479
+ */
480
+ async createApplicationRequestOpts(requestParameters: CreateApplicationRequest): Promise<runtime.RequestOpts> {
481
+ if (requestParameters['createApplicationDTO'] == null) {
482
+ throw new runtime.RequiredError(
483
+ 'createApplicationDTO',
484
+ 'Required parameter "createApplicationDTO" was null or undefined when calling createApplication().'
485
+ );
486
+ }
487
+
488
+ const queryParameters: any = {};
489
+
490
+ const headerParameters: runtime.HTTPHeaders = {};
491
+
492
+ headerParameters['Content-Type'] = 'application/json';
493
+
494
+
495
+ let urlPath = `/applications`;
496
+
497
+ return {
498
+ path: urlPath,
499
+ method: 'POST',
500
+ headers: headerParameters,
501
+ query: queryParameters,
502
+ body: CreateApplicationDTOToJSON(requestParameters['createApplicationDTO']),
503
+ };
504
+ }
505
+
506
+ /**
507
+ * Create a new application for the authenticated account
508
+ * Create a new application
509
+ */
510
+ async createApplicationRaw(requestParameters: CreateApplicationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplicationDTO>> {
511
+ const requestOptions = await this.createApplicationRequestOpts(requestParameters);
512
+ const response = await this.request(requestOptions, initOverrides);
513
+
514
+ return new runtime.JSONApiResponse(response, (jsonValue) => ApplicationDTOFromJSON(jsonValue));
515
+ }
516
+
517
+ /**
518
+ * Create a new application for the authenticated account
519
+ * Create a new application
520
+ */
521
+ async createApplication(requestParameters: CreateApplicationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplicationDTO> {
522
+ const response = await this.createApplicationRaw(requestParameters, initOverrides);
523
+ return await response.value();
524
+ }
525
+
526
+ /**
527
+ * Creates request options for createMCPServer without sending the request
528
+ */
529
+ async createMCPServerRequestOpts(requestParameters: CreateMCPServerRequest): Promise<runtime.RequestOpts> {
530
+ if (requestParameters['createMCPServerDTO'] == null) {
531
+ throw new runtime.RequiredError(
532
+ 'createMCPServerDTO',
533
+ 'Required parameter "createMCPServerDTO" was null or undefined when calling createMCPServer().'
534
+ );
535
+ }
536
+
537
+ const queryParameters: any = {};
538
+
539
+ const headerParameters: runtime.HTTPHeaders = {};
540
+
541
+ headerParameters['Content-Type'] = 'application/json';
542
+
543
+
544
+ let urlPath = `/mcp-servers`;
545
+
546
+ return {
547
+ path: urlPath,
548
+ method: 'POST',
549
+ headers: headerParameters,
550
+ query: queryParameters,
551
+ body: CreateMCPServerDTOToJSON(requestParameters['createMCPServerDTO']),
552
+ };
553
+ }
554
+
555
+ /**
556
+ * Create a new MCP server for the authenticated account
557
+ * Create a new MCP server
558
+ */
559
+ async createMCPServerRaw(requestParameters: CreateMCPServerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MCPServerDTO>> {
560
+ const requestOptions = await this.createMCPServerRequestOpts(requestParameters);
561
+ const response = await this.request(requestOptions, initOverrides);
562
+
563
+ return new runtime.JSONApiResponse(response, (jsonValue) => MCPServerDTOFromJSON(jsonValue));
564
+ }
565
+
566
+ /**
567
+ * Create a new MCP server for the authenticated account
568
+ * Create a new MCP server
569
+ */
570
+ async createMCPServer(requestParameters: CreateMCPServerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MCPServerDTO> {
571
+ const response = await this.createMCPServerRaw(requestParameters, initOverrides);
572
+ return await response.value();
573
+ }
574
+
575
+ /**
576
+ * Creates request options for createSession without sending the request
577
+ */
578
+ async createSessionRequestOpts(requestParameters: CreateSessionRequest): Promise<runtime.RequestOpts> {
579
+ if (requestParameters['applicationId'] == null) {
580
+ throw new runtime.RequiredError(
581
+ 'applicationId',
582
+ 'Required parameter "applicationId" was null or undefined when calling createSession().'
583
+ );
584
+ }
585
+
586
+ if (requestParameters['internalStreamCreateSessionRequest'] == null) {
587
+ throw new runtime.RequiredError(
588
+ 'internalStreamCreateSessionRequest',
589
+ 'Required parameter "internalStreamCreateSessionRequest" was null or undefined when calling createSession().'
590
+ );
591
+ }
592
+
593
+ const queryParameters: any = {};
594
+
595
+ const headerParameters: runtime.HTTPHeaders = {};
596
+
597
+ headerParameters['Content-Type'] = 'application/json';
598
+
599
+
600
+ let urlPath = `/applications/{applicationId}/stream/session`;
601
+ urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
602
+
603
+ return {
604
+ path: urlPath,
605
+ method: 'POST',
606
+ headers: headerParameters,
607
+ query: queryParameters,
608
+ body: InternalStreamCreateSessionRequestToJSON(requestParameters['internalStreamCreateSessionRequest']),
609
+ };
610
+ }
611
+
612
+ /**
613
+ * create a new streaming session
614
+ * create a new streaming session
615
+ */
616
+ async createSessionRaw(requestParameters: CreateSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InternalStreamCreateSessionResponse>> {
617
+ const requestOptions = await this.createSessionRequestOpts(requestParameters);
618
+ const response = await this.request(requestOptions, initOverrides);
619
+
620
+ return new runtime.JSONApiResponse(response, (jsonValue) => InternalStreamCreateSessionResponseFromJSON(jsonValue));
621
+ }
622
+
623
+ /**
624
+ * create a new streaming session
625
+ * create a new streaming session
626
+ */
627
+ async createSession(requestParameters: CreateSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InternalStreamCreateSessionResponse> {
628
+ const response = await this.createSessionRaw(requestParameters, initOverrides);
629
+ return await response.value();
630
+ }
631
+
632
+ /**
633
+ * Creates request options for deleteApplication without sending the request
634
+ */
635
+ async deleteApplicationRequestOpts(requestParameters: DeleteApplicationRequest): Promise<runtime.RequestOpts> {
636
+ if (requestParameters['applicationId'] == null) {
637
+ throw new runtime.RequiredError(
638
+ 'applicationId',
639
+ 'Required parameter "applicationId" was null or undefined when calling deleteApplication().'
640
+ );
641
+ }
642
+
643
+ const queryParameters: any = {};
644
+
645
+ const headerParameters: runtime.HTTPHeaders = {};
646
+
647
+
648
+ let urlPath = `/applications/{applicationId}`;
649
+ urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
650
+
651
+ return {
652
+ path: urlPath,
653
+ method: 'DELETE',
654
+ headers: headerParameters,
655
+ query: queryParameters,
656
+ };
657
+ }
658
+
659
+ /**
660
+ * Delete an application belonging to the authenticated account
661
+ * Delete an application
662
+ */
663
+ async deleteApplicationRaw(requestParameters: DeleteApplicationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
664
+ const requestOptions = await this.deleteApplicationRequestOpts(requestParameters);
665
+ const response = await this.request(requestOptions, initOverrides);
666
+
667
+ return new runtime.VoidApiResponse(response);
668
+ }
669
+
670
+ /**
671
+ * Delete an application belonging to the authenticated account
672
+ * Delete an application
673
+ */
674
+ async deleteApplication(requestParameters: DeleteApplicationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
675
+ await this.deleteApplicationRaw(requestParameters, initOverrides);
676
+ }
677
+
678
+ /**
679
+ * Creates request options for deleteMCPServer without sending the request
680
+ */
681
+ async deleteMCPServerRequestOpts(requestParameters: DeleteMCPServerRequest): Promise<runtime.RequestOpts> {
682
+ if (requestParameters['mcpServerId'] == null) {
683
+ throw new runtime.RequiredError(
684
+ 'mcpServerId',
685
+ 'Required parameter "mcpServerId" was null or undefined when calling deleteMCPServer().'
686
+ );
687
+ }
688
+
689
+ const queryParameters: any = {};
690
+
691
+ const headerParameters: runtime.HTTPHeaders = {};
692
+
693
+
694
+ let urlPath = `/mcp-servers/{mcpServerId}`;
695
+ urlPath = urlPath.replace(`{${"mcpServerId"}}`, encodeURIComponent(String(requestParameters['mcpServerId'])));
696
+
697
+ return {
698
+ path: urlPath,
699
+ method: 'DELETE',
700
+ headers: headerParameters,
701
+ query: queryParameters,
702
+ };
703
+ }
704
+
705
+ /**
706
+ * Delete an MCP server from the authenticated account
707
+ * Delete an MCP server
708
+ */
709
+ async deleteMCPServerRaw(requestParameters: DeleteMCPServerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
710
+ const requestOptions = await this.deleteMCPServerRequestOpts(requestParameters);
711
+ const response = await this.request(requestOptions, initOverrides);
712
+
713
+ return new runtime.VoidApiResponse(response);
714
+ }
715
+
716
+ /**
717
+ * Delete an MCP server from the authenticated account
718
+ * Delete an MCP server
719
+ */
720
+ async deleteMCPServer(requestParameters: DeleteMCPServerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
721
+ await this.deleteMCPServerRaw(requestParameters, initOverrides);
722
+ }
723
+
724
+ /**
725
+ * Creates request options for deleteSession without sending the request
726
+ */
727
+ async deleteSessionRequestOpts(requestParameters: DeleteSessionRequest): Promise<runtime.RequestOpts> {
728
+ if (requestParameters['applicationId'] == null) {
729
+ throw new runtime.RequiredError(
730
+ 'applicationId',
731
+ 'Required parameter "applicationId" was null or undefined when calling deleteSession().'
732
+ );
733
+ }
734
+
735
+ if (requestParameters['sessionId'] == null) {
736
+ throw new runtime.RequiredError(
737
+ 'sessionId',
738
+ 'Required parameter "sessionId" was null or undefined when calling deleteSession().'
739
+ );
740
+ }
741
+
742
+ const queryParameters: any = {};
743
+
744
+ const headerParameters: runtime.HTTPHeaders = {};
745
+
746
+
747
+ let urlPath = `/applications/{applicationId}/stream/session/{sessionId}`;
748
+ urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
749
+ urlPath = urlPath.replace(`{${"sessionId"}}`, encodeURIComponent(String(requestParameters['sessionId'])));
750
+
751
+ return {
752
+ path: urlPath,
753
+ method: 'DELETE',
754
+ headers: headerParameters,
755
+ query: queryParameters,
756
+ };
757
+ }
758
+
759
+ /**
760
+ * delete an existing streaming session
761
+ * delete an existing streaming session
762
+ */
763
+ async deleteSessionRaw(requestParameters: DeleteSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
764
+ const requestOptions = await this.deleteSessionRequestOpts(requestParameters);
765
+ const response = await this.request(requestOptions, initOverrides);
766
+
767
+ return new runtime.VoidApiResponse(response);
768
+ }
769
+
770
+ /**
771
+ * delete an existing streaming session
772
+ * delete an existing streaming session
773
+ */
774
+ async deleteSession(requestParameters: DeleteSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
775
+ await this.deleteSessionRaw(requestParameters, initOverrides);
776
+ }
777
+
778
+ /**
779
+ * Creates request options for detachMCPServer without sending the request
780
+ */
781
+ async detachMCPServerRequestOpts(requestParameters: DetachMCPServerRequest): Promise<runtime.RequestOpts> {
782
+ if (requestParameters['applicationId'] == null) {
783
+ throw new runtime.RequiredError(
784
+ 'applicationId',
785
+ 'Required parameter "applicationId" was null or undefined when calling detachMCPServer().'
786
+ );
787
+ }
788
+
789
+ if (requestParameters['mcpServerId'] == null) {
790
+ throw new runtime.RequiredError(
791
+ 'mcpServerId',
792
+ 'Required parameter "mcpServerId" was null or undefined when calling detachMCPServer().'
793
+ );
794
+ }
795
+
796
+ const queryParameters: any = {};
797
+
798
+ const headerParameters: runtime.HTTPHeaders = {};
799
+
800
+
801
+ let urlPath = `/applications/{applicationId}/mcp-servers/{mcpServerId}`;
802
+ urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
803
+ urlPath = urlPath.replace(`{${"mcpServerId"}}`, encodeURIComponent(String(requestParameters['mcpServerId'])));
804
+
805
+ return {
806
+ path: urlPath,
807
+ method: 'DELETE',
808
+ headers: headerParameters,
809
+ query: queryParameters,
810
+ };
811
+ }
812
+
813
+ /**
814
+ * Detach an existing MCP server from the specified application within the authenticated account
815
+ * Detach MCP server from application
816
+ */
817
+ async detachMCPServerRaw(requestParameters: DetachMCPServerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
818
+ const requestOptions = await this.detachMCPServerRequestOpts(requestParameters);
819
+ const response = await this.request(requestOptions, initOverrides);
820
+
821
+ return new runtime.VoidApiResponse(response);
822
+ }
823
+
824
+ /**
825
+ * Detach an existing MCP server from the specified application within the authenticated account
826
+ * Detach MCP server from application
827
+ */
828
+ async detachMCPServer(requestParameters: DetachMCPServerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
829
+ await this.detachMCPServerRaw(requestParameters, initOverrides);
830
+ }
831
+
832
+ /**
833
+ * Creates request options for getApplicationByID without sending the request
834
+ */
835
+ async getApplicationByIDRequestOpts(requestParameters: GetApplicationByIDRequest): Promise<runtime.RequestOpts> {
836
+ if (requestParameters['applicationId'] == null) {
837
+ throw new runtime.RequiredError(
838
+ 'applicationId',
839
+ 'Required parameter "applicationId" was null or undefined when calling getApplicationByID().'
840
+ );
841
+ }
842
+
843
+ const queryParameters: any = {};
844
+
845
+ const headerParameters: runtime.HTTPHeaders = {};
846
+
847
+
848
+ let urlPath = `/applications/{applicationId}`;
849
+ urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
850
+
851
+ return {
852
+ path: urlPath,
853
+ method: 'GET',
854
+ headers: headerParameters,
855
+ query: queryParameters,
856
+ };
857
+ }
858
+
859
+ /**
860
+ * Get a specific application belonging to the authenticated account
861
+ * Get an application by applicationId
862
+ */
863
+ async getApplicationByIDRaw(requestParameters: GetApplicationByIDRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplicationDTO>> {
864
+ const requestOptions = await this.getApplicationByIDRequestOpts(requestParameters);
865
+ const response = await this.request(requestOptions, initOverrides);
866
+
867
+ return new runtime.JSONApiResponse(response, (jsonValue) => ApplicationDTOFromJSON(jsonValue));
868
+ }
869
+
870
+ /**
871
+ * Get a specific application belonging to the authenticated account
872
+ * Get an application by applicationId
873
+ */
874
+ async getApplicationByID(requestParameters: GetApplicationByIDRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplicationDTO> {
875
+ const response = await this.getApplicationByIDRaw(requestParameters, initOverrides);
876
+ return await response.value();
877
+ }
878
+
879
+ /**
880
+ * Creates request options for getApplicationMCPServers without sending the request
881
+ */
882
+ async getApplicationMCPServersRequestOpts(requestParameters: GetApplicationMCPServersRequest): Promise<runtime.RequestOpts> {
883
+ if (requestParameters['applicationId'] == null) {
884
+ throw new runtime.RequiredError(
885
+ 'applicationId',
886
+ 'Required parameter "applicationId" was null or undefined when calling getApplicationMCPServers().'
887
+ );
888
+ }
889
+
890
+ const queryParameters: any = {};
891
+
892
+ if (requestParameters['page'] != null) {
893
+ queryParameters['page'] = requestParameters['page'];
894
+ }
895
+
896
+ if (requestParameters['pageSize'] != null) {
897
+ queryParameters['pageSize'] = requestParameters['pageSize'];
898
+ }
899
+
900
+ const headerParameters: runtime.HTTPHeaders = {};
901
+
902
+
903
+ let urlPath = `/applications/{applicationId}/mcp-servers`;
904
+ urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
905
+
906
+ return {
907
+ path: urlPath,
908
+ method: 'GET',
909
+ headers: headerParameters,
910
+ query: queryParameters,
911
+ };
912
+ }
913
+
914
+ /**
915
+ * Get all MCP servers attached to the specified application within the authenticated account
916
+ * List MCP servers for application
917
+ */
918
+ async getApplicationMCPServersRaw(requestParameters: GetApplicationMCPServersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ApplicationMCPServerDTO>>> {
919
+ const requestOptions = await this.getApplicationMCPServersRequestOpts(requestParameters);
920
+ const response = await this.request(requestOptions, initOverrides);
921
+
922
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ApplicationMCPServerDTOFromJSON));
923
+ }
924
+
925
+ /**
926
+ * Get all MCP servers attached to the specified application within the authenticated account
927
+ * List MCP servers for application
928
+ */
929
+ async getApplicationMCPServers(requestParameters: GetApplicationMCPServersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ApplicationMCPServerDTO>> {
930
+ const response = await this.getApplicationMCPServersRaw(requestParameters, initOverrides);
931
+ return await response.value();
932
+ }
933
+
934
+ /**
935
+ * Creates request options for getApplications without sending the request
936
+ */
937
+ async getApplicationsRequestOpts(requestParameters: GetApplicationsRequest): Promise<runtime.RequestOpts> {
938
+ const queryParameters: any = {};
939
+
940
+ if (requestParameters['page'] != null) {
941
+ queryParameters['page'] = requestParameters['page'];
942
+ }
943
+
944
+ if (requestParameters['pageSize'] != null) {
945
+ queryParameters['pageSize'] = requestParameters['pageSize'];
946
+ }
947
+
948
+ const headerParameters: runtime.HTTPHeaders = {};
949
+
950
+
951
+ let urlPath = `/applications`;
952
+
953
+ return {
954
+ path: urlPath,
955
+ method: 'GET',
956
+ headers: headerParameters,
957
+ query: queryParameters,
958
+ };
959
+ }
960
+
961
+ /**
962
+ * Get all applications belonging to the authenticated account
963
+ * Get all applications for the account
964
+ */
965
+ async getApplicationsRaw(requestParameters: GetApplicationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedApplicationsDTO>> {
966
+ const requestOptions = await this.getApplicationsRequestOpts(requestParameters);
967
+ const response = await this.request(requestOptions, initOverrides);
968
+
969
+ return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedApplicationsDTOFromJSON(jsonValue));
970
+ }
971
+
972
+ /**
973
+ * Get all applications belonging to the authenticated account
974
+ * Get all applications for the account
975
+ */
976
+ async getApplications(requestParameters: GetApplicationsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedApplicationsDTO> {
977
+ const response = await this.getApplicationsRaw(requestParameters, initOverrides);
978
+ return await response.value();
979
+ }
980
+
981
+ /**
982
+ * Creates request options for getMCPServers without sending the request
983
+ */
984
+ async getMCPServersRequestOpts(requestParameters: GetMCPServersRequest): Promise<runtime.RequestOpts> {
985
+ const queryParameters: any = {};
986
+
987
+ if (requestParameters['page'] != null) {
988
+ queryParameters['page'] = requestParameters['page'];
989
+ }
990
+
991
+ if (requestParameters['pageSize'] != null) {
992
+ queryParameters['pageSize'] = requestParameters['pageSize'];
993
+ }
994
+
995
+ const headerParameters: runtime.HTTPHeaders = {};
996
+
997
+
998
+ let urlPath = `/mcp-servers`;
999
+
1000
+ return {
1001
+ path: urlPath,
1002
+ method: 'GET',
1003
+ headers: headerParameters,
1004
+ query: queryParameters,
1005
+ };
1006
+ }
1007
+
1008
+ /**
1009
+ * Get all MCP servers attached to any application within the authenticated account
1010
+ * List MCP servers for account
1011
+ */
1012
+ async getMCPServersRaw(requestParameters: GetMCPServersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedMCPServerDTO>> {
1013
+ const requestOptions = await this.getMCPServersRequestOpts(requestParameters);
1014
+ const response = await this.request(requestOptions, initOverrides);
1015
+
1016
+ return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedMCPServerDTOFromJSON(jsonValue));
1017
+ }
1018
+
1019
+ /**
1020
+ * Get all MCP servers attached to any application within the authenticated account
1021
+ * List MCP servers for account
1022
+ */
1023
+ async getMCPServers(requestParameters: GetMCPServersRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedMCPServerDTO> {
1024
+ const response = await this.getMCPServersRaw(requestParameters, initOverrides);
1025
+ return await response.value();
1026
+ }
1027
+
1028
+ /**
1029
+ * Creates request options for updateApplication without sending the request
1030
+ */
1031
+ async updateApplicationRequestOpts(requestParameters: UpdateApplicationRequest): Promise<runtime.RequestOpts> {
1032
+ if (requestParameters['applicationId'] == null) {
1033
+ throw new runtime.RequiredError(
1034
+ 'applicationId',
1035
+ 'Required parameter "applicationId" was null or undefined when calling updateApplication().'
1036
+ );
1037
+ }
1038
+
1039
+ if (requestParameters['updateApplicationDTO'] == null) {
1040
+ throw new runtime.RequiredError(
1041
+ 'updateApplicationDTO',
1042
+ 'Required parameter "updateApplicationDTO" was null or undefined when calling updateApplication().'
1043
+ );
1044
+ }
1045
+
1046
+ const queryParameters: any = {};
1047
+
1048
+ const headerParameters: runtime.HTTPHeaders = {};
1049
+
1050
+ headerParameters['Content-Type'] = 'application/json';
1051
+
1052
+
1053
+ let urlPath = `/applications/{applicationId}`;
1054
+ urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
1055
+
1056
+ return {
1057
+ path: urlPath,
1058
+ method: 'PATCH',
1059
+ headers: headerParameters,
1060
+ query: queryParameters,
1061
+ body: UpdateApplicationDTOToJSON(requestParameters['updateApplicationDTO']),
1062
+ };
1063
+ }
1064
+
1065
+ /**
1066
+ * Update an application belonging to the authenticated account
1067
+ * Update an application
1068
+ */
1069
+ async updateApplicationRaw(requestParameters: UpdateApplicationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplicationDTO>> {
1070
+ const requestOptions = await this.updateApplicationRequestOpts(requestParameters);
1071
+ const response = await this.request(requestOptions, initOverrides);
1072
+
1073
+ return new runtime.JSONApiResponse(response, (jsonValue) => ApplicationDTOFromJSON(jsonValue));
1074
+ }
1075
+
1076
+ /**
1077
+ * Update an application belonging to the authenticated account
1078
+ * Update an application
1079
+ */
1080
+ async updateApplication(requestParameters: UpdateApplicationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplicationDTO> {
1081
+ const response = await this.updateApplicationRaw(requestParameters, initOverrides);
1082
+ return await response.value();
1083
+ }
1084
+
1085
+ /**
1086
+ * Creates request options for updateMCPServer without sending the request
1087
+ */
1088
+ async updateMCPServerRequestOpts(requestParameters: UpdateMCPServerRequest): Promise<runtime.RequestOpts> {
1089
+ if (requestParameters['mcpServerId'] == null) {
1090
+ throw new runtime.RequiredError(
1091
+ 'mcpServerId',
1092
+ 'Required parameter "mcpServerId" was null or undefined when calling updateMCPServer().'
1093
+ );
1094
+ }
1095
+
1096
+ if (requestParameters['updateMCPServerDTO'] == null) {
1097
+ throw new runtime.RequiredError(
1098
+ 'updateMCPServerDTO',
1099
+ 'Required parameter "updateMCPServerDTO" was null or undefined when calling updateMCPServer().'
1100
+ );
1101
+ }
1102
+
1103
+ const queryParameters: any = {};
1104
+
1105
+ const headerParameters: runtime.HTTPHeaders = {};
1106
+
1107
+ headerParameters['Content-Type'] = 'application/json';
1108
+
1109
+
1110
+ let urlPath = `/mcp-servers/{mcpServerId}`;
1111
+ urlPath = urlPath.replace(`{${"mcpServerId"}}`, encodeURIComponent(String(requestParameters['mcpServerId'])));
1112
+
1113
+ return {
1114
+ path: urlPath,
1115
+ method: 'PATCH',
1116
+ headers: headerParameters,
1117
+ query: queryParameters,
1118
+ body: UpdateMCPServerDTOToJSON(requestParameters['updateMCPServerDTO']),
1119
+ };
1120
+ }
1121
+
1122
+ /**
1123
+ * Update an existing MCP server for the authenticated account
1124
+ * Update an existing MCP server
1125
+ */
1126
+ async updateMCPServerRaw(requestParameters: UpdateMCPServerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MCPServerDTO>> {
1127
+ const requestOptions = await this.updateMCPServerRequestOpts(requestParameters);
1128
+ const response = await this.request(requestOptions, initOverrides);
1129
+
1130
+ return new runtime.JSONApiResponse(response, (jsonValue) => MCPServerDTOFromJSON(jsonValue));
1131
+ }
1132
+
1133
+ /**
1134
+ * Update an existing MCP server for the authenticated account
1135
+ * Update an existing MCP server
1136
+ */
1137
+ async updateMCPServer(requestParameters: UpdateMCPServerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MCPServerDTO> {
1138
+ const response = await this.updateMCPServerRaw(requestParameters, initOverrides);
1139
+ return await response.value();
1140
+ }
1141
+
1142
+ }