fimo 0.2.3 → 0.2.4
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/assets/content-templates/hooks-template.eta +22 -10
- package/assets/skills/fimo/references/content.md +19 -6
- package/assets/skills/fimo-cli/references/content.md +6 -3
- package/dist/cli/bundle.json +2 -2
- package/dist/cli/index.js +4 -1
- package/dist/runtime/primitives/lib/index.d.ts +1 -1
- package/dist/runtime/primitives/lib/index.d.ts.map +1 -1
- package/dist/runtime/primitives/lib/query.d.ts +10 -1
- package/dist/runtime/primitives/lib/query.d.ts.map +1 -1
- package/package.json +1 -1
- package/templates/react-router/package.json +1 -1
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
%>
|
|
10
10
|
// AUTO-GENERATED ⚠️ – do not edit by hand
|
|
11
11
|
import { useSuspenseQuery, useQuery, useMutation, useQueryClient, QueryKey } from "@tanstack/react-query";
|
|
12
|
-
import { FimoString, FimoDate, FimoMedia, FimoBoolean, FimoRichText, type Query, type Sort, type Where } from "fimo/ui";
|
|
12
|
+
import { FimoString, FimoDate, FimoMedia, FimoBoolean, FimoRichText, type Fields, type Projected, type Query, type Sort, type Where } from "fimo/ui";
|
|
13
13
|
|
|
14
14
|
/*───────────────────────────────────────────────────────────────*/
|
|
15
15
|
/* ──────────── 📄 Type definitions ──────────── */
|
|
@@ -21,6 +21,9 @@ import { FimoString, FimoDate, FimoMedia, FimoBoolean, FimoRichText, type Query,
|
|
|
21
21
|
export interface <%= model.pascal %> {
|
|
22
22
|
id: string;
|
|
23
23
|
slug: FimoString;
|
|
24
|
+
contentType: string;
|
|
25
|
+
createdAt: string;
|
|
26
|
+
updatedAt: string;
|
|
24
27
|
<%
|
|
25
28
|
// Generate interface properties based on fields
|
|
26
29
|
if (model.fields) {
|
|
@@ -65,7 +68,9 @@ function getTypeForField(field) {
|
|
|
65
68
|
|
|
66
69
|
export type <%= model.pascal %>Where = Where<<%= model.pascal %>>;
|
|
67
70
|
export type <%= model.pascal %>Sort = Sort<<%= model.pascal %>>;
|
|
68
|
-
export type <%= model.pascal %>
|
|
71
|
+
export type <%= model.pascal %>Fields = Fields<<%= model.pascal %>>;
|
|
72
|
+
export type <%= model.pascal %>Query<TFields extends <%= model.pascal %>Fields | undefined = <%= model.pascal %>Fields | undefined> = Query<<%= model.pascal %>, TFields>;
|
|
73
|
+
export type <%= model.pascal %>Result<TFields extends <%= model.pascal %>Fields | undefined = undefined> = Projected<<%= model.pascal %>, TFields>;
|
|
69
74
|
|
|
70
75
|
/*───────────────────────────────────────────────────────────────*/
|
|
71
76
|
/* ──────────── 🎁 Source wrapping ──────────── */
|
|
@@ -81,6 +86,9 @@ function wrapWithSource(entry: Record<string, any>): <%= model.pascal %> {
|
|
|
81
86
|
return {
|
|
82
87
|
id,
|
|
83
88
|
slug: entry.slug != null ? new FimoString(entry.slug, `${sourcePrefix}.slug`) : entry.slug,
|
|
89
|
+
contentType: entry.contentType,
|
|
90
|
+
createdAt: entry.createdAt,
|
|
91
|
+
updatedAt: entry.updatedAt,
|
|
84
92
|
<%
|
|
85
93
|
if (model.fields) {
|
|
86
94
|
Object.entries(model.fields).forEach(([key, field]) => {
|
|
@@ -160,8 +168,8 @@ export async function getByField(fieldName: string, value: string): Promise<<%=
|
|
|
160
168
|
return wrapWithSource(data.data);
|
|
161
169
|
}
|
|
162
170
|
|
|
163
|
-
function toQueryString(params: <%= model.pascal %>Query = {}): string {
|
|
164
|
-
const { where, sort, ...flat } = params;
|
|
171
|
+
function toQueryString<TFields extends <%= model.pascal %>Fields | undefined = undefined>(params: <%= model.pascal %>Query<TFields> = {} as <%= model.pascal %>Query<TFields>): string {
|
|
172
|
+
const { where, sort, fields, ...flat } = params;
|
|
165
173
|
const query = new URLSearchParams();
|
|
166
174
|
|
|
167
175
|
for (const [key, value] of Object.entries(flat)) {
|
|
@@ -173,6 +181,10 @@ function toQueryString(params: <%= model.pascal %>Query = {}): string {
|
|
|
173
181
|
query.set("sort", Array.isArray(sort) ? sort.join(",") : sort);
|
|
174
182
|
}
|
|
175
183
|
|
|
184
|
+
if (fields != null) {
|
|
185
|
+
query.set("fields", Array.isArray(fields) ? fields.join(",") : fields);
|
|
186
|
+
}
|
|
187
|
+
|
|
176
188
|
if (where && Object.keys(where).length > 0) {
|
|
177
189
|
query.set("where", JSON.stringify(where));
|
|
178
190
|
}
|
|
@@ -180,12 +192,12 @@ function toQueryString(params: <%= model.pascal %>Query = {}): string {
|
|
|
180
192
|
return query.toString();
|
|
181
193
|
}
|
|
182
194
|
|
|
183
|
-
export async function get(params: <%= model.pascal %>Query = {}): Promise<<%= model.pascal %>[]> {
|
|
195
|
+
export async function get<TFields extends <%= model.pascal %>Fields | undefined = undefined>(params: <%= model.pascal %>Query<TFields> = {} as <%= model.pascal %>Query<TFields>): Promise<<%= model.pascal %>Result<TFields>[]> {
|
|
184
196
|
const qs = toQueryString(params);
|
|
185
197
|
const res = await fetch(`${base}/entries/<%= model.uid %>${qs ? "?" + qs : ""}`, { headers: fimoHeaders() });
|
|
186
198
|
if (!res.ok) throw new Error(await res.text());
|
|
187
199
|
const data = await res.json();
|
|
188
|
-
return data.data.map(wrapWithSource);
|
|
200
|
+
return data.data.map(wrapWithSource) as <%= model.pascal %>Result<TFields>[];
|
|
189
201
|
}
|
|
190
202
|
|
|
191
203
|
export async function create(payload: Partial<<%= model.pascal %>>): Promise<<%= model.pascal %>> {
|
|
@@ -239,8 +251,8 @@ export function useGetByField(fieldName: string, value: string) {
|
|
|
239
251
|
return useQuery<<%= model.pascal %> | null, Error>({ queryKey: qk.byField(fieldName, value), queryFn: () => getByField(fieldName, value), enabled: !!value });
|
|
240
252
|
}
|
|
241
253
|
|
|
242
|
-
export function useGet(params: <%= model.pascal %>Query = {}) {
|
|
243
|
-
return useQuery<<%= model.pascal %>[], Error>({ queryKey: qk.list(params), queryFn: () => get(params) });
|
|
254
|
+
export function useGet<TFields extends <%= model.pascal %>Fields | undefined = undefined>(params: <%= model.pascal %>Query<TFields> = {} as <%= model.pascal %>Query<TFields>) {
|
|
255
|
+
return useQuery<<%= model.pascal %>Result<TFields>[], Error>({ queryKey: qk.list(params), queryFn: () => get(params) });
|
|
244
256
|
}
|
|
245
257
|
|
|
246
258
|
export function useSuspenseGetById(id: string) {
|
|
@@ -255,8 +267,8 @@ export function useSuspenseGetByField(fieldName: string, value: string) {
|
|
|
255
267
|
return useSuspenseQuery<<%= model.pascal %> | null, Error>({ queryKey: qk.byField(fieldName, value), queryFn: () => getByField(fieldName, value) });
|
|
256
268
|
}
|
|
257
269
|
|
|
258
|
-
export function useSuspenseGet(params: <%= model.pascal %>Query = {}) {
|
|
259
|
-
return useSuspenseQuery<<%= model.pascal %>[], Error>({ queryKey: qk.list(params), queryFn: () => get(params) });
|
|
270
|
+
export function useSuspenseGet<TFields extends <%= model.pascal %>Fields | undefined = undefined>(params: <%= model.pascal %>Query<TFields> = {} as <%= model.pascal %>Query<TFields>) {
|
|
271
|
+
return useSuspenseQuery<<%= model.pascal %>Result<TFields>[], Error>({ queryKey: qk.list(params), queryFn: () => get(params) });
|
|
260
272
|
}
|
|
261
273
|
|
|
262
274
|
export function useCreate() {
|
|
@@ -114,6 +114,10 @@ After pre-build (or `fimo deploy`), `src/schemas/{Uid}.ts` exports typed helpers
|
|
|
114
114
|
```ts
|
|
115
115
|
interface BlogPost {
|
|
116
116
|
id: string;
|
|
117
|
+
slug: FimoString;
|
|
118
|
+
contentType: string;
|
|
119
|
+
createdAt: string;
|
|
120
|
+
updatedAt: string;
|
|
117
121
|
title: FimoString;
|
|
118
122
|
body: FimoRichText;
|
|
119
123
|
coverImage: FimoMedia;
|
|
@@ -130,7 +134,7 @@ interface BlogPost {
|
|
|
130
134
|
getById(id: string): Promise<BlogPost>
|
|
131
135
|
getBySlug(slug: string): Promise<BlogPost | null>
|
|
132
136
|
getByField(fieldName: string, value: string): Promise<BlogPost | null>
|
|
133
|
-
get(params?: BlogPostQuery): Promise<
|
|
137
|
+
get<TFields extends BlogPostFields | undefined>(params?: BlogPostQuery<TFields>): Promise<BlogPostResult<TFields>[]>
|
|
134
138
|
create(payload: Partial<BlogPost>): Promise<BlogPost>
|
|
135
139
|
update(id: string, payload: Partial<BlogPost>): Promise<BlogPost>
|
|
136
140
|
remove(id: string): Promise<void>
|
|
@@ -139,7 +143,7 @@ remove(id: string): Promise<void>
|
|
|
139
143
|
useGetById(id) // → { data: BlogPost | undefined, isLoading, ... }
|
|
140
144
|
useGetBySlug(slug) // → { data: BlogPost | null | undefined, ... } — ideal for /:slug detail routes
|
|
141
145
|
useGetByField(fieldName, value) // → { data: BlogPost | null | undefined, ... }
|
|
142
|
-
useGet(params?)
|
|
146
|
+
useGet<TFields>(params?) // → { data: BlogPostResult<TFields>[] | undefined, isLoading, ... }
|
|
143
147
|
useCreate() / useUpdate() / useRemove()
|
|
144
148
|
|
|
145
149
|
// Suspense variants (same signatures, throw to a <Suspense> boundary instead of returning isLoading)
|
|
@@ -154,9 +158,9 @@ if (isLoading || !posts) return null;
|
|
|
154
158
|
posts.map((post) => /* ... */); // BlogPost[]
|
|
155
159
|
```
|
|
156
160
|
|
|
157
|
-
Query params supported: `limit` (1-100, default 20), `offset` (default 0), `search`, `sort`, and `
|
|
161
|
+
Query params supported: `limit` (1-100, default 20), `offset` (default 0), `search`, `sort`, `where`, and `fields`. Use these canonical names in new code.
|
|
158
162
|
|
|
159
|
-
`where` filters on the server. Use scalar values for equality and operator objects for ranges, lists, text matches, or null checks:
|
|
163
|
+
`where` filters on the server. Use scalar values for equality and operator objects for ranges, lists, text matches, or null checks. Keep boolean, string, and number values typed in the object:
|
|
160
164
|
|
|
161
165
|
```ts
|
|
162
166
|
BlogPost.useGet({
|
|
@@ -174,7 +178,16 @@ BlogPost.useGet({
|
|
|
174
178
|
|
|
175
179
|
Operators: scalar equality, `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$in`, `$nin`, `$contains`, `$startsWith`, `$null`.
|
|
176
180
|
|
|
177
|
-
|
|
181
|
+
Use `fields` to keep list payloads small. The API always keeps `id`, and returns only the requested fields beyond that:
|
|
182
|
+
|
|
183
|
+
```tsx
|
|
184
|
+
const { data: summaries = [] } = BlogPost.useGet({
|
|
185
|
+
fields: ['slug', 'title', 'excerpt', 'coverImage'] as const,
|
|
186
|
+
sort: '-publishedAt',
|
|
187
|
+
limit: 12,
|
|
188
|
+
});
|
|
189
|
+
// summaries: Array<Pick<BlogPost, 'id' | 'slug' | 'title' | 'excerpt' | 'coverImage'>>
|
|
190
|
+
```
|
|
178
191
|
|
|
179
192
|
The generated hooks do **not** surface pagination meta (`total`, `hasMore`, `limit`, `offset`). If you need it, read it from a raw fetch to `/entries/<typeName>` (see the **Read path** section below), which returns the full `{ data, meta }` envelope.
|
|
180
193
|
|
|
@@ -248,7 +261,7 @@ For the `<Text>` / `<RichText>` / `<Image>` / `<Date>` components and the rules
|
|
|
248
261
|
## Read path (published app, no auth)
|
|
249
262
|
|
|
250
263
|
```ts
|
|
251
|
-
const res = await fetch(`${import.meta.env.VITE_API_URL}/entries/<typeName
|
|
264
|
+
const res = await fetch(`${import.meta.env.VITE_API_URL}/entries/<typeName>?fields=slug,title&limit=12`);
|
|
252
265
|
const { data, meta } = await res.json();
|
|
253
266
|
// data: Entry[] — fields flattened at top level (id, slug, title, ...)
|
|
254
267
|
// meta: { limit, offset, total, hasMore }
|
|
@@ -33,8 +33,7 @@ Entries are NOT JSON-file-driven. Create/update them via CLI.
|
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
35
|
fimo entries create <TypeName> --body '<json>'
|
|
36
|
-
fimo entries list <TypeName> [--limit N] [--offset N] [--search Q] [--where JSON] [--sort F]
|
|
37
|
-
fimo entries list <TypeName> [--sort-by F] [--sort-direction asc|desc] # legacy sort flags
|
|
36
|
+
fimo entries list <TypeName> [--limit N] [--offset N] [--search Q] [--where JSON] [--sort F] [--fields FIELDS]
|
|
38
37
|
fimo entries get <TypeName> <id>
|
|
39
38
|
fimo entries update <TypeName> <id> --body '<json>'
|
|
40
39
|
fimo entries delete <TypeName> <id>
|
|
@@ -48,9 +47,13 @@ fimo entries delete <TypeName> <id>
|
|
|
48
47
|
fimo entries list BlogPost --where '{"featured":true}' --sort -publishedAt
|
|
49
48
|
fimo entries list BlogPost --where '{"rank":{"$gte":3}}' --sort rank
|
|
50
49
|
fimo entries list BlogPost --search "launch"
|
|
50
|
+
fimo entries list BlogPost --limit 10 --offset 20 --sort title
|
|
51
|
+
fimo entries list BlogPost --fields slug,title,excerpt,coverImage --sort -publishedAt --limit 12
|
|
51
52
|
```
|
|
52
53
|
|
|
53
|
-
|
|
54
|
+
Use the canonical read query flags: `--search`, `--sort`, `--where`, `--limit`, `--offset`, and `--fields`.
|
|
55
|
+
`--where` is a JSON object keyed by schema field name. Simple values mean equality, so booleans, strings, and numbers should stay typed inside the JSON (`{"featured":true}`, `{"category":"react"}`, `{"rank":{"$gte":3}}`). Operator objects support `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$in`, `$nin`, `$contains`, `$startsWith`, and `$null`, subject to the field type. Use `--sort field` for ascending and `--sort -field` for descending.
|
|
56
|
+
`--fields` is a comma-separated projection for list payloads. The API always keeps `id`; pass only the fields your view needs, such as `slug,title,excerpt,coverImage`.
|
|
54
57
|
|
|
55
58
|
## "Add a blog" recipe
|
|
56
59
|
|
package/dist/cli/bundle.json
CHANGED
package/dist/cli/index.js
CHANGED
|
@@ -104447,6 +104447,9 @@ async function entriesListCommand(typeName, options, cmd) {
|
|
|
104447
104447
|
JSON.parse(options.where);
|
|
104448
104448
|
params.where = options.where;
|
|
104449
104449
|
}
|
|
104450
|
+
if (options.fields) {
|
|
104451
|
+
params.fields = options.fields;
|
|
104452
|
+
}
|
|
104450
104453
|
const result = await api.listEntries(ctx.projectId, typeName, Object.keys(params).length > 0 ? params : void 0);
|
|
104451
104454
|
ui.result({ command: "entries list", data: result, render: /* @__PURE__ */ __name(() => renderPrettyJson5(result), "render") });
|
|
104452
104455
|
}
|
|
@@ -108487,7 +108490,7 @@ schemas2.command("get").description("Get a schema by type name").argument("<type
|
|
|
108487
108490
|
schemas2.command("push").description("Push schema JSON files to the API (create or update)").argument("[typeName]", "Schema name to push (omit to push all)").option("-C, --cwd <dir>", "Project directory").action(schemaPushCommand);
|
|
108488
108491
|
schemas2.command("delete").description("Delete a schema by type name").argument("<typeName>", "Content type name").option("-C, --cwd <dir>", "Project directory").action(schemaDeleteCommand);
|
|
108489
108492
|
var entries = program.command("entries").description("Manage content entries");
|
|
108490
|
-
entries.command("list").description("List entries of a content type").argument("<typeName>", "Content type name").option("-C, --cwd <dir>", "Project directory").option("--limit <n>", "Max entries to return").option("--offset <n>", "Offset for pagination").option("--search <query>", "Search query").option("--where <json>", `JSON filter object, e.g. '{"featured":true}'`).option("--sort <field>", "Sort field, prefix with - for descending").option("--sort-by <field>", "Sort field").option("--sort-direction <dir>", "Sort direction (asc|desc)").action(entriesListCommand);
|
|
108493
|
+
entries.command("list").description("List entries of a content type").argument("<typeName>", "Content type name").option("-C, --cwd <dir>", "Project directory").option("--limit <n>", "Max entries to return").option("--offset <n>", "Offset for pagination").option("--search <query>", "Search query").option("--where <json>", `JSON filter object, e.g. '{"featured":true}'`).option("--sort <field>", "Sort field, prefix with - for descending").option("--fields <fields>", "Comma-separated fields to return, e.g. slug,title,excerpt").option("--sort-by <field>", "Sort field").option("--sort-direction <dir>", "Sort direction (asc|desc)").action(entriesListCommand);
|
|
108491
108494
|
entries.command("get").description("Get a single entry").argument("<typeName>", "Content type name").argument("<id>", "Entry ID").option("-C, --cwd <dir>", "Project directory").action(entriesGetCommand);
|
|
108492
108495
|
entries.command("create").description("Create a new entry").argument("<typeName>", "Content type name").option("-C, --cwd <dir>", "Project directory").requiredOption("--body <json>", "Entry JSON body (slug + data)").action(entriesCreateCommand);
|
|
108493
108496
|
entries.command("update").description("Update an existing entry").argument("<typeName>", "Content type name").argument("<id>", "Entry ID").option("-C, --cwd <dir>", "Project directory").requiredOption("--body <json>", "Updated entry JSON body").action(entriesUpdateCommand);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { FimoString, FimoDate, FimoMedia, FimoBoolean, FimoRichText, type FimoSource, type FimoPart, type FimoRichTextContent, type FimoRichTextNodeProps, type FimoRichTextMarkProps, type FimoRichTextComponents, FIMO_SOURCE, FIMO_PARTS, isFimoString, isFimoDate, hasFimoSource, getFimoSource, getFimoParts, } from './primitives.js';
|
|
2
2
|
export { fimo } from './template.js';
|
|
3
3
|
export { useFimoLiveValue } from './useFimoLiveValue.js';
|
|
4
|
-
export type { BoolOps, DateOps, FilterFor, NullOnlyOps, NumberOps, Query, ScalarOps, Sort, SortField, StringOps, Where, } from './query.js';
|
|
4
|
+
export type { BoolOps, DateOps, Field, Fields, FilterFor, NullOnlyOps, NumberOps, Projected, Query, ScalarOps, Sort, SortField, StringOps, Where, } from './query.js';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/runtime/primitives/lib/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,WAAW,EACX,YAAY,EACZ,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,WAAW,EACX,UAAU,EACV,YAAY,EACZ,UAAU,EACV,aAAa,EACb,aAAa,EACb,YAAY,GACb,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,YAAY,EACV,OAAO,EACP,OAAO,EACP,SAAS,EACT,WAAW,EACX,SAAS,EACT,KAAK,EACL,SAAS,EACT,IAAI,EACJ,SAAS,EACT,SAAS,EACT,KAAK,GACN,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/runtime/primitives/lib/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,WAAW,EACX,YAAY,EACZ,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,WAAW,EACX,UAAU,EACV,YAAY,EACZ,UAAU,EACV,aAAa,EACb,aAAa,EACb,YAAY,GACb,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,YAAY,EACV,OAAO,EACP,OAAO,EACP,KAAK,EACL,MAAM,EACN,SAAS,EACT,WAAW,EACX,SAAS,EACT,SAAS,EACT,KAAK,EACL,SAAS,EACT,IAAI,EACJ,SAAS,EACT,SAAS,EACT,KAAK,GACN,MAAM,YAAY,CAAC"}
|
|
@@ -35,12 +35,21 @@ export type Where<T> = TopLevelWhere & {
|
|
|
35
35
|
};
|
|
36
36
|
export type SortField<T> = Extract<keyof T, string> | 'createdAt' | 'updatedAt';
|
|
37
37
|
export type Sort<T> = SortField<T> | `-${SortField<T>}`;
|
|
38
|
-
export type
|
|
38
|
+
export type Field<T> = Extract<keyof T, string> | 'createdAt' | 'updatedAt' | 'contentType';
|
|
39
|
+
export type Fields<T> = Field<T> | readonly Field<T>[];
|
|
40
|
+
type SelectedFields<TFields> = TFields extends readonly (infer K)[] ? K : TFields;
|
|
41
|
+
export type Projected<T extends {
|
|
42
|
+
id: string;
|
|
43
|
+
}, TFields extends Fields<T> | undefined> = [TFields] extends [undefined] ? T : Pick<T, Extract<'id' | SelectedFields<TFields>, keyof T>>;
|
|
44
|
+
export type Query<T extends {
|
|
45
|
+
id: string;
|
|
46
|
+
}, TFields extends Fields<T> | undefined = Fields<T> | undefined> = {
|
|
39
47
|
where?: Where<T>;
|
|
40
48
|
search?: string;
|
|
41
49
|
sort?: Sort<T> | Sort<T>[];
|
|
42
50
|
limit?: number;
|
|
43
51
|
offset?: number;
|
|
52
|
+
fields?: TFields;
|
|
44
53
|
};
|
|
45
54
|
export {};
|
|
46
55
|
//# sourceMappingURL=query.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../../src/runtime/primitives/lib/query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElG,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI;IACzB,GAAG,CAAC,EAAE,CAAC,CAAC;IACR,GAAG,CAAC,EAAE,CAAC,CAAC;IACR,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;IACV,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;IACX,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,SAAS,CAAC,MAAM,CAAC,GAAG;IAC1C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,SAAS,CAAC,MAAM,CAAC,GAAG;IAC1C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,SAAS,CAAC;AAEhC,MA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