@strapi/strapi 4.14.0-alpha.0 → 4.14.0-beta.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.
|
@@ -2,9 +2,12 @@ import type { Attribute, Common, Utils } from '@strapi/strapi';
|
|
|
2
2
|
|
|
3
3
|
import type * as Operator from './operators';
|
|
4
4
|
import type * as AttributeUtils from '../attributes';
|
|
5
|
+
import type Params from '../index';
|
|
5
6
|
|
|
6
7
|
export { Operator };
|
|
7
8
|
|
|
9
|
+
type IDKey = 'id';
|
|
10
|
+
|
|
8
11
|
/**
|
|
9
12
|
* Filter representation for nested attributes
|
|
10
13
|
*/
|
|
@@ -20,11 +23,17 @@ type NestedAttributeCondition<
|
|
|
20
23
|
*/
|
|
21
24
|
type AttributeCondition<
|
|
22
25
|
TSchemaUID extends Common.UID.Schema,
|
|
23
|
-
TAttributeName extends Attribute.GetKeys<TSchemaUID>
|
|
24
|
-
> = Utils.Expression.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
TAttributeName extends IDKey | Attribute.GetKeys<TSchemaUID>
|
|
27
|
+
> = Utils.Expression.MatchFirst<
|
|
28
|
+
[
|
|
29
|
+
// Special catch for manually added ID attributes
|
|
30
|
+
[Utils.Expression.StrictEqual<TAttributeName, IDKey>, Params.Attribute.ID],
|
|
31
|
+
[
|
|
32
|
+
Utils.Expression.IsNotNever<TAttributeName>,
|
|
33
|
+
// Get the filter attribute value for the given attribute
|
|
34
|
+
AttributeUtils.GetValue<Attribute.Get<TSchemaUID, Exclude<TAttributeName, IDKey>>>
|
|
35
|
+
]
|
|
36
|
+
],
|
|
28
37
|
// Fallback to the list of all possible scalar attributes' value if the attribute is not valid (never)
|
|
29
38
|
AttributeUtils.ScalarValues
|
|
30
39
|
> extends infer TAttributeValue
|
|
@@ -64,11 +73,17 @@ export type ObjectNotation<TSchemaUID extends Common.UID.Schema> = {
|
|
|
64
73
|
Utils.Expression.IsNotNever<TNestedKeys>
|
|
65
74
|
>,
|
|
66
75
|
// Strongly typed representation of the filter object tree
|
|
67
|
-
|
|
68
|
-
|
|
76
|
+
{
|
|
77
|
+
[TIter in IDKey | TScalarKeys]?: AttributeCondition<TSchemaUID, TIter>;
|
|
78
|
+
} & {
|
|
79
|
+
[TIter in TNestedKeys]?: NestedAttributeCondition<TSchemaUID, TIter>;
|
|
80
|
+
},
|
|
69
81
|
// Generic representation of the filter object tree in case we don't have access to the attributes' list
|
|
70
|
-
|
|
71
|
-
|
|
82
|
+
{
|
|
83
|
+
[TKey in string]?:
|
|
84
|
+
| AttributeCondition<TSchemaUID, never>
|
|
85
|
+
| NestedAttributeCondition<TSchemaUID, never>;
|
|
86
|
+
}
|
|
72
87
|
>
|
|
73
88
|
: never);
|
|
74
89
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Database } from '@strapi/database';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Common, EntityService, Shared } from '@strapi/strapi';
|
|
3
3
|
|
|
4
4
|
// TODO move custom fields types to a separate file
|
|
5
5
|
interface CustomFieldServerOptions {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/strapi",
|
|
3
|
-
"version": "4.14.0-
|
|
3
|
+
"version": "4.14.0-beta.0",
|
|
4
4
|
"description": "An open source headless CMS solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier. Databases supported: MySQL, MariaDB, PostgreSQL, SQLite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"strapi",
|
|
@@ -81,19 +81,19 @@
|
|
|
81
81
|
"dependencies": {
|
|
82
82
|
"@koa/cors": "3.4.3",
|
|
83
83
|
"@koa/router": "10.1.1",
|
|
84
|
-
"@strapi/admin": "4.14.0-
|
|
85
|
-
"@strapi/data-transfer": "4.14.0-
|
|
86
|
-
"@strapi/database": "4.14.0-
|
|
87
|
-
"@strapi/generate-new": "4.14.0-
|
|
88
|
-
"@strapi/generators": "4.14.0-
|
|
89
|
-
"@strapi/logger": "4.14.0-
|
|
90
|
-
"@strapi/permissions": "4.14.0-
|
|
91
|
-
"@strapi/plugin-content-manager": "4.14.0-
|
|
92
|
-
"@strapi/plugin-content-type-builder": "4.14.0-
|
|
93
|
-
"@strapi/plugin-email": "4.14.0-
|
|
94
|
-
"@strapi/plugin-upload": "4.14.0-
|
|
95
|
-
"@strapi/typescript-utils": "4.14.0-
|
|
96
|
-
"@strapi/utils": "4.14.0-
|
|
84
|
+
"@strapi/admin": "4.14.0-beta.0",
|
|
85
|
+
"@strapi/data-transfer": "4.14.0-beta.0",
|
|
86
|
+
"@strapi/database": "4.14.0-beta.0",
|
|
87
|
+
"@strapi/generate-new": "4.14.0-beta.0",
|
|
88
|
+
"@strapi/generators": "4.14.0-beta.0",
|
|
89
|
+
"@strapi/logger": "4.14.0-beta.0",
|
|
90
|
+
"@strapi/permissions": "4.14.0-beta.0",
|
|
91
|
+
"@strapi/plugin-content-manager": "4.14.0-beta.0",
|
|
92
|
+
"@strapi/plugin-content-type-builder": "4.14.0-beta.0",
|
|
93
|
+
"@strapi/plugin-email": "4.14.0-beta.0",
|
|
94
|
+
"@strapi/plugin-upload": "4.14.0-beta.0",
|
|
95
|
+
"@strapi/typescript-utils": "4.14.0-beta.0",
|
|
96
|
+
"@strapi/utils": "4.14.0-beta.0",
|
|
97
97
|
"@vitejs/plugin-react": "4.0.4",
|
|
98
98
|
"bcryptjs": "2.4.3",
|
|
99
99
|
"boxen": "5.1.2",
|
|
@@ -135,18 +135,18 @@
|
|
|
135
135
|
"resolve-cwd": "3.0.0",
|
|
136
136
|
"semver": "7.5.4",
|
|
137
137
|
"statuses": "2.0.1",
|
|
138
|
-
"typescript": "5.
|
|
138
|
+
"typescript": "5.2.2",
|
|
139
139
|
"vite": "4.4.9",
|
|
140
140
|
"yup": "0.32.9"
|
|
141
141
|
},
|
|
142
142
|
"devDependencies": {
|
|
143
143
|
"supertest": "6.3.3",
|
|
144
144
|
"ts-zen": "https://github.com/strapi/ts-zen#41af3f8c6422de048bf9976ae551566b2c2b590a",
|
|
145
|
-
"typescript": "5.
|
|
145
|
+
"typescript": "5.2.2"
|
|
146
146
|
},
|
|
147
147
|
"engines": {
|
|
148
148
|
"node": ">=16.0.0 <=20.x.x",
|
|
149
149
|
"npm": ">=6.0.0"
|
|
150
150
|
},
|
|
151
|
-
"gitHead": "
|
|
151
|
+
"gitHead": "8145855e7ada0bf94ce1a2f4d1c34fe647e1af53"
|
|
152
152
|
}
|