@nestbox-ai/doc-processing-api 0.0.1 → 1.0.61

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 (68) hide show
  1. package/.openapi-generator/FILES +48 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +111 -44
  5. package/api.ts +2539 -0
  6. package/base.ts +62 -0
  7. package/common.ts +126 -0
  8. package/configuration.ts +121 -0
  9. package/dist/api.d.ts +1543 -0
  10. package/dist/api.js +1902 -0
  11. package/dist/base.d.ts +42 -0
  12. package/dist/base.js +46 -0
  13. package/dist/common.d.ts +34 -0
  14. package/dist/common.js +138 -0
  15. package/dist/configuration.d.ts +98 -0
  16. package/dist/configuration.js +44 -0
  17. package/dist/esm/api.d.ts +1543 -0
  18. package/dist/esm/api.js +1867 -0
  19. package/dist/esm/base.d.ts +42 -0
  20. package/dist/esm/base.js +41 -0
  21. package/dist/esm/common.d.ts +34 -0
  22. package/dist/esm/common.js +125 -0
  23. package/dist/esm/configuration.d.ts +98 -0
  24. package/dist/esm/configuration.js +40 -0
  25. package/dist/esm/index.d.ts +13 -0
  26. package/dist/esm/index.js +15 -0
  27. package/dist/index.d.ts +13 -0
  28. package/dist/index.js +31 -0
  29. package/docs/ArtifactsApi.md +61 -0
  30. package/docs/BatchQueryDto.md +34 -0
  31. package/docs/DocumentCreateResponseDto.md +22 -0
  32. package/docs/DocumentDto.md +38 -0
  33. package/docs/DocumentSourcesResponseDto.md +20 -0
  34. package/docs/DocumentsApi.md +186 -0
  35. package/docs/ErrorDto.md +26 -0
  36. package/docs/EvalCreateResponseDto.md +22 -0
  37. package/docs/EvalDto.md +36 -0
  38. package/docs/EvalsApi.md +243 -0
  39. package/docs/GpuDeviceDto.md +28 -0
  40. package/docs/GpuHealthCheckDto.md +26 -0
  41. package/docs/HealthApi.md +53 -0
  42. package/docs/HealthCheckItemDto.md +26 -0
  43. package/docs/HealthChecksDto.md +24 -0
  44. package/docs/HealthResponseDto.md +24 -0
  45. package/docs/JobDto.md +48 -0
  46. package/docs/JobLinksDto.md +22 -0
  47. package/docs/JobStatusDto.md +32 -0
  48. package/docs/JobsApi.md +170 -0
  49. package/docs/PaginatedDocumentsDto.md +22 -0
  50. package/docs/PaginatedEvalsDto.md +22 -0
  51. package/docs/PaginatedJobsDto.md +22 -0
  52. package/docs/PaginatedProfilesDto.md +22 -0
  53. package/docs/PaginatedQueriesDto.md +22 -0
  54. package/docs/PaginationDto.md +24 -0
  55. package/docs/ProfileDto.md +32 -0
  56. package/docs/ProfilesApi.md +220 -0
  57. package/docs/QueriesApi.md +232 -0
  58. package/docs/QueryCreateResponseDto.md +22 -0
  59. package/docs/SourceItemDto.md +32 -0
  60. package/docs/SourcesApi.md +67 -0
  61. package/docs/ValidationErrorDto.md +26 -0
  62. package/docs/ValidationIssueDto.md +24 -0
  63. package/docs/ValidationResultDto.md +24 -0
  64. package/git_push.sh +57 -0
  65. package/index.ts +18 -0
  66. package/package.json +29 -6
  67. package/tsconfig.esm.json +7 -0
  68. package/tsconfig.json +18 -0
package/api.ts ADDED
@@ -0,0 +1,2539 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nestbox API Documents Processing API
5
+ * API for Nestbox Documents Processing
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
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 type { Configuration } from './configuration';
17
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
18
+ import globalAxios from 'axios';
19
+ // Some imports not used depending on template conditions
20
+ // @ts-ignore
21
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from './common';
22
+ import type { RequestArgs } from './base';
23
+ // @ts-ignore
24
+ import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
25
+
26
+ export interface BatchQueryDto {
27
+ /**
28
+ * Batch query ID
29
+ */
30
+ 'id': string;
31
+ /**
32
+ * Associated document ID
33
+ */
34
+ 'documentId'?: string;
35
+ /**
36
+ * Batch query status
37
+ */
38
+ 'status': BatchQueryDtoStatusEnum;
39
+ /**
40
+ * Batch query creation timestamp
41
+ */
42
+ 'createdAt': string;
43
+ /**
44
+ * Batch query last update timestamp
45
+ */
46
+ 'updatedAt'?: string;
47
+ /**
48
+ * Latest job ID associated with this batch query
49
+ */
50
+ 'latestJobId'?: string;
51
+ /**
52
+ * YAML file name
53
+ */
54
+ 'yamlFileName'?: string;
55
+ /**
56
+ * Optional stored results (if persisted)
57
+ */
58
+ 'results'?: { [key: string]: any; };
59
+ }
60
+
61
+ export const BatchQueryDtoStatusEnum = {
62
+ Queued: 'queued',
63
+ Running: 'running',
64
+ Completed: 'completed',
65
+ Failed: 'failed'
66
+ } as const;
67
+
68
+ export type BatchQueryDtoStatusEnum = typeof BatchQueryDtoStatusEnum[keyof typeof BatchQueryDtoStatusEnum];
69
+
70
+ export interface DocumentCreateResponseDto {
71
+ /**
72
+ * Created document
73
+ */
74
+ 'document': DocumentDto;
75
+ /**
76
+ * Processing job
77
+ */
78
+ 'job': JobDto;
79
+ }
80
+ export interface DocumentDto {
81
+ /**
82
+ * Document ID
83
+ */
84
+ 'id': string;
85
+ /**
86
+ * Associated profile ID
87
+ */
88
+ 'profileId': string;
89
+ /**
90
+ * Document processing status
91
+ */
92
+ 'status': DocumentDtoStatusEnum;
93
+ /**
94
+ * Original file name
95
+ */
96
+ 'fileName'?: string;
97
+ /**
98
+ * MIME content type
99
+ */
100
+ 'contentType'?: string;
101
+ /**
102
+ * File size in bytes
103
+ */
104
+ 'sizeBytes'?: number;
105
+ /**
106
+ * Document creation timestamp
107
+ */
108
+ 'createdAt': string;
109
+ /**
110
+ * Document last update timestamp
111
+ */
112
+ 'updatedAt'?: string;
113
+ /**
114
+ * Latest job ID associated with this document
115
+ */
116
+ 'latestJobId'?: string;
117
+ /**
118
+ * Optional processing metrics (pages, chunks, entities, etc.)
119
+ */
120
+ 'metrics'?: { [key: string]: any; };
121
+ }
122
+
123
+ export const DocumentDtoStatusEnum = {
124
+ Queued: 'queued',
125
+ Processing: 'processing',
126
+ Ready: 'ready',
127
+ Failed: 'failed',
128
+ Deleted: 'deleted'
129
+ } as const;
130
+
131
+ export type DocumentDtoStatusEnum = typeof DocumentDtoStatusEnum[keyof typeof DocumentDtoStatusEnum];
132
+
133
+ export interface DocumentSourcesResponseDto {
134
+ /**
135
+ * Source items
136
+ */
137
+ 'data': Array<SourceItemDto>;
138
+ }
139
+ export interface ErrorDto {
140
+ /**
141
+ * Error type
142
+ */
143
+ 'error': string;
144
+ /**
145
+ * Error message
146
+ */
147
+ 'message': string;
148
+ /**
149
+ * Request ID for tracking
150
+ */
151
+ 'requestId'?: string;
152
+ /**
153
+ * Additional error details
154
+ */
155
+ 'details'?: { [key: string]: any; };
156
+ }
157
+ export interface EvalCreateResponseDto {
158
+ /**
159
+ * Created evaluation
160
+ */
161
+ 'eval': EvalDto;
162
+ /**
163
+ * Processing job
164
+ */
165
+ 'job': JobDto;
166
+ }
167
+ export interface EvalDto {
168
+ /**
169
+ * Evaluation ID
170
+ */
171
+ 'id': string;
172
+ /**
173
+ * Associated document ID
174
+ */
175
+ 'documentId': string;
176
+ /**
177
+ * Evaluation status
178
+ */
179
+ 'status': EvalDtoStatusEnum;
180
+ /**
181
+ * Evaluation creation timestamp
182
+ */
183
+ 'createdAt': string;
184
+ /**
185
+ * Evaluation last update timestamp
186
+ */
187
+ 'updatedAt'?: string;
188
+ /**
189
+ * Latest job ID associated with this evaluation
190
+ */
191
+ 'latestJobId'?: string;
192
+ /**
193
+ * YAML file name
194
+ */
195
+ 'yamlFileName'?: string;
196
+ /**
197
+ * Optional aggregated metrics (e.g., similarity scores)
198
+ */
199
+ 'summary'?: { [key: string]: any; };
200
+ /**
201
+ * Optional detailed report (if stored)
202
+ */
203
+ 'report'?: { [key: string]: any; };
204
+ }
205
+
206
+ export const EvalDtoStatusEnum = {
207
+ Queued: 'queued',
208
+ Running: 'running',
209
+ Completed: 'completed',
210
+ Failed: 'failed'
211
+ } as const;
212
+
213
+ export type EvalDtoStatusEnum = typeof EvalDtoStatusEnum[keyof typeof EvalDtoStatusEnum];
214
+
215
+ export interface GpuDeviceDto {
216
+ /**
217
+ * GPU device index
218
+ */
219
+ 'index': number;
220
+ /**
221
+ * GPU device name
222
+ */
223
+ 'name': string;
224
+ /**
225
+ * Total GPU memory in MB
226
+ */
227
+ 'memoryTotalMB': number;
228
+ /**
229
+ * Used GPU memory in MB
230
+ */
231
+ 'memoryUsedMB'?: number;
232
+ /**
233
+ * GPU utilization percentage
234
+ */
235
+ 'utilizationPct'?: number;
236
+ }
237
+ export interface GpuHealthCheckDto {
238
+ /**
239
+ * GPU health status
240
+ */
241
+ 'status': GpuHealthCheckDtoStatusEnum;
242
+ /**
243
+ * Number of GPU devices
244
+ */
245
+ 'deviceCount'?: number;
246
+ /**
247
+ * GPU devices information
248
+ */
249
+ 'devices'?: Array<GpuDeviceDto>;
250
+ /**
251
+ * GPU status message
252
+ */
253
+ 'message'?: string;
254
+ }
255
+
256
+ export const GpuHealthCheckDtoStatusEnum = {
257
+ Ok: 'ok',
258
+ Degraded: 'degraded',
259
+ Down: 'down'
260
+ } as const;
261
+
262
+ export type GpuHealthCheckDtoStatusEnum = typeof GpuHealthCheckDtoStatusEnum[keyof typeof GpuHealthCheckDtoStatusEnum];
263
+
264
+ export interface HealthCheckItemDto {
265
+ /**
266
+ * Health check status
267
+ */
268
+ 'status': HealthCheckItemDtoStatusEnum;
269
+ /**
270
+ * Latency in milliseconds
271
+ */
272
+ 'latencyMs'?: number;
273
+ /**
274
+ * Status message
275
+ */
276
+ 'message'?: string;
277
+ /**
278
+ * Additional details
279
+ */
280
+ 'details'?: { [key: string]: any; };
281
+ }
282
+
283
+ export const HealthCheckItemDtoStatusEnum = {
284
+ Ok: 'ok',
285
+ Degraded: 'degraded',
286
+ Down: 'down'
287
+ } as const;
288
+
289
+ export type HealthCheckItemDtoStatusEnum = typeof HealthCheckItemDtoStatusEnum[keyof typeof HealthCheckItemDtoStatusEnum];
290
+
291
+ export interface HealthChecksDto {
292
+ /**
293
+ * Redis health check
294
+ */
295
+ 'redis': HealthCheckItemDto;
296
+ /**
297
+ * Database health check
298
+ */
299
+ 'db': HealthCheckItemDto;
300
+ /**
301
+ * GPU health check
302
+ */
303
+ 'gpu': GpuHealthCheckDto;
304
+ }
305
+ export interface HealthResponseDto {
306
+ /**
307
+ * Overall system health status
308
+ */
309
+ 'status': HealthResponseDtoStatusEnum;
310
+ /**
311
+ * Health check timestamp
312
+ */
313
+ 'timestamp': string;
314
+ /**
315
+ * Health check results
316
+ */
317
+ 'checks': HealthChecksDto;
318
+ }
319
+
320
+ export const HealthResponseDtoStatusEnum = {
321
+ Ok: 'ok',
322
+ Degraded: 'degraded',
323
+ Down: 'down'
324
+ } as const;
325
+
326
+ export type HealthResponseDtoStatusEnum = typeof HealthResponseDtoStatusEnum[keyof typeof HealthResponseDtoStatusEnum];
327
+
328
+ export interface JobDto {
329
+ /**
330
+ * Job ID
331
+ */
332
+ 'id': string;
333
+ /**
334
+ * Job type
335
+ */
336
+ 'type': JobDtoTypeEnum;
337
+ /**
338
+ * Job state
339
+ */
340
+ 'state': JobDtoStateEnum;
341
+ /**
342
+ * Job creation timestamp
343
+ */
344
+ 'createdAt': string;
345
+ /**
346
+ * Job last update timestamp
347
+ */
348
+ 'updatedAt'?: string;
349
+ /**
350
+ * Associated profile ID
351
+ */
352
+ 'profileId'?: string;
353
+ /**
354
+ * Associated document ID
355
+ */
356
+ 'documentId'?: string;
357
+ /**
358
+ * Associated evaluation ID
359
+ */
360
+ 'evalId'?: string;
361
+ /**
362
+ * Associated query ID
363
+ */
364
+ 'queryId'?: string;
365
+ /**
366
+ * 0..1 progress fraction
367
+ */
368
+ 'progress'?: number;
369
+ /**
370
+ * Current pipeline stage
371
+ */
372
+ 'stage'?: string;
373
+ /**
374
+ * Current job message
375
+ */
376
+ 'message'?: string;
377
+ /**
378
+ * Error message if failed
379
+ */
380
+ 'error'?: string;
381
+ /**
382
+ * Job-related links
383
+ */
384
+ 'links'?: JobLinksDto;
385
+ /**
386
+ * Additional job metadata
387
+ */
388
+ 'metadata'?: { [key: string]: any; };
389
+ }
390
+
391
+ export const JobDtoTypeEnum = {
392
+ DocumentProcessing: 'document_processing',
393
+ Evaluation: 'evaluation',
394
+ BatchQuery: 'batch_query',
395
+ Other: 'other'
396
+ } as const;
397
+
398
+ export type JobDtoTypeEnum = typeof JobDtoTypeEnum[keyof typeof JobDtoTypeEnum];
399
+ export const JobDtoStateEnum = {
400
+ Pending: 'pending',
401
+ Processing: 'processing',
402
+ Completed: 'completed',
403
+ Failed: 'failed',
404
+ Canceled: 'canceled'
405
+ } as const;
406
+
407
+ export type JobDtoStateEnum = typeof JobDtoStateEnum[keyof typeof JobDtoStateEnum];
408
+
409
+ export interface JobLinksDto {
410
+ /**
411
+ * Job status URI
412
+ */
413
+ 'status'?: string;
414
+ /**
415
+ * Resource URI
416
+ */
417
+ 'resource'?: string;
418
+ }
419
+ export interface JobStatusDto {
420
+ /**
421
+ * Job ID
422
+ */
423
+ 'id': string;
424
+ /**
425
+ * Job state
426
+ */
427
+ 'state': JobStatusDtoStateEnum;
428
+ /**
429
+ * Job last update timestamp
430
+ */
431
+ 'updatedAt': string;
432
+ /**
433
+ * 0..1 progress fraction
434
+ */
435
+ 'progress'?: number;
436
+ /**
437
+ * Current pipeline stage
438
+ */
439
+ 'stage'?: string;
440
+ /**
441
+ * Current job message
442
+ */
443
+ 'message'?: string;
444
+ /**
445
+ * Error message if failed
446
+ */
447
+ 'error'?: string;
448
+ }
449
+
450
+ export const JobStatusDtoStateEnum = {
451
+ Pending: 'pending',
452
+ Processing: 'processing',
453
+ Completed: 'completed',
454
+ Failed: 'failed',
455
+ Canceled: 'canceled'
456
+ } as const;
457
+
458
+ export type JobStatusDtoStateEnum = typeof JobStatusDtoStateEnum[keyof typeof JobStatusDtoStateEnum];
459
+
460
+ export interface PaginatedDocumentsDto {
461
+ /**
462
+ * Document data
463
+ */
464
+ 'data': Array<DocumentDto>;
465
+ /**
466
+ * Pagination information
467
+ */
468
+ 'pagination': PaginationDto;
469
+ }
470
+ export interface PaginatedEvalsDto {
471
+ /**
472
+ * Evaluation data
473
+ */
474
+ 'data': Array<EvalDto>;
475
+ /**
476
+ * Pagination information
477
+ */
478
+ 'pagination': PaginationDto;
479
+ }
480
+ export interface PaginatedJobsDto {
481
+ /**
482
+ * Job data
483
+ */
484
+ 'data': Array<JobDto>;
485
+ /**
486
+ * Pagination information
487
+ */
488
+ 'pagination': PaginationDto;
489
+ }
490
+ export interface PaginatedProfilesDto {
491
+ /**
492
+ * Profile data
493
+ */
494
+ 'data': Array<ProfileDto>;
495
+ /**
496
+ * Pagination information
497
+ */
498
+ 'pagination': PaginationDto;
499
+ }
500
+ export interface PaginatedQueriesDto {
501
+ /**
502
+ * Batch query data
503
+ */
504
+ 'data': Array<BatchQueryDto>;
505
+ /**
506
+ * Pagination information
507
+ */
508
+ 'pagination': PaginationDto;
509
+ }
510
+ export interface PaginationDto {
511
+ /**
512
+ * Current page number
513
+ */
514
+ 'page': number;
515
+ /**
516
+ * Page size limit
517
+ */
518
+ 'limit': number;
519
+ /**
520
+ * Total number of items
521
+ */
522
+ 'total': number;
523
+ }
524
+ export interface ProfileDto {
525
+ /**
526
+ * Profile ID
527
+ */
528
+ 'id': string;
529
+ /**
530
+ * Profile name
531
+ */
532
+ 'name': string;
533
+ /**
534
+ * Profile description
535
+ */
536
+ 'description'?: string;
537
+ /**
538
+ * Profile creation timestamp
539
+ */
540
+ 'createdAt': string;
541
+ /**
542
+ * Profile last update timestamp
543
+ */
544
+ 'updatedAt'?: string;
545
+ /**
546
+ * YAML file name
547
+ */
548
+ 'yamlFileName'?: string;
549
+ /**
550
+ * Optional checksum of the uploaded YAML file
551
+ */
552
+ 'yamlSha256'?: string;
553
+ }
554
+ export interface QueryCreateResponseDto {
555
+ /**
556
+ * Created batch query
557
+ */
558
+ 'query': BatchQueryDto;
559
+ /**
560
+ * Processing job
561
+ */
562
+ 'job': JobDto;
563
+ }
564
+ export interface SourceItemDto {
565
+ /**
566
+ * Source ID
567
+ */
568
+ 'id': string;
569
+ /**
570
+ * Associated document ID
571
+ */
572
+ 'documentId': string;
573
+ /**
574
+ * Associated job ID
575
+ */
576
+ 'jobId'?: string;
577
+ /**
578
+ * Chunk ID
579
+ */
580
+ 'chunkId'?: string;
581
+ /**
582
+ * Page number
583
+ */
584
+ 'page'?: number;
585
+ /**
586
+ * Source text content
587
+ */
588
+ 'text': string;
589
+ /**
590
+ * Additional metadata
591
+ */
592
+ 'metadata'?: { [key: string]: any; };
593
+ }
594
+ export interface ValidationErrorDto {
595
+ /**
596
+ * Error type
597
+ */
598
+ 'error': string;
599
+ /**
600
+ * Error message
601
+ */
602
+ 'message': string;
603
+ /**
604
+ * Validation issues
605
+ */
606
+ 'issues': Array<ValidationIssueDto>;
607
+ /**
608
+ * Request ID for tracking
609
+ */
610
+ 'requestId'?: string;
611
+ }
612
+ export interface ValidationIssueDto {
613
+ /**
614
+ * JSON pointer-like path into the YAML document
615
+ */
616
+ 'path': string;
617
+ /**
618
+ * Validation issue message
619
+ */
620
+ 'message': string;
621
+ /**
622
+ * Issue severity
623
+ */
624
+ 'severity'?: ValidationIssueDtoSeverityEnum;
625
+ }
626
+
627
+ export const ValidationIssueDtoSeverityEnum = {
628
+ Error: 'error',
629
+ Warning: 'warning'
630
+ } as const;
631
+
632
+ export type ValidationIssueDtoSeverityEnum = typeof ValidationIssueDtoSeverityEnum[keyof typeof ValidationIssueDtoSeverityEnum];
633
+
634
+ export interface ValidationResultDto {
635
+ /**
636
+ * Whether the validation passed
637
+ */
638
+ 'valid': boolean;
639
+ /**
640
+ * Non-fatal issues
641
+ */
642
+ 'warnings'?: Array<ValidationIssueDto>;
643
+ /**
644
+ * Optional normalized representation (if available)
645
+ */
646
+ 'normalized'?: { [key: string]: any; };
647
+ }
648
+
649
+ /**
650
+ * ArtifactsApi - axios parameter creator
651
+ */
652
+ export const ArtifactsApiAxiosParamCreator = function (configuration?: Configuration) {
653
+ return {
654
+ /**
655
+ * Downloads artifacts produced by the pipeline (e.g., GraphRAG outputs, DB snapshots, visualizations) as a single archive.
656
+ * @summary Download document artifacts
657
+ * @param {string} documentId Document ID.
658
+ * @param {*} [options] Override http request option.
659
+ * @throws {RequiredError}
660
+ */
661
+ artifactsControllerDownloadDocumentArtifacts: async (documentId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
662
+ // verify required parameter 'documentId' is not null or undefined
663
+ assertParamExists('artifactsControllerDownloadDocumentArtifacts', 'documentId', documentId)
664
+ const localVarPath = `/documents/{documentId}/artifacts`
665
+ .replace(`{${"documentId"}}`, encodeURIComponent(String(documentId)));
666
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
667
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
668
+ let baseOptions;
669
+ if (configuration) {
670
+ baseOptions = configuration.baseOptions;
671
+ }
672
+
673
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
674
+ const localVarHeaderParameter = {} as any;
675
+ const localVarQueryParameter = {} as any;
676
+
677
+ localVarHeaderParameter['Accept'] = 'application/json';
678
+
679
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
680
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
681
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
682
+
683
+ return {
684
+ url: toPathString(localVarUrlObj),
685
+ options: localVarRequestOptions,
686
+ };
687
+ },
688
+ }
689
+ };
690
+
691
+ /**
692
+ * ArtifactsApi - functional programming interface
693
+ */
694
+ export const ArtifactsApiFp = function(configuration?: Configuration) {
695
+ const localVarAxiosParamCreator = ArtifactsApiAxiosParamCreator(configuration)
696
+ return {
697
+ /**
698
+ * Downloads artifacts produced by the pipeline (e.g., GraphRAG outputs, DB snapshots, visualizations) as a single archive.
699
+ * @summary Download document artifacts
700
+ * @param {string} documentId Document ID.
701
+ * @param {*} [options] Override http request option.
702
+ * @throws {RequiredError}
703
+ */
704
+ async artifactsControllerDownloadDocumentArtifacts(documentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
705
+ const localVarAxiosArgs = await localVarAxiosParamCreator.artifactsControllerDownloadDocumentArtifacts(documentId, options);
706
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
707
+ const localVarOperationServerBasePath = operationServerMap['ArtifactsApi.artifactsControllerDownloadDocumentArtifacts']?.[localVarOperationServerIndex]?.url;
708
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
709
+ },
710
+ }
711
+ };
712
+
713
+ /**
714
+ * ArtifactsApi - factory interface
715
+ */
716
+ export const ArtifactsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
717
+ const localVarFp = ArtifactsApiFp(configuration)
718
+ return {
719
+ /**
720
+ * Downloads artifacts produced by the pipeline (e.g., GraphRAG outputs, DB snapshots, visualizations) as a single archive.
721
+ * @summary Download document artifacts
722
+ * @param {string} documentId Document ID.
723
+ * @param {*} [options] Override http request option.
724
+ * @throws {RequiredError}
725
+ */
726
+ artifactsControllerDownloadDocumentArtifacts(documentId: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
727
+ return localVarFp.artifactsControllerDownloadDocumentArtifacts(documentId, options).then((request) => request(axios, basePath));
728
+ },
729
+ };
730
+ };
731
+
732
+ /**
733
+ * ArtifactsApi - object-oriented interface
734
+ */
735
+ export class ArtifactsApi extends BaseAPI {
736
+ /**
737
+ * Downloads artifacts produced by the pipeline (e.g., GraphRAG outputs, DB snapshots, visualizations) as a single archive.
738
+ * @summary Download document artifacts
739
+ * @param {string} documentId Document ID.
740
+ * @param {*} [options] Override http request option.
741
+ * @throws {RequiredError}
742
+ */
743
+ public artifactsControllerDownloadDocumentArtifacts(documentId: string, options?: RawAxiosRequestConfig) {
744
+ return ArtifactsApiFp(this.configuration).artifactsControllerDownloadDocumentArtifacts(documentId, options).then((request) => request(this.axios, this.basePath));
745
+ }
746
+ }
747
+
748
+
749
+
750
+ /**
751
+ * DocumentsApi - axios parameter creator
752
+ */
753
+ export const DocumentsApiAxiosParamCreator = function (configuration?: Configuration) {
754
+ return {
755
+ /**
756
+ * Upload a document file (pdf/md/html/docx/etc) via multipart form to start processing.
757
+ * @summary Create document processing job
758
+ * @param {string} profileId Profile/config ID to use for processing (maps to CLI --config).
759
+ * @param {File} file Document file to process (pdf/md/html/docx/etc).
760
+ * @param {string} [stages] Comma-separated stages to run (e.g., docling,chunking,graphrag). If omitted, auto-detected by server.
761
+ * @param {DocumentsControllerCreateDocumentPriorityEnum} [priority]
762
+ * @param {boolean} [visualize] Whether to generate graph visualization artifacts.
763
+ * @param {*} [options] Override http request option.
764
+ * @throws {RequiredError}
765
+ */
766
+ documentsControllerCreateDocument: async (profileId: string, file: File, stages?: string, priority?: DocumentsControllerCreateDocumentPriorityEnum, visualize?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
767
+ // verify required parameter 'profileId' is not null or undefined
768
+ assertParamExists('documentsControllerCreateDocument', 'profileId', profileId)
769
+ // verify required parameter 'file' is not null or undefined
770
+ assertParamExists('documentsControllerCreateDocument', 'file', file)
771
+ const localVarPath = `/documents`;
772
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
773
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
774
+ let baseOptions;
775
+ if (configuration) {
776
+ baseOptions = configuration.baseOptions;
777
+ }
778
+
779
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
780
+ const localVarHeaderParameter = {} as any;
781
+ const localVarQueryParameter = {} as any;
782
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
783
+
784
+
785
+ if (profileId !== undefined) {
786
+ localVarFormParams.append('profileId', profileId as any);
787
+ }
788
+
789
+ if (file !== undefined) {
790
+ localVarFormParams.append('file', file as any);
791
+ }
792
+
793
+ if (stages !== undefined) {
794
+ localVarFormParams.append('stages', stages as any);
795
+ }
796
+
797
+ if (priority !== undefined) {
798
+ localVarFormParams.append('priority', priority as any);
799
+ }
800
+
801
+ if (visualize !== undefined) {
802
+ localVarFormParams.append('visualize', String(visualize) as any);
803
+ }
804
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
805
+ localVarHeaderParameter['Accept'] = 'application/json';
806
+
807
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
808
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
809
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
810
+ localVarRequestOptions.data = localVarFormParams;
811
+
812
+ return {
813
+ url: toPathString(localVarUrlObj),
814
+ options: localVarRequestOptions,
815
+ };
816
+ },
817
+ /**
818
+ *
819
+ * @summary Read document
820
+ * @param {string} documentId Document ID.
821
+ * @param {*} [options] Override http request option.
822
+ * @throws {RequiredError}
823
+ */
824
+ documentsControllerGetDocument: async (documentId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
825
+ // verify required parameter 'documentId' is not null or undefined
826
+ assertParamExists('documentsControllerGetDocument', 'documentId', documentId)
827
+ const localVarPath = `/documents/{documentId}`
828
+ .replace(`{${"documentId"}}`, encodeURIComponent(String(documentId)));
829
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
830
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
831
+ let baseOptions;
832
+ if (configuration) {
833
+ baseOptions = configuration.baseOptions;
834
+ }
835
+
836
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
837
+ const localVarHeaderParameter = {} as any;
838
+ const localVarQueryParameter = {} as any;
839
+
840
+ localVarHeaderParameter['Accept'] = 'application/json';
841
+
842
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
843
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
844
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
845
+
846
+ return {
847
+ url: toPathString(localVarUrlObj),
848
+ options: localVarRequestOptions,
849
+ };
850
+ },
851
+ /**
852
+ * List processed documents. Supports filtering by profileId.
853
+ * @summary List documents
854
+ * @param {number} [page] 1-based page number.
855
+ * @param {number} [limit] Page size.
856
+ * @param {string} [profileId] Filter documents by profile/config ID.
857
+ * @param {*} [options] Override http request option.
858
+ * @throws {RequiredError}
859
+ */
860
+ documentsControllerListDocuments: async (page?: number, limit?: number, profileId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
861
+ const localVarPath = `/documents`;
862
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
863
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
864
+ let baseOptions;
865
+ if (configuration) {
866
+ baseOptions = configuration.baseOptions;
867
+ }
868
+
869
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
870
+ const localVarHeaderParameter = {} as any;
871
+ const localVarQueryParameter = {} as any;
872
+
873
+ if (page !== undefined) {
874
+ localVarQueryParameter['page'] = page;
875
+ }
876
+
877
+ if (limit !== undefined) {
878
+ localVarQueryParameter['limit'] = limit;
879
+ }
880
+
881
+ if (profileId !== undefined) {
882
+ localVarQueryParameter['profileId'] = profileId;
883
+ }
884
+
885
+ localVarHeaderParameter['Accept'] = 'application/json';
886
+
887
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
888
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
889
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
890
+
891
+ return {
892
+ url: toPathString(localVarUrlObj),
893
+ options: localVarRequestOptions,
894
+ };
895
+ },
896
+ }
897
+ };
898
+
899
+ /**
900
+ * DocumentsApi - functional programming interface
901
+ */
902
+ export const DocumentsApiFp = function(configuration?: Configuration) {
903
+ const localVarAxiosParamCreator = DocumentsApiAxiosParamCreator(configuration)
904
+ return {
905
+ /**
906
+ * Upload a document file (pdf/md/html/docx/etc) via multipart form to start processing.
907
+ * @summary Create document processing job
908
+ * @param {string} profileId Profile/config ID to use for processing (maps to CLI --config).
909
+ * @param {File} file Document file to process (pdf/md/html/docx/etc).
910
+ * @param {string} [stages] Comma-separated stages to run (e.g., docling,chunking,graphrag). If omitted, auto-detected by server.
911
+ * @param {DocumentsControllerCreateDocumentPriorityEnum} [priority]
912
+ * @param {boolean} [visualize] Whether to generate graph visualization artifacts.
913
+ * @param {*} [options] Override http request option.
914
+ * @throws {RequiredError}
915
+ */
916
+ async documentsControllerCreateDocument(profileId: string, file: File, stages?: string, priority?: DocumentsControllerCreateDocumentPriorityEnum, visualize?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DocumentCreateResponseDto>> {
917
+ const localVarAxiosArgs = await localVarAxiosParamCreator.documentsControllerCreateDocument(profileId, file, stages, priority, visualize, options);
918
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
919
+ const localVarOperationServerBasePath = operationServerMap['DocumentsApi.documentsControllerCreateDocument']?.[localVarOperationServerIndex]?.url;
920
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
921
+ },
922
+ /**
923
+ *
924
+ * @summary Read document
925
+ * @param {string} documentId Document ID.
926
+ * @param {*} [options] Override http request option.
927
+ * @throws {RequiredError}
928
+ */
929
+ async documentsControllerGetDocument(documentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DocumentDto>> {
930
+ const localVarAxiosArgs = await localVarAxiosParamCreator.documentsControllerGetDocument(documentId, options);
931
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
932
+ const localVarOperationServerBasePath = operationServerMap['DocumentsApi.documentsControllerGetDocument']?.[localVarOperationServerIndex]?.url;
933
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
934
+ },
935
+ /**
936
+ * List processed documents. Supports filtering by profileId.
937
+ * @summary List documents
938
+ * @param {number} [page] 1-based page number.
939
+ * @param {number} [limit] Page size.
940
+ * @param {string} [profileId] Filter documents by profile/config ID.
941
+ * @param {*} [options] Override http request option.
942
+ * @throws {RequiredError}
943
+ */
944
+ async documentsControllerListDocuments(page?: number, limit?: number, profileId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaginatedDocumentsDto>> {
945
+ const localVarAxiosArgs = await localVarAxiosParamCreator.documentsControllerListDocuments(page, limit, profileId, options);
946
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
947
+ const localVarOperationServerBasePath = operationServerMap['DocumentsApi.documentsControllerListDocuments']?.[localVarOperationServerIndex]?.url;
948
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
949
+ },
950
+ }
951
+ };
952
+
953
+ /**
954
+ * DocumentsApi - factory interface
955
+ */
956
+ export const DocumentsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
957
+ const localVarFp = DocumentsApiFp(configuration)
958
+ return {
959
+ /**
960
+ * Upload a document file (pdf/md/html/docx/etc) via multipart form to start processing.
961
+ * @summary Create document processing job
962
+ * @param {string} profileId Profile/config ID to use for processing (maps to CLI --config).
963
+ * @param {File} file Document file to process (pdf/md/html/docx/etc).
964
+ * @param {string} [stages] Comma-separated stages to run (e.g., docling,chunking,graphrag). If omitted, auto-detected by server.
965
+ * @param {DocumentsControllerCreateDocumentPriorityEnum} [priority]
966
+ * @param {boolean} [visualize] Whether to generate graph visualization artifacts.
967
+ * @param {*} [options] Override http request option.
968
+ * @throws {RequiredError}
969
+ */
970
+ documentsControllerCreateDocument(profileId: string, file: File, stages?: string, priority?: DocumentsControllerCreateDocumentPriorityEnum, visualize?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<DocumentCreateResponseDto> {
971
+ return localVarFp.documentsControllerCreateDocument(profileId, file, stages, priority, visualize, options).then((request) => request(axios, basePath));
972
+ },
973
+ /**
974
+ *
975
+ * @summary Read document
976
+ * @param {string} documentId Document ID.
977
+ * @param {*} [options] Override http request option.
978
+ * @throws {RequiredError}
979
+ */
980
+ documentsControllerGetDocument(documentId: string, options?: RawAxiosRequestConfig): AxiosPromise<DocumentDto> {
981
+ return localVarFp.documentsControllerGetDocument(documentId, options).then((request) => request(axios, basePath));
982
+ },
983
+ /**
984
+ * List processed documents. Supports filtering by profileId.
985
+ * @summary List documents
986
+ * @param {number} [page] 1-based page number.
987
+ * @param {number} [limit] Page size.
988
+ * @param {string} [profileId] Filter documents by profile/config ID.
989
+ * @param {*} [options] Override http request option.
990
+ * @throws {RequiredError}
991
+ */
992
+ documentsControllerListDocuments(page?: number, limit?: number, profileId?: string, options?: RawAxiosRequestConfig): AxiosPromise<PaginatedDocumentsDto> {
993
+ return localVarFp.documentsControllerListDocuments(page, limit, profileId, options).then((request) => request(axios, basePath));
994
+ },
995
+ };
996
+ };
997
+
998
+ /**
999
+ * DocumentsApi - object-oriented interface
1000
+ */
1001
+ export class DocumentsApi extends BaseAPI {
1002
+ /**
1003
+ * Upload a document file (pdf/md/html/docx/etc) via multipart form to start processing.
1004
+ * @summary Create document processing job
1005
+ * @param {string} profileId Profile/config ID to use for processing (maps to CLI --config).
1006
+ * @param {File} file Document file to process (pdf/md/html/docx/etc).
1007
+ * @param {string} [stages] Comma-separated stages to run (e.g., docling,chunking,graphrag). If omitted, auto-detected by server.
1008
+ * @param {DocumentsControllerCreateDocumentPriorityEnum} [priority]
1009
+ * @param {boolean} [visualize] Whether to generate graph visualization artifacts.
1010
+ * @param {*} [options] Override http request option.
1011
+ * @throws {RequiredError}
1012
+ */
1013
+ public documentsControllerCreateDocument(profileId: string, file: File, stages?: string, priority?: DocumentsControllerCreateDocumentPriorityEnum, visualize?: boolean, options?: RawAxiosRequestConfig) {
1014
+ return DocumentsApiFp(this.configuration).documentsControllerCreateDocument(profileId, file, stages, priority, visualize, options).then((request) => request(this.axios, this.basePath));
1015
+ }
1016
+
1017
+ /**
1018
+ *
1019
+ * @summary Read document
1020
+ * @param {string} documentId Document ID.
1021
+ * @param {*} [options] Override http request option.
1022
+ * @throws {RequiredError}
1023
+ */
1024
+ public documentsControllerGetDocument(documentId: string, options?: RawAxiosRequestConfig) {
1025
+ return DocumentsApiFp(this.configuration).documentsControllerGetDocument(documentId, options).then((request) => request(this.axios, this.basePath));
1026
+ }
1027
+
1028
+ /**
1029
+ * List processed documents. Supports filtering by profileId.
1030
+ * @summary List documents
1031
+ * @param {number} [page] 1-based page number.
1032
+ * @param {number} [limit] Page size.
1033
+ * @param {string} [profileId] Filter documents by profile/config ID.
1034
+ * @param {*} [options] Override http request option.
1035
+ * @throws {RequiredError}
1036
+ */
1037
+ public documentsControllerListDocuments(page?: number, limit?: number, profileId?: string, options?: RawAxiosRequestConfig) {
1038
+ return DocumentsApiFp(this.configuration).documentsControllerListDocuments(page, limit, profileId, options).then((request) => request(this.axios, this.basePath));
1039
+ }
1040
+ }
1041
+
1042
+ export const DocumentsControllerCreateDocumentPriorityEnum = {
1043
+ Low: 'low',
1044
+ Normal: 'normal',
1045
+ High: 'high'
1046
+ } as const;
1047
+ export type DocumentsControllerCreateDocumentPriorityEnum = typeof DocumentsControllerCreateDocumentPriorityEnum[keyof typeof DocumentsControllerCreateDocumentPriorityEnum];
1048
+
1049
+
1050
+ /**
1051
+ * EvalsApi - axios parameter creator
1052
+ */
1053
+ export const EvalsApiAxiosParamCreator = function (configuration?: Configuration) {
1054
+ return {
1055
+ /**
1056
+ * Uploads an eval YAML (test cases) to run against a document.
1057
+ * @summary Create an eval from YAML
1058
+ * @param {string} documentId Document ID.
1059
+ * @param {File} yaml Eval YAML file (test cases).
1060
+ * @param {boolean} [watch] If true, server may keep the request open longer (optional); most clients should poll job status instead.
1061
+ * @param {*} [options] Override http request option.
1062
+ * @throws {RequiredError}
1063
+ */
1064
+ evalsControllerCreateEval: async (documentId: string, yaml: File, watch?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1065
+ // verify required parameter 'documentId' is not null or undefined
1066
+ assertParamExists('evalsControllerCreateEval', 'documentId', documentId)
1067
+ // verify required parameter 'yaml' is not null or undefined
1068
+ assertParamExists('evalsControllerCreateEval', 'yaml', yaml)
1069
+ const localVarPath = `/documents/{documentId}/evals`
1070
+ .replace(`{${"documentId"}}`, encodeURIComponent(String(documentId)));
1071
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1072
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1073
+ let baseOptions;
1074
+ if (configuration) {
1075
+ baseOptions = configuration.baseOptions;
1076
+ }
1077
+
1078
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
1079
+ const localVarHeaderParameter = {} as any;
1080
+ const localVarQueryParameter = {} as any;
1081
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
1082
+
1083
+
1084
+ if (yaml !== undefined) {
1085
+ localVarFormParams.append('yaml', yaml as any);
1086
+ }
1087
+
1088
+ if (watch !== undefined) {
1089
+ localVarFormParams.append('watch', String(watch) as any);
1090
+ }
1091
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
1092
+ localVarHeaderParameter['Accept'] = 'application/json';
1093
+
1094
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1095
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1096
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1097
+ localVarRequestOptions.data = localVarFormParams;
1098
+
1099
+ return {
1100
+ url: toPathString(localVarUrlObj),
1101
+ options: localVarRequestOptions,
1102
+ };
1103
+ },
1104
+ /**
1105
+ *
1106
+ * @summary Read eval
1107
+ * @param {string} documentId Document ID.
1108
+ * @param {string} evalId Evaluation ID.
1109
+ * @param {*} [options] Override http request option.
1110
+ * @throws {RequiredError}
1111
+ */
1112
+ evalsControllerGetEval: async (documentId: string, evalId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1113
+ // verify required parameter 'documentId' is not null or undefined
1114
+ assertParamExists('evalsControllerGetEval', 'documentId', documentId)
1115
+ // verify required parameter 'evalId' is not null or undefined
1116
+ assertParamExists('evalsControllerGetEval', 'evalId', evalId)
1117
+ const localVarPath = `/documents/{documentId}/evals/{evalId}`
1118
+ .replace(`{${"documentId"}}`, encodeURIComponent(String(documentId)))
1119
+ .replace(`{${"evalId"}}`, encodeURIComponent(String(evalId)));
1120
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1121
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1122
+ let baseOptions;
1123
+ if (configuration) {
1124
+ baseOptions = configuration.baseOptions;
1125
+ }
1126
+
1127
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1128
+ const localVarHeaderParameter = {} as any;
1129
+ const localVarQueryParameter = {} as any;
1130
+
1131
+ localVarHeaderParameter['Accept'] = 'application/json';
1132
+
1133
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1134
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1135
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1136
+
1137
+ return {
1138
+ url: toPathString(localVarUrlObj),
1139
+ options: localVarRequestOptions,
1140
+ };
1141
+ },
1142
+ /**
1143
+ *
1144
+ * @summary List evals for a document
1145
+ * @param {string} documentId Document ID.
1146
+ * @param {any} [limit] Page size.
1147
+ * @param {any} [page] 1-based page number.
1148
+ * @param {*} [options] Override http request option.
1149
+ * @throws {RequiredError}
1150
+ */
1151
+ evalsControllerListEvals: async (documentId: string, limit?: any, page?: any, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1152
+ // verify required parameter 'documentId' is not null or undefined
1153
+ assertParamExists('evalsControllerListEvals', 'documentId', documentId)
1154
+ const localVarPath = `/documents/{documentId}/evals`
1155
+ .replace(`{${"documentId"}}`, encodeURIComponent(String(documentId)));
1156
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1157
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1158
+ let baseOptions;
1159
+ if (configuration) {
1160
+ baseOptions = configuration.baseOptions;
1161
+ }
1162
+
1163
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1164
+ const localVarHeaderParameter = {} as any;
1165
+ const localVarQueryParameter = {} as any;
1166
+
1167
+ if (limit !== undefined) {
1168
+ for (const [key, value] of Object.entries(limit)) {
1169
+ localVarQueryParameter[key] = value;
1170
+ }
1171
+ }
1172
+
1173
+ if (page !== undefined) {
1174
+ for (const [key, value] of Object.entries(page)) {
1175
+ localVarQueryParameter[key] = value;
1176
+ }
1177
+ }
1178
+
1179
+ localVarHeaderParameter['Accept'] = 'application/json';
1180
+
1181
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1182
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1183
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1184
+
1185
+ return {
1186
+ url: toPathString(localVarUrlObj),
1187
+ options: localVarRequestOptions,
1188
+ };
1189
+ },
1190
+ /**
1191
+ * Validates an uploaded eval YAML without creating an eval.
1192
+ * @summary Validate eval YAML
1193
+ * @param {string} documentId Document ID.
1194
+ * @param {File} yaml YAML file to validate.
1195
+ * @param {*} [options] Override http request option.
1196
+ * @throws {RequiredError}
1197
+ */
1198
+ evalsControllerValidateEvalYaml: async (documentId: string, yaml: File, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1199
+ // verify required parameter 'documentId' is not null or undefined
1200
+ assertParamExists('evalsControllerValidateEvalYaml', 'documentId', documentId)
1201
+ // verify required parameter 'yaml' is not null or undefined
1202
+ assertParamExists('evalsControllerValidateEvalYaml', 'yaml', yaml)
1203
+ const localVarPath = `/documents/{documentId}/evals/validate`
1204
+ .replace(`{${"documentId"}}`, encodeURIComponent(String(documentId)));
1205
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1206
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1207
+ let baseOptions;
1208
+ if (configuration) {
1209
+ baseOptions = configuration.baseOptions;
1210
+ }
1211
+
1212
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
1213
+ const localVarHeaderParameter = {} as any;
1214
+ const localVarQueryParameter = {} as any;
1215
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
1216
+
1217
+
1218
+ if (yaml !== undefined) {
1219
+ localVarFormParams.append('yaml', yaml as any);
1220
+ }
1221
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
1222
+ localVarHeaderParameter['Accept'] = 'application/json';
1223
+
1224
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1225
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1226
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1227
+ localVarRequestOptions.data = localVarFormParams;
1228
+
1229
+ return {
1230
+ url: toPathString(localVarUrlObj),
1231
+ options: localVarRequestOptions,
1232
+ };
1233
+ },
1234
+ }
1235
+ };
1236
+
1237
+ /**
1238
+ * EvalsApi - functional programming interface
1239
+ */
1240
+ export const EvalsApiFp = function(configuration?: Configuration) {
1241
+ const localVarAxiosParamCreator = EvalsApiAxiosParamCreator(configuration)
1242
+ return {
1243
+ /**
1244
+ * Uploads an eval YAML (test cases) to run against a document.
1245
+ * @summary Create an eval from YAML
1246
+ * @param {string} documentId Document ID.
1247
+ * @param {File} yaml Eval YAML file (test cases).
1248
+ * @param {boolean} [watch] If true, server may keep the request open longer (optional); most clients should poll job status instead.
1249
+ * @param {*} [options] Override http request option.
1250
+ * @throws {RequiredError}
1251
+ */
1252
+ async evalsControllerCreateEval(documentId: string, yaml: File, watch?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EvalCreateResponseDto>> {
1253
+ const localVarAxiosArgs = await localVarAxiosParamCreator.evalsControllerCreateEval(documentId, yaml, watch, options);
1254
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1255
+ const localVarOperationServerBasePath = operationServerMap['EvalsApi.evalsControllerCreateEval']?.[localVarOperationServerIndex]?.url;
1256
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1257
+ },
1258
+ /**
1259
+ *
1260
+ * @summary Read eval
1261
+ * @param {string} documentId Document ID.
1262
+ * @param {string} evalId Evaluation ID.
1263
+ * @param {*} [options] Override http request option.
1264
+ * @throws {RequiredError}
1265
+ */
1266
+ async evalsControllerGetEval(documentId: string, evalId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EvalDto>> {
1267
+ const localVarAxiosArgs = await localVarAxiosParamCreator.evalsControllerGetEval(documentId, evalId, options);
1268
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1269
+ const localVarOperationServerBasePath = operationServerMap['EvalsApi.evalsControllerGetEval']?.[localVarOperationServerIndex]?.url;
1270
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1271
+ },
1272
+ /**
1273
+ *
1274
+ * @summary List evals for a document
1275
+ * @param {string} documentId Document ID.
1276
+ * @param {any} [limit] Page size.
1277
+ * @param {any} [page] 1-based page number.
1278
+ * @param {*} [options] Override http request option.
1279
+ * @throws {RequiredError}
1280
+ */
1281
+ async evalsControllerListEvals(documentId: string, limit?: any, page?: any, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaginatedEvalsDto>> {
1282
+ const localVarAxiosArgs = await localVarAxiosParamCreator.evalsControllerListEvals(documentId, limit, page, options);
1283
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1284
+ const localVarOperationServerBasePath = operationServerMap['EvalsApi.evalsControllerListEvals']?.[localVarOperationServerIndex]?.url;
1285
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1286
+ },
1287
+ /**
1288
+ * Validates an uploaded eval YAML without creating an eval.
1289
+ * @summary Validate eval YAML
1290
+ * @param {string} documentId Document ID.
1291
+ * @param {File} yaml YAML file to validate.
1292
+ * @param {*} [options] Override http request option.
1293
+ * @throws {RequiredError}
1294
+ */
1295
+ async evalsControllerValidateEvalYaml(documentId: string, yaml: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ValidationResultDto>> {
1296
+ const localVarAxiosArgs = await localVarAxiosParamCreator.evalsControllerValidateEvalYaml(documentId, yaml, options);
1297
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1298
+ const localVarOperationServerBasePath = operationServerMap['EvalsApi.evalsControllerValidateEvalYaml']?.[localVarOperationServerIndex]?.url;
1299
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1300
+ },
1301
+ }
1302
+ };
1303
+
1304
+ /**
1305
+ * EvalsApi - factory interface
1306
+ */
1307
+ export const EvalsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1308
+ const localVarFp = EvalsApiFp(configuration)
1309
+ return {
1310
+ /**
1311
+ * Uploads an eval YAML (test cases) to run against a document.
1312
+ * @summary Create an eval from YAML
1313
+ * @param {string} documentId Document ID.
1314
+ * @param {File} yaml Eval YAML file (test cases).
1315
+ * @param {boolean} [watch] If true, server may keep the request open longer (optional); most clients should poll job status instead.
1316
+ * @param {*} [options] Override http request option.
1317
+ * @throws {RequiredError}
1318
+ */
1319
+ evalsControllerCreateEval(documentId: string, yaml: File, watch?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<EvalCreateResponseDto> {
1320
+ return localVarFp.evalsControllerCreateEval(documentId, yaml, watch, options).then((request) => request(axios, basePath));
1321
+ },
1322
+ /**
1323
+ *
1324
+ * @summary Read eval
1325
+ * @param {string} documentId Document ID.
1326
+ * @param {string} evalId Evaluation ID.
1327
+ * @param {*} [options] Override http request option.
1328
+ * @throws {RequiredError}
1329
+ */
1330
+ evalsControllerGetEval(documentId: string, evalId: string, options?: RawAxiosRequestConfig): AxiosPromise<EvalDto> {
1331
+ return localVarFp.evalsControllerGetEval(documentId, evalId, options).then((request) => request(axios, basePath));
1332
+ },
1333
+ /**
1334
+ *
1335
+ * @summary List evals for a document
1336
+ * @param {string} documentId Document ID.
1337
+ * @param {any} [limit] Page size.
1338
+ * @param {any} [page] 1-based page number.
1339
+ * @param {*} [options] Override http request option.
1340
+ * @throws {RequiredError}
1341
+ */
1342
+ evalsControllerListEvals(documentId: string, limit?: any, page?: any, options?: RawAxiosRequestConfig): AxiosPromise<PaginatedEvalsDto> {
1343
+ return localVarFp.evalsControllerListEvals(documentId, limit, page, options).then((request) => request(axios, basePath));
1344
+ },
1345
+ /**
1346
+ * Validates an uploaded eval YAML without creating an eval.
1347
+ * @summary Validate eval YAML
1348
+ * @param {string} documentId Document ID.
1349
+ * @param {File} yaml YAML file to validate.
1350
+ * @param {*} [options] Override http request option.
1351
+ * @throws {RequiredError}
1352
+ */
1353
+ evalsControllerValidateEvalYaml(documentId: string, yaml: File, options?: RawAxiosRequestConfig): AxiosPromise<ValidationResultDto> {
1354
+ return localVarFp.evalsControllerValidateEvalYaml(documentId, yaml, options).then((request) => request(axios, basePath));
1355
+ },
1356
+ };
1357
+ };
1358
+
1359
+ /**
1360
+ * EvalsApi - object-oriented interface
1361
+ */
1362
+ export class EvalsApi extends BaseAPI {
1363
+ /**
1364
+ * Uploads an eval YAML (test cases) to run against a document.
1365
+ * @summary Create an eval from YAML
1366
+ * @param {string} documentId Document ID.
1367
+ * @param {File} yaml Eval YAML file (test cases).
1368
+ * @param {boolean} [watch] If true, server may keep the request open longer (optional); most clients should poll job status instead.
1369
+ * @param {*} [options] Override http request option.
1370
+ * @throws {RequiredError}
1371
+ */
1372
+ public evalsControllerCreateEval(documentId: string, yaml: File, watch?: boolean, options?: RawAxiosRequestConfig) {
1373
+ return EvalsApiFp(this.configuration).evalsControllerCreateEval(documentId, yaml, watch, options).then((request) => request(this.axios, this.basePath));
1374
+ }
1375
+
1376
+ /**
1377
+ *
1378
+ * @summary Read eval
1379
+ * @param {string} documentId Document ID.
1380
+ * @param {string} evalId Evaluation ID.
1381
+ * @param {*} [options] Override http request option.
1382
+ * @throws {RequiredError}
1383
+ */
1384
+ public evalsControllerGetEval(documentId: string, evalId: string, options?: RawAxiosRequestConfig) {
1385
+ return EvalsApiFp(this.configuration).evalsControllerGetEval(documentId, evalId, options).then((request) => request(this.axios, this.basePath));
1386
+ }
1387
+
1388
+ /**
1389
+ *
1390
+ * @summary List evals for a document
1391
+ * @param {string} documentId Document ID.
1392
+ * @param {any} [limit] Page size.
1393
+ * @param {any} [page] 1-based page number.
1394
+ * @param {*} [options] Override http request option.
1395
+ * @throws {RequiredError}
1396
+ */
1397
+ public evalsControllerListEvals(documentId: string, limit?: any, page?: any, options?: RawAxiosRequestConfig) {
1398
+ return EvalsApiFp(this.configuration).evalsControllerListEvals(documentId, limit, page, options).then((request) => request(this.axios, this.basePath));
1399
+ }
1400
+
1401
+ /**
1402
+ * Validates an uploaded eval YAML without creating an eval.
1403
+ * @summary Validate eval YAML
1404
+ * @param {string} documentId Document ID.
1405
+ * @param {File} yaml YAML file to validate.
1406
+ * @param {*} [options] Override http request option.
1407
+ * @throws {RequiredError}
1408
+ */
1409
+ public evalsControllerValidateEvalYaml(documentId: string, yaml: File, options?: RawAxiosRequestConfig) {
1410
+ return EvalsApiFp(this.configuration).evalsControllerValidateEvalYaml(documentId, yaml, options).then((request) => request(this.axios, this.basePath));
1411
+ }
1412
+ }
1413
+
1414
+
1415
+
1416
+ /**
1417
+ * HealthApi - axios parameter creator
1418
+ */
1419
+ export const HealthApiAxiosParamCreator = function (configuration?: Configuration) {
1420
+ return {
1421
+ /**
1422
+ * Returns service health including Redis, database, and GPU status.
1423
+ * @summary Get system health
1424
+ * @param {*} [options] Override http request option.
1425
+ * @throws {RequiredError}
1426
+ */
1427
+ healthControllerGetHealth: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1428
+ const localVarPath = `/health`;
1429
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1430
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1431
+ let baseOptions;
1432
+ if (configuration) {
1433
+ baseOptions = configuration.baseOptions;
1434
+ }
1435
+
1436
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1437
+ const localVarHeaderParameter = {} as any;
1438
+ const localVarQueryParameter = {} as any;
1439
+
1440
+ localVarHeaderParameter['Accept'] = 'application/json';
1441
+
1442
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1443
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1444
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1445
+
1446
+ return {
1447
+ url: toPathString(localVarUrlObj),
1448
+ options: localVarRequestOptions,
1449
+ };
1450
+ },
1451
+ }
1452
+ };
1453
+
1454
+ /**
1455
+ * HealthApi - functional programming interface
1456
+ */
1457
+ export const HealthApiFp = function(configuration?: Configuration) {
1458
+ const localVarAxiosParamCreator = HealthApiAxiosParamCreator(configuration)
1459
+ return {
1460
+ /**
1461
+ * Returns service health including Redis, database, and GPU status.
1462
+ * @summary Get system health
1463
+ * @param {*} [options] Override http request option.
1464
+ * @throws {RequiredError}
1465
+ */
1466
+ async healthControllerGetHealth(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<HealthResponseDto>> {
1467
+ const localVarAxiosArgs = await localVarAxiosParamCreator.healthControllerGetHealth(options);
1468
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1469
+ const localVarOperationServerBasePath = operationServerMap['HealthApi.healthControllerGetHealth']?.[localVarOperationServerIndex]?.url;
1470
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1471
+ },
1472
+ }
1473
+ };
1474
+
1475
+ /**
1476
+ * HealthApi - factory interface
1477
+ */
1478
+ export const HealthApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1479
+ const localVarFp = HealthApiFp(configuration)
1480
+ return {
1481
+ /**
1482
+ * Returns service health including Redis, database, and GPU status.
1483
+ * @summary Get system health
1484
+ * @param {*} [options] Override http request option.
1485
+ * @throws {RequiredError}
1486
+ */
1487
+ healthControllerGetHealth(options?: RawAxiosRequestConfig): AxiosPromise<HealthResponseDto> {
1488
+ return localVarFp.healthControllerGetHealth(options).then((request) => request(axios, basePath));
1489
+ },
1490
+ };
1491
+ };
1492
+
1493
+ /**
1494
+ * HealthApi - object-oriented interface
1495
+ */
1496
+ export class HealthApi extends BaseAPI {
1497
+ /**
1498
+ * Returns service health including Redis, database, and GPU status.
1499
+ * @summary Get system health
1500
+ * @param {*} [options] Override http request option.
1501
+ * @throws {RequiredError}
1502
+ */
1503
+ public healthControllerGetHealth(options?: RawAxiosRequestConfig) {
1504
+ return HealthApiFp(this.configuration).healthControllerGetHealth(options).then((request) => request(this.axios, this.basePath));
1505
+ }
1506
+ }
1507
+
1508
+
1509
+
1510
+ /**
1511
+ * JobsApi - axios parameter creator
1512
+ */
1513
+ export const JobsApiAxiosParamCreator = function (configuration?: Configuration) {
1514
+ return {
1515
+ /**
1516
+ *
1517
+ * @summary Read job
1518
+ * @param {string} jobId Job ID.
1519
+ * @param {*} [options] Override http request option.
1520
+ * @throws {RequiredError}
1521
+ */
1522
+ jobsControllerGetJob: async (jobId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1523
+ // verify required parameter 'jobId' is not null or undefined
1524
+ assertParamExists('jobsControllerGetJob', 'jobId', jobId)
1525
+ const localVarPath = `/jobs/{jobId}`
1526
+ .replace(`{${"jobId"}}`, encodeURIComponent(String(jobId)));
1527
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1528
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1529
+ let baseOptions;
1530
+ if (configuration) {
1531
+ baseOptions = configuration.baseOptions;
1532
+ }
1533
+
1534
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1535
+ const localVarHeaderParameter = {} as any;
1536
+ const localVarQueryParameter = {} as any;
1537
+
1538
+ localVarHeaderParameter['Accept'] = 'application/json';
1539
+
1540
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1541
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1542
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1543
+
1544
+ return {
1545
+ url: toPathString(localVarUrlObj),
1546
+ options: localVarRequestOptions,
1547
+ };
1548
+ },
1549
+ /**
1550
+ * Returns a lightweight status payload suitable for polling.
1551
+ * @summary Get job status
1552
+ * @param {string} jobId Job ID.
1553
+ * @param {*} [options] Override http request option.
1554
+ * @throws {RequiredError}
1555
+ */
1556
+ jobsControllerGetJobStatus: async (jobId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1557
+ // verify required parameter 'jobId' is not null or undefined
1558
+ assertParamExists('jobsControllerGetJobStatus', 'jobId', jobId)
1559
+ const localVarPath = `/jobs/{jobId}/status`
1560
+ .replace(`{${"jobId"}}`, encodeURIComponent(String(jobId)));
1561
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1562
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1563
+ let baseOptions;
1564
+ if (configuration) {
1565
+ baseOptions = configuration.baseOptions;
1566
+ }
1567
+
1568
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1569
+ const localVarHeaderParameter = {} as any;
1570
+ const localVarQueryParameter = {} as any;
1571
+
1572
+ localVarHeaderParameter['Accept'] = 'application/json';
1573
+
1574
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1575
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1576
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1577
+
1578
+ return {
1579
+ url: toPathString(localVarUrlObj),
1580
+ options: localVarRequestOptions,
1581
+ };
1582
+ },
1583
+ /**
1584
+ * Lists jobs for document processing, evaluations, and query jobs.
1585
+ * @summary List jobs
1586
+ * @param {number} [page] 1-based page number.
1587
+ * @param {number} [limit] Page size.
1588
+ * @param {*} [options] Override http request option.
1589
+ * @throws {RequiredError}
1590
+ */
1591
+ jobsControllerListJobs: async (page?: number, limit?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1592
+ const localVarPath = `/jobs`;
1593
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1594
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1595
+ let baseOptions;
1596
+ if (configuration) {
1597
+ baseOptions = configuration.baseOptions;
1598
+ }
1599
+
1600
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1601
+ const localVarHeaderParameter = {} as any;
1602
+ const localVarQueryParameter = {} as any;
1603
+
1604
+ if (page !== undefined) {
1605
+ localVarQueryParameter['page'] = page;
1606
+ }
1607
+
1608
+ if (limit !== undefined) {
1609
+ localVarQueryParameter['limit'] = limit;
1610
+ }
1611
+
1612
+ localVarHeaderParameter['Accept'] = 'application/json';
1613
+
1614
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1615
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1616
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1617
+
1618
+ return {
1619
+ url: toPathString(localVarUrlObj),
1620
+ options: localVarRequestOptions,
1621
+ };
1622
+ },
1623
+ }
1624
+ };
1625
+
1626
+ /**
1627
+ * JobsApi - functional programming interface
1628
+ */
1629
+ export const JobsApiFp = function(configuration?: Configuration) {
1630
+ const localVarAxiosParamCreator = JobsApiAxiosParamCreator(configuration)
1631
+ return {
1632
+ /**
1633
+ *
1634
+ * @summary Read job
1635
+ * @param {string} jobId Job ID.
1636
+ * @param {*} [options] Override http request option.
1637
+ * @throws {RequiredError}
1638
+ */
1639
+ async jobsControllerGetJob(jobId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<JobDto>> {
1640
+ const localVarAxiosArgs = await localVarAxiosParamCreator.jobsControllerGetJob(jobId, options);
1641
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1642
+ const localVarOperationServerBasePath = operationServerMap['JobsApi.jobsControllerGetJob']?.[localVarOperationServerIndex]?.url;
1643
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1644
+ },
1645
+ /**
1646
+ * Returns a lightweight status payload suitable for polling.
1647
+ * @summary Get job status
1648
+ * @param {string} jobId Job ID.
1649
+ * @param {*} [options] Override http request option.
1650
+ * @throws {RequiredError}
1651
+ */
1652
+ async jobsControllerGetJobStatus(jobId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<JobStatusDto>> {
1653
+ const localVarAxiosArgs = await localVarAxiosParamCreator.jobsControllerGetJobStatus(jobId, options);
1654
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1655
+ const localVarOperationServerBasePath = operationServerMap['JobsApi.jobsControllerGetJobStatus']?.[localVarOperationServerIndex]?.url;
1656
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1657
+ },
1658
+ /**
1659
+ * Lists jobs for document processing, evaluations, and query jobs.
1660
+ * @summary List jobs
1661
+ * @param {number} [page] 1-based page number.
1662
+ * @param {number} [limit] Page size.
1663
+ * @param {*} [options] Override http request option.
1664
+ * @throws {RequiredError}
1665
+ */
1666
+ async jobsControllerListJobs(page?: number, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaginatedJobsDto>> {
1667
+ const localVarAxiosArgs = await localVarAxiosParamCreator.jobsControllerListJobs(page, limit, options);
1668
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1669
+ const localVarOperationServerBasePath = operationServerMap['JobsApi.jobsControllerListJobs']?.[localVarOperationServerIndex]?.url;
1670
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1671
+ },
1672
+ }
1673
+ };
1674
+
1675
+ /**
1676
+ * JobsApi - factory interface
1677
+ */
1678
+ export const JobsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1679
+ const localVarFp = JobsApiFp(configuration)
1680
+ return {
1681
+ /**
1682
+ *
1683
+ * @summary Read job
1684
+ * @param {string} jobId Job ID.
1685
+ * @param {*} [options] Override http request option.
1686
+ * @throws {RequiredError}
1687
+ */
1688
+ jobsControllerGetJob(jobId: string, options?: RawAxiosRequestConfig): AxiosPromise<JobDto> {
1689
+ return localVarFp.jobsControllerGetJob(jobId, options).then((request) => request(axios, basePath));
1690
+ },
1691
+ /**
1692
+ * Returns a lightweight status payload suitable for polling.
1693
+ * @summary Get job status
1694
+ * @param {string} jobId Job ID.
1695
+ * @param {*} [options] Override http request option.
1696
+ * @throws {RequiredError}
1697
+ */
1698
+ jobsControllerGetJobStatus(jobId: string, options?: RawAxiosRequestConfig): AxiosPromise<JobStatusDto> {
1699
+ return localVarFp.jobsControllerGetJobStatus(jobId, options).then((request) => request(axios, basePath));
1700
+ },
1701
+ /**
1702
+ * Lists jobs for document processing, evaluations, and query jobs.
1703
+ * @summary List jobs
1704
+ * @param {number} [page] 1-based page number.
1705
+ * @param {number} [limit] Page size.
1706
+ * @param {*} [options] Override http request option.
1707
+ * @throws {RequiredError}
1708
+ */
1709
+ jobsControllerListJobs(page?: number, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<PaginatedJobsDto> {
1710
+ return localVarFp.jobsControllerListJobs(page, limit, options).then((request) => request(axios, basePath));
1711
+ },
1712
+ };
1713
+ };
1714
+
1715
+ /**
1716
+ * JobsApi - object-oriented interface
1717
+ */
1718
+ export class JobsApi extends BaseAPI {
1719
+ /**
1720
+ *
1721
+ * @summary Read job
1722
+ * @param {string} jobId Job ID.
1723
+ * @param {*} [options] Override http request option.
1724
+ * @throws {RequiredError}
1725
+ */
1726
+ public jobsControllerGetJob(jobId: string, options?: RawAxiosRequestConfig) {
1727
+ return JobsApiFp(this.configuration).jobsControllerGetJob(jobId, options).then((request) => request(this.axios, this.basePath));
1728
+ }
1729
+
1730
+ /**
1731
+ * Returns a lightweight status payload suitable for polling.
1732
+ * @summary Get job status
1733
+ * @param {string} jobId Job ID.
1734
+ * @param {*} [options] Override http request option.
1735
+ * @throws {RequiredError}
1736
+ */
1737
+ public jobsControllerGetJobStatus(jobId: string, options?: RawAxiosRequestConfig) {
1738
+ return JobsApiFp(this.configuration).jobsControllerGetJobStatus(jobId, options).then((request) => request(this.axios, this.basePath));
1739
+ }
1740
+
1741
+ /**
1742
+ * Lists jobs for document processing, evaluations, and query jobs.
1743
+ * @summary List jobs
1744
+ * @param {number} [page] 1-based page number.
1745
+ * @param {number} [limit] Page size.
1746
+ * @param {*} [options] Override http request option.
1747
+ * @throws {RequiredError}
1748
+ */
1749
+ public jobsControllerListJobs(page?: number, limit?: number, options?: RawAxiosRequestConfig) {
1750
+ return JobsApiFp(this.configuration).jobsControllerListJobs(page, limit, options).then((request) => request(this.axios, this.basePath));
1751
+ }
1752
+ }
1753
+
1754
+
1755
+
1756
+ /**
1757
+ * ProfilesApi - axios parameter creator
1758
+ */
1759
+ export const ProfilesApiAxiosParamCreator = function (configuration?: Configuration) {
1760
+ return {
1761
+ /**
1762
+ * Upload a YAML config file (multipart form). Do not inline YAML parameters in JSON.
1763
+ * @summary Create profile from YAML
1764
+ * @param {File} yaml YAML file containing the profile/config.
1765
+ * @param {string} [name] Optional override for profile name (otherwise derived from YAML).
1766
+ * @param {*} [options] Override http request option.
1767
+ * @throws {RequiredError}
1768
+ */
1769
+ profilesControllerCreateProfile: async (yaml: File, name?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1770
+ // verify required parameter 'yaml' is not null or undefined
1771
+ assertParamExists('profilesControllerCreateProfile', 'yaml', yaml)
1772
+ const localVarPath = `/profiles`;
1773
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1774
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1775
+ let baseOptions;
1776
+ if (configuration) {
1777
+ baseOptions = configuration.baseOptions;
1778
+ }
1779
+
1780
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
1781
+ const localVarHeaderParameter = {} as any;
1782
+ const localVarQueryParameter = {} as any;
1783
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
1784
+
1785
+
1786
+ if (yaml !== undefined) {
1787
+ localVarFormParams.append('yaml', yaml as any);
1788
+ }
1789
+
1790
+ if (name !== undefined) {
1791
+ localVarFormParams.append('name', name as any);
1792
+ }
1793
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
1794
+ localVarHeaderParameter['Accept'] = 'application/json';
1795
+
1796
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1797
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1798
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1799
+ localVarRequestOptions.data = localVarFormParams;
1800
+
1801
+ return {
1802
+ url: toPathString(localVarUrlObj),
1803
+ options: localVarRequestOptions,
1804
+ };
1805
+ },
1806
+ /**
1807
+ *
1808
+ * @summary Read profile
1809
+ * @param {string} profileId Profile/config ID.
1810
+ * @param {*} [options] Override http request option.
1811
+ * @throws {RequiredError}
1812
+ */
1813
+ profilesControllerGetProfile: async (profileId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1814
+ // verify required parameter 'profileId' is not null or undefined
1815
+ assertParamExists('profilesControllerGetProfile', 'profileId', profileId)
1816
+ const localVarPath = `/profiles/{profileId}`
1817
+ .replace(`{${"profileId"}}`, encodeURIComponent(String(profileId)));
1818
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1819
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1820
+ let baseOptions;
1821
+ if (configuration) {
1822
+ baseOptions = configuration.baseOptions;
1823
+ }
1824
+
1825
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1826
+ const localVarHeaderParameter = {} as any;
1827
+ const localVarQueryParameter = {} as any;
1828
+
1829
+ localVarHeaderParameter['Accept'] = 'application/json';
1830
+
1831
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1832
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1833
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1834
+
1835
+ return {
1836
+ url: toPathString(localVarUrlObj),
1837
+ options: localVarRequestOptions,
1838
+ };
1839
+ },
1840
+ /**
1841
+ * Returns the JSON schema for profile YAML configuration files.
1842
+ * @summary Get profile schema
1843
+ * @param {*} [options] Override http request option.
1844
+ * @throws {RequiredError}
1845
+ */
1846
+ profilesControllerGetProfileSchema: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1847
+ const localVarPath = `/profiles/schema`;
1848
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1849
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1850
+ let baseOptions;
1851
+ if (configuration) {
1852
+ baseOptions = configuration.baseOptions;
1853
+ }
1854
+
1855
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1856
+ const localVarHeaderParameter = {} as any;
1857
+ const localVarQueryParameter = {} as any;
1858
+
1859
+ localVarHeaderParameter['Accept'] = 'application/json';
1860
+
1861
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1862
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1863
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1864
+
1865
+ return {
1866
+ url: toPathString(localVarUrlObj),
1867
+ options: localVarRequestOptions,
1868
+ };
1869
+ },
1870
+ /**
1871
+ *
1872
+ * @summary List profiles
1873
+ * @param {number} [page] 1-based page number.
1874
+ * @param {number} [limit] Page size.
1875
+ * @param {*} [options] Override http request option.
1876
+ * @throws {RequiredError}
1877
+ */
1878
+ profilesControllerListProfiles: async (page?: number, limit?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1879
+ const localVarPath = `/profiles`;
1880
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1881
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1882
+ let baseOptions;
1883
+ if (configuration) {
1884
+ baseOptions = configuration.baseOptions;
1885
+ }
1886
+
1887
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1888
+ const localVarHeaderParameter = {} as any;
1889
+ const localVarQueryParameter = {} as any;
1890
+
1891
+ if (page !== undefined) {
1892
+ localVarQueryParameter['page'] = page;
1893
+ }
1894
+
1895
+ if (limit !== undefined) {
1896
+ localVarQueryParameter['limit'] = limit;
1897
+ }
1898
+
1899
+ localVarHeaderParameter['Accept'] = 'application/json';
1900
+
1901
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1902
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1903
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1904
+
1905
+ return {
1906
+ url: toPathString(localVarUrlObj),
1907
+ options: localVarRequestOptions,
1908
+ };
1909
+ },
1910
+ }
1911
+ };
1912
+
1913
+ /**
1914
+ * ProfilesApi - functional programming interface
1915
+ */
1916
+ export const ProfilesApiFp = function(configuration?: Configuration) {
1917
+ const localVarAxiosParamCreator = ProfilesApiAxiosParamCreator(configuration)
1918
+ return {
1919
+ /**
1920
+ * Upload a YAML config file (multipart form). Do not inline YAML parameters in JSON.
1921
+ * @summary Create profile from YAML
1922
+ * @param {File} yaml YAML file containing the profile/config.
1923
+ * @param {string} [name] Optional override for profile name (otherwise derived from YAML).
1924
+ * @param {*} [options] Override http request option.
1925
+ * @throws {RequiredError}
1926
+ */
1927
+ async profilesControllerCreateProfile(yaml: File, name?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProfileDto>> {
1928
+ const localVarAxiosArgs = await localVarAxiosParamCreator.profilesControllerCreateProfile(yaml, name, options);
1929
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1930
+ const localVarOperationServerBasePath = operationServerMap['ProfilesApi.profilesControllerCreateProfile']?.[localVarOperationServerIndex]?.url;
1931
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1932
+ },
1933
+ /**
1934
+ *
1935
+ * @summary Read profile
1936
+ * @param {string} profileId Profile/config ID.
1937
+ * @param {*} [options] Override http request option.
1938
+ * @throws {RequiredError}
1939
+ */
1940
+ async profilesControllerGetProfile(profileId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProfileDto>> {
1941
+ const localVarAxiosArgs = await localVarAxiosParamCreator.profilesControllerGetProfile(profileId, options);
1942
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1943
+ const localVarOperationServerBasePath = operationServerMap['ProfilesApi.profilesControllerGetProfile']?.[localVarOperationServerIndex]?.url;
1944
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1945
+ },
1946
+ /**
1947
+ * Returns the JSON schema for profile YAML configuration files.
1948
+ * @summary Get profile schema
1949
+ * @param {*} [options] Override http request option.
1950
+ * @throws {RequiredError}
1951
+ */
1952
+ async profilesControllerGetProfileSchema(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: any; }>> {
1953
+ const localVarAxiosArgs = await localVarAxiosParamCreator.profilesControllerGetProfileSchema(options);
1954
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1955
+ const localVarOperationServerBasePath = operationServerMap['ProfilesApi.profilesControllerGetProfileSchema']?.[localVarOperationServerIndex]?.url;
1956
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1957
+ },
1958
+ /**
1959
+ *
1960
+ * @summary List profiles
1961
+ * @param {number} [page] 1-based page number.
1962
+ * @param {number} [limit] Page size.
1963
+ * @param {*} [options] Override http request option.
1964
+ * @throws {RequiredError}
1965
+ */
1966
+ async profilesControllerListProfiles(page?: number, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaginatedProfilesDto>> {
1967
+ const localVarAxiosArgs = await localVarAxiosParamCreator.profilesControllerListProfiles(page, limit, options);
1968
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1969
+ const localVarOperationServerBasePath = operationServerMap['ProfilesApi.profilesControllerListProfiles']?.[localVarOperationServerIndex]?.url;
1970
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1971
+ },
1972
+ }
1973
+ };
1974
+
1975
+ /**
1976
+ * ProfilesApi - factory interface
1977
+ */
1978
+ export const ProfilesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1979
+ const localVarFp = ProfilesApiFp(configuration)
1980
+ return {
1981
+ /**
1982
+ * Upload a YAML config file (multipart form). Do not inline YAML parameters in JSON.
1983
+ * @summary Create profile from YAML
1984
+ * @param {File} yaml YAML file containing the profile/config.
1985
+ * @param {string} [name] Optional override for profile name (otherwise derived from YAML).
1986
+ * @param {*} [options] Override http request option.
1987
+ * @throws {RequiredError}
1988
+ */
1989
+ profilesControllerCreateProfile(yaml: File, name?: string, options?: RawAxiosRequestConfig): AxiosPromise<ProfileDto> {
1990
+ return localVarFp.profilesControllerCreateProfile(yaml, name, options).then((request) => request(axios, basePath));
1991
+ },
1992
+ /**
1993
+ *
1994
+ * @summary Read profile
1995
+ * @param {string} profileId Profile/config ID.
1996
+ * @param {*} [options] Override http request option.
1997
+ * @throws {RequiredError}
1998
+ */
1999
+ profilesControllerGetProfile(profileId: string, options?: RawAxiosRequestConfig): AxiosPromise<ProfileDto> {
2000
+ return localVarFp.profilesControllerGetProfile(profileId, options).then((request) => request(axios, basePath));
2001
+ },
2002
+ /**
2003
+ * Returns the JSON schema for profile YAML configuration files.
2004
+ * @summary Get profile schema
2005
+ * @param {*} [options] Override http request option.
2006
+ * @throws {RequiredError}
2007
+ */
2008
+ profilesControllerGetProfileSchema(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: any; }> {
2009
+ return localVarFp.profilesControllerGetProfileSchema(options).then((request) => request(axios, basePath));
2010
+ },
2011
+ /**
2012
+ *
2013
+ * @summary List profiles
2014
+ * @param {number} [page] 1-based page number.
2015
+ * @param {number} [limit] Page size.
2016
+ * @param {*} [options] Override http request option.
2017
+ * @throws {RequiredError}
2018
+ */
2019
+ profilesControllerListProfiles(page?: number, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<PaginatedProfilesDto> {
2020
+ return localVarFp.profilesControllerListProfiles(page, limit, options).then((request) => request(axios, basePath));
2021
+ },
2022
+ };
2023
+ };
2024
+
2025
+ /**
2026
+ * ProfilesApi - object-oriented interface
2027
+ */
2028
+ export class ProfilesApi extends BaseAPI {
2029
+ /**
2030
+ * Upload a YAML config file (multipart form). Do not inline YAML parameters in JSON.
2031
+ * @summary Create profile from YAML
2032
+ * @param {File} yaml YAML file containing the profile/config.
2033
+ * @param {string} [name] Optional override for profile name (otherwise derived from YAML).
2034
+ * @param {*} [options] Override http request option.
2035
+ * @throws {RequiredError}
2036
+ */
2037
+ public profilesControllerCreateProfile(yaml: File, name?: string, options?: RawAxiosRequestConfig) {
2038
+ return ProfilesApiFp(this.configuration).profilesControllerCreateProfile(yaml, name, options).then((request) => request(this.axios, this.basePath));
2039
+ }
2040
+
2041
+ /**
2042
+ *
2043
+ * @summary Read profile
2044
+ * @param {string} profileId Profile/config ID.
2045
+ * @param {*} [options] Override http request option.
2046
+ * @throws {RequiredError}
2047
+ */
2048
+ public profilesControllerGetProfile(profileId: string, options?: RawAxiosRequestConfig) {
2049
+ return ProfilesApiFp(this.configuration).profilesControllerGetProfile(profileId, options).then((request) => request(this.axios, this.basePath));
2050
+ }
2051
+
2052
+ /**
2053
+ * Returns the JSON schema for profile YAML configuration files.
2054
+ * @summary Get profile schema
2055
+ * @param {*} [options] Override http request option.
2056
+ * @throws {RequiredError}
2057
+ */
2058
+ public profilesControllerGetProfileSchema(options?: RawAxiosRequestConfig) {
2059
+ return ProfilesApiFp(this.configuration).profilesControllerGetProfileSchema(options).then((request) => request(this.axios, this.basePath));
2060
+ }
2061
+
2062
+ /**
2063
+ *
2064
+ * @summary List profiles
2065
+ * @param {number} [page] 1-based page number.
2066
+ * @param {number} [limit] Page size.
2067
+ * @param {*} [options] Override http request option.
2068
+ * @throws {RequiredError}
2069
+ */
2070
+ public profilesControllerListProfiles(page?: number, limit?: number, options?: RawAxiosRequestConfig) {
2071
+ return ProfilesApiFp(this.configuration).profilesControllerListProfiles(page, limit, options).then((request) => request(this.axios, this.basePath));
2072
+ }
2073
+ }
2074
+
2075
+
2076
+
2077
+ /**
2078
+ * QueriesApi - axios parameter creator
2079
+ */
2080
+ export const QueriesApiAxiosParamCreator = function (configuration?: Configuration) {
2081
+ return {
2082
+ /**
2083
+ * Uploads a batch queries YAML (multipart form). Typically schedules a job.
2084
+ * @summary Create batch query from YAML
2085
+ * @param {File} yaml Batch queries YAML file.
2086
+ * @param {boolean} [watch]
2087
+ * @param {*} [options] Override http request option.
2088
+ * @throws {RequiredError}
2089
+ */
2090
+ queriesControllerCreateQuery: async (yaml: File, watch?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2091
+ // verify required parameter 'yaml' is not null or undefined
2092
+ assertParamExists('queriesControllerCreateQuery', 'yaml', yaml)
2093
+ const localVarPath = `/query`;
2094
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2095
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2096
+ let baseOptions;
2097
+ if (configuration) {
2098
+ baseOptions = configuration.baseOptions;
2099
+ }
2100
+
2101
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
2102
+ const localVarHeaderParameter = {} as any;
2103
+ const localVarQueryParameter = {} as any;
2104
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
2105
+
2106
+
2107
+ if (yaml !== undefined) {
2108
+ localVarFormParams.append('yaml', yaml as any);
2109
+ }
2110
+
2111
+ if (watch !== undefined) {
2112
+ localVarFormParams.append('watch', String(watch) as any);
2113
+ }
2114
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
2115
+ localVarHeaderParameter['Accept'] = 'application/json';
2116
+
2117
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2118
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2119
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2120
+ localVarRequestOptions.data = localVarFormParams;
2121
+
2122
+ return {
2123
+ url: toPathString(localVarUrlObj),
2124
+ options: localVarRequestOptions,
2125
+ };
2126
+ },
2127
+ /**
2128
+ *
2129
+ * @summary Read batch query
2130
+ * @param {string} queryId Batch query ID.
2131
+ * @param {*} [options] Override http request option.
2132
+ * @throws {RequiredError}
2133
+ */
2134
+ queriesControllerGetQuery: async (queryId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2135
+ // verify required parameter 'queryId' is not null or undefined
2136
+ assertParamExists('queriesControllerGetQuery', 'queryId', queryId)
2137
+ const localVarPath = `/query/{queryId}`
2138
+ .replace(`{${"queryId"}}`, encodeURIComponent(String(queryId)));
2139
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2140
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2141
+ let baseOptions;
2142
+ if (configuration) {
2143
+ baseOptions = configuration.baseOptions;
2144
+ }
2145
+
2146
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2147
+ const localVarHeaderParameter = {} as any;
2148
+ const localVarQueryParameter = {} as any;
2149
+
2150
+ localVarHeaderParameter['Accept'] = 'application/json';
2151
+
2152
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2153
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2154
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2155
+
2156
+ return {
2157
+ url: toPathString(localVarUrlObj),
2158
+ options: localVarRequestOptions,
2159
+ };
2160
+ },
2161
+ /**
2162
+ * Lists batch query runs (submitted via YAML).
2163
+ * @summary List batch queries
2164
+ * @param {number} [page] 1-based page number.
2165
+ * @param {number} [limit] Page size.
2166
+ * @param {string} [documentId] Filter by document ID.
2167
+ * @param {*} [options] Override http request option.
2168
+ * @throws {RequiredError}
2169
+ */
2170
+ queriesControllerListQueries: async (page?: number, limit?: number, documentId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2171
+ const localVarPath = `/query`;
2172
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2173
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2174
+ let baseOptions;
2175
+ if (configuration) {
2176
+ baseOptions = configuration.baseOptions;
2177
+ }
2178
+
2179
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2180
+ const localVarHeaderParameter = {} as any;
2181
+ const localVarQueryParameter = {} as any;
2182
+
2183
+ if (page !== undefined) {
2184
+ localVarQueryParameter['page'] = page;
2185
+ }
2186
+
2187
+ if (limit !== undefined) {
2188
+ localVarQueryParameter['limit'] = limit;
2189
+ }
2190
+
2191
+ if (documentId !== undefined) {
2192
+ localVarQueryParameter['documentId'] = documentId;
2193
+ }
2194
+
2195
+ localVarHeaderParameter['Accept'] = 'application/json';
2196
+
2197
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2198
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2199
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2200
+
2201
+ return {
2202
+ url: toPathString(localVarUrlObj),
2203
+ options: localVarRequestOptions,
2204
+ };
2205
+ },
2206
+ /**
2207
+ * Validates an uploaded batch queries YAML without creating a query.
2208
+ * @summary Validate batch query YAML
2209
+ * @param {File} yaml YAML file to validate.
2210
+ * @param {*} [options] Override http request option.
2211
+ * @throws {RequiredError}
2212
+ */
2213
+ queriesControllerValidateQueryYaml: async (yaml: File, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2214
+ // verify required parameter 'yaml' is not null or undefined
2215
+ assertParamExists('queriesControllerValidateQueryYaml', 'yaml', yaml)
2216
+ const localVarPath = `/query/validate`;
2217
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2218
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2219
+ let baseOptions;
2220
+ if (configuration) {
2221
+ baseOptions = configuration.baseOptions;
2222
+ }
2223
+
2224
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
2225
+ const localVarHeaderParameter = {} as any;
2226
+ const localVarQueryParameter = {} as any;
2227
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
2228
+
2229
+
2230
+ if (yaml !== undefined) {
2231
+ localVarFormParams.append('yaml', yaml as any);
2232
+ }
2233
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
2234
+ localVarHeaderParameter['Accept'] = 'application/json';
2235
+
2236
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2237
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2238
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2239
+ localVarRequestOptions.data = localVarFormParams;
2240
+
2241
+ return {
2242
+ url: toPathString(localVarUrlObj),
2243
+ options: localVarRequestOptions,
2244
+ };
2245
+ },
2246
+ }
2247
+ };
2248
+
2249
+ /**
2250
+ * QueriesApi - functional programming interface
2251
+ */
2252
+ export const QueriesApiFp = function(configuration?: Configuration) {
2253
+ const localVarAxiosParamCreator = QueriesApiAxiosParamCreator(configuration)
2254
+ return {
2255
+ /**
2256
+ * Uploads a batch queries YAML (multipart form). Typically schedules a job.
2257
+ * @summary Create batch query from YAML
2258
+ * @param {File} yaml Batch queries YAML file.
2259
+ * @param {boolean} [watch]
2260
+ * @param {*} [options] Override http request option.
2261
+ * @throws {RequiredError}
2262
+ */
2263
+ async queriesControllerCreateQuery(yaml: File, watch?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<QueryCreateResponseDto>> {
2264
+ const localVarAxiosArgs = await localVarAxiosParamCreator.queriesControllerCreateQuery(yaml, watch, options);
2265
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2266
+ const localVarOperationServerBasePath = operationServerMap['QueriesApi.queriesControllerCreateQuery']?.[localVarOperationServerIndex]?.url;
2267
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2268
+ },
2269
+ /**
2270
+ *
2271
+ * @summary Read batch query
2272
+ * @param {string} queryId Batch query ID.
2273
+ * @param {*} [options] Override http request option.
2274
+ * @throws {RequiredError}
2275
+ */
2276
+ async queriesControllerGetQuery(queryId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BatchQueryDto>> {
2277
+ const localVarAxiosArgs = await localVarAxiosParamCreator.queriesControllerGetQuery(queryId, options);
2278
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2279
+ const localVarOperationServerBasePath = operationServerMap['QueriesApi.queriesControllerGetQuery']?.[localVarOperationServerIndex]?.url;
2280
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2281
+ },
2282
+ /**
2283
+ * Lists batch query runs (submitted via YAML).
2284
+ * @summary List batch queries
2285
+ * @param {number} [page] 1-based page number.
2286
+ * @param {number} [limit] Page size.
2287
+ * @param {string} [documentId] Filter by document ID.
2288
+ * @param {*} [options] Override http request option.
2289
+ * @throws {RequiredError}
2290
+ */
2291
+ async queriesControllerListQueries(page?: number, limit?: number, documentId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaginatedQueriesDto>> {
2292
+ const localVarAxiosArgs = await localVarAxiosParamCreator.queriesControllerListQueries(page, limit, documentId, options);
2293
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2294
+ const localVarOperationServerBasePath = operationServerMap['QueriesApi.queriesControllerListQueries']?.[localVarOperationServerIndex]?.url;
2295
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2296
+ },
2297
+ /**
2298
+ * Validates an uploaded batch queries YAML without creating a query.
2299
+ * @summary Validate batch query YAML
2300
+ * @param {File} yaml YAML file to validate.
2301
+ * @param {*} [options] Override http request option.
2302
+ * @throws {RequiredError}
2303
+ */
2304
+ async queriesControllerValidateQueryYaml(yaml: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ValidationResultDto>> {
2305
+ const localVarAxiosArgs = await localVarAxiosParamCreator.queriesControllerValidateQueryYaml(yaml, options);
2306
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2307
+ const localVarOperationServerBasePath = operationServerMap['QueriesApi.queriesControllerValidateQueryYaml']?.[localVarOperationServerIndex]?.url;
2308
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2309
+ },
2310
+ }
2311
+ };
2312
+
2313
+ /**
2314
+ * QueriesApi - factory interface
2315
+ */
2316
+ export const QueriesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
2317
+ const localVarFp = QueriesApiFp(configuration)
2318
+ return {
2319
+ /**
2320
+ * Uploads a batch queries YAML (multipart form). Typically schedules a job.
2321
+ * @summary Create batch query from YAML
2322
+ * @param {File} yaml Batch queries YAML file.
2323
+ * @param {boolean} [watch]
2324
+ * @param {*} [options] Override http request option.
2325
+ * @throws {RequiredError}
2326
+ */
2327
+ queriesControllerCreateQuery(yaml: File, watch?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<QueryCreateResponseDto> {
2328
+ return localVarFp.queriesControllerCreateQuery(yaml, watch, options).then((request) => request(axios, basePath));
2329
+ },
2330
+ /**
2331
+ *
2332
+ * @summary Read batch query
2333
+ * @param {string} queryId Batch query ID.
2334
+ * @param {*} [options] Override http request option.
2335
+ * @throws {RequiredError}
2336
+ */
2337
+ queriesControllerGetQuery(queryId: string, options?: RawAxiosRequestConfig): AxiosPromise<BatchQueryDto> {
2338
+ return localVarFp.queriesControllerGetQuery(queryId, options).then((request) => request(axios, basePath));
2339
+ },
2340
+ /**
2341
+ * Lists batch query runs (submitted via YAML).
2342
+ * @summary List batch queries
2343
+ * @param {number} [page] 1-based page number.
2344
+ * @param {number} [limit] Page size.
2345
+ * @param {string} [documentId] Filter by document ID.
2346
+ * @param {*} [options] Override http request option.
2347
+ * @throws {RequiredError}
2348
+ */
2349
+ queriesControllerListQueries(page?: number, limit?: number, documentId?: string, options?: RawAxiosRequestConfig): AxiosPromise<PaginatedQueriesDto> {
2350
+ return localVarFp.queriesControllerListQueries(page, limit, documentId, options).then((request) => request(axios, basePath));
2351
+ },
2352
+ /**
2353
+ * Validates an uploaded batch queries YAML without creating a query.
2354
+ * @summary Validate batch query YAML
2355
+ * @param {File} yaml YAML file to validate.
2356
+ * @param {*} [options] Override http request option.
2357
+ * @throws {RequiredError}
2358
+ */
2359
+ queriesControllerValidateQueryYaml(yaml: File, options?: RawAxiosRequestConfig): AxiosPromise<ValidationResultDto> {
2360
+ return localVarFp.queriesControllerValidateQueryYaml(yaml, options).then((request) => request(axios, basePath));
2361
+ },
2362
+ };
2363
+ };
2364
+
2365
+ /**
2366
+ * QueriesApi - object-oriented interface
2367
+ */
2368
+ export class QueriesApi extends BaseAPI {
2369
+ /**
2370
+ * Uploads a batch queries YAML (multipart form). Typically schedules a job.
2371
+ * @summary Create batch query from YAML
2372
+ * @param {File} yaml Batch queries YAML file.
2373
+ * @param {boolean} [watch]
2374
+ * @param {*} [options] Override http request option.
2375
+ * @throws {RequiredError}
2376
+ */
2377
+ public queriesControllerCreateQuery(yaml: File, watch?: boolean, options?: RawAxiosRequestConfig) {
2378
+ return QueriesApiFp(this.configuration).queriesControllerCreateQuery(yaml, watch, options).then((request) => request(this.axios, this.basePath));
2379
+ }
2380
+
2381
+ /**
2382
+ *
2383
+ * @summary Read batch query
2384
+ * @param {string} queryId Batch query ID.
2385
+ * @param {*} [options] Override http request option.
2386
+ * @throws {RequiredError}
2387
+ */
2388
+ public queriesControllerGetQuery(queryId: string, options?: RawAxiosRequestConfig) {
2389
+ return QueriesApiFp(this.configuration).queriesControllerGetQuery(queryId, options).then((request) => request(this.axios, this.basePath));
2390
+ }
2391
+
2392
+ /**
2393
+ * Lists batch query runs (submitted via YAML).
2394
+ * @summary List batch queries
2395
+ * @param {number} [page] 1-based page number.
2396
+ * @param {number} [limit] Page size.
2397
+ * @param {string} [documentId] Filter by document ID.
2398
+ * @param {*} [options] Override http request option.
2399
+ * @throws {RequiredError}
2400
+ */
2401
+ public queriesControllerListQueries(page?: number, limit?: number, documentId?: string, options?: RawAxiosRequestConfig) {
2402
+ return QueriesApiFp(this.configuration).queriesControllerListQueries(page, limit, documentId, options).then((request) => request(this.axios, this.basePath));
2403
+ }
2404
+
2405
+ /**
2406
+ * Validates an uploaded batch queries YAML without creating a query.
2407
+ * @summary Validate batch query YAML
2408
+ * @param {File} yaml YAML file to validate.
2409
+ * @param {*} [options] Override http request option.
2410
+ * @throws {RequiredError}
2411
+ */
2412
+ public queriesControllerValidateQueryYaml(yaml: File, options?: RawAxiosRequestConfig) {
2413
+ return QueriesApiFp(this.configuration).queriesControllerValidateQueryYaml(yaml, options).then((request) => request(this.axios, this.basePath));
2414
+ }
2415
+ }
2416
+
2417
+
2418
+
2419
+ /**
2420
+ * SourcesApi - axios parameter creator
2421
+ */
2422
+ export const SourcesApiAxiosParamCreator = function (configuration?: Configuration) {
2423
+ return {
2424
+ /**
2425
+ * Returns source data used to produce answers/results. If sourceId is provided, returns the matching source. Otherwise returns a list.
2426
+ * @summary Read document sources
2427
+ * @param {string} documentId Document ID.
2428
+ * @param {any} [jobId] Optional job ID to scope sources to a specific query job.
2429
+ * @param {any} [sourceId] Optional source ID (full or partial) to retrieve a specific source.
2430
+ * @param {*} [options] Override http request option.
2431
+ * @throws {RequiredError}
2432
+ */
2433
+ sourcesControllerGetDocumentSources: async (documentId: string, jobId?: any, sourceId?: any, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2434
+ // verify required parameter 'documentId' is not null or undefined
2435
+ assertParamExists('sourcesControllerGetDocumentSources', 'documentId', documentId)
2436
+ const localVarPath = `/documents/{documentId}/sources`
2437
+ .replace(`{${"documentId"}}`, encodeURIComponent(String(documentId)));
2438
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2439
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2440
+ let baseOptions;
2441
+ if (configuration) {
2442
+ baseOptions = configuration.baseOptions;
2443
+ }
2444
+
2445
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2446
+ const localVarHeaderParameter = {} as any;
2447
+ const localVarQueryParameter = {} as any;
2448
+
2449
+ if (jobId !== undefined) {
2450
+ for (const [key, value] of Object.entries(jobId)) {
2451
+ localVarQueryParameter[key] = value;
2452
+ }
2453
+ }
2454
+
2455
+ if (sourceId !== undefined) {
2456
+ for (const [key, value] of Object.entries(sourceId)) {
2457
+ localVarQueryParameter[key] = value;
2458
+ }
2459
+ }
2460
+
2461
+ localVarHeaderParameter['Accept'] = 'application/json';
2462
+
2463
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2464
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2465
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2466
+
2467
+ return {
2468
+ url: toPathString(localVarUrlObj),
2469
+ options: localVarRequestOptions,
2470
+ };
2471
+ },
2472
+ }
2473
+ };
2474
+
2475
+ /**
2476
+ * SourcesApi - functional programming interface
2477
+ */
2478
+ export const SourcesApiFp = function(configuration?: Configuration) {
2479
+ const localVarAxiosParamCreator = SourcesApiAxiosParamCreator(configuration)
2480
+ return {
2481
+ /**
2482
+ * Returns source data used to produce answers/results. If sourceId is provided, returns the matching source. Otherwise returns a list.
2483
+ * @summary Read document sources
2484
+ * @param {string} documentId Document ID.
2485
+ * @param {any} [jobId] Optional job ID to scope sources to a specific query job.
2486
+ * @param {any} [sourceId] Optional source ID (full or partial) to retrieve a specific source.
2487
+ * @param {*} [options] Override http request option.
2488
+ * @throws {RequiredError}
2489
+ */
2490
+ async sourcesControllerGetDocumentSources(documentId: string, jobId?: any, sourceId?: any, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DocumentSourcesResponseDto>> {
2491
+ const localVarAxiosArgs = await localVarAxiosParamCreator.sourcesControllerGetDocumentSources(documentId, jobId, sourceId, options);
2492
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2493
+ const localVarOperationServerBasePath = operationServerMap['SourcesApi.sourcesControllerGetDocumentSources']?.[localVarOperationServerIndex]?.url;
2494
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2495
+ },
2496
+ }
2497
+ };
2498
+
2499
+ /**
2500
+ * SourcesApi - factory interface
2501
+ */
2502
+ export const SourcesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
2503
+ const localVarFp = SourcesApiFp(configuration)
2504
+ return {
2505
+ /**
2506
+ * Returns source data used to produce answers/results. If sourceId is provided, returns the matching source. Otherwise returns a list.
2507
+ * @summary Read document sources
2508
+ * @param {string} documentId Document ID.
2509
+ * @param {any} [jobId] Optional job ID to scope sources to a specific query job.
2510
+ * @param {any} [sourceId] Optional source ID (full or partial) to retrieve a specific source.
2511
+ * @param {*} [options] Override http request option.
2512
+ * @throws {RequiredError}
2513
+ */
2514
+ sourcesControllerGetDocumentSources(documentId: string, jobId?: any, sourceId?: any, options?: RawAxiosRequestConfig): AxiosPromise<DocumentSourcesResponseDto> {
2515
+ return localVarFp.sourcesControllerGetDocumentSources(documentId, jobId, sourceId, options).then((request) => request(axios, basePath));
2516
+ },
2517
+ };
2518
+ };
2519
+
2520
+ /**
2521
+ * SourcesApi - object-oriented interface
2522
+ */
2523
+ export class SourcesApi extends BaseAPI {
2524
+ /**
2525
+ * Returns source data used to produce answers/results. If sourceId is provided, returns the matching source. Otherwise returns a list.
2526
+ * @summary Read document sources
2527
+ * @param {string} documentId Document ID.
2528
+ * @param {any} [jobId] Optional job ID to scope sources to a specific query job.
2529
+ * @param {any} [sourceId] Optional source ID (full or partial) to retrieve a specific source.
2530
+ * @param {*} [options] Override http request option.
2531
+ * @throws {RequiredError}
2532
+ */
2533
+ public sourcesControllerGetDocumentSources(documentId: string, jobId?: any, sourceId?: any, options?: RawAxiosRequestConfig) {
2534
+ return SourcesApiFp(this.configuration).sourcesControllerGetDocumentSources(documentId, jobId, sourceId, options).then((request) => request(this.axios, this.basePath));
2535
+ }
2536
+ }
2537
+
2538
+
2539
+