@ultimat3/query 22.3.5 → 22.4.0
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 +7 -7
- package/src/index.ts +2 -0
- package/src/query.ts +18 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultimat3/query",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.4.0",
|
|
4
4
|
"description": "The query primitive: a policy-checked read, optionally live, with cursor pagination and an incremental matcher",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"test": "bun test"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@ultimat3/cache": "22.
|
|
40
|
-
"@ultimat3/core": "22.
|
|
41
|
-
"@ultimat3/entity": "22.
|
|
42
|
-
"@ultimat3/http": "22.
|
|
43
|
-
"@ultimat3/policy": "22.
|
|
44
|
-
"@ultimat3/schema": "22.
|
|
39
|
+
"@ultimat3/cache": "22.4.0",
|
|
40
|
+
"@ultimat3/core": "22.4.0",
|
|
41
|
+
"@ultimat3/entity": "22.4.0",
|
|
42
|
+
"@ultimat3/http": "22.4.0",
|
|
43
|
+
"@ultimat3/policy": "22.4.0",
|
|
44
|
+
"@ultimat3/schema": "22.4.0"
|
|
45
45
|
}
|
|
46
46
|
}
|
package/src/index.ts
CHANGED
package/src/query.ts
CHANGED
|
@@ -55,6 +55,24 @@ export interface QueryMcp {
|
|
|
55
55
|
* Forbidden. See `ActionMcp.visibleTo`, which this mirrors exactly.
|
|
56
56
|
*/
|
|
57
57
|
readonly visibleTo?: readonly string[];
|
|
58
|
+
/**
|
|
59
|
+
* The list whitelist an MCP meta surface composes over (`@ultimat3/mcp` `McpListParams`):
|
|
60
|
+
* `filters` field → operators, sortable `sort` fields, pickable `fields`, `maxLimit`. Flat keys:
|
|
61
|
+
* the query's own `input` declares `status_eq`, `sort`, `fields`, `cursor`, `limit` and
|
|
62
|
+
* implements them; `manage_resource` refuses anything outside the whitelist before it runs.
|
|
63
|
+
*/
|
|
64
|
+
readonly listParams?: QueryListParams;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** One comparison a list filter accepts. A filter key is `<field><op>`: `status_eq`. */
|
|
68
|
+
export type QueryListFilterOp = '_eq' | '_in' | '_gt' | '_lt' | '_cont';
|
|
69
|
+
|
|
70
|
+
/** Structural twin of `@ultimat3/mcp`'s `McpListParams` (tier 3 cannot import tier 4). */
|
|
71
|
+
export interface QueryListParams {
|
|
72
|
+
readonly filters?: Readonly<Record<string, readonly QueryListFilterOp[]>>;
|
|
73
|
+
readonly sort?: readonly string[];
|
|
74
|
+
readonly fields?: readonly string[];
|
|
75
|
+
readonly maxLimit?: number;
|
|
58
76
|
}
|
|
59
77
|
|
|
60
78
|
/**
|