@retikolo/drag-drop-content-types-strapi 2.0.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.
Files changed (51) hide show
  1. package/README.md +77 -0
  2. package/dist/_chunks/Settings-BUJ6OWyE.js +3632 -0
  3. package/dist/_chunks/Settings-Cx22s5Bk.mjs +3615 -0
  4. package/dist/_chunks/en-I3-CH3Sy.js +31 -0
  5. package/dist/_chunks/en-bxpER_P-.mjs +31 -0
  6. package/dist/_chunks/fr-C8Qw4iPZ.js +4 -0
  7. package/dist/_chunks/fr-hkSxFuzl.mjs +4 -0
  8. package/dist/_chunks/index-CxWC49Ye.mjs +477 -0
  9. package/dist/_chunks/index-D5Ne-GrP.js +478 -0
  10. package/dist/admin/index.js +3 -0
  11. package/dist/admin/index.mjs +4 -0
  12. package/dist/admin/src/components/Initializer.d.ts +5 -0
  13. package/dist/admin/src/components/PluginIcon.d.ts +2 -0
  14. package/dist/admin/src/components/SettingsTextField.d.ts +14 -0
  15. package/dist/admin/src/components/SettingsToggleField.d.ts +13 -0
  16. package/dist/admin/src/components/SortModal/CustomItem.d.ts +12 -0
  17. package/dist/admin/src/components/SortModal/SortMenu.d.ts +3 -0
  18. package/dist/admin/src/components/SortModal/SortableList.d.ts +3 -0
  19. package/dist/admin/src/components/SortModal/SortableListItem.d.ts +7 -0
  20. package/dist/admin/src/components/SortModal/index.d.ts +2 -0
  21. package/dist/admin/src/components/SortModal/utils.d.ts +2 -0
  22. package/dist/admin/src/components/TooltipIconButton.d.ts +11 -0
  23. package/dist/admin/src/index.d.ts +13 -0
  24. package/dist/admin/src/pages/App.d.ts +2 -0
  25. package/dist/admin/src/pages/HomePage.d.ts +2 -0
  26. package/dist/admin/src/pages/Settings.d.ts +2 -0
  27. package/dist/admin/src/permissions.d.ts +7 -0
  28. package/dist/admin/src/pluginId.d.ts +1 -0
  29. package/dist/admin/src/utils/getTranslation.d.ts +2 -0
  30. package/dist/admin/src/utils/strapi.d.ts +13 -0
  31. package/dist/admin/src/utils/useQueryParams.d.ts +7 -0
  32. package/dist/server/index.js +266 -0
  33. package/dist/server/index.mjs +267 -0
  34. package/dist/server/src/bootstrap.d.ts +5 -0
  35. package/dist/server/src/config/index.d.ts +5 -0
  36. package/dist/server/src/content-types/index.d.ts +2 -0
  37. package/dist/server/src/controllers/dragdrop.d.ts +9 -0
  38. package/dist/server/src/controllers/index.d.ts +16 -0
  39. package/dist/server/src/controllers/settings.d.ts +8 -0
  40. package/dist/server/src/destroy.d.ts +5 -0
  41. package/dist/server/src/index.d.ts +79 -0
  42. package/dist/server/src/middlewares/index.d.ts +2 -0
  43. package/dist/server/src/policies/index.d.ts +2 -0
  44. package/dist/server/src/register.d.ts +5 -0
  45. package/dist/server/src/routes/dragdrop.d.ts +13 -0
  46. package/dist/server/src/routes/index.d.ts +26 -0
  47. package/dist/server/src/routes/settings.d.ts +12 -0
  48. package/dist/server/src/services/dragdrop.d.ts +21 -0
  49. package/dist/server/src/services/index.d.ts +21 -0
  50. package/dist/server/src/services/settings.d.ts +8 -0
  51. package/package.json +98 -0
@@ -0,0 +1,266 @@
1
+ "use strict";
2
+ const zod = require("zod");
3
+ const bootstrap = ({ strapi: strapi2 }) => {
4
+ };
5
+ const destroy = ({ strapi: strapi2 }) => {
6
+ };
7
+ const register = ({ strapi: strapi2 }) => {
8
+ };
9
+ const config = {
10
+ default: {},
11
+ validator() {
12
+ }
13
+ };
14
+ const contentTypes = {};
15
+ const RankUpdateSchema = zod.z.object({
16
+ id: zod.z.number(),
17
+ rank: zod.z.number()
18
+ });
19
+ const BatchUpdateRequestSchema = zod.z.object({
20
+ contentType: zod.z.string(),
21
+ updates: zod.z.array(RankUpdateSchema)
22
+ });
23
+ const controller = ({ strapi: strapi2 }) => ({
24
+ async welcome(ctx) {
25
+ const dragdropService = strapi2.plugin("drag-drop-content-types").service("dragdrop");
26
+ try {
27
+ ctx.body = await dragdropService.getWelcomeMessage();
28
+ } catch (err) {
29
+ ctx.throw(500, err);
30
+ }
31
+ },
32
+ async sortIndex(ctx) {
33
+ const dragdropService = strapi2.plugin("drag-drop-content-types").service("dragdrop");
34
+ try {
35
+ ctx.body = await dragdropService.sortIndex(
36
+ ctx.request.body.contentType,
37
+ ctx.request.body.start,
38
+ ctx.request.body.limit,
39
+ ctx.request.body.locale,
40
+ ctx.request.body.rankFieldName
41
+ );
42
+ } catch (err) {
43
+ ctx.throw(500, err);
44
+ }
45
+ },
46
+ async batchUpdate(ctx) {
47
+ const settingService = strapi2.plugin("drag-drop-content-types").service("settings");
48
+ const dragdropService = strapi2.plugin("drag-drop-content-types").service("dragdrop");
49
+ try {
50
+ const config2 = await settingService.getSettings();
51
+ const payload = await BatchUpdateRequestSchema.parseAsync(
52
+ ctx.request.body
53
+ );
54
+ try {
55
+ ctx.body = await dragdropService.batchUpdate(config2, payload.updates, payload.contentType);
56
+ } catch (err) {
57
+ ctx.throw(500, err);
58
+ }
59
+ } catch (err) {
60
+ ctx.throw(400, err);
61
+ }
62
+ }
63
+ });
64
+ const settings$2 = ({ strapi: strapi2 }) => ({
65
+ async getSettings(ctx) {
66
+ const settingService = strapi2.plugin("drag-drop-content-types").service("settings");
67
+ try {
68
+ ctx.body = await settingService.getSettings();
69
+ } catch (err) {
70
+ ctx.throw(500, err);
71
+ }
72
+ },
73
+ async setSettings(ctx) {
74
+ const settingService = strapi2.plugin("drag-drop-content-types").service("settings");
75
+ const { body } = ctx.request;
76
+ try {
77
+ await settingService.setSettings(body);
78
+ ctx.body = await settingService.getSettings();
79
+ } catch (err) {
80
+ ctx.throw(500, err);
81
+ }
82
+ }
83
+ });
84
+ const controllers = {
85
+ dragdrop: controller,
86
+ settings: settings$2
87
+ };
88
+ const middlewares = {};
89
+ const policies = {};
90
+ const dragdrop$1 = {
91
+ //type: admin: internal and can be accessible only by the admin part (front-end part) of the plugin
92
+ //type: content-api: accessible from external classical rest api, need to set access in strapi's Users & Permissions plugin
93
+ //call: http://localhost:1337/api/drag-drop-content-types/ and you'll receive getWelcomeMessage()
94
+ type: "admin",
95
+ //changed from content-api to admin
96
+ routes: [
97
+ {
98
+ method: "GET",
99
+ path: "/welcome",
100
+ handler: "dragdrop.welcome",
101
+ config: {
102
+ policies: [],
103
+ auth: false
104
+ }
105
+ },
106
+ {
107
+ method: "POST",
108
+ path: "/sort-index",
109
+ handler: "dragdrop.sortIndex",
110
+ config: {
111
+ policies: [],
112
+ auth: false
113
+ }
114
+ },
115
+ {
116
+ method: "PUT",
117
+ path: "/batch-update",
118
+ handler: "dragdrop.batchUpdate",
119
+ config: {
120
+ policies: [],
121
+ auth: false
122
+ }
123
+ }
124
+ ]
125
+ };
126
+ const settings$1 = {
127
+ type: "admin",
128
+ routes: [
129
+ {
130
+ method: "GET",
131
+ path: "/settings",
132
+ handler: "settings.getSettings",
133
+ config: { policies: [] }
134
+ },
135
+ {
136
+ method: "POST",
137
+ path: "/settings",
138
+ handler: "settings.setSettings",
139
+ config: { policies: [] }
140
+ }
141
+ ]
142
+ };
143
+ const routes = {
144
+ dragdrop: dragdrop$1,
145
+ settings: settings$1
146
+ };
147
+ const dragdrop = ({ strapi: strapi2 }) => ({
148
+ getWelcomeMessage() {
149
+ return {
150
+ body: "Welcome to Strapi 🚀"
151
+ };
152
+ },
153
+ async sortIndex(contentType, start, limit, locale, rankFieldName) {
154
+ let indexData = {
155
+ sort: {},
156
+ populate: "*",
157
+ start,
158
+ limit,
159
+ locale
160
+ };
161
+ indexData.sort[rankFieldName] = "asc";
162
+ try {
163
+ return await strapi2.documents(contentType).findMany(indexData);
164
+ } catch (err) {
165
+ return {};
166
+ }
167
+ },
168
+ /**
169
+ *
170
+ * @param {RankUpdate[]} updates
171
+ * @param {StrapiTypes.UID.CollectionType} contentType
172
+ */
173
+ async batchUpdate(config2, updates, contentType) {
174
+ const sortFieldName = config2.body.rank;
175
+ const shouldTriggerWebhooks = config2.body.triggerWebhooks;
176
+ const results = [];
177
+ strapi2["apiUpdate"] = true;
178
+ for (const update of updates) {
179
+ const updatedEntry = await strapi2.db.query(contentType).update({
180
+ where: { id: update.id },
181
+ data: {
182
+ [sortFieldName]: update.rank
183
+ }
184
+ });
185
+ if (updatedEntry?.id) {
186
+ results.push(updatedEntry);
187
+ if (shouldTriggerWebhooks) {
188
+ const parts = contentType.split(".");
189
+ const info = {
190
+ model: parts[parts.length - 1],
191
+ entry: {
192
+ id: updatedEntry.id,
193
+ ...updatedEntry
194
+ }
195
+ };
196
+ await strapi2.get("webhookRunner").executeListener({
197
+ event: "entry.update",
198
+ info
199
+ });
200
+ }
201
+ }
202
+ }
203
+ strapi2["apiUpdate"] = void 0;
204
+ if (results?.length !== updates?.length) {
205
+ throw new Error("Error updating rank entries.");
206
+ } else {
207
+ return results.map((entry) => ({
208
+ id: entry.id,
209
+ rank: entry[sortFieldName]
210
+ }));
211
+ }
212
+ }
213
+ });
214
+ const getPluginStore = () => {
215
+ return strapi.store({
216
+ environment: "",
217
+ type: "plugin",
218
+ name: "drag-drop-content-types"
219
+ });
220
+ };
221
+ const createDefaultConfig = async () => {
222
+ const pluginStore = getPluginStore();
223
+ const value = {
224
+ body: {
225
+ rank: "rank",
226
+ title: "",
227
+ subtitle: "",
228
+ triggerWebhooks: false
229
+ }
230
+ };
231
+ await pluginStore.set({ key: "settings", value });
232
+ return pluginStore.get({ key: "settings" });
233
+ };
234
+ const settings = ({ strapi: strapi2 }) => ({
235
+ async getSettings() {
236
+ const pluginStore = getPluginStore();
237
+ let config2 = await pluginStore.get({ key: "settings" });
238
+ if (!config2) {
239
+ config2 = await createDefaultConfig();
240
+ }
241
+ return config2;
242
+ },
243
+ async setSettings(settings2) {
244
+ const value = settings2;
245
+ const pluginStore = getPluginStore();
246
+ await pluginStore.set({ key: "settings", value });
247
+ return pluginStore.get({ key: "settings" });
248
+ }
249
+ });
250
+ const services = {
251
+ dragdrop,
252
+ settings
253
+ };
254
+ const index = {
255
+ register,
256
+ bootstrap,
257
+ destroy,
258
+ config,
259
+ controllers,
260
+ routes,
261
+ services,
262
+ contentTypes,
263
+ policies,
264
+ middlewares
265
+ };
266
+ module.exports = index;
@@ -0,0 +1,267 @@
1
+ import { z } from "zod";
2
+ const bootstrap = ({ strapi: strapi2 }) => {
3
+ };
4
+ const destroy = ({ strapi: strapi2 }) => {
5
+ };
6
+ const register = ({ strapi: strapi2 }) => {
7
+ };
8
+ const config = {
9
+ default: {},
10
+ validator() {
11
+ }
12
+ };
13
+ const contentTypes = {};
14
+ const RankUpdateSchema = z.object({
15
+ id: z.number(),
16
+ rank: z.number()
17
+ });
18
+ const BatchUpdateRequestSchema = z.object({
19
+ contentType: z.string(),
20
+ updates: z.array(RankUpdateSchema)
21
+ });
22
+ const controller = ({ strapi: strapi2 }) => ({
23
+ async welcome(ctx) {
24
+ const dragdropService = strapi2.plugin("drag-drop-content-types").service("dragdrop");
25
+ try {
26
+ ctx.body = await dragdropService.getWelcomeMessage();
27
+ } catch (err) {
28
+ ctx.throw(500, err);
29
+ }
30
+ },
31
+ async sortIndex(ctx) {
32
+ const dragdropService = strapi2.plugin("drag-drop-content-types").service("dragdrop");
33
+ try {
34
+ ctx.body = await dragdropService.sortIndex(
35
+ ctx.request.body.contentType,
36
+ ctx.request.body.start,
37
+ ctx.request.body.limit,
38
+ ctx.request.body.locale,
39
+ ctx.request.body.rankFieldName
40
+ );
41
+ } catch (err) {
42
+ ctx.throw(500, err);
43
+ }
44
+ },
45
+ async batchUpdate(ctx) {
46
+ const settingService = strapi2.plugin("drag-drop-content-types").service("settings");
47
+ const dragdropService = strapi2.plugin("drag-drop-content-types").service("dragdrop");
48
+ try {
49
+ const config2 = await settingService.getSettings();
50
+ const payload = await BatchUpdateRequestSchema.parseAsync(
51
+ ctx.request.body
52
+ );
53
+ try {
54
+ ctx.body = await dragdropService.batchUpdate(config2, payload.updates, payload.contentType);
55
+ } catch (err) {
56
+ ctx.throw(500, err);
57
+ }
58
+ } catch (err) {
59
+ ctx.throw(400, err);
60
+ }
61
+ }
62
+ });
63
+ const settings$2 = ({ strapi: strapi2 }) => ({
64
+ async getSettings(ctx) {
65
+ const settingService = strapi2.plugin("drag-drop-content-types").service("settings");
66
+ try {
67
+ ctx.body = await settingService.getSettings();
68
+ } catch (err) {
69
+ ctx.throw(500, err);
70
+ }
71
+ },
72
+ async setSettings(ctx) {
73
+ const settingService = strapi2.plugin("drag-drop-content-types").service("settings");
74
+ const { body } = ctx.request;
75
+ try {
76
+ await settingService.setSettings(body);
77
+ ctx.body = await settingService.getSettings();
78
+ } catch (err) {
79
+ ctx.throw(500, err);
80
+ }
81
+ }
82
+ });
83
+ const controllers = {
84
+ dragdrop: controller,
85
+ settings: settings$2
86
+ };
87
+ const middlewares = {};
88
+ const policies = {};
89
+ const dragdrop$1 = {
90
+ //type: admin: internal and can be accessible only by the admin part (front-end part) of the plugin
91
+ //type: content-api: accessible from external classical rest api, need to set access in strapi's Users & Permissions plugin
92
+ //call: http://localhost:1337/api/drag-drop-content-types/ and you'll receive getWelcomeMessage()
93
+ type: "admin",
94
+ //changed from content-api to admin
95
+ routes: [
96
+ {
97
+ method: "GET",
98
+ path: "/welcome",
99
+ handler: "dragdrop.welcome",
100
+ config: {
101
+ policies: [],
102
+ auth: false
103
+ }
104
+ },
105
+ {
106
+ method: "POST",
107
+ path: "/sort-index",
108
+ handler: "dragdrop.sortIndex",
109
+ config: {
110
+ policies: [],
111
+ auth: false
112
+ }
113
+ },
114
+ {
115
+ method: "PUT",
116
+ path: "/batch-update",
117
+ handler: "dragdrop.batchUpdate",
118
+ config: {
119
+ policies: [],
120
+ auth: false
121
+ }
122
+ }
123
+ ]
124
+ };
125
+ const settings$1 = {
126
+ type: "admin",
127
+ routes: [
128
+ {
129
+ method: "GET",
130
+ path: "/settings",
131
+ handler: "settings.getSettings",
132
+ config: { policies: [] }
133
+ },
134
+ {
135
+ method: "POST",
136
+ path: "/settings",
137
+ handler: "settings.setSettings",
138
+ config: { policies: [] }
139
+ }
140
+ ]
141
+ };
142
+ const routes = {
143
+ dragdrop: dragdrop$1,
144
+ settings: settings$1
145
+ };
146
+ const dragdrop = ({ strapi: strapi2 }) => ({
147
+ getWelcomeMessage() {
148
+ return {
149
+ body: "Welcome to Strapi 🚀"
150
+ };
151
+ },
152
+ async sortIndex(contentType, start, limit, locale, rankFieldName) {
153
+ let indexData = {
154
+ sort: {},
155
+ populate: "*",
156
+ start,
157
+ limit,
158
+ locale
159
+ };
160
+ indexData.sort[rankFieldName] = "asc";
161
+ try {
162
+ return await strapi2.documents(contentType).findMany(indexData);
163
+ } catch (err) {
164
+ return {};
165
+ }
166
+ },
167
+ /**
168
+ *
169
+ * @param {RankUpdate[]} updates
170
+ * @param {StrapiTypes.UID.CollectionType} contentType
171
+ */
172
+ async batchUpdate(config2, updates, contentType) {
173
+ const sortFieldName = config2.body.rank;
174
+ const shouldTriggerWebhooks = config2.body.triggerWebhooks;
175
+ const results = [];
176
+ strapi2["apiUpdate"] = true;
177
+ for (const update of updates) {
178
+ const updatedEntry = await strapi2.db.query(contentType).update({
179
+ where: { id: update.id },
180
+ data: {
181
+ [sortFieldName]: update.rank
182
+ }
183
+ });
184
+ if (updatedEntry?.id) {
185
+ results.push(updatedEntry);
186
+ if (shouldTriggerWebhooks) {
187
+ const parts = contentType.split(".");
188
+ const info = {
189
+ model: parts[parts.length - 1],
190
+ entry: {
191
+ id: updatedEntry.id,
192
+ ...updatedEntry
193
+ }
194
+ };
195
+ await strapi2.get("webhookRunner").executeListener({
196
+ event: "entry.update",
197
+ info
198
+ });
199
+ }
200
+ }
201
+ }
202
+ strapi2["apiUpdate"] = void 0;
203
+ if (results?.length !== updates?.length) {
204
+ throw new Error("Error updating rank entries.");
205
+ } else {
206
+ return results.map((entry) => ({
207
+ id: entry.id,
208
+ rank: entry[sortFieldName]
209
+ }));
210
+ }
211
+ }
212
+ });
213
+ const getPluginStore = () => {
214
+ return strapi.store({
215
+ environment: "",
216
+ type: "plugin",
217
+ name: "drag-drop-content-types"
218
+ });
219
+ };
220
+ const createDefaultConfig = async () => {
221
+ const pluginStore = getPluginStore();
222
+ const value = {
223
+ body: {
224
+ rank: "rank",
225
+ title: "",
226
+ subtitle: "",
227
+ triggerWebhooks: false
228
+ }
229
+ };
230
+ await pluginStore.set({ key: "settings", value });
231
+ return pluginStore.get({ key: "settings" });
232
+ };
233
+ const settings = ({ strapi: strapi2 }) => ({
234
+ async getSettings() {
235
+ const pluginStore = getPluginStore();
236
+ let config2 = await pluginStore.get({ key: "settings" });
237
+ if (!config2) {
238
+ config2 = await createDefaultConfig();
239
+ }
240
+ return config2;
241
+ },
242
+ async setSettings(settings2) {
243
+ const value = settings2;
244
+ const pluginStore = getPluginStore();
245
+ await pluginStore.set({ key: "settings", value });
246
+ return pluginStore.get({ key: "settings" });
247
+ }
248
+ });
249
+ const services = {
250
+ dragdrop,
251
+ settings
252
+ };
253
+ const index = {
254
+ register,
255
+ bootstrap,
256
+ destroy,
257
+ config,
258
+ controllers,
259
+ routes,
260
+ services,
261
+ contentTypes,
262
+ policies,
263
+ middlewares
264
+ };
265
+ export {
266
+ index as default
267
+ };
@@ -0,0 +1,5 @@
1
+ import type { Core } from '@strapi/strapi';
2
+ declare const bootstrap: ({ strapi }: {
3
+ strapi: Core.Strapi;
4
+ }) => void;
5
+ export default bootstrap;
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ default: {};
3
+ validator(): void;
4
+ };
5
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import type { Core } from '@strapi/strapi';
2
+ declare const controller: ({ strapi }: {
3
+ strapi: Core.Strapi;
4
+ }) => {
5
+ welcome(ctx: any): Promise<void>;
6
+ sortIndex(ctx: any): Promise<void>;
7
+ batchUpdate(ctx: any): Promise<void>;
8
+ };
9
+ export default controller;
@@ -0,0 +1,16 @@
1
+ declare const _default: {
2
+ dragdrop: ({ strapi }: {
3
+ strapi: import("@strapi/types/dist/core").Strapi;
4
+ }) => {
5
+ welcome(ctx: any): Promise<void>;
6
+ sortIndex(ctx: any): Promise<void>;
7
+ batchUpdate(ctx: any): Promise<void>;
8
+ };
9
+ settings: ({ strapi }: {
10
+ strapi: import("@strapi/types/dist/core").Strapi;
11
+ }) => {
12
+ getSettings(ctx: any): Promise<void>;
13
+ setSettings(ctx: any): Promise<void>;
14
+ };
15
+ };
16
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import type { Core } from '@strapi/strapi';
2
+ declare const _default: ({ strapi }: {
3
+ strapi: Core.Strapi;
4
+ }) => {
5
+ getSettings(ctx: any): Promise<void>;
6
+ setSettings(ctx: any): Promise<void>;
7
+ };
8
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import type { Core } from '@strapi/strapi';
2
+ declare const destroy: ({ strapi }: {
3
+ strapi: Core.Strapi;
4
+ }) => void;
5
+ export default destroy;
@@ -0,0 +1,79 @@
1
+ declare const _default: {
2
+ register: ({ strapi }: {
3
+ strapi: import("@strapi/types/dist/core").Strapi;
4
+ }) => void;
5
+ bootstrap: ({ strapi }: {
6
+ strapi: import("@strapi/types/dist/core").Strapi;
7
+ }) => void;
8
+ destroy: ({ strapi }: {
9
+ strapi: import("@strapi/types/dist/core").Strapi;
10
+ }) => void;
11
+ config: {
12
+ default: {};
13
+ validator(): void;
14
+ };
15
+ controllers: {
16
+ dragdrop: ({ strapi }: {
17
+ strapi: import("@strapi/types/dist/core").Strapi;
18
+ }) => {
19
+ welcome(ctx: any): Promise<void>;
20
+ sortIndex(ctx: any): Promise<void>;
21
+ batchUpdate(ctx: any): Promise<void>;
22
+ };
23
+ settings: ({ strapi }: {
24
+ strapi: import("@strapi/types/dist/core").Strapi;
25
+ }) => {
26
+ getSettings(ctx: any): Promise<void>;
27
+ setSettings(ctx: any): Promise<void>;
28
+ };
29
+ };
30
+ routes: {
31
+ dragdrop: {
32
+ type: string;
33
+ routes: {
34
+ method: string;
35
+ path: string;
36
+ handler: string;
37
+ config: {
38
+ policies: any[];
39
+ auth: boolean;
40
+ };
41
+ }[];
42
+ };
43
+ settings: {
44
+ type: string;
45
+ routes: {
46
+ method: string;
47
+ path: string;
48
+ handler: string;
49
+ config: {
50
+ policies: any[];
51
+ };
52
+ }[];
53
+ };
54
+ };
55
+ services: {
56
+ dragdrop: ({ strapi }: {
57
+ strapi: import("@strapi/types/dist/core").Strapi;
58
+ }) => {
59
+ getWelcomeMessage(): {
60
+ body: string;
61
+ };
62
+ sortIndex(contentType: `admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`, start: number, limit: number, locale: string, rankFieldName: string): Promise<{}>;
63
+ batchUpdate(config: import("../../typings").PluginSettingsResponse, updates: import("../../typings").RankUpdate[], contentType: `admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`): Promise<{
64
+ id: any;
65
+ rank: any;
66
+ }[]>;
67
+ };
68
+ settings: ({ strapi }: {
69
+ strapi: import("@strapi/types/dist/core").Strapi;
70
+ }) => {
71
+ getSettings(): Promise<unknown>;
72
+ setSettings(settings: any): Promise<unknown>;
73
+ };
74
+ };
75
+ contentTypes: {};
76
+ policies: {};
77
+ middlewares: {};
78
+ };
79
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import type { Core } from '@strapi/strapi';
2
+ declare const register: ({ strapi }: {
3
+ strapi: Core.Strapi;
4
+ }) => void;
5
+ export default register;
@@ -0,0 +1,13 @@
1
+ declare const _default: {
2
+ type: string;
3
+ routes: {
4
+ method: string;
5
+ path: string;
6
+ handler: string;
7
+ config: {
8
+ policies: any[];
9
+ auth: boolean;
10
+ };
11
+ }[];
12
+ };
13
+ export default _default;