@proposit/shared 0.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 (311) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +32 -0
  3. package/dist/api-client/argument/batch.d.ts +661 -0
  4. package/dist/api-client/argument/batch.d.ts.map +1 -0
  5. package/dist/api-client/argument/batch.js +14 -0
  6. package/dist/api-client/argument/batch.js.map +1 -0
  7. package/dist/api-client/argument/claims.d.ts +175 -0
  8. package/dist/api-client/argument/claims.d.ts.map +1 -0
  9. package/dist/api-client/argument/claims.js +20 -0
  10. package/dist/api-client/argument/claims.js.map +1 -0
  11. package/dist/api-client/argument/index.d.ts +1344 -0
  12. package/dist/api-client/argument/index.d.ts.map +1 -0
  13. package/dist/api-client/argument/index.js +62 -0
  14. package/dist/api-client/argument/index.js.map +1 -0
  15. package/dist/api-client/argument/logic/index.d.ts +861 -0
  16. package/dist/api-client/argument/logic/index.d.ts.map +1 -0
  17. package/dist/api-client/argument/logic/index.js +73 -0
  18. package/dist/api-client/argument/logic/index.js.map +1 -0
  19. package/dist/api-client/argument/logic/repair.d.ts +182 -0
  20. package/dist/api-client/argument/logic/repair.d.ts.map +1 -0
  21. package/dist/api-client/argument/logic/repair.js +9 -0
  22. package/dist/api-client/argument/logic/repair.js.map +1 -0
  23. package/dist/api-client/argument/reactions.d.ts +38 -0
  24. package/dist/api-client/argument/reactions.d.ts.map +1 -0
  25. package/dist/api-client/argument/reactions.js +9 -0
  26. package/dist/api-client/argument/reactions.js.map +1 -0
  27. package/dist/api-client/argument/reviews.d.ts +183 -0
  28. package/dist/api-client/argument/reviews.d.ts.map +1 -0
  29. package/dist/api-client/argument/reviews.js +21 -0
  30. package/dist/api-client/argument/reviews.js.map +1 -0
  31. package/dist/api-client/search.d.ts +64 -0
  32. package/dist/api-client/search.d.ts.map +1 -0
  33. package/dist/api-client/search.js +19 -0
  34. package/dist/api-client/search.js.map +1 -0
  35. package/dist/api-client/user/claims.d.ts +128 -0
  36. package/dist/api-client/user/claims.d.ts.map +1 -0
  37. package/dist/api-client/user/claims.js +10 -0
  38. package/dist/api-client/user/claims.js.map +1 -0
  39. package/dist/api-client/user/sources.d.ts +41 -0
  40. package/dist/api-client/user/sources.d.ts.map +1 -0
  41. package/dist/api-client/user/sources.js +7 -0
  42. package/dist/api-client/user/sources.js.map +1 -0
  43. package/dist/checksum.d.ts +2 -0
  44. package/dist/checksum.d.ts.map +1 -0
  45. package/dist/checksum.js +32 -0
  46. package/dist/checksum.js.map +1 -0
  47. package/dist/consts/argument.d.ts +9 -0
  48. package/dist/consts/argument.d.ts.map +1 -0
  49. package/dist/consts/argument.js +17 -0
  50. package/dist/consts/argument.js.map +1 -0
  51. package/dist/consts/identity.d.ts +3 -0
  52. package/dist/consts/identity.d.ts.map +1 -0
  53. package/dist/consts/identity.js +6 -0
  54. package/dist/consts/identity.js.map +1 -0
  55. package/dist/consts/index.d.ts +6 -0
  56. package/dist/consts/index.d.ts.map +1 -0
  57. package/dist/consts/index.js +6 -0
  58. package/dist/consts/index.js.map +1 -0
  59. package/dist/consts/roles.d.ts +27 -0
  60. package/dist/consts/roles.d.ts.map +1 -0
  61. package/dist/consts/roles.js +52 -0
  62. package/dist/consts/roles.js.map +1 -0
  63. package/dist/consts/task-status.d.ts +8 -0
  64. package/dist/consts/task-status.d.ts.map +1 -0
  65. package/dist/consts/task-status.js +14 -0
  66. package/dist/consts/task-status.js.map +1 -0
  67. package/dist/consts/user-tiers.d.ts +7 -0
  68. package/dist/consts/user-tiers.d.ts.map +1 -0
  69. package/dist/consts/user-tiers.js +60 -0
  70. package/dist/consts/user-tiers.js.map +1 -0
  71. package/dist/engine/engine.d.ts +94 -0
  72. package/dist/engine/engine.d.ts.map +1 -0
  73. package/dist/engine/engine.js +313 -0
  74. package/dist/engine/engine.js.map +1 -0
  75. package/dist/engine/library-adapters.d.ts +12 -0
  76. package/dist/engine/library-adapters.d.ts.map +1 -0
  77. package/dist/engine/library-adapters.js +11 -0
  78. package/dist/engine/library-adapters.js.map +1 -0
  79. package/dist/engine/mutations/claims.d.ts +10 -0
  80. package/dist/engine/mutations/claims.d.ts.map +1 -0
  81. package/dist/engine/mutations/claims.js +22 -0
  82. package/dist/engine/mutations/claims.js.map +1 -0
  83. package/dist/engine/mutations/expressions.d.ts +109 -0
  84. package/dist/engine/mutations/expressions.d.ts.map +1 -0
  85. package/dist/engine/mutations/expressions.js +277 -0
  86. package/dist/engine/mutations/expressions.js.map +1 -0
  87. package/dist/engine/mutations/index.d.ts +7 -0
  88. package/dist/engine/mutations/index.d.ts.map +1 -0
  89. package/dist/engine/mutations/index.js +6 -0
  90. package/dist/engine/mutations/index.js.map +1 -0
  91. package/dist/engine/mutations/premises.d.ts +25 -0
  92. package/dist/engine/mutations/premises.d.ts.map +1 -0
  93. package/dist/engine/mutations/premises.js +51 -0
  94. package/dist/engine/mutations/premises.js.map +1 -0
  95. package/dist/engine/mutations/types.d.ts +11 -0
  96. package/dist/engine/mutations/types.d.ts.map +1 -0
  97. package/dist/engine/mutations/types.js +2 -0
  98. package/dist/engine/mutations/types.js.map +1 -0
  99. package/dist/engine/mutations/variables.d.ts +27 -0
  100. package/dist/engine/mutations/variables.d.ts.map +1 -0
  101. package/dist/engine/mutations/variables.js +16 -0
  102. package/dist/engine/mutations/variables.js.map +1 -0
  103. package/dist/engine/optimistic/index.d.ts +4 -0
  104. package/dist/engine/optimistic/index.d.ts.map +1 -0
  105. package/dist/engine/optimistic/index.js +3 -0
  106. package/dist/engine/optimistic/index.js.map +1 -0
  107. package/dist/engine/optimistic/reconciliation.d.ts +32 -0
  108. package/dist/engine/optimistic/reconciliation.d.ts.map +1 -0
  109. package/dist/engine/optimistic/reconciliation.js +140 -0
  110. package/dist/engine/optimistic/reconciliation.js.map +1 -0
  111. package/dist/engine/optimistic/types.d.ts +25 -0
  112. package/dist/engine/optimistic/types.d.ts.map +1 -0
  113. package/dist/engine/optimistic/types.js +12 -0
  114. package/dist/engine/optimistic/types.js.map +1 -0
  115. package/dist/engine/optimistic/verification.d.ts +13 -0
  116. package/dist/engine/optimistic/verification.d.ts.map +1 -0
  117. package/dist/engine/optimistic/verification.js +71 -0
  118. package/dist/engine/optimistic/verification.js.map +1 -0
  119. package/dist/engine/review/evaluation.d.ts +27 -0
  120. package/dist/engine/review/evaluation.d.ts.map +1 -0
  121. package/dist/engine/review/evaluation.js +122 -0
  122. package/dist/engine/review/evaluation.js.map +1 -0
  123. package/dist/engine/review/fingerprint.d.ts +9 -0
  124. package/dist/engine/review/fingerprint.d.ts.map +1 -0
  125. package/dist/engine/review/fingerprint.js +27 -0
  126. package/dist/engine/review/fingerprint.js.map +1 -0
  127. package/dist/engine/review/overlay.d.ts +19 -0
  128. package/dist/engine/review/overlay.d.ts.map +1 -0
  129. package/dist/engine/review/overlay.js +81 -0
  130. package/dist/engine/review/overlay.js.map +1 -0
  131. package/dist/engine/review/reasons.d.ts +15 -0
  132. package/dist/engine/review/reasons.d.ts.map +1 -0
  133. package/dist/engine/review/reasons.js +211 -0
  134. package/dist/engine/review/reasons.js.map +1 -0
  135. package/dist/engine/review/review-engine.d.ts +134 -0
  136. package/dist/engine/review/review-engine.d.ts.map +1 -0
  137. package/dist/engine/review/review-engine.js +590 -0
  138. package/dist/engine/review/review-engine.js.map +1 -0
  139. package/dist/engine/review/review-store.d.ts +63 -0
  140. package/dist/engine/review/review-store.d.ts.map +1 -0
  141. package/dist/engine/review/review-store.js +174 -0
  142. package/dist/engine/review/review-store.js.map +1 -0
  143. package/dist/engine/review/step-queue.d.ts +27 -0
  144. package/dist/engine/review/step-queue.d.ts.map +1 -0
  145. package/dist/engine/review/step-queue.js +34 -0
  146. package/dist/engine/review/step-queue.js.map +1 -0
  147. package/dist/engine/review/types.d.ts +16 -0
  148. package/dist/engine/review/types.d.ts.map +1 -0
  149. package/dist/engine/review/types.js +2 -0
  150. package/dist/engine/review/types.js.map +1 -0
  151. package/dist/engine/review/wire.d.ts +8 -0
  152. package/dist/engine/review/wire.d.ts.map +1 -0
  153. package/dist/engine/review/wire.js +97 -0
  154. package/dist/engine/review/wire.js.map +1 -0
  155. package/dist/engine/text-tree.d.ts +35 -0
  156. package/dist/engine/text-tree.d.ts.map +1 -0
  157. package/dist/engine/text-tree.js +137 -0
  158. package/dist/engine/text-tree.js.map +1 -0
  159. package/dist/engine/types.d.ts +42 -0
  160. package/dist/engine/types.d.ts.map +1 -0
  161. package/dist/engine/types.js +2 -0
  162. package/dist/engine/types.js.map +1 -0
  163. package/dist/errors.d.ts +27 -0
  164. package/dist/errors.d.ts.map +1 -0
  165. package/dist/errors.js +61 -0
  166. package/dist/errors.js.map +1 -0
  167. package/dist/schemas/api/argument/batch/change-edge-operator.d.ts +281 -0
  168. package/dist/schemas/api/argument/batch/change-edge-operator.d.ts.map +1 -0
  169. package/dist/schemas/api/argument/batch/change-edge-operator.js +19 -0
  170. package/dist/schemas/api/argument/batch/change-edge-operator.js.map +1 -0
  171. package/dist/schemas/api/argument/batch/create-expression-with-operator.d.ts +280 -0
  172. package/dist/schemas/api/argument/batch/create-expression-with-operator.d.ts.map +1 -0
  173. package/dist/schemas/api/argument/batch/create-expression-with-operator.js +22 -0
  174. package/dist/schemas/api/argument/batch/create-expression-with-operator.js.map +1 -0
  175. package/dist/schemas/api/argument/batch/provision.d.ts +112 -0
  176. package/dist/schemas/api/argument/batch/provision.d.ts.map +1 -0
  177. package/dist/schemas/api/argument/batch/provision.js +10 -0
  178. package/dist/schemas/api/argument/batch/provision.js.map +1 -0
  179. package/dist/schemas/api/argument/build.d.ts +50 -0
  180. package/dist/schemas/api/argument/build.d.ts.map +1 -0
  181. package/dist/schemas/api/argument/build.js +41 -0
  182. package/dist/schemas/api/argument/build.js.map +1 -0
  183. package/dist/schemas/api/argument/claims.d.ts +151 -0
  184. package/dist/schemas/api/argument/claims.d.ts.map +1 -0
  185. package/dist/schemas/api/argument/claims.js +24 -0
  186. package/dist/schemas/api/argument/claims.js.map +1 -0
  187. package/dist/schemas/api/argument/index.d.ts +682 -0
  188. package/dist/schemas/api/argument/index.d.ts.map +1 -0
  189. package/dist/schemas/api/argument/index.js +51 -0
  190. package/dist/schemas/api/argument/index.js.map +1 -0
  191. package/dist/schemas/api/argument/logic.d.ts +205 -0
  192. package/dist/schemas/api/argument/logic.d.ts.map +1 -0
  193. package/dist/schemas/api/argument/logic.js +77 -0
  194. package/dist/schemas/api/argument/logic.js.map +1 -0
  195. package/dist/schemas/api/argument/repair.d.ts +195 -0
  196. package/dist/schemas/api/argument/repair.d.ts.map +1 -0
  197. package/dist/schemas/api/argument/repair.js +35 -0
  198. package/dist/schemas/api/argument/repair.js.map +1 -0
  199. package/dist/schemas/api/claims.d.ts +250 -0
  200. package/dist/schemas/api/claims.d.ts.map +1 -0
  201. package/dist/schemas/api/claims.js +20 -0
  202. package/dist/schemas/api/claims.js.map +1 -0
  203. package/dist/schemas/api/reaction/index.d.ts +46 -0
  204. package/dist/schemas/api/reaction/index.d.ts.map +1 -0
  205. package/dist/schemas/api/reaction/index.js +15 -0
  206. package/dist/schemas/api/reaction/index.js.map +1 -0
  207. package/dist/schemas/api/review/index.d.ts +164 -0
  208. package/dist/schemas/api/review/index.d.ts.map +1 -0
  209. package/dist/schemas/api/review/index.js +29 -0
  210. package/dist/schemas/api/review/index.js.map +1 -0
  211. package/dist/schemas/api/search.d.ts +109 -0
  212. package/dist/schemas/api/search.d.ts.map +1 -0
  213. package/dist/schemas/api/search.js +60 -0
  214. package/dist/schemas/api/search.js.map +1 -0
  215. package/dist/schemas/api/sources.d.ts +108 -0
  216. package/dist/schemas/api/sources.d.ts.map +1 -0
  217. package/dist/schemas/api/sources.js +28 -0
  218. package/dist/schemas/api/sources.js.map +1 -0
  219. package/dist/schemas/api/user/index.d.ts +16 -0
  220. package/dist/schemas/api/user/index.d.ts.map +1 -0
  221. package/dist/schemas/api/user/index.js +15 -0
  222. package/dist/schemas/api/user/index.js.map +1 -0
  223. package/dist/schemas/common.d.ts +50 -0
  224. package/dist/schemas/common.d.ts.map +1 -0
  225. package/dist/schemas/common.js +77 -0
  226. package/dist/schemas/common.js.map +1 -0
  227. package/dist/schemas/gpt.d.ts +10 -0
  228. package/dist/schemas/gpt.d.ts.map +1 -0
  229. package/dist/schemas/gpt.js +27 -0
  230. package/dist/schemas/gpt.js.map +1 -0
  231. package/dist/schemas/index.d.ts +8 -0
  232. package/dist/schemas/index.d.ts.map +1 -0
  233. package/dist/schemas/index.js +8 -0
  234. package/dist/schemas/index.js.map +1 -0
  235. package/dist/schemas/integrations/index.d.ts +159 -0
  236. package/dist/schemas/integrations/index.d.ts.map +1 -0
  237. package/dist/schemas/integrations/index.js +72 -0
  238. package/dist/schemas/integrations/index.js.map +1 -0
  239. package/dist/schemas/logic.d.ts +195 -0
  240. package/dist/schemas/logic.d.ts.map +1 -0
  241. package/dist/schemas/logic.js +77 -0
  242. package/dist/schemas/logic.js.map +1 -0
  243. package/dist/schemas/model/arguments.d.ts +457 -0
  244. package/dist/schemas/model/arguments.d.ts.map +1 -0
  245. package/dist/schemas/model/arguments.js +100 -0
  246. package/dist/schemas/model/arguments.js.map +1 -0
  247. package/dist/schemas/model/claims.d.ts +53 -0
  248. package/dist/schemas/model/claims.d.ts.map +1 -0
  249. package/dist/schemas/model/claims.js +40 -0
  250. package/dist/schemas/model/claims.js.map +1 -0
  251. package/dist/schemas/model/forks.d.ts +63 -0
  252. package/dist/schemas/model/forks.d.ts.map +1 -0
  253. package/dist/schemas/model/forks.js +63 -0
  254. package/dist/schemas/model/forks.js.map +1 -0
  255. package/dist/schemas/model/index.d.ts +6 -0
  256. package/dist/schemas/model/index.d.ts.map +1 -0
  257. package/dist/schemas/model/index.js +6 -0
  258. package/dist/schemas/model/index.js.map +1 -0
  259. package/dist/schemas/model/references.d.ts +49 -0
  260. package/dist/schemas/model/references.d.ts.map +1 -0
  261. package/dist/schemas/model/references.js +46 -0
  262. package/dist/schemas/model/references.js.map +1 -0
  263. package/dist/schemas/model/review.d.ts +56 -0
  264. package/dist/schemas/model/review.d.ts.map +1 -0
  265. package/dist/schemas/model/review.js +50 -0
  266. package/dist/schemas/model/review.js.map +1 -0
  267. package/dist/schemas/model/sources.d.ts +456 -0
  268. package/dist/schemas/model/sources.d.ts.map +1 -0
  269. package/dist/schemas/model/sources.js +27 -0
  270. package/dist/schemas/model/sources.js.map +1 -0
  271. package/dist/schemas/model/users.d.ts +150 -0
  272. package/dist/schemas/model/users.d.ts.map +1 -0
  273. package/dist/schemas/model/users.js +136 -0
  274. package/dist/schemas/model/users.js.map +1 -0
  275. package/dist/schemas/model.d.ts +2 -0
  276. package/dist/schemas/model.d.ts.map +1 -0
  277. package/dist/schemas/model.js +2 -0
  278. package/dist/schemas/model.js.map +1 -0
  279. package/dist/schemas/review.d.ts +1403 -0
  280. package/dist/schemas/review.d.ts.map +1 -0
  281. package/dist/schemas/review.js +232 -0
  282. package/dist/schemas/review.js.map +1 -0
  283. package/dist/schemas/snapshot.d.ts +165 -0
  284. package/dist/schemas/snapshot.d.ts.map +1 -0
  285. package/dist/schemas/snapshot.js +80 -0
  286. package/dist/schemas/snapshot.js.map +1 -0
  287. package/dist/schemas/tasks.d.ts +551 -0
  288. package/dist/schemas/tasks.d.ts.map +1 -0
  289. package/dist/schemas/tasks.js +113 -0
  290. package/dist/schemas/tasks.js.map +1 -0
  291. package/dist/utils/embedding-text.d.ts +15 -0
  292. package/dist/utils/embedding-text.d.ts.map +1 -0
  293. package/dist/utils/embedding-text.js +86 -0
  294. package/dist/utils/embedding-text.js.map +1 -0
  295. package/dist/utils/format-review-share.d.ts +7 -0
  296. package/dist/utils/format-review-share.d.ts.map +1 -0
  297. package/dist/utils/format-review-share.js +16 -0
  298. package/dist/utils/format-review-share.js.map +1 -0
  299. package/dist/utils/index.d.ts +4 -0
  300. package/dist/utils/index.d.ts.map +1 -0
  301. package/dist/utils/index.js +4 -0
  302. package/dist/utils/index.js.map +1 -0
  303. package/dist/utils/tasks/utils.d.ts +4 -0
  304. package/dist/utils/tasks/utils.d.ts.map +1 -0
  305. package/dist/utils/tasks/utils.js +12 -0
  306. package/dist/utils/tasks/utils.js.map +1 -0
  307. package/dist/utils/utils.d.ts +25 -0
  308. package/dist/utils/utils.d.ts.map +1 -0
  309. package/dist/utils/utils.js +115 -0
  310. package/dist/utils/utils.js.map +1 -0
  311. package/package.json +128 -0
@@ -0,0 +1,250 @@
1
+ import Type, { type Static } from "typebox";
2
+ export declare const ClaimWithContextSchema: Type.TObject<{
3
+ claim: Type.TObject<{
4
+ title: Type.TString;
5
+ body: Type.TString;
6
+ digest: Type.TString;
7
+ id: Type.TString;
8
+ argumentId: Type.TString;
9
+ version: Type.TNumber;
10
+ claimForkId: Type.TUnion<[Type.TString, Type.TNull]>;
11
+ creatorId: Type.TString;
12
+ createdOn: import("../common.js").TDateType;
13
+ type: Type.TUnion<[Type.TUnion<[Type.TLiteral<"definition">, Type.TLiteral<"criterion">]>, Type.TUnion<[Type.TLiteral<"conclusion">, Type.TLiteral<"claim">]>]>;
14
+ parentId: Type.TUnion<[Type.TString, Type.TNull]>;
15
+ titleContentHash: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
16
+ }>;
17
+ argument: Type.TObject<{
18
+ id: Type.TString;
19
+ title: Type.TString;
20
+ published: Type.TBoolean;
21
+ }>;
22
+ version: Type.TNumber;
23
+ variable: Type.TOptional<Type.TUnion<[Type.TIntersect<[Type.TObject<{
24
+ claimId: Type.TString;
25
+ claimVersion: Type.TNumber;
26
+ id: Type.TString;
27
+ argumentId: Type.TString;
28
+ argumentVersion: Type.TNumber;
29
+ symbol: Type.TString;
30
+ checksum: Type.TString;
31
+ }>, Type.TObject<{
32
+ createdOn: import("../common.js").TDateType;
33
+ creatorId: Type.TString;
34
+ descendantChecksum: Type.TUnion<[Type.TString, Type.TNull]>;
35
+ combinedChecksum: Type.TString;
36
+ }>]>, Type.TIntersect<[Type.TObject<{
37
+ boundPremiseId: Type.TString;
38
+ boundArgumentId: Type.TString;
39
+ boundArgumentVersion: Type.TNumber;
40
+ id: Type.TString;
41
+ argumentId: Type.TString;
42
+ argumentVersion: Type.TNumber;
43
+ symbol: Type.TString;
44
+ checksum: Type.TString;
45
+ }>, Type.TObject<{
46
+ createdOn: import("../common.js").TDateType;
47
+ creatorId: Type.TString;
48
+ descendantChecksum: Type.TUnion<[Type.TString, Type.TNull]>;
49
+ combinedChecksum: Type.TString;
50
+ }>]>]>>;
51
+ sources: Type.TOptional<Type.TArray<Type.TObject<{
52
+ id: Type.TString;
53
+ url: Type.TUnion<[Type.TString, Type.TNull]>;
54
+ citation: Type.TRecord<"^.*$", Type.TAny>;
55
+ createdOn: import("../common.js").TDateType;
56
+ creatorId: Type.TString;
57
+ citationContentHash: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
58
+ }>>>;
59
+ expressions: Type.TOptional<Type.TArray<Type.TUnion<[Type.TIntersect<[Type.TObject<{
60
+ id: Type.TString;
61
+ argumentId: Type.TString;
62
+ argumentVersion: Type.TNumber;
63
+ premiseId: Type.TString;
64
+ parentId: Type.TUnion<[Type.TString, Type.TNull]>;
65
+ position: Type.TNumber;
66
+ checksum: Type.TString;
67
+ descendantChecksum: Type.TUnion<[Type.TString, Type.TNull]>;
68
+ combinedChecksum: Type.TString;
69
+ type: Type.TLiteral<"variable">;
70
+ variableId: Type.TString;
71
+ }>, Type.TObject<{
72
+ createdOn: import("../common.js").TDateType;
73
+ creatorId: Type.TString;
74
+ }>, Type.TObject<{
75
+ operator: Type.TNull;
76
+ }>]>, Type.TIntersect<[Type.TObject<{
77
+ id: Type.TString;
78
+ argumentId: Type.TString;
79
+ argumentVersion: Type.TNumber;
80
+ premiseId: Type.TString;
81
+ parentId: Type.TUnion<[Type.TString, Type.TNull]>;
82
+ position: Type.TNumber;
83
+ checksum: Type.TString;
84
+ descendantChecksum: Type.TUnion<[Type.TString, Type.TNull]>;
85
+ combinedChecksum: Type.TString;
86
+ type: Type.TLiteral<"operator">;
87
+ operator: Type.TUnion<[Type.TLiteral<"not">, Type.TLiteral<"and">, Type.TLiteral<"or">, Type.TLiteral<"implies">, Type.TLiteral<"iff">]>;
88
+ }>, Type.TObject<{
89
+ createdOn: import("../common.js").TDateType;
90
+ creatorId: Type.TString;
91
+ }>, Type.TObject<{
92
+ variableId: Type.TNull;
93
+ }>]>, Type.TIntersect<[Type.TObject<{
94
+ id: Type.TString;
95
+ argumentId: Type.TString;
96
+ argumentVersion: Type.TNumber;
97
+ premiseId: Type.TString;
98
+ parentId: Type.TUnion<[Type.TString, Type.TNull]>;
99
+ position: Type.TNumber;
100
+ checksum: Type.TString;
101
+ descendantChecksum: Type.TUnion<[Type.TString, Type.TNull]>;
102
+ combinedChecksum: Type.TString;
103
+ type: Type.TLiteral<"formula">;
104
+ }>, Type.TObject<{
105
+ createdOn: import("../common.js").TDateType;
106
+ creatorId: Type.TString;
107
+ }>, Type.TObject<{
108
+ variableId: Type.TNull;
109
+ operator: Type.TNull;
110
+ }>]>]>>>;
111
+ premises: Type.TOptional<Type.TArray<Type.TIntersect<[Type.TObject<{
112
+ id: Type.TString;
113
+ argumentId: Type.TString;
114
+ argumentVersion: Type.TNumber;
115
+ checksum: Type.TString;
116
+ descendantChecksum: Type.TUnion<[Type.TString, Type.TNull]>;
117
+ combinedChecksum: Type.TString;
118
+ }>, Type.TObject<{
119
+ title: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
120
+ role: Type.TUnion<[Type.TLiteral<"conclusion">, Type.TLiteral<"supporting">]>;
121
+ createdOn: Type.TOptional<import("../common.js").TDateType>;
122
+ creatorId: Type.TOptional<Type.TString>;
123
+ }>]>>>;
124
+ }>;
125
+ export type TClaimWithContext = Static<typeof ClaimWithContextSchema>;
126
+ export declare const UserClaimsResponseSchema: Type.TArray<Type.TObject<{
127
+ claim: Type.TObject<{
128
+ title: Type.TString;
129
+ body: Type.TString;
130
+ digest: Type.TString;
131
+ id: Type.TString;
132
+ argumentId: Type.TString;
133
+ version: Type.TNumber;
134
+ claimForkId: Type.TUnion<[Type.TString, Type.TNull]>;
135
+ creatorId: Type.TString;
136
+ createdOn: import("../common.js").TDateType;
137
+ type: Type.TUnion<[Type.TUnion<[Type.TLiteral<"definition">, Type.TLiteral<"criterion">]>, Type.TUnion<[Type.TLiteral<"conclusion">, Type.TLiteral<"claim">]>]>;
138
+ parentId: Type.TUnion<[Type.TString, Type.TNull]>;
139
+ titleContentHash: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
140
+ }>;
141
+ argument: Type.TObject<{
142
+ id: Type.TString;
143
+ title: Type.TString;
144
+ published: Type.TBoolean;
145
+ }>;
146
+ version: Type.TNumber;
147
+ variable: Type.TOptional<Type.TUnion<[Type.TIntersect<[Type.TObject<{
148
+ claimId: Type.TString;
149
+ claimVersion: Type.TNumber;
150
+ id: Type.TString;
151
+ argumentId: Type.TString;
152
+ argumentVersion: Type.TNumber;
153
+ symbol: Type.TString;
154
+ checksum: Type.TString;
155
+ }>, Type.TObject<{
156
+ createdOn: import("../common.js").TDateType;
157
+ creatorId: Type.TString;
158
+ descendantChecksum: Type.TUnion<[Type.TString, Type.TNull]>;
159
+ combinedChecksum: Type.TString;
160
+ }>]>, Type.TIntersect<[Type.TObject<{
161
+ boundPremiseId: Type.TString;
162
+ boundArgumentId: Type.TString;
163
+ boundArgumentVersion: Type.TNumber;
164
+ id: Type.TString;
165
+ argumentId: Type.TString;
166
+ argumentVersion: Type.TNumber;
167
+ symbol: Type.TString;
168
+ checksum: Type.TString;
169
+ }>, Type.TObject<{
170
+ createdOn: import("../common.js").TDateType;
171
+ creatorId: Type.TString;
172
+ descendantChecksum: Type.TUnion<[Type.TString, Type.TNull]>;
173
+ combinedChecksum: Type.TString;
174
+ }>]>]>>;
175
+ sources: Type.TOptional<Type.TArray<Type.TObject<{
176
+ id: Type.TString;
177
+ url: Type.TUnion<[Type.TString, Type.TNull]>;
178
+ citation: Type.TRecord<"^.*$", Type.TAny>;
179
+ createdOn: import("../common.js").TDateType;
180
+ creatorId: Type.TString;
181
+ citationContentHash: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
182
+ }>>>;
183
+ expressions: Type.TOptional<Type.TArray<Type.TUnion<[Type.TIntersect<[Type.TObject<{
184
+ id: Type.TString;
185
+ argumentId: Type.TString;
186
+ argumentVersion: Type.TNumber;
187
+ premiseId: Type.TString;
188
+ parentId: Type.TUnion<[Type.TString, Type.TNull]>;
189
+ position: Type.TNumber;
190
+ checksum: Type.TString;
191
+ descendantChecksum: Type.TUnion<[Type.TString, Type.TNull]>;
192
+ combinedChecksum: Type.TString;
193
+ type: Type.TLiteral<"variable">;
194
+ variableId: Type.TString;
195
+ }>, Type.TObject<{
196
+ createdOn: import("../common.js").TDateType;
197
+ creatorId: Type.TString;
198
+ }>, Type.TObject<{
199
+ operator: Type.TNull;
200
+ }>]>, Type.TIntersect<[Type.TObject<{
201
+ id: Type.TString;
202
+ argumentId: Type.TString;
203
+ argumentVersion: Type.TNumber;
204
+ premiseId: Type.TString;
205
+ parentId: Type.TUnion<[Type.TString, Type.TNull]>;
206
+ position: Type.TNumber;
207
+ checksum: Type.TString;
208
+ descendantChecksum: Type.TUnion<[Type.TString, Type.TNull]>;
209
+ combinedChecksum: Type.TString;
210
+ type: Type.TLiteral<"operator">;
211
+ operator: Type.TUnion<[Type.TLiteral<"not">, Type.TLiteral<"and">, Type.TLiteral<"or">, Type.TLiteral<"implies">, Type.TLiteral<"iff">]>;
212
+ }>, Type.TObject<{
213
+ createdOn: import("../common.js").TDateType;
214
+ creatorId: Type.TString;
215
+ }>, Type.TObject<{
216
+ variableId: Type.TNull;
217
+ }>]>, Type.TIntersect<[Type.TObject<{
218
+ id: Type.TString;
219
+ argumentId: Type.TString;
220
+ argumentVersion: Type.TNumber;
221
+ premiseId: Type.TString;
222
+ parentId: Type.TUnion<[Type.TString, Type.TNull]>;
223
+ position: Type.TNumber;
224
+ checksum: Type.TString;
225
+ descendantChecksum: Type.TUnion<[Type.TString, Type.TNull]>;
226
+ combinedChecksum: Type.TString;
227
+ type: Type.TLiteral<"formula">;
228
+ }>, Type.TObject<{
229
+ createdOn: import("../common.js").TDateType;
230
+ creatorId: Type.TString;
231
+ }>, Type.TObject<{
232
+ variableId: Type.TNull;
233
+ operator: Type.TNull;
234
+ }>]>]>>>;
235
+ premises: Type.TOptional<Type.TArray<Type.TIntersect<[Type.TObject<{
236
+ id: Type.TString;
237
+ argumentId: Type.TString;
238
+ argumentVersion: Type.TNumber;
239
+ checksum: Type.TString;
240
+ descendantChecksum: Type.TUnion<[Type.TString, Type.TNull]>;
241
+ combinedChecksum: Type.TString;
242
+ }>, Type.TObject<{
243
+ title: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
244
+ role: Type.TUnion<[Type.TLiteral<"conclusion">, Type.TLiteral<"supporting">]>;
245
+ createdOn: Type.TOptional<import("../common.js").TDateType>;
246
+ creatorId: Type.TOptional<Type.TString>;
247
+ }>]>>>;
248
+ }>>;
249
+ export type TUserClaimsResponse = Static<typeof UserClaimsResponseSchema>;
250
+ //# sourceMappingURL=claims.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claims.d.ts","sourceRoot":"","sources":["../../../src/schemas/api/claims.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,KAAK,MAAM,EAAE,MAAM,SAAS,CAAA;AAU3C,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYjC,CAAA;AACF,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAErE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAqC,CAAA;AAC1E,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAA"}
@@ -0,0 +1,20 @@
1
+ import Type, {} from "typebox";
2
+ import { ClaimSchema } from "../model/claims.js";
3
+ import { PropositionalVariableSchema, PropositionalExpressionSchema, PropositionalPremiseSchema, } from "../logic.js";
4
+ import { SourceSchemaNotStrict } from "../model/sources.js";
5
+ import { UUID } from "../common.js";
6
+ export const ClaimWithContextSchema = Type.Object({
7
+ claim: ClaimSchema,
8
+ argument: Type.Object({
9
+ id: UUID,
10
+ title: Type.String(),
11
+ published: Type.Boolean(),
12
+ }),
13
+ version: Type.Number(),
14
+ variable: Type.Optional(PropositionalVariableSchema),
15
+ sources: Type.Optional(Type.Array(SourceSchemaNotStrict)),
16
+ expressions: Type.Optional(Type.Array(PropositionalExpressionSchema)),
17
+ premises: Type.Optional(Type.Array(PropositionalPremiseSchema)),
18
+ });
19
+ export const UserClaimsResponseSchema = Type.Array(ClaimWithContextSchema);
20
+ //# sourceMappingURL=claims.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claims.js","sourceRoot":"","sources":["../../../src/schemas/api/claims.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAe,MAAM,SAAS,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EACH,2BAA2B,EAC3B,6BAA6B,EAC7B,0BAA0B,GAC7B,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAEnC,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,MAAM,CAAC;IAC9C,KAAK,EAAE,WAAW;IAClB,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC;QAClB,EAAE,EAAE,IAAI;QACR,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE;QACpB,SAAS,EAAE,IAAI,CAAC,OAAO,EAAE;KAC5B,CAAC;IACF,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE;IACtB,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,2BAA2B,CAAC;IACpD,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACzD,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACrE,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;CAClE,CAAC,CAAA;AAGF,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAA"}
@@ -0,0 +1,46 @@
1
+ import { Type, type Static } from "typebox";
2
+ export declare const ReactionGetResponse: Type.TArray<Type.TObject<{
3
+ id: Type.TString;
4
+ argumentId: Type.TString;
5
+ version: Type.TNumber;
6
+ reaction: Type.TUnion<[Type.TLiteral<"upvote">, Type.TLiteral<"downvote">]>;
7
+ userId: Type.TString;
8
+ createdOn: import("../../common.js").TDateType;
9
+ }>>;
10
+ export declare const ReactionCreateRequest: Type.TObject<{
11
+ reaction: Type.TUnion<[Type.TLiteral<"upvote">, Type.TLiteral<"downvote">]>;
12
+ reactionsToRemove: Type.TOptional<Type.TArray<Type.TUnion<[Type.TLiteral<"upvote">, Type.TLiteral<"downvote">]>>>;
13
+ }>;
14
+ export declare const ReactionCreateResponse: Type.TObject<{
15
+ addedReaction: Type.TObject<{
16
+ id: Type.TString;
17
+ argumentId: Type.TString;
18
+ version: Type.TNumber;
19
+ reaction: Type.TUnion<[Type.TLiteral<"upvote">, Type.TLiteral<"downvote">]>;
20
+ userId: Type.TString;
21
+ createdOn: import("../../common.js").TDateType;
22
+ }>;
23
+ removedReactions: Type.TArray<Type.TObject<{
24
+ id: Type.TString;
25
+ argumentId: Type.TString;
26
+ version: Type.TNumber;
27
+ reaction: Type.TUnion<[Type.TLiteral<"upvote">, Type.TLiteral<"downvote">]>;
28
+ userId: Type.TString;
29
+ createdOn: import("../../common.js").TDateType;
30
+ }>>;
31
+ }>;
32
+ export declare const ReactionDeleteResponse: Type.TObject<{
33
+ removedReactions: Type.TArray<Type.TObject<{
34
+ id: Type.TString;
35
+ argumentId: Type.TString;
36
+ version: Type.TNumber;
37
+ reaction: Type.TUnion<[Type.TLiteral<"upvote">, Type.TLiteral<"downvote">]>;
38
+ userId: Type.TString;
39
+ createdOn: import("../../common.js").TDateType;
40
+ }>>;
41
+ }>;
42
+ export type TReactionsGetResponse = Static<typeof ReactionGetResponse>;
43
+ export type TReactionCreateRequest = Static<typeof ReactionCreateRequest>;
44
+ export type TReactionCreateResponse = Static<typeof ReactionCreateResponse>;
45
+ export type TReactionDeleteResponse = Static<typeof ReactionDeleteResponse>;
46
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schemas/api/reaction/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,KAAK,MAAM,EAAE,MAAM,SAAS,CAAA;AAE3C,eAAO,MAAM,mBAAmB;;;;;;;GAA6B,CAAA;AAE7D,eAAO,MAAM,qBAAqB;;;EAGhC,CAAA;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;EAGjC,CAAA;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;EAEjC,CAAA;AAEF,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAA;AACtE,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAA;AACzE,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAC3E,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAA"}
@@ -0,0 +1,15 @@
1
+ import { Reaction, ReactionSchema } from "../../model.js";
2
+ import { Type } from "typebox";
3
+ export const ReactionGetResponse = Type.Array(ReactionSchema);
4
+ export const ReactionCreateRequest = Type.Object({
5
+ reaction: Reaction,
6
+ reactionsToRemove: Type.Optional(Type.Array(Reaction)),
7
+ });
8
+ export const ReactionCreateResponse = Type.Object({
9
+ addedReaction: ReactionSchema,
10
+ removedReactions: Type.Array(ReactionSchema),
11
+ });
12
+ export const ReactionDeleteResponse = Type.Object({
13
+ removedReactions: Type.Array(ReactionSchema),
14
+ });
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schemas/api/reaction/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,EAAE,IAAI,EAAe,MAAM,SAAS,CAAA;AAE3C,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAA;AAE7D,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC,MAAM,CAAC;IAC7C,QAAQ,EAAE,QAAQ;IAClB,iBAAiB,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;CACzD,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,MAAM,CAAC;IAC9C,aAAa,EAAE,cAAc;IAC7B,gBAAgB,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC;CAC/C,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,MAAM,CAAC;IAC9C,gBAAgB,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC;CAC/C,CAAC,CAAA"}
@@ -0,0 +1,164 @@
1
+ import { Type, type Static } from "typebox";
2
+ export declare const ReviewGetResponse: Type.TObject<{
3
+ review: Type.TObject<{
4
+ id: Type.TString;
5
+ argumentId: Type.TString;
6
+ argumentVersion: Type.TInteger;
7
+ userId: Type.TString;
8
+ phase: Type.TUnion<[Type.TLiteral<"claims">, Type.TLiteral<"operators">, Type.TLiteral<"done">]>;
9
+ currentStepIndex: Type.TInteger;
10
+ public: Type.TBoolean;
11
+ createdOn: import("../../common.js").TDateType;
12
+ updatedOn: import("../../common.js").TDateType;
13
+ claimAssignments: Type.TArray<Type.TObject<{
14
+ claimId: Type.TString;
15
+ value: Type.TUnion<[Type.TLiteral<"true">, Type.TLiteral<"false">, Type.TLiteral<"unknown">, Type.TNull]>;
16
+ skipped: Type.TBoolean;
17
+ reasonCode: Type.TUnion<[Type.TString, Type.TNull]>;
18
+ decidedAt: Type.TUnion<[import("../../common.js").TDateType, Type.TNull]>;
19
+ }>>;
20
+ operatorAssignments: Type.TArray<Type.TObject<{
21
+ premiseId: Type.TString;
22
+ expressionId: Type.TUnion<[Type.TString, Type.TNull]>;
23
+ scope: Type.TUnion<[Type.TLiteral<"premise">, Type.TLiteral<"expression">]>;
24
+ decision: Type.TUnion<[Type.TLiteral<"accepted">, Type.TLiteral<"rejected">, Type.TNull]>;
25
+ reasonCode: Type.TUnion<[Type.TString, Type.TNull]>;
26
+ decidedAt: Type.TUnion<[import("../../common.js").TDateType, Type.TNull]>;
27
+ }>>;
28
+ }>;
29
+ reviewer: Type.TOptional<Type.TIntersect<[Type.TObject<{
30
+ id: Type.TString;
31
+ }>, Type.TObject<{
32
+ name: Type.TUnion<[Type.TString, Type.TNull]>;
33
+ username: Type.TUnion<[Type.TString, Type.TNull]>;
34
+ image: Type.TUnion<[Type.TString, Type.TNull]>;
35
+ }>]>>;
36
+ }>;
37
+ export type TReviewGetResponse = Static<typeof ReviewGetResponse>;
38
+ export declare const ReviewGetNotFoundResponse: Type.TObject<{
39
+ error: Type.TLiteral<"not_found">;
40
+ }>;
41
+ export type TReviewGetNotFoundResponse = Static<typeof ReviewGetNotFoundResponse>;
42
+ export declare const ReviewCreateRequest: Type.TObject<{}>;
43
+ export type TReviewCreateRequest = Static<typeof ReviewCreateRequest>;
44
+ export declare const ReviewCreateResponse: Type.TObject<{
45
+ review: Type.TObject<{
46
+ id: Type.TString;
47
+ argumentId: Type.TString;
48
+ argumentVersion: Type.TInteger;
49
+ userId: Type.TString;
50
+ phase: Type.TUnion<[Type.TLiteral<"claims">, Type.TLiteral<"operators">, Type.TLiteral<"done">]>;
51
+ currentStepIndex: Type.TInteger;
52
+ public: Type.TBoolean;
53
+ createdOn: import("../../common.js").TDateType;
54
+ updatedOn: import("../../common.js").TDateType;
55
+ claimAssignments: Type.TArray<Type.TObject<{
56
+ claimId: Type.TString;
57
+ value: Type.TUnion<[Type.TLiteral<"true">, Type.TLiteral<"false">, Type.TLiteral<"unknown">, Type.TNull]>;
58
+ skipped: Type.TBoolean;
59
+ reasonCode: Type.TUnion<[Type.TString, Type.TNull]>;
60
+ decidedAt: Type.TUnion<[import("../../common.js").TDateType, Type.TNull]>;
61
+ }>>;
62
+ operatorAssignments: Type.TArray<Type.TObject<{
63
+ premiseId: Type.TString;
64
+ expressionId: Type.TUnion<[Type.TString, Type.TNull]>;
65
+ scope: Type.TUnion<[Type.TLiteral<"premise">, Type.TLiteral<"expression">]>;
66
+ decision: Type.TUnion<[Type.TLiteral<"accepted">, Type.TLiteral<"rejected">, Type.TNull]>;
67
+ reasonCode: Type.TUnion<[Type.TString, Type.TNull]>;
68
+ decidedAt: Type.TUnion<[import("../../common.js").TDateType, Type.TNull]>;
69
+ }>>;
70
+ }>;
71
+ }>;
72
+ export type TReviewCreateResponse = Static<typeof ReviewCreateResponse>;
73
+ export declare const ReviewCreateConflictResponse: Type.TObject<{
74
+ error: Type.TLiteral<"already_exists">;
75
+ reviewId: Type.TString;
76
+ }>;
77
+ export type TReviewCreateConflictResponse = Static<typeof ReviewCreateConflictResponse>;
78
+ export declare const ReviewUpdateRequest: Type.TObject<{
79
+ phase: Type.TUnion<[Type.TLiteral<"claims">, Type.TLiteral<"operators">, Type.TLiteral<"done">]>;
80
+ currentStepIndex: Type.TInteger;
81
+ claimAssignments: Type.TArray<Type.TObject<{
82
+ claimId: Type.TString;
83
+ value: Type.TUnion<[Type.TLiteral<"true">, Type.TLiteral<"false">, Type.TLiteral<"unknown">, Type.TNull]>;
84
+ skipped: Type.TBoolean;
85
+ reasonCode: Type.TUnion<[Type.TString, Type.TNull]>;
86
+ decidedAt: Type.TUnion<[import("../../common.js").TDateType, Type.TNull]>;
87
+ }>>;
88
+ operatorAssignments: Type.TArray<Type.TObject<{
89
+ premiseId: Type.TString;
90
+ expressionId: Type.TUnion<[Type.TString, Type.TNull]>;
91
+ scope: Type.TUnion<[Type.TLiteral<"premise">, Type.TLiteral<"expression">]>;
92
+ decision: Type.TUnion<[Type.TLiteral<"accepted">, Type.TLiteral<"rejected">, Type.TNull]>;
93
+ reasonCode: Type.TUnion<[Type.TString, Type.TNull]>;
94
+ decidedAt: Type.TUnion<[import("../../common.js").TDateType, Type.TNull]>;
95
+ }>>;
96
+ }>;
97
+ export type TReviewUpdateRequest = Static<typeof ReviewUpdateRequest>;
98
+ export declare const ReviewUpdateResponse: Type.TObject<{
99
+ review: Type.TObject<{
100
+ id: Type.TString;
101
+ argumentId: Type.TString;
102
+ argumentVersion: Type.TInteger;
103
+ userId: Type.TString;
104
+ phase: Type.TUnion<[Type.TLiteral<"claims">, Type.TLiteral<"operators">, Type.TLiteral<"done">]>;
105
+ currentStepIndex: Type.TInteger;
106
+ public: Type.TBoolean;
107
+ createdOn: import("../../common.js").TDateType;
108
+ updatedOn: import("../../common.js").TDateType;
109
+ claimAssignments: Type.TArray<Type.TObject<{
110
+ claimId: Type.TString;
111
+ value: Type.TUnion<[Type.TLiteral<"true">, Type.TLiteral<"false">, Type.TLiteral<"unknown">, Type.TNull]>;
112
+ skipped: Type.TBoolean;
113
+ reasonCode: Type.TUnion<[Type.TString, Type.TNull]>;
114
+ decidedAt: Type.TUnion<[import("../../common.js").TDateType, Type.TNull]>;
115
+ }>>;
116
+ operatorAssignments: Type.TArray<Type.TObject<{
117
+ premiseId: Type.TString;
118
+ expressionId: Type.TUnion<[Type.TString, Type.TNull]>;
119
+ scope: Type.TUnion<[Type.TLiteral<"premise">, Type.TLiteral<"expression">]>;
120
+ decision: Type.TUnion<[Type.TLiteral<"accepted">, Type.TLiteral<"rejected">, Type.TNull]>;
121
+ reasonCode: Type.TUnion<[Type.TString, Type.TNull]>;
122
+ decidedAt: Type.TUnion<[import("../../common.js").TDateType, Type.TNull]>;
123
+ }>>;
124
+ }>;
125
+ }>;
126
+ export type TReviewUpdateResponse = Static<typeof ReviewUpdateResponse>;
127
+ export declare const ReviewDeleteResponse: Type.TObject<{
128
+ success: Type.TLiteral<true>;
129
+ }>;
130
+ export type TReviewDeleteResponse = Static<typeof ReviewDeleteResponse>;
131
+ export declare const ReviewVisibilityRequest: Type.TObject<{
132
+ public: Type.TBoolean;
133
+ }>;
134
+ export type TReviewVisibilityRequest = Static<typeof ReviewVisibilityRequest>;
135
+ export declare const ReviewVisibilityResponse: Type.TObject<{
136
+ review: Type.TObject<{
137
+ id: Type.TString;
138
+ argumentId: Type.TString;
139
+ argumentVersion: Type.TInteger;
140
+ userId: Type.TString;
141
+ phase: Type.TUnion<[Type.TLiteral<"claims">, Type.TLiteral<"operators">, Type.TLiteral<"done">]>;
142
+ currentStepIndex: Type.TInteger;
143
+ public: Type.TBoolean;
144
+ createdOn: import("../../common.js").TDateType;
145
+ updatedOn: import("../../common.js").TDateType;
146
+ claimAssignments: Type.TArray<Type.TObject<{
147
+ claimId: Type.TString;
148
+ value: Type.TUnion<[Type.TLiteral<"true">, Type.TLiteral<"false">, Type.TLiteral<"unknown">, Type.TNull]>;
149
+ skipped: Type.TBoolean;
150
+ reasonCode: Type.TUnion<[Type.TString, Type.TNull]>;
151
+ decidedAt: Type.TUnion<[import("../../common.js").TDateType, Type.TNull]>;
152
+ }>>;
153
+ operatorAssignments: Type.TArray<Type.TObject<{
154
+ premiseId: Type.TString;
155
+ expressionId: Type.TUnion<[Type.TString, Type.TNull]>;
156
+ scope: Type.TUnion<[Type.TLiteral<"premise">, Type.TLiteral<"expression">]>;
157
+ decision: Type.TUnion<[Type.TLiteral<"accepted">, Type.TLiteral<"rejected">, Type.TNull]>;
158
+ reasonCode: Type.TUnion<[Type.TString, Type.TNull]>;
159
+ decidedAt: Type.TUnion<[import("../../common.js").TDateType, Type.TNull]>;
160
+ }>>;
161
+ }>;
162
+ }>;
163
+ export type TReviewVisibilityResponse = Static<typeof ReviewVisibilityResponse>;
164
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schemas/api/review/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,MAAM,EAAE,MAAM,SAAS,CAAA;AAU3C,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG5B,CAAA;AACF,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAEjE,eAAO,MAAM,yBAAyB;;EAEpC,CAAA;AACF,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAC3C,OAAO,yBAAyB,CACnC,CAAA;AAED,eAAO,MAAM,mBAAmB,kBAAkB,CAAA;AAClD,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAErE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAwC,CAAA;AACzE,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE,eAAO,MAAM,4BAA4B;;;EAGvC,CAAA;AACF,MAAM,MAAM,6BAA6B,GAAG,MAAM,CAC9C,OAAO,4BAA4B,CACtC,CAAA;AAED,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;EAK9B,CAAA;AACF,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAErE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAwC,CAAA;AACzE,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE,eAAO,MAAM,oBAAoB;;EAA+C,CAAA;AAChF,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE,eAAO,MAAM,uBAAuB;;EAElC,CAAA;AACF,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAE7E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAwC,CAAA;AAC7E,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAA"}
@@ -0,0 +1,29 @@
1
+ import { Type } from "typebox";
2
+ import { UUID } from "../../common.js";
3
+ import { ReviewerInfo, ServerReview, ServerClaimAssignment, ServerOperatorAssignment, ServerReviewPhase, } from "../../model/review.js";
4
+ export const ReviewGetResponse = Type.Object({
5
+ review: ServerReview,
6
+ reviewer: Type.Optional(ReviewerInfo),
7
+ });
8
+ export const ReviewGetNotFoundResponse = Type.Object({
9
+ error: Type.Literal("not_found"),
10
+ });
11
+ export const ReviewCreateRequest = Type.Object({});
12
+ export const ReviewCreateResponse = Type.Object({ review: ServerReview });
13
+ export const ReviewCreateConflictResponse = Type.Object({
14
+ error: Type.Literal("already_exists"),
15
+ reviewId: UUID,
16
+ });
17
+ export const ReviewUpdateRequest = Type.Object({
18
+ phase: ServerReviewPhase,
19
+ currentStepIndex: Type.Integer(),
20
+ claimAssignments: Type.Array(ServerClaimAssignment),
21
+ operatorAssignments: Type.Array(ServerOperatorAssignment),
22
+ });
23
+ export const ReviewUpdateResponse = Type.Object({ review: ServerReview });
24
+ export const ReviewDeleteResponse = Type.Object({ success: Type.Literal(true) });
25
+ export const ReviewVisibilityRequest = Type.Object({
26
+ public: Type.Boolean(),
27
+ });
28
+ export const ReviewVisibilityResponse = Type.Object({ review: ServerReview });
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schemas/api/review/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAe,MAAM,SAAS,CAAA;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EACH,YAAY,EACZ,YAAY,EACZ,qBAAqB,EACrB,wBAAwB,EACxB,iBAAiB,GACpB,MAAM,uBAAuB,CAAA;AAE9B,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,MAAM,CAAC;IACzC,MAAM,EAAE,YAAY;IACpB,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC;CACxC,CAAC,CAAA;AAGF,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC,MAAM,CAAC;IACjD,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC;CACnC,CAAC,CAAA;AAKF,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;AAGlD,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAA;AAGzE,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,CAAC,MAAM,CAAC;IACpD,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC;IACrC,QAAQ,EAAE,IAAI;CACjB,CAAC,CAAA;AAKF,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC,MAAM,CAAC;IAC3C,KAAK,EAAE,iBAAiB;IACxB,gBAAgB,EAAE,IAAI,CAAC,OAAO,EAAE;IAChC,gBAAgB,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC;IACnD,mBAAmB,EAAE,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC;CAC5D,CAAC,CAAA;AAGF,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAA;AAGzE,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAGhF,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC,MAAM,CAAC;IAC/C,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE;CACzB,CAAC,CAAA;AAGF,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAA"}
@@ -0,0 +1,109 @@
1
+ import Type, { type Static } from "typebox";
2
+ export declare const ClaimSearchRequestSchema: Type.TObject<{
3
+ q: Type.TString;
4
+ limit: Type.TOptional<Type.TNumber>;
5
+ argumentId: Type.TOptional<Type.TString>;
6
+ }>;
7
+ export type TClaimSearchRequest = Static<typeof ClaimSearchRequestSchema>;
8
+ export declare const ClaimSearchResultSchema: Type.TObject<{
9
+ id: Type.TString;
10
+ argumentId: Type.TString;
11
+ version: Type.TNumber;
12
+ title: Type.TString;
13
+ type: Type.TString;
14
+ argumentTitle: Type.TString;
15
+ distance: Type.TNumber;
16
+ }>;
17
+ export type TClaimSearchResult = Static<typeof ClaimSearchResultSchema>;
18
+ export declare const ClaimSearchResponseSchema: Type.TArray<Type.TObject<{
19
+ id: Type.TString;
20
+ argumentId: Type.TString;
21
+ version: Type.TNumber;
22
+ title: Type.TString;
23
+ type: Type.TString;
24
+ argumentTitle: Type.TString;
25
+ distance: Type.TNumber;
26
+ }>>;
27
+ export type TClaimSearchResponse = Static<typeof ClaimSearchResponseSchema>;
28
+ export declare const SourceSearchRequestSchema: Type.TObject<{
29
+ q: Type.TString;
30
+ limit: Type.TOptional<Type.TNumber>;
31
+ }>;
32
+ export type TSourceSearchRequest = Static<typeof SourceSearchRequestSchema>;
33
+ export declare const SourceSearchResultSchema: Type.TObject<{
34
+ id: Type.TString;
35
+ citation: Type.TAny;
36
+ argumentTitle: Type.TString;
37
+ argumentId: Type.TString;
38
+ argumentVersion: Type.TNumber;
39
+ distance: Type.TNumber;
40
+ }>;
41
+ export type TSourceSearchResult = Static<typeof SourceSearchResultSchema>;
42
+ export declare const SourceSearchResponseSchema: Type.TArray<Type.TObject<{
43
+ id: Type.TString;
44
+ citation: Type.TAny;
45
+ argumentTitle: Type.TString;
46
+ argumentId: Type.TString;
47
+ argumentVersion: Type.TNumber;
48
+ distance: Type.TNumber;
49
+ }>>;
50
+ export type TSourceSearchResponse = Static<typeof SourceSearchResponseSchema>;
51
+ export declare const EntitySearchRequestSchema: Type.TObject<{
52
+ q: Type.TString;
53
+ types: Type.TOptional<Type.TString>;
54
+ limit: Type.TOptional<Type.TNumber>;
55
+ }>;
56
+ export type TEntitySearchRequest = Static<typeof EntitySearchRequestSchema>;
57
+ export declare const PremiseSearchResultSchema: Type.TObject<{
58
+ id: Type.TString;
59
+ argumentId: Type.TString;
60
+ argumentVersion: Type.TNumber;
61
+ title: Type.TString;
62
+ role: Type.TString;
63
+ argumentTitle: Type.TString;
64
+ distance: Type.TNumber;
65
+ }>;
66
+ export type TPremiseSearchResult = Static<typeof PremiseSearchResultSchema>;
67
+ export declare const ArgumentSearchResultSchema: Type.TObject<{
68
+ id: Type.TString;
69
+ version: Type.TNumber;
70
+ title: Type.TString;
71
+ distance: Type.TNumber;
72
+ }>;
73
+ export type TArgumentSearchResult = Static<typeof ArgumentSearchResultSchema>;
74
+ export declare const EntitySearchResponseSchema: Type.TObject<{
75
+ arguments: Type.TArray<Type.TObject<{
76
+ id: Type.TString;
77
+ version: Type.TNumber;
78
+ title: Type.TString;
79
+ distance: Type.TNumber;
80
+ }>>;
81
+ claims: Type.TArray<Type.TObject<{
82
+ id: Type.TString;
83
+ argumentId: Type.TString;
84
+ version: Type.TNumber;
85
+ title: Type.TString;
86
+ type: Type.TString;
87
+ argumentTitle: Type.TString;
88
+ distance: Type.TNumber;
89
+ }>>;
90
+ premises: Type.TArray<Type.TObject<{
91
+ id: Type.TString;
92
+ argumentId: Type.TString;
93
+ argumentVersion: Type.TNumber;
94
+ title: Type.TString;
95
+ role: Type.TString;
96
+ argumentTitle: Type.TString;
97
+ distance: Type.TNumber;
98
+ }>>;
99
+ sources: Type.TArray<Type.TObject<{
100
+ id: Type.TString;
101
+ citation: Type.TAny;
102
+ argumentTitle: Type.TString;
103
+ argumentId: Type.TString;
104
+ argumentVersion: Type.TNumber;
105
+ distance: Type.TNumber;
106
+ }>>;
107
+ }>;
108
+ export type TEntitySearchResponse = Static<typeof EntitySearchResponseSchema>;
109
+ //# sourceMappingURL=search.d.ts.map