@lpdjs/firestore-repo-service 3.0.7 → 3.0.9

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 (35) hide show
  1. package/dist/{create-servers-CRTjY8sA.d.cts → create-servers-6tpqVsSh.d.cts} +26 -2
  2. package/dist/{create-servers-C-X5e62o.d.ts → create-servers-U8q943yf.d.ts} +26 -2
  3. package/dist/index.cjs +90 -88
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.d.cts +4 -3
  6. package/dist/index.d.ts +4 -3
  7. package/dist/index.js +90 -88
  8. package/dist/index.js.map +1 -1
  9. package/dist/llms-full.txt +1 -1
  10. package/dist/llms.txt +1 -1
  11. package/dist/{queue-BYbd9y4U.d.cts → queue-CiZNShPZ.d.cts} +1 -1
  12. package/dist/{queue-I7Y1l3Wu.d.ts → queue-CrH-eNEN.d.ts} +1 -1
  13. package/dist/servers/index.cjs +99 -97
  14. package/dist/servers/index.cjs.map +1 -1
  15. package/dist/servers/index.d.cts +4 -3
  16. package/dist/servers/index.d.ts +4 -3
  17. package/dist/servers/index.js +99 -97
  18. package/dist/servers/index.js.map +1 -1
  19. package/dist/sync/bigquery.d.cts +1 -1
  20. package/dist/sync/bigquery.d.ts +1 -1
  21. package/dist/sync/index.cjs +45 -45
  22. package/dist/sync/index.cjs.map +1 -1
  23. package/dist/sync/index.d.cts +5 -5
  24. package/dist/sync/index.d.ts +5 -5
  25. package/dist/sync/index.js +45 -45
  26. package/dist/sync/index.js.map +1 -1
  27. package/dist/sync/meilisearch.cjs +2 -2
  28. package/dist/sync/meilisearch.cjs.map +1 -1
  29. package/dist/sync/meilisearch.d.cts +93 -6
  30. package/dist/sync/meilisearch.d.ts +93 -6
  31. package/dist/sync/meilisearch.js +2 -2
  32. package/dist/sync/meilisearch.js.map +1 -1
  33. package/dist/{types-B48PI0V9.d.cts → types-C5qxru8j.d.cts} +8 -2
  34. package/dist/{types-DbtP8YCJ.d.ts → types-HZG1KlML.d.ts} +8 -2
  35. package/package.json +1 -1
@@ -1,10 +1,11 @@
1
- import { S as SyncQueue } from './queue-BYbd9y4U.cjs';
2
- import { F as FirestoreSyncConfig, S as SyncEvent } from './types-B48PI0V9.cjs';
1
+ import { S as SyncQueue } from './queue-CiZNShPZ.cjs';
2
+ import { F as FirestoreSyncConfig, S as SyncEvent } from './types-C5qxru8j.cjs';
3
3
  import { O as OpenAPIDocument } from './openapi-Bp4vtku3.cjs';
4
4
  import * as firebase_functions_v2_https from 'firebase-functions/v2/https';
5
5
  import { onRequest, HttpsOptions } from 'firebase-functions/v2/https';
6
6
  import { H as HistoryTriggersConfig } from './types-BwucrwN0.cjs';
7
7
  import { C as ConfiguredRepository, a as CrudServerOptions, b as CrudRepoConfig } from './types-D9Nm-4pg.cjs';
8
+ import { MeilisearchAdapterOptions, MeilisearchAdapter } from './sync/meilisearch.cjs';
8
9
  import { AdminServerOptions, AdminRepoConfig } from './servers/admin/index.cjs';
9
10
 
10
11
  /** Per-repo admin config with `repo` omitted (auto-bound from the registry key). */
@@ -101,6 +102,29 @@ declare function createServers<TRepos extends Record<string, ConfiguredRepositor
101
102
  queues: Map<string, SyncQueue>;
102
103
  shutdown: () => Promise<void>;
103
104
  };
105
+ /**
106
+ * Create a Meilisearch adapter factory strongly typed against the bound repositories.
107
+ * Repositories and nested field paths in `indexesSettings` are automatically autocompleted
108
+ * and type-checked without needing to supply manual generic type arguments.
109
+ *
110
+ * @example
111
+ * ```ts
112
+ * export const syncServer = servers.sync({
113
+ * deps: { ... },
114
+ * adapters: [
115
+ * servers.meilisearchAdapter({
116
+ * client: createMeilisearchClient(),
117
+ * indexesSettings: {
118
+ * adminUsers: {
119
+ * searchableAttributes: ["docId", "baseUser.email"],
120
+ * },
121
+ * },
122
+ * }),
123
+ * ],
124
+ * });
125
+ * ```
126
+ */
127
+ meilisearchAdapter(options: MeilisearchAdapterOptions<TRepos>): () => MeilisearchAdapter<TRepos>;
104
128
  /**
105
129
  * Build Firestore history (change-log) triggers for every repo whose
106
130
  * config has `history.enabled === true`. Returns the trigger map
@@ -1,10 +1,11 @@
1
- import { S as SyncQueue } from './queue-I7Y1l3Wu.js';
2
- import { F as FirestoreSyncConfig, S as SyncEvent } from './types-DbtP8YCJ.js';
1
+ import { S as SyncQueue } from './queue-CrH-eNEN.js';
2
+ import { F as FirestoreSyncConfig, S as SyncEvent } from './types-HZG1KlML.js';
3
3
  import { O as OpenAPIDocument } from './openapi-D6hEI2lq.js';
4
4
  import * as firebase_functions_v2_https from 'firebase-functions/v2/https';
5
5
  import { onRequest, HttpsOptions } from 'firebase-functions/v2/https';
6
6
  import { H as HistoryTriggersConfig } from './types-BwucrwN0.js';
7
7
  import { C as ConfiguredRepository, a as CrudServerOptions, b as CrudRepoConfig } from './types-CXQeSrhO.js';
8
+ import { MeilisearchAdapterOptions, MeilisearchAdapter } from './sync/meilisearch.js';
8
9
  import { AdminServerOptions, AdminRepoConfig } from './servers/admin/index.js';
9
10
 
10
11
  /** Per-repo admin config with `repo` omitted (auto-bound from the registry key). */
@@ -101,6 +102,29 @@ declare function createServers<TRepos extends Record<string, ConfiguredRepositor
101
102
  queues: Map<string, SyncQueue>;
102
103
  shutdown: () => Promise<void>;
103
104
  };
105
+ /**
106
+ * Create a Meilisearch adapter factory strongly typed against the bound repositories.
107
+ * Repositories and nested field paths in `indexesSettings` are automatically autocompleted
108
+ * and type-checked without needing to supply manual generic type arguments.
109
+ *
110
+ * @example
111
+ * ```ts
112
+ * export const syncServer = servers.sync({
113
+ * deps: { ... },
114
+ * adapters: [
115
+ * servers.meilisearchAdapter({
116
+ * client: createMeilisearchClient(),
117
+ * indexesSettings: {
118
+ * adminUsers: {
119
+ * searchableAttributes: ["docId", "baseUser.email"],
120
+ * },
121
+ * },
122
+ * }),
123
+ * ],
124
+ * });
125
+ * ```
126
+ */
127
+ meilisearchAdapter(options: MeilisearchAdapterOptions<TRepos>): () => MeilisearchAdapter<TRepos>;
104
128
  /**
105
129
  * Build Firestore history (change-log) triggers for every repo whose
106
130
  * config has `history.enabled === true`. Returns the trigger map