@toa.io/core 1.0.0-alpha.31 → 1.0.0-alpha.310

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 (274) hide show
  1. package/package.json +28 -12
  2. package/transpiled/abandon.d.ts +9 -0
  3. package/transpiled/abandon.js +37 -0
  4. package/transpiled/abandon.js.map +1 -0
  5. package/transpiled/assignment.d.ts +6 -0
  6. package/transpiled/assignment.js +25 -0
  7. package/transpiled/assignment.js.map +1 -0
  8. package/transpiled/call.d.ts +10 -0
  9. package/transpiled/call.js +165 -0
  10. package/transpiled/call.js.map +1 -0
  11. package/transpiled/cascade.d.ts +7 -0
  12. package/transpiled/cascade.js +28 -0
  13. package/transpiled/cascade.js.map +1 -0
  14. package/transpiled/component.d.ts +15 -0
  15. package/transpiled/component.js +148 -0
  16. package/transpiled/component.js.map +1 -0
  17. package/transpiled/composition.d.ts +6 -0
  18. package/transpiled/composition.js +20 -0
  19. package/transpiled/composition.js.map +1 -0
  20. package/transpiled/connector.d.ts +71 -0
  21. package/transpiled/connector.js +248 -0
  22. package/transpiled/connector.js.map +1 -0
  23. package/transpiled/context.d.ts +25 -0
  24. package/transpiled/context.js +55 -0
  25. package/transpiled/context.js.map +1 -0
  26. package/transpiled/contract/component.d.ts +24 -0
  27. package/transpiled/contract/component.js +48 -0
  28. package/transpiled/contract/component.js.map +1 -0
  29. package/transpiled/contract/contract.d.ts +10 -0
  30. package/transpiled/contract/contract.js +14 -0
  31. package/transpiled/contract/contract.js.map +1 -0
  32. package/transpiled/contract/index.d.ts +3 -0
  33. package/transpiled/contract/index.js +4 -0
  34. package/transpiled/contract/index.js.map +1 -0
  35. package/transpiled/contract/reply.d.ts +7 -0
  36. package/transpiled/contract/reply.js +48 -0
  37. package/transpiled/contract/reply.js.map +1 -0
  38. package/transpiled/contract/request.d.ts +39 -0
  39. package/transpiled/contract/request.js +115 -0
  40. package/transpiled/contract/request.js.map +1 -0
  41. package/transpiled/contract/schemas.d.ts +4 -0
  42. package/transpiled/contract/schemas.js +36 -0
  43. package/transpiled/contract/schemas.js.map +1 -0
  44. package/transpiled/deliveries.d.ts +22 -0
  45. package/transpiled/deliveries.js +31 -0
  46. package/transpiled/deliveries.js.map +1 -0
  47. package/transpiled/effect.d.ts +7 -0
  48. package/transpiled/effect.js +13 -0
  49. package/transpiled/effect.js.map +1 -0
  50. package/transpiled/emission.d.ts +10 -0
  51. package/transpiled/emission.js +16 -0
  52. package/transpiled/emission.js.map +1 -0
  53. package/transpiled/encoded.d.ts +16 -0
  54. package/transpiled/encoded.js +25 -0
  55. package/transpiled/encoded.js.map +1 -0
  56. package/transpiled/entities/changeset.d.ts +10 -0
  57. package/transpiled/entities/changeset.js +27 -0
  58. package/transpiled/entities/changeset.js.map +1 -0
  59. package/transpiled/entities/entity.d.ts +19 -0
  60. package/transpiled/entities/entity.js +137 -0
  61. package/transpiled/entities/entity.js.map +1 -0
  62. package/transpiled/entities/factory.d.ts +27 -0
  63. package/transpiled/entities/factory.js +38 -0
  64. package/transpiled/entities/factory.js.map +1 -0
  65. package/transpiled/entities/index.d.ts +5 -0
  66. package/transpiled/entities/index.js +6 -0
  67. package/transpiled/entities/index.js.map +1 -0
  68. package/transpiled/entities/newid.d.ts +11 -0
  69. package/transpiled/entities/newid.js +41 -0
  70. package/transpiled/entities/newid.js.map +1 -0
  71. package/transpiled/entities/set.d.ts +10 -0
  72. package/transpiled/entities/set.js +19 -0
  73. package/transpiled/entities/set.js.map +1 -0
  74. package/transpiled/event.d.ts +14 -0
  75. package/transpiled/event.js +53 -0
  76. package/transpiled/event.js.map +1 -0
  77. package/transpiled/exceptions.d.ts +104 -0
  78. package/transpiled/exceptions.js +205 -0
  79. package/transpiled/exceptions.js.map +1 -0
  80. package/transpiled/gate.d.ts +40 -0
  81. package/transpiled/gate.js +84 -0
  82. package/transpiled/gate.js.map +1 -0
  83. package/transpiled/guard.d.ts +7 -0
  84. package/transpiled/guard.js +12 -0
  85. package/transpiled/guard.js.map +1 -0
  86. package/transpiled/halting.d.ts +16 -0
  87. package/transpiled/halting.js +25 -0
  88. package/transpiled/halting.js.map +1 -0
  89. package/transpiled/index.d.ts +41 -0
  90. package/transpiled/index.js +34 -0
  91. package/transpiled/index.js.map +1 -0
  92. package/transpiled/instance.d.ts +10 -0
  93. package/transpiled/instance.js +30 -0
  94. package/transpiled/instance.js.map +1 -0
  95. package/transpiled/locator.d.ts +12 -0
  96. package/transpiled/locator.js +32 -0
  97. package/transpiled/locator.js.map +1 -0
  98. package/transpiled/measurements.d.ts +20 -0
  99. package/transpiled/measurements.js +40 -0
  100. package/transpiled/measurements.js.map +1 -0
  101. package/transpiled/observation.d.ts +7 -0
  102. package/transpiled/observation.js +14 -0
  103. package/transpiled/observation.js.map +1 -0
  104. package/transpiled/operation.d.ts +69 -0
  105. package/transpiled/operation.js +174 -0
  106. package/transpiled/operation.js.map +1 -0
  107. package/transpiled/outbox.d.ts +45 -0
  108. package/transpiled/outbox.js +448 -0
  109. package/transpiled/outbox.js.map +1 -0
  110. package/transpiled/outbox.measurements.d.ts +4 -0
  111. package/transpiled/outbox.measurements.js +38 -0
  112. package/transpiled/outbox.measurements.js.map +1 -0
  113. package/transpiled/query/criteria.d.ts +6 -0
  114. package/transpiled/query/criteria.js +74 -0
  115. package/transpiled/query/criteria.js.map +1 -0
  116. package/transpiled/query/options.d.ts +3 -0
  117. package/transpiled/query/options.js +34 -0
  118. package/transpiled/query/options.js.map +1 -0
  119. package/transpiled/query.d.ts +9 -0
  120. package/transpiled/query.js +57 -0
  121. package/transpiled/query.js.map +1 -0
  122. package/transpiled/receiver.d.ts +20 -0
  123. package/transpiled/receiver.js +113 -0
  124. package/transpiled/receiver.js.map +1 -0
  125. package/transpiled/reflection.d.ts +9 -0
  126. package/transpiled/reflection.js +13 -0
  127. package/transpiled/reflection.js.map +1 -0
  128. package/transpiled/remote.d.ts +10 -0
  129. package/transpiled/remote.js +11 -0
  130. package/transpiled/remote.js.map +1 -0
  131. package/transpiled/safety.d.ts +5 -0
  132. package/transpiled/safety.js +26 -0
  133. package/transpiled/safety.js.map +1 -0
  134. package/transpiled/state.d.ts +36 -0
  135. package/transpiled/state.js +131 -0
  136. package/transpiled/state.js.map +1 -0
  137. package/transpiled/trail.d.ts +78 -0
  138. package/transpiled/trail.js +112 -0
  139. package/transpiled/trail.js.map +1 -0
  140. package/transpiled/transition.d.ts +14 -0
  141. package/transpiled/transition.js +51 -0
  142. package/transpiled/transition.js.map +1 -0
  143. package/transpiled/transmission.d.ts +8 -0
  144. package/transpiled/transmission.js +30 -0
  145. package/transpiled/transmission.js.map +1 -0
  146. package/transpiled/types/atomicity.d.ts +58 -0
  147. package/transpiled/types/atomicity.js +2 -0
  148. package/transpiled/types/atomicity.js.map +1 -0
  149. package/transpiled/types/bindings.d.ts +77 -0
  150. package/transpiled/types/bindings.js +2 -0
  151. package/transpiled/types/bindings.js.map +1 -0
  152. package/transpiled/types/bridges.d.ts +41 -0
  153. package/transpiled/types/bridges.js +2 -0
  154. package/transpiled/types/bridges.js.map +1 -0
  155. package/transpiled/types/extensions.d.ts +116 -0
  156. package/transpiled/types/extensions.js +2 -0
  157. package/transpiled/types/extensions.js.map +1 -0
  158. package/transpiled/types/inbox.d.ts +22 -0
  159. package/transpiled/types/inbox.js +2 -0
  160. package/transpiled/types/inbox.js.map +1 -0
  161. package/transpiled/types/index.d.ts +14 -0
  162. package/transpiled/types/index.js +9 -0
  163. package/transpiled/types/index.js.map +1 -0
  164. package/transpiled/types/message.d.ts +16 -0
  165. package/transpiled/types/message.js +2 -0
  166. package/transpiled/types/message.js.map +1 -0
  167. package/transpiled/types/operations.d.ts +15 -0
  168. package/transpiled/types/operations.js +2 -0
  169. package/transpiled/types/operations.js.map +1 -0
  170. package/transpiled/types/outbox.d.ts +54 -0
  171. package/transpiled/types/outbox.js +2 -0
  172. package/transpiled/types/outbox.js.map +1 -0
  173. package/transpiled/types/receiver.d.ts +9 -0
  174. package/transpiled/types/receiver.js +2 -0
  175. package/transpiled/types/receiver.js.map +1 -0
  176. package/transpiled/types/request.d.ts +119 -0
  177. package/transpiled/types/request.js +2 -0
  178. package/transpiled/types/request.js.map +1 -0
  179. package/transpiled/types/state.d.ts +9 -0
  180. package/transpiled/types/state.js +2 -0
  181. package/transpiled/types/state.js.map +1 -0
  182. package/transpiled/types/storages.d.ts +146 -0
  183. package/transpiled/types/storages.js +2 -0
  184. package/transpiled/types/storages.js.map +1 -0
  185. package/transpiled/unmanaged.d.ts +5 -0
  186. package/transpiled/unmanaged.js +7 -0
  187. package/transpiled/unmanaged.js.map +1 -0
  188. package/src/assignment.js +0 -31
  189. package/src/call.js +0 -42
  190. package/src/cascade.js +0 -35
  191. package/src/component.js +0 -41
  192. package/src/composition.js +0 -25
  193. package/src/connector.js +0 -183
  194. package/src/context.js +0 -55
  195. package/src/contract/conditions.js +0 -21
  196. package/src/contract/index.js +0 -7
  197. package/src/contract/reply.js +0 -25
  198. package/src/contract/request.js +0 -67
  199. package/src/contract/schemas/error.yaml +0 -9
  200. package/src/contract/schemas/index.js +0 -7
  201. package/src/contract/schemas/query.yaml +0 -30
  202. package/src/discovery.js +0 -44
  203. package/src/emission.js +0 -23
  204. package/src/entities/changeset.js +0 -38
  205. package/src/entities/entity.js +0 -74
  206. package/src/entities/factory.js +0 -33
  207. package/src/entities/index.js +0 -5
  208. package/src/entities/set.js +0 -15
  209. package/src/event.js +0 -40
  210. package/src/exceptions.js +0 -100
  211. package/src/exposition.js +0 -27
  212. package/src/index.js +0 -47
  213. package/src/locator.js +0 -54
  214. package/src/observation.js +0 -20
  215. package/src/operation.js +0 -69
  216. package/src/query/criteria.js +0 -41
  217. package/src/query/options.js +0 -40
  218. package/src/query.js +0 -41
  219. package/src/receiver.js +0 -61
  220. package/src/reflection.js +0 -28
  221. package/src/remote.js +0 -17
  222. package/src/state.js +0 -99
  223. package/src/transition.js +0 -67
  224. package/src/transmission.js +0 -33
  225. package/test/call.fixtures.js +0 -27
  226. package/test/call.test.js +0 -46
  227. package/test/component.fixtures.js +0 -21
  228. package/test/component.test.js +0 -40
  229. package/test/connector.fixtures.js +0 -40
  230. package/test/connector.test.js +0 -176
  231. package/test/context.fixtures.js +0 -18
  232. package/test/context.test.js +0 -29
  233. package/test/contract/conditions.test.js +0 -26
  234. package/test/contract/contract.fixtures.js +0 -33
  235. package/test/contract/request.test.js +0 -112
  236. package/test/emission.fixtures.js +0 -17
  237. package/test/emission.test.js +0 -35
  238. package/test/entities/entity.fixtures.js +0 -29
  239. package/test/entities/entity.test.js +0 -65
  240. package/test/entities/factory.fixtures.js +0 -18
  241. package/test/entities/factory.test.js +0 -48
  242. package/test/entities/set.fixtures.js +0 -11
  243. package/test/entities/set.test.js +0 -12
  244. package/test/event.fixtures.js +0 -29
  245. package/test/event.test.js +0 -118
  246. package/test/locator.test.js +0 -113
  247. package/test/query.fixtures.js +0 -100
  248. package/test/query.test.js +0 -86
  249. package/test/receiver.fixtures.js +0 -23
  250. package/test/receiver.test.js +0 -95
  251. package/test/reflection.test.js +0 -30
  252. package/test/state.fixtures.js +0 -47
  253. package/test/state.test.js +0 -46
  254. package/test/transmission.fixtures.js +0 -15
  255. package/test/transmission.test.js +0 -46
  256. package/types/bindings.d.ts +0 -40
  257. package/types/bridges.ts +0 -30
  258. package/types/component.d.ts +0 -9
  259. package/types/connector.d.ts +0 -18
  260. package/types/context.d.ts +0 -21
  261. package/types/entity.d.ts +0 -46
  262. package/types/event.d.ts +0 -11
  263. package/types/exception.d.ts +0 -4
  264. package/types/extensions.d.ts +0 -29
  265. package/types/index.ts +0 -14
  266. package/types/locator.d.ts +0 -13
  267. package/types/message.d.ts +0 -3
  268. package/types/operations.d.ts +0 -2
  269. package/types/query.d.ts +0 -15
  270. package/types/receiver.d.ts +0 -12
  271. package/types/reflection.d.ts +0 -14
  272. package/types/request.d.ts +0 -23
  273. package/types/state.d.ts +0 -35
  274. package/types/storages.d.ts +0 -71
@@ -1,71 +0,0 @@
1
- // noinspection ES6UnusedImports
2
-
3
- import { Locator } from './locator'
4
- import { Connector } from './connector'
5
-
6
- declare namespace toa.core {
7
-
8
- namespace storages {
9
- namespace ast {
10
-
11
- interface Node {
12
- type: 'LOGIC' | 'COMPARISON' | 'SELECTOR' | 'VALUE'
13
- left?: Node
14
- right?: Node
15
- operator?: string
16
- selector?: string
17
- value?: string
18
- }
19
-
20
- }
21
-
22
- interface Record {
23
- id: string
24
- _version: number
25
-
26
- [key: string]: any
27
- }
28
-
29
- interface Query {
30
- id?: string
31
- version?: number
32
- criteria?: ast.Node
33
- options?: Object
34
- }
35
-
36
- interface Migration {
37
- disconnect(): Promise<void>
38
-
39
- database(name: string): Promise<void>
40
-
41
- table(database: string, locator: Locator, schema: Object, reset?: boolean): Promise<string>
42
- }
43
-
44
- interface Factory {
45
- storage(locator: Locator, properties?: object): Storage
46
-
47
- migration?(driver?: string): Migration
48
- }
49
- }
50
-
51
- interface Storage extends Connector {
52
- // object observation
53
- get?(query: storages.Query): Promise<storages.Record | null>
54
-
55
- // objects observation
56
- find?(query: storages.Query): Promise<storages.Record[]>
57
-
58
- // commit
59
- store?(record: storages.Record): Promise<boolean>
60
-
61
- // assignment
62
- upsert?(query: storages.Query, changeset: Object, insert: storages.Record): Promise<storages.Record>
63
- }
64
-
65
- }
66
-
67
- export type Storage = toa.core.Storage
68
- export type Record = toa.core.storages.Record
69
- export type Factory = toa.core.storages.Factory
70
- export type Query = toa.core.storages.Query
71
- export type Migration = toa.core.storages.Migration