quetch 0.19.1 → 0.19.2
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/types/CombineUnion.d.ts +2 -1
- package/dist/types/KeyFiltered.d.ts +1 -3
- package/dist/types/Path.d.ts +1 -1
- package/dist/types/PathFiltered.d.ts +1 -1
- package/dist/types/Primitive.d.ts +1 -1
- package/dist/types/PrimitiveObject.d.ts +1 -0
- package/dist/types/PrimitiveObject.js +1 -0
- package/dist/types/PrimitiveObject.js.map +1 -0
- package/dist/types.d.ts +1 -0
- package/doc/README.md +6 -3
- package/doc/classes/RequestError.md +21 -11
- package/doc/functions/aggregate.md +21 -9
- package/doc/functions/branch.md +11 -5
- package/doc/functions/cache.md +21 -9
- package/doc/functions/combine.md +5 -3
- package/doc/functions/cork.md +5 -3
- package/doc/functions/defineCheckQuery.md +9 -5
- package/doc/functions/defineCustomFetch.md +15 -7
- package/doc/functions/defineGenericFetch.md +9 -5
- package/doc/functions/escapeRegex.md +5 -3
- package/doc/functions/fetchExternal.md +5 -3
- package/doc/functions/fetchLocal.md +3 -3
- package/doc/functions/fieldListFromFilter.md +6 -4
- package/doc/functions/filterChildren.md +15 -7
- package/doc/functions/filterFromContext.md +6 -4
- package/doc/functions/get.md +9 -5
- package/doc/functions/identity.md +8 -4
- package/doc/functions/isFilterGroup.md +5 -5
- package/doc/functions/log.md +5 -3
- package/doc/functions/normalizeOrder.md +6 -4
- package/doc/functions/queryItemList.md +6 -4
- package/doc/functions/retry.md +12 -6
- package/doc/functions/reverseOrder.md +6 -4
- package/doc/functions/sortItemList.md +10 -8
- package/doc/functions/testFilter.md +10 -8
- package/doc/interfaces/CustomFetch.md +6 -4
- package/doc/type-aliases/AggregateFunction.md +4 -4
- package/doc/type-aliases/AggregateFunctionOperator.md +2 -2
- package/doc/type-aliases/CombineUnion.md +17 -0
- package/doc/type-aliases/Context.md +3 -3
- package/doc/type-aliases/CustomFieldAggregateMap.md +3 -3
- package/doc/type-aliases/CustomFieldMap.md +3 -3
- package/doc/type-aliases/Field.md +4 -4
- package/doc/type-aliases/FieldFiltered.md +4 -4
- package/doc/type-aliases/FieldFunction.md +3 -3
- package/doc/type-aliases/FieldFunctionCustom.md +6 -4
- package/doc/type-aliases/FieldFunctionFormatDate.md +3 -3
- package/doc/type-aliases/FieldFunctionReturn.md +2 -2
- package/doc/type-aliases/Filter.md +3 -3
- package/doc/type-aliases/FilterArray.md +9 -5
- package/doc/type-aliases/FilterBoolean.md +3 -3
- package/doc/type-aliases/FilterChildren.md +5 -5
- package/doc/type-aliases/FilterCustom.md +6 -4
- package/doc/type-aliases/FilterField.md +3 -3
- package/doc/type-aliases/FilterGroup.md +34 -4
- package/doc/type-aliases/FilterNumber.md +3 -3
- package/doc/type-aliases/FilterOperator.md +2 -2
- package/doc/type-aliases/FilterString.md +3 -3
- package/doc/type-aliases/FilterStringIntersect.md +4 -4
- package/doc/type-aliases/FilterStringMatch.md +7 -7
- package/doc/type-aliases/Get.md +3 -3
- package/doc/type-aliases/Group.md +4 -4
- package/doc/type-aliases/Handler.md +8 -4
- package/doc/type-aliases/Immutable.md +3 -3
- package/doc/type-aliases/Increment.md +2 -2
- package/doc/type-aliases/InjectCustomFields.md +3 -3
- package/doc/type-aliases/IntersectUnion.md +17 -0
- package/doc/type-aliases/Item.md +2 -2
- package/doc/type-aliases/Join.md +2 -2
- package/doc/type-aliases/Key.md +2 -2
- package/doc/type-aliases/KeyFiltered.md +5 -5
- package/doc/type-aliases/KeyFromUnion.md +17 -0
- package/doc/type-aliases/Locale.md +3 -3
- package/doc/type-aliases/NextHandler.md +5 -3
- package/doc/type-aliases/Order.md +4 -4
- package/doc/type-aliases/Parameters.md +3 -3
- package/doc/type-aliases/Path.md +4 -4
- package/doc/type-aliases/PathFiltered.md +4 -4
- package/doc/type-aliases/Primitive.md +13 -0
- package/doc/type-aliases/PrimitiveObject.md +13 -0
- package/doc/type-aliases/Query.md +3 -3
- package/doc/type-aliases/QueryAggregate.md +4 -4
- package/doc/type-aliases/QueryCreate.md +3 -3
- package/doc/type-aliases/QueryCreateMultiple.md +4 -4
- package/doc/type-aliases/QueryDelete.md +3 -3
- package/doc/type-aliases/QueryDeleteMultiple.md +3 -3
- package/doc/type-aliases/QueryMethod.md +2 -2
- package/doc/type-aliases/QueryRead.md +4 -4
- package/doc/type-aliases/QueryReadMultiple.md +5 -5
- package/doc/type-aliases/QuerySettings.md +6 -4
- package/doc/type-aliases/QueryUpdate.md +3 -3
- package/doc/type-aliases/QueryUpdateMultiple.md +4 -4
- package/doc/type-aliases/Result.md +4 -4
- package/doc/type-aliases/Store.md +17 -7
- package/doc/type-aliases/Value.md +22 -4
- package/lib/types/CombineUnion.ts +7 -4
- package/lib/types/KeyFiltered.ts +7 -18
- package/lib/types/Path.ts +7 -7
- package/lib/types/PathFiltered.ts +13 -11
- package/lib/types/Primitive.ts +1 -1
- package/lib/types/PrimitiveObject.ts +1 -0
- package/lib/types.ts +1 -0
- package/package.json +1 -1
- package/doc/type-aliases/Any.md +0 -13
- package/doc/type-aliases/Mutable.md +0 -17
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**quetch**](../README.md)
|
|
1
|
+
[**quetch**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Type Alias: PathFiltered\<T, P, D\>
|
|
8
8
|
|
|
9
|
-
> **PathFiltered**\<`T`, `P`, `D`\>: `D` *extends* `
|
|
9
|
+
> **PathFiltered**\<`T`, `P`, `D`\>: [`0`] *extends* [`1` & `T`] ? readonly ([`Key`](Key.md) \| `never`)[] : `D` *extends* `-1` ? `never` : `T` *extends* `P` ? readonly `never`[] : `T` *extends* `ReadonlyArray`\<infer I\> ? `Extract`\<`I`, `P`\> *extends* `never` ? readonly [`number`, `...PathFiltered<I, P, Increment<D>>`] : readonly [`number`] : `T` *extends* `object` ? `{ [K in keyof T]: Extract<T[K], P> extends never ? readonly [K, ...(...)] : readonly [K] }`\[keyof `T`\] : `never`
|
|
10
10
|
|
|
11
11
|
## Type Parameters
|
|
12
12
|
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
• **P**
|
|
16
16
|
|
|
17
|
-
• **D** = `
|
|
17
|
+
• **D** = `7`
|
|
18
18
|
|
|
19
19
|
## Defined in
|
|
20
20
|
|
|
21
|
-
[lib/types/PathFiltered.ts:
|
|
21
|
+
[lib/types/PathFiltered.ts:4](https://github.com/nevoland/quetch/blob/daab7d5db71d61e74901886a2473b07ec4e9fc05/lib/types/PathFiltered.ts#L4)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[**quetch**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[quetch](../README.md) / Primitive
|
|
6
|
+
|
|
7
|
+
# Type Alias: Primitive
|
|
8
|
+
|
|
9
|
+
> **Primitive**: `string` \| `number` \| `boolean` \| `bigint` \| `symbol`
|
|
10
|
+
|
|
11
|
+
## Defined in
|
|
12
|
+
|
|
13
|
+
[lib/types/Primitive.ts:1](https://github.com/nevoland/quetch/blob/daab7d5db71d61e74901886a2473b07ec4e9fc05/lib/types/Primitive.ts#L1)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[**quetch**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[quetch](../README.md) / PrimitiveObject
|
|
6
|
+
|
|
7
|
+
# Type Alias: PrimitiveObject
|
|
8
|
+
|
|
9
|
+
> **PrimitiveObject**: `String` \| `Number` \| `Boolean` \| `BigInt` \| `Symbol`
|
|
10
|
+
|
|
11
|
+
## Defined in
|
|
12
|
+
|
|
13
|
+
[lib/types/PrimitiveObject.ts:1](https://github.com/nevoland/quetch/blob/daab7d5db71d61e74901886a2473b07ec4e9fc05/lib/types/PrimitiveObject.ts#L1)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**quetch**](../README.md)
|
|
1
|
+
[**quetch**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -12,8 +12,8 @@ Query that fetches or mutates an entity.
|
|
|
12
12
|
|
|
13
13
|
## Type Parameters
|
|
14
14
|
|
|
15
|
-
• **T**
|
|
15
|
+
• **T**
|
|
16
16
|
|
|
17
17
|
## Defined in
|
|
18
18
|
|
|
19
|
-
[lib/types/Query.ts:14](https://github.com/nevoland/quetch/blob/
|
|
19
|
+
[lib/types/Query.ts:14](https://github.com/nevoland/quetch/blob/daab7d5db71d61e74901886a2473b07ec4e9fc05/lib/types/Query.ts#L14)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**quetch**](../README.md)
|
|
1
|
+
[**quetch**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -12,7 +12,7 @@ Query for computing an aggregated value.
|
|
|
12
12
|
|
|
13
13
|
## Type Parameters
|
|
14
14
|
|
|
15
|
-
• **T**
|
|
15
|
+
• **T**
|
|
16
16
|
|
|
17
17
|
## Type declaration
|
|
18
18
|
|
|
@@ -50,7 +50,7 @@ Offset of the first matching item.
|
|
|
50
50
|
|
|
51
51
|
### order?
|
|
52
52
|
|
|
53
|
-
> `optional` **order**: [`Order`](Order.md)\<`T`\>[]
|
|
53
|
+
> `optional` **order**: readonly [`Order`](Order.md)\<`T`\>[]
|
|
54
54
|
|
|
55
55
|
Order by which the items should be sorted.
|
|
56
56
|
|
|
@@ -68,4 +68,4 @@ Query settings.
|
|
|
68
68
|
|
|
69
69
|
## Defined in
|
|
70
70
|
|
|
71
|
-
[lib/types/QueryAggregate.ts:11](https://github.com/nevoland/quetch/blob/
|
|
71
|
+
[lib/types/QueryAggregate.ts:11](https://github.com/nevoland/quetch/blob/daab7d5db71d61e74901886a2473b07ec4e9fc05/lib/types/QueryAggregate.ts#L11)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**quetch**](../README.md)
|
|
1
|
+
[**quetch**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -12,7 +12,7 @@ Query for creating an item.
|
|
|
12
12
|
|
|
13
13
|
## Type Parameters
|
|
14
14
|
|
|
15
|
-
• **T**
|
|
15
|
+
• **T**
|
|
16
16
|
|
|
17
17
|
## Type declaration
|
|
18
18
|
|
|
@@ -50,4 +50,4 @@ Value properties of the item to create.
|
|
|
50
50
|
|
|
51
51
|
## Defined in
|
|
52
52
|
|
|
53
|
-
[lib/types/QueryCreate.ts:8](https://github.com/nevoland/quetch/blob/
|
|
53
|
+
[lib/types/QueryCreate.ts:8](https://github.com/nevoland/quetch/blob/daab7d5db71d61e74901886a2473b07ec4e9fc05/lib/types/QueryCreate.ts#L8)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**quetch**](../README.md)
|
|
1
|
+
[**quetch**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -12,7 +12,7 @@ Query for creating multiple items.
|
|
|
12
12
|
|
|
13
13
|
## Type Parameters
|
|
14
14
|
|
|
15
|
-
• **T**
|
|
15
|
+
• **T**
|
|
16
16
|
|
|
17
17
|
## Type declaration
|
|
18
18
|
|
|
@@ -44,8 +44,8 @@ Query settings.
|
|
|
44
44
|
|
|
45
45
|
### value
|
|
46
46
|
|
|
47
|
-
> **value**: `Partial`\<`T`\>[]
|
|
47
|
+
> **value**: readonly `Partial`\<`T`\>[]
|
|
48
48
|
|
|
49
49
|
## Defined in
|
|
50
50
|
|
|
51
|
-
[lib/types/QueryCreateMultiple.ts:8](https://github.com/nevoland/quetch/blob/
|
|
51
|
+
[lib/types/QueryCreateMultiple.ts:8](https://github.com/nevoland/quetch/blob/daab7d5db71d61e74901886a2473b07ec4e9fc05/lib/types/QueryCreateMultiple.ts#L8)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**quetch**](../README.md)
|
|
1
|
+
[**quetch**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -12,7 +12,7 @@ Query for deleting an item.
|
|
|
12
12
|
|
|
13
13
|
## Type Parameters
|
|
14
14
|
|
|
15
|
-
• **T**
|
|
15
|
+
• **T**
|
|
16
16
|
|
|
17
17
|
## Type declaration
|
|
18
18
|
|
|
@@ -48,4 +48,4 @@ Query settings.
|
|
|
48
48
|
|
|
49
49
|
## Defined in
|
|
50
50
|
|
|
51
|
-
[lib/types/QueryDelete.ts:9](https://github.com/nevoland/quetch/blob/
|
|
51
|
+
[lib/types/QueryDelete.ts:9](https://github.com/nevoland/quetch/blob/daab7d5db71d61e74901886a2473b07ec4e9fc05/lib/types/QueryDelete.ts#L9)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**quetch**](../README.md)
|
|
1
|
+
[**quetch**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -12,7 +12,7 @@ Query for deleting multiple items.
|
|
|
12
12
|
|
|
13
13
|
## Type Parameters
|
|
14
14
|
|
|
15
|
-
• **T**
|
|
15
|
+
• **T**
|
|
16
16
|
|
|
17
17
|
## Type declaration
|
|
18
18
|
|
|
@@ -48,4 +48,4 @@ Query settings.
|
|
|
48
48
|
|
|
49
49
|
## Defined in
|
|
50
50
|
|
|
51
|
-
[lib/types/QueryDeleteMultiple.ts:9](https://github.com/nevoland/quetch/blob/
|
|
51
|
+
[lib/types/QueryDeleteMultiple.ts:9](https://github.com/nevoland/quetch/blob/daab7d5db71d61e74901886a2473b07ec4e9fc05/lib/types/QueryDeleteMultiple.ts#L9)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**quetch**](../README.md)
|
|
1
|
+
[**quetch**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -12,4 +12,4 @@ Available query methods.
|
|
|
12
12
|
|
|
13
13
|
## Defined in
|
|
14
14
|
|
|
15
|
-
[lib/types/QueryMethod.ts:6](https://github.com/nevoland/quetch/blob/
|
|
15
|
+
[lib/types/QueryMethod.ts:6](https://github.com/nevoland/quetch/blob/daab7d5db71d61e74901886a2473b07ec4e9fc05/lib/types/QueryMethod.ts#L6)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**quetch**](../README.md)
|
|
1
|
+
[**quetch**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -12,7 +12,7 @@ Query for reading a single item.
|
|
|
12
12
|
|
|
13
13
|
## Type Parameters
|
|
14
14
|
|
|
15
|
-
• **T**
|
|
15
|
+
• **T**
|
|
16
16
|
|
|
17
17
|
## Type declaration
|
|
18
18
|
|
|
@@ -58,7 +58,7 @@ Offset of the first matching item.
|
|
|
58
58
|
|
|
59
59
|
### order?
|
|
60
60
|
|
|
61
|
-
> `optional` **order**: [`Order`](Order.md)\<`T`\>[]
|
|
61
|
+
> `optional` **order**: readonly [`Order`](Order.md)\<`T`\>[]
|
|
62
62
|
|
|
63
63
|
Order by which the items should be sorted.
|
|
64
64
|
|
|
@@ -76,4 +76,4 @@ Query settings.
|
|
|
76
76
|
|
|
77
77
|
## Defined in
|
|
78
78
|
|
|
79
|
-
[lib/types/QueryRead.ts:10](https://github.com/nevoland/quetch/blob/
|
|
79
|
+
[lib/types/QueryRead.ts:10](https://github.com/nevoland/quetch/blob/daab7d5db71d61e74901886a2473b07ec4e9fc05/lib/types/QueryRead.ts#L10)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**quetch**](../README.md)
|
|
1
|
+
[**quetch**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -12,7 +12,7 @@ Query for getting a list of items.
|
|
|
12
12
|
|
|
13
13
|
## Type Parameters
|
|
14
14
|
|
|
15
|
-
• **T**
|
|
15
|
+
• **T**
|
|
16
16
|
|
|
17
17
|
## Type declaration
|
|
18
18
|
|
|
@@ -36,7 +36,7 @@ Filter that picks the items.
|
|
|
36
36
|
|
|
37
37
|
### group?
|
|
38
38
|
|
|
39
|
-
> `optional` **group**: [`Group`](Group.md)\<`T`\>[]
|
|
39
|
+
> `optional` **group**: readonly [`Group`](Group.md)\<`T`\>[]
|
|
40
40
|
|
|
41
41
|
Groups items by specified fields.
|
|
42
42
|
|
|
@@ -62,7 +62,7 @@ Offset of the first matching item.
|
|
|
62
62
|
|
|
63
63
|
### order?
|
|
64
64
|
|
|
65
|
-
> `optional` **order**: [`Order`](Order.md)\<`T`\>[]
|
|
65
|
+
> `optional` **order**: readonly [`Order`](Order.md)\<`T`\>[]
|
|
66
66
|
|
|
67
67
|
Order by which the items should be sorted.
|
|
68
68
|
|
|
@@ -80,4 +80,4 @@ Query settings.
|
|
|
80
80
|
|
|
81
81
|
## Defined in
|
|
82
82
|
|
|
83
|
-
[lib/types/QueryReadMultiple.ts:11](https://github.com/nevoland/quetch/blob/
|
|
83
|
+
[lib/types/QueryReadMultiple.ts:11](https://github.com/nevoland/quetch/blob/daab7d5db71d61e74901886a2473b07ec4e9fc05/lib/types/QueryReadMultiple.ts#L11)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**quetch**](../README.md)
|
|
1
|
+
[**quetch**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -12,7 +12,7 @@ Settings to use when doing a query.
|
|
|
12
12
|
|
|
13
13
|
## Type Parameters
|
|
14
14
|
|
|
15
|
-
• **T**
|
|
15
|
+
• **T**
|
|
16
16
|
|
|
17
17
|
## Type declaration
|
|
18
18
|
|
|
@@ -48,7 +48,9 @@ Returns a filter that captures the items expressed by the provided `FilterChildr
|
|
|
48
48
|
|
|
49
49
|
#### Parameters
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
##### filter
|
|
52
|
+
|
|
53
|
+
[`FilterChildren`](FilterChildren.md)\<`T`\>
|
|
52
54
|
|
|
53
55
|
The provided `FilterChildren` to express.
|
|
54
56
|
|
|
@@ -60,4 +62,4 @@ A filter that captures the items expressed by the provided `FilterChildren`.
|
|
|
60
62
|
|
|
61
63
|
## Defined in
|
|
62
64
|
|
|
63
|
-
[lib/types/QuerySettings.ts:8](https://github.com/nevoland/quetch/blob/
|
|
65
|
+
[lib/types/QuerySettings.ts:8](https://github.com/nevoland/quetch/blob/daab7d5db71d61e74901886a2473b07ec4e9fc05/lib/types/QuerySettings.ts#L8)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**quetch**](../README.md)
|
|
1
|
+
[**quetch**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -12,7 +12,7 @@ Query for updating an item.
|
|
|
12
12
|
|
|
13
13
|
## Type Parameters
|
|
14
14
|
|
|
15
|
-
• **T**
|
|
15
|
+
• **T**
|
|
16
16
|
|
|
17
17
|
## Type declaration
|
|
18
18
|
|
|
@@ -68,4 +68,4 @@ Partial property values to update.
|
|
|
68
68
|
|
|
69
69
|
## Defined in
|
|
70
70
|
|
|
71
|
-
[lib/types/QueryUpdate.ts:9](https://github.com/nevoland/quetch/blob/
|
|
71
|
+
[lib/types/QueryUpdate.ts:9](https://github.com/nevoland/quetch/blob/daab7d5db71d61e74901886a2473b07ec4e9fc05/lib/types/QueryUpdate.ts#L9)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**quetch**](../README.md)
|
|
1
|
+
[**quetch**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -12,7 +12,7 @@ Query for updating multiple items.
|
|
|
12
12
|
|
|
13
13
|
## Type Parameters
|
|
14
14
|
|
|
15
|
-
• **T**
|
|
15
|
+
• **T**
|
|
16
16
|
|
|
17
17
|
## Type declaration
|
|
18
18
|
|
|
@@ -66,10 +66,10 @@ Query settings.
|
|
|
66
66
|
|
|
67
67
|
### value
|
|
68
68
|
|
|
69
|
-
> **value**: `Partial`\<`T`\>[]
|
|
69
|
+
> **value**: readonly `Partial`\<`T`\>[]
|
|
70
70
|
|
|
71
71
|
Partial property values to update.
|
|
72
72
|
|
|
73
73
|
## Defined in
|
|
74
74
|
|
|
75
|
-
[lib/types/QueryUpdateMultiple.ts:10](https://github.com/nevoland/quetch/blob/
|
|
75
|
+
[lib/types/QueryUpdateMultiple.ts:10](https://github.com/nevoland/quetch/blob/daab7d5db71d61e74901886a2473b07ec4e9fc05/lib/types/QueryUpdateMultiple.ts#L10)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**quetch**](../README.md)
|
|
1
|
+
[**quetch**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
|
|
7
7
|
# Type Alias: Result\<T, Q\>
|
|
8
8
|
|
|
9
|
-
> **Result**\<`T`, `Q`\>: [`Q`] *extends* [`object`] ? [`Q`] *extends* [`object`] ? `ResultRead`\<`T`, `Q`\>[] : `ResultRead`\<`T`, `Q`\> : [`Q`] *extends* [`object`] ? `number` : [`Q`] *extends* [`object`] ? `ResultRead`\<`T`, `Q`\>[] : `ResultRead`\<`T`, `Q`\>
|
|
9
|
+
> **Result**\<`T`, `Q`\>: [`Q`] *extends* [`object`] ? [`Q`] *extends* [`object`] ? readonly `ResultRead`\<`T`, `Q`\>[] : `ResultRead`\<`T`, `Q`\> : [`Q`] *extends* [`object`] ? `number` : [`Q`] *extends* [`object`] ? readonly `ResultRead`\<`T`, `Q`\>[] : `ResultRead`\<`T`, `Q`\>
|
|
10
10
|
|
|
11
11
|
## Type Parameters
|
|
12
12
|
|
|
13
|
-
• **T**
|
|
13
|
+
• **T**
|
|
14
14
|
|
|
15
15
|
• **Q** *extends* [`Query`](Query.md)\<`T`\>
|
|
16
16
|
|
|
17
17
|
## Defined in
|
|
18
18
|
|
|
19
|
-
[lib/types/Result.ts:20](https://github.com/nevoland/quetch/blob/
|
|
19
|
+
[lib/types/Result.ts:20](https://github.com/nevoland/quetch/blob/daab7d5db71d61e74901886a2473b07ec4e9fc05/lib/types/Result.ts#L20)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**quetch**](../README.md)
|
|
1
|
+
[**quetch**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -18,7 +18,9 @@
|
|
|
18
18
|
|
|
19
19
|
#### Parameters
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
##### key
|
|
22
|
+
|
|
23
|
+
`string`
|
|
22
24
|
|
|
23
25
|
#### Returns
|
|
24
26
|
|
|
@@ -28,7 +30,9 @@
|
|
|
28
30
|
|
|
29
31
|
#### Parameters
|
|
30
32
|
|
|
31
|
-
|
|
33
|
+
##### key
|
|
34
|
+
|
|
35
|
+
`string`
|
|
32
36
|
|
|
33
37
|
#### Returns
|
|
34
38
|
|
|
@@ -38,7 +42,9 @@
|
|
|
38
42
|
|
|
39
43
|
#### Parameters
|
|
40
44
|
|
|
41
|
-
|
|
45
|
+
##### key
|
|
46
|
+
|
|
47
|
+
`string`
|
|
42
48
|
|
|
43
49
|
#### Returns
|
|
44
50
|
|
|
@@ -48,9 +54,13 @@
|
|
|
48
54
|
|
|
49
55
|
#### Parameters
|
|
50
56
|
|
|
51
|
-
|
|
57
|
+
##### key
|
|
58
|
+
|
|
59
|
+
`string`
|
|
60
|
+
|
|
61
|
+
##### value
|
|
52
62
|
|
|
53
|
-
|
|
63
|
+
`T`
|
|
54
64
|
|
|
55
65
|
#### Returns
|
|
56
66
|
|
|
@@ -58,4 +68,4 @@
|
|
|
58
68
|
|
|
59
69
|
## Defined in
|
|
60
70
|
|
|
61
|
-
[lib/types/Store.ts:2](https://github.com/nevoland/quetch/blob/
|
|
71
|
+
[lib/types/Store.ts:2](https://github.com/nevoland/quetch/blob/daab7d5db71d61e74901886a2473b07ec4e9fc05/lib/types/Store.ts#L2)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**quetch**](../README.md)
|
|
1
|
+
[**quetch**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -6,16 +6,34 @@
|
|
|
6
6
|
|
|
7
7
|
# Type Alias: Value\<T, V\>
|
|
8
8
|
|
|
9
|
-
> **Value**\<`T`, `V`\>: `
|
|
9
|
+
> **Value**\<`T`, `V`\>: \{`value`: `V`; \} \| \{`valueField`: [`FieldFiltered`](FieldFiltered.md)\<`T`, `V`\>; \}
|
|
10
10
|
|
|
11
11
|
Actual `value` or `valueField` leading to the value.
|
|
12
12
|
|
|
13
13
|
## Type Parameters
|
|
14
14
|
|
|
15
|
-
• **T**
|
|
15
|
+
• **T**
|
|
16
16
|
|
|
17
17
|
• **V**
|
|
18
18
|
|
|
19
|
+
## Type declaration
|
|
20
|
+
|
|
21
|
+
\{`value`: `V`; \}
|
|
22
|
+
|
|
23
|
+
### value
|
|
24
|
+
|
|
25
|
+
> **value**: `V`
|
|
26
|
+
|
|
27
|
+
Value to use.
|
|
28
|
+
|
|
29
|
+
\{`valueField`: [`FieldFiltered`](FieldFiltered.md)\<`T`, `V`\>; \}
|
|
30
|
+
|
|
31
|
+
### valueField
|
|
32
|
+
|
|
33
|
+
> **valueField**: [`FieldFiltered`](FieldFiltered.md)\<`T`, `V`\>
|
|
34
|
+
|
|
35
|
+
Path leading to the value.
|
|
36
|
+
|
|
19
37
|
## Defined in
|
|
20
38
|
|
|
21
|
-
[lib/types/Value.ts:6](https://github.com/nevoland/quetch/blob/
|
|
39
|
+
[lib/types/Value.ts:6](https://github.com/nevoland/quetch/blob/daab7d5db71d61e74901886a2473b07ec4e9fc05/lib/types/Value.ts#L6)
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import type { KeyFromUnion } from "./KeyFromUnion";
|
|
2
|
+
import type { Primitive } from "./Primitive";
|
|
2
3
|
|
|
3
4
|
export type CombineUnion<U> = [0] extends [1 & U]
|
|
4
5
|
? any
|
|
5
6
|
: [U] extends [Function | readonly Function[]]
|
|
6
7
|
? undefined
|
|
7
|
-
: [U] extends
|
|
8
|
+
: [U] extends [Primitive]
|
|
8
9
|
? U
|
|
9
|
-
:
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
: [U] extends readonly [Array<any>]
|
|
11
|
+
? U
|
|
12
|
+
: {
|
|
13
|
+
[K in KeyFromUnion<U>]: Continue<Combine<U, K>>;
|
|
14
|
+
};
|
|
12
15
|
|
|
13
16
|
type Combine<U, K extends string | number | symbol> = Exclude<
|
|
14
17
|
Extract<U, { [k in K]?: any }>[K],
|
package/lib/types/KeyFiltered.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { SELF } from "../constants/SELF";
|
|
2
2
|
|
|
3
3
|
import type { Key } from "./Key";
|
|
4
|
-
import type { Primitive } from "./Primitive";
|
|
5
4
|
|
|
6
5
|
type SymbolSelf = typeof SELF;
|
|
7
6
|
|
|
@@ -10,22 +9,12 @@ type SymbolSelf = typeof SELF;
|
|
|
10
9
|
*/
|
|
11
10
|
export type KeyFiltered<T, P> = [0] extends [1 & T]
|
|
12
11
|
? Key | SymbolSelf
|
|
13
|
-
: T extends
|
|
14
|
-
? T extends
|
|
15
|
-
?
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
: T extends string | number | boolean | bigint | symbol
|
|
13
|
+
? T extends P
|
|
14
|
+
? SymbolSelf
|
|
15
|
+
: never
|
|
16
|
+
: T extends object
|
|
17
|
+
? keyof {
|
|
19
18
|
[K in keyof T as Extract<T[K], P> extends never ? never : K]-?: T[K];
|
|
20
19
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
type MapPrimitive<P> = P extends String
|
|
24
|
-
? string
|
|
25
|
-
: P extends Number
|
|
26
|
-
? number
|
|
27
|
-
: P extends Boolean
|
|
28
|
-
? boolean
|
|
29
|
-
: P extends BigInt
|
|
30
|
-
? bigint
|
|
31
|
-
: never;
|
|
20
|
+
: never;
|
package/lib/types/Path.ts
CHANGED
|
@@ -6,12 +6,12 @@ export type Path<T, D = 7> = [0] extends [1 & T]
|
|
|
6
6
|
? readonly (Key | never)[]
|
|
7
7
|
: D extends -1
|
|
8
8
|
? never
|
|
9
|
-
: T extends
|
|
10
|
-
? readonly [
|
|
11
|
-
: T extends
|
|
12
|
-
?
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
: T extends Primitive
|
|
10
|
+
? readonly never[]
|
|
11
|
+
: T extends Array<infer P>
|
|
12
|
+
? readonly [number] | readonly [number, ...Path<P, Increment<D>>]
|
|
13
|
+
: T extends object
|
|
14
|
+
? {
|
|
15
15
|
[K in keyof T]: [K] | [K, ...Path<T[K], Increment<D>>];
|
|
16
16
|
}[keyof T]
|
|
17
|
-
|
|
17
|
+
: never;
|
|
@@ -5,14 +5,16 @@ export type PathFiltered<T, P, D = 7> = [0] extends [1 & T]
|
|
|
5
5
|
? readonly (Key | never)[]
|
|
6
6
|
: D extends -1
|
|
7
7
|
? never
|
|
8
|
-
: T extends
|
|
9
|
-
?
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
:
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
: T extends P
|
|
9
|
+
? readonly never[]
|
|
10
|
+
: T extends ReadonlyArray<infer I>
|
|
11
|
+
? Extract<I, P> extends never
|
|
12
|
+
? readonly [number, ...PathFiltered<I, P, Increment<D>>]
|
|
13
|
+
: readonly [number]
|
|
14
|
+
: T extends object
|
|
15
|
+
? {
|
|
16
|
+
[K in keyof T]: Extract<T[K], P> extends never
|
|
17
|
+
? readonly [K, ...PathFiltered<T[K], P, Increment<D>>]
|
|
18
|
+
: readonly [K];
|
|
19
|
+
}[keyof T]
|
|
20
|
+
: never;
|
package/lib/types/Primitive.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export type Primitive =
|
|
1
|
+
export type Primitive = string | number | boolean | bigint | symbol;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type PrimitiveObject = String | Number | Boolean | BigInt | Symbol;
|
package/lib/types.ts
CHANGED
|
@@ -43,6 +43,7 @@ export type { Parameters } from "./types/Parameters";
|
|
|
43
43
|
export type { Path } from "./types/Path";
|
|
44
44
|
export type { PathFiltered } from "./types/PathFiltered";
|
|
45
45
|
export type { Primitive } from "./types/Primitive";
|
|
46
|
+
export type { PrimitiveObject } from "./types/PrimitiveObject";
|
|
46
47
|
export type { Query } from "./types/Query";
|
|
47
48
|
export type { QueryAggregate } from "./types/QueryAggregate";
|
|
48
49
|
export type { QueryCreate } from "./types/QueryCreate";
|
package/package.json
CHANGED
package/doc/type-aliases/Any.md
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
[**quetch**](../README.md) • **Docs**
|
|
2
|
-
|
|
3
|
-
***
|
|
4
|
-
|
|
5
|
-
[quetch](../README.md) / Any
|
|
6
|
-
|
|
7
|
-
# Type Alias: Any
|
|
8
|
-
|
|
9
|
-
> **Any**: `boolean` \| `string` \| `number` \| `object` \| `symbol` \| `null` \| `undefined` \| `any`[] \| (...`args`) => `any`
|
|
10
|
-
|
|
11
|
-
## Defined in
|
|
12
|
-
|
|
13
|
-
[lib/types/Any.ts:1](https://github.com/nevoland/quetch/blob/4c3c4d08a348f3317d0dfdffa7516132c18306c7/lib/types/Any.ts#L1)
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
[**quetch**](../README.md) • **Docs**
|
|
2
|
-
|
|
3
|
-
***
|
|
4
|
-
|
|
5
|
-
[quetch](../README.md) / Mutable
|
|
6
|
-
|
|
7
|
-
# Type Alias: Mutable\<T\>
|
|
8
|
-
|
|
9
|
-
> **Mutable**\<`T`\>: `{ -readonly [K in keyof T]: T[K] }`
|
|
10
|
-
|
|
11
|
-
## Type Parameters
|
|
12
|
-
|
|
13
|
-
• **T** *extends* `object`
|
|
14
|
-
|
|
15
|
-
## Defined in
|
|
16
|
-
|
|
17
|
-
[lib/types/Mutable.ts:1](https://github.com/nevoland/quetch/blob/4c3c4d08a348f3317d0dfdffa7516132c18306c7/lib/types/Mutable.ts#L1)
|