quetch 0.33.2 → 0.34.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/tools/defineCustomFetch.d.ts +2 -2
- package/dist/tools/defineCustomFetch.js.map +1 -1
- package/dist/tools/defineGenericFetch.d.ts +2 -2
- package/dist/tools/defineGenericFetch.js.map +1 -1
- package/dist/types/FieldKey.d.ts +1 -2
- package/dist/types/KeyFiltered.d.ts +1 -2
- package/dist/types/Path.d.ts +1 -2
- package/dist/types/PathFiltered.d.ts +1 -2
- package/dist/types.d.ts +0 -1
- package/doc/README.md +0 -1
- package/doc/classes/RequestError.md +5 -5
- package/doc/functions/aggregate.md +1 -1
- package/doc/functions/branch.md +1 -1
- package/doc/functions/cache.md +1 -1
- package/doc/functions/combine.md +1 -1
- package/doc/functions/comparatorFieldValues.md +1 -1
- package/doc/functions/cork.md +1 -1
- package/doc/functions/defineCheckQuery.md +1 -1
- package/doc/functions/defineCustomFetch.md +1 -1
- package/doc/functions/defineGenericFetch.md +1 -1
- package/doc/functions/escapeRegex.md +1 -1
- package/doc/functions/fetchExternal.md +1 -1
- package/doc/functions/fetchLocal.md +1 -1
- package/doc/functions/fieldListFromFilter.md +1 -1
- package/doc/functions/fieldListUnion.md +1 -1
- package/doc/functions/filterChildren.md +1 -1
- package/doc/functions/filterFromValue.md +1 -1
- package/doc/functions/get.md +1 -1
- package/doc/functions/groupFilters.md +1 -1
- package/doc/functions/identity.md +1 -1
- package/doc/functions/intrinsicFilter.md +1 -1
- package/doc/functions/isFilterGroup.md +1 -1
- package/doc/functions/log.md +1 -1
- package/doc/functions/normalizeOrder.md +1 -1
- package/doc/functions/queryItemList.md +1 -1
- package/doc/functions/querySettings.md +1 -1
- package/doc/functions/retry.md +1 -1
- package/doc/functions/reverseOrder.md +1 -1
- package/doc/functions/sameField.md +1 -1
- package/doc/functions/sortItemList.md +1 -1
- package/doc/functions/splitPath.md +2 -2
- package/doc/functions/testFilter.md +1 -1
- package/doc/functions/transformerFilterChildren.md +1 -1
- package/doc/interfaces/CustomFetch.md +1 -1
- package/doc/type-aliases/AggregateFunction.md +1 -1
- package/doc/type-aliases/AggregateFunctionOperator.md +1 -1
- package/doc/type-aliases/CombineUnion.md +1 -1
- package/doc/type-aliases/Context.md +1 -1
- package/doc/type-aliases/CustomFieldAggregateMap.md +1 -1
- package/doc/type-aliases/CustomFieldMap.md +1 -1
- package/doc/type-aliases/Decrement.md +1 -1
- package/doc/type-aliases/DepthLimit.md +1 -1
- package/doc/type-aliases/Field.md +1 -1
- package/doc/type-aliases/FieldFiltered.md +1 -1
- package/doc/type-aliases/FieldFunction.md +1 -1
- package/doc/type-aliases/FieldFunctionCustom.md +1 -1
- package/doc/type-aliases/FieldFunctionFormatDate.md +1 -1
- package/doc/type-aliases/FieldFunctionReturn.md +1 -1
- package/doc/type-aliases/FieldKey.md +2 -2
- package/doc/type-aliases/FieldMap.md +1 -1
- package/doc/type-aliases/Filter.md +1 -1
- package/doc/type-aliases/FilterArray.md +1 -1
- package/doc/type-aliases/FilterBoolean.md +1 -1
- package/doc/type-aliases/FilterChildren.md +1 -1
- package/doc/type-aliases/FilterCustom.md +1 -1
- package/doc/type-aliases/FilterField.md +1 -1
- package/doc/type-aliases/FilterGroup.md +1 -1
- package/doc/type-aliases/FilterNumber.md +1 -1
- package/doc/type-aliases/FilterOperator.md +1 -1
- package/doc/type-aliases/FilterString.md +1 -1
- package/doc/type-aliases/FilterStringIntersect.md +1 -1
- package/doc/type-aliases/FilterStringMatch.md +1 -1
- package/doc/type-aliases/FilterWithField.md +1 -1
- package/doc/type-aliases/Get.md +1 -1
- package/doc/type-aliases/Group.md +1 -1
- package/doc/type-aliases/Handler.md +1 -1
- package/doc/type-aliases/Immutable.md +1 -1
- package/doc/type-aliases/InjectCustomFields.md +1 -1
- package/doc/type-aliases/IntersectUnion.md +1 -1
- package/doc/type-aliases/IntrinsicFilter.md +1 -1
- package/doc/type-aliases/Item.md +1 -1
- package/doc/type-aliases/Join.md +1 -1
- package/doc/type-aliases/KeyFiltered.md +2 -2
- package/doc/type-aliases/KeyFromUnion.md +1 -1
- package/doc/type-aliases/Locale.md +1 -1
- package/doc/type-aliases/NextHandler.md +1 -1
- package/doc/type-aliases/NormalizedPathFieldSettings.md +1 -1
- package/doc/type-aliases/Order.md +1 -1
- package/doc/type-aliases/OrderNormalized.md +1 -1
- package/doc/type-aliases/Parameters.md +1 -1
- package/doc/type-aliases/Path.md +2 -2
- package/doc/type-aliases/PathFiltered.md +2 -2
- package/doc/type-aliases/Prettify.md +1 -1
- package/doc/type-aliases/Primitive.md +1 -1
- package/doc/type-aliases/PrimitiveObject.md +1 -1
- package/doc/type-aliases/Query.md +1 -1
- package/doc/type-aliases/QueryAggregate.md +1 -1
- package/doc/type-aliases/QueryCreate.md +1 -1
- package/doc/type-aliases/QueryCreateMultiple.md +1 -1
- package/doc/type-aliases/QueryDelete.md +1 -1
- package/doc/type-aliases/QueryDeleteMultiple.md +1 -1
- package/doc/type-aliases/QueryMethod.md +1 -1
- package/doc/type-aliases/QueryRead.md +1 -1
- package/doc/type-aliases/QueryReadMultiple.md +1 -1
- package/doc/type-aliases/QuerySettings.md +1 -1
- package/doc/type-aliases/QueryUpdate.md +1 -1
- package/doc/type-aliases/QueryUpdateMultiple.md +1 -1
- package/doc/type-aliases/Result.md +1 -1
- package/doc/type-aliases/Store.md +1 -1
- package/doc/type-aliases/Value.md +1 -1
- package/doc/type-aliases/ValueMap.md +1 -1
- package/doc/variables/CACHE.md +1 -1
- package/doc/variables/COLLATOR_DEFAULT.md +1 -1
- package/doc/variables/FILTER_ANY.md +1 -1
- package/doc/variables/FILTER_NONE.md +1 -1
- package/doc/variables/SELF.md +1 -1
- package/lib/tools/defineCustomFetch.ts +7 -2
- package/lib/tools/defineGenericFetch.ts +7 -2
- package/lib/types/FieldKey.ts +1 -2
- package/lib/types/KeyFiltered.ts +2 -4
- package/lib/types/Path.ts +2 -3
- package/lib/types/PathFiltered.ts +2 -3
- package/lib/types.ts +0 -1
- package/package.json +1 -1
- package/dist/types/Key.d.ts +0 -1
- package/dist/types/Key.js +0 -1
- package/dist/types/Key.js.map +0 -1
- package/doc/type-aliases/Key.md +0 -13
- package/lib/types/Key.ts +0 -1
|
@@ -26,4 +26,4 @@ Checks if a given number field matches a given number value according to a given
|
|
|
26
26
|
|
|
27
27
|
## Defined in
|
|
28
28
|
|
|
29
|
-
[lib/types/FilterNumber.ts:7](https://github.com/nevoland/quetch/blob/
|
|
29
|
+
[lib/types/FilterNumber.ts:7](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/FilterNumber.ts#L7)
|
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
|
|
11
11
|
## Defined in
|
|
12
12
|
|
|
13
|
-
[lib/types/FilterOperator.ts:3](https://github.com/nevoland/quetch/blob/
|
|
13
|
+
[lib/types/FilterOperator.ts:3](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/FilterOperator.ts#L3)
|
|
@@ -34,4 +34,4 @@ Checks if a given string field matches a given string value according to a given
|
|
|
34
34
|
|
|
35
35
|
## Defined in
|
|
36
36
|
|
|
37
|
-
[lib/types/FilterString.ts:8](https://github.com/nevoland/quetch/blob/
|
|
37
|
+
[lib/types/FilterString.ts:8](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/FilterString.ts#L8)
|
|
@@ -34,4 +34,4 @@ Checks if a given string field has any of the provided values.
|
|
|
34
34
|
|
|
35
35
|
## Defined in
|
|
36
36
|
|
|
37
|
-
[lib/types/FilterStringIntersect.ts:8](https://github.com/nevoland/quetch/blob/
|
|
37
|
+
[lib/types/FilterStringIntersect.ts:8](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/FilterStringIntersect.ts#L8)
|
|
@@ -50,4 +50,4 @@ Ignore casing differences if `true`.
|
|
|
50
50
|
|
|
51
51
|
## Defined in
|
|
52
52
|
|
|
53
|
-
[lib/types/FilterStringMatch.ts:9](https://github.com/nevoland/quetch/blob/
|
|
53
|
+
[lib/types/FilterStringMatch.ts:9](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/FilterStringMatch.ts#L9)
|
|
@@ -16,4 +16,4 @@ A filter that includes a field.
|
|
|
16
16
|
|
|
17
17
|
## Defined in
|
|
18
18
|
|
|
19
|
-
[lib/types/FilterWithField.ts:6](https://github.com/nevoland/quetch/blob/
|
|
19
|
+
[lib/types/FilterWithField.ts:6](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/FilterWithField.ts#L6)
|
package/doc/type-aliases/Get.md
CHANGED
|
@@ -20,4 +20,4 @@ Returns the type of the property at the specified `P` path.
|
|
|
20
20
|
|
|
21
21
|
## Defined in
|
|
22
22
|
|
|
23
|
-
[lib/types/Get.ts:8](https://github.com/nevoland/quetch/blob/
|
|
23
|
+
[lib/types/Get.ts:8](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/Get.ts#L8)
|
|
@@ -16,4 +16,4 @@ Specifies how items should be grouped.
|
|
|
16
16
|
|
|
17
17
|
## Defined in
|
|
18
18
|
|
|
19
|
-
[lib/types/Group.ts:4](https://github.com/nevoland/quetch/blob/
|
|
19
|
+
[lib/types/Group.ts:4](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/Group.ts#L4)
|
|
@@ -36,4 +36,4 @@ Handles an `input` query and returns an `output` promise, eventually using the `
|
|
|
36
36
|
|
|
37
37
|
## Defined in
|
|
38
38
|
|
|
39
|
-
[lib/types/Handler.ts:6](https://github.com/nevoland/quetch/blob/
|
|
39
|
+
[lib/types/Handler.ts:6](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/Handler.ts#L6)
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
|
|
15
15
|
## Defined in
|
|
16
16
|
|
|
17
|
-
[lib/types/Immutable.ts:1](https://github.com/nevoland/quetch/blob/
|
|
17
|
+
[lib/types/Immutable.ts:1](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/Immutable.ts#L1)
|
|
@@ -18,4 +18,4 @@ Injects the custom fields into the entity type.
|
|
|
18
18
|
|
|
19
19
|
## Defined in
|
|
20
20
|
|
|
21
|
-
[lib/types/InjectCustomFields.ts:8](https://github.com/nevoland/quetch/blob/
|
|
21
|
+
[lib/types/InjectCustomFields.ts:8](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/InjectCustomFields.ts#L8)
|
|
@@ -16,4 +16,4 @@ Converts a union type to an intersection type.
|
|
|
16
16
|
|
|
17
17
|
## Defined in
|
|
18
18
|
|
|
19
|
-
[lib/types/IntersectUnion.ts:4](https://github.com/nevoland/quetch/blob/
|
|
19
|
+
[lib/types/IntersectUnion.ts:4](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/IntersectUnion.ts#L4)
|
|
@@ -16,4 +16,4 @@ Filter that does not rely on query settings, and thus can be evaluated directly
|
|
|
16
16
|
|
|
17
17
|
## Defined in
|
|
18
18
|
|
|
19
|
-
[lib/types/IntrinsicFilter.ts:6](https://github.com/nevoland/quetch/blob/
|
|
19
|
+
[lib/types/IntrinsicFilter.ts:6](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/IntrinsicFilter.ts#L6)
|
package/doc/type-aliases/Item.md
CHANGED
|
@@ -18,4 +18,4 @@ Returns the inferred item type of an array, or an alternative type if it is some
|
|
|
18
18
|
|
|
19
19
|
## Defined in
|
|
20
20
|
|
|
21
|
-
[lib/types/Item.ts:4](https://github.com/nevoland/quetch/blob/
|
|
21
|
+
[lib/types/Item.ts:4](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/Item.ts#L4)
|
package/doc/type-aliases/Join.md
CHANGED
|
@@ -16,4 +16,4 @@
|
|
|
16
16
|
|
|
17
17
|
## Defined in
|
|
18
18
|
|
|
19
|
-
[lib/types/Join.ts:1](https://github.com/nevoland/quetch/blob/
|
|
19
|
+
[lib/types/Join.ts:1](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/Join.ts#L1)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Type Alias: KeyFiltered\<T, P\>
|
|
8
8
|
|
|
9
|
-
> **KeyFiltered**\<`T`, `P`\>: [`unknown`] *extends* [`T`] ?
|
|
9
|
+
> **KeyFiltered**\<`T`, `P`\>: [`unknown`] *extends* [`T`] ? `PropertyKey` \| `SymbolSelf` : [`0`] *extends* [`1` & `T`] ? `PropertyKey` \| `SymbolSelf` : `T` *extends* `string` \| `number` \| `boolean` \| `bigint` \| `symbol` ? `T` *extends* `P` ? `SymbolSelf` : `never` : `T` *extends* `object` ? keyof `{ [K in keyof T as Extract<T[K], P> extends never ? never : K]-?: T[K] }` : `never`
|
|
10
10
|
|
|
11
11
|
Returns union of keys whose mapped value extend the provided `P` type.
|
|
12
12
|
|
|
@@ -18,4 +18,4 @@ Returns union of keys whose mapped value extend the provided `P` type.
|
|
|
18
18
|
|
|
19
19
|
## Defined in
|
|
20
20
|
|
|
21
|
-
[lib/types/KeyFiltered.ts:
|
|
21
|
+
[lib/types/KeyFiltered.ts:8](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/KeyFiltered.ts#L8)
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
|
|
15
15
|
## Defined in
|
|
16
16
|
|
|
17
|
-
[lib/types/KeyFromUnion.ts:1](https://github.com/nevoland/quetch/blob/
|
|
17
|
+
[lib/types/KeyFromUnion.ts:1](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/KeyFromUnion.ts#L1)
|
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
|
|
11
11
|
## Defined in
|
|
12
12
|
|
|
13
|
-
[lib/types/Locale.ts:1](https://github.com/nevoland/quetch/blob/
|
|
13
|
+
[lib/types/Locale.ts:1](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/Locale.ts#L1)
|
|
@@ -28,4 +28,4 @@ Handles an `input` query and returns an `output` promise.
|
|
|
28
28
|
|
|
29
29
|
## Defined in
|
|
30
30
|
|
|
31
|
-
[lib/types/NextHandler.ts:4](https://github.com/nevoland/quetch/blob/
|
|
31
|
+
[lib/types/NextHandler.ts:4](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/NextHandler.ts#L4)
|
|
@@ -60,4 +60,4 @@ String used to escape the separator.
|
|
|
60
60
|
|
|
61
61
|
## Defined in
|
|
62
62
|
|
|
63
|
-
[lib/types/NormalizedPathFieldSettings.ts:6](https://github.com/nevoland/quetch/blob/
|
|
63
|
+
[lib/types/NormalizedPathFieldSettings.ts:6](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/NormalizedPathFieldSettings.ts#L6)
|
|
@@ -16,4 +16,4 @@ Order item.
|
|
|
16
16
|
|
|
17
17
|
## Defined in
|
|
18
18
|
|
|
19
|
-
[lib/types/Order.ts:6](https://github.com/nevoland/quetch/blob/
|
|
19
|
+
[lib/types/Order.ts:6](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/Order.ts#L6)
|
|
@@ -24,4 +24,4 @@
|
|
|
24
24
|
|
|
25
25
|
## Defined in
|
|
26
26
|
|
|
27
|
-
[lib/types/OrderNormalized.ts:3](https://github.com/nevoland/quetch/blob/
|
|
27
|
+
[lib/types/OrderNormalized.ts:3](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/OrderNormalized.ts#L3)
|
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
|
|
11
11
|
## Defined in
|
|
12
12
|
|
|
13
|
-
[lib/types/Parameters.ts:1](https://github.com/nevoland/quetch/blob/
|
|
13
|
+
[lib/types/Parameters.ts:1](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/Parameters.ts#L1)
|
package/doc/type-aliases/Path.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Type Alias: Path\<T, D\>
|
|
8
8
|
|
|
9
|
-
> **Path**\<`T`, `D`\>: [`unknown`] *extends* [`T`] ? readonly (
|
|
9
|
+
> **Path**\<`T`, `D`\>: [`unknown`] *extends* [`T`] ? readonly (`PropertyKey` \| `never`)[] : [`0`] *extends* [`1` & `T`] ? readonly (`PropertyKey` \| `never`)[] : `D` *extends* `-1` ? `never` : `T` *extends* [`Primitive`](Primitive.md) \| `undefined` ? readonly `never`[] : `T` *extends* infer P[] ? readonly [`number`] \| readonly [`number`, `...Path<P, Decrement<(...)>>`] : `T` *extends* `object` ? \{ \[K in keyof T\]: readonly \[(...)\] \| readonly \[(...), (...)\] \}\[keyof `T`\] : `never`
|
|
10
10
|
|
|
11
11
|
Returns the type of paths that can be used to select fields from a value of type `T`, with an optional depth limit `D`.
|
|
12
12
|
|
|
@@ -18,4 +18,4 @@ Returns the type of paths that can be used to select fields from a value of type
|
|
|
18
18
|
|
|
19
19
|
## Defined in
|
|
20
20
|
|
|
21
|
-
[lib/types/Path.ts:
|
|
21
|
+
[lib/types/Path.ts:8](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/Path.ts#L8)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Type Alias: PathFiltered\<T, P, D\>
|
|
8
8
|
|
|
9
|
-
> **PathFiltered**\<`T`, `P`, `D`\>: [`unknown`] *extends* [`T`] ? readonly (
|
|
9
|
+
> **PathFiltered**\<`T`, `P`, `D`\>: [`unknown`] *extends* [`T`] ? readonly (`PropertyKey` \| `never`)[] : [`0`] *extends* [`1` & `T`] ? readonly (`PropertyKey` \| `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, Decrement<(...)>>`] : readonly [`number`] : `T` *extends* `object` ? `{ [K in keyof T]: Extract<(...)[(...)], P> extends never ? readonly [(...), (...)] : readonly [(...)] }`\[keyof `T`\] : `never`
|
|
10
10
|
|
|
11
11
|
Returns the type of paths that can be used to select fields from a value of type `T` whose mapped value extend the provided `P` type, with an optional depth limit `D`.
|
|
12
12
|
|
|
@@ -20,4 +20,4 @@ Returns the type of paths that can be used to select fields from a value of type
|
|
|
20
20
|
|
|
21
21
|
## Defined in
|
|
22
22
|
|
|
23
|
-
[lib/types/PathFiltered.ts:
|
|
23
|
+
[lib/types/PathFiltered.ts:7](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/PathFiltered.ts#L7)
|
|
@@ -16,4 +16,4 @@ Prettifies a type by recursively removing any intersections or unions.
|
|
|
16
16
|
|
|
17
17
|
## Defined in
|
|
18
18
|
|
|
19
|
-
[lib/types/Prettify.ts:4](https://github.com/nevoland/quetch/blob/
|
|
19
|
+
[lib/types/Prettify.ts:4](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/Prettify.ts#L4)
|
|
@@ -12,4 +12,4 @@ Defined primitive types.
|
|
|
12
12
|
|
|
13
13
|
## Defined in
|
|
14
14
|
|
|
15
|
-
[lib/types/Primitive.ts:4](https://github.com/nevoland/quetch/blob/
|
|
15
|
+
[lib/types/Primitive.ts:4](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/Primitive.ts#L4)
|
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
|
|
11
11
|
## Defined in
|
|
12
12
|
|
|
13
|
-
[lib/types/PrimitiveObject.ts:1](https://github.com/nevoland/quetch/blob/
|
|
13
|
+
[lib/types/PrimitiveObject.ts:1](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/PrimitiveObject.ts#L1)
|
|
@@ -16,4 +16,4 @@ Query that fetches or mutates an entity.
|
|
|
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/852e493056419119d071edc6f41975a9efd727e3/lib/types/Query.ts#L14)
|
|
@@ -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/852e493056419119d071edc6f41975a9efd727e3/lib/types/QueryAggregate.ts#L11)
|
|
@@ -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/852e493056419119d071edc6f41975a9efd727e3/lib/types/QueryCreate.ts#L8)
|
|
@@ -48,4 +48,4 @@ Query settings.
|
|
|
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/852e493056419119d071edc6f41975a9efd727e3/lib/types/QueryCreateMultiple.ts#L8)
|
|
@@ -60,4 +60,4 @@ Query settings.
|
|
|
60
60
|
|
|
61
61
|
## Defined in
|
|
62
62
|
|
|
63
|
-
[lib/types/QueryDelete.ts:9](https://github.com/nevoland/quetch/blob/
|
|
63
|
+
[lib/types/QueryDelete.ts:9](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/QueryDelete.ts#L9)
|
|
@@ -62,4 +62,4 @@ Query settings.
|
|
|
62
62
|
|
|
63
63
|
## Defined in
|
|
64
64
|
|
|
65
|
-
[lib/types/QueryDeleteMultiple.ts:9](https://github.com/nevoland/quetch/blob/
|
|
65
|
+
[lib/types/QueryDeleteMultiple.ts:9](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/QueryDeleteMultiple.ts#L9)
|
|
@@ -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/852e493056419119d071edc6f41975a9efd727e3/lib/types/QueryMethod.ts#L6)
|
|
@@ -76,4 +76,4 @@ Query settings.
|
|
|
76
76
|
|
|
77
77
|
## Defined in
|
|
78
78
|
|
|
79
|
-
[lib/types/QueryRead.ts:11](https://github.com/nevoland/quetch/blob/
|
|
79
|
+
[lib/types/QueryRead.ts:11](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/QueryRead.ts#L11)
|
|
@@ -80,4 +80,4 @@ Query settings.
|
|
|
80
80
|
|
|
81
81
|
## Defined in
|
|
82
82
|
|
|
83
|
-
[lib/types/QueryReadMultiple.ts:12](https://github.com/nevoland/quetch/blob/
|
|
83
|
+
[lib/types/QueryReadMultiple.ts:12](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/QueryReadMultiple.ts#L12)
|
|
@@ -92,4 +92,4 @@ The second value to compare.
|
|
|
92
92
|
|
|
93
93
|
## Defined in
|
|
94
94
|
|
|
95
|
-
[lib/types/QuerySettings.ts:8](https://github.com/nevoland/quetch/blob/
|
|
95
|
+
[lib/types/QuerySettings.ts:8](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/QuerySettings.ts#L8)
|
|
@@ -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/852e493056419119d071edc6f41975a9efd727e3/lib/types/QueryUpdate.ts#L9)
|
|
@@ -74,4 +74,4 @@ Partial property values to update.
|
|
|
74
74
|
|
|
75
75
|
## Defined in
|
|
76
76
|
|
|
77
|
-
[lib/types/QueryUpdateMultiple.ts:10](https://github.com/nevoland/quetch/blob/
|
|
77
|
+
[lib/types/QueryUpdateMultiple.ts:10](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/QueryUpdateMultiple.ts#L10)
|
|
@@ -18,4 +18,4 @@ Result of a read and aggregate query.
|
|
|
18
18
|
|
|
19
19
|
## Defined in
|
|
20
20
|
|
|
21
|
-
[lib/types/Result.ts:66](https://github.com/nevoland/quetch/blob/
|
|
21
|
+
[lib/types/Result.ts:66](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/Result.ts#L66)
|
|
@@ -68,4 +68,4 @@
|
|
|
68
68
|
|
|
69
69
|
## Defined in
|
|
70
70
|
|
|
71
|
-
[lib/types/Store.ts:2](https://github.com/nevoland/quetch/blob/
|
|
71
|
+
[lib/types/Store.ts:2](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/Store.ts#L2)
|
|
@@ -36,4 +36,4 @@ Path leading to the value.
|
|
|
36
36
|
|
|
37
37
|
## Defined in
|
|
38
38
|
|
|
39
|
-
[lib/types/Value.ts:6](https://github.com/nevoland/quetch/blob/
|
|
39
|
+
[lib/types/Value.ts:6](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/Value.ts#L6)
|
|
@@ -18,4 +18,4 @@ Maps the properties of the provided value `T` to a specific value `V`.
|
|
|
18
18
|
|
|
19
19
|
## Defined in
|
|
20
20
|
|
|
21
|
-
[lib/types/ValueMap.ts:6](https://github.com/nevoland/quetch/blob/
|
|
21
|
+
[lib/types/ValueMap.ts:6](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/types/ValueMap.ts#L6)
|
package/doc/variables/CACHE.md
CHANGED
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
|
|
11
11
|
## Defined in
|
|
12
12
|
|
|
13
|
-
[lib/constants/CACHE.ts:1](https://github.com/nevoland/quetch/blob/
|
|
13
|
+
[lib/constants/CACHE.ts:1](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/constants/CACHE.ts#L1)
|
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
|
|
11
11
|
## Defined in
|
|
12
12
|
|
|
13
|
-
[lib/constants/COLLATOR\_DEFAULT.ts:1](https://github.com/nevoland/quetch/blob/
|
|
13
|
+
[lib/constants/COLLATOR\_DEFAULT.ts:1](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/constants/COLLATOR_DEFAULT.ts#L1)
|
|
@@ -16,4 +16,4 @@
|
|
|
16
16
|
|
|
17
17
|
## Defined in
|
|
18
18
|
|
|
19
|
-
[lib/constants/FILTER\_ANY.ts:1](https://github.com/nevoland/quetch/blob/
|
|
19
|
+
[lib/constants/FILTER\_ANY.ts:1](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/constants/FILTER_ANY.ts#L1)
|
|
@@ -16,4 +16,4 @@
|
|
|
16
16
|
|
|
17
17
|
## Defined in
|
|
18
18
|
|
|
19
|
-
[lib/constants/FILTER\_NONE.ts:1](https://github.com/nevoland/quetch/blob/
|
|
19
|
+
[lib/constants/FILTER\_NONE.ts:1](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/constants/FILTER_NONE.ts#L1)
|
package/doc/variables/SELF.md
CHANGED
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
|
|
11
11
|
## Defined in
|
|
12
12
|
|
|
13
|
-
[lib/constants/SELF.ts:1](https://github.com/nevoland/quetch/blob/
|
|
13
|
+
[lib/constants/SELF.ts:1](https://github.com/nevoland/quetch/blob/852e493056419119d071edc6f41975a9efd727e3/lib/constants/SELF.ts#L1)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Handler,
|
|
1
|
+
import type { Handler, Query, Result } from "../types";
|
|
2
2
|
|
|
3
3
|
import { cork } from "./cork.js";
|
|
4
4
|
|
|
@@ -9,7 +9,12 @@ import { cork } from "./cork.js";
|
|
|
9
9
|
* @returns A custom fetch function.
|
|
10
10
|
*/
|
|
11
11
|
export function defineCustomFetch<M extends Record<string, object>>(
|
|
12
|
-
handler: Handler<
|
|
12
|
+
handler: Handler<
|
|
13
|
+
Query<any> & { type: PropertyKey | any[] },
|
|
14
|
+
any,
|
|
15
|
+
never,
|
|
16
|
+
never
|
|
17
|
+
>,
|
|
13
18
|
) {
|
|
14
19
|
async function customFetch<
|
|
15
20
|
K extends keyof M,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Handler,
|
|
1
|
+
import type { Handler, Query, Result } from "../types";
|
|
2
2
|
|
|
3
3
|
import { cork } from "./cork.js";
|
|
4
4
|
|
|
@@ -12,7 +12,12 @@ import { cork } from "./cork.js";
|
|
|
12
12
|
* @returns A curried generic fetch function.
|
|
13
13
|
*/
|
|
14
14
|
export function defineGenericFetch<K extends string>(
|
|
15
|
-
handler: Handler<
|
|
15
|
+
handler: Handler<
|
|
16
|
+
Query<any> & { type: PropertyKey | any[] },
|
|
17
|
+
any,
|
|
18
|
+
never,
|
|
19
|
+
never
|
|
20
|
+
>,
|
|
16
21
|
) {
|
|
17
22
|
// FIXME: Until https://github.com/microsoft/TypeScript/issues/26242 gets resolved, the fetcher needs to be curried
|
|
18
23
|
function genericFetch<T>() {
|
package/lib/types/FieldKey.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { SELF } from "../constants/SELF.ts";
|
|
2
2
|
|
|
3
|
-
import type { Key } from "./Key.ts";
|
|
4
3
|
import type { Primitive } from "./Primitive";
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* Returns the type of keys that can be used to select fields from a value of type `T`.
|
|
8
7
|
*/
|
|
9
8
|
export type FieldKey<T> = [unknown] extends [T]
|
|
10
|
-
?
|
|
9
|
+
? PropertyKey
|
|
11
10
|
: T extends Primitive | undefined
|
|
12
11
|
? typeof SELF
|
|
13
12
|
: keyof T;
|
package/lib/types/KeyFiltered.ts
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import type { SELF } from "../constants/SELF";
|
|
2
2
|
|
|
3
|
-
import type { Key } from "./Key";
|
|
4
|
-
|
|
5
3
|
type SymbolSelf = typeof SELF;
|
|
6
4
|
|
|
7
5
|
/**
|
|
8
6
|
* Returns union of keys whose mapped value extend the provided `P` type.
|
|
9
7
|
*/
|
|
10
8
|
export type KeyFiltered<T, P> = [unknown] extends [T]
|
|
11
|
-
?
|
|
9
|
+
? PropertyKey | SymbolSelf
|
|
12
10
|
: [0] extends [1 & T]
|
|
13
|
-
?
|
|
11
|
+
? PropertyKey | SymbolSelf
|
|
14
12
|
: T extends string | number | boolean | bigint | symbol
|
|
15
13
|
? T extends P
|
|
16
14
|
? SymbolSelf
|
package/lib/types/Path.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import type { Decrement } from "./Decrement";
|
|
2
2
|
import type { DepthLimit } from "./DepthLimit";
|
|
3
|
-
import type { Key } from "./Key";
|
|
4
3
|
import type { Primitive } from "./Primitive";
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* Returns the type of paths that can be used to select fields from a value of type `T`, with an optional depth limit `D`.
|
|
8
7
|
*/
|
|
9
8
|
export type Path<T, D = DepthLimit> = [unknown] extends [T]
|
|
10
|
-
? readonly (
|
|
9
|
+
? readonly (PropertyKey | never)[]
|
|
11
10
|
: [0] extends [1 & T]
|
|
12
|
-
? readonly (
|
|
11
|
+
? readonly (PropertyKey | never)[]
|
|
13
12
|
: D extends -1
|
|
14
13
|
? never
|
|
15
14
|
: T extends Primitive | undefined
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import type { Decrement } from "./Decrement";
|
|
2
2
|
import type { DepthLimit } from "./DepthLimit";
|
|
3
|
-
import type { Key } from "./Key";
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* Returns the type of paths that can be used to select fields from a value of type `T` whose mapped value extend the provided `P` type, with an optional depth limit `D`.
|
|
7
6
|
*/
|
|
8
7
|
export type PathFiltered<T, P, D = DepthLimit> = [unknown] extends [T]
|
|
9
|
-
? readonly (
|
|
8
|
+
? readonly (PropertyKey | never)[]
|
|
10
9
|
: [0] extends [1 & T]
|
|
11
|
-
? readonly (
|
|
10
|
+
? readonly (PropertyKey | never)[]
|
|
12
11
|
: D extends -1
|
|
13
12
|
? never
|
|
14
13
|
: T extends P
|
package/lib/types.ts
CHANGED
|
@@ -38,7 +38,6 @@ export type { IntersectUnion } from "./types/IntersectUnion";
|
|
|
38
38
|
export type { IntrinsicFilter } from "./types/IntrinsicFilter";
|
|
39
39
|
export type { Item } from "./types/Item";
|
|
40
40
|
export type { Join } from "./types/Join";
|
|
41
|
-
export type { Key } from "./types/Key";
|
|
42
41
|
export type { KeyFiltered } from "./types/KeyFiltered";
|
|
43
42
|
export type { KeyFromUnion } from "./types/KeyFromUnion";
|
|
44
43
|
export type { Locale } from "./types/Locale";
|
package/package.json
CHANGED
package/dist/types/Key.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type Key = string | number | symbol;
|
package/dist/types/Key.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=Key.js.map
|
package/dist/types/Key.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Key.js","sourceRoot":"","sources":["../../lib/types/Key.ts"],"names":[],"mappings":""}
|
package/doc/type-aliases/Key.md
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
[**quetch**](../README.md)
|
|
2
|
-
|
|
3
|
-
***
|
|
4
|
-
|
|
5
|
-
[quetch](../README.md) / Key
|
|
6
|
-
|
|
7
|
-
# Type Alias: Key
|
|
8
|
-
|
|
9
|
-
> **Key**: `string` \| `number` \| `symbol`
|
|
10
|
-
|
|
11
|
-
## Defined in
|
|
12
|
-
|
|
13
|
-
[lib/types/Key.ts:1](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/types/Key.ts#L1)
|
package/lib/types/Key.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type Key = string | number | symbol;
|