@antfly/sdk 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -6,1454 +6,1159 @@ import { Client } from 'openapi-fetch';
6
6
  */
7
7
 
8
8
  interface paths {
9
- "/query": {
10
- parameters: {
11
- query?: never;
12
- header?: never;
13
- path?: never;
14
- cookie?: never;
15
- };
16
- get?: never;
17
- put?: never;
18
- /**
19
- * Perform a global query
20
- * @description Executes a query across all relevant tables and shards based on the query content.
21
- */
22
- post: operations["globalQuery"];
23
- delete?: never;
24
- options?: never;
25
- head?: never;
26
- patch?: never;
27
- trace?: never;
28
- };
29
- "/table": {
30
- parameters: {
31
- query?: never;
32
- header?: never;
33
- path?: never;
34
- cookie?: never;
35
- };
36
- /** List all tables */
37
- get: operations["listTables"];
38
- put?: never;
39
- post?: never;
40
- delete?: never;
41
- options?: never;
42
- head?: never;
43
- patch?: never;
44
- trace?: never;
45
- };
46
- "/table/{tableName}": {
47
- parameters: {
48
- query?: never;
49
- header?: never;
50
- path: {
51
- /** @description Name of the table */
52
- tableName: string;
53
- };
54
- cookie?: never;
55
- };
56
- /** Get table details */
57
- get: operations["getTable"];
58
- put?: never;
59
- /** Create a new table */
60
- post: operations["createTable"];
61
- /** Drop a table */
62
- delete: operations["dropTable"];
63
- options?: never;
64
- head?: never;
65
- patch?: never;
66
- trace?: never;
67
- };
68
- "/table/{tableName}/query": {
69
- parameters: {
70
- query?: never;
71
- header?: never;
72
- path: {
73
- /** @description Name of the table to query */
74
- tableName: string;
75
- };
76
- cookie?: never;
77
- };
78
- get?: never;
79
- put?: never;
80
- /** Query a specific table */
81
- post: operations["queryTable"];
82
- delete?: never;
83
- options?: never;
84
- head?: never;
85
- patch?: never;
86
- trace?: never;
87
- };
88
- "/table/{tableName}/batch": {
89
- parameters: {
90
- query?: never;
91
- header?: never;
92
- path: {
93
- /** @description Name of the table for batch operation */
94
- tableName: string;
95
- };
96
- cookie?: never;
97
- };
98
- get?: never;
99
- put?: never;
100
- /** Perform batch inserts and deletes on a table */
101
- post: operations["batchTableOperations"];
102
- delete?: never;
103
- options?: never;
104
- head?: never;
105
- patch?: never;
106
- trace?: never;
107
- };
108
- "/table/{tableName}/backup": {
109
- parameters: {
110
- query?: never;
111
- header?: never;
112
- path: {
113
- /** @description Name of the table to backup */
114
- tableName: string;
115
- };
116
- cookie?: never;
117
- };
118
- get?: never;
119
- put?: never;
120
- /** Backup a table */
121
- post: operations["backupTable"];
122
- delete?: never;
123
- options?: never;
124
- head?: never;
125
- patch?: never;
126
- trace?: never;
127
- };
128
- "/table/{tableName}/restore": {
129
- parameters: {
130
- query?: never;
131
- header?: never;
132
- path: {
133
- /** @description Name of the table to restore into */
134
- tableName: string;
135
- };
136
- cookie?: never;
137
- };
138
- get?: never;
139
- put?: never;
140
- /** Restore a table from backup */
141
- post: operations["restoreTable"];
142
- delete?: never;
143
- options?: never;
144
- head?: never;
145
- patch?: never;
146
- trace?: never;
147
- };
148
- "/table/{tableName}/key/{key}": {
149
- parameters: {
150
- query?: never;
151
- header?: never;
152
- path: {
153
- /** @description Name of the table */
154
- tableName: string;
155
- /** @description Key of the record to lookup */
156
- key: string;
157
- };
158
- cookie?: never;
159
- };
160
- /** Lookup a key in a table */
161
- get: operations["lookupKey"];
162
- put?: never;
163
- post?: never;
164
- delete?: never;
165
- options?: never;
166
- head?: never;
167
- patch?: never;
168
- trace?: never;
169
- };
170
- "/table/{tableName}/index": {
171
- parameters: {
172
- query?: never;
173
- header?: never;
174
- path: {
175
- /** @description Name of the table */
176
- tableName: string;
177
- };
178
- cookie?: never;
179
- };
180
- /** List all indexes for a table */
181
- get: operations["listIndexes"];
182
- put?: never;
183
- post?: never;
184
- delete?: never;
185
- options?: never;
186
- head?: never;
187
- patch?: never;
188
- trace?: never;
189
- };
190
- "/table/{tableName}/index/{indexName}": {
191
- parameters: {
192
- query?: never;
193
- header?: never;
194
- path: {
195
- /** @description Name of the table */
196
- tableName: string;
197
- /** @description Name of the index */
198
- indexName: string;
199
- };
200
- cookie?: never;
201
- };
202
- /** Get index details */
203
- get: operations["getIndex"];
204
- put?: never;
205
- /** Add an index to a table */
206
- post: operations["createIndex"];
207
- /** Drop an index from a table */
208
- delete: operations["dropIndex"];
209
- options?: never;
210
- head?: never;
211
- patch?: never;
212
- trace?: never;
213
- };
214
- "/user/{userName}": {
215
- parameters: {
216
- query?: never;
217
- header?: never;
218
- path: {
219
- /** @description The username. */
220
- userName: components["parameters"]["UserNamePathParameter"];
221
- };
222
- cookie?: never;
223
- };
224
- /**
225
- * Get user details
226
- * @description Retrieves details for a specific user.
227
- */
228
- get: operations["getUserByName"];
229
- put?: never;
230
- /**
231
- * Create a new user
232
- * @description Creates a new user with the given username and password. Username in path takes precedence.
233
- */
234
- post: operations["createUser"];
235
- /**
236
- * Delete a user
237
- * @description Deletes a specific user.
238
- */
239
- delete: operations["deleteUser"];
240
- options?: never;
241
- head?: never;
242
- patch?: never;
243
- trace?: never;
244
- };
245
- "/user/{userName}/password": {
246
- parameters: {
247
- query?: never;
248
- header?: never;
249
- path: {
250
- /** @description The username. */
251
- userName: components["parameters"]["UserNamePathParameter"];
252
- };
253
- cookie?: never;
254
- };
255
- get?: never;
256
- /**
257
- * Update user password
258
- * @description Updates the password for a specific user.
259
- */
260
- put: operations["updateUserPassword"];
261
- post?: never;
262
- delete?: never;
263
- options?: never;
264
- head?: never;
265
- patch?: never;
266
- trace?: never;
267
- };
268
- "/user/{userName}/permission": {
269
- parameters: {
270
- query?: never;
271
- header?: never;
272
- path: {
273
- /** @description The username. */
274
- userName: components["parameters"]["UserNamePathParameter"];
275
- };
276
- cookie?: never;
277
- };
278
- /**
279
- * Get user permissions
280
- * @description Retrieves all permissions for a specific user.
281
- */
282
- get: operations["getUserPermissions"];
283
- put?: never;
284
- /**
285
- * Add permission to user
286
- * @description Adds a new permission to a specific user.
287
- */
288
- post: operations["addPermissionToUser"];
289
- /**
290
- * Remove permission from user
291
- * @description Removes a specific permission rule from a user based on resource name and type.
292
- */
293
- delete: operations["removePermissionFromUser"];
294
- options?: never;
295
- head?: never;
296
- patch?: never;
297
- trace?: never;
9
+ "/query": {
10
+ /**
11
+ * Executes a query across all relevant tables and shards based on the query content.
12
+ * IMPORTANT: The final line of data must end with a newline character \n. Each newline character may be preceded by a carriage return \r. When sending requests to this endpoint the Content-Type header should be set to application/x-ndjson.
13
+ */
14
+ post: operations["globalQuery"];
15
+ };
16
+ "/table": {
17
+ get: operations["listTables"];
18
+ };
19
+ "/table/{tableName}": {
20
+ get: operations["getTable"];
21
+ post: operations["createTable"];
22
+ delete: operations["dropTable"];
23
+ parameters: {
24
+ path: {
25
+ /** Name of the table */
26
+ tableName: string;
27
+ };
298
28
  };
299
- }
300
- interface components {
301
- schemas: {
302
- Error: {
303
- /** @example An error message */
304
- error: string;
305
- };
306
- ByteRange: string[];
307
- ShardConfig: {
308
- byte_range: components["schemas"]["ByteRange"];
309
- };
310
- CreateTableRequest: {
311
- /** Format: uint */
312
- num_shards?: number;
313
- indexes?: {
314
- [key: string]: components["schemas"]["CreateIndexRequest"];
315
- };
316
- schema?: components["schemas"]["TableSchema"];
317
- };
318
- Table: {
319
- name: string;
320
- indexes: {
321
- [key: string]: components["schemas"]["IndexConfig"];
322
- };
323
- shards: {
324
- [key: string]: components["schemas"]["ShardConfig"];
325
- };
326
- schema?: components["schemas"]["TableSchema"];
327
- };
328
- ValueSchema: {
329
- type: components["schemas"]["ValueType"];
330
- /** @description For object types, this schema defines the structure of the content.
331
- * For other types, this field is ignored.
332
- * */
333
- schema?: components["schemas"]["DocumentSchema"];
334
- };
335
- DocumentSchema: {
336
- /** @description A map of field names to their value schema (type, defaults, configuration etc.).
337
- * This allows for flexible content types per field.
338
- * The key is the field name, and the value is the value type schema.
339
- * */
340
- fields?: {
341
- [key: string]: components["schemas"]["ValueSchema"];
342
- };
343
- };
344
- TableSchema: {
345
- key?: string;
346
- /** @description Default type to use from the document_types.
347
- * */
348
- default_type?: string;
349
- document_types?: {
350
- [key: string]: components["schemas"]["DocumentSchema"];
351
- };
352
- };
353
- DateRange: {
354
- name: string;
355
- from?: string;
356
- to?: string;
357
- };
358
- NumericRange: {
359
- name: string;
360
- /** Format: float */
361
- from?: number;
362
- /** Format: float */
363
- to?: number;
364
- };
365
- TermFacetResult: {
366
- term: string;
367
- count: number;
368
- };
369
- DateRangeResult: components["schemas"]["DateRange"] & {
370
- count: number;
371
- };
372
- NumericRangeResult: components["schemas"]["NumericRange"] & {
373
- count: number;
374
- };
375
- FacetOption: {
376
- field?: string;
377
- size?: number;
378
- date_ranges?: components["schemas"]["DateRange"][];
379
- numeric_ranges?: components["schemas"]["NumericRange"][];
380
- };
381
- FacetResult: {
382
- field?: string;
383
- total?: number;
384
- missing?: number;
385
- terms?: components["schemas"]["TermFacetResult"][];
386
- date_ranges?: components["schemas"]["DateRangeResult"][];
387
- numeric_ranges?: components["schemas"]["NumericRangeResult"][];
388
- };
389
- /**
390
- * @description Field type (e.g., string, int, float)
391
- * @enum {string}
392
- */
393
- ValueType: "float" | "uint" | "int" | "bool" | "time" | "geopoint" | "geoshape" | "string" | "keyword" | "array" | "object" | "embedding" | "link" | "blob";
394
- IndexConfig: {
395
- name: string;
396
- type: string;
397
- config: {
398
- [key: string]: unknown;
399
- };
400
- };
401
- IndexStatus: components["schemas"]["IndexConfig"] & {
402
- shard_status: {
403
- [key: string]: Record<string, never>;
404
- };
405
- status: {
406
- [key: string]: unknown;
407
- };
408
- };
409
- StorageStatus: {
410
- /**
411
- * Format: uint64
412
- * @description Disk usage in bytes.
413
- */
414
- disk_usage?: number;
415
- /** @description Whether the table has received data. */
416
- empty?: boolean;
417
- };
418
- TableStatus: components["schemas"]["Table"] & {
419
- storage_status: components["schemas"]["StorageStatus"];
420
- };
421
- EmbedderConfig: {
422
- provider: string;
423
- model: string;
424
- model_provider?: string;
425
- /** Format: uri */
426
- url?: string;
427
- };
428
- SummarizerConfig: {
429
- provider: string;
430
- model: string;
431
- model_provider?: string;
432
- /** Format: uri */
433
- url?: string;
434
- };
435
- CreateIndexRequest: {
436
- field?: string;
437
- template?: string;
438
- mem_only?: boolean;
439
- dimension: number;
440
- summarizer_config?: components["schemas"]["SummarizerConfig"];
441
- embedder_config: components["schemas"]["EmbedderConfig"];
442
- };
443
- /** @example {
444
- * "inserts": {
445
- * "user:123": {
446
- * "name": "John Doe",
447
- * "email": "john@example.com",
448
- * "age": 30,
449
- * "tags": [
450
- * "customer",
451
- * "premium"
452
- * ]
453
- * },
454
- * "user:456": {
455
- * "name": "Jane Smith",
456
- * "email": "jane@example.com",
457
- * "age": 25,
458
- * "tags": [
459
- * "customer"
460
- * ]
461
- * }
462
- * },
463
- * "deletes": [
464
- * "user:789",
465
- * "user:old_account"
466
- * ]
467
- * } */
468
- BatchRequest: {
469
- inserts?: {
470
- [key: string]: Record<string, never>;
471
- };
472
- /** @description List of keys to delete. */
473
- deletes?: string[];
474
- };
475
- BackupRequest: {
476
- backup_id: string;
477
- /** @description Location for the backup (e.g., file:///path/to/backup, s3://bucket/path) */
478
- location: string;
479
- };
480
- RestoreRequest: components["schemas"]["BackupRequest"];
481
- QueryRequest: {
482
- table?: string;
483
- /** @description Full JSON Bleve search queries */
484
- full_text_search?: {
485
- [key: string]: unknown;
486
- };
487
- semantic_search?: string;
488
- indexes?: string[];
489
- /** Format: byte */
490
- filter_prefix?: string;
491
- /** @description Full JSON Bleve search queries */
492
- filter_query?: {
493
- [key: string]: unknown;
494
- };
495
- /** @description Full JSON Bleve search queries */
496
- exclusion_query?: {
497
- [key: string]: unknown;
498
- };
499
- facets?: {
500
- [key: string]: components["schemas"]["FacetOption"];
501
- };
502
- embeddings?: {
503
- [key: string]: number[];
504
- };
505
- fields?: string[];
506
- /** @description Maximum number of results to return or topk for semantic_search. */
507
- limit?: number;
508
- /** @description Number of results to skip for pagination, only available for full_text_search queries. */
509
- offset?: number;
510
- order_by?: {
511
- [key: string]: boolean;
512
- };
513
- /**
514
- * Format: float
515
- * @description Maximum distance for semantic similarity search.
516
- */
517
- distance_under?: number;
518
- /**
519
- * Format: float
520
- * @description Minimum distance for semantic similarity search.
521
- */
522
- distance_over?: number;
523
- count?: boolean;
524
- reranker?: components["schemas"]["Reranker"];
525
- };
526
- Reranker: {
527
- field?: string;
528
- template?: string;
529
- model: string;
530
- provider: string;
531
- model_provider?: string;
532
- /** Format: uri */
533
- url?: string;
534
- };
535
- QueryHit: {
536
- /** @description ID of the record. */
537
- _id: string;
538
- /**
539
- * Format: float
540
- * @description Relevance score of the hit.
541
- */
542
- _score: number;
543
- /** @description Scores partitioned by index when using RRF search. */
544
- _index_scores?: {
545
- [key: string]: unknown;
546
- };
547
- _source?: {
548
- [key: string]: unknown;
549
- };
550
- };
551
- /** @description A list of query hits. */
552
- QueryHits: {
553
- /**
554
- * Format: uint64
555
- * @description Total number of hits available.
556
- */
557
- total?: number;
558
- hits?: components["schemas"]["QueryHit"][];
559
- /**
560
- * Format: float
561
- * @description Maximum score of the results.
562
- */
563
- max_score?: number;
564
- };
565
- /** @description Responses from multiple query operations. */
566
- QueryResponses: {
567
- responses?: components["schemas"]["QueryResult"][];
568
- };
569
- /** @description Result of a query operation as an array of results and a count. */
570
- QueryResult: {
571
- hits?: components["schemas"]["QueryHits"];
572
- facets?: {
573
- [key: string]: components["schemas"]["FacetResult"];
574
- };
575
- /**
576
- * Format: int64
577
- * @description Duration of the query in milliseconds.
578
- */
579
- took: number;
580
- /**
581
- * Format: int32
582
- * @description HTTP status code of the query operation.
583
- */
584
- status: number;
585
- /** @description Error message if the query failed. */
586
- error?: string;
587
- };
588
- User: {
589
- /** @example johndoe */
590
- username: string;
591
- /**
592
- * Format: byte
593
- * @description Base64 encoded password hash. Exposing this is a security risk.
594
- * @example JGFyZ29uMm...
595
- */
596
- password_hash: string;
597
- };
598
- /**
599
- * @description Type of the resource, e.g., table, user, or global ('*').
600
- * @example table
601
- * @enum {string}
602
- */
603
- ResourceType: "table" | "user" | "*";
604
- /**
605
- * @description Type of permission.
606
- * @example read
607
- * @enum {string}
608
- */
609
- PermissionType: "read" | "write" | "admin";
610
- Permission: {
611
- /**
612
- * @description Resource name (e.g., table name, target username, or '*' for global).
613
- * @example orders_table
614
- */
615
- resource: string;
616
- resource_type: components["schemas"]["ResourceType"];
617
- type: components["schemas"]["PermissionType"];
618
- };
619
- CreateUserRequest: {
620
- /**
621
- * @description Username for the new user. If provided in the path, this field can be omitted or must match the path parameter.
622
- * @example johndoe
623
- */
624
- username?: string;
625
- /**
626
- * Format: password
627
- * @example s3cr3tP@sswOrd
628
- */
629
- password: string;
630
- /** @description Optional list of initial permissions for the user. */
631
- initial_policies?: components["schemas"]["Permission"][] | null;
632
- };
633
- UpdatePasswordRequest: {
634
- /**
635
- * Format: password
636
- * @example newS3cr3tP@sswOrd
637
- */
638
- new_password: string;
639
- };
640
- SuccessMessage: {
641
- /** @example Operation completed successfully */
642
- message?: string;
643
- };
29
+ };
30
+ "/table/{tableName}/query": {
31
+ post: operations["queryTable"];
32
+ parameters: {
33
+ path: {
34
+ /** Name of the table to query */
35
+ tableName: string;
36
+ };
644
37
  };
645
- responses: {
646
- /** @description Bad request */
647
- BadRequest: {
648
- headers: {
649
- [name: string]: unknown;
650
- };
651
- content: {
652
- "application/json": components["schemas"]["Error"];
653
- };
654
- };
655
- /** @description Resource not found */
656
- NotFound: {
657
- headers: {
658
- [name: string]: unknown;
659
- };
660
- content: {
661
- "application/json": components["schemas"]["Error"];
662
- };
663
- };
664
- /** @description Internal server error */
665
- InternalServerError: {
666
- headers: {
667
- [name: string]: unknown;
668
- };
669
- content: {
670
- "application/json": components["schemas"]["Error"];
671
- };
672
- };
38
+ };
39
+ "/table/{tableName}/batch": {
40
+ post: operations["batchTableOperations"];
41
+ parameters: {
42
+ path: {
43
+ /** Name of the table for batch operation */
44
+ tableName: string;
45
+ };
46
+ };
47
+ };
48
+ "/table/{tableName}/backup": {
49
+ post: operations["backupTable"];
50
+ parameters: {
51
+ path: {
52
+ /** Name of the table to backup */
53
+ tableName: string;
54
+ };
673
55
  };
56
+ };
57
+ "/table/{tableName}/restore": {
58
+ post: operations["restoreTable"];
674
59
  parameters: {
675
- /** @description The username. */
676
- UserNamePathParameter: string;
60
+ path: {
61
+ /** Name of the table to restore into */
62
+ tableName: string;
63
+ };
677
64
  };
678
- requestBodies: never;
679
- headers: never;
680
- pathItems: never;
65
+ };
66
+ "/table/{tableName}/key/{key}": {
67
+ get: operations["lookupKey"];
68
+ parameters: {
69
+ path: {
70
+ /** Name of the table */
71
+ tableName: string;
72
+ /** Key of the record to lookup */
73
+ key: string;
74
+ };
75
+ };
76
+ };
77
+ "/table/{tableName}/index": {
78
+ get: operations["listIndexes"];
79
+ parameters: {
80
+ path: {
81
+ /** Name of the table */
82
+ tableName: string;
83
+ };
84
+ };
85
+ };
86
+ "/table/{tableName}/index/{indexName}": {
87
+ get: operations["getIndex"];
88
+ post: operations["createIndex"];
89
+ delete: operations["dropIndex"];
90
+ parameters: {
91
+ path: {
92
+ /** Name of the table */
93
+ tableName: string;
94
+ /** Name of the index */
95
+ indexName: string;
96
+ };
97
+ };
98
+ };
99
+ "/user/{userName}": {
100
+ /** Retrieves details for a specific user. */
101
+ get: operations["getUserByName"];
102
+ /** Creates a new user with the given username and password. Username in path takes precedence. */
103
+ post: operations["createUser"];
104
+ /** Deletes a specific user. */
105
+ delete: operations["deleteUser"];
106
+ parameters: {
107
+ path: {
108
+ /** The username. */
109
+ userName: components$1["parameters"]["UserNamePathParameter"];
110
+ };
111
+ };
112
+ };
113
+ "/user/{userName}/password": {
114
+ /** Updates the password for a specific user. */
115
+ put: operations["updateUserPassword"];
116
+ parameters: {
117
+ path: {
118
+ /** The username. */
119
+ userName: components$1["parameters"]["UserNamePathParameter"];
120
+ };
121
+ };
122
+ };
123
+ "/user/{userName}/permission": {
124
+ /** Retrieves all permissions for a specific user. */
125
+ get: operations["getUserPermissions"];
126
+ /** Adds a new permission to a specific user. */
127
+ post: operations["addPermissionToUser"];
128
+ /** Removes a specific permission rule from a user based on resource name and type. */
129
+ delete: operations["removePermissionFromUser"];
130
+ parameters: {
131
+ path: {
132
+ /** The username. */
133
+ userName: components$1["parameters"]["UserNamePathParameter"];
134
+ };
135
+ };
136
+ };
681
137
  }
138
+
139
+ interface components$1 {
140
+ schemas: {
141
+ Error: {
142
+ /** @example An error message */
143
+ error: string;
144
+ };
145
+ ByteRange: string[];
146
+ ShardConfig: {
147
+ byte_range: components$1["schemas"]["ByteRange"];
148
+ };
149
+ CreateTableRequest: {
150
+ /** Format: uint */
151
+ num_shards?: number;
152
+ indexes?: { [key: string]: components$1["schemas"]["IndexConfig"] };
153
+ schema?: components$1["schemas"]["TableSchema"];
154
+ };
155
+ Table: {
156
+ name: string;
157
+ indexes: { [key: string]: components$1["schemas"]["IndexConfig"] };
158
+ shards: { [key: string]: components$1["schemas"]["ShardConfig"] };
159
+ schema?: components$1["schemas"]["TableSchema"];
160
+ };
161
+ ValueSchema: {
162
+ type: components$1["schemas"]["ValueType"];
163
+ /**
164
+ * @description For object types, this schema defines the structure of the content.
165
+ * For other types, this field is ignored.
166
+ */
167
+ schema?: components$1["schemas"]["DocumentSchema"];
168
+ };
169
+ DocumentSchema: {
170
+ /**
171
+ * @description A map of field names to their value schema (type, defaults, configuration etc.).
172
+ * This allows for flexible content types per field.
173
+ * The key is the field name, and the value is the value type schema.
174
+ */
175
+ fields?: { [key: string]: components$1["schemas"]["ValueSchema"] };
176
+ };
177
+ TableSchema: {
178
+ key?: string;
179
+ /** @description Default type to use from the document_types. */
180
+ default_type?: string;
181
+ document_types?: {
182
+ [key: string]: components$1["schemas"]["DocumentSchema"];
183
+ };
184
+ };
185
+ DateRange: {
186
+ name: string;
187
+ from?: string;
188
+ to?: string;
189
+ };
190
+ NumericRange: {
191
+ name: string;
192
+ /** Format: float */
193
+ from?: number;
194
+ /** Format: float */
195
+ to?: number;
196
+ };
197
+ TermFacetResult: {
198
+ term: string;
199
+ count: number;
200
+ };
201
+ DateRangeResult: components$1["schemas"]["DateRange"] & {
202
+ count: number;
203
+ };
204
+ NumericRangeResult: components$1["schemas"]["NumericRange"] & {
205
+ count: number;
206
+ };
207
+ FacetOption: {
208
+ field?: string;
209
+ size?: number;
210
+ date_ranges?: components$1["schemas"]["DateRange"][];
211
+ numeric_ranges?: components$1["schemas"]["NumericRange"][];
212
+ };
213
+ FacetResult: {
214
+ field?: string;
215
+ total?: number;
216
+ missing?: number;
217
+ terms?: components$1["schemas"]["TermFacetResult"][];
218
+ date_ranges?: components$1["schemas"]["DateRangeResult"][];
219
+ numeric_ranges?: components$1["schemas"]["NumericRangeResult"][];
220
+ };
221
+ /**
222
+ * @description Field type (e.g., string, int, float)
223
+ * @enum {string}
224
+ */
225
+ ValueType:
226
+ | "float"
227
+ | "uint"
228
+ | "int"
229
+ | "bool"
230
+ | "time"
231
+ | "geopoint"
232
+ | "geoshape"
233
+ | "string"
234
+ | "keyword"
235
+ | "array"
236
+ | "object"
237
+ | "embedding"
238
+ | "link"
239
+ | "blob";
240
+ IndexStatus: {
241
+ config: components$1["schemas"]["IndexConfig"];
242
+ shard_status: { [key: string]: { [key: string]: unknown } };
243
+ status: { [key: string]: unknown };
244
+ };
245
+ StorageStatus: {
246
+ /**
247
+ * Format: uint64
248
+ * @description Disk usage in bytes.
249
+ */
250
+ disk_usage?: number;
251
+ /** @description Whether the table has received data. */
252
+ empty?: boolean;
253
+ };
254
+ TableStatus: components$1["schemas"]["Table"] & {
255
+ storage_status: components$1["schemas"]["StorageStatus"];
256
+ };
257
+ /**
258
+ * @example {
259
+ * "inserts": {
260
+ * "user:123": {
261
+ * "name": "John Doe",
262
+ * "email": "john@example.com",
263
+ * "age": 30,
264
+ * "tags": [
265
+ * "customer",
266
+ * "premium"
267
+ * ]
268
+ * },
269
+ * "user:456": {
270
+ * "name": "Jane Smith",
271
+ * "email": "jane@example.com",
272
+ * "age": 25,
273
+ * "tags": [
274
+ * "customer"
275
+ * ]
276
+ * }
277
+ * },
278
+ * "deletes": [
279
+ * "user:789",
280
+ * "user:old_account"
281
+ * ]
282
+ * }
283
+ */
284
+ BatchRequest: {
285
+ inserts?: { [key: string]: { [key: string]: unknown } };
286
+ /** @description List of keys to delete. */
287
+ deletes?: string[];
288
+ };
289
+ BackupRequest: {
290
+ backup_id: string;
291
+ /** @description Location for the backup (e.g., file:///path/to/backup, s3://bucket/path) */
292
+ location: string;
293
+ };
294
+ RestoreRequest: components$1["schemas"]["BackupRequest"];
295
+ QueryRequest: {
296
+ table?: string;
297
+ /** @description Full JSON Bleve search queries */
298
+ full_text_search?: { [key: string]: unknown };
299
+ semantic_search?: string;
300
+ indexes?: string[];
301
+ /** Format: byte */
302
+ filter_prefix?: string;
303
+ /** @description Full JSON Bleve search queries */
304
+ filter_query?: { [key: string]: unknown };
305
+ /** @description Full JSON Bleve search queries */
306
+ exclusion_query?: { [key: string]: unknown };
307
+ facets?: { [key: string]: components$1["schemas"]["FacetOption"] };
308
+ embeddings?: { [key: string]: number[] };
309
+ fields?: string[];
310
+ /** @description Maximum number of results to return or topk for semantic_search. */
311
+ limit?: number;
312
+ /** @description Number of results to skip for pagination, only available for full_text_search queries. */
313
+ offset?: number;
314
+ order_by?: { [key: string]: boolean };
315
+ /**
316
+ * Format: float
317
+ * @description Maximum distance for semantic similarity search.
318
+ */
319
+ distance_under?: number;
320
+ /**
321
+ * Format: float
322
+ * @description Minimum distance for semantic similarity search.
323
+ */
324
+ distance_over?: number;
325
+ count?: boolean;
326
+ reranker?: components$1["schemas"]["RerankerConfig"];
327
+ analyses?: components$1["schemas"]["Analyses"];
328
+ };
329
+ Analyses: {
330
+ pca?: boolean;
331
+ tsne?: boolean;
332
+ };
333
+ AnalysesResult: {
334
+ pca?: number[];
335
+ tsne?: number[];
336
+ };
337
+ QueryHit: {
338
+ /** @description ID of the record. */
339
+ _id: string;
340
+ /**
341
+ * Format: float
342
+ * @description Relevance score of the hit.
343
+ */
344
+ _score: number;
345
+ /** @description Scores partitioned by index when using RRF search. */
346
+ _index_scores?: { [key: string]: unknown };
347
+ _source?: { [key: string]: unknown };
348
+ };
349
+ /** @description A list of query hits. */
350
+ QueryHits: {
351
+ /**
352
+ * Format: uint64
353
+ * @description Total number of hits available.
354
+ */
355
+ total?: number;
356
+ hits?: components$1["schemas"]["QueryHit"][];
357
+ /**
358
+ * Format: float
359
+ * @description Maximum score of the results.
360
+ */
361
+ max_score?: number;
362
+ };
363
+ /** @description Responses from multiple query operations. */
364
+ QueryResponses: {
365
+ responses?: components$1["schemas"]["QueryResult"][];
366
+ };
367
+ /** @description Result of a query operation as an array of results and a count. */
368
+ QueryResult: {
369
+ hits?: components$1["schemas"]["QueryHits"];
370
+ facets?: { [key: string]: components$1["schemas"]["FacetResult"] };
371
+ /** @description Analysis results like PCA and t-SNE per index embeddings. */
372
+ analyses?: { [key: string]: components$1["schemas"]["AnalysesResult"] };
373
+ /**
374
+ * Format: int64
375
+ * @description Duration of the query in milliseconds.
376
+ */
377
+ took: number;
378
+ /**
379
+ * Format: int32
380
+ * @description HTTP status code of the query operation.
381
+ */
382
+ status: number;
383
+ /** @description Error message if the query failed. */
384
+ error?: string;
385
+ };
386
+ /** @description Configuration for the Google embedding provider. */
387
+ GoogleConfig: {
388
+ /** @description The Google Cloud project ID. */
389
+ project_id?: string;
390
+ /** @description The Google Cloud location (e.g., 'us-central1'). */
391
+ location?: string;
392
+ /**
393
+ * @description The name of the embedding model to use (e.g., 'text-embedding-004').
394
+ * @default text-embedding-004
395
+ */
396
+ model: string;
397
+ /**
398
+ * @description The dimension of the embedding.
399
+ * @default 1024
400
+ */
401
+ dimension?: number;
402
+ /** @description The Google API key. */
403
+ api_key?: string;
404
+ /**
405
+ * Format: uri
406
+ * @description The URL of the Google API endpoint.
407
+ */
408
+ url?: string;
409
+ };
410
+ /** @description Configuration for the Ollama embedding provider. */
411
+ OllamaConfig: {
412
+ /** @description The name of the Ollama model to use. */
413
+ model: string;
414
+ /**
415
+ * Format: uri
416
+ * @description The URL of the Ollama API endpoint.
417
+ */
418
+ url?: string;
419
+ };
420
+ /** @description Configuration for the OpenAI embedding provider. */
421
+ OpenAIConfig: {
422
+ /** @description The name of the OpenAI model to use. */
423
+ model: string;
424
+ /**
425
+ * Format: uri
426
+ * @description The URL of the OpenAI API endpoint.
427
+ */
428
+ url?: string;
429
+ /** @description The OpenAI API key. */
430
+ api_key?: string;
431
+ };
432
+ /** @description Configuration for the Bedrock embedding provider. */
433
+ BedrockConfig: {
434
+ /**
435
+ * @description The name of the Bedrock model to use.
436
+ * @example amazon.titan-embed-text-v1
437
+ */
438
+ model: string;
439
+ /** @description The AWS region for the Bedrock service. */
440
+ region?: string;
441
+ /** @description Whether to strip new lines from the input text. */
442
+ strip_new_lines?: boolean;
443
+ /** @description The batch size for embedding requests. */
444
+ batch_size?: number;
445
+ };
446
+ /**
447
+ * @description The embedding provider to use.
448
+ * @enum {string}
449
+ */
450
+ Provider: "gemini" | "ollama" | "openai" | "bedrock";
451
+ /**
452
+ * @description A unified configuration for an embedding provider.
453
+ * @example {
454
+ * "provider": "openai",
455
+ * "model": "text-embedding-004",
456
+ * "field": "content"
457
+ * }
458
+ */
459
+ RerankerConfig: (
460
+ | components$1["schemas"]["GoogleConfig"]
461
+ | components$1["schemas"]["OllamaConfig"]
462
+ | components$1["schemas"]["OpenAIConfig"]
463
+ | components$1["schemas"]["BedrockConfig"]
464
+ ) & {
465
+ provider: components$1["schemas"]["Provider"];
466
+ field?: string;
467
+ template?: string;
468
+ };
469
+ BleveIndexV2Config: {
470
+ /** @description Whether to use memory-only storage */
471
+ mem_only?: boolean;
472
+ };
473
+ /**
474
+ * @description A unified configuration for an embedding provider.
475
+ * @example {
476
+ * "provider": "openai",
477
+ * "model": "text-embedding-004"
478
+ * }
479
+ */
480
+ ModelConfig: (
481
+ | components$1["schemas"]["GoogleConfig"]
482
+ | components$1["schemas"]["OllamaConfig"]
483
+ | components$1["schemas"]["OpenAIConfig"]
484
+ | components$1["schemas"]["BedrockConfig"]
485
+ ) & {
486
+ provider: components$1["schemas"]["Provider"];
487
+ };
488
+ EmbeddingIndexConfig: {
489
+ /** @description Vector dimension */
490
+ dimension: number;
491
+ /** @description Field to extract embeddings from */
492
+ field?: string;
493
+ /**
494
+ * @description Go string template for generating prompts. See https://pkg.go.dev/text/template for more information.
495
+ * @example Hello, {{if eq .Name "John"}}Johnathan{{else}}{{.Name}}{{end}}! You are {{.Age}} years old.
496
+ */
497
+ template?: string;
498
+ /** @description Whether to use in-memory only storage */
499
+ mem_only?: boolean;
500
+ /** @description Configuration for the embeddings plugin */
501
+ embedder_config?: components$1["schemas"]["ModelConfig"];
502
+ /** @description Configuration for the summarizer plugin */
503
+ summarizer_config?: components$1["schemas"]["ModelConfig"];
504
+ };
505
+ /**
506
+ * @description The type of the index.
507
+ * @enum {string}
508
+ */
509
+ IndexType: "bleve_v2" | "vector_v2";
510
+ /** @description Configuration for an index */
511
+ IndexConfig: (
512
+ | components$1["schemas"]["BleveIndexV2Config"]
513
+ | components$1["schemas"]["EmbeddingIndexConfig"]
514
+ ) & {
515
+ /** @description Name of the index */
516
+ name: string;
517
+ type: components$1["schemas"]["IndexType"];
518
+ };
519
+ User: {
520
+ /** @example johndoe */
521
+ username: string;
522
+ /**
523
+ * Format: byte
524
+ * @description Base64 encoded password hash. Exposing this is a security risk.
525
+ * @example JGFyZ29uMm...
526
+ */
527
+ password_hash: string;
528
+ };
529
+ /**
530
+ * @description Type of the resource, e.g., table, user, or global ('*').
531
+ * @example table
532
+ * @enum {string}
533
+ */
534
+ ResourceType: "table" | "user" | "*";
535
+ /**
536
+ * @description Type of permission.
537
+ * @example read
538
+ * @enum {string}
539
+ */
540
+ PermissionType: "read" | "write" | "admin";
541
+ Permission: {
542
+ /**
543
+ * @description Resource name (e.g., table name, target username, or '*' for global).
544
+ * @example orders_table
545
+ */
546
+ resource: string;
547
+ resource_type: components$1["schemas"]["ResourceType"];
548
+ type: components$1["schemas"]["PermissionType"];
549
+ };
550
+ CreateUserRequest: {
551
+ /**
552
+ * @description Username for the new user. If provided in the path, this field can be omitted or must match the path parameter.
553
+ * @example johndoe
554
+ */
555
+ username?: string;
556
+ /**
557
+ * Format: password
558
+ * @example s3cr3tP@sswOrd
559
+ */
560
+ password: string;
561
+ /** @description Optional list of initial permissions for the user. */
562
+ initial_policies?: components$1["schemas"]["Permission"][] | null;
563
+ };
564
+ UpdatePasswordRequest: {
565
+ /**
566
+ * Format: password
567
+ * @example newS3cr3tP@sswOrd
568
+ */
569
+ new_password: string;
570
+ };
571
+ SuccessMessage: {
572
+ /** @example Operation completed successfully */
573
+ message?: string;
574
+ };
575
+ };
576
+ responses: {
577
+ /** Bad request */
578
+ BadRequest: {
579
+ content: {
580
+ "application/json": components$1["schemas"]["Error"];
581
+ };
582
+ };
583
+ /** Resource not found */
584
+ NotFound: {
585
+ content: {
586
+ "application/json": components$1["schemas"]["Error"];
587
+ };
588
+ };
589
+ /** Internal server error */
590
+ InternalServerError: {
591
+ content: {
592
+ "application/json": components$1["schemas"]["Error"];
593
+ };
594
+ };
595
+ };
596
+ parameters: {
597
+ /** @description The username. */
598
+ UserNamePathParameter: string;
599
+ };
600
+ }
601
+
682
602
  interface operations {
683
- globalQuery: {
684
- parameters: {
685
- query?: never;
686
- header?: never;
687
- path?: never;
688
- cookie?: never;
603
+ /**
604
+ * Executes a query across all relevant tables and shards based on the query content.
605
+ * IMPORTANT: The final line of data must end with a newline character \n. Each newline character may be preceded by a carriage return \r. When sending requests to this endpoint the Content-Type header should be set to application/x-ndjson.
606
+ */
607
+ globalQuery: {
608
+ responses: {
609
+ /** Query successful */
610
+ 200: {
611
+ content: {
612
+ "application/json": components$1["schemas"]["QueryResponses"];
613
+ };
614
+ };
615
+ /** Invalid query request */
616
+ 400: {
617
+ content: {
618
+ "application/json": components$1["schemas"]["Error"];
619
+ };
620
+ };
621
+ /** Internal server error */
622
+ 500: {
623
+ content: {
624
+ "application/json": components$1["schemas"]["Error"];
625
+ };
626
+ };
627
+ };
628
+ requestBody: {
629
+ content: {
630
+ "application/json": components$1["schemas"]["QueryRequest"];
631
+ "application/x-ndjson": components$1["schemas"]["QueryRequest"];
632
+ };
633
+ };
634
+ };
635
+ listTables: {
636
+ responses: {
637
+ /** A list of tables */
638
+ 200: {
639
+ content: {
640
+ "application/json": components$1["schemas"]["TableStatus"][];
641
+ };
642
+ };
643
+ 400: components$1["responses"]["BadRequest"];
644
+ 500: components$1["responses"]["InternalServerError"];
645
+ };
646
+ };
647
+ getTable: {
648
+ parameters: {
649
+ path: {
650
+ /** Name of the table */
651
+ tableName: string;
652
+ };
653
+ };
654
+ responses: {
655
+ /** Table details */
656
+ 200: {
657
+ content: {
658
+ "application/json": components$1["schemas"]["TableStatus"];
689
659
  };
690
- requestBody: {
691
- content: {
692
- "application/json": components["schemas"]["QueryRequest"];
693
- /** @description IMPORTANT: The final line of data must end with a newline character \n.
694
- * Each newline character may be preceded by a carriage return \r.
695
- * When sending requests to this endpoint the Content-Type header should be set to application/x-ndjson.
696
- * */
697
- "application/x-ndjson": components["schemas"]["QueryRequest"];
698
- };
660
+ };
661
+ 404: components$1["responses"]["NotFound"];
662
+ };
663
+ };
664
+ createTable: {
665
+ parameters: {
666
+ path: {
667
+ /** Name of the table */
668
+ tableName: string;
669
+ };
670
+ };
671
+ responses: {
672
+ /** Table created successfully */
673
+ 200: {
674
+ content: {
675
+ "application/json": components$1["schemas"]["Table"];
699
676
  };
700
- responses: {
701
- /** @description Query successful */
702
- 200: {
703
- headers: {
704
- [name: string]: unknown;
705
- };
706
- content: {
707
- "application/json": components["schemas"]["QueryResponses"];
708
- };
709
- };
710
- /** @description Invalid query request */
711
- 400: {
712
- headers: {
713
- [name: string]: unknown;
714
- };
715
- content: {
716
- "application/json": components["schemas"]["Error"];
717
- };
718
- };
719
- /** @description Internal server error */
720
- 500: {
721
- headers: {
722
- [name: string]: unknown;
723
- };
724
- content: {
725
- "application/json": components["schemas"]["Error"];
726
- };
727
- };
677
+ };
678
+ 400: components$1["responses"]["BadRequest"];
679
+ };
680
+ requestBody: {
681
+ content: {
682
+ "application/json": components$1["schemas"]["CreateTableRequest"];
683
+ };
684
+ };
685
+ };
686
+ dropTable: {
687
+ parameters: {
688
+ path: {
689
+ /** Name of the table */
690
+ tableName: string;
691
+ };
692
+ };
693
+ responses: {
694
+ /** Table dropped successfully */
695
+ 204: never;
696
+ 400: components$1["responses"]["BadRequest"];
697
+ 500: components$1["responses"]["InternalServerError"];
698
+ };
699
+ };
700
+ queryTable: {
701
+ parameters: {
702
+ path: {
703
+ /** Name of the table to query */
704
+ tableName: string;
705
+ };
706
+ };
707
+ responses: {
708
+ /** Query successful */
709
+ 200: {
710
+ content: {
711
+ "application/json": components$1["schemas"]["QueryResponses"];
712
+ };
713
+ };
714
+ 400: components$1["responses"]["BadRequest"];
715
+ 404: components$1["responses"]["NotFound"];
716
+ 500: components$1["responses"]["InternalServerError"];
717
+ };
718
+ requestBody: {
719
+ content: {
720
+ "application/json": components$1["schemas"]["QueryRequest"];
721
+ "application/x-ndjson": components$1["schemas"]["QueryRequest"];
722
+ };
723
+ };
724
+ };
725
+ batchTableOperations: {
726
+ parameters: {
727
+ path: {
728
+ /** Name of the table for batch operation */
729
+ tableName: string;
730
+ };
731
+ };
732
+ responses: {
733
+ /** Batch operation successful */
734
+ 201: {
735
+ content: {
736
+ "application/json": {
737
+ /** @example successful */
738
+ batch?: string;
739
+ };
728
740
  };
741
+ };
742
+ 400: components$1["responses"]["BadRequest"];
743
+ 404: components$1["responses"]["NotFound"];
744
+ 500: components$1["responses"]["InternalServerError"];
729
745
  };
730
- listTables: {
731
- parameters: {
732
- query?: never;
733
- header?: never;
734
- path?: never;
735
- cookie?: never;
746
+ requestBody: {
747
+ content: {
748
+ "application/json": components$1["schemas"]["BatchRequest"];
749
+ };
750
+ };
751
+ };
752
+ backupTable: {
753
+ parameters: {
754
+ path: {
755
+ /** Name of the table to backup */
756
+ tableName: string;
757
+ };
758
+ };
759
+ responses: {
760
+ /** Backup process initiated successfully */
761
+ 201: {
762
+ content: {
763
+ "application/json": {
764
+ /** @example successful */
765
+ backup?: string;
766
+ };
736
767
  };
737
- requestBody?: never;
738
- responses: {
739
- /** @description A list of tables */
740
- 200: {
741
- headers: {
742
- [name: string]: unknown;
743
- };
744
- content: {
745
- "application/json": components["schemas"]["Table"][];
746
- };
747
- };
748
- 400: components["responses"]["BadRequest"];
749
- 500: components["responses"]["InternalServerError"];
768
+ };
769
+ 400: components$1["responses"]["BadRequest"];
770
+ 404: components$1["responses"]["NotFound"];
771
+ 500: components$1["responses"]["InternalServerError"];
772
+ };
773
+ requestBody: {
774
+ content: {
775
+ "application/json": components$1["schemas"]["BackupRequest"];
776
+ };
777
+ };
778
+ };
779
+ restoreTable: {
780
+ parameters: {
781
+ path: {
782
+ /** Name of the table to restore into */
783
+ tableName: string;
784
+ };
785
+ };
786
+ responses: {
787
+ /** Restore process triggered successfully */
788
+ 202: {
789
+ content: {
790
+ "application/json": {
791
+ /** @example triggered */
792
+ restore?: string;
793
+ };
750
794
  };
795
+ };
796
+ 400: components$1["responses"]["BadRequest"];
797
+ 500: components$1["responses"]["InternalServerError"];
798
+ };
799
+ requestBody: {
800
+ content: {
801
+ "application/json": components$1["schemas"]["RestoreRequest"];
802
+ };
803
+ };
804
+ };
805
+ lookupKey: {
806
+ parameters: {
807
+ path: {
808
+ /** Name of the table */
809
+ tableName: string;
810
+ /** Key of the record to lookup */
811
+ key: string;
812
+ };
813
+ };
814
+ responses: {
815
+ /** Record found */
816
+ 200: {
817
+ content: {
818
+ "application/json": { [key: string]: unknown };
819
+ };
820
+ };
821
+ 400: components$1["responses"]["BadRequest"];
822
+ 404: components$1["responses"]["NotFound"];
823
+ 500: components$1["responses"]["InternalServerError"];
824
+ };
825
+ };
826
+ listIndexes: {
827
+ parameters: {
828
+ path: {
829
+ /** Name of the table */
830
+ tableName: string;
831
+ };
832
+ };
833
+ responses: {
834
+ /** A list of indexes for the table */
835
+ 200: {
836
+ content: {
837
+ "application/json": components$1["schemas"]["IndexStatus"][];
838
+ };
839
+ };
840
+ 404: components$1["responses"]["NotFound"];
841
+ 500: components$1["responses"]["InternalServerError"];
842
+ };
843
+ };
844
+ getIndex: {
845
+ parameters: {
846
+ path: {
847
+ /** Name of the table */
848
+ tableName: string;
849
+ /** Name of the index */
850
+ indexName: string;
851
+ };
852
+ };
853
+ responses: {
854
+ /** Index details */
855
+ 200: {
856
+ content: {
857
+ "application/json": components$1["schemas"]["IndexStatus"];
858
+ };
859
+ };
860
+ 404: components$1["responses"]["NotFound"];
861
+ 500: components$1["responses"]["InternalServerError"];
862
+ };
863
+ };
864
+ createIndex: {
865
+ parameters: {
866
+ path: {
867
+ /** Name of the table */
868
+ tableName: string;
869
+ /** Name of the index */
870
+ indexName: string;
871
+ };
872
+ };
873
+ responses: {
874
+ /** Index added successfully */
875
+ 201: unknown;
876
+ 400: components$1["responses"]["BadRequest"];
877
+ 500: components$1["responses"]["InternalServerError"];
878
+ };
879
+ requestBody: {
880
+ content: {
881
+ "application/json": components$1["schemas"]["IndexConfig"];
882
+ };
751
883
  };
752
- getTable: {
753
- parameters: {
754
- query?: never;
755
- header?: never;
756
- path: {
757
- /** @description Name of the table */
758
- tableName: string;
759
- };
760
- cookie?: never;
761
- };
762
- requestBody?: never;
763
- responses: {
764
- /** @description Table details */
765
- 200: {
766
- headers: {
767
- [name: string]: unknown;
768
- };
769
- content: {
770
- "application/json": components["schemas"]["TableStatus"];
771
- };
772
- };
773
- 404: components["responses"]["NotFound"];
774
- };
884
+ };
885
+ dropIndex: {
886
+ parameters: {
887
+ path: {
888
+ /** Name of the table */
889
+ tableName: string;
890
+ /** Name of the index */
891
+ indexName: string;
892
+ };
775
893
  };
776
- createTable: {
777
- parameters: {
778
- query?: never;
779
- header?: never;
780
- path: {
781
- /** @description Name of the table */
782
- tableName: string;
783
- };
784
- cookie?: never;
785
- };
786
- requestBody: {
787
- content: {
788
- "application/json": components["schemas"]["CreateTableRequest"];
789
- };
790
- };
791
- responses: {
792
- /** @description Table created successfully */
793
- 200: {
794
- headers: {
795
- [name: string]: unknown;
796
- };
797
- content: {
798
- "application/json": components["schemas"]["Table"];
799
- };
800
- };
801
- 400: components["responses"]["BadRequest"];
802
- };
894
+ responses: {
895
+ /** Index dropped successfully */
896
+ 201: unknown;
897
+ 400: components$1["responses"]["BadRequest"];
898
+ 500: components$1["responses"]["InternalServerError"];
803
899
  };
804
- dropTable: {
805
- parameters: {
806
- query?: never;
807
- header?: never;
808
- path: {
809
- /** @description Name of the table */
810
- tableName: string;
811
- };
812
- cookie?: never;
813
- };
814
- requestBody?: never;
815
- responses: {
816
- /** @description Table dropped successfully */
817
- 204: {
818
- headers: {
819
- [name: string]: unknown;
820
- };
821
- content?: never;
822
- };
823
- 400: components["responses"]["BadRequest"];
824
- 500: components["responses"]["InternalServerError"];
825
- };
900
+ };
901
+ /** Retrieves details for a specific user. */
902
+ getUserByName: {
903
+ parameters: {
904
+ path: {
905
+ /** The username. */
906
+ userName: components$1["parameters"]["UserNamePathParameter"];
907
+ };
826
908
  };
827
- queryTable: {
828
- parameters: {
829
- query?: never;
830
- header?: never;
831
- path: {
832
- /** @description Name of the table to query */
833
- tableName: string;
834
- };
835
- cookie?: never;
836
- };
837
- requestBody: {
838
- content: {
839
- "application/json": components["schemas"]["QueryRequest"];
840
- };
841
- };
842
- responses: {
843
- /** @description Query successful */
844
- 200: {
845
- headers: {
846
- [name: string]: unknown;
847
- };
848
- content: {
849
- "application/json": components["schemas"]["QueryResult"];
850
- };
851
- };
852
- 400: components["responses"]["BadRequest"];
853
- 404: components["responses"]["NotFound"];
854
- 500: components["responses"]["InternalServerError"];
855
- };
909
+ responses: {
910
+ /** Successful operation */
911
+ 200: {
912
+ content: {
913
+ "application/json": components$1["schemas"]["User"];
914
+ };
915
+ };
916
+ /** Bad Request (e.g., username is required) */
917
+ 400: {
918
+ content: {
919
+ "application/json": components$1["schemas"]["Error"];
920
+ };
921
+ };
922
+ /** User not found */
923
+ 404: {
924
+ content: {
925
+ "application/json": components$1["schemas"]["Error"];
926
+ };
927
+ };
928
+ /** Internal Server Error */
929
+ 500: {
930
+ content: {
931
+ "application/json": components$1["schemas"]["Error"];
932
+ };
933
+ };
856
934
  };
857
- batchTableOperations: {
858
- parameters: {
859
- query?: never;
860
- header?: never;
861
- path: {
862
- /** @description Name of the table for batch operation */
863
- tableName: string;
864
- };
865
- cookie?: never;
866
- };
867
- requestBody: {
868
- content: {
869
- "application/json": components["schemas"]["BatchRequest"];
870
- };
871
- };
872
- responses: {
873
- /** @description Batch operation successful */
874
- 201: {
875
- headers: {
876
- [name: string]: unknown;
877
- };
878
- content: {
879
- "application/json": {
880
- /** @example successful */
881
- batch?: string;
882
- };
883
- };
884
- };
885
- 400: components["responses"]["BadRequest"];
886
- 404: components["responses"]["NotFound"];
887
- 500: components["responses"]["InternalServerError"];
888
- };
935
+ };
936
+ /** Creates a new user with the given username and password. Username in path takes precedence. */
937
+ createUser: {
938
+ parameters: {
939
+ path: {
940
+ /** The username. */
941
+ userName: components$1["parameters"]["UserNamePathParameter"];
942
+ };
889
943
  };
890
- backupTable: {
891
- parameters: {
892
- query?: never;
893
- header?: never;
894
- path: {
895
- /** @description Name of the table to backup */
896
- tableName: string;
897
- };
898
- cookie?: never;
899
- };
900
- requestBody: {
901
- content: {
902
- "application/json": components["schemas"]["BackupRequest"];
903
- };
904
- };
905
- responses: {
906
- /** @description Backup process initiated successfully */
907
- 201: {
908
- headers: {
909
- [name: string]: unknown;
910
- };
911
- content: {
912
- "application/json": {
913
- /** @example successful */
914
- backup?: string;
915
- };
916
- };
917
- };
918
- 400: components["responses"]["BadRequest"];
919
- 404: components["responses"]["NotFound"];
920
- 500: components["responses"]["InternalServerError"];
921
- };
944
+ responses: {
945
+ /** User created successfully */
946
+ 201: {
947
+ content: {
948
+ "application/json": components$1["schemas"]["User"];
949
+ };
950
+ };
951
+ /** Bad Request (e.g., invalid input, username/password mismatch) */
952
+ 400: {
953
+ content: {
954
+ "application/json": components$1["schemas"]["Error"];
955
+ };
956
+ };
957
+ /** Conflict (e.g., user already exists) */
958
+ 409: {
959
+ content: {
960
+ "application/json": components$1["schemas"]["Error"];
961
+ };
962
+ };
963
+ /** Internal Server Error */
964
+ 500: {
965
+ content: {
966
+ "application/json": components$1["schemas"]["Error"];
967
+ };
968
+ };
922
969
  };
923
- restoreTable: {
924
- parameters: {
925
- query?: never;
926
- header?: never;
927
- path: {
928
- /** @description Name of the table to restore into */
929
- tableName: string;
930
- };
931
- cookie?: never;
932
- };
933
- requestBody: {
934
- content: {
935
- "application/json": components["schemas"]["RestoreRequest"];
936
- };
937
- };
938
- responses: {
939
- /** @description Restore process triggered successfully */
940
- 202: {
941
- headers: {
942
- [name: string]: unknown;
943
- };
944
- content: {
945
- "application/json": {
946
- /** @example triggered */
947
- restore?: string;
948
- };
949
- };
950
- };
951
- 400: components["responses"]["BadRequest"];
952
- 500: components["responses"]["InternalServerError"];
953
- };
970
+ /** User creation details */
971
+ requestBody: {
972
+ content: {
973
+ "application/json": components$1["schemas"]["CreateUserRequest"];
974
+ };
954
975
  };
955
- lookupKey: {
956
- parameters: {
957
- query?: never;
958
- header?: never;
959
- path: {
960
- /** @description Name of the table */
961
- tableName: string;
962
- /** @description Key of the record to lookup */
963
- key: string;
964
- };
965
- cookie?: never;
966
- };
967
- requestBody?: never;
968
- responses: {
969
- /** @description Record found */
970
- 200: {
971
- headers: {
972
- [name: string]: unknown;
973
- };
974
- content: {
975
- "application/json": {
976
- [key: string]: unknown;
977
- };
978
- };
979
- };
980
- 400: components["responses"]["BadRequest"];
981
- 404: components["responses"]["NotFound"];
982
- 500: components["responses"]["InternalServerError"];
983
- };
976
+ };
977
+ /** Deletes a specific user. */
978
+ deleteUser: {
979
+ parameters: {
980
+ path: {
981
+ /** The username. */
982
+ userName: components$1["parameters"]["UserNamePathParameter"];
983
+ };
984
984
  };
985
- listIndexes: {
986
- parameters: {
987
- query?: never;
988
- header?: never;
989
- path: {
990
- /** @description Name of the table */
991
- tableName: string;
992
- };
993
- cookie?: never;
994
- };
995
- requestBody?: never;
996
- responses: {
997
- /** @description A list of indexes for the table */
998
- 200: {
999
- headers: {
1000
- [name: string]: unknown;
1001
- };
1002
- content: {
1003
- "application/json": components["schemas"]["IndexStatus"][];
1004
- };
1005
- };
1006
- 404: components["responses"]["NotFound"];
1007
- 500: components["responses"]["InternalServerError"];
1008
- };
985
+ responses: {
986
+ /** User deleted successfully */
987
+ 204: never;
988
+ /** Bad Request (e.g., username is required) */
989
+ 400: {
990
+ content: {
991
+ "application/json": components$1["schemas"]["Error"];
992
+ };
993
+ };
994
+ /** User not found */
995
+ 404: {
996
+ content: {
997
+ "application/json": components$1["schemas"]["Error"];
998
+ };
999
+ };
1000
+ /** Internal Server Error */
1001
+ 500: {
1002
+ content: {
1003
+ "application/json": components$1["schemas"]["Error"];
1004
+ };
1005
+ };
1009
1006
  };
1010
- getIndex: {
1011
- parameters: {
1012
- query?: never;
1013
- header?: never;
1014
- path: {
1015
- /** @description Name of the table */
1016
- tableName: string;
1017
- /** @description Name of the index */
1018
- indexName: string;
1019
- };
1020
- cookie?: never;
1021
- };
1022
- requestBody?: never;
1023
- responses: {
1024
- /** @description Index details */
1025
- 200: {
1026
- headers: {
1027
- [name: string]: unknown;
1028
- };
1029
- content: {
1030
- "application/json": components["schemas"]["IndexStatus"];
1031
- };
1032
- };
1033
- 404: components["responses"]["NotFound"];
1034
- 500: components["responses"]["InternalServerError"];
1035
- };
1007
+ };
1008
+ /** Updates the password for a specific user. */
1009
+ updateUserPassword: {
1010
+ parameters: {
1011
+ path: {
1012
+ /** The username. */
1013
+ userName: components$1["parameters"]["UserNamePathParameter"];
1014
+ };
1036
1015
  };
1037
- createIndex: {
1038
- parameters: {
1039
- query?: never;
1040
- header?: never;
1041
- path: {
1042
- /** @description Name of the table */
1043
- tableName: string;
1044
- /** @description Name of the index */
1045
- indexName: string;
1046
- };
1047
- cookie?: never;
1048
- };
1049
- requestBody: {
1050
- content: {
1051
- "application/json": components["schemas"]["CreateIndexRequest"];
1052
- };
1053
- };
1054
- responses: {
1055
- /** @description Index added successfully */
1056
- 201: {
1057
- headers: {
1058
- [name: string]: unknown;
1059
- };
1060
- content?: never;
1061
- };
1062
- 400: components["responses"]["BadRequest"];
1063
- 500: components["responses"]["InternalServerError"];
1064
- };
1016
+ responses: {
1017
+ /** Password updated successfully */
1018
+ 200: {
1019
+ content: {
1020
+ "application/json": components$1["schemas"]["SuccessMessage"];
1021
+ };
1022
+ };
1023
+ /** Bad Request (e.g., new password empty, username required) */
1024
+ 400: {
1025
+ content: {
1026
+ "application/json": components$1["schemas"]["Error"];
1027
+ };
1028
+ };
1029
+ /** User not found */
1030
+ 404: {
1031
+ content: {
1032
+ "application/json": components$1["schemas"]["Error"];
1033
+ };
1034
+ };
1035
+ /** Internal Server Error */
1036
+ 500: {
1037
+ content: {
1038
+ "application/json": components$1["schemas"]["Error"];
1039
+ };
1040
+ };
1065
1041
  };
1066
- dropIndex: {
1067
- parameters: {
1068
- query?: never;
1069
- header?: never;
1070
- path: {
1071
- /** @description Name of the table */
1072
- tableName: string;
1073
- /** @description Name of the index */
1074
- indexName: string;
1075
- };
1076
- cookie?: never;
1077
- };
1078
- requestBody?: never;
1079
- responses: {
1080
- /** @description Index dropped successfully */
1081
- 201: {
1082
- headers: {
1083
- [name: string]: unknown;
1084
- };
1085
- content?: never;
1086
- };
1087
- 400: components["responses"]["BadRequest"];
1088
- 500: components["responses"]["InternalServerError"];
1089
- };
1042
+ /** New password details */
1043
+ requestBody: {
1044
+ content: {
1045
+ "application/json": components$1["schemas"]["UpdatePasswordRequest"];
1046
+ };
1090
1047
  };
1091
- getUserByName: {
1092
- parameters: {
1093
- query?: never;
1094
- header?: never;
1095
- path: {
1096
- /** @description The username. */
1097
- userName: components["parameters"]["UserNamePathParameter"];
1098
- };
1099
- cookie?: never;
1100
- };
1101
- requestBody?: never;
1102
- responses: {
1103
- /** @description Successful operation */
1104
- 200: {
1105
- headers: {
1106
- [name: string]: unknown;
1107
- };
1108
- content: {
1109
- "application/json": components["schemas"]["User"];
1110
- };
1111
- };
1112
- /** @description Bad Request (e.g., username is required) */
1113
- 400: {
1114
- headers: {
1115
- [name: string]: unknown;
1116
- };
1117
- content: {
1118
- "application/json": components["schemas"]["Error"];
1119
- };
1120
- };
1121
- /** @description User not found */
1122
- 404: {
1123
- headers: {
1124
- [name: string]: unknown;
1125
- };
1126
- content: {
1127
- "application/json": components["schemas"]["Error"];
1128
- };
1129
- };
1130
- /** @description Internal Server Error */
1131
- 500: {
1132
- headers: {
1133
- [name: string]: unknown;
1134
- };
1135
- content: {
1136
- "application/json": components["schemas"]["Error"];
1137
- };
1138
- };
1139
- };
1048
+ };
1049
+ /** Retrieves all permissions for a specific user. */
1050
+ getUserPermissions: {
1051
+ parameters: {
1052
+ path: {
1053
+ /** The username. */
1054
+ userName: components$1["parameters"]["UserNamePathParameter"];
1055
+ };
1140
1056
  };
1141
- createUser: {
1142
- parameters: {
1143
- query?: never;
1144
- header?: never;
1145
- path: {
1146
- /** @description The username. */
1147
- userName: components["parameters"]["UserNamePathParameter"];
1148
- };
1149
- cookie?: never;
1150
- };
1151
- /** @description User creation details */
1152
- requestBody: {
1153
- content: {
1154
- "application/json": components["schemas"]["CreateUserRequest"];
1155
- };
1156
- };
1157
- responses: {
1158
- /** @description User created successfully */
1159
- 201: {
1160
- headers: {
1161
- [name: string]: unknown;
1162
- };
1163
- content: {
1164
- "application/json": components["schemas"]["User"];
1165
- };
1166
- };
1167
- /** @description Bad Request (e.g., invalid input, username/password mismatch) */
1168
- 400: {
1169
- headers: {
1170
- [name: string]: unknown;
1171
- };
1172
- content: {
1173
- "application/json": components["schemas"]["Error"];
1174
- };
1175
- };
1176
- /** @description Conflict (e.g., user already exists) */
1177
- 409: {
1178
- headers: {
1179
- [name: string]: unknown;
1180
- };
1181
- content: {
1182
- "application/json": components["schemas"]["Error"];
1183
- };
1184
- };
1185
- /** @description Internal Server Error */
1186
- 500: {
1187
- headers: {
1188
- [name: string]: unknown;
1189
- };
1190
- content: {
1191
- "application/json": components["schemas"]["Error"];
1192
- };
1193
- };
1194
- };
1057
+ responses: {
1058
+ /** Successful operation */
1059
+ 200: {
1060
+ content: {
1061
+ "application/json": components$1["schemas"]["Permission"][];
1062
+ };
1063
+ };
1064
+ /** Bad Request (e.g., username is required) */
1065
+ 400: {
1066
+ content: {
1067
+ "application/json": components$1["schemas"]["Error"];
1068
+ };
1069
+ };
1070
+ /** User not found */
1071
+ 404: {
1072
+ content: {
1073
+ "application/json": components$1["schemas"]["Error"];
1074
+ };
1075
+ };
1076
+ /** Internal Server Error */
1077
+ 500: {
1078
+ content: {
1079
+ "application/json": components$1["schemas"]["Error"];
1080
+ };
1081
+ };
1195
1082
  };
1196
- deleteUser: {
1197
- parameters: {
1198
- query?: never;
1199
- header?: never;
1200
- path: {
1201
- /** @description The username. */
1202
- userName: components["parameters"]["UserNamePathParameter"];
1203
- };
1204
- cookie?: never;
1205
- };
1206
- requestBody?: never;
1207
- responses: {
1208
- /** @description User deleted successfully */
1209
- 204: {
1210
- headers: {
1211
- [name: string]: unknown;
1212
- };
1213
- content?: never;
1214
- };
1215
- /** @description Bad Request (e.g., username is required) */
1216
- 400: {
1217
- headers: {
1218
- [name: string]: unknown;
1219
- };
1220
- content: {
1221
- "application/json": components["schemas"]["Error"];
1222
- };
1223
- };
1224
- /** @description User not found */
1225
- 404: {
1226
- headers: {
1227
- [name: string]: unknown;
1228
- };
1229
- content: {
1230
- "application/json": components["schemas"]["Error"];
1231
- };
1232
- };
1233
- /** @description Internal Server Error */
1234
- 500: {
1235
- headers: {
1236
- [name: string]: unknown;
1237
- };
1238
- content: {
1239
- "application/json": components["schemas"]["Error"];
1240
- };
1241
- };
1242
- };
1083
+ };
1084
+ /** Adds a new permission to a specific user. */
1085
+ addPermissionToUser: {
1086
+ parameters: {
1087
+ path: {
1088
+ /** The username. */
1089
+ userName: components$1["parameters"]["UserNamePathParameter"];
1090
+ };
1243
1091
  };
1244
- updateUserPassword: {
1245
- parameters: {
1246
- query?: never;
1247
- header?: never;
1248
- path: {
1249
- /** @description The username. */
1250
- userName: components["parameters"]["UserNamePathParameter"];
1251
- };
1252
- cookie?: never;
1253
- };
1254
- /** @description New password details */
1255
- requestBody: {
1256
- content: {
1257
- "application/json": components["schemas"]["UpdatePasswordRequest"];
1258
- };
1259
- };
1260
- responses: {
1261
- /** @description Password updated successfully */
1262
- 200: {
1263
- headers: {
1264
- [name: string]: unknown;
1265
- };
1266
- content: {
1267
- "application/json": components["schemas"]["SuccessMessage"];
1268
- };
1269
- };
1270
- /** @description Bad Request (e.g., new password empty, username required) */
1271
- 400: {
1272
- headers: {
1273
- [name: string]: unknown;
1274
- };
1275
- content: {
1276
- "application/json": components["schemas"]["Error"];
1277
- };
1278
- };
1279
- /** @description User not found */
1280
- 404: {
1281
- headers: {
1282
- [name: string]: unknown;
1283
- };
1284
- content: {
1285
- "application/json": components["schemas"]["Error"];
1286
- };
1287
- };
1288
- /** @description Internal Server Error */
1289
- 500: {
1290
- headers: {
1291
- [name: string]: unknown;
1292
- };
1293
- content: {
1294
- "application/json": components["schemas"]["Error"];
1295
- };
1296
- };
1297
- };
1092
+ responses: {
1093
+ /** Permission added successfully */
1094
+ 201: {
1095
+ content: {
1096
+ "application/json": components$1["schemas"]["SuccessMessage"];
1097
+ };
1098
+ };
1099
+ /** Bad Request (e.g., invalid input, username required) */
1100
+ 400: {
1101
+ content: {
1102
+ "application/json": components$1["schemas"]["Error"];
1103
+ };
1104
+ };
1105
+ /** User not found */
1106
+ 404: {
1107
+ content: {
1108
+ "application/json": components$1["schemas"]["Error"];
1109
+ };
1110
+ };
1111
+ /** Internal Server Error */
1112
+ 500: {
1113
+ content: {
1114
+ "application/json": components$1["schemas"]["Error"];
1115
+ };
1116
+ };
1298
1117
  };
1299
- getUserPermissions: {
1300
- parameters: {
1301
- query?: never;
1302
- header?: never;
1303
- path: {
1304
- /** @description The username. */
1305
- userName: components["parameters"]["UserNamePathParameter"];
1306
- };
1307
- cookie?: never;
1308
- };
1309
- requestBody?: never;
1310
- responses: {
1311
- /** @description Successful operation */
1312
- 200: {
1313
- headers: {
1314
- [name: string]: unknown;
1315
- };
1316
- content: {
1317
- "application/json": components["schemas"]["Permission"][];
1318
- };
1319
- };
1320
- /** @description Bad Request (e.g., username is required) */
1321
- 400: {
1322
- headers: {
1323
- [name: string]: unknown;
1324
- };
1325
- content: {
1326
- "application/json": components["schemas"]["Error"];
1327
- };
1328
- };
1329
- /** @description User not found */
1330
- 404: {
1331
- headers: {
1332
- [name: string]: unknown;
1333
- };
1334
- content: {
1335
- "application/json": components["schemas"]["Error"];
1336
- };
1337
- };
1338
- /** @description Internal Server Error */
1339
- 500: {
1340
- headers: {
1341
- [name: string]: unknown;
1342
- };
1343
- content: {
1344
- "application/json": components["schemas"]["Error"];
1345
- };
1346
- };
1347
- };
1118
+ /** Permission details to add */
1119
+ requestBody: {
1120
+ content: {
1121
+ "application/json": components$1["schemas"]["Permission"];
1122
+ };
1348
1123
  };
1349
- addPermissionToUser: {
1350
- parameters: {
1351
- query?: never;
1352
- header?: never;
1353
- path: {
1354
- /** @description The username. */
1355
- userName: components["parameters"]["UserNamePathParameter"];
1356
- };
1357
- cookie?: never;
1358
- };
1359
- /** @description Permission details to add */
1360
- requestBody: {
1361
- content: {
1362
- "application/json": components["schemas"]["Permission"];
1363
- };
1364
- };
1365
- responses: {
1366
- /** @description Permission added successfully */
1367
- 201: {
1368
- headers: {
1369
- [name: string]: unknown;
1370
- };
1371
- content: {
1372
- "application/json": components["schemas"]["SuccessMessage"];
1373
- };
1374
- };
1375
- /** @description Bad Request (e.g., invalid input, username required) */
1376
- 400: {
1377
- headers: {
1378
- [name: string]: unknown;
1379
- };
1380
- content: {
1381
- "application/json": components["schemas"]["Error"];
1382
- };
1383
- };
1384
- /** @description User not found */
1385
- 404: {
1386
- headers: {
1387
- [name: string]: unknown;
1388
- };
1389
- content: {
1390
- "application/json": components["schemas"]["Error"];
1391
- };
1392
- };
1393
- /** @description Internal Server Error */
1394
- 500: {
1395
- headers: {
1396
- [name: string]: unknown;
1397
- };
1398
- content: {
1399
- "application/json": components["schemas"]["Error"];
1400
- };
1401
- };
1402
- };
1124
+ };
1125
+ /** Removes a specific permission rule from a user based on resource name and type. */
1126
+ removePermissionFromUser: {
1127
+ parameters: {
1128
+ path: {
1129
+ /** The username. */
1130
+ userName: components$1["parameters"]["UserNamePathParameter"];
1131
+ };
1132
+ query: {
1133
+ /** The name of the resource for the permission to be removed. */
1134
+ resource: string;
1135
+ /** The type of the resource for the permission to be removed. */
1136
+ resourceType: components$1["schemas"]["ResourceType"];
1137
+ };
1403
1138
  };
1404
- removePermissionFromUser: {
1405
- parameters: {
1406
- query: {
1407
- /** @description The name of the resource for the permission to be removed. */
1408
- resource: string;
1409
- /** @description The type of the resource for the permission to be removed. */
1410
- resourceType: components["schemas"]["ResourceType"];
1411
- };
1412
- header?: never;
1413
- path: {
1414
- /** @description The username. */
1415
- userName: components["parameters"]["UserNamePathParameter"];
1416
- };
1417
- cookie?: never;
1418
- };
1419
- requestBody?: never;
1420
- responses: {
1421
- /** @description Permission removed successfully */
1422
- 204: {
1423
- headers: {
1424
- [name: string]: unknown;
1425
- };
1426
- content?: never;
1427
- };
1428
- /** @description Bad Request (e.g., missing query parameters, invalid resourceType, username required) */
1429
- 400: {
1430
- headers: {
1431
- [name: string]: unknown;
1432
- };
1433
- content: {
1434
- "application/json": components["schemas"]["Error"];
1435
- };
1436
- };
1437
- /** @description User not found or Role not found for the given resource */
1438
- 404: {
1439
- headers: {
1440
- [name: string]: unknown;
1441
- };
1442
- content: {
1443
- "application/json": components["schemas"]["Error"];
1444
- };
1445
- };
1446
- /** @description Internal Server Error */
1447
- 500: {
1448
- headers: {
1449
- [name: string]: unknown;
1450
- };
1451
- content: {
1452
- "application/json": components["schemas"]["Error"];
1453
- };
1454
- };
1455
- };
1139
+ responses: {
1140
+ /** Permission removed successfully */
1141
+ 204: never;
1142
+ /** Bad Request (e.g., missing query parameters, invalid resourceType, username required) */
1143
+ 400: {
1144
+ content: {
1145
+ "application/json": components$1["schemas"]["Error"];
1146
+ };
1147
+ };
1148
+ /** User not found or Role not found for the given resource */
1149
+ 404: {
1150
+ content: {
1151
+ "application/json": components$1["schemas"]["Error"];
1152
+ };
1153
+ };
1154
+ /** Internal Server Error */
1155
+ 500: {
1156
+ content: {
1157
+ "application/json": components$1["schemas"]["Error"];
1158
+ };
1159
+ };
1456
1160
  };
1161
+ };
1457
1162
  }
1458
1163
 
1459
1164
  /**
@@ -1461,35 +1166,38 @@ interface operations {
1461
1166
  * Re-exports commonly used types from the generated OpenAPI types
1462
1167
  */
1463
1168
 
1464
- type QueryRequest = components["schemas"]["QueryRequest"];
1465
- type QueryResult = components["schemas"]["QueryResult"];
1466
- type QueryHit = components["schemas"]["QueryHit"];
1169
+ type QueryRequest = components$1["schemas"]["QueryRequest"];
1170
+ type QueryResult = components$1["schemas"]["QueryResult"];
1171
+ type QueryHit = components$1["schemas"]["QueryHit"];
1172
+ type QueryResponses = components$1["schemas"]["QueryResponses"];
1467
1173
  interface BatchRequest {
1468
1174
  inserts?: Record<string, unknown>;
1469
1175
  deletes?: string[];
1470
1176
  }
1471
- type Table = components["schemas"]["Table"];
1472
- type CreateTableRequest = components["schemas"]["CreateTableRequest"];
1473
- type TableSchema = components["schemas"]["TableSchema"];
1474
- type TableStatus = components["schemas"]["TableStatus"];
1475
- type IndexConfig = components["schemas"]["IndexConfig"];
1476
- type IndexStatus = components["schemas"]["IndexStatus"];
1477
- type CreateIndexRequest = components["schemas"]["CreateIndexRequest"];
1478
- type User = components["schemas"]["User"];
1479
- type CreateUserRequest = components["schemas"]["CreateUserRequest"];
1480
- type UpdatePasswordRequest = components["schemas"]["UpdatePasswordRequest"];
1481
- type Permission = components["schemas"]["Permission"];
1482
- type ResourceType = components["schemas"]["ResourceType"];
1483
- type PermissionType = components["schemas"]["PermissionType"];
1484
- type BackupRequest = components["schemas"]["BackupRequest"];
1485
- type RestoreRequest = components["schemas"]["RestoreRequest"];
1486
- type ValueType = components["schemas"]["ValueType"];
1487
- type ValueSchema = components["schemas"]["ValueSchema"];
1488
- type DocumentSchema = components["schemas"]["DocumentSchema"];
1489
- type FacetOption = components["schemas"]["FacetOption"];
1490
- type FacetResult = components["schemas"]["FacetResult"];
1491
- type Reranker = components["schemas"]["Reranker"];
1492
- type AntflyError = components["schemas"]["Error"];
1177
+ type Table = components$1["schemas"]["Table"];
1178
+ type CreateTableRequest = components$1["schemas"]["CreateTableRequest"];
1179
+ type TableSchema = components$1["schemas"]["TableSchema"];
1180
+ type TableStatus = components$1["schemas"]["TableStatus"];
1181
+ type IndexConfig = components$1["schemas"]["IndexConfig"];
1182
+ type IndexStatus = components$1["schemas"]["IndexStatus"];
1183
+ type User = components$1["schemas"]["User"];
1184
+ type CreateUserRequest = components$1["schemas"]["CreateUserRequest"];
1185
+ type UpdatePasswordRequest = components$1["schemas"]["UpdatePasswordRequest"];
1186
+ type Permission = components$1["schemas"]["Permission"];
1187
+ type ResourceType = components$1["schemas"]["ResourceType"];
1188
+ type PermissionType = components$1["schemas"]["PermissionType"];
1189
+ type BackupRequest = components$1["schemas"]["BackupRequest"];
1190
+ type RestoreRequest = components$1["schemas"]["RestoreRequest"];
1191
+ type ValueType = components$1["schemas"]["ValueType"];
1192
+ type ValueSchema = components$1["schemas"]["ValueSchema"];
1193
+ type DocumentSchema = components$1["schemas"]["DocumentSchema"];
1194
+ type FacetOption = components$1["schemas"]["FacetOption"];
1195
+ type FacetResult = components$1["schemas"]["FacetResult"];
1196
+ type ModelConfig = components$1["schemas"]["ModelConfig"];
1197
+ type RerankerConfig = components$1["schemas"]["RerankerConfig"];
1198
+ type Provider = components$1["schemas"]["Provider"];
1199
+ declare const providers: components$1["schemas"]["Provider"][];
1200
+ type AntflyError = components$1["schemas"]["Error"];
1493
1201
  type ResponseData<T extends keyof operations> = operations[T]["responses"] extends {
1494
1202
  200: infer R;
1495
1203
  } ? R extends {
@@ -1535,38 +1243,32 @@ declare class AntflyClient {
1535
1243
  /**
1536
1244
  * List all tables
1537
1245
  */
1538
- list: () => Promise<{
1246
+ list: () => Promise<({
1539
1247
  name: string;
1540
1248
  indexes: {
1541
- [key: string]: components["schemas"]["IndexConfig"];
1249
+ [key: string]: components$1["schemas"]["IndexConfig"];
1542
1250
  };
1543
1251
  shards: {
1544
- [key: string]:
1545
- /**
1546
- * Get the underlying OpenAPI client for advanced use cases
1547
- */
1548
- components["schemas"]["ShardConfig"];
1252
+ [key: string]: components$1["schemas"]["ShardConfig"];
1549
1253
  };
1550
- schema?: components["schemas"]["TableSchema"];
1551
- }[]>;
1254
+ schema?: components$1["schemas"]["TableSchema"];
1255
+ } & {
1256
+ storage_status: components$1["schemas"]["StorageStatus"];
1257
+ })[]>;
1552
1258
  /**
1553
1259
  * Get table details and status
1554
1260
  */
1555
1261
  get: (tableName: string) => Promise<{
1556
1262
  name: string;
1557
1263
  indexes: {
1558
- [key: string]: components["schemas"]["IndexConfig"];
1264
+ [key: string]: components$1["schemas"]["IndexConfig"];
1559
1265
  };
1560
1266
  shards: {
1561
- [key: string]:
1562
- /**
1563
- * Get the underlying OpenAPI client for advanced use cases
1564
- */
1565
- components["schemas"]["ShardConfig"];
1267
+ [key: string]: components$1["schemas"]["ShardConfig"];
1566
1268
  };
1567
- schema?: components["schemas"]["TableSchema"];
1269
+ schema?: components$1["schemas"]["TableSchema"];
1568
1270
  } & {
1569
- storage_status: components["schemas"]["StorageStatus"];
1271
+ storage_status: components$1["schemas"]["StorageStatus"];
1570
1272
  }>;
1571
1273
  /**
1572
1274
  * Create a new table
@@ -1574,16 +1276,12 @@ declare class AntflyClient {
1574
1276
  create: (tableName: string, config?: CreateTableRequest) => Promise<{
1575
1277
  name: string;
1576
1278
  indexes: {
1577
- [key: string]: components["schemas"]["IndexConfig"];
1279
+ [key: string]: components$1["schemas"]["IndexConfig"];
1578
1280
  };
1579
1281
  shards: {
1580
- [key: string]:
1581
- /**
1582
- * Get the underlying OpenAPI client for advanced use cases
1583
- */
1584
- components["schemas"]["ShardConfig"];
1282
+ [key: string]: components$1["schemas"]["ShardConfig"];
1585
1283
  };
1586
- schema?: components["schemas"]["TableSchema"];
1284
+ schema?: components$1["schemas"]["TableSchema"];
1587
1285
  }>;
1588
1286
  /**
1589
1287
  * Drop a table
@@ -1593,13 +1291,7 @@ declare class AntflyClient {
1593
1291
  * Query a specific table
1594
1292
  */
1595
1293
  query: (tableName: string, request: QueryRequest) => Promise<{
1596
- hits?: components["schemas"]["QueryHits"];
1597
- facets?: {
1598
- [key: string]: components["schemas"]["FacetResult"];
1599
- };
1600
- took: number;
1601
- status: number;
1602
- error?: string;
1294
+ responses?: components$1["schemas"]["QueryResult"][];
1603
1295
  }>;
1604
1296
  /**
1605
1297
  * Perform batch operations on a table
@@ -1633,32 +1325,26 @@ declare class AntflyClient {
1633
1325
  /**
1634
1326
  * List all indexes for a table
1635
1327
  */
1636
- list: (tableName: string) => Promise<({
1637
- name: string;
1638
- type: string;
1639
- config: {
1640
- [key: string]: unknown;
1641
- };
1642
- } & {
1328
+ list: (tableName: string) => Promise<{
1329
+ config: components$1["schemas"]["IndexConfig"];
1643
1330
  shard_status: {
1644
- [key: string]: Record<string, never>;
1331
+ [key: string]: {
1332
+ [key: string]: unknown;
1333
+ };
1645
1334
  };
1646
1335
  status: {
1647
1336
  [key: string]: unknown;
1648
1337
  };
1649
- })[]>;
1338
+ }[]>;
1650
1339
  /**
1651
1340
  * Get index details
1652
1341
  */
1653
1342
  get: (tableName: string, indexName: string) => Promise<{
1654
- name: string;
1655
- type: string;
1656
- config: {
1657
- [key: string]: unknown;
1658
- };
1659
- } & {
1343
+ config: components$1["schemas"]["IndexConfig"];
1660
1344
  shard_status: {
1661
- [key: string]: Record<string, never>;
1345
+ [key: string]: {
1346
+ [key: string]: unknown;
1347
+ };
1662
1348
  };
1663
1349
  status: {
1664
1350
  [key: string]: unknown;
@@ -1667,7 +1353,7 @@ declare class AntflyClient {
1667
1353
  /**
1668
1354
  * Create a new index
1669
1355
  */
1670
- create: (tableName: string, indexName: string, config: CreateIndexRequest) => Promise<boolean>;
1356
+ create: (tableName: string, config: IndexConfig) => Promise<boolean>;
1671
1357
  /**
1672
1358
  * Drop an index
1673
1359
  */
@@ -1706,8 +1392,8 @@ declare class AntflyClient {
1706
1392
  */
1707
1393
  getPermissions: (userName: string) => Promise<{
1708
1394
  resource: string;
1709
- resource_type: components["schemas"]["ResourceType"];
1710
- type: components["schemas"]["PermissionType"];
1395
+ resource_type: components$1["schemas"]["ResourceType"];
1396
+ type: components$1["schemas"]["PermissionType"];
1711
1397
  }[]>;
1712
1398
  /**
1713
1399
  * Add permission to user
@@ -1726,6 +1412,217 @@ declare class AntflyClient {
1726
1412
  getRawClient(): Client<paths, `${string}/${string}`>;
1727
1413
  }
1728
1414
 
1415
+ interface components {
1416
+ schemas: {
1417
+ /**
1418
+ * Format: double
1419
+ * @description A floating-point number used to decrease or increase the relevance scores of a query.
1420
+ * @default 1
1421
+ */
1422
+ Boost: number | null;
1423
+ /** @description The fuzziness of the query. Can be an integer or "auto". */
1424
+ Fuzziness: Partial<number> & Partial<"auto">;
1425
+ GeoPoint: {
1426
+ /** Format: double */
1427
+ lon?: number;
1428
+ /** Format: double */
1429
+ lat?: number;
1430
+ };
1431
+ TermQuery: {
1432
+ term: string;
1433
+ field?: string;
1434
+ boost?: components["schemas"]["Boost"];
1435
+ };
1436
+ MatchQuery: {
1437
+ match: string;
1438
+ field?: string;
1439
+ analyzer?: string;
1440
+ boost?: components["schemas"]["Boost"];
1441
+ /** Format: int32 */
1442
+ prefix_length?: number;
1443
+ fuzziness?: components["schemas"]["Fuzziness"];
1444
+ /** @enum {string} */
1445
+ operator?: "or" | "and";
1446
+ };
1447
+ MatchPhraseQuery: {
1448
+ match_phrase: string;
1449
+ field?: string;
1450
+ analyzer?: string;
1451
+ boost?: components["schemas"]["Boost"];
1452
+ fuzziness?: components["schemas"]["Fuzziness"];
1453
+ };
1454
+ PhraseQuery: {
1455
+ terms: string[];
1456
+ field?: string;
1457
+ boost?: components["schemas"]["Boost"];
1458
+ fuzziness?: components["schemas"]["Fuzziness"];
1459
+ };
1460
+ MultiPhraseQuery: {
1461
+ terms: string[][];
1462
+ field?: string;
1463
+ boost?: components["schemas"]["Boost"];
1464
+ fuzziness?: components["schemas"]["Fuzziness"];
1465
+ };
1466
+ FuzzyQuery: {
1467
+ term: string;
1468
+ /** Format: int32 */
1469
+ prefix_length?: number;
1470
+ fuzziness?: components["schemas"]["Fuzziness"];
1471
+ field?: string;
1472
+ boost?: components["schemas"]["Boost"];
1473
+ };
1474
+ PrefixQuery: {
1475
+ prefix: string;
1476
+ field?: string;
1477
+ boost?: components["schemas"]["Boost"];
1478
+ };
1479
+ RegexpQuery: {
1480
+ regexp: string;
1481
+ field?: string;
1482
+ boost?: components["schemas"]["Boost"];
1483
+ };
1484
+ WildcardQuery: {
1485
+ wildcard: string;
1486
+ field?: string;
1487
+ boost?: components["schemas"]["Boost"];
1488
+ };
1489
+ QueryStringQuery: {
1490
+ query: string;
1491
+ boost?: components["schemas"]["Boost"];
1492
+ };
1493
+ NumericRangeQuery: {
1494
+ /** Format: double */
1495
+ min?: number | null;
1496
+ /** Format: double */
1497
+ max?: number | null;
1498
+ inclusive_min?: boolean | null;
1499
+ inclusive_max?: boolean | null;
1500
+ field?: string;
1501
+ boost?: components["schemas"]["Boost"];
1502
+ };
1503
+ TermRangeQuery: {
1504
+ min?: string | null;
1505
+ max?: string | null;
1506
+ inclusive_min?: boolean | null;
1507
+ inclusive_max?: boolean | null;
1508
+ field?: string;
1509
+ boost?: components["schemas"]["Boost"];
1510
+ };
1511
+ DateRangeStringQuery: {
1512
+ /** Format: date-time */
1513
+ start?: string;
1514
+ /** Format: date-time */
1515
+ end?: string;
1516
+ inclusive_start?: boolean | null;
1517
+ inclusive_end?: boolean | null;
1518
+ field?: string;
1519
+ boost?: components["schemas"]["Boost"];
1520
+ datetime_parser?: string;
1521
+ };
1522
+ BooleanQuery: {
1523
+ must?: components["schemas"]["ConjunctionQuery"];
1524
+ should?: components["schemas"]["DisjunctionQuery"];
1525
+ must_not?: components["schemas"]["DisjunctionQuery"];
1526
+ filter?: components["schemas"]["Query"];
1527
+ boost?: components["schemas"]["Boost"];
1528
+ };
1529
+ ConjunctionQuery: {
1530
+ conjuncts: components["schemas"]["Query"][];
1531
+ boost?: components["schemas"]["Boost"];
1532
+ };
1533
+ DisjunctionQuery: {
1534
+ disjuncts: components["schemas"]["Query"][];
1535
+ boost?: components["schemas"]["Boost"];
1536
+ /** Format: double */
1537
+ min?: number;
1538
+ };
1539
+ MatchAllQuery: {
1540
+ match_all: { [key: string]: unknown };
1541
+ boost?: components["schemas"]["Boost"];
1542
+ };
1543
+ MatchNoneQuery: {
1544
+ match_none: { [key: string]: unknown };
1545
+ boost?: components["schemas"]["Boost"];
1546
+ };
1547
+ DocIdQuery: {
1548
+ ids: string[];
1549
+ boost?: components["schemas"]["Boost"];
1550
+ };
1551
+ BoolFieldQuery: {
1552
+ bool: boolean;
1553
+ field?: string;
1554
+ boost?: components["schemas"]["Boost"];
1555
+ };
1556
+ IPRangeQuery: {
1557
+ cidr: string;
1558
+ field?: string;
1559
+ boost?: components["schemas"]["Boost"];
1560
+ };
1561
+ GeoBoundingBoxQuery: {
1562
+ /** @description [lon, lat] */
1563
+ top_left: number[];
1564
+ /** @description [lon, lat] */
1565
+ bottom_right: number[];
1566
+ field?: string;
1567
+ boost?: components["schemas"]["Boost"];
1568
+ };
1569
+ GeoDistanceQuery: {
1570
+ /** @description [lon, lat] */
1571
+ location: number[];
1572
+ /** @example 10km */
1573
+ distance: string;
1574
+ field?: string;
1575
+ boost?: components["schemas"]["Boost"];
1576
+ };
1577
+ GeoBoundingPolygonQuery: {
1578
+ polygon_points: components["schemas"]["GeoPoint"][];
1579
+ field?: string;
1580
+ boost?: components["schemas"]["Boost"];
1581
+ };
1582
+ /** @description A GeoJSON shape object. This is a simplified representation. */
1583
+ GeoShape: {
1584
+ type: string;
1585
+ coordinates: unknown[];
1586
+ };
1587
+ GeoShapeGeometry: {
1588
+ shape: components["schemas"]["GeoShape"];
1589
+ /** @enum {string} */
1590
+ relation: "intersects" | "contains" | "within";
1591
+ };
1592
+ GeoShapeQuery: {
1593
+ geometry: components["schemas"]["GeoShapeGeometry"];
1594
+ field?: string;
1595
+ boost?: components["schemas"]["Boost"];
1596
+ };
1597
+ Query:
1598
+ | components["schemas"]["TermQuery"]
1599
+ | components["schemas"]["MatchQuery"]
1600
+ | components["schemas"]["MatchPhraseQuery"]
1601
+ | components["schemas"]["PhraseQuery"]
1602
+ | components["schemas"]["MultiPhraseQuery"]
1603
+ | components["schemas"]["FuzzyQuery"]
1604
+ | components["schemas"]["PrefixQuery"]
1605
+ | components["schemas"]["RegexpQuery"]
1606
+ | components["schemas"]["WildcardQuery"]
1607
+ | components["schemas"]["QueryStringQuery"]
1608
+ | components["schemas"]["NumericRangeQuery"]
1609
+ | components["schemas"]["TermRangeQuery"]
1610
+ | components["schemas"]["DateRangeStringQuery"]
1611
+ | components["schemas"]["BooleanQuery"]
1612
+ | components["schemas"]["ConjunctionQuery"]
1613
+ | components["schemas"]["DisjunctionQuery"]
1614
+ | components["schemas"]["MatchAllQuery"]
1615
+ | components["schemas"]["MatchNoneQuery"]
1616
+ | components["schemas"]["DocIdQuery"]
1617
+ | components["schemas"]["BoolFieldQuery"]
1618
+ | components["schemas"]["IPRangeQuery"]
1619
+ | components["schemas"]["GeoBoundingBoxQuery"]
1620
+ | components["schemas"]["GeoDistanceQuery"]
1621
+ | components["schemas"]["GeoBoundingPolygonQuery"]
1622
+ | components["schemas"]["GeoShapeQuery"];
1623
+ };
1624
+ }
1625
+
1729
1626
  /**
1730
1627
  * Antfly SDK for TypeScript
1731
1628
  *
@@ -1761,4 +1658,4 @@ declare class AntflyClient {
1761
1658
  * ```
1762
1659
  */
1763
1660
 
1764
- export { AntflyClient, type AntflyConfig, type AntflyError, type BackupRequest, type BatchRequest, type CreateIndexRequest, type CreateTableRequest, type CreateUserRequest, type DocumentSchema, type FacetOption, type FacetResult, type IndexConfig, type IndexStatus, type Permission, type PermissionType, type QueryHit, type QueryOptions, type QueryRequest, type QueryResult, type Reranker, type ResourceType, type ResponseData, type RestoreRequest, type Table, type TableSchema, type TableStatus, type UpdatePasswordRequest, type User, type ValueSchema, type ValueType, type components, AntflyClient as default, type operations, type paths };
1661
+ export { AntflyClient, type AntflyConfig, type AntflyError, type BackupRequest, type BatchRequest, type CreateTableRequest, type CreateUserRequest, type DocumentSchema, type FacetOption, type FacetResult, type IndexConfig, type IndexStatus, type ModelConfig, type Permission, type PermissionType, type Provider, type QueryHit, type QueryOptions, type QueryRequest, type QueryResponses, type QueryResult, type RerankerConfig, type ResourceType, type ResponseData, type RestoreRequest, type Table, type TableSchema, type TableStatus, type UpdatePasswordRequest, type User, type ValueSchema, type ValueType, type components as bleve_components, type components$1 as components, AntflyClient as default, type operations, type paths, providers };