@querykitjs/core 1.0.0 → 1.1.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/dist/index.d.cts CHANGED
@@ -38,6 +38,13 @@ type FilterNode<TKey extends string = string, TRaw = never> = FieldCondition<TKe
38
38
  /** Public filter: daraxt/tugun yoki flat massiv (implicit AND). */
39
39
  type Filter<TKey extends string = string, TRaw = never> = FilterNode<TKey, TRaw> | FieldCondition<TKey>[];
40
40
  type SortDirection = "asc" | "desc";
41
+ /** One sort field — `{ key, direction }`. */
42
+ interface SortItem<TKey extends string = string> {
43
+ key: TKey;
44
+ direction?: SortDirection;
45
+ }
46
+ /** Sort is **always an array** of {@link SortItem} (multi-field capable). */
47
+ type Sort<TKey extends string = string> = SortItem<TKey>[];
41
48
  /** Offset (sahifali) paginatsiya meta'si. */
42
49
  interface OffsetMeta {
43
50
  total_items: number;
@@ -137,4 +144,4 @@ declare const DEFAULT_PER_PAGE = 20;
137
144
  /** Infinite/cursor `limit` default'i. */
138
145
  declare const DEFAULT_LIMIT = 20;
139
146
 
140
- export { type AndGroup, type CursorMeta, DEFAULT_LIMIT, DEFAULT_PER_PAGE, FILTER_OPERATORS, type FieldCondition, type Filter, type FilterNode, type FilterOperator, type FilterScalar, type FilterValue, type InfiniteMeta, type NotGroup, type OffsetMeta, type OrGroup, type SortDirection, createFilters, f };
147
+ export { type AndGroup, type CursorMeta, DEFAULT_LIMIT, DEFAULT_PER_PAGE, FILTER_OPERATORS, type FieldCondition, type Filter, type FilterNode, type FilterOperator, type FilterScalar, type FilterValue, type InfiniteMeta, type NotGroup, type OffsetMeta, type OrGroup, type Sort, type SortDirection, type SortItem, createFilters, f };
package/dist/index.d.ts CHANGED
@@ -38,6 +38,13 @@ type FilterNode<TKey extends string = string, TRaw = never> = FieldCondition<TKe
38
38
  /** Public filter: daraxt/tugun yoki flat massiv (implicit AND). */
39
39
  type Filter<TKey extends string = string, TRaw = never> = FilterNode<TKey, TRaw> | FieldCondition<TKey>[];
40
40
  type SortDirection = "asc" | "desc";
41
+ /** One sort field — `{ key, direction }`. */
42
+ interface SortItem<TKey extends string = string> {
43
+ key: TKey;
44
+ direction?: SortDirection;
45
+ }
46
+ /** Sort is **always an array** of {@link SortItem} (multi-field capable). */
47
+ type Sort<TKey extends string = string> = SortItem<TKey>[];
41
48
  /** Offset (sahifali) paginatsiya meta'si. */
42
49
  interface OffsetMeta {
43
50
  total_items: number;
@@ -137,4 +144,4 @@ declare const DEFAULT_PER_PAGE = 20;
137
144
  /** Infinite/cursor `limit` default'i. */
138
145
  declare const DEFAULT_LIMIT = 20;
139
146
 
140
- export { type AndGroup, type CursorMeta, DEFAULT_LIMIT, DEFAULT_PER_PAGE, FILTER_OPERATORS, type FieldCondition, type Filter, type FilterNode, type FilterOperator, type FilterScalar, type FilterValue, type InfiniteMeta, type NotGroup, type OffsetMeta, type OrGroup, type SortDirection, createFilters, f };
147
+ export { type AndGroup, type CursorMeta, DEFAULT_LIMIT, DEFAULT_PER_PAGE, FILTER_OPERATORS, type FieldCondition, type Filter, type FilterNode, type FilterOperator, type FilterScalar, type FilterValue, type InfiniteMeta, type NotGroup, type OffsetMeta, type OrGroup, type Sort, type SortDirection, type SortItem, createFilters, f };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@querykitjs/core",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "ORM-agnostic query DSL shared by querykit packages — filters, operators & wire types.",
5
5
  "type": "module",
6
6
  "author": {