@webbio/strapi-plugin-page-builder 0.9.0-platform → 0.9.2-platform

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.
Files changed (30) hide show
  1. package/admin/src/components/PlatformFilteredSelectField/Multi/index.tsx +1 -0
  2. package/admin/src/components/PlatformFilteredSelectField/hooks/useRelationLoad.tsx +4 -2
  3. package/admin/src/components/StrapiCore/admin/admin/src/content-manager/components/Relations/RelationInput.tsx +1 -2
  4. package/admin/src/components/StrapiCore/admin/admin/src/content-manager/components/Relations/useRelation.ts +170 -0
  5. package/admin/src/components/StrapiCore/admin/admin/src/content-manager/components/Relations/utils/getRelationLink.ts +5 -0
  6. package/admin/src/components/StrapiCore/admin/admin/src/content-manager/components/Relations/utils/normalizeRelations.ts +52 -0
  7. package/admin/src/components/StrapiCore/admin/admin/src/content-manager/hooks/useDragAndDrop.ts +2 -2
  8. package/admin/src/components/StrapiCore/admin/admin/src/content-manager/hooks/useKeyboardDragAndDrop.ts +69 -69
  9. package/admin/src/components/StrapiCore/admin/admin/src/content-manager/hooks/usePrev.ts +5 -5
  10. package/admin/src/components/StrapiCore/admin/admin/src/content-manager/utils/dragAndDrop.ts +6 -6
  11. package/admin/src/components/StrapiCore/admin/admin/src/content-manager/utils/paths.ts +14 -21
  12. package/admin/src/components/StrapiCore/admin/admin/src/content-manager/utils/refs.ts +6 -6
  13. package/admin/src/components/StrapiCore/content-manager/shared/contracts/collection-types.ts +207 -207
  14. package/admin/src/components/StrapiCore/content-manager/shared/contracts/components.ts +42 -42
  15. package/admin/src/components/StrapiCore/content-manager/shared/contracts/content-types.ts +74 -74
  16. package/admin/src/components/StrapiCore/content-manager/shared/contracts/init.ts +12 -12
  17. package/admin/src/components/StrapiCore/content-manager/shared/contracts/relations.ts +57 -57
  18. package/admin/src/components/StrapiCore/content-manager/shared/contracts/review-workflows.ts +52 -52
  19. package/admin/src/components/StrapiCore/content-manager/shared/contracts/single-types.ts +65 -65
  20. package/admin/src/components/StrapiCore/content-manager/shared/contracts/uid.ts +31 -31
  21. package/dist/package.json +1 -1
  22. package/dist/server/bootstrap/permissions.js +97 -69
  23. package/dist/server/middlewares/mikkel.js +35 -0
  24. package/dist/server/policies/platformSelector.js +18 -0
  25. package/dist/server/utils/graphql.js +100 -0
  26. package/dist/server/utils/paginationValidation.js +31 -0
  27. package/dist/tsconfig.server.tsbuildinfo +1 -1
  28. package/package.json +1 -1
  29. package/server/bootstrap/permissions.ts +103 -72
  30. package/admin/src/components/StrapiCore/admin/admin/src/content-manager/utils/normalizeRelations.ts +0 -7
@@ -12,289 +12,289 @@ type SortQuery = EntityService.Params.Sort.StringNotation<Common.UID.Schema> & s
12
12
  * GET /collection-types/:model
13
13
  */
14
14
  export declare namespace Find {
15
- export interface Request {
16
- body: {};
17
- query: {
18
- page: PaginationQuery['page'];
19
- pageSize: PaginationQuery['pageSize'];
20
- sort: SortQuery;
21
- };
22
- }
23
-
24
- export interface Params {
25
- model: string;
26
- }
27
-
28
- export interface Response {
29
- results: PaginatedEntities['results'];
30
- pagination: PaginatedEntities['pagination'];
31
- error?: errors.ApplicationError;
32
- }
15
+ export interface Request {
16
+ body: {};
17
+ query: {
18
+ page: PaginationQuery['page'];
19
+ pageSize: PaginationQuery['pageSize'];
20
+ sort: SortQuery;
21
+ };
22
+ }
23
+
24
+ export interface Params {
25
+ model: string;
26
+ }
27
+
28
+ export interface Response {
29
+ results: PaginatedEntities['results'];
30
+ pagination: PaginatedEntities['pagination'];
31
+ error?: errors.ApplicationError;
32
+ }
33
33
  }
34
34
 
35
35
  /**
36
36
  * GET /collection-types/:model/:id
37
37
  */
38
38
  export declare namespace FindOne {
39
- export interface Request {
40
- body: {};
41
- query: {};
42
- }
43
-
44
- export interface Params {
45
- model: string;
46
- id: number;
47
- }
48
-
49
- export interface Response {
50
- data: Entity;
51
- error?: errors.ApplicationError;
52
- }
39
+ export interface Request {
40
+ body: {};
41
+ query: {};
42
+ }
43
+
44
+ export interface Params {
45
+ model: string;
46
+ id: number;
47
+ }
48
+
49
+ export interface Response {
50
+ data: Entity;
51
+ error?: errors.ApplicationError;
52
+ }
53
53
  }
54
54
 
55
55
  /**
56
56
  * POST /collection-types/:model
57
57
  */
58
58
  export declare namespace Create {
59
- export interface Request {
60
- body: Schema.Attributes;
61
- query: {};
62
- }
63
-
64
- export interface Params {
65
- model: string;
66
- }
67
-
68
- export interface Response {
69
- data: Entity;
70
- error?: errors.ApplicationError;
71
- }
59
+ export interface Request {
60
+ body: Schema.Attributes;
61
+ query: {};
62
+ }
63
+
64
+ export interface Params {
65
+ model: string;
66
+ }
67
+
68
+ export interface Response {
69
+ data: Entity;
70
+ error?: errors.ApplicationError;
71
+ }
72
72
  }
73
73
 
74
74
  /**
75
75
  * POST /collection-types/:model/auto-clone/:sourceId
76
76
  */
77
77
  export declare namespace AutoClone {
78
- export interface Request {
79
- body: {};
80
- query: {};
81
- }
82
-
83
- export interface Params {
84
- model: string;
85
- sourceId: Entity['id'];
86
- }
87
-
88
- export type Response =
89
- | Entity
90
- | {
91
- error?: errors.ApplicationError;
92
- };
78
+ export interface Request {
79
+ body: {};
80
+ query: {};
81
+ }
82
+
83
+ export interface Params {
84
+ model: string;
85
+ sourceId: Entity['id'];
86
+ }
87
+
88
+ export type Response =
89
+ | Entity
90
+ | {
91
+ error?: errors.ApplicationError;
92
+ };
93
93
  }
94
94
 
95
95
  /**
96
96
  * POST /collection-types/:model/clone/:sourceId
97
97
  */
98
98
  export declare namespace Clone {
99
- export interface Request {
100
- body: Schema.Attributes;
101
- query: {};
102
- }
103
-
104
- export interface Params {
105
- model: string;
106
- sourceId: number;
107
- }
108
-
109
- export interface Response {
110
- data: Entity;
111
- error?: errors.ApplicationError;
112
- }
99
+ export interface Request {
100
+ body: Schema.Attributes;
101
+ query: {};
102
+ }
103
+
104
+ export interface Params {
105
+ model: string;
106
+ sourceId: number;
107
+ }
108
+
109
+ export interface Response {
110
+ data: Entity;
111
+ error?: errors.ApplicationError;
112
+ }
113
113
  }
114
114
 
115
115
  /**
116
116
  * POST /collection-types/:model/:id
117
117
  */
118
118
  export declare namespace Update {
119
- export interface Request {
120
- body: Entity;
121
- query: {};
122
- }
123
-
124
- export interface Params {
125
- model: string;
126
- id: number;
127
- }
128
-
129
- export interface Response {
130
- data: Entity;
131
- error?: errors.ApplicationError;
132
- }
119
+ export interface Request {
120
+ body: Entity;
121
+ query: {};
122
+ }
123
+
124
+ export interface Params {
125
+ model: string;
126
+ id: number;
127
+ }
128
+
129
+ export interface Response {
130
+ data: Entity;
131
+ error?: errors.ApplicationError;
132
+ }
133
133
  }
134
134
 
135
135
  /**
136
136
  * DELETE /collection-types/:model/:id
137
137
  */
138
138
  export declare namespace Delete {
139
- export interface Request {
140
- body: {};
141
- query: {};
142
- }
143
-
144
- export interface Params {
145
- model: string;
146
- id: Entity['id'];
147
- }
148
-
149
- export interface Response {
150
- data: Entity;
151
- error?: errors.ApplicationError;
152
- }
139
+ export interface Request {
140
+ body: {};
141
+ query: {};
142
+ }
143
+
144
+ export interface Params {
145
+ model: string;
146
+ id: Entity['id'];
147
+ }
148
+
149
+ export interface Response {
150
+ data: Entity;
151
+ error?: errors.ApplicationError;
152
+ }
153
153
  }
154
154
 
155
155
  /**
156
156
  * POST /collection-types/:model/:id/actions/publish
157
157
  */
158
158
  export declare namespace Publish {
159
- export interface Request {
160
- body: {};
161
- query: {};
162
- }
163
-
164
- export interface Params {
165
- model: string;
166
- id: number;
167
- }
168
-
169
- export interface Response {
170
- data: Entity;
171
- error?: errors.ApplicationError;
172
- }
159
+ export interface Request {
160
+ body: {};
161
+ query: {};
162
+ }
163
+
164
+ export interface Params {
165
+ model: string;
166
+ id: number;
167
+ }
168
+
169
+ export interface Response {
170
+ data: Entity;
171
+ error?: errors.ApplicationError;
172
+ }
173
173
  }
174
174
 
175
175
  /**
176
176
  * POST /collection-types/:model/:id/actions/unpublish
177
177
  */
178
178
  export declare namespace Unpublish {
179
- export interface Request {
180
- body: {};
181
- query: {};
182
- }
183
-
184
- export interface Params {
185
- model: string;
186
- id: Entity['id'];
187
- }
188
-
189
- export interface Response {
190
- data: Entity;
191
- error?: errors.ApplicationError;
192
- }
179
+ export interface Request {
180
+ body: {};
181
+ query: {};
182
+ }
183
+
184
+ export interface Params {
185
+ model: string;
186
+ id: Entity['id'];
187
+ }
188
+
189
+ export interface Response {
190
+ data: Entity;
191
+ error?: errors.ApplicationError;
192
+ }
193
193
  }
194
194
 
195
195
  /**
196
196
  * POST /collection-types/:model/actions/bulkDelete
197
197
  */
198
198
  export declare namespace BulkDelete {
199
- export interface Request {
200
- body: {
201
- ids: Entity['id'][];
202
- };
203
- query: {};
204
- }
205
-
206
- export interface Params {
207
- model: string;
208
- }
209
-
210
- export interface Response {
211
- data: {
212
- count: number;
213
- };
214
- error?: errors.ApplicationError | errors.YupValidationError;
215
- }
199
+ export interface Request {
200
+ body: {
201
+ ids: Entity['id'][];
202
+ };
203
+ query: {};
204
+ }
205
+
206
+ export interface Params {
207
+ model: string;
208
+ }
209
+
210
+ export interface Response {
211
+ data: {
212
+ count: number;
213
+ };
214
+ error?: errors.ApplicationError | errors.YupValidationError;
215
+ }
216
216
  }
217
217
 
218
218
  /**
219
219
  * POST /collection-types/:model/actions/bulkPublish
220
220
  */
221
221
  export declare namespace BulkPublish {
222
- export interface Request {
223
- body: {
224
- ids: Entity['id'][];
225
- };
226
- query: {};
227
- }
228
-
229
- export interface Params {
230
- model: string;
231
- }
232
-
233
- export interface Response {
234
- count: number;
235
- error?: errors.ApplicationError | errors.YupValidationError;
236
- }
222
+ export interface Request {
223
+ body: {
224
+ ids: Entity['id'][];
225
+ };
226
+ query: {};
227
+ }
228
+
229
+ export interface Params {
230
+ model: string;
231
+ }
232
+
233
+ export interface Response {
234
+ count: number;
235
+ error?: errors.ApplicationError | errors.YupValidationError;
236
+ }
237
237
  }
238
238
 
239
239
  /**
240
240
  * POST /collection-types/:model/actions/bulkUnpublish
241
241
  */
242
242
  export declare namespace BulkUnpublish {
243
- export interface Request {
244
- body: {
245
- ids: Entity['id'][];
246
- };
247
- query: {};
248
- }
249
-
250
- export interface Params {
251
- model: string;
252
- }
253
-
254
- export interface Response {
255
- data: {
256
- count: number;
257
- };
258
- error?: errors.ApplicationError | errors.YupValidationError;
259
- }
243
+ export interface Request {
244
+ body: {
245
+ ids: Entity['id'][];
246
+ };
247
+ query: {};
248
+ }
249
+
250
+ export interface Params {
251
+ model: string;
252
+ }
253
+
254
+ export interface Response {
255
+ data: {
256
+ count: number;
257
+ };
258
+ error?: errors.ApplicationError | errors.YupValidationError;
259
+ }
260
260
  }
261
261
 
262
262
  /**
263
263
  * GET /collection-types/:model/:id/actions/countDraftRelations
264
264
  */
265
265
  export declare namespace CountDraftRelations {
266
- export interface Request {
267
- body: {};
268
- query: {};
269
- }
270
-
271
- export interface Params {
272
- model: string;
273
- }
274
-
275
- export interface Response {
276
- data: number;
277
- error?: errors.ApplicationError;
278
- }
266
+ export interface Request {
267
+ body: {};
268
+ query: {};
269
+ }
270
+
271
+ export interface Params {
272
+ model: string;
273
+ }
274
+
275
+ export interface Response {
276
+ data: number;
277
+ error?: errors.ApplicationError;
278
+ }
279
279
  }
280
280
 
281
281
  /**
282
282
  * GET /collection-types/:model/actions/countManyEntriesDraftRelations
283
283
  */
284
284
  export declare namespace CountManyEntriesDraftRelations {
285
- export interface Request {
286
- body: {
287
- ids: number[];
288
- };
289
- query: {};
290
- }
291
-
292
- export interface Params {
293
- model: string;
294
- }
295
-
296
- export interface Response {
297
- data: number;
298
- error?: errors.ApplicationError;
299
- }
285
+ export interface Request {
286
+ body: {
287
+ ids: number[];
288
+ };
289
+ query: {};
290
+ }
291
+
292
+ export interface Params {
293
+ model: string;
294
+ }
295
+
296
+ export interface Response {
297
+ data: number;
298
+ error?: errors.ApplicationError;
299
+ }
300
300
  }
@@ -3,70 +3,70 @@ import { errors } from '@strapi/utils';
3
3
  import { Configuration, Settings, Metadatas, Layouts } from './content-types';
4
4
 
5
5
  export interface Component extends Schema.Component {
6
- isDisplayed: boolean;
7
- info: Schema.Info;
8
- apiID: string;
6
+ isDisplayed: boolean;
7
+ info: Schema.Info;
8
+ apiID: string;
9
9
  }
10
10
 
11
11
  export interface ComponentConfiguration extends Configuration {
12
- category: string;
13
- isComponent: boolean;
12
+ category: string;
13
+ isComponent: boolean;
14
14
  }
15
15
 
16
16
  /**
17
17
  * GET /components
18
18
  */
19
19
  export declare namespace FindComponents {
20
- export interface Request {
21
- body: {};
22
- query: {};
23
- }
24
- export interface Response {
25
- data: Component[];
26
- error?: errors.ApplicationError;
27
- }
20
+ export interface Request {
21
+ body: {};
22
+ query: {};
23
+ }
24
+ export interface Response {
25
+ data: Component[];
26
+ error?: errors.ApplicationError;
27
+ }
28
28
  }
29
29
 
30
30
  /**
31
31
  * GET /components/:uid/configuration
32
32
  */
33
33
  export declare namespace FindComponentConfiguration {
34
- export interface Request {
35
- body: {};
36
- query: {};
37
- }
34
+ export interface Request {
35
+ body: {};
36
+ query: {};
37
+ }
38
38
 
39
- export interface Params {
40
- uid: string;
41
- }
42
- export interface Response {
43
- data: {
44
- component: ComponentConfiguration;
45
- components: Record<string, ComponentConfiguration>;
46
- };
47
- error?: errors.ApplicationError;
48
- }
39
+ export interface Params {
40
+ uid: string;
41
+ }
42
+ export interface Response {
43
+ data: {
44
+ component: ComponentConfiguration;
45
+ components: Record<string, ComponentConfiguration>;
46
+ };
47
+ error?: errors.ApplicationError;
48
+ }
49
49
  }
50
50
 
51
51
  /**
52
52
  * PUT /components/:uid/configuration
53
53
  */
54
54
  export declare namespace UpdateComponentConfiguration {
55
- export interface Request {
56
- body: {
57
- layouts: Layouts;
58
- metadatas: Metadatas;
59
- settings: Settings;
60
- };
61
- query: {};
62
- }
55
+ export interface Request {
56
+ body: {
57
+ layouts: Layouts;
58
+ metadatas: Metadatas;
59
+ settings: Settings;
60
+ };
61
+ query: {};
62
+ }
63
63
 
64
- export interface Params {
65
- uid: string;
66
- }
64
+ export interface Params {
65
+ uid: string;
66
+ }
67
67
 
68
- export interface Response {
69
- data: ComponentConfiguration;
70
- error?: errors.ApplicationError | errors.YupValidationError;
71
- }
68
+ export interface Response {
69
+ data: ComponentConfiguration;
70
+ error?: errors.ApplicationError | errors.YupValidationError;
71
+ }
72
72
  }