@akemona-org/strapi-plugin-documentation 3.7.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/LICENSE +22 -0
- package/README.md +170 -0
- package/admin/src/assets/images/logo.svg +1 -0
- package/admin/src/components/Block/components.js +26 -0
- package/admin/src/components/Block/index.js +39 -0
- package/admin/src/components/Row/ButtonContainer.js +53 -0
- package/admin/src/components/Row/components.js +83 -0
- package/admin/src/components/Row/index.js +57 -0
- package/admin/src/containers/App/index.js +30 -0
- package/admin/src/containers/HomePage/actions.js +72 -0
- package/admin/src/containers/HomePage/components.js +59 -0
- package/admin/src/containers/HomePage/constants.js +14 -0
- package/admin/src/containers/HomePage/index.js +283 -0
- package/admin/src/containers/HomePage/reducer.js +49 -0
- package/admin/src/containers/HomePage/saga.js +126 -0
- package/admin/src/containers/HomePage/selectors.js +34 -0
- package/admin/src/containers/Initializer/index.js +28 -0
- package/admin/src/containers/Initializer/tests/index.test.js +21 -0
- package/admin/src/index.js +57 -0
- package/admin/src/lifecycles.js +13 -0
- package/admin/src/permissions.js +19 -0
- package/admin/src/pluginId.js +5 -0
- package/admin/src/reducers.js +8 -0
- package/admin/src/translations/ar.json +23 -0
- package/admin/src/translations/cs.json +24 -0
- package/admin/src/translations/de.json +30 -0
- package/admin/src/translations/en.json +31 -0
- package/admin/src/translations/es.json +27 -0
- package/admin/src/translations/fr.json +29 -0
- package/admin/src/translations/id.json +28 -0
- package/admin/src/translations/index.js +49 -0
- package/admin/src/translations/it.json +29 -0
- package/admin/src/translations/ko.json +24 -0
- package/admin/src/translations/ms.json +26 -0
- package/admin/src/translations/nl.json +24 -0
- package/admin/src/translations/pl.json +27 -0
- package/admin/src/translations/pt-BR.json +24 -0
- package/admin/src/translations/pt.json +24 -0
- package/admin/src/translations/ru.json +31 -0
- package/admin/src/translations/sk.json +27 -0
- package/admin/src/translations/th.json +27 -0
- package/admin/src/translations/tr.json +23 -0
- package/admin/src/translations/uk.json +26 -0
- package/admin/src/translations/vi.json +27 -0
- package/admin/src/translations/zh-Hans.json +31 -0
- package/admin/src/translations/zh.json +27 -0
- package/admin/src/utils/getTrad.js +5 -0
- package/admin/src/utils/openWithNewTab.js +20 -0
- package/config/functions/bootstrap.js +138 -0
- package/config/policies/index.js +35 -0
- package/config/routes.json +74 -0
- package/config/settings.json +46 -0
- package/controllers/Documentation.js +303 -0
- package/middlewares/documentation/defaults.json +5 -0
- package/middlewares/documentation/index.js +59 -0
- package/package.json +89 -0
- package/public/index.html +57 -0
- package/public/login.html +135 -0
- package/services/Documentation.js +1861 -0
- package/services/Token.js +31 -0
- package/services/utils/components.json +25 -0
- package/services/utils/forms.json +29 -0
- package/services/utils/parametersOptions.json +134 -0
- package/services/utils/unknownComponent.json +11 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const jwt = require('jsonwebtoken');
|
|
4
|
+
|
|
5
|
+
module.exports = {
|
|
6
|
+
async create() {
|
|
7
|
+
const pluginStore = strapi.store({
|
|
8
|
+
environment: '',
|
|
9
|
+
type: 'plugin',
|
|
10
|
+
name: 'documentation',
|
|
11
|
+
});
|
|
12
|
+
const config = await pluginStore.get({ key: 'config' });
|
|
13
|
+
|
|
14
|
+
return jwt.sign({}, config.password);
|
|
15
|
+
},
|
|
16
|
+
async validate(token) {
|
|
17
|
+
const pluginStore = strapi.store({
|
|
18
|
+
environment: '',
|
|
19
|
+
type: 'plugin',
|
|
20
|
+
name: 'documentation',
|
|
21
|
+
});
|
|
22
|
+
const config = await pluginStore.get({ key: 'config' });
|
|
23
|
+
|
|
24
|
+
try {
|
|
25
|
+
jwt.verify(token, config.password);
|
|
26
|
+
return true;
|
|
27
|
+
} catch (e) {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"components": {
|
|
3
|
+
"securitySchemes": {
|
|
4
|
+
"bearerAuth": {
|
|
5
|
+
"type": "http",
|
|
6
|
+
"scheme": "bearer",
|
|
7
|
+
"bearerFormat": "JWT"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"schemas": {
|
|
11
|
+
"Error": {
|
|
12
|
+
"required": ["code", "message"],
|
|
13
|
+
"properties": {
|
|
14
|
+
"code": {
|
|
15
|
+
"type": "integer",
|
|
16
|
+
"format": "int32"
|
|
17
|
+
},
|
|
18
|
+
"message": {
|
|
19
|
+
"type": "string"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[
|
|
2
|
+
[
|
|
3
|
+
{
|
|
4
|
+
"name": "restrictedAccess",
|
|
5
|
+
"label": {
|
|
6
|
+
"id": "documentation.containers.HomePage.form.restrictedAccess"
|
|
7
|
+
},
|
|
8
|
+
"type": "toggle",
|
|
9
|
+
"inputDescription": {
|
|
10
|
+
"id": "documentation.containers.HomePage.form.restrictedAccess.inputDescription"
|
|
11
|
+
},
|
|
12
|
+
"inputDescriptionStyle": { "marginBottom": "2px"},
|
|
13
|
+
"value": false
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "password",
|
|
17
|
+
"label": {
|
|
18
|
+
"id": "documentation.containers.HomePage.form.password"
|
|
19
|
+
},
|
|
20
|
+
"customBootstrapClass": "col-md-4",
|
|
21
|
+
"type": "password",
|
|
22
|
+
"inputDescription": {
|
|
23
|
+
"id": "documentation.containers.HomePage.form.password.inputDescription"
|
|
24
|
+
},
|
|
25
|
+
"validations": { "required": true },
|
|
26
|
+
"value": ""
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
]
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "_limit",
|
|
4
|
+
"in": "query",
|
|
5
|
+
"required": false,
|
|
6
|
+
"description": "Maximum number of results possible",
|
|
7
|
+
"schema": {
|
|
8
|
+
"type": "integer"
|
|
9
|
+
},
|
|
10
|
+
"deprecated": false
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "_sort",
|
|
14
|
+
"in": "query",
|
|
15
|
+
"required": false,
|
|
16
|
+
"description": "Sort according to a specific field.",
|
|
17
|
+
"schema": {
|
|
18
|
+
"type": "string"
|
|
19
|
+
},
|
|
20
|
+
"deprecated": false
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "_start",
|
|
24
|
+
"in": "query",
|
|
25
|
+
"required": false,
|
|
26
|
+
"description": "Skip a specific number of entries (especially useful for pagination)",
|
|
27
|
+
"schema": {
|
|
28
|
+
"type": "integer"
|
|
29
|
+
},
|
|
30
|
+
"deprecated": false
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "=",
|
|
34
|
+
"in": "query",
|
|
35
|
+
"required": false,
|
|
36
|
+
"description": "Get entries that matches exactly your input",
|
|
37
|
+
"schema": {
|
|
38
|
+
"type": "string"
|
|
39
|
+
},
|
|
40
|
+
"deprecated": false
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "_ne",
|
|
44
|
+
"in": "query",
|
|
45
|
+
"required": false,
|
|
46
|
+
"description": "Get records that are not equals to something",
|
|
47
|
+
"schema": {
|
|
48
|
+
"type": "string"
|
|
49
|
+
},
|
|
50
|
+
"deprecated": false
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "_lt",
|
|
54
|
+
"in": "query",
|
|
55
|
+
"required": false,
|
|
56
|
+
"description": "Get record that are lower than a value",
|
|
57
|
+
"schema": {
|
|
58
|
+
"type": "string"
|
|
59
|
+
},
|
|
60
|
+
"deprecated": false
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "_lte",
|
|
64
|
+
"in": "query",
|
|
65
|
+
"required": false,
|
|
66
|
+
"description": "Get records that are lower than or equal to a value",
|
|
67
|
+
"schema": {
|
|
68
|
+
"type": "string"
|
|
69
|
+
},
|
|
70
|
+
"deprecated": false
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "_gt",
|
|
74
|
+
"in": "query",
|
|
75
|
+
"required": false,
|
|
76
|
+
"description": "Get records that are greater than a value",
|
|
77
|
+
"schema": {
|
|
78
|
+
"type": "string"
|
|
79
|
+
},
|
|
80
|
+
"deprecated": false
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "_gte",
|
|
84
|
+
"in": "query",
|
|
85
|
+
"required": false,
|
|
86
|
+
"description": "Get records that are greater than or equal a value",
|
|
87
|
+
"schema": {
|
|
88
|
+
"type": "string"
|
|
89
|
+
},
|
|
90
|
+
"deprecated": false
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "_contains",
|
|
94
|
+
"in": "query",
|
|
95
|
+
"required": false,
|
|
96
|
+
"description": "Get records that contains a value",
|
|
97
|
+
"schema": {
|
|
98
|
+
"type": "string"
|
|
99
|
+
},
|
|
100
|
+
"deprecated": false
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "_containss",
|
|
104
|
+
"in": "query",
|
|
105
|
+
"required": false,
|
|
106
|
+
"description": "Get records that contains (case sensitive) a value",
|
|
107
|
+
"schema": {
|
|
108
|
+
"type": "string"
|
|
109
|
+
},
|
|
110
|
+
"deprecated": false
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "_in",
|
|
114
|
+
"in": "query",
|
|
115
|
+
"required": false,
|
|
116
|
+
"description": "Get records that matches any value in the array of values",
|
|
117
|
+
"schema": {
|
|
118
|
+
"type": "array",
|
|
119
|
+
"items": { "type": "string" }
|
|
120
|
+
},
|
|
121
|
+
"deprecated": false
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "_nin",
|
|
125
|
+
"in": "query",
|
|
126
|
+
"required": false,
|
|
127
|
+
"description": "Get records that doesn't match any value in the array of values",
|
|
128
|
+
"schema": {
|
|
129
|
+
"type": "array",
|
|
130
|
+
"items": { "type": "string" }
|
|
131
|
+
},
|
|
132
|
+
"deprecated": false
|
|
133
|
+
}
|
|
134
|
+
]
|