@komputer-ai/sdk 0.11.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 (76) hide show
  1. package/.openapi-generator-ignore +31 -0
  2. package/README.md +147 -0
  3. package/docs/AgentListResponse.md +34 -0
  4. package/docs/AgentResponse.md +68 -0
  5. package/docs/AgentsApi.md +584 -0
  6. package/docs/ConnectorResponse.md +58 -0
  7. package/docs/ConnectorsApi.md +366 -0
  8. package/docs/CreateAgentRequest.md +58 -0
  9. package/docs/CreateConnectorRequest.md +54 -0
  10. package/docs/CreateMemoryRequest.md +40 -0
  11. package/docs/CreateScheduleAgentSpec.md +42 -0
  12. package/docs/CreateScheduleRequest.md +50 -0
  13. package/docs/CreateSecretRequest.md +38 -0
  14. package/docs/CreateSkillRequest.md +40 -0
  15. package/docs/MemoriesApi.md +368 -0
  16. package/docs/MemoryResponse.md +46 -0
  17. package/docs/OfficeListResponse.md +34 -0
  18. package/docs/OfficeMemberResponse.md +40 -0
  19. package/docs/OfficeResponse.md +54 -0
  20. package/docs/OfficesApi.md +300 -0
  21. package/docs/PatchAgentRequest.md +50 -0
  22. package/docs/PatchMemoryRequest.md +36 -0
  23. package/docs/PatchScheduleRequest.md +34 -0
  24. package/docs/PatchSkillRequest.md +36 -0
  25. package/docs/ScheduleListResponse.md +34 -0
  26. package/docs/ScheduleResponse.md +70 -0
  27. package/docs/SchedulesApi.md +369 -0
  28. package/docs/SecretListResponse.md +34 -0
  29. package/docs/SecretResponse.md +48 -0
  30. package/docs/SecretsApi.md +298 -0
  31. package/docs/SkillResponse.md +48 -0
  32. package/docs/SkillsApi.md +368 -0
  33. package/docs/TemplatesApi.md +138 -0
  34. package/docs/UpdateSecretRequest.md +36 -0
  35. package/package.json +27 -0
  36. package/src/apis/AgentsApi.ts +485 -0
  37. package/src/apis/ConnectorsApi.ts +301 -0
  38. package/src/apis/MemoriesApi.ts +315 -0
  39. package/src/apis/OfficesApi.ts +253 -0
  40. package/src/apis/SchedulesApi.ts +318 -0
  41. package/src/apis/SecretsApi.ts +267 -0
  42. package/src/apis/SkillsApi.ts +315 -0
  43. package/src/apis/TemplatesApi.ts +109 -0
  44. package/src/apis/index.ts +10 -0
  45. package/src/client.test.ts +88 -0
  46. package/src/client.ts +212 -0
  47. package/src/index.ts +7 -0
  48. package/src/models/AgentListResponse.ts +73 -0
  49. package/src/models/AgentResponse.ts +201 -0
  50. package/src/models/ConnectorResponse.ts +161 -0
  51. package/src/models/CreateAgentRequest.ts +163 -0
  52. package/src/models/CreateConnectorRequest.ts +148 -0
  53. package/src/models/CreateMemoryRequest.ts +91 -0
  54. package/src/models/CreateScheduleAgentSpec.ts +97 -0
  55. package/src/models/CreateScheduleRequest.ts +140 -0
  56. package/src/models/CreateSecretRequest.ts +83 -0
  57. package/src/models/CreateSkillRequest.ts +92 -0
  58. package/src/models/MemoryResponse.ts +113 -0
  59. package/src/models/OfficeListResponse.ts +73 -0
  60. package/src/models/OfficeMemberResponse.ts +89 -0
  61. package/src/models/OfficeResponse.ts +153 -0
  62. package/src/models/PatchAgentRequest.ts +129 -0
  63. package/src/models/PatchMemoryRequest.ts +73 -0
  64. package/src/models/PatchScheduleRequest.ts +65 -0
  65. package/src/models/PatchSkillRequest.ts +73 -0
  66. package/src/models/ScheduleListResponse.ts +73 -0
  67. package/src/models/ScheduleResponse.ts +209 -0
  68. package/src/models/SecretListResponse.ts +73 -0
  69. package/src/models/SecretResponse.ts +121 -0
  70. package/src/models/SkillResponse.ts +121 -0
  71. package/src/models/UpdateSecretRequest.ts +74 -0
  72. package/src/models/index.ts +26 -0
  73. package/src/runtime.ts +450 -0
  74. package/src/watch.ts +89 -0
  75. package/tsconfig.esm.json +7 -0
  76. package/tsconfig.json +18 -0
@@ -0,0 +1,369 @@
1
+ # SchedulesApi
2
+
3
+ All URIs are relative to *http://localhost:8080/api/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ |------------- | ------------- | -------------|
7
+ | [**createSchedule**](SchedulesApi.md#createscheduleoperation) | **POST** /schedules | Create schedule |
8
+ | [**deleteSchedule**](SchedulesApi.md#deleteschedule) | **DELETE** /schedules/{name} | Delete schedule |
9
+ | [**getSchedule**](SchedulesApi.md#getschedule) | **GET** /schedules/{name} | Get schedule details |
10
+ | [**listSchedules**](SchedulesApi.md#listschedules) | **GET** /schedules | List schedules |
11
+ | [**patchSchedule**](SchedulesApi.md#patchscheduleoperation) | **PATCH** /schedules/{name} | Patch schedule |
12
+
13
+
14
+
15
+ ## createSchedule
16
+
17
+ > ScheduleResponse createSchedule(request)
18
+
19
+ Create schedule
20
+
21
+ Creates a new KomputerSchedule CR that triggers agent tasks on a cron schedule.
22
+
23
+ ### Example
24
+
25
+ ```ts
26
+ import {
27
+ Configuration,
28
+ SchedulesApi,
29
+ } from 'komputer-ai';
30
+ import type { CreateScheduleOperationRequest } from 'komputer-ai';
31
+
32
+ async function example() {
33
+ console.log("🚀 Testing komputer-ai SDK...");
34
+ const api = new SchedulesApi();
35
+
36
+ const body = {
37
+ // CreateScheduleRequest | Schedule creation request
38
+ request: ...,
39
+ } satisfies CreateScheduleOperationRequest;
40
+
41
+ try {
42
+ const data = await api.createSchedule(body);
43
+ console.log(data);
44
+ } catch (error) {
45
+ console.error(error);
46
+ }
47
+ }
48
+
49
+ // Run the test
50
+ example().catch(console.error);
51
+ ```
52
+
53
+ ### Parameters
54
+
55
+
56
+ | Name | Type | Description | Notes |
57
+ |------------- | ------------- | ------------- | -------------|
58
+ | **request** | [CreateScheduleRequest](CreateScheduleRequest.md) | Schedule creation request | |
59
+
60
+ ### Return type
61
+
62
+ [**ScheduleResponse**](ScheduleResponse.md)
63
+
64
+ ### Authorization
65
+
66
+ No authorization required
67
+
68
+ ### HTTP request headers
69
+
70
+ - **Content-Type**: `application/json`
71
+ - **Accept**: `application/json`
72
+
73
+
74
+ ### HTTP response details
75
+ | Status code | Description | Response headers |
76
+ |-------------|-------------|------------------|
77
+ | **201** | Schedule created | - |
78
+ | **400** | Bad request | - |
79
+ | **500** | Internal error | - |
80
+
81
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
82
+
83
+
84
+ ## deleteSchedule
85
+
86
+ > { [key: string]: string; } deleteSchedule(name, namespace)
87
+
88
+ Delete schedule
89
+
90
+ Deletes the schedule CR. Does not delete any agents that were created by the schedule.
91
+
92
+ ### Example
93
+
94
+ ```ts
95
+ import {
96
+ Configuration,
97
+ SchedulesApi,
98
+ } from 'komputer-ai';
99
+ import type { DeleteScheduleRequest } from 'komputer-ai';
100
+
101
+ async function example() {
102
+ console.log("🚀 Testing komputer-ai SDK...");
103
+ const api = new SchedulesApi();
104
+
105
+ const body = {
106
+ // string | Schedule name
107
+ name: name_example,
108
+ // string | Kubernetes namespace (optional)
109
+ namespace: namespace_example,
110
+ } satisfies DeleteScheduleRequest;
111
+
112
+ try {
113
+ const data = await api.deleteSchedule(body);
114
+ console.log(data);
115
+ } catch (error) {
116
+ console.error(error);
117
+ }
118
+ }
119
+
120
+ // Run the test
121
+ example().catch(console.error);
122
+ ```
123
+
124
+ ### Parameters
125
+
126
+
127
+ | Name | Type | Description | Notes |
128
+ |------------- | ------------- | ------------- | -------------|
129
+ | **name** | `string` | Schedule name | [Defaults to `undefined`] |
130
+ | **namespace** | `string` | Kubernetes namespace | [Optional] [Defaults to `undefined`] |
131
+
132
+ ### Return type
133
+
134
+ **{ [key: string]: string; }**
135
+
136
+ ### Authorization
137
+
138
+ No authorization required
139
+
140
+ ### HTTP request headers
141
+
142
+ - **Content-Type**: Not defined
143
+ - **Accept**: `application/json`
144
+
145
+
146
+ ### HTTP response details
147
+ | Status code | Description | Response headers |
148
+ |-------------|-------------|------------------|
149
+ | **200** | Schedule deleted | - |
150
+ | **404** | Schedule not found | - |
151
+ | **500** | Internal error | - |
152
+
153
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
154
+
155
+
156
+ ## getSchedule
157
+
158
+ > ScheduleResponse getSchedule(name, namespace)
159
+
160
+ Get schedule details
161
+
162
+ Returns the current status and run history for a single schedule.
163
+
164
+ ### Example
165
+
166
+ ```ts
167
+ import {
168
+ Configuration,
169
+ SchedulesApi,
170
+ } from 'komputer-ai';
171
+ import type { GetScheduleRequest } from 'komputer-ai';
172
+
173
+ async function example() {
174
+ console.log("🚀 Testing komputer-ai SDK...");
175
+ const api = new SchedulesApi();
176
+
177
+ const body = {
178
+ // string | Schedule name
179
+ name: name_example,
180
+ // string | Kubernetes namespace (optional)
181
+ namespace: namespace_example,
182
+ } satisfies GetScheduleRequest;
183
+
184
+ try {
185
+ const data = await api.getSchedule(body);
186
+ console.log(data);
187
+ } catch (error) {
188
+ console.error(error);
189
+ }
190
+ }
191
+
192
+ // Run the test
193
+ example().catch(console.error);
194
+ ```
195
+
196
+ ### Parameters
197
+
198
+
199
+ | Name | Type | Description | Notes |
200
+ |------------- | ------------- | ------------- | -------------|
201
+ | **name** | `string` | Schedule name | [Defaults to `undefined`] |
202
+ | **namespace** | `string` | Kubernetes namespace | [Optional] [Defaults to `undefined`] |
203
+
204
+ ### Return type
205
+
206
+ [**ScheduleResponse**](ScheduleResponse.md)
207
+
208
+ ### Authorization
209
+
210
+ No authorization required
211
+
212
+ ### HTTP request headers
213
+
214
+ - **Content-Type**: Not defined
215
+ - **Accept**: `application/json`
216
+
217
+
218
+ ### HTTP response details
219
+ | Status code | Description | Response headers |
220
+ |-------------|-------------|------------------|
221
+ | **200** | Schedule details | - |
222
+ | **404** | Schedule not found | - |
223
+ | **500** | Internal error | - |
224
+
225
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
226
+
227
+
228
+ ## listSchedules
229
+
230
+ > ScheduleListResponse listSchedules(namespace)
231
+
232
+ List schedules
233
+
234
+ Returns all schedules with their current status and run history in the specified namespace.
235
+
236
+ ### Example
237
+
238
+ ```ts
239
+ import {
240
+ Configuration,
241
+ SchedulesApi,
242
+ } from 'komputer-ai';
243
+ import type { ListSchedulesRequest } from 'komputer-ai';
244
+
245
+ async function example() {
246
+ console.log("🚀 Testing komputer-ai SDK...");
247
+ const api = new SchedulesApi();
248
+
249
+ const body = {
250
+ // string | Kubernetes namespace (optional)
251
+ namespace: namespace_example,
252
+ } satisfies ListSchedulesRequest;
253
+
254
+ try {
255
+ const data = await api.listSchedules(body);
256
+ console.log(data);
257
+ } catch (error) {
258
+ console.error(error);
259
+ }
260
+ }
261
+
262
+ // Run the test
263
+ example().catch(console.error);
264
+ ```
265
+
266
+ ### Parameters
267
+
268
+
269
+ | Name | Type | Description | Notes |
270
+ |------------- | ------------- | ------------- | -------------|
271
+ | **namespace** | `string` | Kubernetes namespace | [Optional] [Defaults to `undefined`] |
272
+
273
+ ### Return type
274
+
275
+ [**ScheduleListResponse**](ScheduleListResponse.md)
276
+
277
+ ### Authorization
278
+
279
+ No authorization required
280
+
281
+ ### HTTP request headers
282
+
283
+ - **Content-Type**: Not defined
284
+ - **Accept**: `application/json`
285
+
286
+
287
+ ### HTTP response details
288
+ | Status code | Description | Response headers |
289
+ |-------------|-------------|------------------|
290
+ | **200** | List of schedules | - |
291
+ | **500** | Internal error | - |
292
+
293
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
294
+
295
+
296
+ ## patchSchedule
297
+
298
+ > ScheduleResponse patchSchedule(name, request, namespace)
299
+
300
+ Patch schedule
301
+
302
+ Updates the cron expression for an existing schedule.
303
+
304
+ ### Example
305
+
306
+ ```ts
307
+ import {
308
+ Configuration,
309
+ SchedulesApi,
310
+ } from 'komputer-ai';
311
+ import type { PatchScheduleOperationRequest } from 'komputer-ai';
312
+
313
+ async function example() {
314
+ console.log("🚀 Testing komputer-ai SDK...");
315
+ const api = new SchedulesApi();
316
+
317
+ const body = {
318
+ // string | Schedule name
319
+ name: name_example,
320
+ // PatchScheduleRequest | Fields to update
321
+ request: ...,
322
+ // string | Kubernetes namespace (optional)
323
+ namespace: namespace_example,
324
+ } satisfies PatchScheduleOperationRequest;
325
+
326
+ try {
327
+ const data = await api.patchSchedule(body);
328
+ console.log(data);
329
+ } catch (error) {
330
+ console.error(error);
331
+ }
332
+ }
333
+
334
+ // Run the test
335
+ example().catch(console.error);
336
+ ```
337
+
338
+ ### Parameters
339
+
340
+
341
+ | Name | Type | Description | Notes |
342
+ |------------- | ------------- | ------------- | -------------|
343
+ | **name** | `string` | Schedule name | [Defaults to `undefined`] |
344
+ | **request** | [PatchScheduleRequest](PatchScheduleRequest.md) | Fields to update | |
345
+ | **namespace** | `string` | Kubernetes namespace | [Optional] [Defaults to `undefined`] |
346
+
347
+ ### Return type
348
+
349
+ [**ScheduleResponse**](ScheduleResponse.md)
350
+
351
+ ### Authorization
352
+
353
+ No authorization required
354
+
355
+ ### HTTP request headers
356
+
357
+ - **Content-Type**: `application/json`
358
+ - **Accept**: `application/json`
359
+
360
+
361
+ ### HTTP response details
362
+ | Status code | Description | Response headers |
363
+ |-------------|-------------|------------------|
364
+ | **200** | Updated schedule | - |
365
+ | **400** | Bad request | - |
366
+ | **500** | Internal error | - |
367
+
368
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
369
+
@@ -0,0 +1,34 @@
1
+
2
+ # SecretListResponse
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `secrets` | [Array<SecretResponse>](SecretResponse.md)
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import type { SecretListResponse } from 'komputer-ai'
15
+
16
+ // TODO: Update the object below with actual values
17
+ const example = {
18
+ "secrets": null,
19
+ } satisfies SecretListResponse
20
+
21
+ console.log(example)
22
+
23
+ // Convert the instance to a JSON string
24
+ const exampleJSON: string = JSON.stringify(example)
25
+ console.log(exampleJSON)
26
+
27
+ // Parse the JSON string back to an object
28
+ const exampleParsed = JSON.parse(exampleJSON) as SecretListResponse
29
+ console.log(exampleParsed)
30
+ ```
31
+
32
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
33
+
34
+
@@ -0,0 +1,48 @@
1
+
2
+ # SecretResponse
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `agentName` | string
10
+ `agentNames` | Array<string>
11
+ `attachedAgents` | number
12
+ `createdAt` | string
13
+ `keys` | Array<string>
14
+ `managed` | boolean
15
+ `name` | string
16
+ `namespace` | string
17
+
18
+ ## Example
19
+
20
+ ```typescript
21
+ import type { SecretResponse } from 'komputer-ai'
22
+
23
+ // TODO: Update the object below with actual values
24
+ const example = {
25
+ "agentName": null,
26
+ "agentNames": null,
27
+ "attachedAgents": null,
28
+ "createdAt": null,
29
+ "keys": null,
30
+ "managed": null,
31
+ "name": null,
32
+ "namespace": null,
33
+ } satisfies SecretResponse
34
+
35
+ console.log(example)
36
+
37
+ // Convert the instance to a JSON string
38
+ const exampleJSON: string = JSON.stringify(example)
39
+ console.log(exampleJSON)
40
+
41
+ // Parse the JSON string back to an object
42
+ const exampleParsed = JSON.parse(exampleJSON) as SecretResponse
43
+ console.log(exampleParsed)
44
+ ```
45
+
46
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
47
+
48
+