@parmana/shared 0.0.0-stage → 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 (417) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +8 -0
  3. package/README.md +16 -2
  4. package/dist/.tsbuildinfo +1 -0
  5. package/dist/config/ApiKeyEntry.d.ts +97 -0
  6. package/dist/config/ApiKeyEntry.d.ts.map +1 -0
  7. package/dist/config/ApiKeyEntry.js +2 -0
  8. package/dist/config/ApiKeyEntry.js.map +1 -0
  9. package/dist/config/Config.d.ts +202 -0
  10. package/dist/config/Config.d.ts.map +1 -0
  11. package/dist/config/Config.js +172 -0
  12. package/dist/config/Config.js.map +1 -0
  13. package/dist/config/ConfigLoader.d.ts +5 -0
  14. package/dist/config/ConfigLoader.d.ts.map +1 -0
  15. package/dist/config/ConfigLoader.js +8 -0
  16. package/dist/config/ConfigLoader.js.map +1 -0
  17. package/dist/config/ConfigUtils.d.ts +6 -0
  18. package/dist/config/ConfigUtils.d.ts.map +1 -0
  19. package/dist/config/ConfigUtils.js +8 -0
  20. package/dist/config/ConfigUtils.js.map +1 -0
  21. package/dist/config/ConfigValidation.d.ts +30 -0
  22. package/dist/config/ConfigValidation.d.ts.map +1 -0
  23. package/dist/config/ConfigValidation.js +170 -0
  24. package/dist/config/ConfigValidation.js.map +1 -0
  25. package/dist/config/CryptoAlgorithms.d.ts +42 -0
  26. package/dist/config/CryptoAlgorithms.d.ts.map +1 -0
  27. package/dist/config/CryptoAlgorithms.js +42 -0
  28. package/dist/config/CryptoAlgorithms.js.map +1 -0
  29. package/dist/config/KeyProviders.d.ts +9 -0
  30. package/dist/config/KeyProviders.d.ts.map +1 -0
  31. package/dist/config/KeyProviders.js +8 -0
  32. package/dist/config/KeyProviders.js.map +1 -0
  33. package/dist/config/SecretsProviders.d.ts +6 -0
  34. package/dist/config/SecretsProviders.d.ts.map +1 -0
  35. package/dist/config/SecretsProviders.js +5 -0
  36. package/dist/config/SecretsProviders.js.map +1 -0
  37. package/dist/config/StorageProviders.d.ts +18 -0
  38. package/dist/config/StorageProviders.d.ts.map +1 -0
  39. package/dist/config/StorageProviders.js +20 -0
  40. package/dist/config/StorageProviders.js.map +1 -0
  41. package/dist/config/TrustProfiles.d.ts +5 -0
  42. package/dist/config/TrustProfiles.d.ts.map +1 -0
  43. package/dist/config/TrustProfiles.js +4 -0
  44. package/dist/config/TrustProfiles.js.map +1 -0
  45. package/dist/config/index.d.ts +11 -0
  46. package/dist/config/index.d.ts.map +1 -0
  47. package/dist/config/index.js +11 -0
  48. package/dist/config/index.js.map +1 -0
  49. package/dist/domain/approval-artifact.d.ts +136 -0
  50. package/dist/domain/approval-artifact.d.ts.map +1 -0
  51. package/dist/domain/approval-artifact.js +2 -0
  52. package/dist/domain/approval-artifact.js.map +1 -0
  53. package/dist/domain/approval-issuer.d.ts +52 -0
  54. package/dist/domain/approval-issuer.d.ts.map +1 -0
  55. package/dist/domain/approval-issuer.js +2 -0
  56. package/dist/domain/approval-issuer.js.map +1 -0
  57. package/dist/domain/authority-grant.d.ts +54 -0
  58. package/dist/domain/authority-grant.d.ts.map +1 -0
  59. package/dist/domain/authority-grant.js +2 -0
  60. package/dist/domain/authority-grant.js.map +1 -0
  61. package/dist/domain/authority.d.ts +42 -0
  62. package/dist/domain/authority.d.ts.map +1 -0
  63. package/dist/domain/authority.js +11 -0
  64. package/dist/domain/authority.js.map +1 -0
  65. package/dist/domain/authorization.d.ts +54 -0
  66. package/dist/domain/authorization.d.ts.map +1 -0
  67. package/dist/domain/authorization.js +2 -0
  68. package/dist/domain/authorization.js.map +1 -0
  69. package/dist/domain/business-signal-source.d.ts +52 -0
  70. package/dist/domain/business-signal-source.d.ts.map +1 -0
  71. package/dist/domain/business-signal-source.js +2 -0
  72. package/dist/domain/business-signal-source.js.map +1 -0
  73. package/dist/domain/business-transaction.d.ts +99 -0
  74. package/dist/domain/business-transaction.d.ts.map +1 -0
  75. package/dist/domain/business-transaction.js +16 -0
  76. package/dist/domain/business-transaction.js.map +1 -0
  77. package/dist/domain/business-validation.d.ts +177 -0
  78. package/dist/domain/business-validation.d.ts.map +1 -0
  79. package/dist/domain/business-validation.js +60 -0
  80. package/dist/domain/business-validation.js.map +1 -0
  81. package/dist/domain/challenge-record.d.ts +181 -0
  82. package/dist/domain/challenge-record.d.ts.map +1 -0
  83. package/dist/domain/challenge-record.js +2 -0
  84. package/dist/domain/challenge-record.js.map +1 -0
  85. package/dist/domain/decision.d.ts +89 -0
  86. package/dist/domain/decision.d.ts.map +1 -0
  87. package/dist/domain/decision.js +9 -0
  88. package/dist/domain/decision.js.map +1 -0
  89. package/dist/domain/evidence-anchor.d.ts +54 -0
  90. package/dist/domain/evidence-anchor.d.ts.map +1 -0
  91. package/dist/domain/evidence-anchor.js +2 -0
  92. package/dist/domain/evidence-anchor.js.map +1 -0
  93. package/dist/domain/executable-content.d.ts +45 -0
  94. package/dist/domain/executable-content.d.ts.map +1 -0
  95. package/dist/domain/executable-content.js +39 -0
  96. package/dist/domain/executable-content.js.map +1 -0
  97. package/dist/domain/execution-audit-event.d.ts +65 -0
  98. package/dist/domain/execution-audit-event.d.ts.map +1 -0
  99. package/dist/domain/execution-audit-event.js +2 -0
  100. package/dist/domain/execution-audit-event.js.map +1 -0
  101. package/dist/domain/execution-authorization.d.ts +224 -0
  102. package/dist/domain/execution-authorization.d.ts.map +1 -0
  103. package/dist/domain/execution-authorization.js +2 -0
  104. package/dist/domain/execution-authorization.js.map +1 -0
  105. package/dist/domain/execution-evidence.d.ts +38 -0
  106. package/dist/domain/execution-evidence.d.ts.map +1 -0
  107. package/dist/domain/execution-evidence.js +2 -0
  108. package/dist/domain/execution-evidence.js.map +1 -0
  109. package/dist/domain/execution-intent.d.ts +92 -0
  110. package/dist/domain/execution-intent.d.ts.map +1 -0
  111. package/dist/domain/execution-intent.js +2 -0
  112. package/dist/domain/execution-intent.js.map +1 -0
  113. package/dist/domain/execution-metadata.d.ts +8 -0
  114. package/dist/domain/execution-metadata.d.ts.map +1 -0
  115. package/dist/domain/execution-metadata.js +2 -0
  116. package/dist/domain/execution-metadata.js.map +1 -0
  117. package/dist/domain/execution-outcome-store.d.ts +49 -0
  118. package/dist/domain/execution-outcome-store.d.ts.map +1 -0
  119. package/dist/domain/execution-outcome-store.js +10 -0
  120. package/dist/domain/execution-outcome-store.js.map +1 -0
  121. package/dist/domain/execution-result.d.ts +49 -0
  122. package/dist/domain/execution-result.d.ts.map +1 -0
  123. package/dist/domain/execution-result.js +2 -0
  124. package/dist/domain/execution-result.js.map +1 -0
  125. package/dist/domain/execution-trust-record.d.ts +142 -0
  126. package/dist/domain/execution-trust-record.d.ts.map +1 -0
  127. package/dist/domain/execution-trust-record.js +2 -0
  128. package/dist/domain/execution-trust-record.js.map +1 -0
  129. package/dist/domain/execution.d.ts +108 -0
  130. package/dist/domain/execution.d.ts.map +1 -0
  131. package/dist/domain/execution.js +18 -0
  132. package/dist/domain/execution.js.map +1 -0
  133. package/dist/domain/external-connector.d.ts +68 -0
  134. package/dist/domain/external-connector.d.ts.map +1 -0
  135. package/dist/domain/external-connector.js +2 -0
  136. package/dist/domain/external-connector.js.map +1 -0
  137. package/dist/domain/index.d.ts +37 -0
  138. package/dist/domain/index.d.ts.map +1 -0
  139. package/dist/domain/index.js +37 -0
  140. package/dist/domain/index.js.map +1 -0
  141. package/dist/domain/intent.d.ts +66 -0
  142. package/dist/domain/intent.d.ts.map +1 -0
  143. package/dist/domain/intent.js +2 -0
  144. package/dist/domain/intent.js.map +1 -0
  145. package/dist/domain/metadata.d.ts +53 -0
  146. package/dist/domain/metadata.d.ts.map +1 -0
  147. package/dist/domain/metadata.js +11 -0
  148. package/dist/domain/metadata.js.map +1 -0
  149. package/dist/domain/override.d.ts +39 -0
  150. package/dist/domain/override.d.ts.map +1 -0
  151. package/dist/domain/override.js +2 -0
  152. package/dist/domain/override.js.map +1 -0
  153. package/dist/domain/pending-policy-change.d.ts +109 -0
  154. package/dist/domain/pending-policy-change.d.ts.map +1 -0
  155. package/dist/domain/pending-policy-change.js +12 -0
  156. package/dist/domain/pending-policy-change.js.map +1 -0
  157. package/dist/domain/policy-change-approval-record.d.ts +81 -0
  158. package/dist/domain/policy-change-approval-record.d.ts.map +1 -0
  159. package/dist/domain/policy-change-approval-record.js +2 -0
  160. package/dist/domain/policy-change-approval-record.js.map +1 -0
  161. package/dist/domain/policy-change-step-up-authorization.d.ts +97 -0
  162. package/dist/domain/policy-change-step-up-authorization.d.ts.map +1 -0
  163. package/dist/domain/policy-change-step-up-authorization.js +2 -0
  164. package/dist/domain/policy-change-step-up-authorization.js.map +1 -0
  165. package/dist/domain/policy-reference.d.ts +58 -0
  166. package/dist/domain/policy-reference.d.ts.map +1 -0
  167. package/dist/domain/policy-reference.js +2 -0
  168. package/dist/domain/policy-reference.js.map +1 -0
  169. package/dist/domain/receipt.d.ts +72 -0
  170. package/dist/domain/receipt.d.ts.map +1 -0
  171. package/dist/domain/receipt.js +2 -0
  172. package/dist/domain/receipt.js.map +1 -0
  173. package/dist/domain/refusal-record.d.ts +110 -0
  174. package/dist/domain/refusal-record.d.ts.map +1 -0
  175. package/dist/domain/refusal-record.js +2 -0
  176. package/dist/domain/refusal-record.js.map +1 -0
  177. package/dist/domain/release-approval.d.ts +14 -0
  178. package/dist/domain/release-approval.d.ts.map +1 -0
  179. package/dist/domain/release-approval.js +2 -0
  180. package/dist/domain/release-approval.js.map +1 -0
  181. package/dist/domain/signals.d.ts +10 -0
  182. package/dist/domain/signals.d.ts.map +1 -0
  183. package/dist/domain/signals.js +2 -0
  184. package/dist/domain/signals.js.map +1 -0
  185. package/dist/domain/signature-entry.d.ts +23 -0
  186. package/dist/domain/signature-entry.d.ts.map +1 -0
  187. package/dist/domain/signature-entry.js +2 -0
  188. package/dist/domain/signature-entry.js.map +1 -0
  189. package/dist/domain/signature.d.ts +26 -0
  190. package/dist/domain/signature.d.ts.map +1 -0
  191. package/dist/domain/signature.js +2 -0
  192. package/dist/domain/signature.js.map +1 -0
  193. package/dist/domain/unsigned-execution-trust-record.d.ts +7 -0
  194. package/dist/domain/unsigned-execution-trust-record.d.ts.map +1 -0
  195. package/dist/domain/unsigned-execution-trust-record.js +2 -0
  196. package/dist/domain/unsigned-execution-trust-record.js.map +1 -0
  197. package/dist/domain/verification.d.ts +48 -0
  198. package/dist/domain/verification.d.ts.map +1 -0
  199. package/dist/domain/verification.js +9 -0
  200. package/dist/domain/verification.js.map +1 -0
  201. package/dist/errors/approval-issuer-change-not-found-error.d.ts +9 -0
  202. package/dist/errors/approval-issuer-change-not-found-error.d.ts.map +1 -0
  203. package/dist/errors/approval-issuer-change-not-found-error.js +11 -0
  204. package/dist/errors/approval-issuer-change-not-found-error.js.map +1 -0
  205. package/dist/errors/authority-grant-change-not-found-error.d.ts +9 -0
  206. package/dist/errors/authority-grant-change-not-found-error.d.ts.map +1 -0
  207. package/dist/errors/authority-grant-change-not-found-error.js +11 -0
  208. package/dist/errors/authority-grant-change-not-found-error.js.map +1 -0
  209. package/dist/errors/authority-required-error.d.ts +5 -0
  210. package/dist/errors/authority-required-error.d.ts.map +1 -0
  211. package/dist/errors/authority-required-error.js +7 -0
  212. package/dist/errors/authority-required-error.js.map +1 -0
  213. package/dist/errors/authorization-no-longer-valid-error.d.ts +19 -0
  214. package/dist/errors/authorization-no-longer-valid-error.d.ts.map +1 -0
  215. package/dist/errors/authorization-no-longer-valid-error.js +23 -0
  216. package/dist/errors/authorization-no-longer-valid-error.js.map +1 -0
  217. package/dist/errors/authorization-required-error.d.ts +5 -0
  218. package/dist/errors/authorization-required-error.d.ts.map +1 -0
  219. package/dist/errors/authorization-required-error.js +7 -0
  220. package/dist/errors/authorization-required-error.js.map +1 -0
  221. package/dist/errors/business-signal-source-change-not-found-error.d.ts +9 -0
  222. package/dist/errors/business-signal-source-change-not-found-error.d.ts.map +1 -0
  223. package/dist/errors/business-signal-source-change-not-found-error.js +11 -0
  224. package/dist/errors/business-signal-source-change-not-found-error.js.map +1 -0
  225. package/dist/errors/business-transaction-not-found-error.d.ts +5 -0
  226. package/dist/errors/business-transaction-not-found-error.d.ts.map +1 -0
  227. package/dist/errors/business-transaction-not-found-error.js +7 -0
  228. package/dist/errors/business-transaction-not-found-error.js.map +1 -0
  229. package/dist/errors/challenge-record-not-found-error.d.ts +9 -0
  230. package/dist/errors/challenge-record-not-found-error.d.ts.map +1 -0
  231. package/dist/errors/challenge-record-not-found-error.js +11 -0
  232. package/dist/errors/challenge-record-not-found-error.js.map +1 -0
  233. package/dist/errors/conflict-error.d.ts +5 -0
  234. package/dist/errors/conflict-error.d.ts.map +1 -0
  235. package/dist/errors/conflict-error.js +7 -0
  236. package/dist/errors/conflict-error.js.map +1 -0
  237. package/dist/errors/connector-not-registered-error.d.ts +21 -0
  238. package/dist/errors/connector-not-registered-error.d.ts.map +1 -0
  239. package/dist/errors/connector-not-registered-error.js +24 -0
  240. package/dist/errors/connector-not-registered-error.js.map +1 -0
  241. package/dist/errors/decision-not-approved-error.d.ts +5 -0
  242. package/dist/errors/decision-not-approved-error.d.ts.map +1 -0
  243. package/dist/errors/decision-not-approved-error.js +7 -0
  244. package/dist/errors/decision-not-approved-error.js.map +1 -0
  245. package/dist/errors/duplicate-business-transaction-error.d.ts +26 -0
  246. package/dist/errors/duplicate-business-transaction-error.d.ts.map +1 -0
  247. package/dist/errors/duplicate-business-transaction-error.js +28 -0
  248. package/dist/errors/duplicate-business-transaction-error.js.map +1 -0
  249. package/dist/errors/external-connector-change-not-found-error.d.ts +9 -0
  250. package/dist/errors/external-connector-change-not-found-error.d.ts.map +1 -0
  251. package/dist/errors/external-connector-change-not-found-error.js +11 -0
  252. package/dist/errors/external-connector-change-not-found-error.js.map +1 -0
  253. package/dist/errors/forbidden-error.d.ts +5 -0
  254. package/dist/errors/forbidden-error.d.ts.map +1 -0
  255. package/dist/errors/forbidden-error.js +7 -0
  256. package/dist/errors/forbidden-error.js.map +1 -0
  257. package/dist/errors/index.d.ts +30 -0
  258. package/dist/errors/index.d.ts.map +1 -0
  259. package/dist/errors/index.js +30 -0
  260. package/dist/errors/index.js.map +1 -0
  261. package/dist/errors/intent-required-error.d.ts +5 -0
  262. package/dist/errors/intent-required-error.d.ts.map +1 -0
  263. package/dist/errors/intent-required-error.js +7 -0
  264. package/dist/errors/intent-required-error.js.map +1 -0
  265. package/dist/errors/non-human-caller-denied-error.d.ts +10 -0
  266. package/dist/errors/non-human-caller-denied-error.d.ts.map +1 -0
  267. package/dist/errors/non-human-caller-denied-error.js +12 -0
  268. package/dist/errors/non-human-caller-denied-error.js.map +1 -0
  269. package/dist/errors/nonce-already-consumed-error.d.ts +26 -0
  270. package/dist/errors/nonce-already-consumed-error.d.ts.map +1 -0
  271. package/dist/errors/nonce-already-consumed-error.js +29 -0
  272. package/dist/errors/nonce-already-consumed-error.js.map +1 -0
  273. package/dist/errors/outcome-unknown-error.d.ts +15 -0
  274. package/dist/errors/outcome-unknown-error.d.ts.map +1 -0
  275. package/dist/errors/outcome-unknown-error.js +19 -0
  276. package/dist/errors/outcome-unknown-error.js.map +1 -0
  277. package/dist/errors/override-not-allowed-error.d.ts +5 -0
  278. package/dist/errors/override-not-allowed-error.d.ts.map +1 -0
  279. package/dist/errors/override-not-allowed-error.js +7 -0
  280. package/dist/errors/override-not-allowed-error.js.map +1 -0
  281. package/dist/errors/parmana-error.d.ts +15 -0
  282. package/dist/errors/parmana-error.d.ts.map +1 -0
  283. package/dist/errors/parmana-error.js +21 -0
  284. package/dist/errors/parmana-error.js.map +1 -0
  285. package/dist/errors/pending-policy-change-not-found-error.d.ts +9 -0
  286. package/dist/errors/pending-policy-change-not-found-error.d.ts.map +1 -0
  287. package/dist/errors/pending-policy-change-not-found-error.js +11 -0
  288. package/dist/errors/pending-policy-change-not-found-error.js.map +1 -0
  289. package/dist/errors/policy-not-found-error.d.ts +5 -0
  290. package/dist/errors/policy-not-found-error.d.ts.map +1 -0
  291. package/dist/errors/policy-not-found-error.js +7 -0
  292. package/dist/errors/policy-not-found-error.js.map +1 -0
  293. package/dist/errors/receipt-generation-error.d.ts +5 -0
  294. package/dist/errors/receipt-generation-error.d.ts.map +1 -0
  295. package/dist/errors/receipt-generation-error.js +7 -0
  296. package/dist/errors/receipt-generation-error.js.map +1 -0
  297. package/dist/errors/same-actor-cannot-approve-own-change-error.d.ts +12 -0
  298. package/dist/errors/same-actor-cannot-approve-own-change-error.d.ts.map +1 -0
  299. package/dist/errors/same-actor-cannot-approve-own-change-error.js +15 -0
  300. package/dist/errors/same-actor-cannot-approve-own-change-error.js.map +1 -0
  301. package/dist/errors/step-up-authorization-invalid-error.d.ts +25 -0
  302. package/dist/errors/step-up-authorization-invalid-error.d.ts.map +1 -0
  303. package/dist/errors/step-up-authorization-invalid-error.js +28 -0
  304. package/dist/errors/step-up-authorization-invalid-error.js.map +1 -0
  305. package/dist/errors/trust-chain-validation-error.d.ts +5 -0
  306. package/dist/errors/trust-chain-validation-error.d.ts.map +1 -0
  307. package/dist/errors/trust-chain-validation-error.js +7 -0
  308. package/dist/errors/trust-chain-validation-error.js.map +1 -0
  309. package/dist/errors/unauthorized-error.d.ts +5 -0
  310. package/dist/errors/unauthorized-error.d.ts.map +1 -0
  311. package/dist/errors/unauthorized-error.js +7 -0
  312. package/dist/errors/unauthorized-error.js.map +1 -0
  313. package/dist/errors/validation-error.d.ts +5 -0
  314. package/dist/errors/validation-error.d.ts.map +1 -0
  315. package/dist/errors/validation-error.js +7 -0
  316. package/dist/errors/validation-error.js.map +1 -0
  317. package/dist/errors/verification-failed-error.d.ts +5 -0
  318. package/dist/errors/verification-failed-error.d.ts.map +1 -0
  319. package/dist/errors/verification-failed-error.js +7 -0
  320. package/dist/errors/verification-failed-error.js.map +1 -0
  321. package/dist/gateway/GatewayAuthentication.d.ts +8 -0
  322. package/dist/gateway/GatewayAuthentication.d.ts.map +1 -0
  323. package/dist/gateway/GatewayAuthentication.js +2 -0
  324. package/dist/gateway/GatewayAuthentication.js.map +1 -0
  325. package/dist/gateway/GatewayAuthenticationClaims.d.ts +10 -0
  326. package/dist/gateway/GatewayAuthenticationClaims.d.ts.map +1 -0
  327. package/dist/gateway/GatewayAuthenticationClaims.js +2 -0
  328. package/dist/gateway/GatewayAuthenticationClaims.js.map +1 -0
  329. package/dist/gateway/GatewayAuthenticationPayload.d.ts +15 -0
  330. package/dist/gateway/GatewayAuthenticationPayload.d.ts.map +1 -0
  331. package/dist/gateway/GatewayAuthenticationPayload.js +2 -0
  332. package/dist/gateway/GatewayAuthenticationPayload.js.map +1 -0
  333. package/dist/gateway/SignedGatewayAuthentication.d.ts +9 -0
  334. package/dist/gateway/SignedGatewayAuthentication.d.ts.map +1 -0
  335. package/dist/gateway/SignedGatewayAuthentication.js +2 -0
  336. package/dist/gateway/SignedGatewayAuthentication.js.map +1 -0
  337. package/dist/gateway/index.d.ts +4 -0
  338. package/dist/gateway/index.d.ts.map +1 -0
  339. package/dist/gateway/index.js +4 -0
  340. package/dist/gateway/index.js.map +1 -0
  341. package/dist/index.d.ts +19 -0
  342. package/dist/index.d.ts.map +1 -0
  343. package/dist/index.js +19 -0
  344. package/dist/index.js.map +1 -0
  345. package/dist/logging/Logger.d.ts +65 -0
  346. package/dist/logging/Logger.d.ts.map +1 -0
  347. package/dist/logging/Logger.js +97 -0
  348. package/dist/logging/Logger.js.map +1 -0
  349. package/dist/network/externalEndpointAddress.d.ts +48 -0
  350. package/dist/network/externalEndpointAddress.d.ts.map +1 -0
  351. package/dist/network/externalEndpointAddress.js +147 -0
  352. package/dist/network/externalEndpointAddress.js.map +1 -0
  353. package/dist/repositories/approval-issuer-repository.d.ts +31 -0
  354. package/dist/repositories/approval-issuer-repository.d.ts.map +1 -0
  355. package/dist/repositories/approval-issuer-repository.js +2 -0
  356. package/dist/repositories/approval-issuer-repository.js.map +1 -0
  357. package/dist/repositories/authority-grant-repository.d.ts +22 -0
  358. package/dist/repositories/authority-grant-repository.d.ts.map +1 -0
  359. package/dist/repositories/authority-grant-repository.js +2 -0
  360. package/dist/repositories/authority-grant-repository.js.map +1 -0
  361. package/dist/repositories/business-signal-source-repository.d.ts +17 -0
  362. package/dist/repositories/business-signal-source-repository.d.ts.map +1 -0
  363. package/dist/repositories/business-signal-source-repository.js +2 -0
  364. package/dist/repositories/business-signal-source-repository.js.map +1 -0
  365. package/dist/repositories/business-transaction-repository.d.ts +34 -0
  366. package/dist/repositories/business-transaction-repository.d.ts.map +1 -0
  367. package/dist/repositories/business-transaction-repository.js +2 -0
  368. package/dist/repositories/business-transaction-repository.js.map +1 -0
  369. package/dist/repositories/challenge-record-repository.d.ts +67 -0
  370. package/dist/repositories/challenge-record-repository.d.ts.map +1 -0
  371. package/dist/repositories/challenge-record-repository.js +76 -0
  372. package/dist/repositories/challenge-record-repository.js.map +1 -0
  373. package/dist/repositories/execution-intent-repository.d.ts +38 -0
  374. package/dist/repositories/execution-intent-repository.d.ts.map +1 -0
  375. package/dist/repositories/execution-intent-repository.js +2 -0
  376. package/dist/repositories/execution-intent-repository.js.map +1 -0
  377. package/dist/repositories/execution-trust-record-repository.d.ts +62 -0
  378. package/dist/repositories/execution-trust-record-repository.d.ts.map +1 -0
  379. package/dist/repositories/execution-trust-record-repository.js +2 -0
  380. package/dist/repositories/execution-trust-record-repository.js.map +1 -0
  381. package/dist/repositories/external-connector-repository.d.ts +37 -0
  382. package/dist/repositories/external-connector-repository.d.ts.map +1 -0
  383. package/dist/repositories/external-connector-repository.js +2 -0
  384. package/dist/repositories/external-connector-repository.js.map +1 -0
  385. package/dist/repositories/handbook-download-lead-repository.d.ts +18 -0
  386. package/dist/repositories/handbook-download-lead-repository.d.ts.map +1 -0
  387. package/dist/repositories/handbook-download-lead-repository.js +2 -0
  388. package/dist/repositories/handbook-download-lead-repository.js.map +1 -0
  389. package/dist/repositories/index.d.ts +14 -0
  390. package/dist/repositories/index.d.ts.map +1 -0
  391. package/dist/repositories/index.js +14 -0
  392. package/dist/repositories/index.js.map +1 -0
  393. package/dist/repositories/pending-policy-change-repository.d.ts +72 -0
  394. package/dist/repositories/pending-policy-change-repository.d.ts.map +1 -0
  395. package/dist/repositories/pending-policy-change-repository.js +46 -0
  396. package/dist/repositories/pending-policy-change-repository.js.map +1 -0
  397. package/dist/repositories/policy-change-approval-record-repository.d.ts +39 -0
  398. package/dist/repositories/policy-change-approval-record-repository.d.ts.map +1 -0
  399. package/dist/repositories/policy-change-approval-record-repository.js +2 -0
  400. package/dist/repositories/policy-change-approval-record-repository.js.map +1 -0
  401. package/dist/repositories/policy-repository.d.ts +15 -0
  402. package/dist/repositories/policy-repository.d.ts.map +1 -0
  403. package/dist/repositories/policy-repository.js +2 -0
  404. package/dist/repositories/policy-repository.js.map +1 -0
  405. package/dist/repositories/refusal-record-repository.d.ts +13 -0
  406. package/dist/repositories/refusal-record-repository.d.ts.map +1 -0
  407. package/dist/repositories/refusal-record-repository.js +2 -0
  408. package/dist/repositories/refusal-record-repository.js.map +1 -0
  409. package/dist/types/Json.d.ts +7 -0
  410. package/dist/types/Json.d.ts.map +1 -0
  411. package/dist/types/Json.js +2 -0
  412. package/dist/types/Json.js.map +1 -0
  413. package/dist/utils/normalize-policy.d.ts +16 -0
  414. package/dist/utils/normalize-policy.d.ts.map +1 -0
  415. package/dist/utils/normalize-policy.js +10 -0
  416. package/dist/utils/normalize-policy.js.map +1 -0
  417. package/package.json +39 -4
@@ -0,0 +1,58 @@
1
+ export interface PolicyReference {
2
+ /**
3
+ * Policy identifier.
4
+ */
5
+ readonly name: string;
6
+ /**
7
+ * Business policy version.
8
+ */
9
+ readonly version: string;
10
+ /**
11
+ * Policy schema version.
12
+ */
13
+ readonly schemaVersion: string;
14
+ /**
15
+ * sha256 of the canonicalized policy.json content actually loaded
16
+ * for this decision (G-24 remediation). Optional and caller-
17
+ * unsettable: a request-supplied PolicyReference never carries this
18
+ * -- it is computed by RuntimeEngine from the real loaded Policy
19
+ * document, after policyRouter.load, and merged into the copy of
20
+ * this reference embedded in ExecutionTrustRecord.transaction.policy
21
+ * only. Lets a later audit confirm exactly which policy *content*
22
+ * (not merely which version string) was in force for a specific
23
+ * past decision, closing the gap where an in-place edit to an
24
+ * existing version's file (see VERIFICATION-GAPS.md G-24's own
25
+ * precedent for this) would otherwise be undetectable from the
26
+ * trust record alone.
27
+ */
28
+ readonly contentHash?: string;
29
+ /**
30
+ * Whether the policy content above is traceable to a completed
31
+ * Policy Governance approval, resolved at decision time
32
+ * (docs/VERIFICATION-GAPS.md G-45). Same provenance and optionality
33
+ * as contentHash: computed by RuntimeEngine, from the real loaded
34
+ * Policy document, merged only into the copy of this reference
35
+ * embedded in ExecutionTrustRecord.transaction.policy -- never
36
+ * caller-settable, absent on a Decision built before this field
37
+ * existed. Unlike contentHash, this is resolved unconditionally
38
+ * (PolicyGovernanceAnchorResolver never blocks execution), so its
39
+ * presence does not imply POLICY_EXECUTION_VERIFICATION_ENFORCED is
40
+ * on -- only that the lookup itself ran and recorded what it found,
41
+ * which may honestly be "no approval record exists for this policy
42
+ * yet."
43
+ */
44
+ readonly governanceAnchor?: PolicyGovernanceAnchor;
45
+ }
46
+ /**
47
+ * Mirrors @parmana/policy's PolicyGovernanceAnchor exactly.
48
+ * Duplicated here (not imported) because @parmana/shared sits below
49
+ * @parmana/policy in the dependency graph (policy depends on shared,
50
+ * never the reverse) -- the same constraint PendingPolicyChange's own
51
+ * doc comment explains for JsonValue vs. the real Policy type.
52
+ */
53
+ export type PolicyGovernanceAnchorStatus = "VERIFIED" | "NO_APPROVAL_RECORD" | "SIGNATURE_INVALID" | "CONTENT_MISMATCH";
54
+ export interface PolicyGovernanceAnchor {
55
+ readonly status: PolicyGovernanceAnchorStatus;
56
+ readonly approvalRecordId?: string;
57
+ }
58
+ //# sourceMappingURL=policy-reference.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy-reference.d.ts","sourceRoot":"","sources":["../../src/domain/policy-reference.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAE/B;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE9B;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,sBAAsB,CAAC;CACpD;AAED;;;;;;GAMG;AACH,MAAM,MAAM,4BAA4B,GACtC,UAAU,GAAG,oBAAoB,GAAG,mBAAmB,GAAG,kBAAkB,CAAC;AAE/E,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,MAAM,EAAE,4BAA4B,CAAC;IAE9C,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CACpC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=policy-reference.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy-reference.js","sourceRoot":"","sources":["../../src/domain/policy-reference.ts"],"names":[],"mappings":""}
@@ -0,0 +1,72 @@
1
+ import type { SignatureEntry } from "./signature-entry.js";
2
+ /**
3
+ * Parmana Trust Core
4
+ *
5
+ * Execution Trust Receipt
6
+ *
7
+ * A cryptographically verifiable receipt proving the
8
+ * outcome of an Execution Trust Record.
9
+ *
10
+ * Receipts are immutable trust artifacts generated
11
+ * automatically by Parmana.
12
+ */
13
+ export interface Receipt {
14
+ /**
15
+ * Unique Receipt identifier.
16
+ */
17
+ readonly receiptId: string;
18
+ /**
19
+ * Business Transaction represented by this Receipt.
20
+ */
21
+ readonly businessTransactionId: string;
22
+ /**
23
+ * Execution represented by this Receipt.
24
+ *
25
+ * Undefined when the Receipt represents the
26
+ * latest transaction state.
27
+ */
28
+ readonly executionId?: string;
29
+ /**
30
+ * Hash of the Execution Trust Record.
31
+ *
32
+ * Used for independent verification.
33
+ */
34
+ readonly trustRecordHash: string;
35
+ /**
36
+ * Hash of this Receipt.
37
+ */
38
+ readonly receiptHash: string;
39
+ /**
40
+ * Digital signature over the Receipt.
41
+ */
42
+ readonly signature: string;
43
+ /**
44
+ * Signing algorithm.
45
+ *
46
+ * Example:
47
+ * Ed25519
48
+ */
49
+ readonly algorithm: string;
50
+ /**
51
+ * Envelope schema version (Hybrid Signature Support milestone,
52
+ * Phase A). Absent means schema v1: exactly today's shape,
53
+ * `signature`/`algorithm` above are the sole cryptographic
54
+ * attestation. Present and >= 2 means `signatures` (below) was
55
+ * populated at signing time and MUST be independently verified in
56
+ * full. See the identical field on ExecutionTrustRecord.
57
+ */
58
+ readonly schemaVersion?: number;
59
+ /**
60
+ * Additional signatures over this Receipt, one per algorithm,
61
+ * produced only when CRYPTO_MODE=hybrid was active at signing time.
62
+ * See the identical field on ExecutionTrustRecord for the fail-
63
+ * closed verification requirement.
64
+ */
65
+ readonly signatures?: readonly SignatureEntry[];
66
+ /**
67
+ * UTC timestamp when the Receipt
68
+ * was generated.
69
+ */
70
+ readonly issuedAt: Date;
71
+ }
72
+ //# sourceMappingURL=receipt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"receipt.d.ts","sourceRoot":"","sources":["../../src/domain/receipt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D;;;;;;;;;;GAUG;AACH,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IAEvC;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE9B;;;;OAIG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IAEjC;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B;;;;;;;OAOG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAEhC;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;IAEhD;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;CACzB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=receipt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"receipt.js","sourceRoot":"","sources":["../../src/domain/receipt.ts"],"names":[],"mappings":""}
@@ -0,0 +1,110 @@
1
+ import { Decision } from "./decision.js";
2
+ import { Signature } from "./signature.js";
3
+ /**
4
+ * The subset of a Business Transaction's Intent a policy decision was
5
+ * evaluated against. Mirrors @parmana/policy's own IntentSnapshot
6
+ * shape exactly (target, parameters) rather than depending on
7
+ * @parmana/policy from @parmana/shared, which would invert the
8
+ * package dependency direction.
9
+ */
10
+ export interface RefusalIntentSnapshot {
11
+ readonly target?: string;
12
+ readonly parameters?: Readonly<Record<string, unknown>>;
13
+ }
14
+ /**
15
+ * One boundSignals entry whose declared signal value did not match
16
+ * the value found at its Intent dot-path. Mirrors
17
+ * @parmana/policy's SignalIntentBindingViolation shape exactly, for
18
+ * the same reason RefusalIntentSnapshot mirrors IntentSnapshot.
19
+ */
20
+ export interface RefusalBindingViolation {
21
+ readonly signalKey: string;
22
+ readonly intentPath: string;
23
+ readonly signalValue: unknown;
24
+ readonly intentValue: unknown;
25
+ }
26
+ /**
27
+ * Refusal Record (RFC-0021).
28
+ *
29
+ * Durable, signed, independently verifiable evidence that a policy
30
+ * decision REJECTED a transaction — the REJECT-path counterpart to
31
+ * ExecutionTrustRecord. Scope is deliberately narrow: this covers
32
+ * PolicyEngine.evaluate REJECTs and SignalIntentBinder
33
+ * binding-violation REJECTs only, not every kind of rejection this
34
+ * system can produce (caller-auth failures and webhook signature
35
+ * failures are a separate, unsigned audit-sink milestone; see
36
+ * RFC-0021 Non-Goals). Any claim this record supports should be
37
+ * scoped to "a policy decided to reject," not "every rejection of
38
+ * any kind."
39
+ *
40
+ * Unlike ExecutionTrustRecord, this is not an append-only aggregate
41
+ * with sub-histories (executions, receipts, ...) — a refusal is a
42
+ * single terminal event for a transaction that was never accepted
43
+ * for execution, so there is nothing to append to. At most one
44
+ * RefusalRecord exists per businessTransactionId.
45
+ */
46
+ export interface RefusalRecord {
47
+ /**
48
+ * Unique Refusal Record identifier.
49
+ */
50
+ readonly refusalRecordId: string;
51
+ /**
52
+ * Business Transaction this refusal is about.
53
+ */
54
+ readonly businessTransactionId: string;
55
+ /**
56
+ * The exact rejected Decision: decisionId, intentId, the policy
57
+ * reference, the exact signals evaluated, outcome, reason,
58
+ * evaluatedAt. Not summarized or reconstructed — the same Decision
59
+ * object RuntimeEngine already builds before ExecutionGate.enforce()
60
+ * throws.
61
+ */
62
+ readonly decision: Decision;
63
+ /**
64
+ * The exact Intent snapshot the signals were evaluated against.
65
+ * Present for every refusal (not only binding violations) so an
66
+ * ordinary policy REJECT and a signal/intent-binding REJECT are
67
+ * evidenced the same way and stay directly comparable.
68
+ */
69
+ readonly evaluatedIntent: RefusalIntentSnapshot;
70
+ /**
71
+ * Present only when the rejection came from SignalIntentBinder.
72
+ * Absent (not an empty array) for an ordinary PolicyEngine.evaluate
73
+ * REJECT that never reached binding-violation logic at all.
74
+ */
75
+ readonly bindingViolations?: readonly RefusalBindingViolation[];
76
+ /**
77
+ * Authenticated caller who submitted the rejected request, from
78
+ * the same server-set metadata.submittedBy field trust records and
79
+ * isOwnedByCaller already rely on. Absent when caller-auth is
80
+ * disabled.
81
+ */
82
+ readonly submittedBy?: string;
83
+ /**
84
+ * SHA-256 hash of the policy content that decided this refusal, the
85
+ * same value an Execution Trust Record carries in
86
+ * transaction.policy.contentHash. Computed by the runtime from the
87
+ * policy that actually loaded, never from the request. Inside the
88
+ * signed canonical record. Absent on Refusal Records written before
89
+ * 2026-10-06, which still verify.
90
+ */
91
+ readonly policyContentHash?: string;
92
+ /**
93
+ * Canonical hash of this Refusal Record, same convention as
94
+ * ExecutionTrustRecord.trustRecordHash.
95
+ */
96
+ readonly refusalRecordHash: string;
97
+ /**
98
+ * Cryptographic signature over the canonical Refusal Record. Proves
99
+ * the refusal was recorded by Parmana and has not been modified
100
+ * since. Signed with the same key (DEFAULT_KEY_ID) as
101
+ * ExecutionTrustRecord — one root of trust for both approvals and
102
+ * refusals (RFC-0021 §2).
103
+ */
104
+ readonly signature: Signature;
105
+ /**
106
+ * UTC timestamp when this Refusal Record was created.
107
+ */
108
+ readonly createdAt: Date;
109
+ }
110
+ //# sourceMappingURL=refusal-record.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"refusal-record.d.ts","sourceRoot":"","sources":["../../src/domain/refusal-record.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACzD;AAED;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IAEjC;;OAEG;IACH,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IAEvC;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAE5B;;;;;OAKG;IACH,QAAQ,CAAC,eAAe,EAAE,qBAAqB,CAAC;IAEhD;;;;OAIG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,uBAAuB,EAAE,CAAC;IAEhE;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE9B;;;;;;;OAOG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAEpC;;;OAGG;IACH,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IAEnC;;;;;;OAMG;IACH,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAE9B;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;CAC1B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=refusal-record.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"refusal-record.js","sourceRoot":"","sources":["../../src/domain/refusal-record.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * One signed human approval behind a released action, as the Execution
3
+ * Gateway found it in the request's signals after checking them against
4
+ * the authorization's signed signalsHash. It names who approved and with
5
+ * which key; the approval itself was verified when the decision was
6
+ * made. An external connector's signed release lists these as
7
+ * approvedBy (ADR-0013).
8
+ */
9
+ export interface ReleaseApproval {
10
+ readonly approverId: string;
11
+ readonly keyId: string;
12
+ readonly approvalId: string;
13
+ }
14
+ //# sourceMappingURL=release-approval.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"release-approval.d.ts","sourceRoot":"","sources":["../../src/domain/release-approval.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=release-approval.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"release-approval.js","sourceRoot":"","sources":["../../src/domain/release-approval.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Business signals evaluated by a Policy.
3
+ *
4
+ * Parmana is policy-driven and therefore does not define
5
+ * the structure of business signals. The resolved Policy
6
+ * and its associated Signal Schema determine the allowed
7
+ * fields and validation rules.
8
+ */
9
+ export type Signals = Readonly<Record<string, unknown>>;
10
+ //# sourceMappingURL=signals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signals.d.ts","sourceRoot":"","sources":["../../src/domain/signals.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=signals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signals.js","sourceRoot":"","sources":["../../src/domain/signals.ts"],"names":[],"mappings":""}
@@ -0,0 +1,23 @@
1
+ import type { SignatureAlgorithm } from "../config/CryptoAlgorithms.js";
2
+ /**
3
+ * One entry in a hybrid-signed artifact's `signatures` array
4
+ * (Hybrid Signature Support milestone, Phase A).
5
+ *
6
+ * Distinct from the legacy `Signature` domain type (signature.ts):
7
+ * that type's singular `signature` field on ExecutionTrustRecord /
8
+ * Receipt is always computed exactly as it was before this milestone,
9
+ * over exactly the same canonical content, so pre-existing single-
10
+ * signature records and third-party verifiers that
11
+ * only know that field keep working unchanged. `signatures` is
12
+ * additive: present only on records signed under CRYPTO_MODE=hybrid,
13
+ * where every entry must independently verify (see
14
+ * HybridSignatureProvider in @parmana/crypto) -- a missing or
15
+ * malformed entry is a rejection, never a silent downgrade to
16
+ * checking only the legacy field.
17
+ */
18
+ export interface SignatureEntry {
19
+ readonly algorithm: SignatureAlgorithm;
20
+ readonly keyId: string;
21
+ readonly signature: string;
22
+ }
23
+ //# sourceMappingURL=signature-entry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signature-entry.d.ts","sourceRoot":"","sources":["../../src/domain/signature-entry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAExE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAC;IAEvC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=signature-entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signature-entry.js","sourceRoot":"","sources":["../../src/domain/signature-entry.ts"],"names":[],"mappings":""}
@@ -0,0 +1,26 @@
1
+ import type { SignatureAlgorithm } from "../config/CryptoAlgorithms.js";
2
+ /**
3
+ * Canonical cryptographic signature.
4
+ *
5
+ * Represents an immutable digital signature that can
6
+ * be independently verified by any trusted verifier.
7
+ */
8
+ export interface Signature {
9
+ /**
10
+ * Signature algorithm.
11
+ */
12
+ readonly algorithm: SignatureAlgorithm;
13
+ /**
14
+ * Identifier of the signing key.
15
+ */
16
+ readonly keyId: string;
17
+ /**
18
+ * Base64 encoded signature value.
19
+ */
20
+ readonly value: string;
21
+ /**
22
+ * UTC timestamp when the signature was created.
23
+ */
24
+ readonly signedAt: Date;
25
+ }
26
+ //# sourceMappingURL=signature.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signature.d.ts","sourceRoot":"","sources":["../../src/domain/signature.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAExE;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAC;IAEvC;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;CACzB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=signature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signature.js","sourceRoot":"","sources":["../../src/domain/signature.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import type { ExecutionTrustRecord } from "./execution-trust-record.js";
2
+ /**
3
+ * Internal unsigned Trust Record used only during
4
+ * construction prior to cryptographic signing.
5
+ */
6
+ export type UnsignedExecutionTrustRecord = Omit<ExecutionTrustRecord, "signature">;
7
+ //# sourceMappingURL=unsigned-execution-trust-record.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unsigned-execution-trust-record.d.ts","sourceRoot":"","sources":["../../src/domain/unsigned-execution-trust-record.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAExE;;;GAGG;AACH,MAAM,MAAM,4BAA4B,GAAG,IAAI,CAC7C,oBAAoB,EACpB,WAAW,CACZ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=unsigned-execution-trust-record.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unsigned-execution-trust-record.js","sourceRoot":"","sources":["../../src/domain/unsigned-execution-trust-record.ts"],"names":[],"mappings":""}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Parmana Trust Core
3
+ *
4
+ * Verification
5
+ *
6
+ * Records the result of verifying an entire
7
+ * Execution Trust Record.
8
+ *
9
+ * Verifications are immutable trust artifacts.
10
+ */
11
+ export interface Verification {
12
+ /**
13
+ * Unique Verification identifier.
14
+ */
15
+ readonly verificationId: string;
16
+ /**
17
+ * Business Transaction being verified.
18
+ */
19
+ readonly businessTransactionId: string;
20
+ /**
21
+ * Verification result.
22
+ */
23
+ readonly status: VerificationStatus;
24
+ /**
25
+ * Human-readable verification summary.
26
+ */
27
+ readonly message?: string;
28
+ /**
29
+ * UTC timestamp when verification completed.
30
+ */
31
+ readonly verifiedAt: Date;
32
+ /**
33
+ * Digest (hash) of the verified
34
+ * Execution Trust Record.
35
+ *
36
+ * Used to prove exactly which record
37
+ * was verified.
38
+ */
39
+ readonly trustRecordHash: string;
40
+ }
41
+ /**
42
+ * Canonical verification outcomes.
43
+ */
44
+ export declare enum VerificationStatus {
45
+ VERIFIED = "VERIFIED",
46
+ FAILED = "FAILED"
47
+ }
48
+ //# sourceMappingURL=verification.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verification.d.ts","sourceRoot":"","sources":["../../src/domain/verification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAEhC;;OAEG;IACH,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IAEvC;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IAEpC;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC;IAE1B;;;;;;OAMG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;CAClC;AAED;;GAEG;AACH,oBAAY,kBAAkB;IAC5B,QAAQ,aAAa;IAErB,MAAM,WAAW;CAClB"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Canonical verification outcomes.
3
+ */
4
+ export var VerificationStatus;
5
+ (function (VerificationStatus) {
6
+ VerificationStatus["VERIFIED"] = "VERIFIED";
7
+ VerificationStatus["FAILED"] = "FAILED";
8
+ })(VerificationStatus || (VerificationStatus = {}));
9
+ //# sourceMappingURL=verification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verification.js","sourceRoot":"","sources":["../../src/domain/verification.ts"],"names":[],"mappings":"AA8CA;;GAEG;AACH,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,2CAAqB,CAAA;IAErB,uCAAiB,CAAA;AACnB,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B"}
@@ -0,0 +1,9 @@
1
+ import { ParmanaError } from "./parmana-error.js";
2
+ /**
3
+ * Thrown when an approver change lookup or resolution is given an id
4
+ * that does not exist.
5
+ */
6
+ export declare class ApprovalIssuerChangeNotFoundError extends ParmanaError {
7
+ constructor(changeId: string);
8
+ }
9
+ //# sourceMappingURL=approval-issuer-change-not-found-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approval-issuer-change-not-found-error.d.ts","sourceRoot":"","sources":["../../src/errors/approval-issuer-change-not-found-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD;;;GAGG;AACH,qBAAa,iCAAkC,SAAQ,YAAY;IACjE,YAAY,QAAQ,EAAE,MAAM,EAM3B;CACF"}
@@ -0,0 +1,11 @@
1
+ import { ParmanaError } from "./parmana-error.js";
2
+ /**
3
+ * Thrown when an approver change lookup or resolution is given an id
4
+ * that does not exist.
5
+ */
6
+ export class ApprovalIssuerChangeNotFoundError extends ParmanaError {
7
+ constructor(changeId) {
8
+ super("APPROVAL_ISSUER_CHANGE_NOT_FOUND", `Approver change '${changeId}' not found.`, 404);
9
+ }
10
+ }
11
+ //# sourceMappingURL=approval-issuer-change-not-found-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approval-issuer-change-not-found-error.js","sourceRoot":"","sources":["../../src/errors/approval-issuer-change-not-found-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD;;;GAGG;AACH,MAAM,OAAO,iCAAkC,SAAQ,YAAY;IACjE,YAAY,QAAgB;QAC1B,KAAK,CACH,kCAAkC,EAClC,oBAAoB,QAAQ,cAAc,EAC1C,GAAG,CACJ,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,9 @@
1
+ import { ParmanaError } from "./parmana-error.js";
2
+ /**
3
+ * Thrown when an authority grant change lookup or resolution is given
4
+ * an id that does not exist.
5
+ */
6
+ export declare class AuthorityGrantChangeNotFoundError extends ParmanaError {
7
+ constructor(changeId: string);
8
+ }
9
+ //# sourceMappingURL=authority-grant-change-not-found-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authority-grant-change-not-found-error.d.ts","sourceRoot":"","sources":["../../src/errors/authority-grant-change-not-found-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD;;;GAGG;AACH,qBAAa,iCAAkC,SAAQ,YAAY;IACjE,YAAY,QAAQ,EAAE,MAAM,EAM3B;CACF"}
@@ -0,0 +1,11 @@
1
+ import { ParmanaError } from "./parmana-error.js";
2
+ /**
3
+ * Thrown when an authority grant change lookup or resolution is given
4
+ * an id that does not exist.
5
+ */
6
+ export class AuthorityGrantChangeNotFoundError extends ParmanaError {
7
+ constructor(changeId) {
8
+ super("AUTHORITY_GRANT_CHANGE_NOT_FOUND", `Authority grant change '${changeId}' not found.`, 404);
9
+ }
10
+ }
11
+ //# sourceMappingURL=authority-grant-change-not-found-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authority-grant-change-not-found-error.js","sourceRoot":"","sources":["../../src/errors/authority-grant-change-not-found-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD;;;GAGG;AACH,MAAM,OAAO,iCAAkC,SAAQ,YAAY;IACjE,YAAY,QAAgB;QAC1B,KAAK,CACH,kCAAkC,EAClC,2BAA2B,QAAQ,cAAc,EACjD,GAAG,CACJ,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,5 @@
1
+ import { TrustChainValidationError } from "./trust-chain-validation-error.js";
2
+ export declare class AuthorityRequiredError extends TrustChainValidationError {
3
+ constructor();
4
+ }
5
+ //# sourceMappingURL=authority-required-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authority-required-error.d.ts","sourceRoot":"","sources":["../../src/errors/authority-required-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAE9E,qBAAa,sBAAuB,SAAQ,yBAAyB;IACnE,cAEC;CACF"}
@@ -0,0 +1,7 @@
1
+ import { TrustChainValidationError } from "./trust-chain-validation-error.js";
2
+ export class AuthorityRequiredError extends TrustChainValidationError {
3
+ constructor() {
4
+ super("AUTHORITY_REQUIRED", "Authority is required before execution.");
5
+ }
6
+ }
7
+ //# sourceMappingURL=authority-required-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authority-required-error.js","sourceRoot":"","sources":["../../src/errors/authority-required-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAE9E,MAAM,OAAO,sBAAuB,SAAQ,yBAAyB;IACnE;QACE,KAAK,CAAC,oBAAoB,EAAE,yCAAyC,CAAC,CAAC;IACzE,CAAC;CACF"}
@@ -0,0 +1,19 @@
1
+ import { ExecutionAssessmentStatus } from "../domain/business-validation.js";
2
+ import { ParmanaError } from "./parmana-error.js";
3
+ /**
4
+ * Thrown by @parmana/execution-gateway's ExecutionGateway.execute() when
5
+ * the only checks that failed are the ones RFC-0023 phase 4 adds at
6
+ * release: a business condition the authorization rests on is past its
7
+ * validUntil, or the authority grant it rests on has expired or been
8
+ * revoked. Everything else verified, and nothing was sent to a
9
+ * connector, so the action was not executed.
10
+ *
11
+ * A 409, like NonceAlreadyConsumedError, and for the same reason: it is
12
+ * a fact about this authorization, not a server failure. The remedy is a
13
+ * new request, decided again on current facts and authority.
14
+ */
15
+ export declare class AuthorizationNoLongerValidError extends ParmanaError {
16
+ readonly executionStatus = ExecutionAssessmentStatus.NOT_EXECUTED;
17
+ constructor(businessTransactionId: string, reasons: readonly string[]);
18
+ }
19
+ //# sourceMappingURL=authorization-no-longer-valid-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authorization-no-longer-valid-error.d.ts","sourceRoot":"","sources":["../../src/errors/authorization-no-longer-valid-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD;;;;;;;;;;;GAWG;AACH,qBAAa,+BAAgC,SAAQ,YAAY;IAC/D,QAAQ,CAAC,eAAe,0CAA0C;IAElE,YAAY,qBAAqB,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,MAAM,EAAE,EAQpE;CACF"}
@@ -0,0 +1,23 @@
1
+ import { ExecutionAssessmentStatus } from "../domain/business-validation.js";
2
+ import { ParmanaError } from "./parmana-error.js";
3
+ /**
4
+ * Thrown by @parmana/execution-gateway's ExecutionGateway.execute() when
5
+ * the only checks that failed are the ones RFC-0023 phase 4 adds at
6
+ * release: a business condition the authorization rests on is past its
7
+ * validUntil, or the authority grant it rests on has expired or been
8
+ * revoked. Everything else verified, and nothing was sent to a
9
+ * connector, so the action was not executed.
10
+ *
11
+ * A 409, like NonceAlreadyConsumedError, and for the same reason: it is
12
+ * a fact about this authorization, not a server failure. The remedy is a
13
+ * new request, decided again on current facts and authority.
14
+ */
15
+ export class AuthorizationNoLongerValidError extends ParmanaError {
16
+ executionStatus = ExecutionAssessmentStatus.NOT_EXECUTED;
17
+ constructor(businessTransactionId, reasons) {
18
+ super("AUTHORIZATION_NO_LONGER_VALID", `Not released: what the authorization for business transaction '${businessTransactionId}' ` +
19
+ `rests on no longer holds (${reasons.join("; ")}). Nothing was executed. ` +
20
+ "Send a new request to be decided again.", 409);
21
+ }
22
+ }
23
+ //# sourceMappingURL=authorization-no-longer-valid-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authorization-no-longer-valid-error.js","sourceRoot":"","sources":["../../src/errors/authorization-no-longer-valid-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,+BAAgC,SAAQ,YAAY;IACtD,eAAe,GAAG,yBAAyB,CAAC,YAAY,CAAC;IAElE,YAAY,qBAA6B,EAAE,OAA0B;QACnE,KAAK,CACH,+BAA+B,EAC/B,kEAAkE,qBAAqB,IAAI;YACzF,6BAA6B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,2BAA2B;YAC1E,yCAAyC,EAC3C,GAAG,CACJ,CAAC;IACJ,CAAC;CACF"}