oak-domain 6.0.0 → 6.1.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 (400) hide show
  1. package/README.md +5 -1
  2. package/es/actions/action.d.ts +1 -1
  3. package/es/base-app-domain/EntityDict.d.ts +27 -0
  4. package/es/base-app-domain/LocalizedContent/Schema.d.ts +19 -0
  5. package/es/base-app-domain/LocalizedContent/Schema.js +1 -0
  6. package/es/base-app-domain/LocalizedContent/Storage.d.ts +3 -0
  7. package/es/base-app-domain/LocalizedContent/Storage.js +75 -0
  8. package/es/base-app-domain/LocalizedContent/Style.d.ts +3 -0
  9. package/es/base-app-domain/LocalizedContent/Style.js +12 -0
  10. package/es/base-app-domain/LocalizedContent/_baseSchema.d.ts +58 -0
  11. package/es/base-app-domain/Storage.js +2 -0
  12. package/es/base-app-domain/StyleDict.js +2 -0
  13. package/es/compiler/customChecks/i18n.js +4 -1
  14. package/es/compiler/customChecks/runner.d.ts +1 -1
  15. package/es/compiler/customChecks/runner.js +1 -1
  16. package/es/compiler/customChecks/types.d.ts +2 -1
  17. package/es/compiler/dependencyBuilder.d.ts +11 -2
  18. package/es/compiler/dependencyBuilder.js +188 -199
  19. package/es/compiler/entityDescEnum.d.ts +5 -0
  20. package/es/compiler/entityDescEnum.js +443 -0
  21. package/es/compiler/entitySource.d.ts +28 -0
  22. package/es/compiler/entitySource.js +521 -0
  23. package/es/compiler/localeBuilder.d.ts +7 -2
  24. package/es/compiler/localeBuilder.js +52 -56
  25. package/es/compiler/routerBuilder.d.ts +32 -3
  26. package/es/compiler/routerBuilder.js +157 -45
  27. package/es/compiler/schemaBuilder.d.ts +12 -2
  28. package/es/compiler/schemaBuilder.js +653 -148
  29. package/es/compiler/tscBuilder.d.ts +20 -2
  30. package/es/compiler/tscBuilder.js +231 -45
  31. package/es/context/BackendRuntimeContext.d.ts +6 -4
  32. package/es/context/BackendRuntimeContext.js +9 -1
  33. package/es/context/ContextComposer.d.ts +93 -0
  34. package/es/context/ContextComposer.js +353 -0
  35. package/es/context/SerializedData.d.ts +2 -1
  36. package/es/data/i18n.d.ts +1 -1
  37. package/es/data/i18n.js +1 -86
  38. package/es/data/i18n.json +86 -0
  39. package/es/entities/ActionAuth.d.ts +3 -3
  40. package/es/entities/I18n.d.ts +2 -2
  41. package/es/entities/LocalizedContent.d.ts +22 -0
  42. package/es/entities/LocalizedContent.js +101 -0
  43. package/es/entities/Log.d.ts +3 -3
  44. package/es/entities/Modi.d.ts +2 -2
  45. package/es/entities/ModiEntity.d.ts +3 -3
  46. package/es/entities/Oper.d.ts +5 -5
  47. package/es/entities/OperEntity.d.ts +3 -3
  48. package/es/entities/Path.d.ts +2 -2
  49. package/es/entities/Relation.d.ts +2 -2
  50. package/es/entities/RelationAuth.d.ts +3 -3
  51. package/es/entities/User.d.ts +4 -4
  52. package/es/entities/UserEntityClaim.d.ts +6 -6
  53. package/es/entities/UserEntityGrant.d.ts +2 -2
  54. package/es/entities/UserRelation.d.ts +4 -4
  55. package/es/store/AsyncRowStore.d.ts +2 -2
  56. package/es/store/AsyncRowStore.js +2 -2
  57. package/es/store/CascadeStore.d.ts +5 -3
  58. package/es/store/CascadeStore.js +56 -24
  59. package/es/store/IntrinsicCheckers.d.ts +1 -1
  60. package/es/store/IntrinsicCheckers.js +2 -2
  61. package/es/store/IntrinsicLogics.d.ts +1 -1
  62. package/es/store/RelationAuth.js +3 -3
  63. package/es/store/SyncRowStore.d.ts +1 -1
  64. package/es/store/SyncRowStore.js +1 -1
  65. package/es/store/TriggerExecutor.d.ts +6 -4
  66. package/es/store/TriggerExecutor.js +16 -4
  67. package/es/store/checker.d.ts +2 -2
  68. package/es/store/checker.js +45 -9
  69. package/es/store/filter.d.ts +3 -3
  70. package/es/store/filter.js +4 -4
  71. package/es/store/modi.d.ts +5 -5
  72. package/es/store/modi.js +4 -4
  73. package/es/store/projection.d.ts +1 -1
  74. package/es/store/relation.js +1 -1
  75. package/es/store/triggers.d.ts +4 -4
  76. package/es/store/triggers.js +2 -2
  77. package/es/timers/oper.d.ts +3 -3
  78. package/es/timers/oper.js +1 -1
  79. package/es/timers/vaccum.d.ts +3 -3
  80. package/es/types/Action.d.ts +1 -1
  81. package/es/types/AppLoader.d.ts +1 -1
  82. package/es/types/Aspect.d.ts +1 -1
  83. package/es/types/Auth.d.ts +2 -2
  84. package/es/types/Configuration.d.ts +7 -6
  85. package/es/types/Connector.d.ts +47 -1
  86. package/es/types/DataType.d.ts +2 -2
  87. package/es/types/Demand.d.ts +40 -6
  88. package/es/types/Endpoint.d.ts +17 -1
  89. package/es/types/Entity.d.ts +21 -4
  90. package/es/types/Entity.js +23 -0
  91. package/es/types/EntityDesc.d.ts +9 -8
  92. package/es/types/Environment.d.ts +17 -0
  93. package/es/types/Exception.d.ts +1 -1
  94. package/es/types/Exception.js +1 -1
  95. package/es/types/Expression.d.ts +13 -2
  96. package/es/types/Expression.js +36 -1
  97. package/es/types/Locale.d.ts +14 -1
  98. package/es/types/Locale.js +13 -1
  99. package/es/types/OakPackage.d.ts +29 -0
  100. package/es/types/OakPackage.js +30 -0
  101. package/es/types/Port.d.ts +1 -1
  102. package/es/types/RowStore.d.ts +9 -7
  103. package/es/types/Storage.d.ts +11 -3
  104. package/es/types/Storage.js +12 -1
  105. package/es/types/Style.d.ts +2 -2
  106. package/es/types/Sync.d.ts +3 -3
  107. package/es/types/Timer.d.ts +14 -2
  108. package/es/types/Trigger.d.ts +1 -1
  109. package/es/types/Watcher.d.ts +1 -1
  110. package/es/types/index.d.ts +1 -0
  111. package/es/types/index.js +1 -0
  112. package/es/utils/SimpleConnector.d.ts +30 -4
  113. package/es/utils/SimpleConnector.js +294 -21
  114. package/es/utils/concurrent.js +1 -1
  115. package/es/utils/decimal.d.ts +26 -0
  116. package/es/utils/decimal.js +87 -0
  117. package/es/utils/fetch/index.d.ts +1 -0
  118. package/es/utils/fetch/index.js +3 -0
  119. package/es/utils/fetch/index.mp.d.ts +3 -0
  120. package/es/utils/fetch/index.mp.js +280 -0
  121. package/es/utils/fetch/index.native.d.ts +1 -0
  122. package/es/utils/fetch/index.native.js +3 -0
  123. package/es/utils/fetch/index.web.d.ts +1 -0
  124. package/es/utils/fetch/index.web.js +3 -0
  125. package/es/utils/fetch/shared.d.ts +6 -0
  126. package/es/utils/fetch/shared.js +23 -0
  127. package/es/utils/localizedContent.d.ts +11 -0
  128. package/es/utils/localizedContent.js +346 -0
  129. package/es/utils/lodash.d.ts +1 -35
  130. package/es/utils/lodash.js +1 -52
  131. package/es/utils/module/combine.common.d.ts +3 -3
  132. package/es/utils/module/combine.common.js +2 -2
  133. package/es/utils/module/combine.dev.d.ts +2 -2
  134. package/es/utils/module/combine.dev.js +2 -2
  135. package/es/utils/module/combine.prod.d.ts +1 -1
  136. package/es/utils/module/combine.server.d.ts +2 -2
  137. package/es/utils/module/combine.server.js +2 -2
  138. package/es/utils/money.d.ts +2 -2
  139. package/es/utils/money.js +2 -2
  140. package/es/utils/operationResult.js +1 -1
  141. package/es/utils/projection.d.ts +3 -3
  142. package/es/utils/projection.js +1 -1
  143. package/es/utils/relationPath.d.ts +1 -1
  144. package/es/utils/relationPath.js +1 -1
  145. package/es/utils/row.d.ts +3 -3
  146. package/es/utils/row.js +2 -2
  147. package/es/utils/sseEndpoint.d.ts +41 -0
  148. package/es/utils/sseEndpoint.js +151 -0
  149. package/es/utils/toolkit.d.ts +28 -0
  150. package/es/utils/toolkit.js +220 -0
  151. package/es/utils/url/index.d.ts +1 -3
  152. package/es/utils/url/index.js +1 -1
  153. package/es/utils/url/index.mp.d.ts +16 -3
  154. package/es/utils/url/index.mp.js +2 -2
  155. package/es/utils/url/index.native.d.ts +13 -1
  156. package/es/utils/url/index.native.js +3 -1
  157. package/es/utils/url/index.web.d.ts +13 -1
  158. package/es/utils/url/index.web.js +3 -1
  159. package/es/utils/url/lightweight.d.ts +65 -0
  160. package/es/utils/url/lightweight.js +530 -0
  161. package/es/utils/url/urlObject.d.ts +16 -0
  162. package/es/utils/validate/id.d.ts +5 -0
  163. package/es/utils/validate/id.js +28 -0
  164. package/es/utils/validate/index.d.ts +4 -0
  165. package/es/utils/validate/index.js +4 -0
  166. package/es/utils/validate/mobile.d.ts +6 -0
  167. package/es/utils/validate/mobile.js +49 -0
  168. package/es/utils/validate/nationality.d.ts +14 -0
  169. package/es/utils/validate/nationality.data.d.ts +9 -0
  170. package/es/utils/validate/nationality.data.js +257 -0
  171. package/es/utils/validate/nationality.js +64 -0
  172. package/es/utils/validate/passport.d.ts +3 -0
  173. package/es/utils/validate/passport.js +19 -0
  174. package/es/utils/validator.d.ts +10 -8
  175. package/es/utils/validator.js +24 -40
  176. package/lib/actions/action.d.ts +1 -1
  177. package/lib/base-app-domain/EntityDict.d.ts +27 -0
  178. package/lib/base-app-domain/LocalizedContent/Schema.d.ts +19 -0
  179. package/lib/base-app-domain/LocalizedContent/Schema.js +4 -0
  180. package/lib/base-app-domain/LocalizedContent/Storage.d.ts +3 -0
  181. package/lib/base-app-domain/LocalizedContent/Storage.js +78 -0
  182. package/lib/base-app-domain/LocalizedContent/Style.d.ts +3 -0
  183. package/lib/base-app-domain/LocalizedContent/Style.js +15 -0
  184. package/lib/base-app-domain/LocalizedContent/_baseSchema.d.ts +58 -0
  185. package/lib/base-app-domain/Storage.js +26 -24
  186. package/lib/base-app-domain/StyleDict.js +10 -8
  187. package/lib/compiler/customChecks/i18n.js +5 -2
  188. package/lib/compiler/customChecks/runner.d.ts +1 -1
  189. package/lib/compiler/customChecks/types.d.ts +2 -1
  190. package/lib/compiler/dependencyBuilder.d.ts +11 -2
  191. package/lib/compiler/dependencyBuilder.js +237 -243
  192. package/lib/compiler/entityDescEnum.d.ts +5 -0
  193. package/lib/compiler/entityDescEnum.js +450 -0
  194. package/lib/compiler/entitySource.d.ts +28 -0
  195. package/lib/compiler/entitySource.js +529 -0
  196. package/lib/compiler/localeBuilder.d.ts +7 -2
  197. package/lib/compiler/localeBuilder.js +52 -56
  198. package/lib/compiler/routerBuilder.d.ts +32 -3
  199. package/lib/compiler/routerBuilder.js +160 -48
  200. package/lib/compiler/schemaBuilder.d.ts +12 -2
  201. package/lib/compiler/schemaBuilder.js +855 -350
  202. package/lib/compiler/tscBuilder.d.ts +20 -2
  203. package/lib/compiler/tscBuilder.js +217 -37
  204. package/lib/context/BackendRuntimeContext.d.ts +6 -4
  205. package/lib/context/BackendRuntimeContext.js +10 -3
  206. package/lib/context/ContextComposer.d.ts +93 -0
  207. package/lib/context/ContextComposer.js +361 -0
  208. package/lib/context/SerializedData.d.ts +2 -1
  209. package/lib/data/i18n.d.ts +1 -1
  210. package/lib/data/i18n.js +1 -86
  211. package/lib/data/i18n.json +86 -0
  212. package/lib/entities/ActionAuth.d.ts +3 -3
  213. package/lib/entities/I18n.d.ts +2 -2
  214. package/lib/entities/LocalizedContent.d.ts +22 -0
  215. package/lib/entities/LocalizedContent.js +104 -0
  216. package/lib/entities/Log.d.ts +3 -3
  217. package/lib/entities/Modi.d.ts +2 -2
  218. package/lib/entities/ModiEntity.d.ts +3 -3
  219. package/lib/entities/Oper.d.ts +5 -5
  220. package/lib/entities/OperEntity.d.ts +3 -3
  221. package/lib/entities/Path.d.ts +2 -2
  222. package/lib/entities/Relation.d.ts +2 -2
  223. package/lib/entities/RelationAuth.d.ts +3 -3
  224. package/lib/entities/User.d.ts +4 -4
  225. package/lib/entities/UserEntityClaim.d.ts +6 -6
  226. package/lib/entities/UserEntityGrant.d.ts +2 -2
  227. package/lib/entities/UserRelation.d.ts +4 -4
  228. package/lib/store/AsyncRowStore.d.ts +2 -2
  229. package/lib/store/AsyncRowStore.js +6 -7
  230. package/lib/store/CascadeStore.d.ts +5 -3
  231. package/lib/store/CascadeStore.js +101 -70
  232. package/lib/store/IntrinsicCheckers.d.ts +1 -1
  233. package/lib/store/IntrinsicCheckers.js +12 -13
  234. package/lib/store/IntrinsicLogics.d.ts +1 -1
  235. package/lib/store/RelationAuth.js +42 -43
  236. package/lib/store/SyncRowStore.d.ts +1 -1
  237. package/lib/store/SyncRowStore.js +4 -5
  238. package/lib/store/TriggerExecutor.d.ts +6 -4
  239. package/lib/store/TriggerExecutor.js +39 -28
  240. package/lib/store/checker.d.ts +2 -2
  241. package/lib/store/checker.js +55 -20
  242. package/lib/store/filter.d.ts +3 -3
  243. package/lib/store/filter.js +47 -48
  244. package/lib/store/modi.d.ts +5 -5
  245. package/lib/store/modi.js +5 -6
  246. package/lib/store/projection.d.ts +1 -1
  247. package/lib/store/relation.js +4 -5
  248. package/lib/store/triggers.d.ts +4 -4
  249. package/lib/store/triggers.js +13 -14
  250. package/lib/timers/oper.d.ts +3 -3
  251. package/lib/timers/vaccum.d.ts +3 -3
  252. package/lib/types/Action.d.ts +1 -1
  253. package/lib/types/AppLoader.d.ts +1 -1
  254. package/lib/types/Aspect.d.ts +1 -1
  255. package/lib/types/Auth.d.ts +2 -2
  256. package/lib/types/Configuration.d.ts +7 -6
  257. package/lib/types/Connector.d.ts +47 -1
  258. package/lib/types/DataType.d.ts +2 -2
  259. package/lib/types/Demand.d.ts +40 -6
  260. package/lib/types/Endpoint.d.ts +17 -1
  261. package/lib/types/Entity.d.ts +21 -4
  262. package/lib/types/Entity.js +27 -0
  263. package/lib/types/EntityDesc.d.ts +9 -8
  264. package/lib/types/Environment.d.ts +17 -0
  265. package/lib/types/Exception.d.ts +1 -1
  266. package/lib/types/Exception.js +2 -2
  267. package/lib/types/Expression.d.ts +13 -2
  268. package/lib/types/Expression.js +40 -5
  269. package/lib/types/Locale.d.ts +14 -1
  270. package/lib/types/Locale.js +14 -0
  271. package/lib/types/OakPackage.d.ts +29 -0
  272. package/lib/types/OakPackage.js +36 -0
  273. package/lib/types/Port.d.ts +1 -1
  274. package/lib/types/RowStore.d.ts +9 -7
  275. package/lib/types/Storage.d.ts +11 -3
  276. package/lib/types/Storage.js +13 -0
  277. package/lib/types/Style.d.ts +2 -2
  278. package/lib/types/Sync.d.ts +3 -3
  279. package/lib/types/Timer.d.ts +14 -2
  280. package/lib/types/Trigger.d.ts +1 -1
  281. package/lib/types/Watcher.d.ts +1 -1
  282. package/lib/types/index.d.ts +1 -0
  283. package/lib/types/index.js +1 -0
  284. package/lib/utils/SimpleConnector.d.ts +30 -4
  285. package/lib/utils/SimpleConnector.js +297 -24
  286. package/lib/utils/concurrent.js +4 -5
  287. package/lib/utils/decimal.d.ts +26 -0
  288. package/lib/utils/decimal.js +112 -0
  289. package/lib/utils/fetch/index.d.ts +1 -0
  290. package/lib/utils/fetch/index.js +6 -0
  291. package/lib/utils/fetch/index.mp.d.ts +3 -0
  292. package/lib/utils/fetch/index.mp.js +285 -0
  293. package/lib/utils/fetch/index.native.d.ts +1 -0
  294. package/lib/utils/fetch/index.native.js +6 -0
  295. package/lib/utils/fetch/index.web.d.ts +1 -0
  296. package/lib/utils/fetch/index.web.js +6 -0
  297. package/lib/utils/fetch/shared.d.ts +6 -0
  298. package/lib/utils/fetch/shared.js +28 -0
  299. package/lib/utils/localizedContent.d.ts +11 -0
  300. package/lib/utils/localizedContent.js +352 -0
  301. package/lib/utils/lodash.d.ts +1 -35
  302. package/lib/utils/lodash.js +1 -76
  303. package/lib/utils/module/combine.common.d.ts +3 -3
  304. package/lib/utils/module/combine.common.js +6 -7
  305. package/lib/utils/module/combine.dev.d.ts +2 -2
  306. package/lib/utils/module/combine.dev.js +19 -19
  307. package/lib/utils/module/combine.prod.d.ts +1 -1
  308. package/lib/utils/module/combine.server.d.ts +2 -2
  309. package/lib/utils/module/combine.server.js +19 -19
  310. package/lib/utils/money.d.ts +2 -2
  311. package/lib/utils/money.js +2 -2
  312. package/lib/utils/operationResult.js +4 -4
  313. package/lib/utils/projection.d.ts +3 -3
  314. package/lib/utils/relationPath.d.ts +1 -1
  315. package/lib/utils/relationPath.js +10 -11
  316. package/lib/utils/row.d.ts +3 -3
  317. package/lib/utils/row.js +4 -5
  318. package/lib/utils/sseEndpoint.d.ts +41 -0
  319. package/lib/utils/sseEndpoint.js +156 -0
  320. package/lib/utils/toolkit.d.ts +28 -0
  321. package/lib/utils/toolkit.js +253 -0
  322. package/lib/utils/url/index.d.ts +1 -3
  323. package/lib/utils/url/index.js +3 -1
  324. package/lib/utils/url/index.mp.d.ts +16 -3
  325. package/lib/utils/url/index.mp.js +6 -4
  326. package/lib/utils/url/index.native.d.ts +13 -1
  327. package/lib/utils/url/index.native.js +5 -1
  328. package/lib/utils/url/index.web.d.ts +13 -1
  329. package/lib/utils/url/index.web.js +5 -1
  330. package/lib/utils/url/lightweight.d.ts +65 -0
  331. package/lib/utils/url/lightweight.js +535 -0
  332. package/lib/utils/url/urlObject.d.ts +16 -0
  333. package/lib/utils/url/urlObject.js +2 -0
  334. package/lib/utils/url/whatwg-url/lib/URL-impl.d.ts +8 -15
  335. package/lib/utils/url/whatwg-url/lib/infra.js +5 -4
  336. package/lib/utils/url/whatwg-url/lib/urlencoded.d.ts +3 -1
  337. package/lib/utils/url/whatwg-url/lib/utils.d.ts +1 -1
  338. package/lib/utils/validate/id.d.ts +5 -0
  339. package/lib/utils/validate/id.js +35 -0
  340. package/lib/utils/validate/index.d.ts +4 -0
  341. package/lib/utils/validate/index.js +7 -0
  342. package/lib/utils/validate/mobile.d.ts +6 -0
  343. package/lib/utils/validate/mobile.js +57 -0
  344. package/lib/utils/validate/nationality.d.ts +14 -0
  345. package/lib/utils/validate/nationality.data.d.ts +9 -0
  346. package/lib/utils/validate/nationality.data.js +260 -0
  347. package/lib/utils/validate/nationality.js +76 -0
  348. package/lib/utils/validate/passport.d.ts +3 -0
  349. package/lib/utils/validate/passport.js +24 -0
  350. package/lib/utils/validator.d.ts +10 -8
  351. package/lib/utils/validator.js +38 -42
  352. package/package.json +19 -9
  353. package/es/utils/url/whatwg-url/index.d.ts +0 -3
  354. package/es/utils/url/whatwg-url/index.js +0 -12
  355. package/es/utils/url/whatwg-url/lib/URL-impl.d.ts +0 -27
  356. package/es/utils/url/whatwg-url/lib/URL-impl.js +0 -172
  357. package/es/utils/url/whatwg-url/lib/URL.js +0 -295
  358. package/es/utils/url/whatwg-url/lib/URLSearchParams-impl.d.ts +0 -19
  359. package/es/utils/url/whatwg-url/lib/URLSearchParams-impl.js +0 -123
  360. package/es/utils/url/whatwg-url/lib/URLSearchParams.js +0 -423
  361. package/es/utils/url/whatwg-url/lib/infra.d.ts +0 -12
  362. package/es/utils/url/whatwg-url/lib/infra.js +0 -19
  363. package/es/utils/url/whatwg-url/lib/url-state-machine.d.ts +0 -24
  364. package/es/utils/url/whatwg-url/lib/url-state-machine.js +0 -1228
  365. package/es/utils/url/whatwg-url/lib/urlencoded.d.ts +0 -14
  366. package/es/utils/url/whatwg-url/lib/urlencoded.js +0 -160
  367. package/es/utils/url/whatwg-url/lib/utils.d.ts +0 -37
  368. package/es/utils/url/whatwg-url/lib/utils.js +0 -99
  369. package/lib/store/diffSchema.d.ts +0 -1
  370. package/lib/utils/url/whatwg-url/index.d.ts +0 -3
  371. package/lib/utils/url/whatwg-url/index.js +0 -16
  372. package/lib/utils/url/whatwg-url/lib/URL-impl.js +0 -175
  373. package/lib/utils/url/whatwg-url/lib/URL.d.ts +0 -1
  374. package/lib/utils/url/whatwg-url/lib/URL.js +0 -298
  375. package/lib/utils/url/whatwg-url/lib/URLSearchParams-impl.d.ts +0 -19
  376. package/lib/utils/url/whatwg-url/lib/URLSearchParams-impl.js +0 -126
  377. package/lib/utils/url/whatwg-url/lib/URLSearchParams.d.ts +0 -1
  378. package/lib/utils/url/whatwg-url/lib/URLSearchParams.js +0 -426
  379. package/lib/utils/url/whatwg-url/lib/infra.d.ts +0 -12
  380. package/lib/utils/url/whatwg-url/lib/url-state-machine.d.ts +0 -24
  381. package/lib/utils/url/whatwg-url/lib/url-state-machine.js +0 -1238
  382. package/lib/utils/url/whatwg-url/lib/urlencoded.js +0 -162
  383. package/lib/utils/url/whatwg-url/lib/utils.js +0 -101
  384. package/src/entities/ActionAuth.ts +0 -50
  385. package/src/entities/I18n.ts +0 -53
  386. package/src/entities/Log.ts +0 -62
  387. package/src/entities/Modi.ts +0 -107
  388. package/src/entities/ModiEntity.ts +0 -35
  389. package/src/entities/Oper.ts +0 -115
  390. package/src/entities/OperEntity.ts +0 -36
  391. package/src/entities/Path.ts +0 -56
  392. package/src/entities/Relation.ts +0 -53
  393. package/src/entities/RelationAuth.ts +0 -53
  394. package/src/entities/User.ts +0 -85
  395. package/src/entities/UserEntityClaim.ts +0 -41
  396. package/src/entities/UserEntityGrant.ts +0 -33
  397. package/src/entities/UserRelation.ts +0 -60
  398. /package/es/{utils/url/whatwg-url/lib/URL.d.ts → base-app-domain/LocalizedContent/_baseSchema.js} +0 -0
  399. /package/es/utils/url/{whatwg-url/lib/URLSearchParams.d.ts → urlObject.js} +0 -0
  400. /package/lib/{store/diffSchema.js → base-app-domain/LocalizedContent/_baseSchema.js} +0 -0
@@ -0,0 +1,353 @@
1
+ export function defineContextLayer(definition) {
2
+ return definition;
3
+ }
4
+ export function defineContextModule(definition) {
5
+ return definition;
6
+ }
7
+ export class OakContextCompositionException extends Error {
8
+ leftModule;
9
+ rightModule;
10
+ scope;
11
+ constructor(scope, leftModule, rightModule, detail) {
12
+ super(`Context模块「${leftModule}」与「${rightModule}」不兼容:${detail}。请联系管理员。`);
13
+ this.name = 'OakContextCompositionException';
14
+ this.leftModule = leftModule;
15
+ this.rightModule = rightModule;
16
+ this.scope = scope;
17
+ }
18
+ }
19
+ export const CONTEXT_COMPOSITION = Symbol.for('oak.context.composition');
20
+ function compositionError(scope, leftModule, rightModule, detail) {
21
+ return new OakContextCompositionException(scope, leftModule, rightModule, detail);
22
+ }
23
+ function moduleFingerprint(module) {
24
+ const layer = module.layer;
25
+ return JSON.stringify({
26
+ dependencies: (module.dependencies || []).map(({ id }) => id).sort(),
27
+ layer: layer
28
+ ? {
29
+ hasApply: !!layer.apply,
30
+ hasBase: !!layer.base,
31
+ hooks: Object.entries(layer.hooks || {}).map(([name, hook]) => [
32
+ name,
33
+ hook.order || 'forward',
34
+ hook.phase || 'after',
35
+ ]).sort(),
36
+ members: Object.entries(layer.members || {}).sort(),
37
+ reducers: Object.entries(layer.reducers || {}).map(([name, reducer]) => [name, reducer.order || 'forward']).sort(),
38
+ }
39
+ : undefined,
40
+ version: module.version,
41
+ });
42
+ }
43
+ function orderContextModules(roots, scope) {
44
+ const active = new Set();
45
+ const fingerprints = new Map();
46
+ const modules = new Map();
47
+ const ordered = [];
48
+ const completed = new Set();
49
+ const visit = (module, parentId) => {
50
+ if (!module.id || !module.version) {
51
+ throw compositionError(scope, parentId || 'project', module.id || 'unknown', 'Context module 必须声明非空的 id 和 version');
52
+ }
53
+ const fingerprint = moduleFingerprint(module);
54
+ const previousFingerprint = fingerprints.get(module.id);
55
+ const previousModule = modules.get(module.id);
56
+ if (previousModule) {
57
+ if (previousModule.version !== module.version
58
+ || previousFingerprint !== fingerprint) {
59
+ throw compositionError(scope, previousModule.id, module.id, `检测到同一模块的多个不一致版本或定义(${previousModule.version} / ${module.version})`);
60
+ }
61
+ }
62
+ else {
63
+ const normalized = {
64
+ ...module,
65
+ dependencies: [...(module.dependencies || [])].sort((left, right) => left.id.localeCompare(right.id)),
66
+ };
67
+ modules.set(module.id, normalized);
68
+ fingerprints.set(module.id, fingerprint);
69
+ }
70
+ if (active.has(module.id)) {
71
+ throw compositionError(scope, parentId || module.id, module.id, 'Context module 依赖关系成环');
72
+ }
73
+ if (completed.has(module.id)) {
74
+ return;
75
+ }
76
+ active.add(module.id);
77
+ const normalized = modules.get(module.id);
78
+ normalized.dependencies.forEach((dependency) => visit(dependency, module.id));
79
+ active.delete(module.id);
80
+ completed.add(module.id);
81
+ ordered.push(normalized);
82
+ };
83
+ [...roots].sort((left, right) => left.id.localeCompare(right.id)).forEach((root) => visit(root));
84
+ return {
85
+ modules,
86
+ ordered,
87
+ };
88
+ }
89
+ function collectDependencyIds(moduleId, modules, cache) {
90
+ const cached = cache.get(moduleId);
91
+ if (cached) {
92
+ return cached;
93
+ }
94
+ const result = new Set();
95
+ const module = modules.get(moduleId);
96
+ module?.dependencies.forEach(({ id }) => {
97
+ result.add(id);
98
+ collectDependencyIds(id, modules, cache).forEach((dependencyId) => result.add(dependencyId));
99
+ });
100
+ cache.set(moduleId, result);
101
+ return result;
102
+ }
103
+ function getOwnPrototypeMethods(ContextClass) {
104
+ return Reflect.ownKeys(ContextClass.prototype).filter((key) => {
105
+ if (key === 'constructor' || typeof key !== 'string') {
106
+ return false;
107
+ }
108
+ const descriptor = Object.getOwnPropertyDescriptor(ContextClass.prototype, key);
109
+ return typeof descriptor?.value === 'function';
110
+ });
111
+ }
112
+ function getPrototypeMethod(ContextClass, name) {
113
+ let prototype = ContextClass.prototype;
114
+ while (prototype) {
115
+ const descriptor = Object.getOwnPropertyDescriptor(prototype, name);
116
+ if (typeof descriptor?.value === 'function') {
117
+ return descriptor.value;
118
+ }
119
+ prototype = Object.getPrototypeOf(prototype);
120
+ }
121
+ return undefined;
122
+ }
123
+ function makeSubclass(Base) {
124
+ class ComposedContext extends Base {
125
+ }
126
+ return ComposedContext;
127
+ }
128
+ function normalizeDeclaration(declaration) {
129
+ return {
130
+ kind: declaration.kind,
131
+ policy: declaration.policy || 'unique',
132
+ };
133
+ }
134
+ function resolveEntriesOrder(entries) {
135
+ if (entries[0]?.order === 'reverse') {
136
+ return [...entries].reverse();
137
+ }
138
+ return [...entries];
139
+ }
140
+ function installLifecycleMethods(Current, series, reducers) {
141
+ if (series.size === 0 && reducers.size === 0) {
142
+ return Current;
143
+ }
144
+ const Composed = makeSubclass(Current);
145
+ series.forEach((entries, name) => {
146
+ const baseMethod = getPrototypeMethod(Current, name);
147
+ const orderedEntries = resolveEntriesOrder(entries);
148
+ const phase = entries[0]?.phase || 'after';
149
+ Object.defineProperty(Composed.prototype, name, {
150
+ configurable: true,
151
+ value: async function (...args) {
152
+ let result;
153
+ const runHandlers = async () => {
154
+ for (const { handler } of orderedEntries) {
155
+ result = await Reflect.apply(handler, this, args);
156
+ }
157
+ };
158
+ if (phase === 'before') {
159
+ await runHandlers();
160
+ }
161
+ if (baseMethod) {
162
+ result = await Reflect.apply(baseMethod, this, args);
163
+ }
164
+ if (phase === 'after') {
165
+ await runHandlers();
166
+ }
167
+ return result;
168
+ },
169
+ writable: true,
170
+ });
171
+ });
172
+ reducers.forEach((entries, name) => {
173
+ const baseMethod = getPrototypeMethod(Current, name);
174
+ const orderedEntries = resolveEntriesOrder(entries);
175
+ Object.defineProperty(Composed.prototype, name, {
176
+ configurable: true,
177
+ value: async function (...args) {
178
+ let value = baseMethod
179
+ ? await Reflect.apply(baseMethod, this, args)
180
+ : undefined;
181
+ for (const { handler } of orderedEntries) {
182
+ value = await Reflect.apply(handler, this, [value, ...args]);
183
+ }
184
+ return value;
185
+ },
186
+ writable: true,
187
+ });
188
+ });
189
+ return Composed;
190
+ }
191
+ export function composeContextModules(BaseContext, roots, options = {}) {
192
+ const scope = options.scope || 'context';
193
+ const { modules, ordered } = orderContextModules(roots, scope);
194
+ const dependencyCache = new Map();
195
+ const memberOwners = new Map();
196
+ const series = new Map();
197
+ const reducers = new Map();
198
+ let Current = BaseContext;
199
+ let structuralOwner;
200
+ const baseModules = ordered.filter(({ layer }) => !!layer?.base);
201
+ if (baseModules.length > 1) {
202
+ throw compositionError(scope, baseModules[0].id, baseModules[1].id, '多个模块同时提供基础 Context class');
203
+ }
204
+ const baseModule = baseModules[0];
205
+ if (baseModule?.layer?.base) {
206
+ if (baseModule.layer.base !== BaseContext
207
+ && !BaseContext.prototype.isPrototypeOf(baseModule.layer.base.prototype)) {
208
+ throw compositionError(scope, 'oak-context-base', baseModule.id, '基础 Context class 没有继承组合入口提供的 BaseContext');
209
+ }
210
+ const contextDependencies = baseModule.dependencies.filter(({ layer }) => !!layer);
211
+ if (contextDependencies[0]) {
212
+ throw compositionError(scope, contextDependencies[0].id, baseModule.id, '兼容 base layer 不能依赖其它 Context layer');
213
+ }
214
+ Current = baseModule.layer.base;
215
+ structuralOwner = baseModule.id;
216
+ }
217
+ const registerMember = (moduleId, name, declarationInput) => {
218
+ const declaration = normalizeDeclaration(declarationInput);
219
+ if (declaration.kind === 'field'
220
+ && declaration.policy === 'final') {
221
+ throw compositionError(scope, moduleId, moduleId, `字段「${name}」不能声明 final 策略`);
222
+ }
223
+ const owner = memberOwners.get(name);
224
+ if (!owner) {
225
+ memberOwners.set(name, {
226
+ declaration,
227
+ moduleId,
228
+ });
229
+ return;
230
+ }
231
+ if (owner.declaration.kind === 'method'
232
+ && declaration.kind === 'method'
233
+ && owner.declaration.policy === declaration.policy
234
+ && ['series', 'reduce'].includes(declaration.policy)) {
235
+ return;
236
+ }
237
+ if (owner.declaration.kind === declaration.kind
238
+ && owner.declaration.policy === 'replace'
239
+ && declaration.policy === 'replace') {
240
+ const dependencies = collectDependencyIds(moduleId, modules, dependencyCache);
241
+ if (dependencies.has(owner.moduleId)) {
242
+ memberOwners.set(name, {
243
+ declaration,
244
+ moduleId,
245
+ });
246
+ return;
247
+ }
248
+ }
249
+ throw compositionError(scope, owner.moduleId, moduleId, `${owner.declaration.kind === 'field' ? '字段' : '方法'}「${name}」发生冲突(${owner.declaration.policy} / ${declaration.policy})`);
250
+ };
251
+ const runtimeOrdered = baseModule
252
+ ? [baseModule, ...ordered.filter(({ id }) => id !== baseModule.id)]
253
+ : ordered;
254
+ runtimeOrdered.forEach((module) => {
255
+ const { layer } = module;
256
+ if (!layer) {
257
+ return;
258
+ }
259
+ const explicitMembers = {
260
+ ...(layer.members || {}),
261
+ };
262
+ Object.keys(layer.hooks || {}).forEach((name) => {
263
+ if (explicitMembers[name]) {
264
+ throw compositionError(scope, module.id, module.id, `方法「${name}」不能同时声明 member 和 series hook`);
265
+ }
266
+ explicitMembers[name] = {
267
+ kind: 'method',
268
+ policy: 'series',
269
+ };
270
+ });
271
+ Object.keys(layer.reducers || {}).forEach((name) => {
272
+ if (explicitMembers[name]) {
273
+ throw compositionError(scope, module.id, module.id, `方法「${name}」不能同时声明 member 和 reducer`);
274
+ }
275
+ explicitMembers[name] = {
276
+ kind: 'method',
277
+ policy: 'reduce',
278
+ };
279
+ });
280
+ let Next = Current;
281
+ let structuralChanged = false;
282
+ if (layer.base) {
283
+ Next = layer.base;
284
+ structuralChanged = true;
285
+ }
286
+ else if (layer.apply) {
287
+ Next = layer.apply(Current);
288
+ if (typeof Next !== 'function') {
289
+ throw compositionError(scope, module.id, module.id, 'Context layer apply 没有返回 class');
290
+ }
291
+ structuralOwner = structuralOwner || module.id;
292
+ structuralChanged = true;
293
+ }
294
+ if (structuralChanged) {
295
+ getOwnPrototypeMethods(Next).forEach((name) => {
296
+ if (!explicitMembers[name]) {
297
+ explicitMembers[name] = {
298
+ kind: 'method',
299
+ policy: 'unique',
300
+ };
301
+ }
302
+ });
303
+ }
304
+ Object.entries(explicitMembers).forEach(([name, declaration]) => registerMember(module.id, name, declaration));
305
+ Object.entries(layer.hooks || {}).forEach(([name, hook]) => {
306
+ const entries = series.get(name) || [];
307
+ const entry = {
308
+ handler: hook.handler,
309
+ moduleId: module.id,
310
+ order: hook.order || 'forward',
311
+ phase: hook.phase || 'after',
312
+ };
313
+ const first = entries[0];
314
+ if (first
315
+ && (first.order !== entry.order
316
+ || first.phase !== entry.phase)) {
317
+ throw compositionError(scope, first.moduleId, module.id, `series 方法「${name}」声明了不一致的执行方向或阶段`);
318
+ }
319
+ entries.push(entry);
320
+ series.set(name, entries);
321
+ });
322
+ Object.entries(layer.reducers || {}).forEach(([name, reducer]) => {
323
+ const entries = reducers.get(name) || [];
324
+ const entry = {
325
+ handler: reducer.handler,
326
+ moduleId: module.id,
327
+ order: reducer.order || 'forward',
328
+ };
329
+ const first = entries[0];
330
+ if (first && first.order !== entry.order) {
331
+ throw compositionError(scope, first.moduleId, module.id, `reducer 方法「${name}」声明了不一致的执行方向`);
332
+ }
333
+ entries.push(entry);
334
+ reducers.set(name, entries);
335
+ });
336
+ Current = Next;
337
+ });
338
+ const Composed = installLifecycleMethods(Current, series, reducers);
339
+ const composition = {
340
+ modules: runtimeOrdered.map(({ id, version }) => ({ id, version })),
341
+ scope,
342
+ };
343
+ Object.defineProperty(Composed, CONTEXT_COMPOSITION, {
344
+ configurable: false,
345
+ enumerable: false,
346
+ value: composition,
347
+ writable: false,
348
+ });
349
+ return Composed;
350
+ }
351
+ export function getContextComposition(ContextClass) {
352
+ return ContextClass[CONTEXT_COMPOSITION];
353
+ }
@@ -1,7 +1,8 @@
1
- import { BriefEnv } from '../types/Environment';
1
+ import { BriefEnv } from "../types/Environment";
2
2
  export type SerializedData = {
3
3
  sid?: string;
4
4
  be?: BriefEnv;
5
+ locale?: string;
5
6
  ns?: {
6
7
  pathname: string;
7
8
  oakFrom?: string;
package/es/data/i18n.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { CreateOperationData as I18n } from "../base-app-domain/I18n/Schema";
1
+ import type { CreateOperationData as I18n } from "../base-app-domain/I18n/Schema";
2
2
  declare const i18ns: I18n[];
3
3
  export default i18ns;
package/es/data/i18n.js CHANGED
@@ -1,88 +1,3 @@
1
1
  // 本文件为自动编译产生,请勿直接修改
2
- const i18ns = [
3
- {
4
- id: "b5d099784b9cf4ab20300f307a058b27",
5
- namespace: "oak-domain-l-error",
6
- language: "en-US",
7
- module: "oak-domain",
8
- position: "locales/error",
9
- data: {
10
- "requestTimeout": "Request timed out",
11
- "noRelationDef": "No valid relation definition was found for action ${%{action}} on entity [%{entity}]",
12
- "rowUnexisted": "A null row was found while querying entity [%{entity}]. Please check data consistency",
13
- "uniqViolation": "The updated data violates a unique constraint",
14
- "signatureFailed": "Signature verification failed",
15
- "attributesNull": "Attribute [%{attributes}] must not be null",
16
- "attributesCantUpdate": "Attribute [%{attributes}] cannot be updated",
17
- "attributesFormatError": "Attribute [%{attributes}] has an invalid format. Expected [%{format}]",
18
- "attributesTooLong": "Attribute [%{attributes}] is too long. The maximum length is [%{length}]",
19
- "attributesOverMax": "Attribute [%{attributes}] exceeds the maximum value [%{threshold}]",
20
- "attributesUnderMin": "Attribute [%{attributes}] is below the minimum value [%{threshold}]",
21
- "attributesNotInEnumeration": "Attribute [%{attributes}] is not in the valid enumeration",
22
- "operationUnpermitted": "The user does not have permission to perform this operation",
23
- "dataInvisible": "The user does not have permission to query this data",
24
- "unLoggedIn": "The user is not logged in",
25
- "rowLocked": "This row is currently locked",
26
- "congrentRowExists": "An identical row already exists",
27
- "deadlock": "A deadlock was detected",
28
- "preconditionUnset": "Preconditions are not met",
29
- "externalException": "External interface call failed",
30
- "socketConnectException": "A connection issue occurred. Please try refreshing the page",
31
- "applicationHasToUpgrade": "The application needs to be upgraded",
32
- "importedDataParseError": "The imported data contains errors",
33
- "networkException": "Network error",
34
- "serverProxyException": "Server proxy error",
35
- "network request returns status": "Network request returned status: %{status}",
36
- "content types not yet supported": "Content type is not yet supported",
37
- "template was not found": "The corresponding template was not found",
38
- "export header not passed in": "Export headers were not provided",
39
- "export not supported": "Export is not supported",
40
- "export too many data": "Too much data to export",
41
- "import not supported": "Import is not supported",
42
- "you are banned from updating": "You are forbidden from updating"
43
- }
44
- },
45
- {
46
- id: "78c237bf2064a36fe73d943ccbbe22d5",
47
- namespace: "oak-domain-l-error",
48
- language: "zh-CN",
49
- module: "oak-domain",
50
- position: "locales/error",
51
- data: {
52
- "requestTimeout": "请求超时",
53
- "noRelationDef": "对象[%{entity}]的操作${%{action}}找不到有效的relation定义",
54
- "rowUnexisted": "查询对象[%{entity}]时发现了空指针,请检查数据一致性",
55
- "uniqViolation": "您更新的数据违反了唯一性约束",
56
- "signatureFailed": "验签失败",
57
- "attributesNull": "属性[%{attributes}]不允许为空",
58
- "attributesCantUpdate": "属性[%{attributes}]不能更新",
59
- "attributesFormatError": "属性[%{attributes}]格式不对,应当是[%{format}]",
60
- "attributesTooLong": "属性[%{attributes}]长度过长,最长长度是[%{length}]",
61
- "attributesOverMax": "属性[%{attributes}]超过最大值[%{threshold}]",
62
- "attributesUnderMin": "属性[%{attributes}]低于最小值[%{threshold}]",
63
- "attributesNotInEnumeration": "属性[%{attributes}]不在有效的枚举值当中",
64
- "operationUnpermitted": "用户操作权限不足",
65
- "dataInvisible": "用户查询权限不足",
66
- "unLoggedIn": "用户未登录",
67
- "rowLocked": "该行数据当前处于被锁定状态",
68
- "congrentRowExists": "相同的行数据已经存在",
69
- "deadlock": "发现死锁",
70
- "preconditionUnset": "前置条件未满足",
71
- "externalException": "外部接口调用异常",
72
- "socketConnectException": "连接出现问题,请尝试刷新页面",
73
- "applicationHasToUpgrade": "应用需要升级",
74
- "importedDataParseError": "导入的数据存在异常",
75
- "networkException": "网络异常",
76
- "serverProxyException": "服务器代理异常",
77
- "network request returns status": "网络请求返回status:%{status}",
78
- "content types not yet supported": "尚不支持的content-type",
79
- "template was not found": "未找到对应的模板",
80
- "export header not passed in": "导出未传入表头",
81
- "export not supported": "导出不支持",
82
- "export too many data": "导出数据过多",
83
- "import not supported": "导入不支持",
84
- "you are banned from updating": "您被禁更新"
85
- }
86
- }
87
- ];
2
+ const i18ns = require("./i18n.json");
88
3
  export default i18ns;
@@ -0,0 +1,86 @@
1
+ [
2
+ {
3
+ "id": "b5d099784b9cf4ab20300f307a058b27",
4
+ "namespace": "oak-domain-l-error",
5
+ "language": "en-US",
6
+ "module": "oak-domain",
7
+ "position": "locales/error",
8
+ "data": {
9
+ "requestTimeout": "Request timed out",
10
+ "noRelationDef": "No valid relation definition was found for action ${%{action}} on entity [%{entity}]",
11
+ "rowUnexisted": "A null row was found while querying entity [%{entity}]. Please check data consistency",
12
+ "uniqViolation": "The updated data violates a unique constraint",
13
+ "signatureFailed": "Signature verification failed",
14
+ "attributesNull": "Attribute [%{attributes}] must not be null",
15
+ "attributesCantUpdate": "Attribute [%{attributes}] cannot be updated",
16
+ "attributesFormatError": "Attribute [%{attributes}] has an invalid format. Expected [%{format}]",
17
+ "attributesTooLong": "Attribute [%{attributes}] is too long. The maximum length is [%{length}]",
18
+ "attributesOverMax": "Attribute [%{attributes}] exceeds the maximum value [%{threshold}]",
19
+ "attributesUnderMin": "Attribute [%{attributes}] is below the minimum value [%{threshold}]",
20
+ "attributesNotInEnumeration": "Attribute [%{attributes}] is not in the valid enumeration",
21
+ "operationUnpermitted": "The user does not have permission to perform this operation",
22
+ "dataInvisible": "The user does not have permission to query this data",
23
+ "unLoggedIn": "The user is not logged in",
24
+ "rowLocked": "This row is currently locked",
25
+ "congrentRowExists": "An identical row already exists",
26
+ "deadlock": "A deadlock was detected",
27
+ "preconditionUnset": "Preconditions are not met",
28
+ "externalException": "External interface call failed",
29
+ "socketConnectException": "A connection issue occurred. Please try refreshing the page",
30
+ "applicationHasToUpgrade": "The application needs to be upgraded",
31
+ "importedDataParseError": "The imported data contains errors",
32
+ "networkException": "Network error",
33
+ "serverProxyException": "Server proxy error",
34
+ "network request returns status": "Network request returned status: %{status}",
35
+ "content types not yet supported": "Content type is not yet supported",
36
+ "template was not found": "The corresponding template was not found",
37
+ "export header not passed in": "Export headers were not provided",
38
+ "export not supported": "Export is not supported",
39
+ "export too many data": "Too much data to export",
40
+ "import not supported": "Import is not supported",
41
+ "you are banned from updating": "You are forbidden from updating"
42
+ }
43
+ },
44
+ {
45
+ "id": "78c237bf2064a36fe73d943ccbbe22d5",
46
+ "namespace": "oak-domain-l-error",
47
+ "language": "zh-CN",
48
+ "module": "oak-domain",
49
+ "position": "locales/error",
50
+ "data": {
51
+ "requestTimeout": "请求超时",
52
+ "noRelationDef": "对象[%{entity}]的操作${%{action}}找不到有效的relation定义",
53
+ "rowUnexisted": "查询对象[%{entity}]时发现了空指针,请检查数据一致性",
54
+ "uniqViolation": "您更新的数据违反了唯一性约束",
55
+ "signatureFailed": "验签失败",
56
+ "attributesNull": "属性[%{attributes}]不允许为空",
57
+ "attributesCantUpdate": "属性[%{attributes}]不能更新",
58
+ "attributesFormatError": "属性[%{attributes}]格式不对,应当是[%{format}]",
59
+ "attributesTooLong": "属性[%{attributes}]长度过长,最长长度是[%{length}]",
60
+ "attributesOverMax": "属性[%{attributes}]超过最大值[%{threshold}]",
61
+ "attributesUnderMin": "属性[%{attributes}]低于最小值[%{threshold}]",
62
+ "attributesNotInEnumeration": "属性[%{attributes}]不在有效的枚举值当中",
63
+ "operationUnpermitted": "用户操作权限不足",
64
+ "dataInvisible": "用户查询权限不足",
65
+ "unLoggedIn": "用户未登录",
66
+ "rowLocked": "该行数据当前处于被锁定状态",
67
+ "congrentRowExists": "相同的行数据已经存在",
68
+ "deadlock": "发现死锁",
69
+ "preconditionUnset": "前置条件未满足",
70
+ "externalException": "外部接口调用异常",
71
+ "socketConnectException": "连接出现问题,请尝试刷新页面",
72
+ "applicationHasToUpgrade": "应用需要升级",
73
+ "importedDataParseError": "导入的数据存在异常",
74
+ "networkException": "网络异常",
75
+ "serverProxyException": "服务器代理异常",
76
+ "network request returns status": "网络请求返回status:%{status}",
77
+ "content types not yet supported": "尚不支持的content-type",
78
+ "template was not found": "未找到对应的模板",
79
+ "export header not passed in": "导出未传入表头",
80
+ "export not supported": "导出不支持",
81
+ "export too many data": "导出数据过多",
82
+ "import not supported": "导入不支持",
83
+ "you are banned from updating": "您被禁更新"
84
+ }
85
+ }
86
+ ]
@@ -1,6 +1,6 @@
1
- import { EntityShape } from '../types/Entity';
2
- import { Schema as Relation } from './Relation';
3
- import { Schema as Path } from './Path';
1
+ import { EntityShape } from "../types/Entity";
2
+ import { Schema as Relation } from "./Relation";
3
+ import { Schema as Path } from "./Path";
4
4
  type Actions = string[];
5
5
  export interface Schema extends EntityShape {
6
6
  relation?: Relation;
@@ -1,5 +1,5 @@
1
- import { String } from '../types/DataType';
2
- import { EntityShape } from '../types/Entity';
1
+ import { String } from "../types/DataType";
2
+ import { EntityShape } from "../types/Entity";
3
3
  export interface Schema extends EntityShape {
4
4
  module: String<64>;
5
5
  position: String<188>;
@@ -0,0 +1,22 @@
1
+ import { String } from "../types/DataType";
2
+ import { EntityShape } from "../types/Entity";
3
+ import { EntityDesc } from "../types/EntityDesc";
4
+ import { Language } from "../types/Locale";
5
+ export type LocalizedContentItem = {
6
+ digest: string;
7
+ translation: string;
8
+ source?: 'machine' | 'manual';
9
+ updatedAt?: number;
10
+ updatedBy?: String<64>;
11
+ };
12
+ export type LocalizedContentData = Record<string, LocalizedContentItem>;
13
+ export interface Schema extends EntityShape {
14
+ entity: String<32>;
15
+ entityId: String<64>;
16
+ language: Language;
17
+ data: LocalizedContentData;
18
+ }
19
+ declare const entityDesc: EntityDesc<Schema, '', '', {
20
+ language: Schema['language'];
21
+ }>;
22
+ export { entityDesc };