lex-gql 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/lex-gql.d.ts +26 -0
package/package.json
CHANGED
package/src/lex-gql.d.ts
CHANGED
|
@@ -354,9 +354,35 @@ export type PartitionedResultEntry = {
|
|
|
354
354
|
export type PartitionedResult = {
|
|
355
355
|
[x: string]: PartitionedResultEntry;
|
|
356
356
|
};
|
|
357
|
+
export type SearchParams = {
|
|
358
|
+
/**
|
|
359
|
+
* - Collection name (e.g., 'app.bsky.feed.post')
|
|
360
|
+
*/
|
|
361
|
+
collection: string;
|
|
362
|
+
/**
|
|
363
|
+
* - Search query string
|
|
364
|
+
*/
|
|
365
|
+
query: string;
|
|
366
|
+
/**
|
|
367
|
+
* - Optional where clause (validated against filterable fields)
|
|
368
|
+
*/
|
|
369
|
+
where?: any;
|
|
370
|
+
/**
|
|
371
|
+
* - Maximum results to return
|
|
372
|
+
*/
|
|
373
|
+
first?: number | undefined;
|
|
374
|
+
/**
|
|
375
|
+
* - Cursor for pagination
|
|
376
|
+
*/
|
|
377
|
+
after?: string | undefined;
|
|
378
|
+
};
|
|
357
379
|
export type AdapterOptions = {
|
|
358
380
|
query: (op: Operation) => Promise<any>;
|
|
359
381
|
subscribe?: ((op: SubscribeOperation) => AsyncIterable<any>) | undefined;
|
|
382
|
+
/**
|
|
383
|
+
* - Search function for full-text search
|
|
384
|
+
*/
|
|
385
|
+
search?: ((params: SearchParams) => Promise<any>) | undefined;
|
|
360
386
|
context?: Record<string, any> | undefined;
|
|
361
387
|
maxDepth?: number | undefined;
|
|
362
388
|
};
|