@learncard/network-brain-service 4.1.3 → 5.0.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 (375) hide show
  1. package/.env.example +14 -0
  2. package/CHANGELOG.md +143 -0
  3. package/README.md +27 -1
  4. package/bootstrapLambda.test.ts +70 -32
  5. package/config/config.dev.json +1 -0
  6. package/config/config.example.json +2 -1
  7. package/config/config.production.json +1 -0
  8. package/config/config.scouts.dev.json +1 -0
  9. package/config/config.scouts.production.json +1 -0
  10. package/consentFlowDeadlineLambda.test.ts +108 -0
  11. package/consentFlowDeadlineLambda.ts +18 -0
  12. package/consentFlowDeadlineLambdaApp.ts +14 -0
  13. package/dist/accesslayer/boost/create.d.ts +8 -2
  14. package/dist/accesslayer/boost/create.d.ts.map +1 -1
  15. package/dist/accesslayer/campaign/audience.d.ts +4 -4
  16. package/dist/accesslayer/campaign/audience.d.ts.map +1 -1
  17. package/dist/accesslayer/campaign/create.d.ts +1 -1
  18. package/dist/accesslayer/campaign/create.d.ts.map +1 -1
  19. package/dist/accesslayer/campaign/delivery.d.ts +5 -0
  20. package/dist/accesslayer/campaign/delivery.d.ts.map +1 -0
  21. package/dist/accesslayer/campaign/dispatch.d.ts +5 -0
  22. package/dist/accesslayer/campaign/dispatch.d.ts.map +1 -0
  23. package/dist/accesslayer/campaign/dispatch.test.d.ts +2 -0
  24. package/dist/accesslayer/campaign/dispatch.test.d.ts.map +1 -0
  25. package/dist/accesslayer/campaign/email.d.ts +10 -0
  26. package/dist/accesslayer/campaign/email.d.ts.map +1 -0
  27. package/dist/accesslayer/campaign/email.test.d.ts +2 -0
  28. package/dist/accesslayer/campaign/email.test.d.ts.map +1 -0
  29. package/dist/accesslayer/campaign/preferences.d.ts +5 -0
  30. package/dist/accesslayer/campaign/preferences.d.ts.map +1 -0
  31. package/dist/accesslayer/campaign/read.d.ts.map +1 -1
  32. package/dist/accesslayer/campaign/test.d.ts +5 -0
  33. package/dist/accesslayer/campaign/test.d.ts.map +1 -0
  34. package/dist/accesslayer/campaign/test.test.d.ts +2 -0
  35. package/dist/accesslayer/campaign/test.test.d.ts.map +1 -0
  36. package/dist/accesslayer/campaign/update.d.ts.map +1 -1
  37. package/dist/accesslayer/consentflowcontract/create.d.ts.map +1 -1
  38. package/dist/accesslayer/consentflowcontract/delete.d.ts +1 -1
  39. package/dist/accesslayer/consentflowcontract/delete.d.ts.map +1 -1
  40. package/dist/accesslayer/consentflowcontract/read.d.ts.map +1 -1
  41. package/dist/accesslayer/consentflowcontract/relationships/create.d.ts +2 -1
  42. package/dist/accesslayer/consentflowcontract/relationships/create.d.ts.map +1 -1
  43. package/dist/accesslayer/consentflowcontract/relationships/read.d.ts +19 -4
  44. package/dist/accesslayer/consentflowcontract/relationships/read.d.ts.map +1 -1
  45. package/dist/accesslayer/consentflowcontract/relationships/update.d.ts +6 -1
  46. package/dist/accesslayer/consentflowcontract/relationships/update.d.ts.map +1 -1
  47. package/dist/accesslayer/consentflowcontract/versions.d.ts +68 -0
  48. package/dist/accesslayer/consentflowcontract/versions.d.ts.map +1 -0
  49. package/dist/accesslayer/credential/create.d.ts +3 -1
  50. package/dist/accesslayer/credential/create.d.ts.map +1 -1
  51. package/dist/accesslayer/credential/delete.d.ts +1 -0
  52. package/dist/accesslayer/credential/delete.d.ts.map +1 -1
  53. package/dist/accesslayer/credential/relationships/create.d.ts +15 -3
  54. package/dist/accesslayer/credential/relationships/create.d.ts.map +1 -1
  55. package/dist/accesslayer/credential/relationships/read.d.ts +2 -0
  56. package/dist/accesslayer/credential/relationships/read.d.ts.map +1 -1
  57. package/dist/accesslayer/credential/relationships/update.d.ts.map +1 -1
  58. package/dist/accesslayer/credential-refresh/read.d.ts +1 -0
  59. package/dist/accesslayer/credential-refresh/read.d.ts.map +1 -1
  60. package/dist/accesslayer/credential-refresh/update.d.ts.map +1 -1
  61. package/dist/accesslayer/inbox-credential/create.d.ts +1 -0
  62. package/dist/accesslayer/inbox-credential/create.d.ts.map +1 -1
  63. package/dist/accesslayer/inbox-credential/refresh.d.ts +7 -0
  64. package/dist/accesslayer/inbox-credential/refresh.d.ts.map +1 -1
  65. package/dist/app.d.ts +11 -1
  66. package/dist/app.d.ts.map +1 -1
  67. package/dist/cache/app-store.caches.d.ts +61 -1
  68. package/dist/cache/app-store.caches.d.ts.map +1 -1
  69. package/dist/campaign-unsubscribe.d.ts +7 -0
  70. package/dist/campaign-unsubscribe.d.ts.map +1 -0
  71. package/dist/campaign-unsubscribe.test.d.ts +2 -0
  72. package/dist/campaign-unsubscribe.test.d.ts.map +1 -0
  73. package/dist/config/environment.d.ts +42 -0
  74. package/dist/config/environment.d.ts.map +1 -1
  75. package/dist/config/stageConfig.d.ts +4 -0
  76. package/dist/config/stageConfig.d.ts.map +1 -1
  77. package/dist/credential-refresh.d.ts.map +1 -1
  78. package/dist/helpers/boost.helpers.d.ts +4 -1
  79. package/dist/helpers/boost.helpers.d.ts.map +1 -1
  80. package/dist/helpers/campaign-app-origin.helpers.d.ts +2 -0
  81. package/dist/helpers/campaign-app-origin.helpers.d.ts.map +1 -0
  82. package/dist/helpers/campaign-email.helpers.d.ts +13 -0
  83. package/dist/helpers/campaign-email.helpers.d.ts.map +1 -0
  84. package/dist/helpers/campaign-notifications.helpers.d.ts +7 -0
  85. package/dist/helpers/campaign-notifications.helpers.d.ts.map +1 -0
  86. package/dist/helpers/campaign-queue.helpers.d.ts +7 -0
  87. package/dist/helpers/campaign-queue.helpers.d.ts.map +1 -0
  88. package/dist/helpers/campaign-queue.helpers.test.d.ts +2 -0
  89. package/dist/helpers/campaign-queue.helpers.test.d.ts.map +1 -0
  90. package/dist/helpers/campaign-unsubscribe-page.d.ts +2 -0
  91. package/dist/helpers/campaign-unsubscribe-page.d.ts.map +1 -0
  92. package/dist/helpers/campaign-unsubscribe.helpers.d.ts +7 -0
  93. package/dist/helpers/campaign-unsubscribe.helpers.d.ts.map +1 -0
  94. package/dist/helpers/campaign-webhook.helpers.test.d.ts +2 -0
  95. package/dist/helpers/campaign-webhook.helpers.test.d.ts.map +1 -0
  96. package/dist/helpers/consentflow-deadline.helpers.d.ts +5 -0
  97. package/dist/helpers/consentflow-deadline.helpers.d.ts.map +1 -0
  98. package/dist/helpers/consentflow-legacy-migration.helpers.d.ts +2 -0
  99. package/dist/helpers/consentflow-legacy-migration.helpers.d.ts.map +1 -0
  100. package/dist/helpers/contract-events.helpers.d.ts.map +1 -1
  101. package/dist/helpers/contract.helpers.d.ts +1 -1
  102. package/dist/helpers/contract.helpers.d.ts.map +1 -1
  103. package/dist/helpers/credential-display.helpers.d.ts +5 -0
  104. package/dist/helpers/credential-display.helpers.d.ts.map +1 -0
  105. package/dist/helpers/credential-display.helpers.test.d.ts +2 -0
  106. package/dist/helpers/credential-display.helpers.test.d.ts.map +1 -0
  107. package/dist/helpers/credential-refresh-email.helpers.d.ts.map +1 -1
  108. package/dist/helpers/credential-refresh-materiality.helpers.d.ts +4 -0
  109. package/dist/helpers/credential-refresh-materiality.helpers.d.ts.map +1 -1
  110. package/dist/helpers/credential-refresh.helpers.d.ts +30 -1
  111. package/dist/helpers/credential-refresh.helpers.d.ts.map +1 -1
  112. package/dist/helpers/credential-status-mutation.helpers.d.ts +5 -0
  113. package/dist/helpers/credential-status-mutation.helpers.d.ts.map +1 -0
  114. package/dist/helpers/credential-status-mutation.helpers.test.d.ts +2 -0
  115. package/dist/helpers/credential-status-mutation.helpers.test.d.ts.map +1 -0
  116. package/dist/helpers/credential.helpers.d.ts +1 -1
  117. package/dist/helpers/credential.helpers.d.ts.map +1 -1
  118. package/dist/helpers/inbox-refresh.helpers.d.ts +4 -2
  119. package/dist/helpers/inbox-refresh.helpers.d.ts.map +1 -1
  120. package/dist/helpers/inbox.helpers.d.ts +1 -0
  121. package/dist/helpers/inbox.helpers.d.ts.map +1 -1
  122. package/dist/helpers/learnCard.helpers.d.ts +1 -0
  123. package/dist/helpers/learnCard.helpers.d.ts.map +1 -1
  124. package/dist/helpers/managed-status.helpers.d.ts +7 -0
  125. package/dist/helpers/managed-status.helpers.d.ts.map +1 -0
  126. package/dist/helpers/managed-status.helpers.test.d.ts +2 -0
  127. package/dist/helpers/managed-status.helpers.test.d.ts.map +1 -0
  128. package/dist/helpers/notification-delivery-boundary.helpers.test.d.ts +2 -0
  129. package/dist/helpers/notification-delivery-boundary.helpers.test.d.ts.map +1 -0
  130. package/dist/helpers/notification-webhook-fetch.helpers.d.ts +13 -0
  131. package/dist/helpers/notification-webhook-fetch.helpers.d.ts.map +1 -0
  132. package/dist/helpers/notification-webhook-fetch.helpers.test.d.ts +2 -0
  133. package/dist/helpers/notification-webhook-fetch.helpers.test.d.ts.map +1 -0
  134. package/dist/helpers/notificationQueue.helpers.d.ts.map +1 -1
  135. package/dist/helpers/notifications.helpers.d.ts.map +1 -1
  136. package/dist/helpers/refresh-send-intent.helpers.d.ts +13 -5
  137. package/dist/helpers/refresh-send-intent.helpers.d.ts.map +1 -1
  138. package/dist/helpers/refresh-send-intent.helpers.test.d.ts +2 -0
  139. package/dist/helpers/refresh-send-intent.helpers.test.d.ts.map +1 -0
  140. package/dist/helpers/send-contract.helpers.d.ts +11 -0
  141. package/dist/helpers/send-contract.helpers.d.ts.map +1 -0
  142. package/dist/helpers/status-list.helpers.d.ts +12 -1
  143. package/dist/helpers/status-list.helpers.d.ts.map +1 -1
  144. package/dist/index.js +2 -2
  145. package/dist/models/ConsentFlowContract.d.ts.map +1 -1
  146. package/dist/models/ConsentFlowContractVersion.d.ts +12 -0
  147. package/dist/models/ConsentFlowContractVersion.d.ts.map +1 -0
  148. package/dist/models/ConsentFlowTerms.d.ts.map +1 -1
  149. package/dist/models/Credential.d.ts +2 -0
  150. package/dist/models/Credential.d.ts.map +1 -1
  151. package/dist/models/CredentialRefresh.d.ts +5 -0
  152. package/dist/models/CredentialRefresh.d.ts.map +1 -1
  153. package/dist/models/Integration.d.ts +1 -1
  154. package/dist/models/Profile.d.ts.map +1 -1
  155. package/dist/models/campaign-constraints.d.ts.map +1 -1
  156. package/dist/models/index.d.ts +1 -0
  157. package/dist/models/index.d.ts.map +1 -1
  158. package/dist/openapi.d.ts.map +1 -1
  159. package/dist/publish-metafile.json +1 -1
  160. package/dist/routes/activity.d.ts +15 -5
  161. package/dist/routes/activity.d.ts.map +1 -1
  162. package/dist/routes/app-store.d.ts +15 -5
  163. package/dist/routes/app-store.d.ts.map +1 -1
  164. package/dist/routes/auth-grants.d.ts +12 -2
  165. package/dist/routes/auth-grants.d.ts.map +1 -1
  166. package/dist/routes/bench.d.ts +11 -1
  167. package/dist/routes/bench.d.ts.map +1 -1
  168. package/dist/routes/boosts.d.ts +70 -15
  169. package/dist/routes/boosts.d.ts.map +1 -1
  170. package/dist/routes/campaigns.d.ts +183 -51
  171. package/dist/routes/campaigns.d.ts.map +1 -1
  172. package/dist/routes/claim-hooks.d.ts +11 -1
  173. package/dist/routes/claim-hooks.d.ts.map +1 -1
  174. package/dist/routes/contact-methods.d.ts +11 -1
  175. package/dist/routes/contact-methods.d.ts.map +1 -1
  176. package/dist/routes/contracts.d.ts +374 -8
  177. package/dist/routes/contracts.d.ts.map +1 -1
  178. package/dist/routes/credential-input-privacy.test.d.ts +2 -0
  179. package/dist/routes/credential-input-privacy.test.d.ts.map +1 -0
  180. package/dist/routes/credential-refreshes.d.ts +210 -1
  181. package/dist/routes/credential-refreshes.d.ts.map +1 -1
  182. package/dist/routes/credential-share-previews.d.ts +11 -1
  183. package/dist/routes/credential-share-previews.d.ts.map +1 -1
  184. package/dist/routes/credentials.d.ts +132 -3
  185. package/dist/routes/credentials.d.ts.map +1 -1
  186. package/dist/routes/did-metadata.d.ts +11 -1
  187. package/dist/routes/did-metadata.d.ts.map +1 -1
  188. package/dist/routes/federation.d.ts +11 -1
  189. package/dist/routes/federation.d.ts.map +1 -1
  190. package/dist/routes/inbox.d.ts +54 -19
  191. package/dist/routes/inbox.d.ts.map +1 -1
  192. package/dist/routes/index.d.ts +100 -1
  193. package/dist/routes/index.d.ts.map +1 -1
  194. package/dist/routes/integrations.d.ts +14 -4
  195. package/dist/routes/integrations.d.ts.map +1 -1
  196. package/dist/routes/presentations.d.ts +11 -1
  197. package/dist/routes/presentations.d.ts.map +1 -1
  198. package/dist/routes/profile-manager.d.ts +11 -1
  199. package/dist/routes/profile-manager.d.ts.map +1 -1
  200. package/dist/routes/profiles.d.ts +11 -1
  201. package/dist/routes/profiles.d.ts.map +1 -1
  202. package/dist/routes/public-share-links.d.ts +22 -2
  203. package/dist/routes/public-share-links.d.ts.map +1 -1
  204. package/dist/routes/share-links.d.ts +36 -16
  205. package/dist/routes/share-links.d.ts.map +1 -1
  206. package/dist/routes/skill-frameworks.d.ts +11 -1
  207. package/dist/routes/skill-frameworks.d.ts.map +1 -1
  208. package/dist/routes/skills.d.ts +11 -1
  209. package/dist/routes/skills.d.ts.map +1 -1
  210. package/dist/routes/storage.d.ts +37 -23
  211. package/dist/routes/storage.d.ts.map +1 -1
  212. package/dist/routes/test.d.ts +79 -3
  213. package/dist/routes/test.d.ts.map +1 -1
  214. package/dist/routes/utilities.d.ts +11 -1
  215. package/dist/routes/utilities.d.ts.map +1 -1
  216. package/dist/routes/workflows.d.ts +11 -1
  217. package/dist/routes/workflows.d.ts.map +1 -1
  218. package/dist/services/delivery/adapters/postmark.adapter.d.ts +3 -0
  219. package/dist/services/delivery/adapters/postmark.adapter.d.ts.map +1 -1
  220. package/dist/services/delivery/delivery.service.d.ts +10 -0
  221. package/dist/services/delivery/delivery.service.d.ts.map +1 -1
  222. package/dist/types/activity.d.ts +3 -3
  223. package/dist/types/app-manifest.d.ts +10 -10
  224. package/dist/types/campaign.d.ts +13 -1
  225. package/dist/types/campaign.d.ts.map +1 -1
  226. package/dist/types/consentflowcontract.d.ts +175 -7
  227. package/dist/types/consentflowcontract.d.ts.map +1 -1
  228. package/dist/types/credential-refresh.d.ts +27 -0
  229. package/dist/types/credential-refresh.d.ts.map +1 -1
  230. package/dist/types/credential.d.ts +5 -0
  231. package/dist/types/credential.d.ts.map +1 -1
  232. package/dist/types/integration.d.ts +3 -3
  233. package/lambda.ts +44 -14
  234. package/lambdaApp.ts +20 -0
  235. package/package.json +20 -19
  236. package/project.json +5 -0
  237. package/scripts/migrate-consent-flow-versions.ts +9 -0
  238. package/scripts/report-send-template-exposure.ts +47 -0
  239. package/scripts/verify-python-contracts.ts +16 -1
  240. package/serverless-local.yml +15 -2
  241. package/serverless.function-env.cjs +4 -0
  242. package/serverless.local.yml +12 -0
  243. package/serverless.yml +48 -3
  244. package/src/accesslayer/boost/create.ts +62 -7
  245. package/src/accesslayer/campaign/README.md +275 -6
  246. package/src/accesslayer/campaign/audience.ts +39 -7
  247. package/src/accesslayer/campaign/create.ts +4 -2
  248. package/src/accesslayer/campaign/delivery.ts +66 -0
  249. package/src/accesslayer/campaign/dispatch.test.ts +59 -0
  250. package/src/accesslayer/campaign/dispatch.ts +172 -0
  251. package/src/accesslayer/campaign/email.test.ts +73 -0
  252. package/src/accesslayer/campaign/email.ts +91 -0
  253. package/src/accesslayer/campaign/preferences.ts +53 -0
  254. package/src/accesslayer/campaign/read.ts +3 -1
  255. package/src/accesslayer/campaign/state.ts +1 -1
  256. package/src/accesslayer/campaign/test.test.ts +31 -0
  257. package/src/accesslayer/campaign/test.ts +75 -0
  258. package/src/accesslayer/campaign/update.ts +15 -4
  259. package/src/accesslayer/consentflowcontract/create.ts +20 -1
  260. package/src/accesslayer/consentflowcontract/delete.ts +121 -3
  261. package/src/accesslayer/consentflowcontract/read.ts +15 -9
  262. package/src/accesslayer/consentflowcontract/relationships/create.ts +70 -36
  263. package/src/accesslayer/consentflowcontract/relationships/read.ts +305 -73
  264. package/src/accesslayer/consentflowcontract/relationships/smartResume.ts +1 -1
  265. package/src/accesslayer/consentflowcontract/relationships/update.ts +269 -98
  266. package/src/accesslayer/consentflowcontract/versions.ts +790 -0
  267. package/src/accesslayer/credential/create.ts +33 -9
  268. package/src/accesslayer/credential/delete.ts +45 -0
  269. package/src/accesslayer/credential/relationships/create.ts +102 -47
  270. package/src/accesslayer/credential/relationships/update.ts +8 -116
  271. package/src/accesslayer/credential-refresh/read.ts +26 -2
  272. package/src/accesslayer/credential-refresh/update.ts +6 -2
  273. package/src/accesslayer/inbox-credential/create.ts +7 -1
  274. package/src/accesslayer/inbox-credential/refresh.ts +14 -4
  275. package/src/campaign-unsubscribe.test.ts +158 -0
  276. package/src/campaign-unsubscribe.ts +86 -0
  277. package/src/config/environment.test.ts +52 -0
  278. package/src/config/environment.ts +58 -0
  279. package/src/config/serverlessFunctionEnv.test.ts +59 -0
  280. package/src/credential-refresh.ts +1 -0
  281. package/src/docker-entry.ts +26 -1
  282. package/src/helpers/boost-storage.helpers.test.ts +107 -41
  283. package/src/helpers/boost.helpers.ts +88 -40
  284. package/src/helpers/campaign-app-origin.helpers.ts +25 -0
  285. package/src/helpers/campaign-email.helpers.ts +113 -0
  286. package/src/helpers/campaign-notifications.helpers.ts +127 -0
  287. package/src/helpers/campaign-queue.helpers.test.ts +442 -0
  288. package/src/helpers/campaign-queue.helpers.ts +122 -0
  289. package/src/helpers/campaign-unsubscribe-page.ts +107 -0
  290. package/src/helpers/campaign-unsubscribe.helpers.ts +56 -0
  291. package/src/helpers/campaign-webhook.helpers.test.ts +137 -0
  292. package/src/helpers/consentflow-deadline.helpers.ts +22 -0
  293. package/src/helpers/consentflow-legacy-migration.helpers.ts +179 -0
  294. package/src/helpers/contract-events.helpers.ts +35 -3
  295. package/src/helpers/contract-requests.helpers.ts +1 -1
  296. package/src/helpers/contract.helpers.ts +5 -1
  297. package/src/helpers/credential-display.helpers.test.ts +68 -0
  298. package/src/helpers/credential-display.helpers.ts +15 -0
  299. package/src/helpers/credential-refresh-email.helpers.ts +5 -12
  300. package/src/helpers/credential-refresh-materiality.helpers.test.ts +138 -1
  301. package/src/helpers/credential-refresh-materiality.helpers.ts +62 -1
  302. package/src/helpers/credential-refresh-proof.helpers.test.ts +1 -1
  303. package/src/helpers/credential-refresh-proof.helpers.ts +2 -2
  304. package/src/helpers/credential-refresh.helpers.ts +1166 -376
  305. package/src/helpers/credential-status-mutation.helpers.test.ts +155 -0
  306. package/src/helpers/credential-status-mutation.helpers.ts +166 -0
  307. package/src/helpers/credential.helpers.ts +19 -11
  308. package/src/helpers/finalize-inbox.helpers.ts +1 -1
  309. package/src/helpers/inbox-refresh.helpers.ts +34 -8
  310. package/src/helpers/inbox.helpers.ts +2 -0
  311. package/src/helpers/learnCard.helpers.ts +23 -0
  312. package/src/helpers/managed-status.helpers.test.ts +101 -0
  313. package/src/helpers/managed-status.helpers.ts +147 -0
  314. package/src/helpers/notification-delivery-boundary.helpers.test.ts +114 -0
  315. package/src/helpers/notification-webhook-fetch.helpers.test.ts +228 -0
  316. package/src/helpers/notification-webhook-fetch.helpers.ts +166 -0
  317. package/src/helpers/notificationQueue.helpers.ts +5 -0
  318. package/src/helpers/notifications.helpers.ts +19 -12
  319. package/src/helpers/refresh-send-intent.helpers.test.ts +60 -0
  320. package/src/helpers/refresh-send-intent.helpers.ts +81 -18
  321. package/src/helpers/send-contract.helpers.ts +36 -0
  322. package/src/helpers/status-list.helpers.test.ts +29 -12
  323. package/src/helpers/status-list.helpers.ts +329 -20
  324. package/src/models/ConsentFlowContract.ts +3 -0
  325. package/src/models/ConsentFlowContractVersion.ts +50 -0
  326. package/src/models/ConsentFlowTerms.ts +4 -0
  327. package/src/models/Credential.ts +2 -0
  328. package/src/models/CredentialRefresh.ts +2 -0
  329. package/src/models/Profile.ts +2 -0
  330. package/src/models/campaign-constraints.ts +13 -8
  331. package/src/models/index.ts +2 -0
  332. package/src/openapi.ts +21 -0
  333. package/src/routes/app-store.ts +2 -1
  334. package/src/routes/boosts.ts +219 -137
  335. package/src/routes/campaigns.ts +98 -19
  336. package/src/routes/contracts.ts +433 -115
  337. package/src/routes/credential-input-privacy.test.ts +92 -0
  338. package/src/routes/credential-refreshes.ts +273 -2
  339. package/src/routes/federation.ts +7 -2
  340. package/src/routes/inbox.ts +6 -1
  341. package/src/routes/index.ts +31 -2
  342. package/src/routes/workflows.ts +61 -46
  343. package/src/services/delivery/adapters/postmark.adapter.test.ts +70 -1
  344. package/src/services/delivery/adapters/postmark.adapter.ts +84 -11
  345. package/src/services/delivery/delivery.service.ts +4 -0
  346. package/src/types/campaign.ts +14 -1
  347. package/src/types/consentflowcontract.ts +43 -2
  348. package/src/types/credential-refresh.ts +11 -1
  349. package/src/types/credential.ts +2 -0
  350. package/test/boost-status-cleanup.spec.ts +123 -0
  351. package/test/campaigns-email.unit.spec.ts +268 -0
  352. package/test/campaigns.spec.ts +804 -30
  353. package/test/consent-autoboost-idempotency.spec.ts +432 -0
  354. package/test/consent-data-boundaries.spec.ts +322 -26
  355. package/test/consent-legacy-migration.spec.ts +315 -0
  356. package/test/consent-recipients.spec.ts +7 -7
  357. package/test/consent-version-updates.spec.ts +761 -0
  358. package/test/consentflow.spec.ts +698 -226
  359. package/test/contract-requests.spec.ts +55 -9
  360. package/test/credential-refresh-allocation.spec.ts +212 -14
  361. package/test/credential-refresh-email.spec.ts +6 -10
  362. package/test/credential-refresh-endpoint.spec.ts +3 -0
  363. package/test/credential-refresh-publication.spec.ts +52 -15
  364. package/test/credential-storage.neo4j.spec.ts +33 -6
  365. package/test/helpers/legacy-autoboost.ts +48 -0
  366. package/test/holder-mode-send.spec.ts +710 -0
  367. package/test/inbox-refresh.spec.ts +105 -0
  368. package/test/inbox-security.e2e.ts +18 -22
  369. package/test/managed-status-revocation.spec.ts +970 -0
  370. package/test/notifications-worker.spec.ts +31 -25
  371. package/test/refresh-send.spec.ts +334 -5
  372. package/test/smart-resume-consent.spec.ts +1 -1
  373. package/test/verification/campaigns.ts +40 -0
  374. package/vitest.campaigns.config.ts +2 -0
  375. package/vitest.config.ts +14 -0
@@ -14,11 +14,13 @@ export declare const getConsentContractForListingByScopeHashCached: (listingId:
14
14
  categories: Record<string, {
15
15
  required: boolean;
16
16
  defaultEnabled?: boolean | undefined;
17
+ reason?: string | undefined;
17
18
  }>;
18
19
  };
19
20
  personal: Record<string, {
20
21
  required: boolean;
21
22
  defaultEnabled?: boolean | undefined;
23
+ reason?: string | undefined;
22
24
  }>;
23
25
  anonymize?: boolean | undefined;
24
26
  };
@@ -27,11 +29,13 @@ export declare const getConsentContractForListingByScopeHashCached: (listingId:
27
29
  categories: Record<string, {
28
30
  required: boolean;
29
31
  defaultEnabled?: boolean | undefined;
32
+ reason?: string | undefined;
30
33
  }>;
31
34
  };
32
35
  personal: Record<string, {
33
36
  required: boolean;
34
37
  defaultEnabled?: boolean | undefined;
38
+ reason?: string | undefined;
35
39
  }>;
36
40
  };
37
41
  };
@@ -47,6 +51,62 @@ export declare const getConsentContractForListingByScopeHashCached: (listingId:
47
51
  expiresAt?: string | undefined;
48
52
  audienceVersion?: number | undefined;
49
53
  hasConsented?: boolean | undefined;
54
+ currentVersion?: number | undefined;
55
+ status?: "active" | "retired" | undefined;
56
+ version?: number | undefined;
57
+ latestUpdate?: {
58
+ fromVersion: number;
59
+ toVersion: number;
60
+ kind: "relaxed" | "expanded_optional" | "requires_consent";
61
+ diff: {
62
+ added: {
63
+ area: "read" | "write";
64
+ type: "personal" | "credential";
65
+ key: string;
66
+ required: boolean;
67
+ reason?: string | undefined;
68
+ }[];
69
+ removed: {
70
+ area: "read" | "write";
71
+ type: "personal" | "credential";
72
+ key: string;
73
+ required: boolean;
74
+ reason?: string | undefined;
75
+ }[];
76
+ changed: {
77
+ area: "read" | "write";
78
+ type: "personal" | "credential";
79
+ key: string;
80
+ required: boolean;
81
+ reason?: string | undefined;
82
+ }[];
83
+ details?: {
84
+ field: "description" | "name" | "subtitle" | "reasonForAccessing" | "image" | "needsGuardianConsent" | "redirectUrl" | "frontDoorBoostUri" | "expiresAt" | "autoboosts" | "writers";
85
+ before?: string | boolean | string[] | undefined;
86
+ after?: string | boolean | string[] | undefined;
87
+ }[] | undefined;
88
+ };
89
+ createdAt: string;
90
+ preview: {
91
+ headline: string;
92
+ subhead: string;
93
+ rows: {
94
+ scope: {
95
+ area: "read" | "write";
96
+ type: "personal" | "credential";
97
+ key: string;
98
+ required: boolean;
99
+ reason?: string | undefined;
100
+ };
101
+ change: "added" | "removed" | "changed";
102
+ label: string;
103
+ subtitle: string;
104
+ }[];
105
+ primaryLabel: string;
106
+ };
107
+ reason?: string | undefined;
108
+ reconsentDeadline?: string | undefined;
109
+ } | undefined;
50
110
  } | null>;
51
111
  export declare const invalidateConsentContractForListingByScopeHashCache: (listingId: string, scopeHash: string) => void;
52
112
  export declare const readAppStoreListingByIdCached: (listingId: string) => Promise<{
@@ -82,7 +142,7 @@ export declare const getIntegrationForListingCached: (listingId: string) => Prom
82
142
  name: string;
83
143
  publishableKey: string;
84
144
  whitelistedDomains: string[];
85
- status: "active" | "paused" | "setup";
145
+ status: "active" | "setup" | "paused";
86
146
  description?: string | undefined;
87
147
  guideType?: string | undefined;
88
148
  guideState?: Record<string, any> | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"app-store.caches.d.ts","sourceRoot":"","sources":["../../src/cache/app-store.caches.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAmCnE,eAAO,MAAM,wBAAwB,GACjC,WAAW,MAAM,EACjB,eAAe,MAAM,EACrB,QAAQ,MAAM;;;;SAQjB,CAAC;AAEF,eAAO,MAAM,8BAA8B,GACvC,WAAW,MAAM,EACjB,eAAe,MAAM,EACrB,QAAQ,MAAM,SAGjB,CAAC;AAEF,eAAO,MAAM,6CAA6C,GACtD,WAAW,MAAM,EACjB,WAAW,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAQpB,CAAC;AAEF,eAAO,MAAM,mDAAmD,GAC5D,WAAW,MAAM,EACjB,WAAW,MAAM,SAGpB,CAAC;AAEF,eAAO,MAAM,6BAA6B,GAAU,WAAW,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;SAMpE,CAAC;AAEF,eAAO,MAAM,8BAA8B,GAAU,WAAW,MAAM;;;;;;;;;;;SAMrE,C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AO5F,CAAC;AAEF,eAAO,MAAM,sCAAsC,GAAI,WAAW,MAAM,SAEvE,CAAC;AAEF,eAAO,MAAM,8CAA8C,GAAU,eAAe,MAAM;;;;;;;;;cAMzF,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { type FastifyPluginAsync } from 'fastify';
2
+ export declare const campaignUnsubscribeFastifyPlugin: FastifyPluginAsync;
3
+ export declare const app: import("fastify").FastifyInstance<import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, import("fastify").FastifyBaseLogger, import("fastify").FastifyTypeProviderDefault> & PromiseLike<import("fastify").FastifyInstance<import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, import("fastify").FastifyBaseLogger, import("fastify").FastifyTypeProviderDefault>> & {
4
+ __linterBrands: "SafePromiseLike";
5
+ };
6
+ export default app;
7
+ //# sourceMappingURL=campaign-unsubscribe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"campaign-unsubscribe.d.ts","sourceRoot":"","sources":["../src/campaign-unsubscribe.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAM3D,eAAO,MAAM,gCAAgC,EAAE,kBA2E9C,CAAC;AAEF,eAAO,MAAM,GAAG;;CAA8C,CAAC;AAE/D,eAAe,GAAG,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=campaign-unsubscribe.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"campaign-unsubscribe.test.d.ts","sourceRoot":"","sources":["../src/campaign-unsubscribe.test.ts"],"names":[],"mappings":""}
@@ -18,6 +18,13 @@ export declare const brainServiceEnvironmentShape: {
18
18
  SIGNING_AUTHORITY_ENDPOINT: z.ZodPreprocess<z.ZodOptional<z.ZodURL>, unknown>;
19
19
  APP_STORE_ADMIN_PROFILE_IDS: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
20
20
  CAMPAIGN_ADMIN_PROFILE_IDS: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
21
+ CAMPAIGN_QUEUE_URL: z.ZodPreprocess<z.ZodOptional<z.ZodURL>, unknown>;
22
+ CAMPAIGN_UNSUBSCRIBE_SECRET: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
23
+ CAMPAIGN_APP_ORIGINS: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
24
+ POSTMARK_BROADCAST_STREAM: z.ZodDefault<z.ZodString>;
25
+ CAMPAIGN_EMAIL_PAGE_SIZE: z.ZodPreprocess<z.ZodDefault<z.ZodCoercedNumber<unknown>>, unknown>;
26
+ CAMPAIGN_DISPATCH_PAGE_SIZE: z.ZodPreprocess<z.ZodDefault<z.ZodCoercedNumber<unknown>>, unknown>;
27
+ CAMPAIGN_DISPATCH_DELAY_SECONDS: z.ZodPreprocess<z.ZodDefault<z.ZodCoercedNumber<unknown>>, unknown>;
21
28
  SKILL_FRAMEWORK_ADMIN_PROFILE_IDS: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
22
29
  SKILL_FRAMEWORK_SEED_OWNER_PROFILE_ID: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
23
30
  TRUSTED_BRAIN_SERVICES: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
@@ -87,6 +94,7 @@ export declare const brainServiceEnvironmentShape: {
87
94
  SKILL_SEMANTIC_SEARCH_RATE_LIMIT_PER_MIN: z.ZodPreprocess<z.ZodOptional<z.ZodCoercedNumber<unknown>>, unknown>;
88
95
  BITSTRING_STATUS_LIST_SIZE: z.ZodPreprocess<z.ZodOptional<z.ZodCoercedNumber<unknown>>, unknown>;
89
96
  CREDENTIAL_REFRESH_DIGEST_SECRET: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
97
+ CREDENTIAL_REFRESH_DIGEST_PREVIOUS_KEYS: z.ZodPipe<z.ZodDefault<z.ZodString>, z.ZodTransform<Record<string, string>, string>>;
90
98
  SHARE_LINK_REQUEST_HASH_SECRET: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
91
99
  CREDENTIAL_REFRESH_ENABLED: z.ZodDefault<z.ZodPreprocess<z.ZodOptional<z.ZodPipe<z.ZodEnum<{
92
100
  0: "0";
@@ -221,6 +229,13 @@ export declare const brainServiceEnvironmentSchema: z.ZodPipe<z.ZodObject<{
221
229
  SIGNING_AUTHORITY_ENDPOINT: z.ZodPreprocess<z.ZodOptional<z.ZodURL>, unknown>;
222
230
  APP_STORE_ADMIN_PROFILE_IDS: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
223
231
  CAMPAIGN_ADMIN_PROFILE_IDS: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
232
+ CAMPAIGN_QUEUE_URL: z.ZodPreprocess<z.ZodOptional<z.ZodURL>, unknown>;
233
+ CAMPAIGN_UNSUBSCRIBE_SECRET: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
234
+ CAMPAIGN_APP_ORIGINS: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
235
+ POSTMARK_BROADCAST_STREAM: z.ZodDefault<z.ZodString>;
236
+ CAMPAIGN_EMAIL_PAGE_SIZE: z.ZodPreprocess<z.ZodDefault<z.ZodCoercedNumber<unknown>>, unknown>;
237
+ CAMPAIGN_DISPATCH_PAGE_SIZE: z.ZodPreprocess<z.ZodDefault<z.ZodCoercedNumber<unknown>>, unknown>;
238
+ CAMPAIGN_DISPATCH_DELAY_SECONDS: z.ZodPreprocess<z.ZodDefault<z.ZodCoercedNumber<unknown>>, unknown>;
224
239
  SKILL_FRAMEWORK_ADMIN_PROFILE_IDS: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
225
240
  SKILL_FRAMEWORK_SEED_OWNER_PROFILE_ID: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
226
241
  TRUSTED_BRAIN_SERVICES: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
@@ -290,6 +305,7 @@ export declare const brainServiceEnvironmentSchema: z.ZodPipe<z.ZodObject<{
290
305
  SKILL_SEMANTIC_SEARCH_RATE_LIMIT_PER_MIN: z.ZodPreprocess<z.ZodOptional<z.ZodCoercedNumber<unknown>>, unknown>;
291
306
  BITSTRING_STATUS_LIST_SIZE: z.ZodPreprocess<z.ZodOptional<z.ZodCoercedNumber<unknown>>, unknown>;
292
307
  CREDENTIAL_REFRESH_DIGEST_SECRET: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
308
+ CREDENTIAL_REFRESH_DIGEST_PREVIOUS_KEYS: z.ZodPipe<z.ZodDefault<z.ZodString>, z.ZodTransform<Record<string, string>, string>>;
293
309
  SHARE_LINK_REQUEST_HASH_SECRET: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
294
310
  CREDENTIAL_REFRESH_ENABLED: z.ZodDefault<z.ZodPreprocess<z.ZodOptional<z.ZodPipe<z.ZodEnum<{
295
311
  0: "0";
@@ -404,8 +420,13 @@ export declare const brainServiceEnvironmentSchema: z.ZodPipe<z.ZodObject<{
404
420
  NEO4J_URI: string;
405
421
  NEO4J_USERNAME: string;
406
422
  NEO4J_PASSWORD: string;
423
+ POSTMARK_BROADCAST_STREAM: string;
424
+ CAMPAIGN_EMAIL_PAGE_SIZE: number;
425
+ CAMPAIGN_DISPATCH_PAGE_SIZE: number;
426
+ CAMPAIGN_DISPATCH_DELAY_SECONDS: number;
407
427
  SKILL_EMBEDDING_BEDROCK_ENABLED: boolean;
408
428
  SKILL_EMBEDDING_BEDROCK_READ_ENABLED: boolean;
429
+ CREDENTIAL_REFRESH_DIGEST_PREVIOUS_KEYS: Record<string, string>;
409
430
  CREDENTIAL_REFRESH_ENABLED: boolean;
410
431
  CREDENTIAL_REFRESH_NOTIFICATION_WINDOW_HOURS: number;
411
432
  IS_OFFLINE: boolean;
@@ -429,6 +450,9 @@ export declare const brainServiceEnvironmentSchema: z.ZodPipe<z.ZodObject<{
429
450
  SIGNING_AUTHORITY_ENDPOINT?: string | undefined;
430
451
  APP_STORE_ADMIN_PROFILE_IDS?: string | undefined;
431
452
  CAMPAIGN_ADMIN_PROFILE_IDS?: string | undefined;
453
+ CAMPAIGN_QUEUE_URL?: string | undefined;
454
+ CAMPAIGN_UNSUBSCRIBE_SECRET?: string | undefined;
455
+ CAMPAIGN_APP_ORIGINS?: string | undefined;
432
456
  SKILL_FRAMEWORK_ADMIN_PROFILE_IDS?: string | undefined;
433
457
  SKILL_FRAMEWORK_SEED_OWNER_PROFILE_ID?: string | undefined;
434
458
  TRUSTED_BRAIN_SERVICES?: string | undefined;
@@ -490,8 +514,13 @@ export declare const brainServiceEnvironmentSchema: z.ZodPipe<z.ZodObject<{
490
514
  NEO4J_URI: string;
491
515
  NEO4J_USERNAME: string;
492
516
  NEO4J_PASSWORD: string;
517
+ POSTMARK_BROADCAST_STREAM: string;
518
+ CAMPAIGN_EMAIL_PAGE_SIZE: number;
519
+ CAMPAIGN_DISPATCH_PAGE_SIZE: number;
520
+ CAMPAIGN_DISPATCH_DELAY_SECONDS: number;
493
521
  SKILL_EMBEDDING_BEDROCK_ENABLED: boolean;
494
522
  SKILL_EMBEDDING_BEDROCK_READ_ENABLED: boolean;
523
+ CREDENTIAL_REFRESH_DIGEST_PREVIOUS_KEYS: Record<string, string>;
495
524
  CREDENTIAL_REFRESH_ENABLED: boolean;
496
525
  CREDENTIAL_REFRESH_NOTIFICATION_WINDOW_HOURS: number;
497
526
  IS_OFFLINE: boolean;
@@ -516,6 +545,9 @@ export declare const brainServiceEnvironmentSchema: z.ZodPipe<z.ZodObject<{
516
545
  SIGNING_AUTHORITY_ENDPOINT?: string | undefined;
517
546
  APP_STORE_ADMIN_PROFILE_IDS?: string | undefined;
518
547
  CAMPAIGN_ADMIN_PROFILE_IDS?: string | undefined;
548
+ CAMPAIGN_QUEUE_URL?: string | undefined;
549
+ CAMPAIGN_UNSUBSCRIBE_SECRET?: string | undefined;
550
+ CAMPAIGN_APP_ORIGINS?: string | undefined;
519
551
  SKILL_FRAMEWORK_ADMIN_PROFILE_IDS?: string | undefined;
520
552
  SKILL_FRAMEWORK_SEED_OWNER_PROFILE_ID?: string | undefined;
521
553
  TRUSTED_BRAIN_SERVICES?: string | undefined;
@@ -619,6 +651,7 @@ declare const notificationRuntimeEnvironmentSchema: z.ZodPipe<z.ZodObject<{
619
651
  export type NotificationRuntimeEnvironment = z.output<typeof notificationRuntimeEnvironmentSchema>;
620
652
  export declare const getNotificationRuntimeEnvironment: () => NotificationRuntimeEnvironment;
621
653
  declare const credentialRefreshRuntimeEnvironmentSchema: z.ZodObject<{
654
+ CREDENTIAL_REFRESH_DIGEST_KEY_VERSION: z.ZodDefault<z.ZodString>;
622
655
  NODE_ENV: z.ZodDefault<z.ZodEnum<{
623
656
  production: "production";
624
657
  development: "development";
@@ -635,6 +668,7 @@ declare const credentialRefreshRuntimeEnvironmentSchema: z.ZodObject<{
635
668
  CREDENTIAL_REFRESH_NOTIFICATION_WINDOW_HOURS: z.ZodPreprocess<z.ZodDefault<z.ZodCoercedNumber<unknown>>, unknown>;
636
669
  }, z.core.$strip>;
637
670
  export type CredentialRefreshRuntimeEnvironment = z.output<typeof credentialRefreshRuntimeEnvironmentSchema>;
671
+ export declare const getCredentialRefreshPreviousDigestKeys: () => Record<string, string>;
638
672
  export declare const getCredentialRefreshRuntimeEnvironment: () => CredentialRefreshRuntimeEnvironment;
639
673
  export declare const getShareLinkRequestHashRuntimeEnvironment: () => {
640
674
  NODE_ENV: "production" | "development" | "test";
@@ -677,8 +711,13 @@ export declare const environment: {
677
711
  NEO4J_URI: string;
678
712
  NEO4J_USERNAME: string;
679
713
  NEO4J_PASSWORD: string;
714
+ POSTMARK_BROADCAST_STREAM: string;
715
+ CAMPAIGN_EMAIL_PAGE_SIZE: number;
716
+ CAMPAIGN_DISPATCH_PAGE_SIZE: number;
717
+ CAMPAIGN_DISPATCH_DELAY_SECONDS: number;
680
718
  SKILL_EMBEDDING_BEDROCK_ENABLED: boolean;
681
719
  SKILL_EMBEDDING_BEDROCK_READ_ENABLED: boolean;
720
+ CREDENTIAL_REFRESH_DIGEST_PREVIOUS_KEYS: Record<string, string>;
682
721
  CREDENTIAL_REFRESH_ENABLED: boolean;
683
722
  CREDENTIAL_REFRESH_NOTIFICATION_WINDOW_HOURS: number;
684
723
  IS_OFFLINE: boolean;
@@ -702,6 +741,9 @@ export declare const environment: {
702
741
  SIGNING_AUTHORITY_ENDPOINT?: string | undefined;
703
742
  APP_STORE_ADMIN_PROFILE_IDS?: string | undefined;
704
743
  CAMPAIGN_ADMIN_PROFILE_IDS?: string | undefined;
744
+ CAMPAIGN_QUEUE_URL?: string | undefined;
745
+ CAMPAIGN_UNSUBSCRIBE_SECRET?: string | undefined;
746
+ CAMPAIGN_APP_ORIGINS?: string | undefined;
705
747
  SKILL_FRAMEWORK_ADMIN_PROFILE_IDS?: string | undefined;
706
748
  SKILL_FRAMEWORK_SEED_OWNER_PROFILE_ID?: string | undefined;
707
749
  TRUSTED_BRAIN_SERVICES?: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/config/environment.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AAEvB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA+BxB,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoGhB,CAAC;AAE1B,KAAK,yBAAyB,GAAG;IAC7B,QAAQ,EAAE,M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CAAyC;;;;;;;;;;;;;;;;iBA0BzC,CAAC;AAEP,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,MAAM,CACtD,OAAO,yCAAyC,CACnD,CAAC;AAGF,eAAO,MAAM,sCAAsC,QAAO,MAAM,CAAC,MAAM,EAAE,MAAM,CASlC,CAAC;AAG9C,eAAO,MAAM,sCAAsC,QAAO,mCAKpD,CAAC;AAQP,eAAO,MAAM,yCAAyC;;;CAKhD,CAAC;AAEP,QAAA,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;iBAStC,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAG/F,eAAO,MAAM,+BAA+B,QAAO,4BAK7C,CAAC;AAEP,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAErF,eAAO,MAAM,4BAA4B,GACrC,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,eAA8B,KAC/B,uBAoBF,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA4C,CAAC"}
@@ -2,6 +2,7 @@ import 'dotenv/config';
2
2
  export declare const base: Record<string, string>;
3
3
  export declare const stages: {
4
4
  dev: {
5
+ CAMPAIGN_APP_ORIGINS: string;
5
6
  CLIENT_APP_DOMAIN_NAME: string;
6
7
  CREDENTIAL_REFRESH_ENABLED: string;
7
8
  CREDENTIAL_REFRESH_NOTIFICATION_WINDOW_HOURS: string;
@@ -36,6 +37,7 @@ export declare const stages: {
36
37
  SKILL_EMBEDDING_GOOGLE_MODEL: string;
37
38
  };
38
39
  production: {
40
+ CAMPAIGN_APP_ORIGINS: string;
39
41
  CLIENT_APP_DOMAIN_NAME: string;
40
42
  CREDENTIAL_REFRESH_ENABLED: string;
41
43
  CREDENTIAL_REFRESH_NOTIFICATION_WINDOW_HOURS: string;
@@ -70,6 +72,7 @@ export declare const stages: {
70
72
  SKILL_EMBEDDING_GOOGLE_MODEL: string;
71
73
  };
72
74
  'scouts.dev': {
75
+ CAMPAIGN_APP_ORIGINS: string;
73
76
  CLIENT_APP_DOMAIN_NAME: string;
74
77
  CREDENTIAL_REFRESH_ENABLED: string;
75
78
  CREDENTIAL_REFRESH_NOTIFICATION_WINDOW_HOURS: string;
@@ -99,6 +102,7 @@ export declare const stages: {
99
102
  SKILL_EMBEDDING_GOOGLE_MODEL: string;
100
103
  };
101
104
  'scouts.production': {
105
+ CAMPAIGN_APP_ORIGINS: string;
102
106
  CLIENT_APP_DOMAIN_NAME: string;
103
107
  CREDENTIAL_REFRESH_ENABLED: string;
104
108
  CREDENTIAL_REFRESH_NOTIFICATION_WINDOW_HOURS: string;
@@ -1 +1 @@
1
- {"version":3,"file":"stageConfig.d.ts","sourceRoot":"","sources":["../../src/config/stageConfig.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AASvB,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAc,CAAC;AAEvD,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAM+B,CAAC;AAInD,eAAO,MAAM,4BAA4B,GAAI,OAAO,MAAM,GAAG,SAAS,KAAG,IAExE,CAAC"}
1
+ {"version":3,"file":"stageConfig.d.ts","sourceRoot":"","sources":["../../src/config/stageConfig.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AASvB,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAc,CAAC;AAEvD,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAM+B,CAAC;AAInD,eAAO,MAAM,4BAA4B,GAAI,OAAO,MAAM,GAAG,SAAS,KAAG,IAExE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"credential-refresh.d.ts","sourceRoot":"","sources":["../src/credential-refresh.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,kBAAkB,EAAgC,MAAM,SAAS,CAAC;AAgBpF,OAAO,EACH,8BAA8B,EAKjC,MAAM,0CAA0C,CAAC;AAclD,OAAO,EAAE,8BAA8B,EAAE,CAAC;AAE1C,eAAO,MAAM,0BAA0B,QAAO,OACyB,CAAC;AAExE,MAAM,MAAM,8BAA8B,GAAG;IAEzC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAmNF,eAAO,MAAM,8BAA8B,EAAE,kBAAkB,CAC3D,8BAA8B,CAkKjC,CAAC;AAEF,eAAO,MAAM,GAAG;;CAAY,CAAC;AAK7B,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"credential-refresh.d.ts","sourceRoot":"","sources":["../src/credential-refresh.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,kBAAkB,EAAgC,MAAM,SAAS,CAAC;AAgBpF,OAAO,EACH,8BAA8B,EAKjC,MAAM,0CAA0C,CAAC;AAclD,OAAO,EAAE,8BAA8B,EAAE,CAAC;AAE1C,eAAO,MAAM,0BAA0B,QAAO,OACyB,CAAC;AAExE,MAAM,MAAM,8BAA8B,GAAG;IAEzC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAmNF,eAAO,MAAM,8BAA8B,EAAE,kBAAkB,CAC3D,8BAA8B,CAmKjC,CAAC;AAEF,eAAO,MAAM,GAAG;;CAAY,CAAC;AAK7B,eAAe,GAAG,CAAC"}
@@ -12,7 +12,7 @@ export declare const isEditableBoost: (boost: BoostInstance) => boolean;
12
12
  export declare const isBoostViewableByClaimLink: (boost: BoostInstance) => Promise<boolean>;
13
13
  export declare const stampIssuanceDate: <T extends UnsignedVC | VC>(credential: T, now?: string) => T;
14
14
  export declare const convertCredentialToBoostTemplateJSON: (credential: VC | UnsignedVC, defaultIssuerDid?: string) => string;
15
- export declare const sendBoost: ({ from, to, boost, credential, domain, skipNotification, autoAcceptCredential, contractTerms, metadata, activityId, integrationId, listingId, }: {
15
+ export declare const sendBoost: ({ from, to, boost, credential, domain, skipNotification, autoAcceptCredential, contractTerms, contractWriterProfileId, allowConsumedOneTime, metadata, activityId, integrationId, listingId, }: {
16
16
  from: CredentialIssuer;
17
17
  to: ProfileType;
18
18
  boost: BoostInstance;
@@ -21,6 +21,8 @@ export declare const sendBoost: ({ from, to, boost, credential, domain, skipNoti
21
21
  skipNotification?: boolean;
22
22
  autoAcceptCredential?: boolean;
23
23
  contractTerms?: DbTermsType;
24
+ contractWriterProfileId?: string;
25
+ allowConsumedOneTime?: boolean;
24
26
  metadata?: Record<string, unknown>;
25
27
  activityId?: string;
26
28
  integrationId?: string;
@@ -33,6 +35,7 @@ export declare const prepareCredentialFromBoost: (boost: BoostInstance, boostUri
33
35
  recipientDid?: string;
34
36
  recipientName?: string;
35
37
  issuerDid?: string;
38
+ credential?: UnsignedVC | VC;
36
39
  }) => Promise<UnsignedVC>;
37
40
  export declare const appendTemplateEvidenceToCredential: (credential: UnsignedVC, templateData?: Record<string, unknown>, allowAutoAppend?: boolean) => UnsignedVC;
38
41
  export declare const resolveBoostByUri: (boostUri: string) => Promise<BoostInstance>;
@@ -1 +1 @@
1
- {"version":3,"file":"boost.helpers.d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AM,KAAG,OAAO,CAAC,aAAa,CAa/E,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const getCampaignAppOrigin: (tenantId: string) => string;
2
+ //# sourceMappingURL=campaign-app-origin.helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"campaign-app-origin.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/campaign-app-origin.helpers.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB,GAAI,UAAU,MAAM,KAAG,MAoBvD,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { Campaign } from '@learncard/types';
2
+ import { PostmarkAdapter } from '../services/delivery/adapters/postmark.adapter';
3
+ export declare const assertCampaignEmailConfigured: () => void;
4
+ export declare const campaignEmailLinks: (campaign: Campaign, unsubscribeId: string) => {
5
+ ctaUrl?: string;
6
+ unsubscribeUrl: string;
7
+ oneClickUrl: string;
8
+ };
9
+ export declare class CampaignEmailDeliveryError extends Error {
10
+ }
11
+ export declare const prepareCampaignEmailDelivery: () => Promise<PostmarkAdapter>;
12
+ export declare const sendCampaignEmail: (campaign: Campaign, profileId: string, test?: boolean, preparedAdapter?: PostmarkAdapter) => Promise<boolean>;
13
+ //# sourceMappingURL=campaign-email.helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"campaign-email.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/campaign-email.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAIjD,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AAKjF,eAAO,MAAM,6BAA6B,QAAO,IAOhD,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAC3B,UAAU,QAAQ,EAClB,eAAe,MAAM,KACtB;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAyBhE,CAAC;AAEF,qBAAa,0BAA2B,SAAQ,KAAK;CAAG;AAGxD,eAAO,MAAM,4BAA4B,QAAa,OAAO,CAAC,eAAe,CAK5E,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC1B,UAAU,QAAQ,EAClB,WAAW,MAAM,EACjB,cAAY,EACZ,kBAAkB,eAAe,KAClC,OAAO,CAAC,OAAO,CAiDjB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { Campaign, LCNNotification } from '@learncard/types';
2
+ export declare const canDispatchCampaign: (campaign: Campaign, now?: string) => boolean;
3
+ export declare const buildCampaignNotification: (campaign: Campaign, recipient: LCNNotification["to"], campaignTestId?: string) => Promise<LCNNotification>;
4
+ export declare const authorizeCampaignNotification: (notification: LCNNotification) => Promise<boolean>;
5
+ export declare const enqueueCampaignNotification: (notification: LCNNotification) => Promise<void>;
6
+ export declare const sendCampaignTestToMe: (campaignId: string, caller: LCNNotification["to"]) => Promise<boolean>;
7
+ //# sourceMappingURL=campaign-notifications.helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"campaign-notifications.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/campaign-notifications.helpers.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAUlE,eAAO,MAAM,mBAAmB,GAAI,UAAU,QAAQ,EAAE,YAA8B,KAAG,OAK1C,CAAC;AAEhD,eAAO,MAAM,yBAAyB,GAClC,UAAU,QAAQ,EAClB,WAAW,eAAe,CAAC,IAAI,CAAC,EAChC,iBAAiB,MAAM,KACxB,OAAO,CAAC,eAAe,CA2BzB,CAAC;AAEF,eAAO,MAAM,6BAA6B,GACtC,cAAc,eAAe,KAC9B,OAAO,CAAC,OAAO,CA0BjB,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAU,cAAc,eAAe,KAAG,OAAO,CAAC,IAAI,CAQ7F,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC7B,YAAY,MAAM,EAClB,QAAQ,eAAe,CAAC,IAAI,CAAC,KAC9B,OAAO,CAAC,OAAO,CA6BjB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { type CampaignDispatchJob } from '../types/campaign';
2
+ export declare const addCampaignDispatchToQueue: (rawJob: CampaignDispatchJob, delaySeconds?: number) => Promise<void>;
3
+ export declare const dispatchCampaign: (campaignId: string, expectedPreviewToken?: string) => Promise<{
4
+ dispatchId: string;
5
+ }>;
6
+ export declare const processCampaignDispatchJob: (rawJob: CampaignDispatchJob) => Promise<void>;
7
+ //# sourceMappingURL=campaign-queue.helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"campaign-queue.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/campaign-queue.helpers.ts"],"names":[],"mappings":"AASA,OAAO,EAAgC,KAAK,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAgBxF,eAAO,MAAM,0BAA0B,GACnC,QAAQ,mBAAmB,EAC3B,qBAAgB,KACjB,OAAO,CAAC,IAAI,CAcd,CAAC;AAEF,eAAO,MAAM,gBAAgB,GACzB,YAAY,MAAM,EAClB,uBAAuB,MAAM,KAC9B,OAAO,CAAC;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,CAsBhC,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAU,QAAQ,mBAAmB,KAAG,OAAO,CAAC,IAAI,CAkDrF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=campaign-queue.helpers.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"campaign-queue.helpers.test.d.ts","sourceRoot":"","sources":["../../src/helpers/campaign-queue.helpers.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export declare const renderCampaignUnsubscribePage: (state: "confirm" | "success" | "invalid" | "error", token?: string, language?: string) => string;
2
+ //# sourceMappingURL=campaign-unsubscribe-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"campaign-unsubscribe-page.d.ts","sourceRoot":"","sources":["../../src/helpers/campaign-unsubscribe-page.ts"],"names":[],"mappings":"AAwCA,eAAO,MAAM,6BAA6B,GACtC,OAAO,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,EAClD,QAAQ,MAAM,EACd,iBAAe,KAChB,MA8DF,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const signCampaignUnsubscribeToken: (unsubscribeId: string, campaignId: string) => string;
2
+ export declare const verifyCampaignUnsubscribeToken: (token: string) => {
3
+ unsubscribeId: string;
4
+ campaignId: string;
5
+ };
6
+ export declare const unsubscribeFromCampaignEmails: (token: string) => Promise<boolean>;
7
+ //# sourceMappingURL=campaign-unsubscribe.helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"campaign-unsubscribe.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/campaign-unsubscribe.helpers.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,4BAA4B,GAAI,eAAe,MAAM,EAAE,YAAY,MAAM,KAAG,MAOxF,CAAC;AAEF,eAAO,MAAM,8BAA8B,GACvC,OAAO,MAAM,KACd;IAAE,aAAa,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAsB7C,CAAC;AAGF,eAAO,MAAM,6BAA6B,GAAU,OAAO,MAAM,KAAG,OAAO,CAAC,OAAO,CAIlF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=campaign-webhook.helpers.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"campaign-webhook.helpers.test.d.ts","sourceRoot":"","sources":["../../src/helpers/campaign-webhook.helpers.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export type ConsentFlowDeadlineSummary = {
2
+ suspended: number;
3
+ };
4
+ export declare const suspendExpiredConsentFlowTerms: (now?: string) => Promise<ConsentFlowDeadlineSummary>;
5
+ //# sourceMappingURL=consentflow-deadline.helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consentflow-deadline.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/consentflow-deadline.helpers.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,0BAA0B,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAG/D,eAAO,MAAM,8BAA8B,GACvC,YAA8B,KAC/B,OAAO,CAAC,0BAA0B,CAcpC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const migrateLegacyConsentFlowContracts: (contractId?: string) => Promise<void>;
2
+ //# sourceMappingURL=consentflow-legacy-migration.helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consentflow-legacy-migration.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/consentflow-legacy-migration.helpers.ts"],"names":[],"mappings":"AAwCA,eAAO,MAAM,iCAAiC,GAAU,aAAa,MAAM,KAAG,OAAO,CAAC,IAAI,CAoIzF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"contract-events.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/contract-events.helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAKtC,OAAO,EAIH,KAAK,sBAAsB,EAE3B,KAAK,eAAe,EACvB,MAAM,kBAAkB,CAAC;AAS1B,OAAO,EAA0B,KAAK,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAgB7F,MAAM,MAAM,4BAA4B,GAAG;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAClB,CAAC;AAGF,eAAO,MAAM,kBAAkB,GAC3B,OAAO,YAAY,EACnB,0DAKG;IACC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,WAAW,EAAE,sBAAsB,CAAC;IACpC,MAAM,CAAC,EAAE,M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BAA6B,GACtC,cAAc,eAAe,KAC9B,OAAO,CAAC,OAAO,CA2DjB,CAAC;AAiIF,eAAO,MAAM,sBAAsB,GAAU,gCAI1C;IACC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CAChB,KAAG,OAAO,CAAC,4BAA4B,CAwL5C,CAAC;AAGF,eAAO,MAAM,wBAAwB,GAAU,SAAS,MAAM,KAAG,OAAO,CAAC,IAAI,CAU5E,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { ConsentFlowContractInput, ConsentFlowDataQuery, ConsentFlowTermsInput } from '@learncard/types';
2
- export declare const areTermsValid: (terms: ConsentFlowTermsInput, contract: ConsentFlowContractInput) => boolean;
2
+ export declare const areTermsValid: (terms: ConsentFlowTermsInput, contractSnapshot: ConsentFlowContractInput) => boolean;
3
3
  export declare const convertDataQueryToNeo4jQuery: (_query: ConsentFlowDataQuery) => {
4
4
  read: {
5
5
  anonymize?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"contract.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/contract.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACxB,MAAM,kBAAkB,CAAC;AAG1B,eAAO,MAAM,aAAa,GAAI,OAAO,qBAAqB,EAAE,UAAU,wBAAwB,YA4C7F,CAAC;AAEF,eAAO,MAAM,4BAA4B,GAAI,QAAQ,oBAAoB;;;;;;;;CAUxE,CAAC;AAGF,eAAO,MAAM,qBAAqB,GAC9B,iBAAiB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EACpD,UAAU,MAAM,KACjB,OASF,CAAC"}
1
+ {"version":3,"file":"contract.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/contract.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACxB,MAAM,kBAAkB,CAAC;AAG1B,eAAO,MAAM,aAAa,GACtB,OAAO,qBAAqB,EAC5B,kBAAkB,wBAAwB,YA8C7C,CAAC;AAEF,eAAO,MAAM,4BAA4B,GAAI,QAAQ,oBAAoB;;;;;;;;CAUxE,CAAC;AAGF,eAAO,MAAM,qBAAqB,GAC9B,iBAAiB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EACpD,UAAU,MAAM,KACjB,OASF,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const getPublicBoostDisplayName: (boost: {
2
+ boost: string;
3
+ name?: string;
4
+ } | null | undefined) => string | undefined;
5
+ //# sourceMappingURL=credential-display.helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credential-display.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/credential-display.helpers.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,yBAAyB,GAClC,OAAO;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,KAC3D,MAAM,GAAG,SAQX,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=credential-display.helpers.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credential-display.helpers.test.d.ts","sourceRoot":"","sources":["../../src/helpers/credential-display.helpers.test.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"credential-refresh-email.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/credential-refresh-email.helpers.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAIjD,OAAO,EAMH,KAAK,4BAA4B,EACp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AC,MAAM,GAAG,SAAS,CAS7B,CAAC;AAOF,eAAO,MAAM,yCAAyC,GAAU,QAAQ;IACpE,OAAO,EAAE,4BAA4B,CAAC;IACtC,aAAa,EAAE,WAAW,CAAC;IAC3B,aAAa,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;CACtC,KAAG,OAAO,CAAC,qCAAqC,CA+EhD,CAAC"}
@@ -1,10 +1,14 @@
1
1
  import type { PublishCredentialRefreshNotification } from '@learncard/types';
2
2
  import type { CredentialRefreshState } from '../types/credential-refresh';
3
3
  export declare const getCredentialRefreshDigestSecret: () => string;
4
+ export declare const getCredentialRefreshDigestCandidateSecrets: (version?: string) => string[];
5
+ export declare const matchesCredentialMaterialDigest: (credential: CredentialLike, stored?: string) => boolean;
6
+ export declare const matchesCredentialSubjectDigest: (credentialSubject: unknown, stored?: string) => boolean;
4
7
  type CredentialLike = Record<string, unknown>;
5
8
  export declare const getMaterialCredentialProjection: (credential: CredentialLike) => unknown;
6
9
  export declare const computeCredentialMaterialDigest: (credential: CredentialLike, secret?: string) => string;
7
10
  export declare const computeCredentialStatusDigest: (credentialStatus: unknown, secret?: string) => string;
11
+ export declare const matchesCredentialStatusDigest: (credentialStatus: unknown, stored?: string) => boolean;
8
12
  export declare const computeCredentialSubjectDigest: (credentialSubject: unknown, secret?: string) => string;
9
13
  export type DecideCredentialRefreshNotificationParams = {
10
14
  state: CredentialRefreshState;
@@ -1 +1 @@
1
- {"version":3,"file":"credential-refresh-materiality.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/credential-refresh-materiality.helpers.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,kBAAkB,CAAC;AAE7E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAoBvE,eAAO,MAAM,gCAAgC,QAAO,MAWnD,CAAC;AA0BF,KAAK,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAO9C,eAAO,MAAM,+BAA+B,GAAI,YAAY,cAAc,KAAG,OAKxE,CAAC;AAON,eAAO,MAAM,+BAA+B,GACxC,YAAY,cAAc,EAC1B,SAAQ,MAA2C,KACpD,MAGyB,CAAC;AAM7B,eAAO,MAAM,6BAA6B,GACtC,kBAAkB,OAAO,EACzB,SAAQ,MAA2C,KACpD,MAIyB,CAAC;AAG7B,eAAO,MAAM,8BAA8B,GACvC,mBAAmB,OAAO,EAC1B,SAAQ,MAA2C,KACpD,MAOF,CAAC;AAEF,MAAM,MAAM,yCAAyC,GAAG;IAEpD,KAAK,EAAE,sBAAsB,CAAC;IAE9B,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,UAAU,EAAE,MAAM,CAAC;CACtB,CAAC;AAYF,eAAO,MAAM,mCAAmC,GAC5C,QAAQ,yCAAyC,KAClD,oCASF,CAAC;AASF,eAAO,MAAM,oDAAoD,KAAK,CAAC;AAMvE,eAAO,MAAM,2CAA2C,QAAO,MAC0B,CAAC;AAW1F,eAAO,MAAM,gCAAgC,GACzC,WAAW,MAAM,EACjB,SAAQ,MAA2C,KACpD,MAA2E,CAAC;AAG/E,eAAO,MAAM,0CAA0C,GACnD,WAAW,MAAM,EACjB,SAAQ,MAA2C,KACpD,MAIF,CAAC;AASF,eAAO,MAAM,mCAAmC,GAC5C,WAAW,MAAM,EACjB,KAAI,IAAiB,EACrB,cAAa,MAAsD,EACnE,SAAQ,MAA2C,KACpD,MAOF,CAAC"}
1
+ {"version":3,"file":"credential-refresh-materiality.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/credential-refresh-materiality.helpers.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,kBAAkB,CAAC;AAE7E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAoBvE,eAAO,MAAM,gCAAgC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F,CAAC;AASF,eAAO,MAAM,mCAAmC,GAC5C,WAAW,MAAM,EACjB,KAAI,IAAiB,EACrB,cAAa,MAAsD,EACnE,SAAQ,MAA2C,KACpD,MAOF,CAAC"}
@@ -1,5 +1,6 @@
1
- import { VC, type AllocateCredentialRefreshResult, type ManagedCredentialRefreshReceipt, type ManagedCredentialRefreshService, type PublishCredentialRefreshInput, type PublishCredentialRefreshNotification, type PublishCredentialRefreshResult } from '@learncard/types';
1
+ import { VC, type AllocateCredentialRefreshResult, type HolderEncryptedHandoff, type ManagedCredentialRefreshReceipt, type ManagedCredentialRefreshService, type PublishCredentialRefreshInput, type PublishCredentialRefreshNotification, type PublishCredentialRefreshResult, type PublishHolderEncryptedRefreshInput } from '@learncard/types';
2
2
  import type { DbTermsType } from '../types/consentflowcontract';
3
+ import { getStatusManagement } from './status-list.helpers';
3
4
  import type { TenantBranding } from '@learncard/email-templates';
4
5
  import { ProfileType } from '../types/profile';
5
6
  export declare const getCredentialRefreshServiceUrl: (refreshId: string, domain: string) => string;
@@ -10,6 +11,7 @@ export type AllocateCredentialRefreshParams = {
10
11
  holderDid: string;
11
12
  credentialId: string;
12
13
  domain: string;
14
+ encryptionMode?: 'holder';
13
15
  };
14
16
  export declare const allocateCredentialRefresh: (params: AllocateCredentialRefreshParams) => Promise<AllocateCredentialRefreshResult>;
15
17
  export type ManagedRefreshHandoff = {
@@ -41,6 +43,7 @@ export type SendRefreshableCredentialParams = {
41
43
  export type SendRefreshableCredentialResult = {
42
44
  uri: string;
43
45
  receipt: ManagedCredentialRefreshReceipt;
46
+ statusManagement?: ReturnType<typeof getStatusManagement>;
44
47
  };
45
48
  type InitialRefreshRoot = {
46
49
  rootId: string;
@@ -57,7 +60,21 @@ export declare const sendInitialCredentialNotificationOnce: (params: {
57
60
  holderProfile: ProfileType;
58
61
  initialNotificationSuppressed: boolean;
59
62
  }) => Promise<void>;
63
+ export declare const getHolderEncryptionRecipientKeyIds: (holderProfile: ProfileType) => Promise<string[]>;
64
+ export declare const isControlledIssuerDid: (issuerDid: string, issuerProfile: ProfileType, domain: string) => boolean;
60
65
  export declare const sendRefreshableCredential: (params: SendRefreshableCredentialParams) => Promise<SendRefreshableCredentialResult>;
66
+ export type SendHolderEncryptedRefreshableCredentialParams = {
67
+ issuerProfile: ProfileType;
68
+ handoff: HolderEncryptedHandoff;
69
+ idempotencyKey?: string;
70
+ boostUri?: string;
71
+ skipNotification?: boolean;
72
+ domain: string;
73
+ onBehalfOf?: string;
74
+ };
75
+ export declare const sendHolderEncryptedRefreshableCredential: (params: SendHolderEncryptedRefreshableCredentialParams) => Promise<SendRefreshableCredentialResult & {
76
+ activityId: string;
77
+ }>;
61
78
  export declare const computeRefreshEtag: (encryptedCredential: string) => string;
62
79
  export declare const deliverPendingCredentialRefreshNotificationForAcceptedCredential: (params: {
63
80
  credentialNodeId: string;
@@ -72,5 +89,17 @@ export type PublishCredentialRefreshParams = {
72
89
  branding?: Partial<TenantBranding>;
73
90
  };
74
91
  export declare const publishCredentialRefresh: (params: PublishCredentialRefreshParams) => Promise<PublishCredentialRefreshResult>;
92
+ export type PublishHolderEncryptedRefreshParams = {
93
+ issuerProfile: ProfileType;
94
+ input: PublishHolderEncryptedRefreshInput;
95
+ domain: string;
96
+ branding?: Partial<TenantBranding>;
97
+ };
98
+ export declare const publishHolderEncryptedRefreshableCredential: (params: PublishHolderEncryptedRefreshParams) => Promise<PublishCredentialRefreshResult>;
99
+ export type GetCurrentEncryptionRecipientsParams = {
100
+ issuerProfile: ProfileType;
101
+ refreshId: string;
102
+ };
103
+ export declare const getCurrentEncryptionRecipients: (params: GetCurrentEncryptionRecipientsParams) => Promise<string[]>;
75
104
  export {};
76
105
  //# sourceMappingURL=credential-refresh.helpers.d.ts.map