@webda/core 2.0.0-beta.3 → 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 (276) hide show
  1. package/lib/application.d.ts +5 -5
  2. package/lib/application.js +71 -84
  3. package/lib/application.js.map +1 -1
  4. package/lib/application.spec.js +121 -140
  5. package/lib/application.spec.js.map +1 -1
  6. package/lib/core.d.ts +20 -24
  7. package/lib/core.js +222 -315
  8. package/lib/core.js.map +1 -1
  9. package/lib/core.spec.js +332 -406
  10. package/lib/core.spec.js.map +1 -1
  11. package/lib/index.d.ts +49 -48
  12. package/lib/index.js +53 -70
  13. package/lib/index.js.map +1 -1
  14. package/lib/models/aclmodel.d.ts +2 -2
  15. package/lib/models/aclmodel.js +63 -90
  16. package/lib/models/aclmodel.js.map +1 -1
  17. package/lib/models/aclmodel.spec.js +127 -152
  18. package/lib/models/aclmodel.spec.js.map +1 -1
  19. package/lib/models/coremodel.d.ts +7 -6
  20. package/lib/models/coremodel.js +65 -113
  21. package/lib/models/coremodel.js.map +1 -1
  22. package/lib/models/coremodel.spec.js +88 -107
  23. package/lib/models/coremodel.spec.js.map +1 -1
  24. package/lib/models/deployment.js +1 -2
  25. package/lib/models/ident.d.ts +3 -3
  26. package/lib/models/ident.js +4 -9
  27. package/lib/models/ident.js.map +1 -1
  28. package/lib/models/ident.spec.js +9 -11
  29. package/lib/models/ident.spec.js.map +1 -1
  30. package/lib/models/ownermodel.d.ts +2 -2
  31. package/lib/models/ownermodel.js +39 -62
  32. package/lib/models/ownermodel.js.map +1 -1
  33. package/lib/models/ownermodel.spec.js +126 -168
  34. package/lib/models/ownermodel.spec.js.map +1 -1
  35. package/lib/models/rolemodel.d.ts +1 -1
  36. package/lib/models/rolemodel.js +24 -40
  37. package/lib/models/rolemodel.js.map +1 -1
  38. package/lib/models/rolemodel.spec.js +44 -63
  39. package/lib/models/rolemodel.spec.js.map +1 -1
  40. package/lib/models/user.d.ts +3 -3
  41. package/lib/models/user.js +3 -8
  42. package/lib/models/user.js.map +1 -1
  43. package/lib/models/user.spec.js +14 -16
  44. package/lib/models/user.spec.js.map +1 -1
  45. package/lib/queues/filequeue.d.ts +2 -2
  46. package/lib/queues/filequeue.js +72 -93
  47. package/lib/queues/filequeue.js.map +1 -1
  48. package/lib/queues/filequeue.spec.js +53 -70
  49. package/lib/queues/filequeue.spec.js.map +1 -1
  50. package/lib/queues/memoryqueue.d.ts +2 -2
  51. package/lib/queues/memoryqueue.js +37 -61
  52. package/lib/queues/memoryqueue.js.map +1 -1
  53. package/lib/queues/memoryqueue.spec.js +142 -165
  54. package/lib/queues/memoryqueue.spec.js.map +1 -1
  55. package/lib/queues/pubsubservice.d.ts +2 -2
  56. package/lib/queues/pubsubservice.js +3 -7
  57. package/lib/queues/pubsubservice.js.map +1 -1
  58. package/lib/queues/queue.spec.d.ts +1 -1
  59. package/lib/queues/queue.spec.js +42 -56
  60. package/lib/queues/queue.spec.js.map +1 -1
  61. package/lib/queues/queueservice.d.ts +3 -3
  62. package/lib/queues/queueservice.js +51 -67
  63. package/lib/queues/queueservice.js.map +1 -1
  64. package/lib/router.d.ts +3 -3
  65. package/lib/router.js +46 -47
  66. package/lib/router.js.map +1 -1
  67. package/lib/router.spec.js +64 -61
  68. package/lib/router.spec.js.map +1 -1
  69. package/lib/services/asyncevents.d.ts +2 -2
  70. package/lib/services/asyncevents.js +44 -64
  71. package/lib/services/asyncevents.js.map +1 -1
  72. package/lib/services/asyncevents.spec.js +81 -98
  73. package/lib/services/asyncevents.spec.js.map +1 -1
  74. package/lib/services/authentication.d.ts +23 -13
  75. package/lib/services/authentication.js +537 -563
  76. package/lib/services/authentication.js.map +1 -1
  77. package/lib/services/authentication.spec.js +411 -447
  78. package/lib/services/authentication.spec.js.map +1 -1
  79. package/lib/services/binary.d.ts +7 -5
  80. package/lib/services/binary.js +211 -244
  81. package/lib/services/binary.js.map +1 -1
  82. package/lib/services/binary.spec.d.ts +3 -3
  83. package/lib/services/binary.spec.js +390 -443
  84. package/lib/services/binary.spec.js.map +1 -1
  85. package/lib/services/cloudbinary.d.ts +3 -3
  86. package/lib/services/cloudbinary.js +45 -70
  87. package/lib/services/cloudbinary.js.map +1 -1
  88. package/lib/services/cloudbinary.spec.d.ts +3 -3
  89. package/lib/services/cloudbinary.spec.js +133 -162
  90. package/lib/services/cloudbinary.spec.js.map +1 -1
  91. package/lib/services/configuration.d.ts +1 -1
  92. package/lib/services/configuration.js +78 -105
  93. package/lib/services/configuration.js.map +1 -1
  94. package/lib/services/configuration.spec.js +63 -83
  95. package/lib/services/configuration.spec.js.map +1 -1
  96. package/lib/services/cron.d.ts +3 -2
  97. package/lib/services/cron.js +9 -13
  98. package/lib/services/cron.js.map +1 -1
  99. package/lib/services/cron.spec.js +18 -21
  100. package/lib/services/cron.spec.js.map +1 -1
  101. package/lib/services/cryptoservice.d.ts +9 -4
  102. package/lib/services/cryptoservice.js +187 -221
  103. package/lib/services/cryptoservice.js.map +1 -1
  104. package/lib/services/cryptoservice.spec.js +88 -115
  105. package/lib/services/cryptoservice.spec.js.map +1 -1
  106. package/lib/services/debugmailer.d.ts +1 -1
  107. package/lib/services/debugmailer.js +13 -34
  108. package/lib/services/debugmailer.js.map +1 -1
  109. package/lib/services/debugmailer.spec.js +16 -29
  110. package/lib/services/debugmailer.spec.js.map +1 -1
  111. package/lib/services/echo.d.ts +2 -2
  112. package/lib/services/echo.js +15 -31
  113. package/lib/services/echo.js.map +1 -1
  114. package/lib/services/echo.spec.js +27 -40
  115. package/lib/services/echo.spec.js.map +1 -1
  116. package/lib/services/filebinary.d.ts +5 -5
  117. package/lib/services/filebinary.js +165 -210
  118. package/lib/services/filebinary.js.map +1 -1
  119. package/lib/services/filebinary.spec.d.ts +2 -1
  120. package/lib/services/filebinary.spec.js +106 -116
  121. package/lib/services/filebinary.spec.js.map +1 -1
  122. package/lib/services/fileconfiguration.d.ts +1 -1
  123. package/lib/services/fileconfiguration.js +25 -44
  124. package/lib/services/fileconfiguration.js.map +1 -1
  125. package/lib/services/fileconfiguration.spec.js +79 -109
  126. package/lib/services/fileconfiguration.spec.js.map +1 -1
  127. package/lib/services/invitationservice.d.ts +7 -7
  128. package/lib/services/invitationservice.js +274 -314
  129. package/lib/services/invitationservice.js.map +1 -1
  130. package/lib/services/invitationservice.spec.js +442 -448
  131. package/lib/services/invitationservice.spec.js.map +1 -1
  132. package/lib/services/kubernetesconfiguration.d.ts +1 -1
  133. package/lib/services/kubernetesconfiguration.js +41 -60
  134. package/lib/services/kubernetesconfiguration.js.map +1 -1
  135. package/lib/services/kubernetesconfiguration.spec.js +80 -98
  136. package/lib/services/kubernetesconfiguration.spec.js.map +1 -1
  137. package/lib/services/mailer.d.ts +4 -4
  138. package/lib/services/mailer.js +62 -86
  139. package/lib/services/mailer.js.map +1 -1
  140. package/lib/services/mailer.spec.js +86 -127
  141. package/lib/services/mailer.spec.js.map +1 -1
  142. package/lib/services/notificationservice.d.ts +3 -3
  143. package/lib/services/notificationservice.js +21 -42
  144. package/lib/services/notificationservice.js.map +1 -1
  145. package/lib/services/notificationservice.spec.js +47 -73
  146. package/lib/services/notificationservice.spec.js.map +1 -1
  147. package/lib/services/oauth.d.ts +4 -4
  148. package/lib/services/oauth.js +68 -83
  149. package/lib/services/oauth.js.map +1 -1
  150. package/lib/services/oauth.spec.js +130 -156
  151. package/lib/services/oauth.spec.js.map +1 -1
  152. package/lib/services/proxy.d.ts +2 -6
  153. package/lib/services/proxy.js +45 -58
  154. package/lib/services/proxy.js.map +1 -1
  155. package/lib/services/proxy.spec.js +34 -53
  156. package/lib/services/proxy.spec.js.map +1 -1
  157. package/lib/services/resource.d.ts +2 -2
  158. package/lib/services/resource.js +12 -18
  159. package/lib/services/resource.js.map +1 -1
  160. package/lib/services/resource.spec.js +67 -99
  161. package/lib/services/resource.spec.js.map +1 -1
  162. package/lib/services/service.d.ts +26 -3
  163. package/lib/services/service.js +68 -40
  164. package/lib/services/service.js.map +1 -1
  165. package/lib/services/service.spec.js +62 -67
  166. package/lib/services/service.spec.js.map +1 -1
  167. package/lib/services/version.d.ts +1 -1
  168. package/lib/services/version.js +3 -8
  169. package/lib/services/version.js.map +1 -1
  170. package/lib/services/version.spec.js +11 -24
  171. package/lib/services/version.spec.js.map +1 -1
  172. package/lib/stores/aggregator.d.ts +2 -2
  173. package/lib/stores/aggregator.js +37 -58
  174. package/lib/stores/aggregator.js.map +1 -1
  175. package/lib/stores/file.d.ts +3 -3
  176. package/lib/stores/file.js +93 -131
  177. package/lib/stores/file.js.map +1 -1
  178. package/lib/stores/file.spec.d.ts +2 -2
  179. package/lib/stores/file.spec.js +261 -289
  180. package/lib/stores/file.spec.js.map +1 -1
  181. package/lib/stores/mapper.d.ts +3 -3
  182. package/lib/stores/mapper.js +110 -137
  183. package/lib/stores/mapper.js.map +1 -1
  184. package/lib/stores/mapper.spec.js +131 -150
  185. package/lib/stores/mapper.spec.js.map +1 -1
  186. package/lib/stores/memory.d.ts +3 -3
  187. package/lib/stores/memory.js +98 -144
  188. package/lib/stores/memory.js.map +1 -1
  189. package/lib/stores/memory.spec.d.ts +2 -2
  190. package/lib/stores/memory.spec.js +124 -145
  191. package/lib/stores/memory.spec.js.map +1 -1
  192. package/lib/stores/store.d.ts +17 -13
  193. package/lib/stores/store.js +819 -847
  194. package/lib/stores/store.js.map +1 -1
  195. package/lib/stores/store.spec.d.ts +5 -4
  196. package/lib/stores/store.spec.js +624 -669
  197. package/lib/stores/store.spec.js.map +1 -1
  198. package/lib/stores/webdaql/WebdaQLLexer.d.ts +4 -4
  199. package/lib/stores/webdaql/WebdaQLLexer.js +9 -13
  200. package/lib/stores/webdaql/WebdaQLLexer.js.map +1 -1
  201. package/lib/stores/webdaql/WebdaQLParserLexer.d.ts +4 -4
  202. package/lib/stores/webdaql/WebdaQLParserLexer.js +9 -13
  203. package/lib/stores/webdaql/WebdaQLParserLexer.js.map +1 -1
  204. package/lib/stores/webdaql/WebdaQLParserListener.d.ts +2 -2
  205. package/lib/stores/webdaql/WebdaQLParserListener.js +1 -2
  206. package/lib/stores/webdaql/WebdaQLParserListener.js.map +1 -1
  207. package/lib/stores/webdaql/WebdaQLParserParser.d.ts +10 -10
  208. package/lib/stores/webdaql/WebdaQLParserParser.js +62 -91
  209. package/lib/stores/webdaql/WebdaQLParserParser.js.map +1 -1
  210. package/lib/stores/webdaql/WebdaQLParserVisitor.d.ts +2 -2
  211. package/lib/stores/webdaql/WebdaQLParserVisitor.js +1 -2
  212. package/lib/stores/webdaql/WebdaQLParserVisitor.js.map +1 -1
  213. package/lib/stores/webdaql/query.d.ts +4 -5
  214. package/lib/stores/webdaql/query.js +16 -19
  215. package/lib/stores/webdaql/query.js.map +1 -1
  216. package/lib/stores/webdaql/query.spec.js +30 -32
  217. package/lib/stores/webdaql/query.spec.js.map +1 -1
  218. package/lib/test.d.ts +3 -3
  219. package/lib/test.js +73 -100
  220. package/lib/test.js.map +1 -1
  221. package/lib/unpackedapplication.d.ts +1 -1
  222. package/lib/unpackedapplication.js +25 -31
  223. package/lib/unpackedapplication.js.map +1 -1
  224. package/lib/utils/abstractdeployer.js +1 -5
  225. package/lib/utils/abstractdeployer.js.map +1 -1
  226. package/lib/utils/abstractdeployer.spec.js +6 -8
  227. package/lib/utils/abstractdeployer.spec.js.map +1 -1
  228. package/lib/utils/context.d.ts +7 -5
  229. package/lib/utils/context.js +95 -103
  230. package/lib/utils/context.js.map +1 -1
  231. package/lib/utils/context.spec.js +139 -163
  232. package/lib/utils/context.spec.js.map +1 -1
  233. package/lib/utils/cookie.d.ts +3 -3
  234. package/lib/utils/cookie.js +42 -61
  235. package/lib/utils/cookie.js.map +1 -1
  236. package/lib/utils/cookie.spec.js +42 -64
  237. package/lib/utils/cookie.spec.js.map +1 -1
  238. package/lib/utils/esm.d.ts +4 -0
  239. package/lib/utils/esm.js +10 -0
  240. package/lib/utils/esm.js.map +1 -0
  241. package/lib/utils/httpcontext.d.ts +3 -0
  242. package/lib/utils/httpcontext.js +48 -65
  243. package/lib/utils/httpcontext.js.map +1 -1
  244. package/lib/utils/httpcontext.spec.js +37 -56
  245. package/lib/utils/httpcontext.spec.js.map +1 -1
  246. package/lib/utils/logger.d.ts +2 -2
  247. package/lib/utils/logger.js +15 -28
  248. package/lib/utils/logger.js.map +1 -1
  249. package/lib/utils/logger.spec.js +9 -11
  250. package/lib/utils/logger.spec.js.map +1 -1
  251. package/lib/utils/serializers.js +17 -20
  252. package/lib/utils/serializers.js.map +1 -1
  253. package/lib/utils/serializers.spec.js +43 -44
  254. package/lib/utils/serializers.spec.js.map +1 -1
  255. package/lib/utils/session.d.ts +6 -6
  256. package/lib/utils/session.js +37 -59
  257. package/lib/utils/session.js.map +1 -1
  258. package/lib/utils/session.spec.js +38 -51
  259. package/lib/utils/session.spec.js.map +1 -1
  260. package/lib/utils/waiter.d.ts +1 -1
  261. package/lib/utils/waiter.js +32 -52
  262. package/lib/utils/waiter.js.map +1 -1
  263. package/lib/utils/waiter.spec.js +75 -92
  264. package/lib/utils/waiter.spec.js.map +1 -1
  265. package/package.json +17 -12
  266. package/test/config-invitation.json +1 -3
  267. package/test/config.json +1 -2
  268. package/test/config.old.json +1 -2
  269. package/test/moddas/annotatedservice.js +5 -5
  270. package/test/moddas/debugmailer.js +2 -3
  271. package/test/moddas/fakeservice.js +2 -3
  272. package/test/moddas/voidstore.js +6 -4
  273. package/test/models/ident.js +2 -6
  274. package/test/models/task.js +3 -7
  275. package/test/package.json +2 -1
  276. package/webda.module.json +956 -189
package/webda.module.json CHANGED
@@ -3,11 +3,11 @@
3
3
  "webda/aggregator": "lib/stores/aggregator:default",
4
4
  "webda/asyncevents": "lib/services/asyncevents:EventService",
5
5
  "webda/authentication": "lib/services/authentication:Authentication",
6
- "webda/cookiesessionmanager": "lib/utils/session:CookieSessionManager",
7
6
  "webda/configurationservice": "lib/services/configuration:default",
8
7
  "webda/consolelogger": "lib/utils/logger:ConsoleLoggerService",
8
+ "webda/cookiesessionmanager": "lib/utils/session:CookieSessionManager",
9
9
  "webda/cronservice": "lib/services/cron:CronService",
10
- "webda/cryptoservice": "lib/services/cryptoservice:CryptoService",
10
+ "webda/cryptoservice": "lib/services/cryptoservice:default",
11
11
  "webda/debugmailer": "lib/services/debugmailer:default",
12
12
  "webda/echoservice": "lib/services/echo:EchoService",
13
13
  "webda/filebinary": "lib/services/filebinary:FileBinary",
@@ -23,6 +23,7 @@
23
23
  "webda/memoryqueue": "lib/queues/memoryqueue:MemoryQueue",
24
24
  "webda/memorystore": "lib/stores/memory:MemoryStore",
25
25
  "webda/multinotificationservice": "lib/services/notificationservice:default",
26
+ "webda/proxyservice": "lib/services/proxy:ProxyService",
26
27
  "webda/resourceservice": "lib/services/resource:default",
27
28
  "webda/versionservice": "lib/services/version:VersionService"
28
29
  },
@@ -33,6 +34,7 @@
33
34
  "webda/coremodel": "lib/models/coremodel:CoreModel",
34
35
  "webda/ident": "lib/models/ident:Ident",
35
36
  "webda/ownermodel": "lib/models/ownermodel:OwnerModel",
37
+ "webda/securecookie": "lib/utils/cookie:SecureCookie",
36
38
  "webda/session": "lib/utils/session:Session",
37
39
  "webda/user": "lib/models/user:User"
38
40
  },
@@ -68,118 +70,430 @@
68
70
  "description": "UUID of the object"
69
71
  }
70
72
  },
71
- "required": ["uuid"],
73
+ "required": [
74
+ "uuid"
75
+ ],
72
76
  "$schema": "http://json-schema.org/draft-07/schema#",
73
77
  "title": "OwnerModel"
74
78
  },
75
- "webda/ident": {
79
+ "webda/cryptoservice": {
76
80
  "type": "object",
77
81
  "properties": {
78
- "_creationDate": {
79
- "type": "string",
80
- "format": "date-time",
81
- "description": "Creation date",
82
- "readOnly": true
83
- },
84
- "_lastUpdate": {
82
+ "type": {
85
83
  "type": "string",
86
- "format": "date-time",
87
- "description": "Last update date",
88
- "readOnly": true
84
+ "description": "Type of the service"
89
85
  },
90
- "_user": {
86
+ "url": {
91
87
  "type": "string",
92
- "description": "Default owner of the object",
93
- "readOnly": true
94
- },
95
- "public": {
96
- "type": "boolean",
97
- "description": "Define if the object is publicly readable",
98
- "default": false
88
+ "description": "To expose JWKS"
99
89
  },
100
- "uuid": {
101
- "type": "string",
102
- "description": "UUID of the object"
90
+ "keyActiveLifespan": {
91
+ "type": "number",
92
+ "description": "Number of hours a key should be used for encryption\n\nif auto-rotate is not set this"
103
93
  },
104
- "_type": {
105
- "type": "string",
106
- "readOnly": true
94
+ "keyLifespan": {
95
+ "type": "number",
96
+ "description": "Number of hours allowed to decrypt data encrypted with this key"
107
97
  },
108
- "uid": {
109
- "type": "string"
98
+ "autoRotate": {
99
+ "type": "number",
100
+ "description": "Try to rotate keys when they expire in days"
110
101
  },
111
- "_lastUsed": {
112
- "type": "string",
113
- "format": "date-time",
114
- "readOnly": true
102
+ "autoCreate": {
103
+ "type": "boolean",
104
+ "description": "Create first set of key if does not exist"
105
+ },
106
+ "asymetricType": {
107
+ "type": "string",
108
+ "enum": [
109
+ "rsa",
110
+ "dsa",
111
+ "ec",
112
+ "ed25519",
113
+ "ed448",
114
+ "x25519",
115
+ "x448",
116
+ "dh"
117
+ ],
118
+ "description": "Type of asymetric key\n\nhttps://nodejs.org/api/crypto.html#cryptogeneratekeypairsynctype-options https://nodejs.org/docs/latest-v14.x/api/crypto.html#crypto_crypto_generatekeypairsync_type_options"
115
119
  },
116
- "_failedLogin": {
117
- "type": "number",
118
- "readOnly": true
120
+ "asymetricOptions": {
121
+ "type": "object",
122
+ "properties": {
123
+ "modulusLength": {
124
+ "type": "number",
125
+ "default": 2048
126
+ },
127
+ "namedCurve": {
128
+ "type": "string",
129
+ "description": "Only if asymetricType \"ec\""
130
+ },
131
+ "publicKeyEncoding": {
132
+ "type": "object",
133
+ "properties": {
134
+ "type": {
135
+ "type": "string",
136
+ "enum": [
137
+ "spki",
138
+ "pkcs1"
139
+ ],
140
+ "default": "spki"
141
+ },
142
+ "format": {
143
+ "type": "string",
144
+ "const": "pem"
145
+ }
146
+ }
147
+ },
148
+ "privateKeyEncoding": {
149
+ "type": "object",
150
+ "properties": {
151
+ "type": {
152
+ "type": "string",
153
+ "enum": [
154
+ "pkcs1",
155
+ "pkcs8",
156
+ "sec1"
157
+ ],
158
+ "description": "https://nodejs.org/docs/latest-v14.x/api/crypto.html#crypto_keyobject_export_options",
159
+ "default": "pkcs8"
160
+ },
161
+ "format": {
162
+ "type": "string",
163
+ "const": "pem"
164
+ },
165
+ "cipher": {
166
+ "type": "string"
167
+ },
168
+ "passphrase": {
169
+ "type": "string"
170
+ }
171
+ }
172
+ }
173
+ },
174
+ "description": "Options for asymetric generation"
119
175
  },
120
- "_lastValidationEmail": {
176
+ "symetricKeyLength": {
121
177
  "type": "number",
122
- "description": "If EmailIdent",
123
- "readOnly": true
178
+ "default": 256
124
179
  },
125
- "_validation": {
180
+ "symetricCipher": {
126
181
  "type": "string",
127
- "format": "date-time",
128
- "description": "When the ident was validated",
129
- "readOnly": true
182
+ "default": "aes-256-ctr"
130
183
  },
131
- "email": {
132
- "type": "string",
133
- "description": "Email for this ident if it exist"
184
+ "jwt": {
185
+ "type": "object",
186
+ "properties": {
187
+ "secretOrPublicKey": {
188
+ "anyOf": [
189
+ {
190
+ "type": "string"
191
+ },
192
+ {
193
+ "type": "object",
194
+ "properties": {
195
+ "BYTES_PER_ELEMENT": {
196
+ "type": "number"
197
+ },
198
+ "buffer": {
199
+ "$ref": "#/definitions/ArrayBufferLike"
200
+ },
201
+ "byteLength": {
202
+ "type": "number"
203
+ },
204
+ "byteOffset": {
205
+ "type": "number"
206
+ },
207
+ "length": {
208
+ "type": "number"
209
+ }
210
+ },
211
+ "required": [
212
+ "BYTES_PER_ELEMENT",
213
+ "buffer",
214
+ "byteLength",
215
+ "byteOffset",
216
+ "length"
217
+ ],
218
+ "description": "Raw data is stored in instances of the Buffer class. A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'"
219
+ },
220
+ {
221
+ "type": "object",
222
+ "properties": {
223
+ "key": {
224
+ "type": "string"
225
+ },
226
+ "passphrase": {
227
+ "type": "string"
228
+ }
229
+ },
230
+ "required": [
231
+ "key",
232
+ "passphrase"
233
+ ]
234
+ }
235
+ ],
236
+ "description": "Secret to use with JWT"
237
+ },
238
+ "algorithm": {
239
+ "type": "string",
240
+ "enum": [
241
+ "HS256",
242
+ "HS384",
243
+ "HS512",
244
+ "RS256",
245
+ "RS384",
246
+ "RS512",
247
+ "PS256",
248
+ "PS384",
249
+ "PS512",
250
+ "ES256",
251
+ "ES384",
252
+ "ES512"
253
+ ],
254
+ "description": "Algorithm for JWT token",
255
+ "default": "HS256"
256
+ },
257
+ "expiresIn": {
258
+ "type": [
259
+ "number",
260
+ "string"
261
+ ],
262
+ "description": "expressed in seconds or a string describing a time span zeit/ms.\n\nEg: 60, \"2 days\", \"10h\", \"7d\". A numeric value is interpreted as a seconds count. If you use a string be sure you provide the time units (days, hours, etc), otherwise milliseconds unit is used by default (\"120\" is equal to \"120ms\")."
263
+ },
264
+ "audience": {
265
+ "type": "string",
266
+ "description": "Audience for the jwt"
267
+ },
268
+ "issuer": {
269
+ "type": "string",
270
+ "description": "Issuer of the token"
271
+ },
272
+ "subject": {
273
+ "type": "string",
274
+ "description": "Subject for JWT"
275
+ },
276
+ "keyid": {}
277
+ },
278
+ "description": "Default JWT options"
279
+ },
280
+ "openapi": {
281
+ "type": "object",
282
+ "additionalProperties": true
134
283
  }
135
284
  },
136
- "required": ["uid", "uuid"],
137
- "description": "First basic model for Ident",
285
+ "required": [
286
+ "asymetricType",
287
+ "keyActiveLifespan",
288
+ "keyLifespan",
289
+ "type"
290
+ ],
138
291
  "$schema": "http://json-schema.org/draft-07/schema#",
139
- "title": "Ident"
292
+ "definitions": {
293
+ "ArrayBufferLike": {
294
+ "anyOf": [
295
+ {
296
+ "type": "object",
297
+ "properties": {
298
+ "byteLength": {
299
+ "type": "number"
300
+ }
301
+ },
302
+ "required": [
303
+ "byteLength"
304
+ ]
305
+ },
306
+ {}
307
+ ]
308
+ }
309
+ },
310
+ "title": "CryptoService"
140
311
  },
141
- "webda/user": {
312
+ "webda/cookiesessionmanager": {
142
313
  "type": "object",
143
314
  "properties": {
144
- "_creationDate": {
145
- "type": "string",
146
- "format": "date-time",
147
- "description": "Creation date",
148
- "readOnly": true
149
- },
150
- "_lastUpdate": {
315
+ "type": {
151
316
  "type": "string",
152
- "format": "date-time",
153
- "description": "Last update date",
154
- "readOnly": true
317
+ "description": "Type of the service"
155
318
  },
156
- "_user": {
319
+ "url": {
157
320
  "type": "string",
158
- "description": "Default owner of the object",
159
- "readOnly": true
321
+ "description": "URL on which to serve the content"
160
322
  },
161
- "public": {
162
- "type": "boolean",
163
- "description": "Define if the object is publicly readable",
164
- "default": false
165
- },
166
- "uuid": {
167
- "type": "string",
168
- "description": "UUID of the object"
323
+ "jwt": {
324
+ "type": "object",
325
+ "properties": {
326
+ "secretOrPublicKey": {
327
+ "anyOf": [
328
+ {
329
+ "type": "string"
330
+ },
331
+ {
332
+ "type": "object",
333
+ "properties": {
334
+ "BYTES_PER_ELEMENT": {
335
+ "type": "number"
336
+ },
337
+ "buffer": {
338
+ "$ref": "#/definitions/ArrayBufferLike"
339
+ },
340
+ "byteLength": {
341
+ "type": "number"
342
+ },
343
+ "byteOffset": {
344
+ "type": "number"
345
+ },
346
+ "length": {
347
+ "type": "number"
348
+ }
349
+ },
350
+ "required": [
351
+ "BYTES_PER_ELEMENT",
352
+ "buffer",
353
+ "byteLength",
354
+ "byteOffset",
355
+ "length"
356
+ ],
357
+ "description": "Raw data is stored in instances of the Buffer class. A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'"
358
+ },
359
+ {
360
+ "type": "object",
361
+ "properties": {
362
+ "key": {
363
+ "type": "string"
364
+ },
365
+ "passphrase": {
366
+ "type": "string"
367
+ }
368
+ },
369
+ "required": [
370
+ "key",
371
+ "passphrase"
372
+ ]
373
+ }
374
+ ],
375
+ "description": "Secret to use with JWT"
376
+ },
377
+ "algorithm": {
378
+ "type": "string",
379
+ "enum": [
380
+ "HS256",
381
+ "HS384",
382
+ "HS512",
383
+ "RS256",
384
+ "RS384",
385
+ "RS512",
386
+ "PS256",
387
+ "PS384",
388
+ "PS512",
389
+ "ES256",
390
+ "ES384",
391
+ "ES512"
392
+ ],
393
+ "description": "Algorithm for JWT token",
394
+ "default": "HS256"
395
+ },
396
+ "expiresIn": {
397
+ "type": [
398
+ "number",
399
+ "string"
400
+ ],
401
+ "description": "expressed in seconds or a string describing a time span zeit/ms.\n\nEg: 60, \"2 days\", \"10h\", \"7d\". A numeric value is interpreted as a seconds count. If you use a string be sure you provide the time units (days, hours, etc), otherwise milliseconds unit is used by default (\"120\" is equal to \"120ms\")."
402
+ },
403
+ "audience": {
404
+ "type": "string",
405
+ "description": "Audience for the jwt"
406
+ },
407
+ "issuer": {
408
+ "type": "string",
409
+ "description": "Issuer of the token"
410
+ },
411
+ "subject": {
412
+ "type": "string",
413
+ "description": "Subject for JWT"
414
+ },
415
+ "keyid": {}
416
+ },
417
+ "description": "Options for issue JWT token"
169
418
  },
170
- "locale": {
171
- "type": "string",
172
- "description": "Contains the locale of the user if known"
419
+ "cookie": {
420
+ "type": "object",
421
+ "properties": {
422
+ "domain": {
423
+ "type": "string",
424
+ "description": "Specifies the value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.3|Domain Set-Cookie attribute } . By default, no domain is set, and most clients will consider the cookie to apply to only the current domain.",
425
+ "default": "to request hostname"
426
+ },
427
+ "expires": {
428
+ "type": "string",
429
+ "format": "date-time",
430
+ "description": "Specifies the `Date` object to be the value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.1|`Expires` `Set-Cookie` attribute } . By default, no expiration is set, and most clients will consider this a \"non-persistent cookie\" and will delete it on a condition like exiting a web browser application.\n\n*Note* the {@link https://tools.ietf.org/html/rfc6265#section-5.3|cookie storage model specification } \nstates that if both `expires` and `maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this, so if both are set, they should point to the same date and time."
431
+ },
432
+ "httpOnly": {
433
+ "type": "boolean",
434
+ "description": "Specifies the boolean value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.6|`HttpOnly` `Set-Cookie` attribute } . When truthy, the `HttpOnly` attribute is set, otherwise it is not. By default, the `HttpOnly` attribute is not set.\n\n*Note* be careful when setting this to true, as compliant clients will not allow client-side JavaScript to see the cookie in `document.cookie`.",
435
+ "default": true
436
+ },
437
+ "maxAge": {
438
+ "type": "number",
439
+ "description": "Specifies the number (in seconds) to be the value for the `Max-Age` `Set-Cookie` attribute. The given number will be converted to an integer by rounding down. By default, no maximum age is set.\n\n*Note* the {@link https://tools.ietf.org/html/rfc6265#section-5.3|cookie storage model specification } \nstates that if both `expires` and `maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this, so if both are set, they should point to the same date and time.",
440
+ "minimum": 1,
441
+ "default": "86400 * 7"
442
+ },
443
+ "path": {
444
+ "type": "string",
445
+ "description": "Specifies the value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.4|`Path` `Set-Cookie` attribute } . By default, the path is considered the \"default path\".",
446
+ "default": "/"
447
+ },
448
+ "sameSite": {
449
+ "type": "string",
450
+ "enum": [
451
+ "none",
452
+ "strict",
453
+ "lax"
454
+ ],
455
+ "description": "Specifies the boolean or string to be the value for the {@link https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.2.7|`SameSite` `Set-Cookie` attribute } .\n\n- `true` will set the `SameSite` attribute to `Strict` for strict same site enforcement.\n- `false` will not set the `SameSite` attribute.\n- `'lax'` will set the `SameSite` attribute to Lax for lax same site enforcement.\n- `'strict'` will set the `SameSite` attribute to Strict for strict same site enforcement. - `'none'` will set the SameSite attribute to None for an explicit cross-site cookie.\n\nMore information about the different enforcement levels can be found in {@link https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.2.7|the specification } .\n\n*note* This is an attribute that has not yet been fully standardized, and may change in the future. This also means many clients may ignore this attribute until they understand it.",
456
+ "default": "lax"
457
+ },
458
+ "secure": {
459
+ "type": "boolean",
460
+ "description": "If not set will be true if https request and false otherwise If defined it will be set to the value"
461
+ },
462
+ "name": {
463
+ "type": "string",
464
+ "description": "Name of the cookie"
465
+ }
466
+ },
467
+ "description": "Cookie configuration for session"
173
468
  },
174
- "email": {
175
- "type": "string",
176
- "description": "Contain main user email if exists"
469
+ "openapi": {
470
+ "type": "object",
471
+ "additionalProperties": true
177
472
  }
178
473
  },
179
- "required": ["uuid"],
180
- "description": "First basic model for User",
474
+ "required": [
475
+ "type"
476
+ ],
181
477
  "$schema": "http://json-schema.org/draft-07/schema#",
182
- "title": "User"
478
+ "definitions": {
479
+ "ArrayBufferLike": {
480
+ "anyOf": [
481
+ {
482
+ "type": "object",
483
+ "properties": {
484
+ "byteLength": {
485
+ "type": "number"
486
+ }
487
+ },
488
+ "required": [
489
+ "byteLength"
490
+ ]
491
+ },
492
+ {}
493
+ ]
494
+ }
495
+ },
496
+ "title": "CookieSessionManager"
183
497
  },
184
498
  "webda/asyncevents": {
185
499
  "type": "object",
@@ -188,6 +502,10 @@
188
502
  "type": "string",
189
503
  "description": "Type of the service"
190
504
  },
505
+ "url": {
506
+ "type": "string",
507
+ "description": "URL on which to serve the content"
508
+ },
191
509
  "queues": {
192
510
  "type": "object",
193
511
  "additionalProperties": {
@@ -198,9 +516,15 @@
198
516
  "sync": {
199
517
  "type": "boolean",
200
518
  "description": "Make the event sending asynchronous"
519
+ },
520
+ "openapi": {
521
+ "type": "object",
522
+ "additionalProperties": true
201
523
  }
202
524
  },
203
- "required": ["type"],
525
+ "required": [
526
+ "type"
527
+ ],
204
528
  "$schema": "http://json-schema.org/draft-07/schema#",
205
529
  "title": "AsyncEvents"
206
530
  },
@@ -220,7 +544,6 @@
220
544
  "readOnly": true
221
545
  }
222
546
  },
223
- "required": [],
224
547
  "description": "Basic Object in Webda\n\nIt is used to define a data stored Any variable starting with _ can only be set by the server Any variable starting with __ won't be exported outside of the server",
225
548
  "$schema": "http://json-schema.org/draft-07/schema#",
226
549
  "title": "CoreModel"
@@ -246,7 +569,6 @@
246
569
  "readOnly": true
247
570
  }
248
571
  },
249
- "required": [],
250
572
  "description": "Object that contains ACL to define its own permissions",
251
573
  "$schema": "http://json-schema.org/draft-07/schema#",
252
574
  "title": "AclModel"
@@ -258,8 +580,26 @@
258
580
  "type": "string",
259
581
  "description": "Type of the service"
260
582
  },
583
+ "url": {
584
+ "type": "string",
585
+ "description": "URL on which to serve the content"
586
+ },
261
587
  "workerDelayer": {
262
- "$ref": "#/definitions/WaitDelayerDefinition",
588
+ "type": "object",
589
+ "properties": {
590
+ "interval": {
591
+ "type": "number",
592
+ "description": "Interval"
593
+ },
594
+ "type": {
595
+ "type": "string",
596
+ "description": "Type of delayer registered in WaitDelayerFactoryRegistry"
597
+ }
598
+ },
599
+ "required": [
600
+ "interval",
601
+ "type"
602
+ ],
263
603
  "description": "Delayer between two failed attempts to process messages"
264
604
  },
265
605
  "workerParallelism": {
@@ -280,12 +620,32 @@
280
620
  "folder": {
281
621
  "type": "string",
282
622
  "description": "Where to store the queue"
623
+ },
624
+ "openapi": {
625
+ "type": "object",
626
+ "additionalProperties": true
283
627
  }
284
628
  },
285
- "required": ["folder", "maxConsumers", "type"],
629
+ "required": [
630
+ "folder",
631
+ "maxConsumers",
632
+ "type"
633
+ ],
286
634
  "$schema": "http://json-schema.org/draft-07/schema#",
287
- "definitions": {
288
- "WaitDelayerDefinition": {
635
+ "title": "FileQueue"
636
+ },
637
+ "webda/memoryqueue": {
638
+ "type": "object",
639
+ "properties": {
640
+ "type": {
641
+ "type": "string",
642
+ "description": "Type of the service"
643
+ },
644
+ "url": {
645
+ "type": "string",
646
+ "description": "URL on which to serve the content"
647
+ },
648
+ "workerDelayer": {
289
649
  "type": "object",
290
650
  "properties": {
291
651
  "interval": {
@@ -297,21 +657,10 @@
297
657
  "description": "Type of delayer registered in WaitDelayerFactoryRegistry"
298
658
  }
299
659
  },
300
- "required": ["interval", "type"],
301
- "description": "WaitDelayer definition"
302
- }
303
- },
304
- "title": "FileQueue"
305
- },
306
- "webda/memoryqueue": {
307
- "type": "object",
308
- "properties": {
309
- "type": {
310
- "type": "string",
311
- "description": "Type of the service"
312
- },
313
- "workerDelayer": {
314
- "$ref": "#/definitions/WaitDelayerDefinition",
660
+ "required": [
661
+ "interval",
662
+ "type"
663
+ ],
315
664
  "description": "Delayer between two failed attempts to process messages"
316
665
  },
317
666
  "workerParallelism": {
@@ -328,27 +677,17 @@
328
677
  "type": "number",
329
678
  "description": "Number of seconds before droping message",
330
679
  "default": 30
331
- }
332
- },
333
- "required": ["maxConsumers", "type"],
334
- "$schema": "http://json-schema.org/draft-07/schema#",
335
- "definitions": {
336
- "WaitDelayerDefinition": {
680
+ },
681
+ "openapi": {
337
682
  "type": "object",
338
- "properties": {
339
- "interval": {
340
- "type": "number",
341
- "description": "Interval"
342
- },
343
- "type": {
344
- "type": "string",
345
- "description": "Type of delayer registered in WaitDelayerFactoryRegistry"
346
- }
347
- },
348
- "required": ["interval", "type"],
349
- "description": "WaitDelayer definition"
683
+ "additionalProperties": true
350
684
  }
351
685
  },
686
+ "required": [
687
+ "maxConsumers",
688
+ "type"
689
+ ],
690
+ "$schema": "http://json-schema.org/draft-07/schema#",
352
691
  "title": "MemoryQueue"
353
692
  },
354
693
  "webda/multinotificationservice": {
@@ -358,6 +697,10 @@
358
697
  "type": "string",
359
698
  "description": "Type of the service"
360
699
  },
700
+ "url": {
701
+ "type": "string",
702
+ "description": "URL on which to serve the content"
703
+ },
361
704
  "senders": {
362
705
  "type": "array",
363
706
  "items": {
@@ -369,9 +712,16 @@
369
712
  "type": "boolean",
370
713
  "description": "Define if it sends one or several notification per user",
371
714
  "default": false
715
+ },
716
+ "openapi": {
717
+ "type": "object",
718
+ "additionalProperties": true
372
719
  }
373
720
  },
374
- "required": ["senders", "type"],
721
+ "required": [
722
+ "senders",
723
+ "type"
724
+ ],
375
725
  "description": "Parameters for multi notification service",
376
726
  "$schema": "http://json-schema.org/draft-07/schema#",
377
727
  "title": "MultiNotificationService"
@@ -383,6 +733,10 @@
383
733
  "type": "string",
384
734
  "description": "Type of the service"
385
735
  },
736
+ "url": {
737
+ "type": "string",
738
+ "description": "URL on which to serve the content"
739
+ },
386
740
  "templates": {
387
741
  "type": "string",
388
742
  "description": "Specify which foldeer contains templates",
@@ -404,9 +758,17 @@
404
758
  },
405
759
  "SES": {
406
760
  "description": "SES AWS Bean if transport === \"ses\""
761
+ },
762
+ "openapi": {
763
+ "type": "object",
764
+ "additionalProperties": true
407
765
  }
408
766
  },
409
- "required": ["SES", "sender", "type"],
767
+ "required": [
768
+ "SES",
769
+ "sender",
770
+ "type"
771
+ ],
410
772
  "$schema": "http://json-schema.org/draft-07/schema#",
411
773
  "title": "Mailer"
412
774
  },
@@ -417,6 +779,11 @@
417
779
  "type": "string",
418
780
  "description": "Type of the service"
419
781
  },
782
+ "url": {
783
+ "type": "string",
784
+ "description": "URL on which to serve the content",
785
+ "default": "/auth"
786
+ },
420
787
  "identStore": {
421
788
  "type": "string",
422
789
  "description": "Idents store for authentication identifiers",
@@ -427,10 +794,6 @@
427
794
  "description": "User store for authentication users",
428
795
  "default": "users"
429
796
  },
430
- "url": {
431
- "type": "string",
432
- "default": "/auth"
433
- },
434
797
  "email": {
435
798
  "type": "object",
436
799
  "properties": {
@@ -457,7 +820,12 @@
457
820
  "default": 3
458
821
  }
459
822
  },
460
- "required": ["postValidation", "skipEmailValidation", "delay", "failedLoginBeforeDelay"],
823
+ "required": [
824
+ "postValidation",
825
+ "skipEmailValidation",
826
+ "delay",
827
+ "failedLoginBeforeDelay"
828
+ ],
461
829
  "description": "Enable the email authentication"
462
830
  },
463
831
  "password": {
@@ -489,9 +857,20 @@
489
857
  "registerRedirect": {
490
858
  "type": "string",
491
859
  "description": "Redirect to this page once email is validate to finish the registration process"
860
+ },
861
+ "openapi": {
862
+ "type": "object",
863
+ "additionalProperties": true
492
864
  }
493
865
  },
494
- "required": ["failureRedirect", "password", "registerRedirect", "salt", "successRedirect", "type"],
866
+ "required": [
867
+ "failureRedirect",
868
+ "password",
869
+ "registerRedirect",
870
+ "salt",
871
+ "successRedirect",
872
+ "type"
873
+ ],
495
874
  "$schema": "http://json-schema.org/draft-07/schema#",
496
875
  "title": "Authentication"
497
876
  },
@@ -502,6 +881,10 @@
502
881
  "type": "string",
503
882
  "description": "Type of the service"
504
883
  },
884
+ "url": {
885
+ "type": "string",
886
+ "description": "URL on which to serve the content"
887
+ },
505
888
  "checkInterval": {
506
889
  "type": "number",
507
890
  "description": "Check configuration every {checkInterval} seconds"
@@ -512,9 +895,17 @@
512
895
  },
513
896
  "default": {
514
897
  "description": "Default configuration to use"
898
+ },
899
+ "openapi": {
900
+ "type": "object",
901
+ "additionalProperties": true
515
902
  }
516
903
  },
517
- "required": ["default", "source", "type"],
904
+ "required": [
905
+ "default",
906
+ "source",
907
+ "type"
908
+ ],
518
909
  "$schema": "http://json-schema.org/draft-07/schema#",
519
910
  "title": "ConfigurationService"
520
911
  },
@@ -524,12 +915,22 @@
524
915
  "type": {
525
916
  "type": "string",
526
917
  "description": "Type of the service"
918
+ },
919
+ "url": {
920
+ "type": "string",
921
+ "description": "URL on which to serve the content"
922
+ },
923
+ "openapi": {
924
+ "type": "object",
925
+ "additionalProperties": true
527
926
  }
528
927
  },
529
- "required": ["type"],
928
+ "required": [
929
+ "type"
930
+ ],
530
931
  "description": "Interface to specify the Service parameters",
531
932
  "$schema": "http://json-schema.org/draft-07/schema#",
532
- "title": "EchoService"
933
+ "title": "CronService"
533
934
  },
534
935
  "webda/debugmailer": {
535
936
  "type": "object",
@@ -537,9 +938,19 @@
537
938
  "type": {
538
939
  "type": "string",
539
940
  "description": "Type of the service"
941
+ },
942
+ "url": {
943
+ "type": "string",
944
+ "description": "URL on which to serve the content"
945
+ },
946
+ "openapi": {
947
+ "type": "object",
948
+ "additionalProperties": true
540
949
  }
541
950
  },
542
- "required": ["type"],
951
+ "required": [
952
+ "type"
953
+ ],
543
954
  "description": "Interface to specify the Service parameters",
544
955
  "$schema": "http://json-schema.org/draft-07/schema#",
545
956
  "title": "DebugMailer"
@@ -550,10 +961,34 @@
550
961
  "type": {
551
962
  "type": "string",
552
963
  "description": "Type of the service"
964
+ },
965
+ "url": {
966
+ "type": "string",
967
+ "description": "Url to expose the service"
968
+ },
969
+ "mime": {
970
+ "type": "string",
971
+ "description": "Mime of the result"
972
+ },
973
+ "result": {
974
+ "anyOf": [
975
+ {
976
+ "type": "string"
977
+ },
978
+ {}
979
+ ],
980
+ "description": "result to write on the url"
981
+ },
982
+ "openapi": {
983
+ "type": "object",
984
+ "additionalProperties": true
553
985
  }
554
986
  },
555
- "required": ["type"],
556
- "description": "Interface to specify the Service parameters",
987
+ "required": [
988
+ "result",
989
+ "type",
990
+ "url"
991
+ ],
557
992
  "$schema": "http://json-schema.org/draft-07/schema#",
558
993
  "title": "EchoService"
559
994
  },
@@ -564,6 +999,10 @@
564
999
  "type": "string",
565
1000
  "description": "Type of the service"
566
1001
  },
1002
+ "url": {
1003
+ "type": "string",
1004
+ "description": "URL on which to serve the content"
1005
+ },
567
1006
  "map": {
568
1007
  "type": "object",
569
1008
  "additionalProperties": {
@@ -604,15 +1043,33 @@
604
1043
  "description": "Restrict some APIs"
605
1044
  }
606
1045
  },
607
- "required": ["url"],
1046
+ "required": [
1047
+ "url"
1048
+ ],
608
1049
  "description": "Expose the service to http"
609
1050
  },
1051
+ "prefix": {
1052
+ "type": "string"
1053
+ },
610
1054
  "folder": {
611
1055
  "type": "string",
612
1056
  "description": "Define the folder to store objects in"
1057
+ },
1058
+ "maxSize": {
1059
+ "type": "number",
1060
+ "description": "Maximum size to handle",
1061
+ "default": "10Mb"
1062
+ },
1063
+ "openapi": {
1064
+ "type": "object",
1065
+ "additionalProperties": true
613
1066
  }
614
1067
  },
615
- "required": ["folder", "map", "type"],
1068
+ "required": [
1069
+ "folder",
1070
+ "map",
1071
+ "type"
1072
+ ],
616
1073
  "$schema": "http://json-schema.org/draft-07/schema#",
617
1074
  "title": "FileBinary"
618
1075
  },
@@ -623,6 +1080,10 @@
623
1080
  "type": "string",
624
1081
  "description": "Type of the service"
625
1082
  },
1083
+ "url": {
1084
+ "type": "string",
1085
+ "description": "URL on which to serve the content"
1086
+ },
626
1087
  "checkInterval": {
627
1088
  "type": "number",
628
1089
  "description": "Check configuration every {checkInterval} seconds"
@@ -633,9 +1094,17 @@
633
1094
  },
634
1095
  "default": {
635
1096
  "description": "Default configuration to use"
1097
+ },
1098
+ "openapi": {
1099
+ "type": "object",
1100
+ "additionalProperties": true
636
1101
  }
637
1102
  },
638
- "required": ["default", "source", "type"],
1103
+ "required": [
1104
+ "default",
1105
+ "source",
1106
+ "type"
1107
+ ],
639
1108
  "$schema": "http://json-schema.org/draft-07/schema#",
640
1109
  "title": "FileConfiguration"
641
1110
  },
@@ -646,6 +1115,10 @@
646
1115
  "type": "string",
647
1116
  "description": "Type of the service"
648
1117
  },
1118
+ "url": {
1119
+ "type": "string",
1120
+ "description": "URL on which to serve the content"
1121
+ },
649
1122
  "authenticationService": {
650
1123
  "type": "string",
651
1124
  "description": "Name of the bean to use for Authentication",
@@ -694,6 +1167,10 @@
694
1167
  "notification": {
695
1168
  "type": "string",
696
1169
  "description": "Email template to send to the user"
1170
+ },
1171
+ "openapi": {
1172
+ "type": "object",
1173
+ "additionalProperties": true
697
1174
  }
698
1175
  },
699
1176
  "required": [
@@ -718,6 +1195,10 @@
718
1195
  "type": "string",
719
1196
  "description": "Type of the service"
720
1197
  },
1198
+ "url": {
1199
+ "type": "string",
1200
+ "description": "URL on which to serve the content"
1201
+ },
721
1202
  "checkInterval": {
722
1203
  "type": "number",
723
1204
  "description": "Check configuration every {checkInterval} seconds"
@@ -728,12 +1209,53 @@
728
1209
  },
729
1210
  "default": {
730
1211
  "description": "Default configuration to use"
1212
+ },
1213
+ "openapi": {
1214
+ "type": "object",
1215
+ "additionalProperties": true
731
1216
  }
732
1217
  },
733
- "required": ["default", "source", "type"],
1218
+ "required": [
1219
+ "default",
1220
+ "source",
1221
+ "type"
1222
+ ],
734
1223
  "$schema": "http://json-schema.org/draft-07/schema#",
735
1224
  "title": "KubernetesConfigurationService"
736
1225
  },
1226
+ "webda/proxyservice": {
1227
+ "type": "object",
1228
+ "properties": {
1229
+ "type": {
1230
+ "type": "string",
1231
+ "description": "Type of the service"
1232
+ },
1233
+ "url": {
1234
+ "type": "string",
1235
+ "description": "URL to expose"
1236
+ },
1237
+ "backend": {
1238
+ "type": "string",
1239
+ "description": "URL to proxy to"
1240
+ },
1241
+ "requireAuthentication": {
1242
+ "type": "boolean",
1243
+ "description": "Helper to refuse any request if user is not auth"
1244
+ },
1245
+ "openapi": {
1246
+ "type": "object",
1247
+ "additionalProperties": true
1248
+ }
1249
+ },
1250
+ "required": [
1251
+ "backend",
1252
+ "requireAuthentication",
1253
+ "type"
1254
+ ],
1255
+ "description": "Proxy to a backend service",
1256
+ "$schema": "http://json-schema.org/draft-07/schema#",
1257
+ "title": "ProxyService"
1258
+ },
737
1259
  "webda/resourceservice": {
738
1260
  "type": "object",
739
1261
  "properties": {
@@ -755,9 +1277,25 @@
755
1277
  "type": "boolean",
756
1278
  "description": "Add the / root to redirect to /{url}",
757
1279
  "default": false
1280
+ },
1281
+ "index": {
1282
+ "type": "string",
1283
+ "description": "Index file",
1284
+ "default": "index.html"
1285
+ },
1286
+ "indexFallback": {
1287
+ "type": "boolean",
1288
+ "description": "Return the index file for any unfound resource Useful for single page application",
1289
+ "default": true
1290
+ },
1291
+ "openapi": {
1292
+ "type": "object",
1293
+ "additionalProperties": true
758
1294
  }
759
1295
  },
760
- "required": ["type"],
1296
+ "required": [
1297
+ "type"
1298
+ ],
761
1299
  "description": "ResourceService parameters",
762
1300
  "$schema": "http://json-schema.org/draft-07/schema#",
763
1301
  "title": "ResourceService"
@@ -769,16 +1307,23 @@
769
1307
  "type": "string",
770
1308
  "description": "Type of the service"
771
1309
  },
1310
+ "url": {
1311
+ "type": "string",
1312
+ "description": "URL on which to serve the content",
1313
+ "default": "/version"
1314
+ },
772
1315
  "version": {
773
1316
  "type": "string",
774
1317
  "description": "To force version otherwise would read from package.json"
775
1318
  },
776
- "url": {
777
- "type": "string",
778
- "default": "/version"
1319
+ "openapi": {
1320
+ "type": "object",
1321
+ "additionalProperties": true
779
1322
  }
780
1323
  },
781
- "required": ["type"],
1324
+ "required": [
1325
+ "type"
1326
+ ],
782
1327
  "description": "Version parameters",
783
1328
  "$schema": "http://json-schema.org/draft-07/schema#",
784
1329
  "title": "VersionService"
@@ -790,6 +1335,10 @@
790
1335
  "type": "string",
791
1336
  "description": "Type of the service"
792
1337
  },
1338
+ "url": {
1339
+ "type": "string",
1340
+ "description": "URL on which to serve the content"
1341
+ },
793
1342
  "fields": {
794
1343
  "type": "array",
795
1344
  "items": {
@@ -821,9 +1370,22 @@
821
1370
  "cascade": {
822
1371
  "type": "boolean",
823
1372
  "description": "Delete source if target object is deleted"
1373
+ },
1374
+ "openapi": {
1375
+ "type": "object",
1376
+ "additionalProperties": true
824
1377
  }
825
1378
  },
826
- "required": ["async", "attribute", "cascade", "fields", "source", "target", "targetAttribute", "type"],
1379
+ "required": [
1380
+ "async",
1381
+ "attribute",
1382
+ "cascade",
1383
+ "fields",
1384
+ "source",
1385
+ "target",
1386
+ "targetAttribute",
1387
+ "type"
1388
+ ],
827
1389
  "description": "Mapper configuration",
828
1390
  "$schema": "http://json-schema.org/draft-07/schema#",
829
1391
  "title": "Mapper"
@@ -835,6 +1397,10 @@
835
1397
  "type": "string",
836
1398
  "description": "Type of the service"
837
1399
  },
1400
+ "url": {
1401
+ "type": "string",
1402
+ "description": "URL on which to serve the content"
1403
+ },
838
1404
  "fields": {
839
1405
  "type": "array",
840
1406
  "items": {
@@ -870,19 +1436,37 @@
870
1436
  "key": {
871
1437
  "type": "string",
872
1438
  "default": "index"
1439
+ },
1440
+ "openapi": {
1441
+ "type": "object",
1442
+ "additionalProperties": true
873
1443
  }
874
1444
  },
875
- "required": ["async", "attribute", "cascade", "fields", "key", "source", "target", "targetAttribute", "type"],
1445
+ "required": [
1446
+ "async",
1447
+ "attribute",
1448
+ "cascade",
1449
+ "fields",
1450
+ "key",
1451
+ "source",
1452
+ "target",
1453
+ "targetAttribute",
1454
+ "type"
1455
+ ],
876
1456
  "$schema": "http://json-schema.org/draft-07/schema#",
877
1457
  "title": "Aggregator"
878
1458
  },
879
- "webda/filestore": {
1459
+ "webda/memorystore": {
880
1460
  "type": "object",
881
1461
  "properties": {
882
1462
  "type": {
883
1463
  "type": "string",
884
1464
  "description": "Type of the service"
885
1465
  },
1466
+ "url": {
1467
+ "type": "string",
1468
+ "description": "URL on which to serve the content"
1469
+ },
886
1470
  "model": {
887
1471
  "type": "string",
888
1472
  "description": "Webda model to use within the Store",
@@ -893,35 +1477,56 @@
893
1477
  "description": "async delete"
894
1478
  },
895
1479
  "expose": {
896
- "anyOf": [
897
- {
898
- "$ref": "#/definitions/ExposeParameters"
899
- },
900
- {
901
- "type": "boolean"
902
- },
903
- {
904
- "type": "string"
905
- }
906
- ],
1480
+ "$ref": "#/definitions/ExposeParameters",
907
1481
  "description": "Expose the service to an urls"
908
1482
  },
909
1483
  "strict": {
910
1484
  "type": "boolean",
911
1485
  "description": "Allow to load object that does not have the type data",
912
- "deprecated": 2,
913
1486
  "default": true
914
1487
  },
915
- "folder": {
916
- "type": "string",
917
- "description": "Local path where to store all `json` files"
1488
+ "slowQueryThreshold": {
1489
+ "type": "number",
1490
+ "description": "Slow query threshold",
1491
+ "default": 30000
918
1492
  },
919
- "beautify": {
920
- "type": ["string", "number"],
921
- "description": "Parameter sent to JSON.stringify when storing the json"
1493
+ "persistence": {
1494
+ "type": "object",
1495
+ "properties": {
1496
+ "path": {
1497
+ "type": "string",
1498
+ "description": "File path to save to"
1499
+ },
1500
+ "key": {
1501
+ "type": "string",
1502
+ "description": "Encryption key for AES encryption"
1503
+ },
1504
+ "delay": {
1505
+ "type": "number",
1506
+ "description": "By default only save once every 1s if modified",
1507
+ "default": 1000
1508
+ },
1509
+ "cipher": {
1510
+ "type": "string",
1511
+ "description": "cipher to use"
1512
+ }
1513
+ },
1514
+ "required": [
1515
+ "path"
1516
+ ],
1517
+ "description": "Persist the data in a file"
1518
+ },
1519
+ "openapi": {
1520
+ "type": "object",
1521
+ "additionalProperties": true
922
1522
  }
923
1523
  },
924
- "required": ["asyncDelete", "folder", "type"],
1524
+ "required": [
1525
+ "asyncDelete",
1526
+ "slowQueryThreshold",
1527
+ "type"
1528
+ ],
1529
+ "description": "Memory store",
925
1530
  "$schema": "http://json-schema.org/draft-07/schema#",
926
1531
  "definitions": {
927
1532
  "ExposeParameters": {
@@ -950,23 +1555,40 @@
950
1555
  "delete": {
951
1556
  "type": "boolean",
952
1557
  "description": "Do not expose the DELETE"
1558
+ },
1559
+ "query": {
1560
+ "type": "boolean",
1561
+ "description": "Do not expose the query endpoint"
953
1562
  }
954
1563
  },
955
1564
  "description": "You can restrict any part of the CRUD",
956
1565
  "default": {}
1566
+ },
1567
+ "queryMethod": {
1568
+ "type": "string",
1569
+ "enum": [
1570
+ "PUT",
1571
+ "GET"
1572
+ ],
1573
+ "description": "For confidentiality sometimes you might prefer to expose query through PUT To avoid GET logging",
1574
+ "default": "GET"
957
1575
  }
958
1576
  }
959
1577
  }
960
1578
  },
961
- "title": "FileStore"
1579
+ "title": "MemoryStore"
962
1580
  },
963
- "webda/memorystore": {
1581
+ "webda/filestore": {
964
1582
  "type": "object",
965
1583
  "properties": {
966
1584
  "type": {
967
1585
  "type": "string",
968
1586
  "description": "Type of the service"
969
1587
  },
1588
+ "url": {
1589
+ "type": "string",
1590
+ "description": "URL on which to serve the content"
1591
+ },
970
1592
  "model": {
971
1593
  "type": "string",
972
1594
  "description": "Webda model to use within the Store",
@@ -977,28 +1599,46 @@
977
1599
  "description": "async delete"
978
1600
  },
979
1601
  "expose": {
980
- "anyOf": [
981
- {
982
- "$ref": "#/definitions/ExposeParameters"
983
- },
984
- {
985
- "type": "boolean"
986
- },
987
- {
988
- "type": "string"
989
- }
990
- ],
1602
+ "$ref": "#/definitions/ExposeParameters",
991
1603
  "description": "Expose the service to an urls"
992
1604
  },
993
1605
  "strict": {
994
1606
  "type": "boolean",
995
1607
  "description": "Allow to load object that does not have the type data",
996
- "deprecated": 2,
997
1608
  "default": true
1609
+ },
1610
+ "slowQueryThreshold": {
1611
+ "type": "number",
1612
+ "description": "Slow query threshold",
1613
+ "default": 30000
1614
+ },
1615
+ "folder": {
1616
+ "type": "string",
1617
+ "description": "Local path where to store all `json` files"
1618
+ },
1619
+ "beautify": {
1620
+ "type": [
1621
+ "string",
1622
+ "number"
1623
+ ],
1624
+ "description": "Parameter sent to JSON.stringify when storing the json"
1625
+ },
1626
+ "noCache": {
1627
+ "type": "boolean",
1628
+ "description": "Disable memory cache\n\nUseful if several process update storage files",
1629
+ "default": false
1630
+ },
1631
+ "openapi": {
1632
+ "type": "object",
1633
+ "additionalProperties": true
998
1634
  }
999
1635
  },
1000
- "required": ["asyncDelete", "type"],
1001
- "description": "Store parameter",
1636
+ "required": [
1637
+ "asyncDelete",
1638
+ "folder",
1639
+ "slowQueryThreshold",
1640
+ "type"
1641
+ ],
1002
1642
  "$schema": "http://json-schema.org/draft-07/schema#",
1003
1643
  "definitions": {
1004
1644
  "ExposeParameters": {
@@ -1027,15 +1667,28 @@
1027
1667
  "delete": {
1028
1668
  "type": "boolean",
1029
1669
  "description": "Do not expose the DELETE"
1670
+ },
1671
+ "query": {
1672
+ "type": "boolean",
1673
+ "description": "Do not expose the query endpoint"
1030
1674
  }
1031
1675
  },
1032
1676
  "description": "You can restrict any part of the CRUD",
1033
1677
  "default": {}
1678
+ },
1679
+ "queryMethod": {
1680
+ "type": "string",
1681
+ "enum": [
1682
+ "PUT",
1683
+ "GET"
1684
+ ],
1685
+ "description": "For confidentiality sometimes you might prefer to expose query through PUT To avoid GET logging",
1686
+ "default": "GET"
1034
1687
  }
1035
1688
  }
1036
1689
  }
1037
1690
  },
1038
- "title": "MemoryStore"
1691
+ "title": "FileStore"
1039
1692
  },
1040
1693
  "webda/memorylogger": {
1041
1694
  "type": "object",
@@ -1044,20 +1697,37 @@
1044
1697
  "type": "string",
1045
1698
  "description": "Type of the service"
1046
1699
  },
1700
+ "url": {
1701
+ "type": "string",
1702
+ "description": "URL on which to serve the content"
1703
+ },
1047
1704
  "logLevel": {
1048
1705
  "$ref": "#/definitions/WorkerLogLevel",
1049
1706
  "description": "Specify the log level of this service"
1050
1707
  },
1051
1708
  "limit": {
1052
1709
  "type": "number"
1710
+ },
1711
+ "openapi": {
1712
+ "type": "object",
1713
+ "additionalProperties": true
1053
1714
  }
1054
1715
  },
1055
- "required": ["logLevel", "type"],
1716
+ "required": [
1717
+ "logLevel",
1718
+ "type"
1719
+ ],
1056
1720
  "$schema": "http://json-schema.org/draft-07/schema#",
1057
1721
  "definitions": {
1058
1722
  "WorkerLogLevel": {
1059
1723
  "type": "string",
1060
- "enum": ["ERROR", "WARN", "INFO", "DEBUG", "TRACE"],
1724
+ "enum": [
1725
+ "ERROR",
1726
+ "WARN",
1727
+ "INFO",
1728
+ "DEBUG",
1729
+ "TRACE"
1730
+ ],
1061
1731
  "description": "LogLevel as intersection to compare with integer values"
1062
1732
  }
1063
1733
  },
@@ -1070,20 +1740,37 @@
1070
1740
  "type": "string",
1071
1741
  "description": "Type of the service"
1072
1742
  },
1743
+ "url": {
1744
+ "type": "string",
1745
+ "description": "URL on which to serve the content"
1746
+ },
1073
1747
  "logLevel": {
1074
1748
  "$ref": "#/definitions/WorkerLogLevel",
1075
1749
  "description": "Specify the log level of this service"
1076
1750
  },
1077
1751
  "format": {
1078
1752
  "type": "string"
1753
+ },
1754
+ "openapi": {
1755
+ "type": "object",
1756
+ "additionalProperties": true
1079
1757
  }
1080
1758
  },
1081
- "required": ["logLevel", "type"],
1759
+ "required": [
1760
+ "logLevel",
1761
+ "type"
1762
+ ],
1082
1763
  "$schema": "http://json-schema.org/draft-07/schema#",
1083
1764
  "definitions": {
1084
1765
  "WorkerLogLevel": {
1085
1766
  "type": "string",
1086
- "enum": ["ERROR", "WARN", "INFO", "DEBUG", "TRACE"],
1767
+ "enum": [
1768
+ "ERROR",
1769
+ "WARN",
1770
+ "INFO",
1771
+ "DEBUG",
1772
+ "TRACE"
1773
+ ],
1087
1774
  "description": "LogLevel as intersection to compare with integer values"
1088
1775
  }
1089
1776
  },
@@ -1096,6 +1783,10 @@
1096
1783
  "type": "string",
1097
1784
  "description": "Type of the service"
1098
1785
  },
1786
+ "url": {
1787
+ "type": "string",
1788
+ "description": "URL on which to serve the content"
1789
+ },
1099
1790
  "logLevel": {
1100
1791
  "$ref": "#/definitions/WorkerLogLevel",
1101
1792
  "description": "Specify the log level of this service"
@@ -1108,18 +1799,94 @@
1108
1799
  },
1109
1800
  "sizeLimit": {
1110
1801
  "type": "number"
1802
+ },
1803
+ "openapi": {
1804
+ "type": "object",
1805
+ "additionalProperties": true
1111
1806
  }
1112
1807
  },
1113
- "required": ["file", "logLevel", "type"],
1808
+ "required": [
1809
+ "file",
1810
+ "logLevel",
1811
+ "type"
1812
+ ],
1114
1813
  "$schema": "http://json-schema.org/draft-07/schema#",
1115
1814
  "definitions": {
1116
1815
  "WorkerLogLevel": {
1117
1816
  "type": "string",
1118
- "enum": ["ERROR", "WARN", "INFO", "DEBUG", "TRACE"],
1817
+ "enum": [
1818
+ "ERROR",
1819
+ "WARN",
1820
+ "INFO",
1821
+ "DEBUG",
1822
+ "TRACE"
1823
+ ],
1119
1824
  "description": "LogLevel as intersection to compare with integer values"
1120
1825
  }
1121
1826
  },
1122
1827
  "title": "FileLogger"
1828
+ },
1829
+ "webda/comment": {
1830
+ "type": "object",
1831
+ "properties": {
1832
+ "_creationDate": {
1833
+ "type": "string",
1834
+ "format": "date-time",
1835
+ "description": "Creation date",
1836
+ "readOnly": true
1837
+ },
1838
+ "_lastUpdate": {
1839
+ "type": "string",
1840
+ "format": "date-time",
1841
+ "description": "Last update date",
1842
+ "readOnly": true
1843
+ },
1844
+ "target": {
1845
+ "$ref": "#/definitions/ModelParent%3Cclass-348499747-2598-11214-348499747-0-11238852964236%3E",
1846
+ "description": "Can be linked to any object but cannot be a root object"
1847
+ },
1848
+ "author": {
1849
+ "$ref": "#/definitions/ModelLink%3Cclass-src_models_user.ts-115-2736-src_models_user.ts-0-2737%3E",
1850
+ "description": "User that posted the comment"
1851
+ },
1852
+ "title": {
1853
+ "type": "string",
1854
+ "description": "Title"
1855
+ },
1856
+ "description": {
1857
+ "type": "string",
1858
+ "description": "Comment content"
1859
+ }
1860
+ },
1861
+ "required": [
1862
+ "target",
1863
+ "author",
1864
+ "title",
1865
+ "description"
1866
+ ],
1867
+ "description": "Generic comment class",
1868
+ "$schema": "http://json-schema.org/draft-07/schema#",
1869
+ "definitions": {
1870
+ "ModelParent<class-348499747-2598-11214-348499747-0-11238852964236>": {
1871
+ "$ref": "#/definitions/ModelLink%3Cclass-348499747-2598-11214-348499747-0-11238852964236%2Cany%3E",
1872
+ "description": "Define the parent of the model"
1873
+ },
1874
+ "ModelLink<class-348499747-2598-11214-348499747-0-11238852964236,any>": {
1875
+ "$ref": "#/definitions/ModelLinker%3Cclass-348499747-2598-11214-348499747-0-11238852964236%3E",
1876
+ "description": "Define a link to 1:n relation"
1877
+ },
1878
+ "ModelLinker<class-348499747-2598-11214-348499747-0-11238852964236>": {
1879
+ "type": "string"
1880
+ },
1881
+ "ModelLink<class-src_models_user.ts-115-2736-src_models_user.ts-0-2737>": {
1882
+ "$ref": "#/definitions/ModelLinker%3Cclass-src_models_user.ts-115-2736-src_models_user.ts-0-2737%3E",
1883
+ "description": "Define a link to 1:n relation"
1884
+ },
1885
+ "ModelLinker<class-src_models_user.ts-115-2736-src_models_user.ts-0-2737>": {
1886
+ "type": "string"
1887
+ }
1888
+ },
1889
+ "title": "Comment"
1123
1890
  }
1124
1891
  }
1125
1892
  }