@webbio/strapi-plugin-page-builder 0.12.2-platform → 0.12.4-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.
- package/README.md +166 -166
- package/admin/src/api/collection-type.ts +111 -111
- package/admin/src/api/entity-relation.ts +42 -42
- package/admin/src/api/has-page-relation.ts +37 -37
- package/admin/src/api/has-platform-relation.ts +40 -40
- package/admin/src/api/page-type-relation.ts +41 -41
- package/admin/src/api/platform-page-types.ts +45 -45
- package/admin/src/api/platform-relation.ts +42 -42
- package/admin/src/api/platform.ts +35 -35
- package/admin/src/api/search-filtered-entity.ts +114 -114
- package/admin/src/api/template.ts +39 -39
- package/admin/src/components/Combobox/index.tsx +83 -83
- package/admin/src/components/Combobox/react-select-custom-styles.tsx +121 -121
- package/admin/src/components/Combobox/styles.ts +46 -46
- package/admin/src/components/ConfirmModal/index.tsx +90 -90
- package/admin/src/components/EditView/CollectionTypeSearch/index.tsx +127 -127
- package/admin/src/components/EditView/CollectionTypeSettings/CreatePageButton/index.tsx +149 -149
- package/admin/src/components/EditView/CollectionTypeSettings/CreatePageButton/styles.ts +19 -19
- package/admin/src/components/EditView/CollectionTypeSettings/index.tsx +82 -82
- package/admin/src/components/EditView/Details/index.tsx +48 -48
- package/admin/src/components/EditView/Details/styles.ts +51 -51
- package/admin/src/components/EditView/PageSettings/index.tsx +124 -124
- package/admin/src/components/EditView/Platform/platform-select.tsx +30 -30
- package/admin/src/components/EditView/Template/TemplateConfirmModal/index.tsx +36 -36
- package/admin/src/components/EditView/Template/TemplateSelect/index.tsx +70 -70
- package/admin/src/components/EditView/Template/TemplateSelect/use-template-modules.ts +41 -41
- package/admin/src/components/EditView/index.tsx +35 -35
- package/admin/src/components/EditView/page-type-select.tsx +32 -32
- package/admin/src/components/EditView/wrapper.tsx +41 -41
- package/admin/src/components/GlobalPlatformSelect/index.tsx +40 -40
- package/admin/src/components/GlobalPlatformSelect/styles.ts +27 -27
- package/admin/src/components/Initializer/index.tsx +24 -24
- package/admin/src/components/PageFilters/PageTypeFilter/index.tsx +39 -39
- package/admin/src/components/PageFilters/PlatformFilter/index.tsx +32 -32
- package/admin/src/components/PageFilters/filters.tsx +189 -189
- package/admin/src/components/PageFilters/index.tsx +35 -35
- package/admin/src/components/PageTypeEditView/TemplatePlatformSelect/index.tsx +76 -76
- package/admin/src/components/PageTypeEditView/index.tsx +53 -53
- package/admin/src/components/PlatformFilteredSelectField/InputIcon/index.tsx +23 -23
- package/admin/src/components/PlatformFilteredSelectField/Multi/index.tsx +210 -210
- package/admin/src/components/PlatformFilteredSelectField/Single/index.tsx +197 -197
- package/admin/src/components/PlatformFilteredSelectField/hooks/useRelationLoad.tsx +128 -128
- package/admin/src/components/PlatformFilteredSelectField/index.tsx +85 -85
- package/admin/src/components/PlatformFilteredSelectField/styles.tsx +77 -77
- package/admin/src/components/PlatformFilteredSelectField/utils/get-translations.ts +3 -3
- package/admin/src/components/PlatformFilteredSelectField/utils/relation-helper.ts +147 -147
- package/admin/src/components/PluginIcon/index.tsx +94 -94
- package/admin/src/components/StrapiCore/admin/admin/src/content-manager/components/Relations/RelationInput.tsx +689 -689
- package/admin/src/components/StrapiCore/admin/admin/src/content-manager/components/Relations/RelationInputDataManager.tsx +6 -6
- package/admin/src/components/StrapiCore/admin/admin/src/content-manager/components/Relations/useRelation.ts +170 -170
- package/admin/src/components/StrapiCore/admin/admin/src/content-manager/components/Relations/utils/getRelationLink.ts +5 -5
- package/admin/src/components/StrapiCore/admin/admin/src/content-manager/components/Relations/utils/normalizeRelations.ts +52 -52
- package/admin/src/components/StrapiCore/admin/admin/src/content-manager/constants/attributes.ts +3 -3
- package/admin/src/components/StrapiCore/admin/admin/src/content-manager/hooks/useDragAndDrop.ts +253 -253
- package/admin/src/components/StrapiCore/admin/admin/src/content-manager/hooks/useKeyboardDragAndDrop.ts +96 -96
- package/admin/src/components/StrapiCore/admin/admin/src/content-manager/hooks/usePrev.ts +11 -11
- package/admin/src/components/StrapiCore/admin/admin/src/content-manager/utils/dragAndDrop.ts +8 -8
- package/admin/src/components/StrapiCore/admin/admin/src/content-manager/utils/paths.ts +29 -29
- package/admin/src/components/StrapiCore/admin/admin/src/content-manager/utils/refs.ts +19 -19
- package/admin/src/components/StrapiCore/admin/admin/src/content-manager/utils/translations.ts +3 -3
- package/admin/src/components/StrapiCore/content-manager/shared/contracts/collection-types.ts +300 -300
- package/admin/src/components/StrapiCore/content-manager/shared/contracts/components.ts +72 -72
- package/admin/src/components/StrapiCore/content-manager/shared/contracts/content-types.ts +116 -116
- package/admin/src/components/StrapiCore/content-manager/shared/contracts/index.ts +8 -8
- package/admin/src/components/StrapiCore/content-manager/shared/contracts/init.ts +22 -22
- package/admin/src/components/StrapiCore/content-manager/shared/contracts/relations.ts +80 -80
- package/admin/src/components/StrapiCore/content-manager/shared/contracts/review-workflows.ts +88 -88
- package/admin/src/components/StrapiCore/content-manager/shared/contracts/single-types.ts +112 -112
- package/admin/src/components/StrapiCore/content-manager/shared/contracts/uid.ts +48 -48
- package/admin/src/components/StrapiCore/content-manager/shared/index.ts +1 -1
- package/admin/src/constants.ts +3 -3
- package/admin/src/index.tsx +101 -101
- package/admin/src/middlewares/index.tsx +37 -37
- package/admin/src/pages/app/index.tsx +14 -14
- package/admin/src/pluginId.ts +5 -5
- package/admin/src/translations/en.json +9 -9
- package/admin/src/translations/nl.json +9 -9
- package/admin/src/utils/findDomElement.ts +6 -6
- package/admin/src/utils/findElementParent.ts +20 -20
- package/admin/src/utils/getObjectFromFormName.ts +42 -42
- package/admin/src/utils/getRequestUrl.ts +11 -11
- package/admin/src/utils/getTrad.ts +5 -5
- package/admin/src/utils/hooks/useDebounce.ts +17 -17
- package/admin/src/utils/hooks/useDefaultPlatformFromLocalStorage.ts +61 -61
- package/admin/src/utils/hooks/useGetLocaleFromUrl.ts +9 -9
- package/admin/src/utils/hooks/useHideOverviewFilterTags.ts +34 -34
- package/admin/src/utils/hooks/usePlatformFormData.ts +64 -64
- package/admin/src/utils/hooks/usePrevious.ts +12 -12
- package/admin/src/utils/sanitizeModules.ts +93 -93
- package/custom.d.ts +6 -6
- package/dist/package.json +1 -1
- package/dist/server/bootstrap/collection-type-lifecycles.js +1 -1
- package/dist/server/bootstrap.js +1 -1
- package/dist/server/graphql/page-by-path.js +20 -17
- package/dist/server/graphql/page-by-slug.js +9 -9
- package/dist/server/graphql/pages-by-uid.js +5 -5
- package/dist/server/services/private-content/graphql/index.js +27 -27
- package/dist/server/services/private-content/graphql/types/index.js +74 -74
- package/dist/server/utils/graphql.js +18 -18
- package/dist/tsconfig.server.tsbuildinfo +1 -1
- package/package.json +78 -78
- package/server/bootstrap/collection-type-lifecycles.ts +47 -47
- package/server/bootstrap/permissions.ts +161 -161
- package/server/bootstrap.ts +261 -261
- package/server/config/index.ts +4 -4
- package/server/content-types/index.ts +7 -7
- package/server/content-types/user-category/schema.json +23 -23
- package/server/controllers/collection-types.ts +32 -32
- package/server/controllers/index.ts +19 -19
- package/server/controllers/page-type.ts +18 -18
- package/server/controllers/page.ts +9 -9
- package/server/controllers/platform.ts +21 -21
- package/server/controllers/private-content.ts +17 -17
- package/server/controllers/sitemap.ts +32 -32
- package/server/controllers/template.ts +16 -16
- package/server/controllers/user-category.ts +3 -3
- package/server/destroy.ts +5 -5
- package/server/graphql/index.ts +9 -9
- package/server/graphql/page-by-path.ts +135 -132
- package/server/graphql/page-type.ts +67 -67
- package/server/graphql/pages-by-uid.ts +89 -89
- package/server/index.ts +23 -23
- package/server/middlewares/index.ts +1 -1
- package/server/policies/index.ts +5 -5
- package/server/policies/isAuthorizedPage.ts +11 -11
- package/server/register.ts +22 -22
- package/server/routes/index.ts +115 -115
- package/server/routes/user-category.ts +3 -3
- package/server/schema/page-end.json +96 -96
- package/server/schema/page-start.json +87 -87
- package/server/schema/page-type-end.json +53 -53
- package/server/schema/page-type-start.json +38 -38
- package/server/schema/platform-start.json +21 -21
- package/server/schema/template-end.json +40 -40
- package/server/schema/template-start.json +35 -35
- package/server/services/builder.ts +232 -232
- package/server/services/collection-types.ts +95 -95
- package/server/services/email.ts +127 -127
- package/server/services/index.ts +23 -23
- package/server/services/page-type.ts +30 -30
- package/server/services/page.ts +24 -24
- package/server/services/platform.ts +30 -30
- package/server/services/private-content/components/admin-email.json +22 -22
- package/server/services/private-content/components/email.json +22 -22
- package/server/services/private-content/components/platform-email.json +30 -30
- package/server/services/private-content/constants/index.ts +13 -13
- package/server/services/private-content/graphql/index.ts +88 -88
- package/server/services/private-content/graphql/resolvers/findOnePage.ts +40 -40
- package/server/services/private-content/graphql/resolvers/findPage.ts +45 -45
- package/server/services/private-content/graphql/resolvers/forgot-password.ts +34 -34
- package/server/services/private-content/graphql/resolvers/login.ts +56 -56
- package/server/services/private-content/graphql/resolvers/register.ts +78 -78
- package/server/services/private-content/graphql/resolvers/reset-password.ts +44 -44
- package/server/services/private-content/graphql/types/index.ts +96 -96
- package/server/services/private-content/index.ts +95 -95
- package/server/services/private-content/mail-template/txtMail.email.template.text.ts +6 -6
- package/server/services/private-content/page.ts +20 -20
- package/server/services/private-content/platform.ts +19 -19
- package/server/services/private-content/schemas/index.ts +28 -28
- package/server/services/private-content/user.ts +197 -197
- package/server/services/sitemap.ts +83 -83
- package/server/services/template.ts +13 -13
- package/server/services/user-category.ts +3 -3
- package/server/utils/filter-underscore-arguments.ts +12 -12
- package/server/utils/reload-strapi-on-load.ts +13 -13
- package/server/utils/strapi.ts +50 -50
- package/shared/utils/constants.ts +8 -8
- package/shared/utils/sleep.ts +1 -1
- package/strapi-admin.js +3 -3
- package/strapi-server.js +3 -3
- package/tsconfig.json +20 -20
- package/tsconfig.server.json +25 -25
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
import { Schema } from '@strapi/types';
|
|
2
|
-
import { errors } from '@strapi/utils';
|
|
3
|
-
import { Configuration, Settings, Metadatas, Layouts } from './content-types';
|
|
4
|
-
|
|
5
|
-
export interface Component extends Schema.Component {
|
|
6
|
-
isDisplayed: boolean;
|
|
7
|
-
info: Schema.Info;
|
|
8
|
-
apiID: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface ComponentConfiguration extends Configuration {
|
|
12
|
-
category: string;
|
|
13
|
-
isComponent: boolean;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* GET /components
|
|
18
|
-
*/
|
|
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
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* GET /components/:uid/configuration
|
|
32
|
-
*/
|
|
33
|
-
export declare namespace FindComponentConfiguration {
|
|
34
|
-
export interface Request {
|
|
35
|
-
body: {};
|
|
36
|
-
query: {};
|
|
37
|
-
}
|
|
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
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* PUT /components/:uid/configuration
|
|
53
|
-
*/
|
|
54
|
-
export declare namespace UpdateComponentConfiguration {
|
|
55
|
-
export interface Request {
|
|
56
|
-
body: {
|
|
57
|
-
layouts: Layouts;
|
|
58
|
-
metadatas: Metadatas;
|
|
59
|
-
settings: Settings;
|
|
60
|
-
};
|
|
61
|
-
query: {};
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface Params {
|
|
65
|
-
uid: string;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export interface Response {
|
|
69
|
-
data: ComponentConfiguration;
|
|
70
|
-
error?: errors.ApplicationError | errors.YupValidationError;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
1
|
+
import { Schema } from '@strapi/types';
|
|
2
|
+
import { errors } from '@strapi/utils';
|
|
3
|
+
import { Configuration, Settings, Metadatas, Layouts } from './content-types';
|
|
4
|
+
|
|
5
|
+
export interface Component extends Schema.Component {
|
|
6
|
+
isDisplayed: boolean;
|
|
7
|
+
info: Schema.Info;
|
|
8
|
+
apiID: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface ComponentConfiguration extends Configuration {
|
|
12
|
+
category: string;
|
|
13
|
+
isComponent: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* GET /components
|
|
18
|
+
*/
|
|
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
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* GET /components/:uid/configuration
|
|
32
|
+
*/
|
|
33
|
+
export declare namespace FindComponentConfiguration {
|
|
34
|
+
export interface Request {
|
|
35
|
+
body: {};
|
|
36
|
+
query: {};
|
|
37
|
+
}
|
|
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
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* PUT /components/:uid/configuration
|
|
53
|
+
*/
|
|
54
|
+
export declare namespace UpdateComponentConfiguration {
|
|
55
|
+
export interface Request {
|
|
56
|
+
body: {
|
|
57
|
+
layouts: Layouts;
|
|
58
|
+
metadatas: Metadatas;
|
|
59
|
+
settings: Settings;
|
|
60
|
+
};
|
|
61
|
+
query: {};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface Params {
|
|
65
|
+
uid: string;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface Response {
|
|
69
|
+
data: ComponentConfiguration;
|
|
70
|
+
error?: errors.ApplicationError | errors.YupValidationError;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -1,116 +1,116 @@
|
|
|
1
|
-
import { Schema } from '@strapi/types';
|
|
2
|
-
import { errors } from '@strapi/utils';
|
|
3
|
-
import { ComponentConfiguration } from './components';
|
|
4
|
-
|
|
5
|
-
export type Settings = {
|
|
6
|
-
bulkable: boolean;
|
|
7
|
-
filterable: boolean;
|
|
8
|
-
searchable: boolean;
|
|
9
|
-
pageSize: number;
|
|
10
|
-
mainField: string;
|
|
11
|
-
defaultSortBy: string;
|
|
12
|
-
defaultSortOrder: string;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export type Metadatas = {
|
|
16
|
-
[key: string]: {
|
|
17
|
-
edit: {
|
|
18
|
-
label?: string;
|
|
19
|
-
description?: string;
|
|
20
|
-
placeholder?: string;
|
|
21
|
-
visible?: boolean;
|
|
22
|
-
editable?: boolean;
|
|
23
|
-
};
|
|
24
|
-
list: {
|
|
25
|
-
label?: string;
|
|
26
|
-
searchable?: boolean;
|
|
27
|
-
sortable?: boolean;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export type Layouts = {
|
|
33
|
-
list: string[];
|
|
34
|
-
edit: { name: string; size: number }[][];
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export type Configuration = {
|
|
38
|
-
uid?: string;
|
|
39
|
-
settings: Settings;
|
|
40
|
-
metadatas: Metadatas;
|
|
41
|
-
layouts: Layouts;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export interface ContentType extends Schema.ContentType {
|
|
45
|
-
isDisplayed: boolean;
|
|
46
|
-
apiID: string;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* GET /content-types
|
|
51
|
-
*/
|
|
52
|
-
export declare namespace FindContentTypes {
|
|
53
|
-
export interface Request {
|
|
54
|
-
body: {};
|
|
55
|
-
query: {};
|
|
56
|
-
}
|
|
57
|
-
export interface Response {
|
|
58
|
-
data: ContentType[];
|
|
59
|
-
error?: errors.ApplicationError | errors.YupValidationError;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* GET /content-types-settings
|
|
65
|
-
*/
|
|
66
|
-
export declare namespace FindContentTypesSettings {
|
|
67
|
-
export interface Request {
|
|
68
|
-
body: {};
|
|
69
|
-
query: {};
|
|
70
|
-
}
|
|
71
|
-
export interface Response {
|
|
72
|
-
data: Array<{
|
|
73
|
-
uid: string;
|
|
74
|
-
settings: Settings;
|
|
75
|
-
}>;
|
|
76
|
-
error?: errors.ApplicationError;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* GET /content-types/:uid/configuration
|
|
82
|
-
*/
|
|
83
|
-
export declare namespace FindContentTypeConfiguration {
|
|
84
|
-
export interface Request {
|
|
85
|
-
body: {};
|
|
86
|
-
query: {};
|
|
87
|
-
}
|
|
88
|
-
export interface Response {
|
|
89
|
-
data: {
|
|
90
|
-
contentType: Configuration;
|
|
91
|
-
components: Record<string, ComponentConfiguration>;
|
|
92
|
-
};
|
|
93
|
-
error?: errors.ApplicationError;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* PUT /content-types/:uid/configuration
|
|
99
|
-
*/
|
|
100
|
-
export declare namespace UpdateContentTypeConfiguration {
|
|
101
|
-
export interface Request {
|
|
102
|
-
body: {
|
|
103
|
-
layouts: Layouts;
|
|
104
|
-
metadatas: Metadatas;
|
|
105
|
-
settings: Settings;
|
|
106
|
-
};
|
|
107
|
-
query: {};
|
|
108
|
-
}
|
|
109
|
-
export interface Response {
|
|
110
|
-
data: {
|
|
111
|
-
contentType: Configuration;
|
|
112
|
-
components: Record<string, ComponentConfiguration>;
|
|
113
|
-
};
|
|
114
|
-
error?: errors.ApplicationError | errors.YupValidationError;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
1
|
+
import { Schema } from '@strapi/types';
|
|
2
|
+
import { errors } from '@strapi/utils';
|
|
3
|
+
import { ComponentConfiguration } from './components';
|
|
4
|
+
|
|
5
|
+
export type Settings = {
|
|
6
|
+
bulkable: boolean;
|
|
7
|
+
filterable: boolean;
|
|
8
|
+
searchable: boolean;
|
|
9
|
+
pageSize: number;
|
|
10
|
+
mainField: string;
|
|
11
|
+
defaultSortBy: string;
|
|
12
|
+
defaultSortOrder: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type Metadatas = {
|
|
16
|
+
[key: string]: {
|
|
17
|
+
edit: {
|
|
18
|
+
label?: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
visible?: boolean;
|
|
22
|
+
editable?: boolean;
|
|
23
|
+
};
|
|
24
|
+
list: {
|
|
25
|
+
label?: string;
|
|
26
|
+
searchable?: boolean;
|
|
27
|
+
sortable?: boolean;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type Layouts = {
|
|
33
|
+
list: string[];
|
|
34
|
+
edit: { name: string; size: number }[][];
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export type Configuration = {
|
|
38
|
+
uid?: string;
|
|
39
|
+
settings: Settings;
|
|
40
|
+
metadatas: Metadatas;
|
|
41
|
+
layouts: Layouts;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export interface ContentType extends Schema.ContentType {
|
|
45
|
+
isDisplayed: boolean;
|
|
46
|
+
apiID: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* GET /content-types
|
|
51
|
+
*/
|
|
52
|
+
export declare namespace FindContentTypes {
|
|
53
|
+
export interface Request {
|
|
54
|
+
body: {};
|
|
55
|
+
query: {};
|
|
56
|
+
}
|
|
57
|
+
export interface Response {
|
|
58
|
+
data: ContentType[];
|
|
59
|
+
error?: errors.ApplicationError | errors.YupValidationError;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* GET /content-types-settings
|
|
65
|
+
*/
|
|
66
|
+
export declare namespace FindContentTypesSettings {
|
|
67
|
+
export interface Request {
|
|
68
|
+
body: {};
|
|
69
|
+
query: {};
|
|
70
|
+
}
|
|
71
|
+
export interface Response {
|
|
72
|
+
data: Array<{
|
|
73
|
+
uid: string;
|
|
74
|
+
settings: Settings;
|
|
75
|
+
}>;
|
|
76
|
+
error?: errors.ApplicationError;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* GET /content-types/:uid/configuration
|
|
82
|
+
*/
|
|
83
|
+
export declare namespace FindContentTypeConfiguration {
|
|
84
|
+
export interface Request {
|
|
85
|
+
body: {};
|
|
86
|
+
query: {};
|
|
87
|
+
}
|
|
88
|
+
export interface Response {
|
|
89
|
+
data: {
|
|
90
|
+
contentType: Configuration;
|
|
91
|
+
components: Record<string, ComponentConfiguration>;
|
|
92
|
+
};
|
|
93
|
+
error?: errors.ApplicationError;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* PUT /content-types/:uid/configuration
|
|
99
|
+
*/
|
|
100
|
+
export declare namespace UpdateContentTypeConfiguration {
|
|
101
|
+
export interface Request {
|
|
102
|
+
body: {
|
|
103
|
+
layouts: Layouts;
|
|
104
|
+
metadatas: Metadatas;
|
|
105
|
+
settings: Settings;
|
|
106
|
+
};
|
|
107
|
+
query: {};
|
|
108
|
+
}
|
|
109
|
+
export interface Response {
|
|
110
|
+
data: {
|
|
111
|
+
contentType: Configuration;
|
|
112
|
+
components: Record<string, ComponentConfiguration>;
|
|
113
|
+
};
|
|
114
|
+
error?: errors.ApplicationError | errors.YupValidationError;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * as CollectionTypes from './collection-types';
|
|
2
|
-
export * as Components from './components';
|
|
3
|
-
export * as ContentTypes from './content-types';
|
|
4
|
-
export * as Init from './init';
|
|
5
|
-
export * as Relations from './relations';
|
|
6
|
-
export * as SingleTypes from './single-types';
|
|
7
|
-
export * as UID from './uid';
|
|
8
|
-
export * as ReviewWorkflows from './review-workflows';
|
|
1
|
+
export * as CollectionTypes from './collection-types';
|
|
2
|
+
export * as Components from './components';
|
|
3
|
+
export * as ContentTypes from './content-types';
|
|
4
|
+
export * as Init from './init';
|
|
5
|
+
export * as Relations from './relations';
|
|
6
|
+
export * as SingleTypes from './single-types';
|
|
7
|
+
export * as UID from './uid';
|
|
8
|
+
export * as ReviewWorkflows from './review-workflows';
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { errors } from '@strapi/utils';
|
|
2
|
-
import { Component } from './components';
|
|
3
|
-
import { ContentType } from './content-types';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* GET /init
|
|
7
|
-
*/
|
|
8
|
-
export declare namespace GetInitData {
|
|
9
|
-
export interface Request {
|
|
10
|
-
body: {};
|
|
11
|
-
query: {};
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface Response {
|
|
15
|
-
data: {
|
|
16
|
-
fieldSizes: Record<string, { default: number; isResizeable: boolean }>;
|
|
17
|
-
components: Component[];
|
|
18
|
-
contentTypes: ContentType[];
|
|
19
|
-
};
|
|
20
|
-
error?: errors.ApplicationError;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
1
|
+
import { errors } from '@strapi/utils';
|
|
2
|
+
import { Component } from './components';
|
|
3
|
+
import { ContentType } from './content-types';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* GET /init
|
|
7
|
+
*/
|
|
8
|
+
export declare namespace GetInitData {
|
|
9
|
+
export interface Request {
|
|
10
|
+
body: {};
|
|
11
|
+
query: {};
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface Response {
|
|
15
|
+
data: {
|
|
16
|
+
fieldSizes: Record<string, { default: number; isResizeable: boolean }>;
|
|
17
|
+
components: Component[];
|
|
18
|
+
contentTypes: ContentType[];
|
|
19
|
+
};
|
|
20
|
+
error?: errors.ApplicationError;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
import { Entity, EntityService } from '@strapi/types';
|
|
2
|
-
import { errors } from '@strapi/utils';
|
|
3
|
-
|
|
4
|
-
type PaginationQuery = EntityService.Params.Pagination.PageNotation;
|
|
5
|
-
|
|
6
|
-
export interface RelationResult {
|
|
7
|
-
id: Entity.ID;
|
|
8
|
-
publishedAt: string | null;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* GET /relations/:model/:targetField
|
|
13
|
-
*/
|
|
14
|
-
export declare namespace FindAvailable {
|
|
15
|
-
export interface Request {
|
|
16
|
-
body: {};
|
|
17
|
-
query: {
|
|
18
|
-
pageSize: PaginationQuery['pageSize'];
|
|
19
|
-
page: PaginationQuery['page'];
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface Params {
|
|
24
|
-
model: string;
|
|
25
|
-
targetField: string;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export type Response =
|
|
29
|
-
| {
|
|
30
|
-
results: RelationResult[];
|
|
31
|
-
pagination: {
|
|
32
|
-
page: NonNullable<PaginationQuery['page']>;
|
|
33
|
-
pageSize: NonNullable<PaginationQuery['pageSize']>;
|
|
34
|
-
pageCount: number;
|
|
35
|
-
total: number;
|
|
36
|
-
};
|
|
37
|
-
error?: never;
|
|
38
|
-
}
|
|
39
|
-
| {
|
|
40
|
-
results?: never;
|
|
41
|
-
pagination?: never;
|
|
42
|
-
error?: errors.ApplicationError | errors.YupValidationError;
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* GET /relations/:model/:id/:targetField
|
|
48
|
-
*/
|
|
49
|
-
export declare namespace FindExisting {
|
|
50
|
-
export interface Request {
|
|
51
|
-
body: {};
|
|
52
|
-
query: {};
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export interface Params {
|
|
56
|
-
model: string;
|
|
57
|
-
targetField: string;
|
|
58
|
-
id: number;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export type Response =
|
|
62
|
-
| {
|
|
63
|
-
results: RelationResult[];
|
|
64
|
-
pagination: {
|
|
65
|
-
page: NonNullable<PaginationQuery['page']>;
|
|
66
|
-
pageSize: NonNullable<PaginationQuery['pageSize']>;
|
|
67
|
-
pageCount: number;
|
|
68
|
-
total: number;
|
|
69
|
-
};
|
|
70
|
-
error?: never;
|
|
71
|
-
}
|
|
72
|
-
| {
|
|
73
|
-
data: RelationResult;
|
|
74
|
-
error?: never;
|
|
75
|
-
}
|
|
76
|
-
| {
|
|
77
|
-
data?: never;
|
|
78
|
-
error: errors.ApplicationError | errors.YupValidationError;
|
|
79
|
-
};
|
|
80
|
-
}
|
|
1
|
+
import { Entity, EntityService } from '@strapi/types';
|
|
2
|
+
import { errors } from '@strapi/utils';
|
|
3
|
+
|
|
4
|
+
type PaginationQuery = EntityService.Params.Pagination.PageNotation;
|
|
5
|
+
|
|
6
|
+
export interface RelationResult {
|
|
7
|
+
id: Entity.ID;
|
|
8
|
+
publishedAt: string | null;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* GET /relations/:model/:targetField
|
|
13
|
+
*/
|
|
14
|
+
export declare namespace FindAvailable {
|
|
15
|
+
export interface Request {
|
|
16
|
+
body: {};
|
|
17
|
+
query: {
|
|
18
|
+
pageSize: PaginationQuery['pageSize'];
|
|
19
|
+
page: PaginationQuery['page'];
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface Params {
|
|
24
|
+
model: string;
|
|
25
|
+
targetField: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type Response =
|
|
29
|
+
| {
|
|
30
|
+
results: RelationResult[];
|
|
31
|
+
pagination: {
|
|
32
|
+
page: NonNullable<PaginationQuery['page']>;
|
|
33
|
+
pageSize: NonNullable<PaginationQuery['pageSize']>;
|
|
34
|
+
pageCount: number;
|
|
35
|
+
total: number;
|
|
36
|
+
};
|
|
37
|
+
error?: never;
|
|
38
|
+
}
|
|
39
|
+
| {
|
|
40
|
+
results?: never;
|
|
41
|
+
pagination?: never;
|
|
42
|
+
error?: errors.ApplicationError | errors.YupValidationError;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* GET /relations/:model/:id/:targetField
|
|
48
|
+
*/
|
|
49
|
+
export declare namespace FindExisting {
|
|
50
|
+
export interface Request {
|
|
51
|
+
body: {};
|
|
52
|
+
query: {};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface Params {
|
|
56
|
+
model: string;
|
|
57
|
+
targetField: string;
|
|
58
|
+
id: number;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export type Response =
|
|
62
|
+
| {
|
|
63
|
+
results: RelationResult[];
|
|
64
|
+
pagination: {
|
|
65
|
+
page: NonNullable<PaginationQuery['page']>;
|
|
66
|
+
pageSize: NonNullable<PaginationQuery['pageSize']>;
|
|
67
|
+
pageCount: number;
|
|
68
|
+
total: number;
|
|
69
|
+
};
|
|
70
|
+
error?: never;
|
|
71
|
+
}
|
|
72
|
+
| {
|
|
73
|
+
data: RelationResult;
|
|
74
|
+
error?: never;
|
|
75
|
+
}
|
|
76
|
+
| {
|
|
77
|
+
data?: never;
|
|
78
|
+
error: errors.ApplicationError | errors.YupValidationError;
|
|
79
|
+
};
|
|
80
|
+
}
|