@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.
Files changed (64) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +170 -0
  3. package/admin/src/assets/images/logo.svg +1 -0
  4. package/admin/src/components/Block/components.js +26 -0
  5. package/admin/src/components/Block/index.js +39 -0
  6. package/admin/src/components/Row/ButtonContainer.js +53 -0
  7. package/admin/src/components/Row/components.js +83 -0
  8. package/admin/src/components/Row/index.js +57 -0
  9. package/admin/src/containers/App/index.js +30 -0
  10. package/admin/src/containers/HomePage/actions.js +72 -0
  11. package/admin/src/containers/HomePage/components.js +59 -0
  12. package/admin/src/containers/HomePage/constants.js +14 -0
  13. package/admin/src/containers/HomePage/index.js +283 -0
  14. package/admin/src/containers/HomePage/reducer.js +49 -0
  15. package/admin/src/containers/HomePage/saga.js +126 -0
  16. package/admin/src/containers/HomePage/selectors.js +34 -0
  17. package/admin/src/containers/Initializer/index.js +28 -0
  18. package/admin/src/containers/Initializer/tests/index.test.js +21 -0
  19. package/admin/src/index.js +57 -0
  20. package/admin/src/lifecycles.js +13 -0
  21. package/admin/src/permissions.js +19 -0
  22. package/admin/src/pluginId.js +5 -0
  23. package/admin/src/reducers.js +8 -0
  24. package/admin/src/translations/ar.json +23 -0
  25. package/admin/src/translations/cs.json +24 -0
  26. package/admin/src/translations/de.json +30 -0
  27. package/admin/src/translations/en.json +31 -0
  28. package/admin/src/translations/es.json +27 -0
  29. package/admin/src/translations/fr.json +29 -0
  30. package/admin/src/translations/id.json +28 -0
  31. package/admin/src/translations/index.js +49 -0
  32. package/admin/src/translations/it.json +29 -0
  33. package/admin/src/translations/ko.json +24 -0
  34. package/admin/src/translations/ms.json +26 -0
  35. package/admin/src/translations/nl.json +24 -0
  36. package/admin/src/translations/pl.json +27 -0
  37. package/admin/src/translations/pt-BR.json +24 -0
  38. package/admin/src/translations/pt.json +24 -0
  39. package/admin/src/translations/ru.json +31 -0
  40. package/admin/src/translations/sk.json +27 -0
  41. package/admin/src/translations/th.json +27 -0
  42. package/admin/src/translations/tr.json +23 -0
  43. package/admin/src/translations/uk.json +26 -0
  44. package/admin/src/translations/vi.json +27 -0
  45. package/admin/src/translations/zh-Hans.json +31 -0
  46. package/admin/src/translations/zh.json +27 -0
  47. package/admin/src/utils/getTrad.js +5 -0
  48. package/admin/src/utils/openWithNewTab.js +20 -0
  49. package/config/functions/bootstrap.js +138 -0
  50. package/config/policies/index.js +35 -0
  51. package/config/routes.json +74 -0
  52. package/config/settings.json +46 -0
  53. package/controllers/Documentation.js +303 -0
  54. package/middlewares/documentation/defaults.json +5 -0
  55. package/middlewares/documentation/index.js +59 -0
  56. package/package.json +89 -0
  57. package/public/index.html +57 -0
  58. package/public/login.html +135 -0
  59. package/services/Documentation.js +1861 -0
  60. package/services/Token.js +31 -0
  61. package/services/utils/components.json +25 -0
  62. package/services/utils/forms.json +29 -0
  63. package/services/utils/parametersOptions.json +134 -0
  64. 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
+ ]
@@ -0,0 +1,11 @@
1
+ {
2
+ "components": {
3
+ "schemas": {
4
+ "Foo": {
5
+ "properties": {
6
+ "bar": "string"
7
+ }
8
+ }
9
+ }
10
+ }
11
+ }