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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/lex-gql.d.ts +26 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lex-gql",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Generate a complete GraphQL API from AT Protocol lexicons",
5
5
  "license": "MIT",
6
6
  "type": "module",
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
  };