@gettersethya/mira-tanstack-adapter 0.1.0-alpha.17 → 0.1.0-alpha.20

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/README.md CHANGED
@@ -28,7 +28,6 @@ npm install @gettersethya/mira-tanstack-adapter @tanstack/solid-query
28
28
  ```typescript
29
29
  import { createMiraClient } from "@gettersethya/mira-client"
30
30
  import { collectionAdapter } from "@gettersethya/mira-tanstack-adapter/react"
31
- // import { collectionAdapter } from "@gettersethya/mira-tanstack-adapter/svelte"
32
31
  // import { collectionAdapter } from "@gettersethya/mira-tanstack-adapter/solid"
33
32
  import { Posts } from "./collections.js"
34
33
 
@@ -36,6 +35,26 @@ const mira = createMiraClient("/api").withCollections({ posts: Posts })
36
35
  const postsApi = collectionAdapter(mira, "posts")
37
36
  ```
38
37
 
38
+ Svelte uses a small factory instead of a pre-built adapter (its v6 option
39
+ types cannot be re-exported from another package's declarations):
40
+
41
+ ```typescript
42
+ import { mutationOptions, queryOptions } from "@tanstack/svelte-query"
43
+ import { createSvelteCollectionAdapter } from "@gettersethya/mira-tanstack-adapter/svelte"
44
+
45
+ const collectionAdapter = createSvelteCollectionAdapter(queryOptions, mutationOptions)
46
+ const postsApi = collectionAdapter(mira, "posts")
47
+ ```
48
+
49
+ The framework-agnostic factory also lives at the package root for custom setups:
50
+
51
+ ```typescript
52
+ import { queryOptions, mutationOptions } from "@tanstack/react-query"
53
+ import { createCollectionAdapter } from "@gettersethya/mira-tanstack-adapter"
54
+
55
+ const collectionAdapter = createCollectionAdapter(queryOptions, mutationOptions)
56
+ ```
57
+
39
58
  ## Queries
40
59
 
41
60
  ```tsx
@@ -94,12 +113,15 @@ function PostActions() {
94
113
 
95
114
  ## Svelte and Solid
96
115
 
97
- The API is identical across all three frameworks. Only the import path changes.
116
+ React and Solid expose a pre-built `collectionAdapter`. Svelte exposes a
117
+ `createSvelteCollectionAdapter(queryOptions, mutationOptions)` factory instead
118
+ (see Setup above). Svelte v6 reads options through reactive getters:
98
119
 
99
120
  ```typescript
100
121
  // Svelte
101
- import { collectionAdapter } from "@gettersethya/mira-tanstack-adapter/svelte"
122
+ import { createSvelteCollectionAdapter } from "@gettersethya/mira-tanstack-adapter/svelte"
102
123
  // use with createQuery / createMutation from @tanstack/svelte-query
124
+ const query = createQuery(() => api.getList({ limit: 10 }).queryOptions)
103
125
 
104
126
  // Solid
105
127
  import { collectionAdapter } from "@gettersethya/mira-tanstack-adapter/solid"
@@ -30,14 +30,18 @@ export type MutationOptionsShape<TData, TInput> = {
30
30
  * Signature for the framework-provided `queryOptions` factory.
31
31
  * TanStack Query in each framework exports a `queryOptions` function that accepts
32
32
  * a {@link QueryOptionsShape} and returns a framework-specific options object.
33
+ * The return type is intentionally `unknown`: each framework returns its own
34
+ * options shape, which callers narrow via `ReturnType` in {@link enrichQuery}.
33
35
  */
34
- export type MakeQueryOptions = <T>(opts: QueryOptionsShape<T>) => QueryOptionsShape<T>;
36
+ export type MakeQueryOptions = <T>(opts: QueryOptionsShape<T>) => unknown;
35
37
  /**
36
38
  * Signature for the framework-provided `mutationOptions` factory.
37
39
  * TanStack Query in each framework exports a `mutationOptions` function that accepts
38
40
  * a {@link MutationOptionsShape} and returns a framework-specific options object.
41
+ * The return type is intentionally `unknown`: each framework returns its own
42
+ * options shape, which callers narrow via `ReturnType` in {@link enrichMutation}.
39
43
  */
40
- export type MakeMutationOptions = <TData, TInput>(opts: MutationOptionsShape<TData, TInput>) => MutationOptionsShape<TData, TInput>;
44
+ export type MakeMutationOptions = <TData, TInput>(opts: MutationOptionsShape<TData, TInput>) => unknown;
41
45
  /**
42
46
  * A map of human-readable action names to their string key values.
43
47
  * Used internally to build structured query keys that include the action being performed.
@@ -68,6 +72,8 @@ export type ActionKey = (typeof ActionKeys)[keyof typeof ActionKeys];
68
72
  *
69
73
  * @template T - The data type returned by the underlying handler.
70
74
  * @template H - The handler type, constrained to objects with a zero-arg `raw()` method returning `Promise<T>`.
75
+ * @template F - The framework `queryOptions` factory. Its return type is preserved
76
+ * via `ReturnType`, so framework-specific option fields survive.
71
77
  * @param handler - The original handler (e.g. from `client.getList()`).
72
78
  * @param key - The query key array to associate with this query.
73
79
  * @param makeQueryOptions - Framework-specific `queryOptions` factory.
@@ -76,9 +82,9 @@ export type ActionKey = (typeof ActionKeys)[keyof typeof ActionKeys];
76
82
  */
77
83
  export declare function enrichQuery<T, H extends {
78
84
  raw(): Promise<T>;
79
- }>(handler: H, key: QueryKey, makeQueryOptions: MakeQueryOptions): H & {
85
+ }, F extends (opts: QueryOptionsShape<T>) => unknown>(handler: H, key: QueryKey, makeQueryOptions: F): H & {
80
86
  queryKey: QueryKey;
81
- queryOptions: QueryOptionsShape<T>;
87
+ queryOptions: ReturnType<F>;
82
88
  };
83
89
  /**
84
90
  * Extends a mutation handler with a pre-built `mutationOptions` object.
@@ -90,6 +96,8 @@ export declare function enrichQuery<T, H extends {
90
96
  * @template TData - The data type returned by the mutation handler.
91
97
  * @template TInput - The input data type consumed by the mutation handler.
92
98
  * @template H - The handler type, constrained to objects with a single-arg `raw(input)` method returning `Promise<TData>`.
99
+ * @template F - The framework `mutationOptions` factory. Its return type is preserved
100
+ * via `ReturnType`, so framework-specific option fields survive.
93
101
  * @param handler - The original handler (e.g. from `client.create()`).
94
102
  * @param makeMutationOptions - Framework-specific `mutationOptions` factory.
95
103
  * @returns The original handler augmented with `mutationOptions`.
@@ -97,8 +105,8 @@ export declare function enrichQuery<T, H extends {
97
105
  */
98
106
  export declare function enrichMutation<TData, TInput, H extends {
99
107
  raw(input: TInput): Promise<TData>;
100
- }>(handler: H, makeMutationOptions: MakeMutationOptions): H & {
101
- mutationOptions: MutationOptionsShape<TData, TInput>;
108
+ }, F extends (opts: MutationOptionsShape<TData, TInput>) => unknown>(handler: H, makeMutationOptions: F): H & {
109
+ mutationOptions: ReturnType<F>;
102
110
  };
103
111
  /**
104
112
  * Creates a TanStack Query adapter for any {@link CollectionClient}.
@@ -145,77 +153,95 @@ export declare function enrichMutation<TData, TInput, H extends {
145
153
  * @see MakeQueryOptions
146
154
  * @see MakeMutationOptions
147
155
  */
148
- export declare function createCollectionAdapter(makeQueryOptions: MakeQueryOptions, makeMutationOptions: MakeMutationOptions): <F extends FieldsMap>(client: CollectionClient<F>, name: string) => {
156
+ export declare function createCollectionAdapter<FQ extends MakeQueryOptions, FM extends MakeMutationOptions>(makeQueryOptions: FQ, makeMutationOptions: FM): <F extends FieldsMap>(client: CollectionClient<F>, name: string) => {
157
+ /**
158
+ * Invalidates all cached queries for this collection.
159
+ * Calls `queryClient.invalidateQueries` with key prefix `[name]`.
160
+ *
161
+ * @param queryClient - Any TanStack Query client with `invalidateQueries`.
162
+ */
163
+ invalidateAll: (queryClient: {
164
+ invalidateQueries(opts: {
165
+ queryKey: QueryKey;
166
+ }): unknown;
167
+ }) => unknown;
168
+ /**
169
+ * Invalidates only the `getOne` cache entry for a specific record.
170
+ * Calls `queryClient.invalidateQueries` with key `[name, "getOne", id]`.
171
+ *
172
+ * @param queryClient - Any TanStack Query client with `invalidateQueries`.
173
+ * @param id - The record ID whose cached `getOne` entry should be invalidated.
174
+ */
175
+ invalidateOne: (queryClient: {
176
+ invalidateQueries(opts: {
177
+ queryKey: QueryKey;
178
+ }): unknown;
179
+ }, id: string) => unknown;
180
+ register?: (() => import("@gettersethya/mira-client").ClientHandler<import("@gettersethya/mira-collection").InferRecord<F>, import("@gettersethya/mira-collection").RegisterInput<F>>) | undefined;
149
181
  /**
150
182
  * Enriched version of `getList` that also returns `queryKey` and `queryOptions`.
151
183
  * Query key: `[name, "getList", options]`.
152
184
  */
153
185
  getList: (options?: Parameters<CollectionClient<F>["getList"]>[0]) => {
154
186
  raw(): Promise<{
155
- items: import("@gettersethya/mira-client").WithExpand<F, readonly import("@gettersethya/mira-client").RelationKeys<F>[]>[];
187
+ items: import("@gettersethya/mira-collection").WithExpand<F, readonly import("@gettersethya/mira-collection").RelationKeys<F>[]>[];
156
188
  nextCursor: number | null;
157
189
  }>;
158
190
  toEffect(): import("effect/Effect").Effect<{
159
- items: import("@gettersethya/mira-client").WithExpand<F, readonly import("@gettersethya/mira-client").RelationKeys<F>[]>[];
191
+ items: import("@gettersethya/mira-collection").WithExpand<F, readonly import("@gettersethya/mira-collection").RelationKeys<F>[]>[];
160
192
  nextCursor: number | null;
161
193
  }, import("@gettersethya/mira-client").MiraError, import("effect/http/HttpClient").HttpClient>;
162
194
  } & {
163
195
  queryKey: QueryKey;
164
- queryOptions: QueryOptionsShape<unknown>;
196
+ queryOptions: ReturnType<FQ>;
165
197
  };
166
198
  /**
167
199
  * Enriched version of `getOne` that also returns `queryKey` and `queryOptions`.
168
200
  * Query key: `[name, "getOne", id, options]`.
169
201
  */
170
202
  getOne: (id: string, options?: Parameters<CollectionClient<F>["getOne"]>[1]) => {
171
- raw(): Promise<import("@gettersethya/mira-client").WithExpand<F, readonly import("@gettersethya/mira-client").RelationKeys<F>[]>>;
172
- toEffect(): import("effect/Effect").Effect<import("@gettersethya/mira-client").WithExpand<F, readonly import("@gettersethya/mira-client").RelationKeys<F>[]>, import("@gettersethya/mira-client").MiraError, import("effect/http/HttpClient").HttpClient>;
203
+ raw(): Promise<import("@gettersethya/mira-collection").WithExpand<F, readonly import("@gettersethya/mira-collection").RelationKeys<F>[]>>;
204
+ toEffect(): import("effect/Effect").Effect<import("@gettersethya/mira-collection").WithExpand<F, readonly import("@gettersethya/mira-collection").RelationKeys<F>[]>, import("@gettersethya/mira-client").MiraError, import("effect/http/HttpClient").HttpClient>;
173
205
  } & {
174
206
  queryKey: QueryKey;
175
- queryOptions: QueryOptionsShape<unknown>;
207
+ queryOptions: ReturnType<FQ>;
176
208
  };
177
209
  /**
178
210
  * Enriched version of `getFirstOrNone` that also returns `queryKey` and `queryOptions`.
179
211
  * Query key: `[name, "getFirstOrNone", options]`.
180
212
  */
181
213
  getFirstOrNone: (filter: (f: FilterBuilder<F>) => FilterNode, options?: Parameters<CollectionClient<F>["getFirstOrNone"]>[1]) => {
182
- raw(): Promise<import("effect/Option").Option<import("@gettersethya/mira-client").WithExpand<F, readonly import("@gettersethya/mira-client").RelationKeys<F>[]>>>;
183
- toEffect(): import("effect/Effect").Effect<import("effect/Option").Option<import("@gettersethya/mira-client").WithExpand<F, readonly import("@gettersethya/mira-client").RelationKeys<F>[]>>, import("@gettersethya/mira-client").MiraError, import("effect/http/HttpClient").HttpClient>;
214
+ raw(): Promise<import("effect/Option").Option<import("@gettersethya/mira-collection").WithExpand<F, readonly import("@gettersethya/mira-collection").RelationKeys<F>[]>>>;
215
+ toEffect(): import("effect/Effect").Effect<import("effect/Option").Option<import("@gettersethya/mira-collection").WithExpand<F, readonly import("@gettersethya/mira-collection").RelationKeys<F>[]>>, import("@gettersethya/mira-client").MiraError, import("effect/http/HttpClient").HttpClient>;
184
216
  } & {
185
217
  queryKey: QueryKey;
186
- queryOptions: QueryOptionsShape<unknown>;
218
+ queryOptions: ReturnType<FQ>;
187
219
  };
188
220
  /**
189
221
  * Enriched version of `getFullList` that also returns `queryKey` and `queryOptions`.
190
222
  * Query key: `[name, "getFullList", options]`.
191
223
  */
192
224
  getFullList: (options?: Parameters<CollectionClient<F>["getFullList"]>[0]) => {
193
- raw(): Promise<import("@gettersethya/mira-client").WithExpand<F, readonly import("@gettersethya/mira-client").RelationKeys<F>[]>[]>;
194
- toEffect(): import("effect/Effect").Effect<import("@gettersethya/mira-client").WithExpand<F, readonly import("@gettersethya/mira-client").RelationKeys<F>[]>[], import("@gettersethya/mira-client").MiraError, import("effect/http/HttpClient").HttpClient>;
225
+ raw(): Promise<import("@gettersethya/mira-collection").WithExpand<F, readonly import("@gettersethya/mira-collection").RelationKeys<F>[]>[]>;
226
+ toEffect(): import("effect/Effect").Effect<import("@gettersethya/mira-collection").WithExpand<F, readonly import("@gettersethya/mira-collection").RelationKeys<F>[]>[], import("@gettersethya/mira-client").MiraError, import("effect/http/HttpClient").HttpClient>;
195
227
  } & {
196
228
  queryKey: QueryKey;
197
- queryOptions: QueryOptionsShape<unknown>;
229
+ queryOptions: ReturnType<FQ>;
198
230
  };
199
231
  /**
200
232
  * Enriched mutation for creating records. Call `raw(input)` to execute.
201
233
  */
202
- create: () => import("@gettersethya/mira-client").ClientHandler<import("@gettersethya/mira-client").InferRecord<F>, import("@gettersethya/mira-client").InferMutationInput<F>> & {
203
- mutationOptions: MutationOptionsShape<unknown, unknown>;
234
+ create: () => import("@gettersethya/mira-client").ClientHandler<import("@gettersethya/mira-collection").InferRecord<F>, Omit<import("@gettersethya/mira-collection").InferMutationInput<F>, "emailVerified">> & {
235
+ mutationOptions: ReturnType<FM>;
204
236
  };
205
237
  /**
206
238
  * Enriched mutation for updating records. Call `raw(input)` to execute.
207
239
  */
208
240
  update: () => {
209
- raw(input: {
210
- id: string;
211
- data: Partial<import("@gettersethya/mira-client").InferMutationInput<F>>;
212
- }): Promise<import("@gettersethya/mira-client").InferRecord<F>>;
213
- toEffect(input: {
214
- id: string;
215
- data: Partial<import("@gettersethya/mira-client").InferMutationInput<F>>;
216
- }): import("effect/Effect").Effect<import("@gettersethya/mira-client").InferRecord<F>, import("@gettersethya/mira-client").MiraError, import("effect/http/HttpClient").HttpClient>;
241
+ raw(input: import("@gettersethya/mira-collection").UpdateInput<F, "base">): Promise<import("@gettersethya/mira-collection").InferRecord<F>>;
242
+ toEffect(input: import("@gettersethya/mira-collection").UpdateInput<F, "base">): import("effect/Effect").Effect<import("@gettersethya/mira-collection").InferRecord<F>, import("@gettersethya/mira-client").MiraError, import("effect/http/HttpClient").HttpClient>;
217
243
  } & {
218
- mutationOptions: MutationOptionsShape<unknown, unknown>;
244
+ mutationOptions: ReturnType<FM>;
219
245
  };
220
246
  /**
221
247
  * Enriched mutation for deleting records. Call `raw(input)` to execute.
@@ -224,45 +250,22 @@ export declare function createCollectionAdapter(makeQueryOptions: MakeQueryOptio
224
250
  raw(input: string): Promise<void>;
225
251
  toEffect(input: string): import("effect/Effect").Effect<void, import("@gettersethya/mira-client").MiraError, import("effect/http/HttpClient").HttpClient>;
226
252
  } & {
227
- mutationOptions: MutationOptionsShape<unknown, unknown>;
253
+ mutationOptions: ReturnType<FM>;
228
254
  };
229
- /**
230
- * Invalidates all cached queries for this collection.
231
- * Calls `queryClient.invalidateQueries` with key prefix `[name]`.
232
- *
233
- * @param queryClient - Any TanStack Query client with `invalidateQueries`.
234
- */
235
- invalidateAll: (queryClient: {
236
- invalidateQueries(opts: {
237
- queryKey: QueryKey;
238
- }): unknown;
239
- }) => unknown;
240
- /**
241
- * Invalidates only the `getOne` cache entry for a specific record.
242
- * Calls `queryClient.invalidateQueries` with key `[name, "getOne", id]`.
243
- *
244
- * @param queryClient - Any TanStack Query client with `invalidateQueries`.
245
- * @param id - The record ID whose cached `getOne` entry should be invalidated.
246
- */
247
- invalidateOne: (queryClient: {
248
- invalidateQueries(opts: {
249
- queryKey: QueryKey;
250
- }): unknown;
251
- }, id: string) => unknown;
252
255
  authWithPassword?(): {
253
256
  raw(input: {
254
257
  email: string;
255
258
  password: string;
256
259
  }): Promise<{
257
260
  token: string;
258
- record: import("@gettersethya/mira-client").InferRecord<F>;
261
+ record: import("@gettersethya/mira-collection").InferRecord<F>;
259
262
  }>;
260
263
  toEffect(input: {
261
264
  email: string;
262
265
  password: string;
263
266
  }): import("effect/Effect").Effect<{
264
267
  token: string;
265
- record: import("@gettersethya/mira-client").InferRecord<F>;
268
+ record: import("@gettersethya/mira-collection").InferRecord<F>;
266
269
  }, import("@gettersethya/mira-client").MiraError, import("effect/http/HttpClient").HttpClient>;
267
270
  };
268
271
  fields: import("@gettersethya/mira-client").CollectionFileFields<F>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_core.d.ts","sourceRoot":"","sources":["../src/_core.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAEvG;;;;;;;GAOG;AACH,MAAM,MAAM,QAAQ,GAAG,aAAa,CAAC,OAAO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gBAAgB,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;;;;kBAlI/G,QAAQ;;;IAyIrB;;;OAGG;4BACqB,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;;;;kBA7I5D,QAAQ;;;IAoJrB;;OAEG;;;;IAGH;;OAEG;;;;;;;IAGH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;EA6BR"}
@@ -14,43 +14,12 @@ export const ActionKeys = {
14
14
  GetFirstOrNone: "getFirstOrNone",
15
15
  GetFullList: "getFullList",
16
16
  };
17
- /**
18
- * Extends a query handler with a `queryKey` and pre-built `queryOptions` object.
19
- *
20
- * Uses the provided {@link MakeQueryOptions} factory to convert the handler into
21
- * a TanStack Query-compatible options object. The returned handler retains all
22
- * original methods (e.g. `raw()`, `toEffect()`) with `queryKey` and `queryOptions`
23
- * added as extra properties via `Object.assign`.
24
- *
25
- * @template T - The data type returned by the underlying handler.
26
- * @template H - The handler type, constrained to objects with a zero-arg `raw()` method returning `Promise<T>`.
27
- * @param handler - The original handler (e.g. from `client.getList()`).
28
- * @param key - The query key array to associate with this query.
29
- * @param makeQueryOptions - Framework-specific `queryOptions` factory.
30
- * @returns The original handler augmented with `queryKey` and `queryOptions`.
31
- * @see enrichMutation For the mutation equivalent.
32
- */
33
17
  export function enrichQuery(handler, key, makeQueryOptions) {
34
18
  return Object.assign(handler, {
35
19
  queryKey: key,
36
20
  queryOptions: makeQueryOptions({ queryKey: key, queryFn: () => handler.raw() }),
37
21
  });
38
22
  }
39
- /**
40
- * Extends a mutation handler with a pre-built `mutationOptions` object.
41
- *
42
- * Uses the provided {@link MakeMutationOptions} factory to convert the handler into
43
- * a TanStack Query-compatible mutation options object. The returned handler retains all
44
- * original methods with `mutationOptions` added as an extra property via `Object.assign`.
45
- *
46
- * @template TData - The data type returned by the mutation handler.
47
- * @template TInput - The input data type consumed by the mutation handler.
48
- * @template H - The handler type, constrained to objects with a single-arg `raw(input)` method returning `Promise<TData>`.
49
- * @param handler - The original handler (e.g. from `client.create()`).
50
- * @param makeMutationOptions - Framework-specific `mutationOptions` factory.
51
- * @returns The original handler augmented with `mutationOptions`.
52
- * @see enrichQuery For the query equivalent.
53
- */
54
23
  export function enrichMutation(handler, makeMutationOptions) {
55
24
  return Object.assign(handler, {
56
25
  mutationOptions: makeMutationOptions({
@@ -105,6 +74,7 @@ export function enrichMutation(handler, makeMutationOptions) {
105
74
  */
106
75
  export function createCollectionAdapter(makeQueryOptions, makeMutationOptions) {
107
76
  return function adaptCollectionClient(client, name) {
77
+ const registerFn = client.register;
108
78
  return {
109
79
  ...client,
110
80
  /**
@@ -139,6 +109,11 @@ export function createCollectionAdapter(makeQueryOptions, makeMutationOptions) {
139
109
  * Enriched mutation for deleting records. Call `raw(input)` to execute.
140
110
  */
141
111
  delete: () => enrichMutation(client.delete(), makeMutationOptions),
112
+ /**
113
+ * Enriched mutation for registering a new auth-collection record.
114
+ * Only present when the underlying collection client exposes `register`.
115
+ */
116
+ ...(registerFn ? { register: () => enrichMutation(registerFn(), makeMutationOptions) } : {}),
142
117
  /**
143
118
  * Invalidates all cached queries for this collection.
144
119
  * Calls `queryClient.invalidateQueries` with key prefix `[name]`.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_core.js","sourceRoot":"","sources":["../src/_core.ts"],"names":[],"mappings":"AAoDA;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,OAAO,EAAS,SAAS;IACzB,MAAM,EAAU,QAAQ;IACxB,cAAc,EAAE,gBAAgB;IAChC,WAAW,EAAK,aAAa;CACrB,CAAA;AA8BV,MAAM,UAAU,WAAW,CACzB,OAAoC,EACpC,GAAa,EACb,gBAAkC;IAElC,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;QAC5B,QAAQ,EAAE,GAAG;QACb,YAAY,EAAE,gBAAgB,CAAC,EAAE,QAAQ,EA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ationOptions, MakeQueryOptions, MutationOptionsShape, QueryKey, QueryOptionsShape, } from "./_core.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,uBAAuB,EACvB,cAAc,EACd,WAAW,GACZ,MAAM,YAAY,CAAA;AACnB,YAAY,EACV,SAAS,EACT,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,QAAQ,EACR,iBAAiB,GAClB,MAAM,YAAY,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { ActionKeys, createCollectionAdapter, enrichMutation, enrichQuery, } from "./_core.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,uBAAuB,EACvB,cAAc,EACd,WAAW,GACZ,MAAM,YAAY,CAAA"}
@@ -0,0 +1,173 @@
1
+ import { ActionKeys } from "./_core.js";
2
+ /**
3
+ * A pre-built {@link createCollectionAdapter | collection adapter} for **TanStack React Query**.
4
+ *
5
+ * Uses `queryOptions` and `mutationOptions` from `@tanstack/react-query` to produce
6
+ * options objects compatible with `useQuery` and `useMutation`.
7
+ *
8
+ * @example
9
+ * ```tsx
10
+ * import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query"
11
+ * import { collectionAdapter } from "@gettersethya/mira-tanstack-adapter/react"
12
+ * import { createMiraClient } from "@gettersethya/mira-client"
13
+ *
14
+ * const client = createMiraClient({ url: "/api" }).withCollections({ posts: PostCollection })
15
+ * const api = collectionAdapter(client, "posts")
16
+ *
17
+ * function PostList() {
18
+ * const { data } = useQuery(api.getList({ limit: 10 }).queryOptions)
19
+ * const queryClient = useQueryClient()
20
+ *
21
+ * const mutation = useMutation({
22
+ * ...api.create().mutationOptions,
23
+ * onSuccess: () => api.invalidateAll(queryClient),
24
+ * })
25
+ *
26
+ * if (!data) return <div>Loading...</div>
27
+ * return <ul>{data.items.map(p => <li key={p.id}>{p.title}</li>)}</ul>
28
+ * }
29
+ * ```
30
+ */
31
+ export declare const collectionAdapter: <F extends import("@gettersethya/mira-collection").FieldsMap>(client: import("@gettersethya/mira-client").CollectionClient<F>, name: string) => {
32
+ invalidateAll: (queryClient: {
33
+ invalidateQueries(opts: {
34
+ queryKey: import("./_core.js").QueryKey;
35
+ }): unknown;
36
+ }) => unknown;
37
+ invalidateOne: (queryClient: {
38
+ invalidateQueries(opts: {
39
+ queryKey: import("./_core.js").QueryKey;
40
+ }): unknown;
41
+ }, id: string) => unknown;
42
+ register?: (() => import("@gettersethya/mira-client").ClientHandler<import("@gettersethya/mira-collection").InferRecord<F>, import("@gettersethya/mira-collection").RegisterInput<F>>) | undefined;
43
+ getList: (options?: {
44
+ filter?: ((f: import("@gettersethya/mira-client").FilterBuilder<F>) => import("@gettersethya/mira-collection").FilterNode) | undefined;
45
+ sort?: (keyof F & string) | undefined;
46
+ order?: "asc" | "desc";
47
+ cursor?: number | null;
48
+ limit?: number;
49
+ select?: readonly (keyof F & string)[] | undefined;
50
+ expand?: readonly import("@gettersethya/mira-collection").RelationKeys<F>[] | undefined;
51
+ retryOptions?: import("@gettersethya/mira-client").RetryOptions;
52
+ } | undefined) => {
53
+ raw(): Promise<{
54
+ items: import("@gettersethya/mira-collection").WithExpand<F, readonly import("@gettersethya/mira-collection").RelationKeys<F>[]>[];
55
+ nextCursor: number | null;
56
+ }>;
57
+ toEffect(): import("effect/Effect").Effect<{
58
+ items: import("@gettersethya/mira-collection").WithExpand<F, readonly import("@gettersethya/mira-collection").RelationKeys<F>[]>[];
59
+ nextCursor: number | null;
60
+ }, import("@gettersethya/mira-client").MiraError, import("effect/http/HttpClient").HttpClient>;
61
+ } & {
62
+ queryKey: import("./_core.js").QueryKey;
63
+ queryOptions: import("@tanstack/react-query").UseQueryOptions<unknown, unknown, unknown, readonly unknown[]> & {
64
+ initialData?: unknown;
65
+ } & {
66
+ queryKey: readonly unknown[] & {
67
+ [dataTagSymbol]: unknown;
68
+ [dataTagErrorSymbol]: unknown;
69
+ };
70
+ };
71
+ };
72
+ getOne: (id: string, options?: {
73
+ select?: readonly (keyof F & string)[] | undefined;
74
+ expand?: readonly import("@gettersethya/mira-collection").RelationKeys<F>[] | undefined;
75
+ retryOptions?: import("@gettersethya/mira-client").RetryOptions;
76
+ } | undefined) => {
77
+ raw(): Promise<import("@gettersethya/mira-collection").WithExpand<F, readonly import("@gettersethya/mira-collection").RelationKeys<F>[]>>;
78
+ toEffect(): import("effect/Effect").Effect<import("@gettersethya/mira-collection").WithExpand<F, readonly import("@gettersethya/mira-collection").RelationKeys<F>[]>, import("@gettersethya/mira-client").MiraError, import("effect/http/HttpClient").HttpClient>;
79
+ } & {
80
+ queryKey: import("./_core.js").QueryKey;
81
+ queryOptions: import("@tanstack/react-query").UseQueryOptions<unknown, unknown, unknown, readonly unknown[]> & {
82
+ initialData?: unknown;
83
+ } & {
84
+ queryKey: readonly unknown[] & {
85
+ [dataTagSymbol]: unknown;
86
+ [dataTagErrorSymbol]: unknown;
87
+ };
88
+ };
89
+ };
90
+ getFirstOrNone: (filter: (f: import("@gettersethya/mira-client").FilterBuilder<F>) => import("@gettersethya/mira-collection").FilterNode, options?: Omit<{
91
+ filter?: ((f: import("@gettersethya/mira-client").FilterBuilder<F>) => import("@gettersethya/mira-collection").FilterNode) | undefined;
92
+ sort?: (keyof F & string) | undefined;
93
+ order?: "asc" | "desc";
94
+ cursor?: number | null;
95
+ limit?: number;
96
+ select?: readonly (keyof F & string)[] | undefined;
97
+ expand?: readonly import("@gettersethya/mira-collection").RelationKeys<F>[] | undefined;
98
+ retryOptions?: import("@gettersethya/mira-client").RetryOptions;
99
+ }, "filter" | "limit" | "cursor"> | undefined) => {
100
+ raw(): Promise<import("effect/Option").Option<import("@gettersethya/mira-collection").WithExpand<F, readonly import("@gettersethya/mira-collection").RelationKeys<F>[]>>>;
101
+ toEffect(): import("effect/Effect").Effect<import("effect/Option").Option<import("@gettersethya/mira-collection").WithExpand<F, readonly import("@gettersethya/mira-collection").RelationKeys<F>[]>>, import("@gettersethya/mira-client").MiraError, import("effect/http/HttpClient").HttpClient>;
102
+ } & {
103
+ queryKey: import("./_core.js").QueryKey;
104
+ queryOptions: import("@tanstack/react-query").UseQueryOptions<unknown, unknown, unknown, readonly unknown[]> & {
105
+ initialData?: unknown;
106
+ } & {
107
+ queryKey: readonly unknown[] & {
108
+ [dataTagSymbol]: unknown;
109
+ [dataTagErrorSymbol]: unknown;
110
+ };
111
+ };
112
+ };
113
+ getFullList: (options?: (Omit<{
114
+ filter?: ((f: import("@gettersethya/mira-client").FilterBuilder<F>) => import("@gettersethya/mira-collection").FilterNode) | undefined;
115
+ sort?: (keyof F & string) | undefined;
116
+ order?: "asc" | "desc";
117
+ cursor?: number | null;
118
+ limit?: number;
119
+ select?: readonly (keyof F & string)[] | undefined;
120
+ expand?: readonly import("@gettersethya/mira-collection").RelationKeys<F>[] | undefined;
121
+ retryOptions?: import("@gettersethya/mira-client").RetryOptions;
122
+ }, "limit" | "cursor"> & {
123
+ limit?: number;
124
+ }) | undefined) => {
125
+ raw(): Promise<import("@gettersethya/mira-collection").WithExpand<F, readonly import("@gettersethya/mira-collection").RelationKeys<F>[]>[]>;
126
+ toEffect(): import("effect/Effect").Effect<import("@gettersethya/mira-collection").WithExpand<F, readonly import("@gettersethya/mira-collection").RelationKeys<F>[]>[], import("@gettersethya/mira-client").MiraError, import("effect/http/HttpClient").HttpClient>;
127
+ } & {
128
+ queryKey: import("./_core.js").QueryKey;
129
+ queryOptions: import("@tanstack/react-query").UseQueryOptions<unknown, unknown, unknown, readonly unknown[]> & {
130
+ initialData?: unknown;
131
+ } & {
132
+ queryKey: readonly unknown[] & {
133
+ [dataTagSymbol]: unknown;
134
+ [dataTagErrorSymbol]: unknown;
135
+ };
136
+ };
137
+ };
138
+ create: () => import("@gettersethya/mira-client").ClientHandler<import("@gettersethya/mira-collection").InferRecord<F>, Omit<import("@gettersethya/mira-collection").InferMutationInput<F>, "emailVerified">> & {
139
+ mutationOptions: Omit<import("@tanstack/react-query").UseMutationOptions<unknown, unknown, unknown, unknown>, "mutationKey">;
140
+ };
141
+ update: () => {
142
+ raw(input: import("@gettersethya/mira-collection").UpdateInput<F, "base">): Promise<import("@gettersethya/mira-collection").InferRecord<F>>;
143
+ toEffect(input: import("@gettersethya/mira-collection").UpdateInput<F, "base">): import("effect/Effect").Effect<import("@gettersethya/mira-collection").InferRecord<F>, import("@gettersethya/mira-client").MiraError, import("effect/http/HttpClient").HttpClient>;
144
+ } & {
145
+ mutationOptions: Omit<import("@tanstack/react-query").UseMutationOptions<unknown, unknown, unknown, unknown>, "mutationKey">;
146
+ };
147
+ delete: () => {
148
+ raw(input: string): Promise<void>;
149
+ toEffect(input: string): import("effect/Effect").Effect<void, import("@gettersethya/mira-client").MiraError, import("effect/http/HttpClient").HttpClient>;
150
+ } & {
151
+ mutationOptions: Omit<import("@tanstack/react-query").UseMutationOptions<unknown, unknown, unknown, unknown>, "mutationKey">;
152
+ };
153
+ authWithPassword?(): {
154
+ raw(input: {
155
+ email: string;
156
+ password: string;
157
+ }): Promise<{
158
+ token: string;
159
+ record: import("@gettersethya/mira-collection").InferRecord<F>;
160
+ }>;
161
+ toEffect(input: {
162
+ email: string;
163
+ password: string;
164
+ }): import("effect/Effect").Effect<{
165
+ token: string;
166
+ record: import("@gettersethya/mira-collection").InferRecord<F>;
167
+ }, import("@gettersethya/mira-client").MiraError, import("effect/http/HttpClient").HttpClient>;
168
+ };
169
+ fields: import("@gettersethya/mira-client").CollectionFileFields<F>;
170
+ };
171
+ export { ActionKeys };
172
+ export type { ActionKey } from "./_core.js";
173
+ //# sourceMappingURL=react.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AACA,OAAO,EAA2B,UAAU,EAAE,MAAM,YAAY,CAAA;AAEhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAyD,CAAA;AACvF,OAAO,EAAE,UAAU,EAAE,CAAA;AACrB,YAAY,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA"}
package/dist/react.js ADDED
@@ -0,0 +1,34 @@
1
+ import { mutationOptions, queryOptions } from "@tanstack/react-query";
2
+ import { createCollectionAdapter, ActionKeys } from "./_core.js";
3
+ /**
4
+ * A pre-built {@link createCollectionAdapter | collection adapter} for **TanStack React Query**.
5
+ *
6
+ * Uses `queryOptions` and `mutationOptions` from `@tanstack/react-query` to produce
7
+ * options objects compatible with `useQuery` and `useMutation`.
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query"
12
+ * import { collectionAdapter } from "@gettersethya/mira-tanstack-adapter/react"
13
+ * import { createMiraClient } from "@gettersethya/mira-client"
14
+ *
15
+ * const client = createMiraClient({ url: "/api" }).withCollections({ posts: PostCollection })
16
+ * const api = collectionAdapter(client, "posts")
17
+ *
18
+ * function PostList() {
19
+ * const { data } = useQuery(api.getList({ limit: 10 }).queryOptions)
20
+ * const queryClient = useQueryClient()
21
+ *
22
+ * const mutation = useMutation({
23
+ * ...api.create().mutationOptions,
24
+ * onSuccess: () => api.invalidateAll(queryClient),
25
+ * })
26
+ *
27
+ * if (!data) return <div>Loading...</div>
28
+ * return <ul>{data.items.map(p => <li key={p.id}>{p.title}</li>)}</ul>
29
+ * }
30
+ * ```
31
+ */
32
+ export const collectionAdapter = createCollectionAdapter(queryOptions, mutationOptions);
33
+ export { ActionKeys };
34
+ //# sourceMappingURL=react.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react.js","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACrE,OAAO,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAEhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,uBAAuB,CAAC,YAAY,EAAE,eAAe,CAAC,CAAA;AACvF,OAAO,EAAE,UAAU,EAAE,CAAA"}