tuix-rag-service-client 0.1.2
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/.openapi-generator/FILES +20 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +48 -0
- package/apis/ClientApi.js +365 -0
- package/apis/ClientApi.js.map +1 -0
- package/apis/ClientApi.ts +501 -0
- package/apis/index.js +20 -0
- package/apis/index.js.map +1 -0
- package/apis/index.ts +3 -0
- package/docs/ClientApi.md +614 -0
- package/docs/CreateResourceResponseDTO.md +34 -0
- package/docs/ErrorDTO.md +34 -0
- package/docs/PaginatedResourcesDTO.md +42 -0
- package/docs/QueryResponseDTO.md +38 -0
- package/docs/ResourceDTO.md +44 -0
- package/docs/SearchRequestDTO.md +38 -0
- package/docs/SearchResultDTO.md +42 -0
- package/index.js +22 -0
- package/index.js.map +1 -0
- package/index.ts +5 -0
- package/models/CreateResourceResponseDTO.js +49 -0
- package/models/CreateResourceResponseDTO.js.map +1 -0
- package/models/CreateResourceResponseDTO.ts +65 -0
- package/models/ErrorDTO.js +49 -0
- package/models/ErrorDTO.js.map +1 -0
- package/models/ErrorDTO.ts +65 -0
- package/models/PaginatedResourcesDTO.js +68 -0
- package/models/PaginatedResourcesDTO.js.map +1 -0
- package/models/PaginatedResourcesDTO.ts +110 -0
- package/models/QueryResponseDTO.js +54 -0
- package/models/QueryResponseDTO.js.map +1 -0
- package/models/QueryResponseDTO.ts +89 -0
- package/models/ResourceDTO.js +59 -0
- package/models/ResourceDTO.js.map +1 -0
- package/models/ResourceDTO.ts +105 -0
- package/models/SearchRequestDTO.js +55 -0
- package/models/SearchRequestDTO.js.map +1 -0
- package/models/SearchRequestDTO.ts +82 -0
- package/models/SearchResultDTO.js +57 -0
- package/models/SearchResultDTO.js.map +1 -0
- package/models/SearchResultDTO.ts +97 -0
- package/models/index.js +26 -0
- package/models/index.js.map +1 -0
- package/models/index.ts +9 -0
- package/package.json +17 -0
- package/runtime.js +330 -0
- package/runtime.js.map +1 -0
- package/runtime.ts +432 -0
- package/tsconfig.build.tsbuildinfo +1 -0
|
@@ -0,0 +1,614 @@
|
|
|
1
|
+
# ClientApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://0.0.0.0:3000/local*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**apiSearchPost**](ClientApi.md#apisearchpost) | **POST** /api/search | Search for similar content using POST method |
|
|
8
|
+
| [**resourcesDelete**](ClientApi.md#resourcesdelete) | **DELETE** /resources | Delete all resources and chunks |
|
|
9
|
+
| [**resourcesGet**](ClientApi.md#resourcesget) | **GET** /resources | Get paginated list of resources with chunks |
|
|
10
|
+
| [**resourcesIdDelete**](ClientApi.md#resourcesiddelete) | **DELETE** /resources/{id} | Delete a resource and its chunks |
|
|
11
|
+
| [**resourcesIdGet**](ClientApi.md#resourcesidget) | **GET** /resources/{id} | Get a resource by ID with chunks |
|
|
12
|
+
| [**resourcesIdPatch**](ClientApi.md#resourcesidpatch) | **PATCH** /resources/{id} | Update a resource and replace its chunks |
|
|
13
|
+
| [**resourcesPost**](ClientApi.md#resourcespost) | **POST** /resources | Create a new resource with chunks |
|
|
14
|
+
| [**searchPost**](ClientApi.md#searchpost) | **POST** /search | Search for similar content using POST method |
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## apiSearchPost
|
|
19
|
+
|
|
20
|
+
> QueryResponseDTO apiSearchPost(searchRequestDTO)
|
|
21
|
+
|
|
22
|
+
Search for similar content using POST method
|
|
23
|
+
|
|
24
|
+
Search for content chunks similar to the provided query using vector similarity search, optionally filtered by role.
|
|
25
|
+
|
|
26
|
+
### Example
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
import {
|
|
30
|
+
Configuration,
|
|
31
|
+
ClientApi,
|
|
32
|
+
} from '';
|
|
33
|
+
import type { ApiSearchPostRequest } from '';
|
|
34
|
+
|
|
35
|
+
async function example() {
|
|
36
|
+
console.log("🚀 Testing SDK...");
|
|
37
|
+
const api = new ClientApi();
|
|
38
|
+
|
|
39
|
+
const body = {
|
|
40
|
+
// SearchRequestDTO | Search request
|
|
41
|
+
searchRequestDTO: ...,
|
|
42
|
+
} satisfies ApiSearchPostRequest;
|
|
43
|
+
|
|
44
|
+
try {
|
|
45
|
+
const data = await api.apiSearchPost(body);
|
|
46
|
+
console.log(data);
|
|
47
|
+
} catch (error) {
|
|
48
|
+
console.error(error);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Run the test
|
|
53
|
+
example().catch(console.error);
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Parameters
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
| Name | Type | Description | Notes |
|
|
60
|
+
|------------- | ------------- | ------------- | -------------|
|
|
61
|
+
| **searchRequestDTO** | [SearchRequestDTO](SearchRequestDTO.md) | Search request | |
|
|
62
|
+
|
|
63
|
+
### Return type
|
|
64
|
+
|
|
65
|
+
[**QueryResponseDTO**](QueryResponseDTO.md)
|
|
66
|
+
|
|
67
|
+
### Authorization
|
|
68
|
+
|
|
69
|
+
No authorization required
|
|
70
|
+
|
|
71
|
+
### HTTP request headers
|
|
72
|
+
|
|
73
|
+
- **Content-Type**: `application/json`
|
|
74
|
+
- **Accept**: `application/json`
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
### HTTP response details
|
|
78
|
+
| Status code | Description | Response headers |
|
|
79
|
+
|-------------|-------------|------------------|
|
|
80
|
+
| **200** | OK | - |
|
|
81
|
+
| **400** | Bad Request | - |
|
|
82
|
+
| **500** | Internal Server Error | - |
|
|
83
|
+
|
|
84
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
## resourcesDelete
|
|
88
|
+
|
|
89
|
+
> resourcesDelete()
|
|
90
|
+
|
|
91
|
+
Delete all resources and chunks
|
|
92
|
+
|
|
93
|
+
Delete all resources and their associated chunks
|
|
94
|
+
|
|
95
|
+
### Example
|
|
96
|
+
|
|
97
|
+
```ts
|
|
98
|
+
import {
|
|
99
|
+
Configuration,
|
|
100
|
+
ClientApi,
|
|
101
|
+
} from '';
|
|
102
|
+
import type { ResourcesDeleteRequest } from '';
|
|
103
|
+
|
|
104
|
+
async function example() {
|
|
105
|
+
console.log("🚀 Testing SDK...");
|
|
106
|
+
const config = new Configuration({
|
|
107
|
+
// To configure API key authorization: auth0JWT
|
|
108
|
+
apiKey: "YOUR API KEY",
|
|
109
|
+
});
|
|
110
|
+
const api = new ClientApi(config);
|
|
111
|
+
|
|
112
|
+
try {
|
|
113
|
+
const data = await api.resourcesDelete();
|
|
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
|
+
This endpoint does not need any parameter.
|
|
127
|
+
|
|
128
|
+
### Return type
|
|
129
|
+
|
|
130
|
+
`void` (Empty response body)
|
|
131
|
+
|
|
132
|
+
### Authorization
|
|
133
|
+
|
|
134
|
+
[auth0JWT](../README.md#auth0JWT)
|
|
135
|
+
|
|
136
|
+
### HTTP request headers
|
|
137
|
+
|
|
138
|
+
- **Content-Type**: Not defined
|
|
139
|
+
- **Accept**: `application/json`
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
### HTTP response details
|
|
143
|
+
| Status code | Description | Response headers |
|
|
144
|
+
|-------------|-------------|------------------|
|
|
145
|
+
| **204** | All resources deleted successfully | - |
|
|
146
|
+
| **500** | Internal Server Error | - |
|
|
147
|
+
|
|
148
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
## resourcesGet
|
|
152
|
+
|
|
153
|
+
> PaginatedResourcesDTO resourcesGet(page, pageSize)
|
|
154
|
+
|
|
155
|
+
Get paginated list of resources with chunks
|
|
156
|
+
|
|
157
|
+
Get a paginated list of all resources including their chunks
|
|
158
|
+
|
|
159
|
+
### Example
|
|
160
|
+
|
|
161
|
+
```ts
|
|
162
|
+
import {
|
|
163
|
+
Configuration,
|
|
164
|
+
ClientApi,
|
|
165
|
+
} from '';
|
|
166
|
+
import type { ResourcesGetRequest } from '';
|
|
167
|
+
|
|
168
|
+
async function example() {
|
|
169
|
+
console.log("🚀 Testing SDK...");
|
|
170
|
+
const config = new Configuration({
|
|
171
|
+
// To configure API key authorization: auth0JWT
|
|
172
|
+
apiKey: "YOUR API KEY",
|
|
173
|
+
});
|
|
174
|
+
const api = new ClientApi(config);
|
|
175
|
+
|
|
176
|
+
const body = {
|
|
177
|
+
// number | Page number (optional)
|
|
178
|
+
page: 56,
|
|
179
|
+
// number | Page size (optional)
|
|
180
|
+
pageSize: 56,
|
|
181
|
+
} satisfies ResourcesGetRequest;
|
|
182
|
+
|
|
183
|
+
try {
|
|
184
|
+
const data = await api.resourcesGet(body);
|
|
185
|
+
console.log(data);
|
|
186
|
+
} catch (error) {
|
|
187
|
+
console.error(error);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// Run the test
|
|
192
|
+
example().catch(console.error);
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### Parameters
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
| Name | Type | Description | Notes |
|
|
199
|
+
|------------- | ------------- | ------------- | -------------|
|
|
200
|
+
| **page** | `number` | Page number | [Optional] [Defaults to `1`] |
|
|
201
|
+
| **pageSize** | `number` | Page size | [Optional] [Defaults to `10`] |
|
|
202
|
+
|
|
203
|
+
### Return type
|
|
204
|
+
|
|
205
|
+
[**PaginatedResourcesDTO**](PaginatedResourcesDTO.md)
|
|
206
|
+
|
|
207
|
+
### Authorization
|
|
208
|
+
|
|
209
|
+
[auth0JWT](../README.md#auth0JWT)
|
|
210
|
+
|
|
211
|
+
### HTTP request headers
|
|
212
|
+
|
|
213
|
+
- **Content-Type**: Not defined
|
|
214
|
+
- **Accept**: `application/json`
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
### HTTP response details
|
|
218
|
+
| Status code | Description | Response headers |
|
|
219
|
+
|-------------|-------------|------------------|
|
|
220
|
+
| **200** | OK | - |
|
|
221
|
+
| **400** | Bad Request | - |
|
|
222
|
+
| **500** | Internal Server Error | - |
|
|
223
|
+
|
|
224
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
## resourcesIdDelete
|
|
228
|
+
|
|
229
|
+
> resourcesIdDelete(id)
|
|
230
|
+
|
|
231
|
+
Delete a resource and its chunks
|
|
232
|
+
|
|
233
|
+
Delete a specific resource and all its associated chunks
|
|
234
|
+
|
|
235
|
+
### Example
|
|
236
|
+
|
|
237
|
+
```ts
|
|
238
|
+
import {
|
|
239
|
+
Configuration,
|
|
240
|
+
ClientApi,
|
|
241
|
+
} from '';
|
|
242
|
+
import type { ResourcesIdDeleteRequest } from '';
|
|
243
|
+
|
|
244
|
+
async function example() {
|
|
245
|
+
console.log("🚀 Testing SDK...");
|
|
246
|
+
const config = new Configuration({
|
|
247
|
+
// To configure API key authorization: auth0JWT
|
|
248
|
+
apiKey: "YOUR API KEY",
|
|
249
|
+
});
|
|
250
|
+
const api = new ClientApi(config);
|
|
251
|
+
|
|
252
|
+
const body = {
|
|
253
|
+
// string | Resource ID
|
|
254
|
+
id: id_example,
|
|
255
|
+
} satisfies ResourcesIdDeleteRequest;
|
|
256
|
+
|
|
257
|
+
try {
|
|
258
|
+
const data = await api.resourcesIdDelete(body);
|
|
259
|
+
console.log(data);
|
|
260
|
+
} catch (error) {
|
|
261
|
+
console.error(error);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// Run the test
|
|
266
|
+
example().catch(console.error);
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
### Parameters
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
| Name | Type | Description | Notes |
|
|
273
|
+
|------------- | ------------- | ------------- | -------------|
|
|
274
|
+
| **id** | `string` | Resource ID | [Defaults to `undefined`] |
|
|
275
|
+
|
|
276
|
+
### Return type
|
|
277
|
+
|
|
278
|
+
`void` (Empty response body)
|
|
279
|
+
|
|
280
|
+
### Authorization
|
|
281
|
+
|
|
282
|
+
[auth0JWT](../README.md#auth0JWT)
|
|
283
|
+
|
|
284
|
+
### HTTP request headers
|
|
285
|
+
|
|
286
|
+
- **Content-Type**: Not defined
|
|
287
|
+
- **Accept**: `application/json`
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
### HTTP response details
|
|
291
|
+
| Status code | Description | Response headers |
|
|
292
|
+
|-------------|-------------|------------------|
|
|
293
|
+
| **204** | Resource deleted successfully | - |
|
|
294
|
+
| **400** | Bad Request | - |
|
|
295
|
+
| **404** | Not Found | - |
|
|
296
|
+
| **500** | Internal Server Error | - |
|
|
297
|
+
|
|
298
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
## resourcesIdGet
|
|
302
|
+
|
|
303
|
+
> ResourceDTO resourcesIdGet(id)
|
|
304
|
+
|
|
305
|
+
Get a resource by ID with chunks
|
|
306
|
+
|
|
307
|
+
Get a specific resource including all its chunks
|
|
308
|
+
|
|
309
|
+
### Example
|
|
310
|
+
|
|
311
|
+
```ts
|
|
312
|
+
import {
|
|
313
|
+
Configuration,
|
|
314
|
+
ClientApi,
|
|
315
|
+
} from '';
|
|
316
|
+
import type { ResourcesIdGetRequest } from '';
|
|
317
|
+
|
|
318
|
+
async function example() {
|
|
319
|
+
console.log("🚀 Testing SDK...");
|
|
320
|
+
const config = new Configuration({
|
|
321
|
+
// To configure API key authorization: auth0JWT
|
|
322
|
+
apiKey: "YOUR API KEY",
|
|
323
|
+
});
|
|
324
|
+
const api = new ClientApi(config);
|
|
325
|
+
|
|
326
|
+
const body = {
|
|
327
|
+
// string | Resource ID
|
|
328
|
+
id: id_example,
|
|
329
|
+
} satisfies ResourcesIdGetRequest;
|
|
330
|
+
|
|
331
|
+
try {
|
|
332
|
+
const data = await api.resourcesIdGet(body);
|
|
333
|
+
console.log(data);
|
|
334
|
+
} catch (error) {
|
|
335
|
+
console.error(error);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
// Run the test
|
|
340
|
+
example().catch(console.error);
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
### Parameters
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
| Name | Type | Description | Notes |
|
|
347
|
+
|------------- | ------------- | ------------- | -------------|
|
|
348
|
+
| **id** | `string` | Resource ID | [Defaults to `undefined`] |
|
|
349
|
+
|
|
350
|
+
### Return type
|
|
351
|
+
|
|
352
|
+
[**ResourceDTO**](ResourceDTO.md)
|
|
353
|
+
|
|
354
|
+
### Authorization
|
|
355
|
+
|
|
356
|
+
[auth0JWT](../README.md#auth0JWT)
|
|
357
|
+
|
|
358
|
+
### HTTP request headers
|
|
359
|
+
|
|
360
|
+
- **Content-Type**: Not defined
|
|
361
|
+
- **Accept**: `application/json`
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
### HTTP response details
|
|
365
|
+
| Status code | Description | Response headers |
|
|
366
|
+
|-------------|-------------|------------------|
|
|
367
|
+
| **200** | OK | - |
|
|
368
|
+
| **400** | Bad Request | - |
|
|
369
|
+
| **404** | Not Found | - |
|
|
370
|
+
| **500** | Internal Server Error | - |
|
|
371
|
+
|
|
372
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
## resourcesIdPatch
|
|
376
|
+
|
|
377
|
+
> ResourceDTO resourcesIdPatch(id, file, name, chunkSize, role)
|
|
378
|
+
|
|
379
|
+
Update a resource and replace its chunks
|
|
380
|
+
|
|
381
|
+
Update resource metadata and replace all chunks with new ones
|
|
382
|
+
|
|
383
|
+
### Example
|
|
384
|
+
|
|
385
|
+
```ts
|
|
386
|
+
import {
|
|
387
|
+
Configuration,
|
|
388
|
+
ClientApi,
|
|
389
|
+
} from '';
|
|
390
|
+
import type { ResourcesIdPatchRequest } from '';
|
|
391
|
+
|
|
392
|
+
async function example() {
|
|
393
|
+
console.log("🚀 Testing SDK...");
|
|
394
|
+
const config = new Configuration({
|
|
395
|
+
// To configure API key authorization: auth0JWT
|
|
396
|
+
apiKey: "YOUR API KEY",
|
|
397
|
+
});
|
|
398
|
+
const api = new ClientApi(config);
|
|
399
|
+
|
|
400
|
+
const body = {
|
|
401
|
+
// string | Resource ID
|
|
402
|
+
id: id_example,
|
|
403
|
+
// Blob | Text file to be processed
|
|
404
|
+
file: BINARY_DATA_HERE,
|
|
405
|
+
// string | Resource name
|
|
406
|
+
name: name_example,
|
|
407
|
+
// number | Chunk size (optional)
|
|
408
|
+
chunkSize: 56,
|
|
409
|
+
// string | Role (optional)
|
|
410
|
+
role: role_example,
|
|
411
|
+
} satisfies ResourcesIdPatchRequest;
|
|
412
|
+
|
|
413
|
+
try {
|
|
414
|
+
const data = await api.resourcesIdPatch(body);
|
|
415
|
+
console.log(data);
|
|
416
|
+
} catch (error) {
|
|
417
|
+
console.error(error);
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
// Run the test
|
|
422
|
+
example().catch(console.error);
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
### Parameters
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
| Name | Type | Description | Notes |
|
|
429
|
+
|------------- | ------------- | ------------- | -------------|
|
|
430
|
+
| **id** | `string` | Resource ID | [Defaults to `undefined`] |
|
|
431
|
+
| **file** | `Blob` | Text file to be processed | [Defaults to `undefined`] |
|
|
432
|
+
| **name** | `string` | Resource name | [Defaults to `undefined`] |
|
|
433
|
+
| **chunkSize** | `number` | Chunk size | [Optional] [Defaults to `undefined`] |
|
|
434
|
+
| **role** | `string` | Role | [Optional] [Defaults to `undefined`] |
|
|
435
|
+
|
|
436
|
+
### Return type
|
|
437
|
+
|
|
438
|
+
[**ResourceDTO**](ResourceDTO.md)
|
|
439
|
+
|
|
440
|
+
### Authorization
|
|
441
|
+
|
|
442
|
+
[auth0JWT](../README.md#auth0JWT)
|
|
443
|
+
|
|
444
|
+
### HTTP request headers
|
|
445
|
+
|
|
446
|
+
- **Content-Type**: `multipart/form-data`
|
|
447
|
+
- **Accept**: `application/json`
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
### HTTP response details
|
|
451
|
+
| Status code | Description | Response headers |
|
|
452
|
+
|-------------|-------------|------------------|
|
|
453
|
+
| **200** | OK | - |
|
|
454
|
+
| **400** | Bad Request | - |
|
|
455
|
+
| **404** | Not Found | - |
|
|
456
|
+
| **500** | Internal Server Error | - |
|
|
457
|
+
|
|
458
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
## resourcesPost
|
|
462
|
+
|
|
463
|
+
> CreateResourceResponseDTO resourcesPost(file, name, chunkSize, role)
|
|
464
|
+
|
|
465
|
+
Create a new resource with chunks
|
|
466
|
+
|
|
467
|
+
Create a new resource and embed its chunks
|
|
468
|
+
|
|
469
|
+
### Example
|
|
470
|
+
|
|
471
|
+
```ts
|
|
472
|
+
import {
|
|
473
|
+
Configuration,
|
|
474
|
+
ClientApi,
|
|
475
|
+
} from '';
|
|
476
|
+
import type { ResourcesPostRequest } from '';
|
|
477
|
+
|
|
478
|
+
async function example() {
|
|
479
|
+
console.log("🚀 Testing SDK...");
|
|
480
|
+
const config = new Configuration({
|
|
481
|
+
// To configure API key authorization: auth0JWT
|
|
482
|
+
apiKey: "YOUR API KEY",
|
|
483
|
+
});
|
|
484
|
+
const api = new ClientApi(config);
|
|
485
|
+
|
|
486
|
+
const body = {
|
|
487
|
+
// Blob | Text file to be processed
|
|
488
|
+
file: BINARY_DATA_HERE,
|
|
489
|
+
// string | Resource name
|
|
490
|
+
name: name_example,
|
|
491
|
+
// number | Chunk size (optional)
|
|
492
|
+
chunkSize: 56,
|
|
493
|
+
// string | Role (optional)
|
|
494
|
+
role: role_example,
|
|
495
|
+
} satisfies ResourcesPostRequest;
|
|
496
|
+
|
|
497
|
+
try {
|
|
498
|
+
const data = await api.resourcesPost(body);
|
|
499
|
+
console.log(data);
|
|
500
|
+
} catch (error) {
|
|
501
|
+
console.error(error);
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
// Run the test
|
|
506
|
+
example().catch(console.error);
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
### Parameters
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
| Name | Type | Description | Notes |
|
|
513
|
+
|------------- | ------------- | ------------- | -------------|
|
|
514
|
+
| **file** | `Blob` | Text file to be processed | [Defaults to `undefined`] |
|
|
515
|
+
| **name** | `string` | Resource name | [Defaults to `undefined`] |
|
|
516
|
+
| **chunkSize** | `number` | Chunk size | [Optional] [Defaults to `undefined`] |
|
|
517
|
+
| **role** | `string` | Role | [Optional] [Defaults to `undefined`] |
|
|
518
|
+
|
|
519
|
+
### Return type
|
|
520
|
+
|
|
521
|
+
[**CreateResourceResponseDTO**](CreateResourceResponseDTO.md)
|
|
522
|
+
|
|
523
|
+
### Authorization
|
|
524
|
+
|
|
525
|
+
[auth0JWT](../README.md#auth0JWT)
|
|
526
|
+
|
|
527
|
+
### HTTP request headers
|
|
528
|
+
|
|
529
|
+
- **Content-Type**: `multipart/form-data`
|
|
530
|
+
- **Accept**: `application/json`
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
### HTTP response details
|
|
534
|
+
| Status code | Description | Response headers |
|
|
535
|
+
|-------------|-------------|------------------|
|
|
536
|
+
| **201** | Created | - |
|
|
537
|
+
| **400** | Bad Request | - |
|
|
538
|
+
| **500** | Internal Server Error | - |
|
|
539
|
+
|
|
540
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
## searchPost
|
|
544
|
+
|
|
545
|
+
> QueryResponseDTO searchPost(searchRequestDTO)
|
|
546
|
+
|
|
547
|
+
Search for similar content using POST method
|
|
548
|
+
|
|
549
|
+
Search for content chunks similar to the provided query using vector similarity search, optionally filtered by role.
|
|
550
|
+
|
|
551
|
+
### Example
|
|
552
|
+
|
|
553
|
+
```ts
|
|
554
|
+
import {
|
|
555
|
+
Configuration,
|
|
556
|
+
ClientApi,
|
|
557
|
+
} from '';
|
|
558
|
+
import type { SearchPostRequest } from '';
|
|
559
|
+
|
|
560
|
+
async function example() {
|
|
561
|
+
console.log("🚀 Testing SDK...");
|
|
562
|
+
const config = new Configuration({
|
|
563
|
+
// To configure API key authorization: auth0JWT
|
|
564
|
+
apiKey: "YOUR API KEY",
|
|
565
|
+
});
|
|
566
|
+
const api = new ClientApi(config);
|
|
567
|
+
|
|
568
|
+
const body = {
|
|
569
|
+
// SearchRequestDTO | Search request
|
|
570
|
+
searchRequestDTO: ...,
|
|
571
|
+
} satisfies SearchPostRequest;
|
|
572
|
+
|
|
573
|
+
try {
|
|
574
|
+
const data = await api.searchPost(body);
|
|
575
|
+
console.log(data);
|
|
576
|
+
} catch (error) {
|
|
577
|
+
console.error(error);
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
// Run the test
|
|
582
|
+
example().catch(console.error);
|
|
583
|
+
```
|
|
584
|
+
|
|
585
|
+
### Parameters
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
| Name | Type | Description | Notes |
|
|
589
|
+
|------------- | ------------- | ------------- | -------------|
|
|
590
|
+
| **searchRequestDTO** | [SearchRequestDTO](SearchRequestDTO.md) | Search request | |
|
|
591
|
+
|
|
592
|
+
### Return type
|
|
593
|
+
|
|
594
|
+
[**QueryResponseDTO**](QueryResponseDTO.md)
|
|
595
|
+
|
|
596
|
+
### Authorization
|
|
597
|
+
|
|
598
|
+
[auth0JWT](../README.md#auth0JWT)
|
|
599
|
+
|
|
600
|
+
### HTTP request headers
|
|
601
|
+
|
|
602
|
+
- **Content-Type**: `application/json`
|
|
603
|
+
- **Accept**: `application/json`
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
### HTTP response details
|
|
607
|
+
| Status code | Description | Response headers |
|
|
608
|
+
|-------------|-------------|------------------|
|
|
609
|
+
| **200** | OK | - |
|
|
610
|
+
| **400** | Bad Request | - |
|
|
611
|
+
| **500** | Internal Server Error | - |
|
|
612
|
+
|
|
613
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
614
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# CreateResourceResponseDTO
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | string
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { CreateResourceResponseDTO } from ''
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"id": null,
|
|
19
|
+
} satisfies CreateResourceResponseDTO
|
|
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 CreateResourceResponseDTO
|
|
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
|
+
|
package/docs/ErrorDTO.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# ErrorDTO
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`message` | string
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { ErrorDTO } from ''
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"message": null,
|
|
19
|
+
} satisfies ErrorDTO
|
|
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 ErrorDTO
|
|
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,42 @@
|
|
|
1
|
+
|
|
2
|
+
# PaginatedResourcesDTO
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`items` | [Array<ResourceDTO>](ResourceDTO.md)
|
|
10
|
+
`page` | number
|
|
11
|
+
`pageSize` | number
|
|
12
|
+
`totalItems` | number
|
|
13
|
+
`totalPages` | number
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { PaginatedResourcesDTO } from ''
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"items": null,
|
|
23
|
+
"page": null,
|
|
24
|
+
"pageSize": null,
|
|
25
|
+
"totalItems": null,
|
|
26
|
+
"totalPages": null,
|
|
27
|
+
} satisfies PaginatedResourcesDTO
|
|
28
|
+
|
|
29
|
+
console.log(example)
|
|
30
|
+
|
|
31
|
+
// Convert the instance to a JSON string
|
|
32
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
33
|
+
console.log(exampleJSON)
|
|
34
|
+
|
|
35
|
+
// Parse the JSON string back to an object
|
|
36
|
+
const exampleParsed = JSON.parse(exampleJSON) as PaginatedResourcesDTO
|
|
37
|
+
console.log(exampleParsed)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
41
|
+
|
|
42
|
+
|