oak-domain 5.1.36 → 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 (641) hide show
  1. package/README.md +5 -1
  2. package/es/actions/action.d.ts +16 -0
  3. package/es/actions/action.js +13 -0
  4. package/es/base-app-domain/ActionAuth/Schema.d.ts +19 -0
  5. package/es/base-app-domain/ActionAuth/Schema.js +1 -0
  6. package/es/base-app-domain/ActionAuth/Storage.d.ts +3 -0
  7. package/es/base-app-domain/ActionAuth/Storage.js +36 -0
  8. package/es/base-app-domain/ActionAuth/_baseSchema.d.ts +46 -0
  9. package/es/base-app-domain/ActionDefDict.d.ts +12 -0
  10. package/es/base-app-domain/ActionDefDict.js +10 -0
  11. package/es/base-app-domain/EntityDict.d.ts +754 -0
  12. package/es/base-app-domain/I18n/Schema.d.ts +19 -0
  13. package/es/base-app-domain/I18n/Schema.js +1 -0
  14. package/es/base-app-domain/I18n/Storage.d.ts +3 -0
  15. package/es/base-app-domain/I18n/Storage.js +55 -0
  16. package/es/base-app-domain/I18n/_baseSchema.d.ts +51 -0
  17. package/es/base-app-domain/LocalizedContent/Schema.d.ts +19 -0
  18. package/es/base-app-domain/LocalizedContent/Schema.js +1 -0
  19. package/es/base-app-domain/LocalizedContent/Storage.d.ts +3 -0
  20. package/es/base-app-domain/LocalizedContent/Storage.js +75 -0
  21. package/es/base-app-domain/LocalizedContent/Style.d.ts +3 -0
  22. package/es/base-app-domain/LocalizedContent/Style.js +12 -0
  23. package/es/base-app-domain/LocalizedContent/_baseSchema.d.ts +58 -0
  24. package/es/base-app-domain/LocalizedContent/_baseSchema.js +1 -0
  25. package/es/base-app-domain/Log/Action.d.ts +6 -0
  26. package/es/base-app-domain/Log/Action.js +2 -0
  27. package/es/base-app-domain/Log/Schema.d.ts +19 -0
  28. package/es/base-app-domain/Log/Schema.js +1 -0
  29. package/es/base-app-domain/Log/Storage.d.ts +3 -0
  30. package/es/base-app-domain/Log/Storage.js +26 -0
  31. package/es/base-app-domain/Log/Style.d.ts +3 -0
  32. package/es/base-app-domain/Log/Style.js +6 -0
  33. package/es/base-app-domain/Log/_baseSchema.d.ts +44 -0
  34. package/es/base-app-domain/Log/_baseSchema.js +1 -0
  35. package/es/base-app-domain/Modi/Action.d.ts +10 -0
  36. package/es/base-app-domain/Modi/Action.js +11 -0
  37. package/es/base-app-domain/Modi/Schema.d.ts +19 -0
  38. package/es/base-app-domain/Modi/Schema.js +1 -0
  39. package/es/base-app-domain/Modi/Storage.d.ts +3 -0
  40. package/es/base-app-domain/Modi/Storage.js +61 -0
  41. package/es/base-app-domain/Modi/Style.d.ts +3 -0
  42. package/es/base-app-domain/Modi/Style.js +13 -0
  43. package/es/base-app-domain/Modi/_baseSchema.d.ts +61 -0
  44. package/es/base-app-domain/Modi/_baseSchema.js +1 -0
  45. package/es/base-app-domain/ModiEntity/Schema.d.ts +19 -0
  46. package/es/base-app-domain/ModiEntity/Schema.js +1 -0
  47. package/es/base-app-domain/ModiEntity/Storage.d.ts +3 -0
  48. package/es/base-app-domain/ModiEntity/Storage.js +26 -0
  49. package/es/base-app-domain/ModiEntity/_baseSchema.d.ts +45 -0
  50. package/es/base-app-domain/ModiEntity/_baseSchema.js +1 -0
  51. package/es/base-app-domain/Oper/Action.d.ts +12 -0
  52. package/es/base-app-domain/Oper/Action.js +11 -0
  53. package/es/base-app-domain/Oper/Schema.d.ts +19 -0
  54. package/es/base-app-domain/Oper/Schema.js +1 -0
  55. package/es/base-app-domain/Oper/Storage.d.ts +3 -0
  56. package/es/base-app-domain/Oper/Storage.js +64 -0
  57. package/es/base-app-domain/Oper/Style.d.ts +3 -0
  58. package/es/base-app-domain/Oper/Style.js +12 -0
  59. package/es/base-app-domain/Oper/_baseSchema.d.ts +69 -0
  60. package/es/base-app-domain/Oper/_baseSchema.js +1 -0
  61. package/es/base-app-domain/OperEntity/Schema.d.ts +19 -0
  62. package/es/base-app-domain/OperEntity/Schema.js +1 -0
  63. package/es/base-app-domain/OperEntity/Storage.d.ts +3 -0
  64. package/es/base-app-domain/OperEntity/Storage.js +26 -0
  65. package/es/base-app-domain/OperEntity/_baseSchema.d.ts +45 -0
  66. package/es/base-app-domain/OperEntity/_baseSchema.js +1 -0
  67. package/es/base-app-domain/Path/Schema.d.ts +19 -0
  68. package/es/base-app-domain/Path/Schema.js +1 -0
  69. package/es/base-app-domain/Path/Storage.d.ts +3 -0
  70. package/es/base-app-domain/Path/Storage.js +56 -0
  71. package/es/base-app-domain/Path/_baseSchema.d.ts +52 -0
  72. package/es/base-app-domain/Path/_baseSchema.js +1 -0
  73. package/es/base-app-domain/Relation/Schema.d.ts +19 -0
  74. package/es/base-app-domain/Relation/Schema.js +1 -0
  75. package/es/base-app-domain/Relation/Storage.d.ts +3 -0
  76. package/es/base-app-domain/Relation/Storage.js +51 -0
  77. package/es/base-app-domain/Relation/_baseSchema.d.ts +48 -0
  78. package/es/base-app-domain/Relation/_baseSchema.js +1 -0
  79. package/es/base-app-domain/Relation.d.ts +2 -0
  80. package/es/base-app-domain/Relation.js +1 -0
  81. package/es/base-app-domain/RelationAuth/Schema.d.ts +19 -0
  82. package/es/base-app-domain/RelationAuth/Schema.js +1 -0
  83. package/es/base-app-domain/RelationAuth/Storage.d.ts +3 -0
  84. package/es/base-app-domain/RelationAuth/Storage.js +41 -0
  85. package/es/base-app-domain/RelationAuth/_baseSchema.d.ts +44 -0
  86. package/es/base-app-domain/RelationAuth/_baseSchema.js +1 -0
  87. package/es/base-app-domain/RelationId.d.ts +1 -0
  88. package/es/base-app-domain/RelationId.js +1 -0
  89. package/es/base-app-domain/Storage.d.ts +3 -0
  90. package/es/base-app-domain/Storage.js +32 -0
  91. package/es/base-app-domain/StyleDict.d.ts +3 -0
  92. package/es/base-app-domain/StyleDict.js +12 -0
  93. package/es/base-app-domain/User/Action.d.ts +11 -0
  94. package/es/base-app-domain/User/Action.js +9 -0
  95. package/es/base-app-domain/User/Schema.d.ts +19 -0
  96. package/es/base-app-domain/User/Schema.js +1 -0
  97. package/es/base-app-domain/User/Storage.d.ts +3 -0
  98. package/es/base-app-domain/User/Storage.js +30 -0
  99. package/es/base-app-domain/User/Style.d.ts +3 -0
  100. package/es/base-app-domain/User/Style.js +11 -0
  101. package/es/base-app-domain/User/_baseSchema.d.ts +54 -0
  102. package/es/base-app-domain/User/_baseSchema.js +1 -0
  103. package/es/base-app-domain/UserEntityClaim/Schema.d.ts +19 -0
  104. package/es/base-app-domain/UserEntityClaim/Schema.js +1 -0
  105. package/es/base-app-domain/UserEntityClaim/Storage.d.ts +3 -0
  106. package/es/base-app-domain/UserEntityClaim/Storage.js +34 -0
  107. package/es/base-app-domain/UserEntityClaim/_baseSchema.d.ts +53 -0
  108. package/es/base-app-domain/UserEntityClaim/_baseSchema.js +1 -0
  109. package/es/base-app-domain/UserEntityGrant/Schema.d.ts +19 -0
  110. package/es/base-app-domain/UserEntityGrant/Schema.js +1 -0
  111. package/es/base-app-domain/UserEntityGrant/Storage.d.ts +3 -0
  112. package/es/base-app-domain/UserEntityGrant/Storage.js +22 -0
  113. package/es/base-app-domain/UserEntityGrant/_baseSchema.d.ts +46 -0
  114. package/es/base-app-domain/UserEntityGrant/_baseSchema.js +1 -0
  115. package/es/base-app-domain/UserRelation/Schema.d.ts +19 -0
  116. package/es/base-app-domain/UserRelation/Schema.js +1 -0
  117. package/es/base-app-domain/UserRelation/Storage.d.ts +3 -0
  118. package/es/base-app-domain/UserRelation/Storage.js +53 -0
  119. package/es/base-app-domain/UserRelation/_baseSchema.d.ts +49 -0
  120. package/es/base-app-domain/UserRelation/_baseSchema.js +1 -0
  121. package/es/base-app-domain/index.d.ts +5 -0
  122. package/es/base-app-domain/index.js +5 -0
  123. package/es/compiler/customChecks/asyncContext.d.ts +123 -0
  124. package/es/compiler/customChecks/asyncContext.js +844 -0
  125. package/es/compiler/customChecks/i18n.d.ts +90 -0
  126. package/es/compiler/customChecks/i18n.js +606 -0
  127. package/es/compiler/customChecks/ignoreComments.d.ts +15 -0
  128. package/es/compiler/customChecks/ignoreComments.js +123 -0
  129. package/es/compiler/customChecks/index.d.ts +3 -0
  130. package/es/compiler/customChecks/index.js +3 -0
  131. package/es/compiler/customChecks/jsxChecker.d.ts +22 -0
  132. package/es/compiler/customChecks/jsxChecker.js +111 -0
  133. package/es/compiler/customChecks/runner.d.ts +6 -0
  134. package/es/compiler/customChecks/runner.js +252 -0
  135. package/es/compiler/customChecks/types.d.ts +131 -0
  136. package/es/compiler/customChecks/types.js +16 -0
  137. package/es/compiler/customChecks/utils.d.ts +82 -0
  138. package/es/compiler/customChecks/utils.js +312 -0
  139. package/es/compiler/dependencyBuilder.d.ts +36 -0
  140. package/es/compiler/dependencyBuilder.js +1258 -0
  141. package/es/compiler/entities.d.ts +2 -0
  142. package/es/compiler/entities.js +4 -0
  143. package/es/compiler/entityDescEnum.d.ts +5 -0
  144. package/es/compiler/entityDescEnum.js +443 -0
  145. package/es/compiler/entitySource.d.ts +28 -0
  146. package/es/compiler/entitySource.js +521 -0
  147. package/es/compiler/env.d.ts +18 -0
  148. package/es/compiler/env.js +41 -0
  149. package/es/compiler/identifier.d.ts +9 -0
  150. package/es/compiler/identifier.js +155 -0
  151. package/es/compiler/localeBuilder.d.ts +39 -0
  152. package/es/compiler/localeBuilder.js +272 -0
  153. package/es/compiler/routerBuilder.d.ts +37 -0
  154. package/es/compiler/routerBuilder.js +852 -0
  155. package/{lib/compiler/schemalBuilder.d.ts → es/compiler/schemaBuilder.d.ts} +53 -5
  156. package/es/compiler/schemaBuilder.js +7046 -0
  157. package/es/compiler/tscBuilder.d.ts +47 -0
  158. package/es/compiler/tscBuilder.js +1179 -0
  159. package/es/compiler/uiBuilder.d.ts +1 -0
  160. package/es/compiler/uiBuilder.js +3 -0
  161. package/es/context/BackendRuntimeContext.d.ts +34 -0
  162. package/es/context/BackendRuntimeContext.js +74 -0
  163. package/es/context/ContextComposer.d.ts +93 -0
  164. package/es/context/ContextComposer.js +353 -0
  165. package/es/context/SerializedData.d.ts +10 -0
  166. package/es/context/SerializedData.js +1 -0
  167. package/es/data/i18n.d.ts +3 -0
  168. package/es/data/i18n.js +3 -0
  169. package/es/data/i18n.json +86 -0
  170. package/es/entities/ActionAuth.d.ts +10 -0
  171. package/{src/entities/ActionAuth.ts → es/entities/ActionAuth.js} +11 -14
  172. package/es/entities/I18n.d.ts +9 -0
  173. package/{src/entities/I18n.ts → es/entities/I18n.js} +13 -13
  174. package/es/entities/LocalizedContent.d.ts +22 -0
  175. package/es/entities/LocalizedContent.js +101 -0
  176. package/es/entities/Log.d.ts +11 -0
  177. package/{src/entities/Log.ts → es/entities/Log.js} +20 -16
  178. package/es/entities/Modi.d.ts +11 -0
  179. package/{src/entities/Modi.ts → es/entities/Modi.js} +28 -25
  180. package/es/entities/ModiEntity.d.ts +8 -0
  181. package/es/entities/ModiEntity.js +25 -0
  182. package/es/entities/Oper.d.ts +21 -0
  183. package/{src/entities/Oper.ts → es/entities/Oper.js} +28 -29
  184. package/es/entities/OperEntity.d.ts +8 -0
  185. package/es/entities/OperEntity.js +25 -0
  186. package/es/entities/Path.d.ts +9 -0
  187. package/{src/entities/Path.ts → es/entities/Path.js} +13 -13
  188. package/es/entities/Relation.d.ts +8 -0
  189. package/{src/entities/Relation.ts → es/entities/Relation.js} +43 -43
  190. package/es/entities/RelationAuth.d.ts +8 -0
  191. package/{src/entities/RelationAuth.ts → es/entities/RelationAuth.js} +11 -14
  192. package/es/entities/User.d.ts +18 -0
  193. package/{src/entities/User.ts → es/entities/User.js} +23 -29
  194. package/es/entities/UserEntityClaim.d.ts +13 -0
  195. package/es/entities/UserEntityClaim.js +26 -0
  196. package/es/entities/UserEntityGrant.d.ts +9 -0
  197. package/es/entities/UserEntityGrant.js +22 -0
  198. package/es/entities/UserRelation.d.ts +10 -0
  199. package/{src/entities/UserRelation.ts → es/entities/UserRelation.js} +46 -50
  200. package/es/index.d.ts +1 -0
  201. package/es/index.js +1 -0
  202. package/es/store/AsyncRowStore.d.ts +75 -0
  203. package/es/store/AsyncRowStore.js +211 -0
  204. package/es/store/CascadeStore.d.ts +123 -0
  205. package/es/store/CascadeStore.js +1894 -0
  206. package/es/store/IntrinsicCheckers.d.ts +5 -0
  207. package/es/store/IntrinsicCheckers.js +398 -0
  208. package/es/store/IntrinsicLogics.d.ts +9 -0
  209. package/es/store/IntrinsicLogics.js +41 -0
  210. package/es/store/RelationAuth.d.ts +115 -0
  211. package/es/store/RelationAuth.js +1340 -0
  212. package/es/store/SyncRowStore.d.ts +30 -0
  213. package/es/store/SyncRowStore.js +45 -0
  214. package/es/store/TriggerExecutor.d.ts +52 -0
  215. package/es/store/TriggerExecutor.js +650 -0
  216. package/es/store/checker.d.ts +26 -0
  217. package/es/store/checker.js +510 -0
  218. package/es/store/filter.d.ts +133 -0
  219. package/es/store/filter.js +1692 -0
  220. package/es/store/modi.d.ts +13 -0
  221. package/es/store/modi.js +247 -0
  222. package/es/store/projection.d.ts +2 -0
  223. package/es/store/projection.js +12 -0
  224. package/es/store/relation.d.ts +51 -0
  225. package/es/store/relation.js +108 -0
  226. package/es/store/triggers.d.ts +6 -0
  227. package/es/store/triggers.js +403 -0
  228. package/es/timers/oper.d.ts +18 -0
  229. package/es/timers/oper.js +60 -0
  230. package/es/timers/vaccum.d.ts +20 -0
  231. package/es/timers/vaccum.js +106 -0
  232. package/es/types/Action.d.ts +20 -0
  233. package/es/types/Action.js +1 -0
  234. package/es/types/AppLoader.d.ts +17 -0
  235. package/es/types/AppLoader.js +6 -0
  236. package/es/types/Aspect.d.ts +14 -0
  237. package/es/types/Aspect.js +3 -0
  238. package/es/types/Auth.d.ts +59 -0
  239. package/es/types/Auth.js +1 -0
  240. package/es/types/Cluster.d.ts +6 -0
  241. package/es/types/Cluster.js +1 -0
  242. package/es/types/Configuration.d.ts +102 -0
  243. package/es/types/Configuration.js +1 -0
  244. package/es/types/Connector.d.ts +107 -0
  245. package/es/types/Connector.js +1 -0
  246. package/es/types/Context.d.ts +7 -0
  247. package/es/types/Context.js +2 -0
  248. package/es/types/DataType.d.ts +25 -0
  249. package/es/types/DataType.js +3 -0
  250. package/es/types/Demand.d.ts +124 -0
  251. package/es/types/Demand.js +6 -0
  252. package/es/types/Endpoint.d.ts +45 -0
  253. package/es/types/Endpoint.js +3 -0
  254. package/es/types/Entity.d.ts +234 -0
  255. package/es/types/Entity.js +35 -0
  256. package/es/types/EntityDesc.d.ts +57 -0
  257. package/es/types/EntityDesc.js +3 -0
  258. package/es/types/Environment.d.ts +110 -0
  259. package/es/types/Environment.js +1 -0
  260. package/es/types/Exception.d.ts +222 -0
  261. package/es/types/Exception.js +586 -0
  262. package/es/types/Expression.d.ts +177 -0
  263. package/es/types/Expression.js +413 -0
  264. package/es/types/Geo.d.ts +18 -0
  265. package/es/types/Geo.js +1 -0
  266. package/es/types/Locale.d.ts +39 -0
  267. package/es/types/Locale.js +13 -0
  268. package/es/types/Logger.d.ts +6 -0
  269. package/es/types/Logger.js +2 -0
  270. package/es/types/OakPackage.d.ts +29 -0
  271. package/es/types/OakPackage.js +30 -0
  272. package/es/types/Polyfill.d.ts +24 -0
  273. package/es/types/Polyfill.js +1 -0
  274. package/es/types/Port.d.ts +20 -0
  275. package/es/types/Port.js +1 -0
  276. package/es/types/RowStore.d.ts +21 -0
  277. package/es/types/RowStore.js +16 -0
  278. package/es/types/Storage.d.ts +69 -0
  279. package/es/types/Storage.js +12 -0
  280. package/es/types/Style.d.ts +40 -0
  281. package/es/types/Style.js +1 -0
  282. package/es/types/Sync.d.ts +93 -0
  283. package/es/types/Sync.js +8 -0
  284. package/es/types/Timer.d.ts +47 -0
  285. package/es/types/Timer.js +1 -0
  286. package/es/types/Trigger.d.ts +755 -0
  287. package/es/types/Trigger.js +58 -0
  288. package/es/types/Txn.d.ts +2 -0
  289. package/es/types/Txn.js +2 -0
  290. package/es/types/Watcher.d.ts +42 -0
  291. package/es/types/Watcher.js +4 -0
  292. package/es/types/index.d.ts +28 -0
  293. package/es/types/index.js +28 -0
  294. package/es/types/schema/DataTypes.d.ts +34 -0
  295. package/es/types/schema/DataTypes.js +2 -0
  296. package/es/utils/SimpleConnector.d.ts +116 -0
  297. package/es/utils/SimpleConnector.js +554 -0
  298. package/es/utils/assert.d.ts +5 -0
  299. package/es/utils/assert.js +5 -0
  300. package/es/utils/concurrent.d.ts +15 -0
  301. package/es/utils/concurrent.js +58 -0
  302. package/es/utils/date.d.ts +1 -0
  303. package/es/utils/date.js +13 -0
  304. package/es/utils/decimal.d.ts +26 -0
  305. package/es/utils/decimal.js +87 -0
  306. package/es/utils/dependency-analyzer.d.ts +1 -0
  307. package/es/utils/dependency-analyzer.js +277 -0
  308. package/es/utils/domain.d.ts +18 -0
  309. package/es/utils/domain.js +69 -0
  310. package/es/utils/executor.d.ts +5 -0
  311. package/es/utils/executor.js +18 -0
  312. package/es/utils/fetch/index.d.ts +1 -0
  313. package/es/utils/fetch/index.js +3 -0
  314. package/es/utils/fetch/index.mp.d.ts +3 -0
  315. package/es/utils/fetch/index.mp.js +280 -0
  316. package/es/utils/fetch/index.native.d.ts +1 -0
  317. package/es/utils/fetch/index.native.js +3 -0
  318. package/es/utils/fetch/index.web.d.ts +1 -0
  319. package/es/utils/fetch/index.web.js +3 -0
  320. package/es/utils/fetch/shared.d.ts +6 -0
  321. package/es/utils/fetch/shared.js +23 -0
  322. package/es/utils/geo.d.ts +34 -0
  323. package/es/utils/geo.js +138 -0
  324. package/es/utils/glob.d.ts +30 -0
  325. package/es/utils/glob.js +276 -0
  326. package/es/utils/localizedContent.d.ts +11 -0
  327. package/es/utils/localizedContent.js +346 -0
  328. package/es/utils/lodash.d.ts +1 -0
  329. package/es/utils/lodash.js +1 -0
  330. package/es/utils/mask.d.ts +5 -0
  331. package/es/utils/mask.js +28 -0
  332. package/es/utils/module/combine.common.d.ts +15 -0
  333. package/es/utils/module/combine.common.js +23 -0
  334. package/es/utils/module/combine.d.ts +1 -0
  335. package/es/utils/module/combine.dev.d.ts +17 -0
  336. package/es/utils/module/combine.dev.js +51 -0
  337. package/es/utils/module/combine.js +1 -0
  338. package/es/utils/module/combine.prod.d.ts +8 -0
  339. package/es/utils/module/combine.prod.js +4 -0
  340. package/es/utils/module/combine.server.d.ts +17 -0
  341. package/es/utils/module/combine.server.js +51 -0
  342. package/es/utils/money.d.ts +6 -0
  343. package/es/utils/money.js +55 -0
  344. package/es/utils/operationResult.d.ts +2 -0
  345. package/es/utils/operationResult.js +15 -0
  346. package/es/utils/projection.d.ts +5 -0
  347. package/es/utils/projection.js +30 -0
  348. package/es/utils/random/random.d.ts +1 -0
  349. package/es/utils/random/random.js +15 -0
  350. package/es/utils/random/random.mp.d.ts +1 -0
  351. package/es/utils/random/random.mp.js +10 -0
  352. package/es/utils/random/random.native.d.ts +1 -0
  353. package/es/utils/random/random.native.js +9 -0
  354. package/es/utils/random/random.web.d.ts +1 -0
  355. package/es/utils/random/random.web.js +7 -0
  356. package/es/utils/relationPath.d.ts +44 -0
  357. package/es/utils/relationPath.js +266 -0
  358. package/es/utils/row.d.ts +20 -0
  359. package/es/utils/row.js +69 -0
  360. package/es/utils/sseEndpoint.d.ts +41 -0
  361. package/es/utils/sseEndpoint.js +151 -0
  362. package/es/utils/string.d.ts +28 -0
  363. package/es/utils/string.js +60 -0
  364. package/es/utils/toolkit.d.ts +28 -0
  365. package/es/utils/toolkit.js +220 -0
  366. package/es/utils/url/index.d.ts +4 -0
  367. package/es/utils/url/index.js +4 -0
  368. package/es/utils/url/index.mp.d.ts +16 -0
  369. package/es/utils/url/index.mp.js +4 -0
  370. package/es/utils/url/index.native.d.ts +25 -0
  371. package/es/utils/url/index.native.js +5 -0
  372. package/es/utils/url/index.web.d.ts +25 -0
  373. package/es/utils/url/index.web.js +5 -0
  374. package/es/utils/url/lightweight.d.ts +65 -0
  375. package/es/utils/url/lightweight.js +530 -0
  376. package/es/utils/url/urlObject.d.ts +16 -0
  377. package/es/utils/url/urlObject.js +1 -0
  378. package/es/utils/uuid.d.ts +19 -0
  379. package/es/utils/uuid.js +219 -0
  380. package/es/utils/validate/id.d.ts +5 -0
  381. package/es/utils/validate/id.js +28 -0
  382. package/es/utils/validate/index.d.ts +4 -0
  383. package/es/utils/validate/index.js +4 -0
  384. package/es/utils/validate/mobile.d.ts +6 -0
  385. package/es/utils/validate/mobile.js +49 -0
  386. package/es/utils/validate/nationality.d.ts +14 -0
  387. package/es/utils/validate/nationality.data.d.ts +9 -0
  388. package/es/utils/validate/nationality.data.js +257 -0
  389. package/es/utils/validate/nationality.js +64 -0
  390. package/es/utils/validate/passport.d.ts +3 -0
  391. package/es/utils/validate/passport.js +19 -0
  392. package/es/utils/validator.d.ts +32 -0
  393. package/es/utils/validator.js +111 -0
  394. package/es/utils/version.d.ts +14 -0
  395. package/es/utils/version.js +30 -0
  396. package/lib/actions/action.d.ts +1 -1
  397. package/lib/base-app-domain/ActionAuth/Storage.js +5 -5
  398. package/lib/base-app-domain/EntityDict.d.ts +27 -0
  399. package/lib/base-app-domain/I18n/Storage.js +5 -5
  400. package/lib/base-app-domain/LocalizedContent/Schema.d.ts +19 -0
  401. package/lib/base-app-domain/LocalizedContent/Schema.js +4 -0
  402. package/lib/base-app-domain/LocalizedContent/Storage.d.ts +3 -0
  403. package/lib/base-app-domain/LocalizedContent/Storage.js +78 -0
  404. package/lib/base-app-domain/LocalizedContent/Style.d.ts +3 -0
  405. package/lib/base-app-domain/LocalizedContent/Style.js +15 -0
  406. package/lib/base-app-domain/LocalizedContent/_baseSchema.d.ts +58 -0
  407. package/lib/base-app-domain/Log/Style.js +3 -3
  408. package/lib/base-app-domain/Modi/Storage.js +4 -4
  409. package/lib/base-app-domain/Modi/Style.js +5 -5
  410. package/lib/base-app-domain/Oper/Storage.js +5 -5
  411. package/lib/base-app-domain/Oper/Style.js +6 -6
  412. package/lib/base-app-domain/Path/Storage.js +7 -7
  413. package/lib/base-app-domain/Relation/Storage.js +6 -6
  414. package/lib/base-app-domain/RelationAuth/Storage.js +7 -7
  415. package/lib/base-app-domain/Storage.js +26 -24
  416. package/lib/base-app-domain/StyleDict.js +10 -8
  417. package/lib/base-app-domain/User/Style.js +5 -5
  418. package/lib/base-app-domain/UserRelation/Storage.js +8 -8
  419. package/lib/compiler/customChecks/asyncContext.d.ts +123 -0
  420. package/lib/compiler/customChecks/asyncContext.js +849 -0
  421. package/lib/compiler/customChecks/i18n.d.ts +90 -0
  422. package/lib/compiler/customChecks/i18n.js +611 -0
  423. package/lib/compiler/customChecks/ignoreComments.d.ts +15 -0
  424. package/lib/compiler/customChecks/ignoreComments.js +128 -0
  425. package/lib/compiler/customChecks/index.d.ts +3 -0
  426. package/lib/compiler/customChecks/index.js +10 -0
  427. package/lib/compiler/customChecks/jsxChecker.d.ts +22 -0
  428. package/lib/compiler/customChecks/jsxChecker.js +116 -0
  429. package/lib/compiler/customChecks/runner.d.ts +6 -0
  430. package/lib/compiler/customChecks/runner.js +256 -0
  431. package/lib/compiler/customChecks/types.d.ts +131 -0
  432. package/lib/compiler/customChecks/types.js +20 -0
  433. package/lib/compiler/customChecks/utils.d.ts +82 -0
  434. package/lib/compiler/customChecks/utils.js +332 -0
  435. package/lib/compiler/dependencyBuilder.d.ts +19 -0
  436. package/lib/compiler/dependencyBuilder.js +505 -265
  437. package/lib/compiler/entityDescEnum.d.ts +5 -0
  438. package/lib/compiler/entityDescEnum.js +450 -0
  439. package/lib/compiler/entitySource.d.ts +28 -0
  440. package/lib/compiler/entitySource.js +529 -0
  441. package/lib/compiler/env.d.ts +5 -0
  442. package/lib/compiler/env.js +17 -4
  443. package/lib/compiler/localeBuilder.d.ts +15 -3
  444. package/lib/compiler/localeBuilder.js +146 -104
  445. package/lib/compiler/routerBuilder.d.ts +37 -1
  446. package/lib/compiler/routerBuilder.js +689 -104
  447. package/lib/compiler/schemaBuilder.d.ts +97 -0
  448. package/lib/compiler/{schemalBuilder.js → schemaBuilder.js} +1898 -696
  449. package/lib/compiler/tscBuilder.d.ts +38 -63
  450. package/lib/compiler/tscBuilder.js +959 -3070
  451. package/lib/context/BackendRuntimeContext.d.ts +34 -0
  452. package/lib/context/BackendRuntimeContext.js +78 -0
  453. package/lib/context/ContextComposer.d.ts +93 -0
  454. package/lib/context/ContextComposer.js +361 -0
  455. package/lib/context/SerializedData.d.ts +10 -0
  456. package/lib/context/SerializedData.js +2 -0
  457. package/lib/data/i18n.d.ts +1 -1
  458. package/lib/data/i18n.js +1 -44
  459. package/lib/data/i18n.json +86 -0
  460. package/lib/entities/ActionAuth.d.ts +3 -3
  461. package/lib/entities/ActionAuth.js +8 -0
  462. package/lib/entities/I18n.d.ts +2 -2
  463. package/lib/entities/I18n.js +10 -0
  464. package/lib/entities/LocalizedContent.d.ts +22 -0
  465. package/lib/entities/LocalizedContent.js +104 -0
  466. package/lib/entities/Log.d.ts +3 -3
  467. package/lib/entities/Log.js +18 -0
  468. package/lib/entities/Modi.d.ts +2 -2
  469. package/lib/entities/Modi.js +24 -0
  470. package/lib/entities/ModiEntity.d.ts +3 -3
  471. package/lib/entities/ModiEntity.js +8 -0
  472. package/lib/entities/Oper.d.ts +5 -5
  473. package/lib/entities/Oper.js +25 -0
  474. package/lib/entities/OperEntity.d.ts +3 -3
  475. package/lib/entities/OperEntity.js +8 -0
  476. package/lib/entities/Path.d.ts +2 -2
  477. package/lib/entities/Path.js +10 -0
  478. package/lib/entities/Relation.d.ts +2 -2
  479. package/lib/entities/Relation.js +9 -0
  480. package/lib/entities/RelationAuth.d.ts +3 -3
  481. package/lib/entities/RelationAuth.js +8 -0
  482. package/lib/entities/User.d.ts +4 -4
  483. package/lib/entities/User.js +19 -0
  484. package/lib/entities/UserEntityClaim.d.ts +6 -6
  485. package/lib/entities/UserEntityClaim.js +10 -0
  486. package/lib/entities/UserEntityGrant.d.ts +2 -2
  487. package/lib/entities/UserEntityGrant.js +8 -0
  488. package/lib/entities/UserRelation.d.ts +4 -4
  489. package/lib/entities/UserRelation.js +9 -0
  490. package/lib/index.js +0 -1
  491. package/lib/store/AsyncRowStore.d.ts +2 -2
  492. package/lib/store/AsyncRowStore.js +6 -7
  493. package/lib/store/CascadeStore.d.ts +5 -3
  494. package/lib/store/CascadeStore.js +101 -70
  495. package/lib/store/IntrinsicCheckers.d.ts +1 -1
  496. package/lib/store/IntrinsicCheckers.js +14 -15
  497. package/lib/store/IntrinsicLogics.d.ts +1 -1
  498. package/lib/store/RelationAuth.js +42 -43
  499. package/lib/store/SyncRowStore.d.ts +1 -1
  500. package/lib/store/SyncRowStore.js +4 -5
  501. package/lib/store/TriggerExecutor.d.ts +6 -4
  502. package/lib/store/TriggerExecutor.js +47 -31
  503. package/lib/store/checker.d.ts +2 -2
  504. package/lib/store/checker.js +55 -20
  505. package/lib/store/filter.d.ts +3 -3
  506. package/lib/store/filter.js +47 -48
  507. package/lib/store/modi.d.ts +5 -5
  508. package/lib/store/modi.js +5 -6
  509. package/lib/store/projection.d.ts +1 -1
  510. package/lib/store/relation.js +4 -5
  511. package/lib/store/triggers.d.ts +4 -4
  512. package/lib/store/triggers.js +13 -14
  513. package/lib/testException.d.ts +1 -0
  514. package/lib/testException.js +11 -0
  515. package/lib/timers/oper.d.ts +3 -3
  516. package/lib/timers/vaccum.d.ts +3 -3
  517. package/lib/types/Action.d.ts +1 -1
  518. package/lib/types/AppLoader.d.ts +1 -1
  519. package/lib/types/Aspect.d.ts +1 -1
  520. package/lib/types/Auth.d.ts +2 -2
  521. package/lib/types/Configuration.d.ts +7 -6
  522. package/lib/types/Connector.d.ts +47 -1
  523. package/lib/types/DataType.d.ts +2 -2
  524. package/lib/types/Demand.d.ts +40 -6
  525. package/lib/types/Endpoint.d.ts +17 -1
  526. package/lib/types/Entity.d.ts +21 -4
  527. package/lib/types/Entity.js +27 -0
  528. package/lib/types/EntityDesc.d.ts +34 -9
  529. package/lib/types/EntityDesc.js +4 -0
  530. package/lib/types/Environment.d.ts +17 -0
  531. package/lib/types/Exception.d.ts +1 -1
  532. package/lib/types/Exception.js +2 -2
  533. package/lib/types/Expression.d.ts +13 -2
  534. package/lib/types/Expression.js +40 -5
  535. package/lib/types/Locale.d.ts +18 -4
  536. package/lib/types/Locale.js +14 -0
  537. package/lib/types/OakPackage.d.ts +29 -0
  538. package/lib/types/OakPackage.js +36 -0
  539. package/lib/types/Port.d.ts +1 -1
  540. package/lib/types/RowStore.d.ts +9 -7
  541. package/lib/types/Storage.d.ts +11 -3
  542. package/lib/types/Storage.js +13 -0
  543. package/lib/types/Style.d.ts +2 -2
  544. package/lib/types/Sync.d.ts +3 -3
  545. package/lib/types/Timer.d.ts +14 -2
  546. package/lib/types/Trigger.d.ts +2 -7
  547. package/lib/types/Trigger.js +2 -7
  548. package/lib/types/Watcher.d.ts +1 -1
  549. package/lib/types/index.d.ts +1 -0
  550. package/lib/types/index.js +1 -0
  551. package/lib/utils/SimpleConnector.d.ts +31 -5
  552. package/lib/utils/SimpleConnector.js +305 -28
  553. package/lib/utils/concurrent.js +4 -5
  554. package/lib/utils/decimal.d.ts +26 -0
  555. package/lib/utils/decimal.js +112 -0
  556. package/lib/utils/dependency-analyzer.d.ts +1 -0
  557. package/lib/utils/dependency-analyzer.js +281 -0
  558. package/lib/utils/fetch/index.d.ts +1 -0
  559. package/lib/utils/fetch/index.js +6 -0
  560. package/lib/utils/fetch/index.mp.d.ts +3 -0
  561. package/lib/utils/fetch/index.mp.js +285 -0
  562. package/lib/utils/fetch/index.native.d.ts +1 -0
  563. package/lib/utils/fetch/index.native.js +6 -0
  564. package/lib/utils/fetch/index.web.d.ts +1 -0
  565. package/lib/utils/fetch/index.web.js +6 -0
  566. package/lib/utils/fetch/shared.d.ts +6 -0
  567. package/lib/utils/fetch/shared.js +28 -0
  568. package/lib/utils/localizedContent.d.ts +11 -0
  569. package/lib/utils/localizedContent.js +352 -0
  570. package/lib/utils/lodash.d.ts +1 -33
  571. package/lib/utils/lodash.js +1 -72
  572. package/lib/utils/module/combine.common.d.ts +3 -3
  573. package/lib/utils/module/combine.common.js +6 -7
  574. package/lib/utils/module/combine.dev.d.ts +2 -2
  575. package/lib/utils/module/combine.dev.js +19 -19
  576. package/lib/utils/module/combine.prod.d.ts +1 -1
  577. package/lib/utils/module/combine.server.d.ts +2 -2
  578. package/lib/utils/module/combine.server.js +19 -19
  579. package/lib/utils/money.d.ts +2 -2
  580. package/lib/utils/money.js +2 -2
  581. package/lib/utils/operationResult.js +4 -4
  582. package/lib/utils/projection.d.ts +3 -3
  583. package/lib/utils/relationPath.d.ts +1 -1
  584. package/lib/utils/relationPath.js +10 -11
  585. package/lib/utils/row.d.ts +3 -3
  586. package/lib/utils/row.js +4 -5
  587. package/lib/utils/sseEndpoint.d.ts +41 -0
  588. package/lib/utils/sseEndpoint.js +156 -0
  589. package/lib/utils/toolkit.d.ts +28 -0
  590. package/lib/utils/toolkit.js +253 -0
  591. package/lib/utils/url/index.d.ts +1 -3
  592. package/lib/utils/url/index.js +3 -1
  593. package/lib/utils/url/index.mp.d.ts +16 -3
  594. package/lib/utils/url/index.mp.js +6 -4
  595. package/lib/utils/url/index.native.d.ts +13 -1
  596. package/lib/utils/url/index.native.js +5 -1
  597. package/lib/utils/url/index.web.d.ts +13 -1
  598. package/lib/utils/url/index.web.js +5 -1
  599. package/lib/utils/url/lightweight.d.ts +65 -0
  600. package/lib/utils/url/lightweight.js +535 -0
  601. package/lib/utils/url/urlObject.d.ts +16 -0
  602. package/lib/utils/url/urlObject.js +2 -0
  603. package/lib/utils/url/whatwg-url/lib/URL-impl.d.ts +8 -15
  604. package/lib/utils/url/whatwg-url/lib/infra.js +5 -4
  605. package/lib/utils/url/whatwg-url/lib/urlencoded.d.ts +3 -1
  606. package/lib/utils/url/whatwg-url/lib/utils.d.ts +1 -1
  607. package/lib/utils/validate/id.d.ts +5 -0
  608. package/lib/utils/validate/id.js +35 -0
  609. package/lib/utils/validate/index.d.ts +4 -0
  610. package/lib/utils/validate/index.js +7 -0
  611. package/lib/utils/validate/mobile.d.ts +6 -0
  612. package/lib/utils/validate/mobile.js +57 -0
  613. package/lib/utils/validate/nationality.d.ts +14 -0
  614. package/lib/utils/validate/nationality.data.d.ts +9 -0
  615. package/lib/utils/validate/nationality.data.js +260 -0
  616. package/lib/utils/validate/nationality.js +76 -0
  617. package/lib/utils/validate/passport.d.ts +3 -0
  618. package/lib/utils/validate/passport.js +24 -0
  619. package/lib/utils/validator.d.ts +10 -8
  620. package/lib/utils/validator.js +38 -42
  621. package/package.json +30 -11
  622. package/lib/utils/url/whatwg-url/index.d.ts +0 -3
  623. package/lib/utils/url/whatwg-url/index.js +0 -16
  624. package/lib/utils/url/whatwg-url/lib/URL-impl.js +0 -175
  625. package/lib/utils/url/whatwg-url/lib/URL.js +0 -298
  626. package/lib/utils/url/whatwg-url/lib/URLSearchParams-impl.d.ts +0 -19
  627. package/lib/utils/url/whatwg-url/lib/URLSearchParams-impl.js +0 -126
  628. package/lib/utils/url/whatwg-url/lib/URLSearchParams.js +0 -426
  629. package/lib/utils/url/whatwg-url/lib/infra.d.ts +0 -12
  630. package/lib/utils/url/whatwg-url/lib/url-state-machine.d.ts +0 -24
  631. package/lib/utils/url/whatwg-url/lib/url-state-machine.js +0 -1238
  632. package/lib/utils/url/whatwg-url/lib/urlencoded.js +0 -162
  633. package/lib/utils/url/whatwg-url/lib/utils.js +0 -101
  634. package/src/entities/ModiEntity.ts +0 -26
  635. package/src/entities/OperEntity.ts +0 -27
  636. package/src/entities/UserEntityClaim.ts +0 -30
  637. package/src/entities/UserEntityGrant.ts +0 -24
  638. /package/{lib/store/diffSchema.d.ts → es/base-app-domain/ActionAuth/_baseSchema.js} +0 -0
  639. /package/{lib/utils/url/whatwg-url/lib/URL.d.ts → es/base-app-domain/EntityDict.js} +0 -0
  640. /package/{lib/utils/url/whatwg-url/lib/URLSearchParams.d.ts → es/base-app-domain/I18n/_baseSchema.js} +0 -0
  641. /package/lib/{store/diffSchema.js → base-app-domain/LocalizedContent/_baseSchema.js} +0 -0
@@ -0,0 +1,58 @@
1
+ /* ============================================================================
2
+ * 优先级常量定义
3
+ *
4
+ * 触发器按优先级从小到大依次执行,数值越小越先执行。
5
+ * 合理设置优先级可以控制触发器的执行顺序,确保数据处理的正确性。
6
+ * ============================================================================ */
7
+ /**
8
+ * 触发器最小优先级(最先执行)
9
+ * 用于需要最早执行的触发器,如数据预处理
10
+ */
11
+ export const TRIGGER_MIN_PRIORITY = 1;
12
+ /**
13
+ * 触发器默认优先级
14
+ * 未指定优先级时使用此值
15
+ */
16
+ export const TRIGGER_DEFAULT_PRIORITY = 50;
17
+ /**
18
+ * Checker(检查器)的最大优先级
19
+ * Checker 优先级范围是 51-99,在所有普通触发器之后执行
20
+ * 这确保了数据校验在数据处理完成后进行
21
+ */
22
+ export const CHECKER_MAX_PRIORITY = 99;
23
+ /**
24
+ * 不同类型 Checker 的默认优先级映射
25
+ *
26
+ * 执行顺序(从先到后):
27
+ * 1. logicalData (31) - 逻辑数据检查,可修改 data 中的值
28
+ * 2. logical (33) - 纯逻辑检查
29
+ * 3. row (51) - 行级检查,检查数据库中已存在的行
30
+ * 4. relation (56) - 关系检查,检查关联数据
31
+ * 5. data (61) - 数据完整性检查
32
+ *
33
+ * @example
34
+ * // logicalData 类型可以自动填充默认值
35
+ * // logical 类型进行业务逻辑校验
36
+ * // row 类型检查当前行状态是否允许操作
37
+ */
38
+ export const CHECKER_PRIORITY_MAP = {
39
+ logicalData: 31,
40
+ logical: 33,
41
+ row: 51,
42
+ data: 61,
43
+ relation: 56
44
+ };
45
+ ;
46
+ ;
47
+ ;
48
+ ;
49
+ ;
50
+ ;
51
+ ;
52
+ ;
53
+ ;
54
+ ;
55
+ ;
56
+ ;
57
+ ;
58
+ ;
@@ -0,0 +1,2 @@
1
+ export interface Txn {
2
+ }
@@ -0,0 +1,2 @@
1
+ ;
2
+ export {};
@@ -0,0 +1,42 @@
1
+ import { ReadOnlyAction } from "../actions/action";
2
+ import { AsyncContext } from "../store/AsyncRowStore";
3
+ import { EntityDict, OperationResult } from "./Entity";
4
+ import { EntityDict as BaseEntityDict } from "../base-app-domain";
5
+ type ActionData<ED extends EntityDict & BaseEntityDict, T extends keyof ED> = ED[T]['Update']['data'] | ED[T]['Remove']['data'];
6
+ export interface BBWatcher<ED extends EntityDict & BaseEntityDict, T extends keyof ED> {
7
+ type?: 'base';
8
+ name: string;
9
+ entity: T;
10
+ filter: ED[T]['Filter'] | (() => ED[T]['Filter']);
11
+ action: Omit<ED[T]['Action'], 'create' | ReadOnlyAction>;
12
+ actionData: ActionData<ED, T> | (() => Promise<ActionData<ED, T>>);
13
+ singleton?: true;
14
+ lazy?: true;
15
+ exclusive?: true;
16
+ }
17
+ export interface WBWatcher<ED extends EntityDict & BaseEntityDict, T extends keyof ED, Cxt extends AsyncContext<ED>> {
18
+ type?: 'base';
19
+ name: string;
20
+ entity: T;
21
+ filter: ED[T]['Filter'] | (() => Promise<ED[T]['Filter']>);
22
+ projection: ED[T]['Projection'] | (() => Promise<ED[T]['Projection']>);
23
+ fn: (context: Cxt, data: Partial<ED[T]['Schema']>[]) => Promise<OperationResult<ED>>;
24
+ forUpdate?: true;
25
+ singleton?: true;
26
+ lazy?: true;
27
+ exclusive?: true;
28
+ }
29
+ export interface WBFreeWatcher<ED extends EntityDict & BaseEntityDict, T extends keyof ED, Cxt extends AsyncContext<ED>> {
30
+ type: 'free';
31
+ name: string;
32
+ entity: T;
33
+ filter: ED[T]['Filter'] | (() => Promise<ED[T]['Filter']>);
34
+ projection: ED[T]['Projection'] | (() => Promise<ED[T]['Projection']>);
35
+ fn: (builder: () => Promise<Cxt>, data: Partial<ED[T]['Schema']>[]) => Promise<OperationResult<ED>>;
36
+ forUpdate?: true;
37
+ singleton?: true;
38
+ lazy?: true;
39
+ exclusive?: true;
40
+ }
41
+ export type Watcher<ED extends EntityDict & BaseEntityDict, T extends keyof ED, Cxt extends AsyncContext<ED>> = BBWatcher<ED, T> | WBWatcher<ED, T, Cxt> | WBFreeWatcher<ED, T, Cxt>;
42
+ export {};
@@ -0,0 +1,4 @@
1
+ ;
2
+ ;
3
+ ;
4
+ export {};
@@ -0,0 +1,28 @@
1
+ export * from './Action';
2
+ export * from './Aspect';
3
+ export * from './Auth';
4
+ export * from './Context';
5
+ export * from './DataType';
6
+ export * from './Demand';
7
+ export * from './Entity';
8
+ export * from './Expression';
9
+ export * from './Geo';
10
+ export * from './Logger';
11
+ export * from './Polyfill';
12
+ export * from './RowStore';
13
+ export * from './Storage';
14
+ export * from './Trigger';
15
+ export * from './Exception';
16
+ export * from './Watcher';
17
+ export * from './AppLoader';
18
+ export * from './Connector';
19
+ export * from './Timer';
20
+ export * from './Port';
21
+ export * from './Endpoint';
22
+ export * from './Style';
23
+ export * from './EntityDesc';
24
+ export * from './Environment';
25
+ export * from './Locale';
26
+ export * from './Cluster';
27
+ export * from './Sync';
28
+ export * from './OakPackage';
@@ -0,0 +1,28 @@
1
+ export * from './Action';
2
+ export * from './Aspect';
3
+ export * from './Auth';
4
+ export * from './Context';
5
+ export * from './DataType';
6
+ export * from './Demand';
7
+ export * from './Entity';
8
+ export * from './Expression';
9
+ export * from './Geo';
10
+ export * from './Logger';
11
+ export * from './Polyfill';
12
+ export * from './RowStore';
13
+ export * from './Storage';
14
+ export * from './Trigger';
15
+ export * from './Exception';
16
+ export * from './Watcher';
17
+ export * from './AppLoader';
18
+ export * from './Connector';
19
+ export * from './Timer';
20
+ export * from './Port';
21
+ export * from './Endpoint';
22
+ export * from './Style';
23
+ export * from './EntityDesc';
24
+ export * from './Environment';
25
+ export * from './Locale';
26
+ export * from './Cluster';
27
+ export * from './Sync';
28
+ export * from './OakPackage';
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Column types used for @PrimaryGeneratedColumn() decorator.
3
+ */
4
+ export type PrimaryGeneratedColumnType = "int" | "int2" | "int4" | "int8" | "integer" | "tinyint" | "smallint" | "mediumint" | "bigint" | "dec" | "decimal" | "smalldecimal" | "fixed" | "numeric" | "number";
5
+ /**
6
+ * Column types where spatial properties are used.
7
+ */
8
+ export type SpatialColumnType = "geometry" | "geography" | "st_geometry" | "st_point";
9
+ /**
10
+ * Column types where precision and scale properties are used.
11
+ */
12
+ export type WithPrecisionColumnType = "float" | "double" | "dec" | "decimal" | "smalldecimal" | "fixed" | "numeric" | "real" | "double precision" | "number" | "datetime" | "datetime2" | "datetimeoffset" | "time" | "time with time zone" | "time without time zone" | "timestamp" | "timestamp without time zone" | "timestamp with time zone" | "timestamp with local time zone";
13
+ /**
14
+ * Column types where column length is used.
15
+ */
16
+ export type WithLengthColumnType = "character varying" | "varying character" | "char varying" | "nvarchar" | "national varchar" | "character" | "native character" | "varchar" | "char" | "nchar" | "national char" | "varchar2" | "nvarchar2" | "alphanum" | "shorttext" | "raw" | "binary" | "varbinary" | "string";
17
+ export type WithWidthColumnType = "tinyint" | "smallint" | "mediumint" | "int" | "bigint";
18
+ /**
19
+ * All other regular column types.
20
+ */
21
+ export type SimpleColumnType = "simple-array" | "simple-json" | "simple-enum" | "int2" | "integer" | "int4" | "int8" | "int64" | "unsigned big int" | "float" | "float4" | "float8" | "smallmoney" | "money" | "boolean" | "bool" | "tinyblob" | "tinytext" | "mediumblob" | "mediumtext" | "blob" | "text" | "ntext" | "citext" | "hstore" | "longblob" | "longtext" | "alphanum" | "shorttext" | "bytes" | "bytea" | "long" | "raw" | "long raw" | "bfile" | "clob" | "nclob" | "image" | "timetz" | "timestamptz" | "timestamp with local time zone" | "smalldatetime" | "date" | "interval year to month" | "interval day to second" | "interval" | "year" | "seconddate" | "point" | "line" | "lseg" | "box" | "circle" | "path" | "polygon" | "geography" | "geometry" | "linestring" | "multipoint" | "multilinestring" | "multipolygon" | "geometrycollection" | "st_geometry" | "st_point" | "int4range" | "int8range" | "numrange" | "tsrange" | "tstzrange" | "daterange" | "enum" | "set" | "cidr" | "inet" | "macaddr" | "bit" | "bit varying" | "varbit" | "tsvector" | "tsquery" | "uuid" | "xml" | "json" | "jsonb" | "varbinary" | "hierarchyid" | "sql_variant" | "rowid" | "urowid" | "uniqueidentifier" | "rowversion" | "array" | "cube" | "ltree" | "object" | "array" | "function" | "sequence";
22
+ /**
23
+ * Any column type column can be.
24
+ */
25
+ export type DataType = WithPrecisionColumnType | WithLengthColumnType | WithWidthColumnType | SpatialColumnType | SimpleColumnType;
26
+ export interface DataTypeParams {
27
+ length?: number;
28
+ width?: number;
29
+ precision?: number;
30
+ scale?: number;
31
+ signed?: boolean;
32
+ max?: number;
33
+ min?: number;
34
+ }
@@ -0,0 +1,2 @@
1
+ ;
2
+ export {};
@@ -0,0 +1,116 @@
1
+ import type { IncomingHttpHeaders } from "http";
2
+ import { SyncContext } from "../store/SyncRowStore";
3
+ import { Connector, EndpointRequestOptions, EndpointResponse, EndpointStreamResponse, EntityDict, OakException, OpRecord, SSEEndpointClient, SSEEndpointRequestOptions } from "../types";
4
+ import { EntityDict as BaseEntityDict } from "../base-app-domain";
5
+ import { AccessConfiguration } from "../types/Configuration";
6
+ export declare function makeServerUrl(configuration: AccessConfiguration): string;
7
+ export default class SimpleConnector<ED extends EntityDict & BaseEntityDict, FrontCxt extends SyncContext<ED>> implements Connector<ED, FrontCxt> {
8
+ static ASPECT_ROUTER: string;
9
+ static BRIDGE_ROUTER: string;
10
+ static SUBSCRIBE_PATH: string;
11
+ static SOCKET_PATH: string;
12
+ static SOCKET_POINT_ROUTER: string;
13
+ static ENDPOINT_ROUTER: string;
14
+ private serverUrl;
15
+ private serverAspectUrl;
16
+ private serverBridgeUrl;
17
+ private serverSubscribePointUrl;
18
+ private configuration;
19
+ private makeException;
20
+ private timeout;
21
+ private clockDriftDuration;
22
+ private getVersion;
23
+ constructor(configuration: AccessConfiguration, makeException: (exceptionData: any) => OakException<ED>, getVersion?: () => string);
24
+ getCorsHeader(): string[];
25
+ protected makeHeadersAndBody(name: string, data: any, context?: FrontCxt): Promise<{
26
+ headers: {
27
+ 'oak-cxt': string;
28
+ 'oak-aspect': string;
29
+ 'oak-version': string;
30
+ 'oak-platform': string;
31
+ };
32
+ body: FormData;
33
+ } | {
34
+ headers: Record<string, string>;
35
+ body: string;
36
+ }>;
37
+ protected parseAspectResult(response: Response): Promise<{
38
+ result: any;
39
+ opRecords: any;
40
+ message: string | undefined;
41
+ } | {
42
+ result: ReadableStream<Uint8Array<ArrayBuffer>> | null;
43
+ message: string | undefined;
44
+ opRecords?: undefined;
45
+ }>;
46
+ callAspect(name: string, params: any, context?: FrontCxt): Promise<{
47
+ result: any;
48
+ opRecords: any;
49
+ message: string | undefined;
50
+ } | {
51
+ result: ReadableStream<Uint8Array<ArrayBuffer>> | null;
52
+ message: string | undefined;
53
+ opRecords?: undefined;
54
+ }>;
55
+ getRouter(): string;
56
+ getSocketPath(): string;
57
+ getSocketPointRouter(): string;
58
+ getSocketPoint(): Promise<{
59
+ path: any;
60
+ subscribeUrl: any;
61
+ socketUrl: any;
62
+ scope: any;
63
+ }>;
64
+ getEndpointRouter(): string;
65
+ makeEndpointUrl(path: string): string;
66
+ protected makeEndpointHeadersAndBody(options?: EndpointRequestOptions<FrontCxt>, aspectName?: string): Promise<{
67
+ headers: Record<string, string>;
68
+ body?: BodyInit | null;
69
+ }>;
70
+ protected buildEndpointUrl(path: string, options?: EndpointRequestOptions<FrontCxt>): string;
71
+ protected makeSSEEndpointHeadersAndBody(path: string, options?: SSEEndpointRequestOptions<FrontCxt>): Promise<{
72
+ headers: Record<string, string>;
73
+ body?: BodyInit | null;
74
+ }>;
75
+ protected createSSEClient<T>(stream: ReadableStream<Uint8Array>): SSEEndpointClient<T>;
76
+ protected parseEndpointResponse(response: Response): Promise<EndpointResponse<ED> | EndpointStreamResponse>;
77
+ callEndpoint(path: string, options?: EndpointRequestOptions<FrontCxt>): Promise<EndpointResponse<ED>>;
78
+ openEndpointStream(path: string, options?: EndpointRequestOptions<FrontCxt>): Promise<EndpointStreamResponse>;
79
+ callSSEEndpoint<T = any>(path: string, options?: SSEEndpointRequestOptions<FrontCxt>): Promise<SSEEndpointClient<T>>;
80
+ serializeSSEEndpointResult(result: any, headers: IncomingHttpHeaders, body: any, rawMessage?: string): Promise<{
81
+ body: any;
82
+ headers: {
83
+ 'Content-Type': string;
84
+ 'Cache-Control': string;
85
+ Connection: string;
86
+ 'oak-message': string | undefined;
87
+ };
88
+ }>;
89
+ parseRequest(headers: IncomingHttpHeaders, body?: any, files?: any): {
90
+ contextString: string | undefined;
91
+ aspectName: string;
92
+ data: any;
93
+ };
94
+ serializeResult(result: any, opRecords: OpRecord<ED>[], headers: IncomingHttpHeaders, body: any, rawMessage?: string): Promise<{
95
+ body: any;
96
+ headers?: Record<string, any> | undefined;
97
+ }>;
98
+ serializeException(exception: OakException<ED>, headers: IncomingHttpHeaders, body: any): {
99
+ body: {
100
+ exception: string;
101
+ };
102
+ };
103
+ getBridgeRouter(): string;
104
+ /**
105
+ * 通过本地服务器桥接访问外部资源的url
106
+ * @param url
107
+ * @param headers
108
+ */
109
+ makeBridgeUrl(url: string, headers?: Record<string, string>): string;
110
+ parseBridgeRequestQuery(urlParams: string): {
111
+ url: string;
112
+ headers?: Record<string, string> | undefined;
113
+ };
114
+ getFullData(): Promise<{}>;
115
+ private fetchWithTimeout;
116
+ }