@learncard/network-brain-service 3.18.0 → 3.19.1
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.
- package/.env.example +38 -2
- package/CHANGELOG.md +118 -0
- package/README.md +42 -0
- package/compose.inbox.yml +7 -0
- package/dist/accesslayer/auth-grant/read.d.ts +1 -0
- package/dist/accesslayer/auth-grant/read.d.ts.map +1 -1
- package/dist/accesslayer/consentflowcontract/relationships/create.d.ts.map +1 -1
- package/dist/accesslayer/consentflowcontract/relationships/update.d.ts.map +1 -1
- package/dist/accesslayer/credential-activity/create.d.ts.map +1 -1
- package/dist/accesslayer/credential-refresh/email-delivery.d.ts +18 -0
- package/dist/accesslayer/credential-refresh/email-delivery.d.ts.map +1 -0
- package/dist/accesslayer/credential-refresh/index.d.ts +1 -0
- package/dist/accesslayer/credential-refresh/index.d.ts.map +1 -1
- package/dist/accesslayer/credential-refresh/read.d.ts.map +1 -1
- package/dist/accesslayer/credential-refresh/update.d.ts.map +1 -1
- package/dist/accesslayer/inbox-batch/store.d.ts +33 -0
- package/dist/accesslayer/inbox-batch/store.d.ts.map +1 -0
- package/dist/accesslayer/inbox-credential/create.d.ts +5 -0
- package/dist/accesslayer/inbox-credential/create.d.ts.map +1 -1
- package/dist/accesslayer/inbox-credential/refresh.d.ts +71 -0
- package/dist/accesslayer/inbox-credential/refresh.d.ts.map +1 -0
- package/dist/accesslayer/inbox-credential/update.d.ts +1 -1
- package/dist/accesslayer/inbox-credential/update.d.ts.map +1 -1
- package/dist/accesslayer/presentation/read.d.ts.map +1 -1
- package/dist/accesslayer/presentation/relationships/create.d.ts +2 -2
- package/dist/accesslayer/presentation/relationships/create.d.ts.map +1 -1
- package/dist/accesslayer/presentation/relationships/read.d.ts.map +1 -1
- package/dist/accesslayer/share-link/abandon.d.ts +3 -0
- package/dist/accesslayer/share-link/abandon.d.ts.map +1 -0
- package/dist/accesslayer/share-link/cleanup.d.ts +6 -0
- package/dist/accesslayer/share-link/cleanup.d.ts.map +1 -0
- package/dist/accesslayer/share-link/errors.d.ts +8 -0
- package/dist/accesslayer/share-link/errors.d.ts.map +1 -0
- package/dist/accesslayer/share-link/finalize.d.ts +3 -0
- package/dist/accesslayer/share-link/finalize.d.ts.map +1 -0
- package/dist/accesslayer/share-link/helpers.d.ts +56 -0
- package/dist/accesslayer/share-link/helpers.d.ts.map +1 -0
- package/dist/accesslayer/share-link/index.d.ts +12 -0
- package/dist/accesslayer/share-link/index.d.ts.map +1 -0
- package/dist/accesslayer/share-link/list.d.ts +5 -0
- package/dist/accesslayer/share-link/list.d.ts.map +1 -0
- package/dist/accesslayer/share-link/read.d.ts +5 -0
- package/dist/accesslayer/share-link/read.d.ts.map +1 -0
- package/dist/accesslayer/share-link/receipt.d.ts +11 -0
- package/dist/accesslayer/share-link/receipt.d.ts.map +1 -0
- package/dist/accesslayer/share-link/recovery.d.ts +6 -0
- package/dist/accesslayer/share-link/recovery.d.ts.map +1 -0
- package/dist/accesslayer/share-link/reserve.d.ts +4 -0
- package/dist/accesslayer/share-link/reserve.d.ts.map +1 -0
- package/dist/accesslayer/share-link/revoke.d.ts +3 -0
- package/dist/accesslayer/share-link/revoke.d.ts.map +1 -0
- package/dist/accesslayer/share-link/transaction-execution.d.ts +18 -0
- package/dist/accesslayer/share-link/transaction-execution.d.ts.map +1 -0
- package/dist/accesslayer/share-link/transaction.d.ts +15 -0
- package/dist/accesslayer/share-link/transaction.d.ts.map +1 -0
- package/dist/accesslayer/share-link/types.d.ts +370 -0
- package/dist/accesslayer/share-link/types.d.ts.map +1 -0
- package/dist/app.d.ts +4 -0
- package/dist/app.d.ts.map +1 -1
- package/dist/cache/atomic-counter.test-helpers.d.ts +3 -0
- package/dist/cache/atomic-counter.test-helpers.d.ts.map +1 -0
- package/dist/cache/atomic-counter.test.d.ts +2 -0
- package/dist/cache/atomic-counter.test.d.ts.map +1 -0
- package/dist/cache/index.d.ts +1 -1
- package/dist/cache/index.d.ts.map +1 -1
- package/dist/config/environment.d.ts +55 -0
- package/dist/config/environment.d.ts.map +1 -1
- package/dist/constants/auth-grant.d.ts +2 -0
- package/dist/constants/auth-grant.d.ts.map +1 -1
- package/dist/credential-refresh.d.ts.map +1 -1
- package/dist/helpers/activity.helpers.d.ts +4 -0
- package/dist/helpers/activity.helpers.d.ts.map +1 -1
- package/dist/helpers/boost.helpers.d.ts.map +1 -1
- package/dist/helpers/contact-method.helpers.d.ts.map +1 -1
- package/dist/helpers/contact-method.helpers.test.d.ts +2 -0
- package/dist/helpers/contact-method.helpers.test.d.ts.map +1 -0
- package/dist/helpers/credential-refresh-email-content.helpers.d.ts +44 -0
- package/dist/helpers/credential-refresh-email-content.helpers.d.ts.map +1 -0
- package/dist/helpers/credential-refresh-email-content.helpers.test.d.ts +2 -0
- package/dist/helpers/credential-refresh-email-content.helpers.test.d.ts.map +1 -0
- package/dist/helpers/credential-refresh-email.helpers.d.ts +17 -0
- package/dist/helpers/credential-refresh-email.helpers.d.ts.map +1 -0
- package/dist/helpers/credential-refresh-proof.helpers.d.ts +4 -0
- package/dist/helpers/credential-refresh-proof.helpers.d.ts.map +1 -0
- package/dist/helpers/credential-refresh-proof.helpers.test.d.ts +2 -0
- package/dist/helpers/credential-refresh-proof.helpers.test.d.ts.map +1 -0
- package/dist/helpers/credential-refresh.helpers.d.ts +45 -2
- package/dist/helpers/credential-refresh.helpers.d.ts.map +1 -1
- package/dist/helpers/credential.helpers.d.ts +2 -1
- package/dist/helpers/credential.helpers.d.ts.map +1 -1
- package/dist/helpers/credentialSubject.helpers.d.ts +3 -0
- package/dist/helpers/credentialSubject.helpers.d.ts.map +1 -0
- package/dist/helpers/credentialSubject.helpers.test.d.ts +2 -0
- package/dist/helpers/credentialSubject.helpers.test.d.ts.map +1 -0
- package/dist/helpers/finalize-inbox.helpers.d.ts.map +1 -1
- package/dist/helpers/inbox-batch-http.helpers.d.ts +15 -0
- package/dist/helpers/inbox-batch-http.helpers.d.ts.map +1 -0
- package/dist/helpers/inbox-batch-http.helpers.test.d.ts +2 -0
- package/dist/helpers/inbox-batch-http.helpers.test.d.ts.map +1 -0
- package/dist/helpers/inbox-batch-status.helpers.d.ts +3 -0
- package/dist/helpers/inbox-batch-status.helpers.d.ts.map +1 -0
- package/dist/helpers/inbox-batch.helpers.d.ts +10 -0
- package/dist/helpers/inbox-batch.helpers.d.ts.map +1 -0
- package/dist/helpers/inbox-batch.helpers.test.d.ts +2 -0
- package/dist/helpers/inbox-batch.helpers.test.d.ts.map +1 -0
- package/dist/helpers/inbox-issuance-error.helpers.d.ts +13 -0
- package/dist/helpers/inbox-issuance-error.helpers.d.ts.map +1 -0
- package/dist/helpers/inbox-queue.helpers.d.ts +11 -0
- package/dist/helpers/inbox-queue.helpers.d.ts.map +1 -0
- package/dist/helpers/inbox-queue.helpers.test.d.ts +2 -0
- package/dist/helpers/inbox-queue.helpers.test.d.ts.map +1 -0
- package/dist/helpers/inbox-refresh.helpers.d.ts +186 -0
- package/dist/helpers/inbox-refresh.helpers.d.ts.map +1 -0
- package/dist/helpers/inbox.helpers.d.ts +9 -1
- package/dist/helpers/inbox.helpers.d.ts.map +1 -1
- package/dist/helpers/notificationMessages.d.ts +1 -1
- package/dist/helpers/notificationMessages.d.ts.map +1 -1
- package/dist/helpers/notifications.helpers.d.ts.map +1 -1
- package/dist/helpers/presentation-metadata.d.ts +4 -0
- package/dist/helpers/presentation-metadata.d.ts.map +1 -0
- package/dist/helpers/presentation.helpers.d.ts +1 -1
- package/dist/helpers/presentation.helpers.d.ts.map +1 -1
- package/dist/helpers/profile.helpers.d.ts +1 -0
- package/dist/helpers/profile.helpers.d.ts.map +1 -1
- package/dist/helpers/rateLimit.helpers.d.ts.map +1 -1
- package/dist/helpers/refresh-send-intent.helpers.d.ts +51 -0
- package/dist/helpers/refresh-send-intent.helpers.d.ts.map +1 -0
- package/dist/helpers/share-content-client/adapters.d.ts +10 -0
- package/dist/helpers/share-content-client/adapters.d.ts.map +1 -0
- package/dist/helpers/share-content-client/canonical.d.ts +7 -0
- package/dist/helpers/share-content-client/canonical.d.ts.map +1 -0
- package/dist/helpers/share-content-client/client.d.ts +5 -0
- package/dist/helpers/share-content-client/client.d.ts.map +1 -0
- package/dist/helpers/share-content-client/config.d.ts +11 -0
- package/dist/helpers/share-content-client/config.d.ts.map +1 -0
- package/dist/helpers/share-content-client/index.d.ts +6 -0
- package/dist/helpers/share-content-client/index.d.ts.map +1 -0
- package/dist/helpers/share-content-client/responses.d.ts +16 -0
- package/dist/helpers/share-content-client/responses.d.ts.map +1 -0
- package/dist/helpers/share-content-client/types.d.ts +145 -0
- package/dist/helpers/share-content-client/types.d.ts.map +1 -0
- package/dist/helpers/share-link-coordinator/budget-helpers.d.ts +5 -0
- package/dist/helpers/share-link-coordinator/budget-helpers.d.ts.map +1 -0
- package/dist/helpers/share-link-coordinator/cleanup-runner.d.ts +3 -0
- package/dist/helpers/share-link-coordinator/cleanup-runner.d.ts.map +1 -0
- package/dist/helpers/share-link-coordinator/coordinator.d.ts +4 -0
- package/dist/helpers/share-link-coordinator/coordinator.d.ts.map +1 -0
- package/dist/helpers/share-link-coordinator/index.d.ts +5 -0
- package/dist/helpers/share-link-coordinator/index.d.ts.map +1 -0
- package/dist/helpers/share-link-coordinator/recovery-runner.d.ts +9 -0
- package/dist/helpers/share-link-coordinator/recovery-runner.d.ts.map +1 -0
- package/dist/helpers/share-link-coordinator/runtime.d.ts +11 -0
- package/dist/helpers/share-link-coordinator/runtime.d.ts.map +1 -0
- package/dist/helpers/share-link-coordinator/stat.d.ts +4 -0
- package/dist/helpers/share-link-coordinator/stat.d.ts.map +1 -0
- package/dist/helpers/share-link-coordinator/types.d.ts +160 -0
- package/dist/helpers/share-link-coordinator/types.d.ts.map +1 -0
- package/dist/helpers/share-link-lifecycle/index.d.ts +5 -0
- package/dist/helpers/share-link-lifecycle/index.d.ts.map +1 -0
- package/dist/helpers/share-link-lifecycle/lease.helpers.d.ts +4 -0
- package/dist/helpers/share-link-lifecycle/lease.helpers.d.ts.map +1 -0
- package/dist/helpers/share-link-lifecycle/recovery.helpers.d.ts +21 -0
- package/dist/helpers/share-link-lifecycle/recovery.helpers.d.ts.map +1 -0
- package/dist/helpers/share-link-lifecycle/request-hash.helpers.d.ts +9 -0
- package/dist/helpers/share-link-lifecycle/request-hash.helpers.d.ts.map +1 -0
- package/dist/helpers/share-link-lifecycle/types.d.ts +14 -0
- package/dist/helpers/share-link-lifecycle/types.d.ts.map +1 -0
- package/dist/helpers/share-link-maintenance/budget.d.ts +12 -0
- package/dist/helpers/share-link-maintenance/budget.d.ts.map +1 -0
- package/dist/helpers/share-link-maintenance/config.d.ts +48 -0
- package/dist/helpers/share-link-maintenance/config.d.ts.map +1 -0
- package/dist/helpers/share-link-maintenance/index.d.ts +8 -0
- package/dist/helpers/share-link-maintenance/index.d.ts.map +1 -0
- package/dist/helpers/share-link-maintenance/runner.d.ts +19 -0
- package/dist/helpers/share-link-maintenance/runner.d.ts.map +1 -0
- package/dist/helpers/share-link-maintenance/runtime.d.ts +36 -0
- package/dist/helpers/share-link-maintenance/runtime.d.ts.map +1 -0
- package/dist/helpers/share-link-maintenance/scheduler.d.ts +18 -0
- package/dist/helpers/share-link-maintenance/scheduler.d.ts.map +1 -0
- package/dist/helpers/share-link-maintenance/telemetry.d.ts +5 -0
- package/dist/helpers/share-link-maintenance/telemetry.d.ts.map +1 -0
- package/dist/helpers/share-link-maintenance/types.d.ts +53 -0
- package/dist/helpers/share-link-maintenance/types.d.ts.map +1 -0
- package/dist/helpers/share-link-owner/config.d.ts +16 -0
- package/dist/helpers/share-link-owner/config.d.ts.map +1 -0
- package/dist/helpers/share-link-owner/diagnostics.d.ts +26 -0
- package/dist/helpers/share-link-owner/diagnostics.d.ts.map +1 -0
- package/dist/helpers/share-link-owner/lazy-initializer.d.ts +2 -0
- package/dist/helpers/share-link-owner/lazy-initializer.d.ts.map +1 -0
- package/dist/helpers/share-link-owner-projection.d.ts +4 -0
- package/dist/helpers/share-link-owner-projection.d.ts.map +1 -0
- package/dist/helpers/share-link-passcode-abuse.d.ts +2 -0
- package/dist/helpers/share-link-passcode-abuse.d.ts.map +1 -0
- package/dist/helpers/share-link-passcode.d.ts +6 -0
- package/dist/helpers/share-link-passcode.d.ts.map +1 -0
- package/dist/helpers/share-link-policy/index.d.ts +4 -0
- package/dist/helpers/share-link-policy/index.d.ts.map +1 -0
- package/dist/helpers/share-link-policy/production.d.ts +13 -0
- package/dist/helpers/share-link-policy/production.d.ts.map +1 -0
- package/dist/helpers/share-link-policy/resolver.d.ts +6 -0
- package/dist/helpers/share-link-policy/resolver.d.ts.map +1 -0
- package/dist/helpers/share-link-policy/types.d.ts +16 -0
- package/dist/helpers/share-link-policy/types.d.ts.map +1 -0
- package/dist/helpers/share-link-public/config.d.ts +13 -0
- package/dist/helpers/share-link-public/config.d.ts.map +1 -0
- package/dist/helpers/share-link-view-notification.d.ts +2 -0
- package/dist/helpers/share-link-view-notification.d.ts.map +1 -0
- package/dist/helpers/shim.d.ts +1 -1
- package/dist/helpers/shim.d.ts.map +1 -1
- package/dist/inbox-queue-local.d.ts +2 -0
- package/dist/inbox-queue-local.d.ts.map +1 -0
- package/dist/index.js +2 -2
- package/dist/models/AuthGrant.d.ts.map +1 -1
- package/dist/models/CredentialActivity.d.ts +1 -0
- package/dist/models/CredentialActivity.d.ts.map +1 -1
- package/dist/models/CredentialRefresh.d.ts +5 -2
- package/dist/models/CredentialRefresh.d.ts.map +1 -1
- package/dist/models/InboxCredential.d.ts +1 -0
- package/dist/models/InboxCredential.d.ts.map +1 -1
- package/dist/models/Presentation.d.ts +2 -0
- package/dist/models/Presentation.d.ts.map +1 -1
- package/dist/models/Profile.d.ts +2 -0
- package/dist/models/Profile.d.ts.map +1 -1
- package/dist/models/ShareLink.d.ts +44 -0
- package/dist/models/ShareLink.d.ts.map +1 -0
- package/dist/models/ShareViewReceipt.d.ts +22 -0
- package/dist/models/ShareViewReceipt.d.ts.map +1 -0
- package/dist/models/credential-refresh-constraints.d.ts.map +1 -1
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/share-link-constraints.d.ts +3 -0
- package/dist/models/share-link-constraints.d.ts.map +1 -0
- package/dist/openapi.d.ts.map +1 -1
- package/dist/public-share-link-http.d.ts +4 -0
- package/dist/public-share-link-http.d.ts.map +1 -0
- package/dist/routes/act-as.test.d.ts +2 -0
- package/dist/routes/act-as.test.d.ts.map +1 -0
- package/dist/routes/activity.d.ts +3 -0
- package/dist/routes/activity.d.ts.map +1 -1
- package/dist/routes/app-store.d.ts.map +1 -1
- package/dist/routes/auth-grants.d.ts +10 -0
- package/dist/routes/auth-grants.d.ts.map +1 -1
- package/dist/routes/boosts.d.ts +494 -0
- package/dist/routes/boosts.d.ts.map +1 -1
- package/dist/routes/contracts.d.ts +2 -2
- package/dist/routes/contracts.d.ts.map +1 -1
- package/dist/routes/credential-refreshes.d.ts.map +1 -1
- package/dist/routes/credentials.d.ts +1 -1
- package/dist/routes/credentials.d.ts.map +1 -1
- package/dist/routes/inbox.d.ts +953 -11
- package/dist/routes/inbox.d.ts.map +1 -1
- package/dist/routes/index.d.ts +154 -85
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/presentations.d.ts +1 -0
- package/dist/routes/presentations.d.ts.map +1 -1
- package/dist/routes/profile-manager.d.ts.map +1 -1
- package/dist/routes/profiles.d.ts.map +1 -1
- package/dist/routes/public-share-links.d.ts +230 -0
- package/dist/routes/public-share-links.d.ts.map +1 -0
- package/dist/routes/share-links.d.ts +844 -0
- package/dist/routes/share-links.d.ts.map +1 -0
- package/dist/routes/workflows.d.ts.map +1 -1
- package/dist/services/delivery/adapters/postmark.adapter.d.ts.map +1 -1
- package/dist/services/delivery/adapters/postmark.adapter.test.d.ts +2 -0
- package/dist/services/delivery/adapters/postmark.adapter.test.d.ts.map +1 -0
- package/dist/services/registry/registry.factory.d.ts.map +1 -1
- package/dist/types/activity.d.ts +4 -0
- package/dist/types/activity.d.ts.map +1 -1
- package/dist/types/consentflowcontract.d.ts +1 -1
- package/dist/types/credential-refresh.d.ts +10 -1
- package/dist/types/credential-refresh.d.ts.map +1 -1
- package/dist/types/inbox-batch.d.ts +38 -0
- package/dist/types/inbox-batch.d.ts.map +1 -0
- package/inbox-e2e-setup.ts +53 -1
- package/inbox-elasticmq.conf +10 -0
- package/lambda.ts +64 -16
- package/package.json +24 -16
- package/scripts/seed-demo-persona.ts +425 -0
- package/scripts/setup-inbox-queues.ts +60 -0
- package/serverless-local.yml +2 -0
- package/serverless.yml +111 -0
- package/shareLinkMaintenanceLambda.ts +49 -0
- package/src/accesslayer/auth-grant/read.ts +2 -1
- package/src/accesslayer/consentflowcontract/relationships/create.ts +9 -16
- package/src/accesslayer/consentflowcontract/relationships/update.ts +15 -28
- package/src/accesslayer/credential-activity/create.ts +1 -0
- package/src/accesslayer/credential-refresh/email-delivery.ts +116 -0
- package/src/accesslayer/credential-refresh/index.ts +1 -0
- package/src/accesslayer/credential-refresh/read.ts +8 -2
- package/src/accesslayer/credential-refresh/update.ts +4 -0
- package/src/accesslayer/inbox-batch/store.ts +469 -0
- package/src/accesslayer/inbox-credential/create.ts +51 -19
- package/src/accesslayer/inbox-credential/refresh.ts +221 -0
- package/src/accesslayer/inbox-credential/update.ts +1 -1
- package/src/accesslayer/presentation/read.ts +57 -25
- package/src/accesslayer/presentation/relationships/create.ts +54 -11
- package/src/accesslayer/presentation/relationships/read.ts +21 -6
- package/src/accesslayer/share-link/abandon.ts +100 -0
- package/src/accesslayer/share-link/cleanup.ts +271 -0
- package/src/accesslayer/share-link/errors.ts +32 -0
- package/src/accesslayer/share-link/finalize.ts +265 -0
- package/src/accesslayer/share-link/helpers.ts +419 -0
- package/src/accesslayer/share-link/index.ts +11 -0
- package/src/accesslayer/share-link/list.ts +162 -0
- package/src/accesslayer/share-link/read.ts +107 -0
- package/src/accesslayer/share-link/receipt.ts +548 -0
- package/src/accesslayer/share-link/recovery.ts +545 -0
- package/src/accesslayer/share-link/reserve.ts +684 -0
- package/src/accesslayer/share-link/revoke.ts +197 -0
- package/src/accesslayer/share-link/transaction-execution.ts +72 -0
- package/src/accesslayer/share-link/transaction.ts +126 -0
- package/src/accesslayer/share-link/types.ts +601 -0
- package/src/app.ts +6 -0
- package/src/cache/atomic-counter.test-helpers.ts +27 -0
- package/src/cache/atomic-counter.test.ts +6 -0
- package/src/cache/index.ts +25 -13
- package/src/config/environment.ts +40 -0
- package/src/constants/auth-grant.ts +5 -0
- package/src/credential-refresh.ts +5 -1
- package/src/docker-entry.ts +65 -0
- package/src/helpers/activity.helpers.ts +4 -0
- package/src/helpers/app-counter.helpers.ts +1 -1
- package/src/helpers/boost.helpers.ts +4 -31
- package/src/helpers/contact-method.helpers.test.ts +43 -0
- package/src/helpers/contact-method.helpers.ts +3 -4
- package/src/helpers/credential-refresh-email-content.helpers.test.ts +222 -0
- package/src/helpers/credential-refresh-email-content.helpers.ts +155 -0
- package/src/helpers/credential-refresh-email.helpers.ts +201 -0
- package/src/helpers/credential-refresh-proof.helpers.test.ts +103 -0
- package/src/helpers/credential-refresh-proof.helpers.ts +43 -0
- package/src/helpers/credential-refresh.helpers.ts +375 -99
- package/src/helpers/credential.helpers.ts +4 -1
- package/src/helpers/credentialSubject.helpers.test.ts +114 -0
- package/src/helpers/credentialSubject.helpers.ts +40 -0
- package/src/helpers/finalize-inbox.helpers.ts +29 -14
- package/src/helpers/inbox-batch-http.helpers.test.ts +188 -0
- package/src/helpers/inbox-batch-http.helpers.ts +150 -0
- package/src/helpers/inbox-batch-status.helpers.ts +11 -0
- package/src/helpers/inbox-batch.helpers.test.ts +668 -0
- package/src/helpers/inbox-batch.helpers.ts +374 -0
- package/src/helpers/inbox-issuance-error.helpers.ts +25 -0
- package/src/helpers/inbox-queue.helpers.test.ts +253 -0
- package/src/helpers/inbox-queue.helpers.ts +372 -0
- package/src/helpers/inbox-refresh.helpers.ts +432 -0
- package/src/helpers/inbox.helpers.ts +275 -36
- package/src/helpers/notificationMessages.ts +18 -1
- package/src/helpers/notifications.helpers.ts +4 -2
- package/src/helpers/presentation-metadata.ts +41 -0
- package/src/helpers/presentation.helpers.ts +27 -20
- package/src/helpers/profile.helpers.ts +7 -0
- package/src/helpers/rateLimit.helpers.ts +2 -5
- package/src/helpers/refresh-send-intent.helpers.ts +273 -0
- package/src/helpers/share-content-client/adapters.ts +55 -0
- package/src/helpers/share-content-client/canonical.ts +25 -0
- package/src/helpers/share-content-client/client.ts +440 -0
- package/src/helpers/share-content-client/config.ts +189 -0
- package/src/helpers/share-content-client/index.ts +27 -0
- package/src/helpers/share-content-client/responses.ts +273 -0
- package/src/helpers/share-content-client/types.ts +253 -0
- package/src/helpers/share-link-coordinator/budget-helpers.ts +53 -0
- package/src/helpers/share-link-coordinator/cleanup-runner.ts +286 -0
- package/src/helpers/share-link-coordinator/coordinator.ts +714 -0
- package/src/helpers/share-link-coordinator/index.ts +8 -0
- package/src/helpers/share-link-coordinator/recovery-runner.ts +428 -0
- package/src/helpers/share-link-coordinator/runtime.ts +88 -0
- package/src/helpers/share-link-coordinator/stat.ts +30 -0
- package/src/helpers/share-link-coordinator/types.ts +353 -0
- package/src/helpers/share-link-lifecycle/index.ts +4 -0
- package/src/helpers/share-link-lifecycle/lease.helpers.ts +35 -0
- package/src/helpers/share-link-lifecycle/recovery.helpers.ts +173 -0
- package/src/helpers/share-link-lifecycle/request-hash.helpers.ts +130 -0
- package/src/helpers/share-link-lifecycle/types.ts +58 -0
- package/src/helpers/share-link-maintenance/budget.ts +63 -0
- package/src/helpers/share-link-maintenance/config.ts +312 -0
- package/src/helpers/share-link-maintenance/index.ts +24 -0
- package/src/helpers/share-link-maintenance/runner.ts +223 -0
- package/src/helpers/share-link-maintenance/runtime.ts +334 -0
- package/src/helpers/share-link-maintenance/scheduler.ts +126 -0
- package/src/helpers/share-link-maintenance/telemetry.ts +70 -0
- package/src/helpers/share-link-maintenance/types.ts +89 -0
- package/src/helpers/share-link-owner/config.ts +48 -0
- package/src/helpers/share-link-owner/diagnostics.ts +89 -0
- package/src/helpers/share-link-owner/lazy-initializer.ts +29 -0
- package/src/helpers/share-link-owner-projection.ts +52 -0
- package/src/helpers/share-link-passcode-abuse.ts +36 -0
- package/src/helpers/share-link-passcode.ts +47 -0
- package/src/helpers/share-link-policy/index.ts +7 -0
- package/src/helpers/share-link-policy/production.ts +88 -0
- package/src/helpers/share-link-policy/resolver.ts +108 -0
- package/src/helpers/share-link-policy/types.ts +48 -0
- package/src/helpers/share-link-public/config.ts +41 -0
- package/src/helpers/share-link-view-notification.ts +18 -0
- package/src/helpers/shim.ts +32 -31
- package/src/inbox-queue-local.ts +28 -0
- package/src/models/AuthGrant.ts +1 -0
- package/src/models/CredentialActivity.ts +3 -5
- package/src/models/CredentialRefresh.ts +4 -2
- package/src/models/InboxCredential.ts +2 -0
- package/src/models/Presentation.ts +2 -2
- package/src/models/Profile.ts +3 -2
- package/src/models/ShareLink.ts +130 -0
- package/src/models/ShareViewReceipt.ts +69 -0
- package/src/models/credential-refresh-constraints.test.ts +8 -3
- package/src/models/credential-refresh-constraints.ts +5 -0
- package/src/models/index.ts +2 -0
- package/src/models/share-link-constraints.ts +93 -0
- package/src/openapi.ts +8 -0
- package/src/public-share-link-http.ts +49 -0
- package/src/routes/act-as.test.ts +239 -0
- package/src/routes/app-store.ts +4 -13
- package/src/routes/auth-grants.ts +13 -11
- package/src/routes/boosts.ts +916 -103
- package/src/routes/contracts.ts +2 -11
- package/src/routes/credential-refreshes.test.ts +8 -2
- package/src/routes/credential-refreshes.ts +4 -1
- package/src/routes/credentials.ts +2 -1
- package/src/routes/inbox.ts +95 -49
- package/src/routes/index.ts +216 -46
- package/src/routes/presentations.ts +19 -3
- package/src/routes/profile-manager.ts +10 -2
- package/src/routes/profiles.ts +17 -6
- package/src/routes/public-share-links.ts +814 -0
- package/src/routes/share-links.ts +640 -0
- package/src/routes/skills.ts +1 -1
- package/src/routes/workflows.ts +43 -24
- package/src/services/delivery/adapters/postmark.adapter.test.ts +54 -0
- package/src/services/delivery/adapters/postmark.adapter.ts +16 -1
- package/src/services/registry/registry.factory.ts +2 -1
- package/src/types/activity.ts +2 -0
- package/src/types/credential-refresh.ts +21 -2
- package/src/types/inbox-batch.ts +46 -0
- package/test/atomic-counter.e2e.ts +12 -0
- package/test/auth-grant.spec.ts +21 -21
- package/test/credential-refresh-email.spec.ts +663 -0
- package/test/credential-refresh-publication.spec.ts +2 -0
- package/test/dids.spec.ts +10 -1
- package/test/guardian-gated-routes.spec.ts +13 -0
- package/test/helpers/inbox-e2e-environment.ts +6 -0
- package/test/helpers/share-link-fixtures.ts +94 -0
- package/test/inbox-batch.spec.ts +1338 -0
- package/test/inbox-refresh.spec.ts +534 -0
- package/test/managed-recipient-inbox.spec.ts +130 -0
- package/test/notificationMessages.spec.ts +13 -0
- package/test/openapi.spec.ts +61 -1
- package/test/presentations.spec.ts +54 -6
- package/test/profiles.spec.ts +67 -1
- package/test/refresh-send.spec.ts +1799 -0
- package/test/registry.spec.ts +56 -11
- package/test/share-content-client.contract.spec.ts +365 -0
- package/test/share-content-client.unit.spec.ts +462 -0
- package/test/share-link-abuse.unit.spec.ts +65 -0
- package/test/share-link-coordinator.neo4j.spec.ts +684 -0
- package/test/share-link-coordinator.unit.spec.ts +990 -0
- package/test/share-link-dependency-diagnostics.unit.spec.ts +127 -0
- package/test/share-link-lifecycle.neo4j.spec.ts +1268 -0
- package/test/share-link-lifecycle.unit.spec.ts +205 -0
- package/test/share-link-list-cursor.unit.spec.ts +86 -0
- package/test/share-link-list.neo4j.spec.ts +324 -0
- package/test/share-link-maintenance.neo4j.spec.ts +355 -0
- package/test/share-link-maintenance.unit.spec.ts +1113 -0
- package/test/share-link-owner-policy.unit.spec.ts +210 -0
- package/test/share-link-owner-route.unit.spec.ts +752 -0
- package/test/share-link-owner-runtime.unit.spec.ts +102 -0
- package/test/share-link-passcode.unit.spec.ts +29 -0
- package/test/share-link-policy.unit.spec.ts +135 -0
- package/test/share-link-presentation-metadata.unit.spec.ts +49 -0
- package/test/share-link-production-policy.unit.spec.ts +77 -0
- package/test/share-link-public-config.unit.spec.ts +64 -0
- package/test/share-link-public-http-adapter.unit.spec.ts +315 -0
- package/test/share-link-public-route.unit.spec.ts +800 -0
- package/test/share-link-receipt.neo4j.spec.ts +943 -0
- package/test/share-link-recovery.neo4j.spec.ts +935 -0
- package/test/share-link-recovery.unit.spec.ts +726 -0
- package/vitest.config.ts +10 -0
- package/vitest.inbox-e2e.config.ts +5 -1
- package/vitest.integration.config.ts +2 -0
- package/vitest.share-links-neo4j.config.ts +19 -0
- package/vitest.share-links-unit.config.ts +28 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"share-links.d.ts","sourceRoot":"","sources":["../../src/routes/share-links.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EACR,0BAA0B,EAC1B,oBAAoB,EAEvB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,KAAK,EACR,mBAAmB,EACnB,oBAAoB,EAEvB,MAAM,+BAA+B,CAAC;AAYvC,MAAM,MAAM,2BAA2B,GAAG;IACtC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,oBAAoB,CAAC;IAC3C,QAAQ,CAAC,QAAQ,EAAE,0BAA0B,CAAC;IAM9C,QAAQ,CAAC,cAAc,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEvF,QAAQ,CAAC,0BAA0B,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAM/E,QAAQ,CAAC,8BAA8B,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CACzF,CAAC;AAgHF,eAAO,MAAM,sBAAsB,GAC/B,iBAAiB,MAAM,OAAO,CAAC,2BAA2B,GAAG,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
|
|
|
1
|
-
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/routes/workflows.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/routes/workflows.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAgB,OAAO,EAAE,MAAM,SAAS,CAAC;AAuFhD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqF1B,CAAC;AA6uBH,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postmark.adapter.d.ts","sourceRoot":"","sources":["../../../../src/services/delivery/adapters/postmark.adapter.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"postmark.adapter.d.ts","sourceRoot":"","sources":["../../../../src/services/delivery/adapters/postmark.adapter.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAwCpE,qBAAa,eAAgB,YAAW,eAAe;IACnD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;gBAE1B,MAAM,EAAE,MAAM;IAIb,IAAI,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAwF5D,OAAO,CAAC,gBAAgB;CAiG3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postmark.adapter.test.d.ts","sourceRoot":"","sources":["../../../../src/services/delivery/adapters/postmark.adapter.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.factory.d.ts","sourceRoot":"","sources":["../../../src/services/registry/registry.factory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAIrD,eAAO,MAAM,kBAAkB,QAAO,
|
|
1
|
+
{"version":3,"file":"registry.factory.d.ts","sourceRoot":"","sources":["../../../src/services/registry/registry.factory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAIrD,eAAO,MAAM,kBAAkB,QAAO,eAWrC,CAAC"}
|
package/dist/types/activity.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export declare const CredentialActivityValidator: z.ZodObject<{
|
|
|
37
37
|
}>;
|
|
38
38
|
timestamp: z.ZodString;
|
|
39
39
|
actorProfileId: z.ZodOptional<z.ZodString>;
|
|
40
|
+
onBehalfOf: z.ZodOptional<z.ZodString>;
|
|
40
41
|
recipientType: z.ZodEnum<{
|
|
41
42
|
email: "email";
|
|
42
43
|
phone: "phone";
|
|
@@ -78,6 +79,7 @@ export declare const CredentialActivityWithDetailsValidator: z.ZodObject<{
|
|
|
78
79
|
}>;
|
|
79
80
|
timestamp: z.ZodString;
|
|
80
81
|
actorProfileId: z.ZodOptional<z.ZodString>;
|
|
82
|
+
onBehalfOf: z.ZodOptional<z.ZodString>;
|
|
81
83
|
recipientType: z.ZodEnum<{
|
|
82
84
|
email: "email";
|
|
83
85
|
phone: "phone";
|
|
@@ -130,6 +132,7 @@ export declare const PaginatedCredentialActivitiesValidator: z.ZodObject<{
|
|
|
130
132
|
}>;
|
|
131
133
|
timestamp: z.ZodString;
|
|
132
134
|
actorProfileId: z.ZodOptional<z.ZodString>;
|
|
135
|
+
onBehalfOf: z.ZodOptional<z.ZodString>;
|
|
133
136
|
recipientType: z.ZodEnum<{
|
|
134
137
|
email: "email";
|
|
135
138
|
phone: "phone";
|
|
@@ -186,6 +189,7 @@ export declare const CredentialActivityStatsValidator: z.ZodObject<{
|
|
|
186
189
|
}, z.core.$strip>;
|
|
187
190
|
export type CredentialActivityStats = z.infer<typeof CredentialActivityStatsValidator>;
|
|
188
191
|
export type LogCredentialActivityParams = {
|
|
192
|
+
onBehalfOf?: string;
|
|
189
193
|
actorProfileId?: string;
|
|
190
194
|
eventType: CredentialActivityEventType;
|
|
191
195
|
recipientType: CredentialActivityRecipientType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../../src/types/activity.ts"],"names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;;;;;;;;;;;;;;iBAejD,CAAC;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAC;AAEnG,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAIjD,CAAC;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAC;AAEnG,eAAO,MAAM,gCAAgC;;;;;;;;;;;iBAW3C,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAEvF,MAAM,MAAM,2BAA2B,GAAG;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,2BAA2B,CAAC;IACvC,aAAa,EAAE,+BAA+B,CAAC;IAC/C,mBAAmB,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,4BAA4B,CAAC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC"}
|
|
@@ -96,8 +96,8 @@ export type FlatDbTransactionType = Omit<DbTransactionType, 'guardianApproval' |
|
|
|
96
96
|
export declare const DbTermsValidator: z.ZodObject<{
|
|
97
97
|
id: z.ZodString;
|
|
98
98
|
status: z.ZodEnum<{
|
|
99
|
-
live: "live";
|
|
100
99
|
stale: "stale";
|
|
100
|
+
live: "live";
|
|
101
101
|
withdrawn: "withdrawn";
|
|
102
102
|
}>;
|
|
103
103
|
terms: z.ZodPrefault<z.ZodObject<{
|
|
@@ -2,19 +2,23 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const CredentialRefreshStateValidator: z.ZodEnum<{
|
|
3
3
|
active: "active";
|
|
4
4
|
revoked: "revoked";
|
|
5
|
+
pending_holder: "pending_holder";
|
|
5
6
|
awaiting_claim: "awaiting_claim";
|
|
6
7
|
}>;
|
|
7
8
|
export type CredentialRefreshState = z.infer<typeof CredentialRefreshStateValidator>;
|
|
8
9
|
export declare const CredentialRefreshRecordValidator: z.ZodObject<{
|
|
10
|
+
inboxCredentialId: z.ZodOptional<z.ZodString>;
|
|
11
|
+
inboxCredentialStatus: z.ZodOptional<z.ZodString>;
|
|
9
12
|
refreshId: z.ZodString;
|
|
10
13
|
issuerProfileId: z.ZodString;
|
|
11
14
|
issuerDid: z.ZodString;
|
|
12
15
|
holderProfileId: z.ZodOptional<z.ZodString>;
|
|
13
|
-
holderDid: z.ZodString
|
|
16
|
+
holderDid: z.ZodOptional<z.ZodString>;
|
|
14
17
|
credentialId: z.ZodString;
|
|
15
18
|
state: z.ZodEnum<{
|
|
16
19
|
active: "active";
|
|
17
20
|
revoked: "revoked";
|
|
21
|
+
pending_holder: "pending_holder";
|
|
18
22
|
awaiting_claim: "awaiting_claim";
|
|
19
23
|
}>;
|
|
20
24
|
currentVersion: z.ZodNumber;
|
|
@@ -30,6 +34,7 @@ export declare const CredentialRefreshRecordValidator: z.ZodObject<{
|
|
|
30
34
|
}>>;
|
|
31
35
|
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
32
36
|
updateSummary: z.ZodOptional<z.ZodString>;
|
|
37
|
+
credentialDisplayName: z.ZodOptional<z.ZodString>;
|
|
33
38
|
lastPublishedAt: z.ZodOptional<z.ZodString>;
|
|
34
39
|
notificationWindowKey: z.ZodOptional<z.ZodString>;
|
|
35
40
|
lastNotificationId: z.ZodOptional<z.ZodString>;
|
|
@@ -71,6 +76,7 @@ export declare const CredentialRefreshVersionNodeValidator: z.ZodObject<{
|
|
|
71
76
|
"signing-authority": "signing-authority";
|
|
72
77
|
}>;
|
|
73
78
|
updateSummary: z.ZodOptional<z.ZodString>;
|
|
79
|
+
credentialDisplayName: z.ZodOptional<z.ZodString>;
|
|
74
80
|
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
75
81
|
refreshIdempotencyKey: z.ZodOptional<z.ZodString>;
|
|
76
82
|
notificationOutcome: z.ZodOptional<z.ZodEnum<{
|
|
@@ -96,6 +102,7 @@ export declare const CredentialRefreshVersionRecordValidator: z.ZodObject<{
|
|
|
96
102
|
}>;
|
|
97
103
|
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
98
104
|
updateSummary: z.ZodOptional<z.ZodString>;
|
|
105
|
+
credentialDisplayName: z.ZodOptional<z.ZodString>;
|
|
99
106
|
version: z.ZodNumber;
|
|
100
107
|
refreshVersionKey: z.ZodString;
|
|
101
108
|
publishedAt: z.ZodString;
|
|
@@ -127,10 +134,12 @@ export declare const AdvanceCredentialRefreshHeadParamsValidator: z.ZodObject<{
|
|
|
127
134
|
"signing-authority": "signing-authority";
|
|
128
135
|
}>;
|
|
129
136
|
updateSummary: z.ZodOptional<z.ZodString>;
|
|
137
|
+
credentialDisplayName: z.ZodOptional<z.ZodString>;
|
|
130
138
|
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
131
139
|
expectedState: z.ZodOptional<z.ZodEnum<{
|
|
132
140
|
active: "active";
|
|
133
141
|
revoked: "revoked";
|
|
142
|
+
pending_holder: "pending_holder";
|
|
134
143
|
awaiting_claim: "awaiting_claim";
|
|
135
144
|
}>>;
|
|
136
145
|
notificationOutcome: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential-refresh.d.ts","sourceRoot":"","sources":["../../src/types/credential-refresh.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC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MAAM,2CAA2C;;;;;;;;;iBAKtD,CAAC;AACH,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CACpD,OAAO,2CAA2C,CACrD,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { InboxBatchStatus, IssueInboxCredentialBatch } from '@learncard/types';
|
|
2
|
+
import type { Context } from '.././routes/index';
|
|
3
|
+
export type BatchItem = {
|
|
4
|
+
id: string;
|
|
5
|
+
batchId: string;
|
|
6
|
+
index: number;
|
|
7
|
+
state: InboxBatchStatus['items'][number]['state'];
|
|
8
|
+
phase?: 'PREPARING' | 'ISSUING';
|
|
9
|
+
owner?: string;
|
|
10
|
+
leaseUntil?: number;
|
|
11
|
+
attempts: number;
|
|
12
|
+
result?: string;
|
|
13
|
+
replayKey: string;
|
|
14
|
+
duplicate: boolean;
|
|
15
|
+
correlation?: string;
|
|
16
|
+
};
|
|
17
|
+
export type InboxDispatchLease = {
|
|
18
|
+
id: string;
|
|
19
|
+
dispatchAt: number;
|
|
20
|
+
};
|
|
21
|
+
export type BatchJob = {
|
|
22
|
+
id: string;
|
|
23
|
+
issuer: string;
|
|
24
|
+
createdAt: number;
|
|
25
|
+
payload?: string;
|
|
26
|
+
completedAt?: number;
|
|
27
|
+
};
|
|
28
|
+
export type BatchJobPayload = {
|
|
29
|
+
batch: IssueInboxCredentialBatch;
|
|
30
|
+
context: Pick<Context, 'domain' | 'tenant'>;
|
|
31
|
+
scope?: string;
|
|
32
|
+
};
|
|
33
|
+
export type BatchReplayStore = {
|
|
34
|
+
get: (key: string) => Promise<string | null | undefined>;
|
|
35
|
+
setIfAbsent: (key: string, value: string, ttl: number) => Promise<'OK' | null | undefined>;
|
|
36
|
+
compareAndSet: (key: string, expected: string, value: string | null, ttl: number) => Promise<boolean | undefined>;
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=inbox-batch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inbox-batch.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,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IACzD,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IAC3F,aAAa,EAAE,CACX,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,GAAG,EAAE,MAAM,KACV,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;CACrC,CAAC"}
|
package/inbox-e2e-setup.ts
CHANGED
|
@@ -1,18 +1,70 @@
|
|
|
1
1
|
import { Neo4jContainer } from '@testcontainers/neo4j';
|
|
2
2
|
import { GenericContainer } from 'testcontainers';
|
|
3
3
|
import type { TestProject } from 'vitest/node';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
import { SQSClient, CreateQueueCommand, GetQueueAttributesCommand } from '@aws-sdk/client-sqs';
|
|
4
6
|
|
|
5
7
|
/** Random host ports and fresh containers keep these tests away from development data. */
|
|
6
8
|
export default async function setup({ provide }: TestProject): Promise<() => Promise<void>> {
|
|
7
9
|
const neo4j = await new Neo4jContainer('neo4j:5').start();
|
|
8
10
|
try {
|
|
9
11
|
const redis = await new GenericContainer('redis:7-alpine').withExposedPorts(6379).start();
|
|
12
|
+
let sqs: Awaited<ReturnType<GenericContainer['start']>> | undefined;
|
|
13
|
+
try {
|
|
14
|
+
sqs = await new GenericContainer('softwaremill/elasticmq-native:1.6.15')
|
|
15
|
+
.withCopyFilesToContainer([
|
|
16
|
+
{
|
|
17
|
+
source: fileURLToPath(new URL('./inbox-elasticmq.conf', import.meta.url)),
|
|
18
|
+
target: '/opt/elasticmq.conf',
|
|
19
|
+
},
|
|
20
|
+
])
|
|
21
|
+
.withExposedPorts(9324)
|
|
22
|
+
.start();
|
|
23
|
+
const endpoint = `http://${sqs.getHost()}:${sqs.getMappedPort(9324)}`;
|
|
24
|
+
const client = new SQSClient({
|
|
25
|
+
endpoint,
|
|
26
|
+
region: 'us-east-1',
|
|
27
|
+
credentials: { accessKeyId: 'local', secretAccessKey: 'local' },
|
|
28
|
+
});
|
|
29
|
+
try {
|
|
30
|
+
const dlq = await client.send(
|
|
31
|
+
new CreateQueueCommand({ QueueName: 'inbox-e2e-dlq' })
|
|
32
|
+
);
|
|
33
|
+
const dlqUrl = `${endpoint}${new URL(dlq.QueueUrl!).pathname}`;
|
|
34
|
+
const attributes = await client.send(
|
|
35
|
+
new GetQueueAttributesCommand({
|
|
36
|
+
QueueUrl: dlqUrl,
|
|
37
|
+
AttributeNames: ['QueueArn'],
|
|
38
|
+
})
|
|
39
|
+
);
|
|
40
|
+
const queue = await client.send(
|
|
41
|
+
new CreateQueueCommand({
|
|
42
|
+
QueueName: 'inbox-e2e',
|
|
43
|
+
Attributes: {
|
|
44
|
+
VisibilityTimeout: '1800',
|
|
45
|
+
RedrivePolicy: JSON.stringify({
|
|
46
|
+
deadLetterTargetArn: attributes.Attributes!.QueueArn,
|
|
47
|
+
maxReceiveCount: '5',
|
|
48
|
+
}),
|
|
49
|
+
},
|
|
50
|
+
})
|
|
51
|
+
);
|
|
52
|
+
provide('inbox-queue-endpoint', endpoint);
|
|
53
|
+
provide('inbox-queue-url', `${endpoint}${new URL(queue.QueueUrl!).pathname}`);
|
|
54
|
+
provide('inbox-dead-letter-url', dlqUrl);
|
|
55
|
+
} finally {
|
|
56
|
+
client.destroy();
|
|
57
|
+
}
|
|
58
|
+
} catch (error) {
|
|
59
|
+
await Promise.all([redis.stop(), sqs?.stop()]);
|
|
60
|
+
throw error;
|
|
61
|
+
}
|
|
10
62
|
provide('neo4j-uri', neo4j.getBoltUri());
|
|
11
63
|
provide('neo4j-password', neo4j.getPassword());
|
|
12
64
|
provide('inbox-redis-host', redis.getHost());
|
|
13
65
|
provide('inbox-redis-port', redis.getMappedPort(6379));
|
|
14
66
|
return async () => {
|
|
15
|
-
await Promise.all([redis.stop(), neo4j.stop()]);
|
|
67
|
+
await Promise.all([redis.stop(), neo4j.stop(), sqs?.stop()]);
|
|
16
68
|
};
|
|
17
69
|
} catch (error) {
|
|
18
70
|
await neo4j.stop();
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
include classpath("application.conf")
|
|
2
|
+
node-address { protocol = http, host = localhost, port = 9324, context-path = "" }
|
|
3
|
+
# Compose uses these queues; isolated tests create their own inbox-e2e queues dynamically.
|
|
4
|
+
queues {
|
|
5
|
+
inbox-dlq { defaultVisibilityTimeout = 180 seconds }
|
|
6
|
+
inbox {
|
|
7
|
+
defaultVisibilityTimeout = 1800 seconds
|
|
8
|
+
deadLettersQueue { name = "inbox-dlq", maxReceiveCount = 5 }
|
|
9
|
+
}
|
|
10
|
+
}
|
package/lambda.ts
CHANGED
|
@@ -14,6 +14,7 @@ import skillsViewerApp from './src/skills-viewer';
|
|
|
14
14
|
import statusListsApp from './src/status-lists';
|
|
15
15
|
import credentialRefreshApp from './src/credential-refresh';
|
|
16
16
|
import { appRouter, createContext } from './src/app';
|
|
17
|
+
import { publicShareLinkCacheControlHeaders } from './src/routes';
|
|
17
18
|
import { deliverQueuedNotification } from './src/helpers/notificationQueue.helpers';
|
|
18
19
|
import { startSkillEmbeddingBackfill } from './src/helpers/skill-embedding.helpers';
|
|
19
20
|
import { createOpenApiAwsLambdaHandler } from './src/helpers/shim';
|
|
@@ -25,6 +26,10 @@ import {
|
|
|
25
26
|
import { environment } from './src/config/environment';
|
|
26
27
|
import { toServerlessApplication } from './src/helpers/serverlessApplication';
|
|
27
28
|
import { runInboxMaintenance } from './src/helpers/inbox-maintenance.helpers';
|
|
29
|
+
import {
|
|
30
|
+
inboxBatchResponseMeta,
|
|
31
|
+
withInboxBatchBodyLimit,
|
|
32
|
+
} from './src/helpers/inbox-batch-http.helpers';
|
|
28
33
|
|
|
29
34
|
Sentry.AWSLambda.init({
|
|
30
35
|
dsn: environment.SENTRY_DSN,
|
|
@@ -61,12 +66,14 @@ export const credentialRefreshHandler: typeof credentialRefreshProxy = async (ev
|
|
|
61
66
|
|
|
62
67
|
export const _openApiHandler = createOpenApiAwsLambdaHandler({
|
|
63
68
|
router: appRouter,
|
|
64
|
-
responseMeta:
|
|
69
|
+
responseMeta: meta => {
|
|
65
70
|
return {
|
|
71
|
+
...inboxBatchResponseMeta(meta),
|
|
66
72
|
headers: {
|
|
67
73
|
'Access-Control-Allow-Origin': '*',
|
|
68
74
|
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS',
|
|
69
75
|
'Access-Control-Allow-Headers': 'Authorization, Content-Type',
|
|
76
|
+
...publicShareLinkCacheControlHeaders(meta.paths),
|
|
70
77
|
},
|
|
71
78
|
};
|
|
72
79
|
},
|
|
@@ -74,21 +81,25 @@ export const _openApiHandler = createOpenApiAwsLambdaHandler({
|
|
|
74
81
|
onError: handleTrpcError,
|
|
75
82
|
});
|
|
76
83
|
|
|
77
|
-
export const _trpcHandler =
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
84
|
+
export const _trpcHandler = withInboxBatchBodyLimit(
|
|
85
|
+
awsLambdaRequestHandler({
|
|
86
|
+
allowMethodOverride: true,
|
|
87
|
+
router: appRouter,
|
|
88
|
+
createContext,
|
|
89
|
+
onError: handleTrpcError,
|
|
90
|
+
responseMeta: ({ paths }) => {
|
|
91
|
+
return {
|
|
92
|
+
headers: {
|
|
93
|
+
'Access-Control-Allow-Origin': '*',
|
|
94
|
+
'Access-Control-Allow-Methods': '*',
|
|
95
|
+
'Access-Control-Allow-Headers': 'authorization',
|
|
96
|
+
...publicShareLinkCacheControlHeaders(paths),
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
},
|
|
100
|
+
}),
|
|
101
|
+
'trpc'
|
|
102
|
+
);
|
|
92
103
|
|
|
93
104
|
export const openApiHandler = Sentry.AWSLambda.wrapHandler(
|
|
94
105
|
async (event: APIGatewayProxyEventV2, context: Context): Promise<APIGatewayProxyResultV2> => {
|
|
@@ -124,6 +135,43 @@ export const trpcHandler = Sentry.AWSLambda.wrapHandler(
|
|
|
124
135
|
}
|
|
125
136
|
);
|
|
126
137
|
|
|
138
|
+
export const inboxQueueWorker: SQSHandler = Sentry.AWSLambda.wrapHandler(async event => {
|
|
139
|
+
const { processInboxQueueMessage } = await import('./src/helpers/inbox-queue.helpers');
|
|
140
|
+
const batchItemFailures = [];
|
|
141
|
+
for (const record of event.Records) {
|
|
142
|
+
try {
|
|
143
|
+
await processInboxQueueMessage(record.body);
|
|
144
|
+
} catch {
|
|
145
|
+
console.error('Inbox worker message failed', { messageId: record.messageId });
|
|
146
|
+
batchItemFailures.push({ itemIdentifier: record.messageId });
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return { batchItemFailures } satisfies SQSBatchResponse;
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
export const inboxQueueDispatcher = Sentry.AWSLambda.wrapHandler(
|
|
153
|
+
async (_event: unknown, context: Context): Promise<void> => {
|
|
154
|
+
const { dispatchInboxJobs } = await import('./src/helpers/inbox-queue.helpers');
|
|
155
|
+
// Share one clock across publication and recovery, retaining five seconds for shutdown.
|
|
156
|
+
const deadline = Date.now() + Math.max(0, context.getRemainingTimeInMillis() - 5_000);
|
|
157
|
+
await dispatchInboxJobs(deadline);
|
|
158
|
+
}
|
|
159
|
+
);
|
|
160
|
+
|
|
161
|
+
export const inboxDeadLetterWorker: SQSHandler = Sentry.AWSLambda.wrapHandler(async event => {
|
|
162
|
+
const { processInboxDeadLetter } = await import('./src/helpers/inbox-queue.helpers');
|
|
163
|
+
const batchItemFailures = [];
|
|
164
|
+
for (const record of event.Records) {
|
|
165
|
+
try {
|
|
166
|
+
await processInboxDeadLetter(record.body);
|
|
167
|
+
} catch {
|
|
168
|
+
console.error('Inbox dead-letter processing failed', { messageId: record.messageId });
|
|
169
|
+
batchItemFailures.push({ itemIdentifier: record.messageId });
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return { batchItemFailures } satisfies SQSBatchResponse;
|
|
173
|
+
});
|
|
174
|
+
|
|
127
175
|
export const notificationsWorker: SQSHandler = Sentry.AWSLambda.wrapHandler(async event => {
|
|
128
176
|
const batchItemFailures = await Promise.all(
|
|
129
177
|
event.Records.map(async record => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@learncard/network-brain-service",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.19.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=24.12 <25"
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
"main": "dist/index.js",
|
|
10
10
|
"types": "dist/index.d.ts",
|
|
11
11
|
"scripts": {
|
|
12
|
+
"inbox:setup-queues": "bun scripts/setup-inbox-queues.ts",
|
|
13
|
+
"inbox:worker": "bun --conditions=development src/inbox-queue-local.ts",
|
|
12
14
|
"test": "vitest run --config vitest.config.ts",
|
|
13
15
|
"test:watch": "vitest --config vitest.config.ts",
|
|
14
16
|
"test:coverage": "vitest run --coverage --config vitest.config.ts",
|
|
@@ -17,6 +19,7 @@
|
|
|
17
19
|
"test:integration:watch": "vitest --config vitest.integration.config.ts",
|
|
18
20
|
"test:docker": "vitest run --config vitest.integration.config.ts",
|
|
19
21
|
"seed:dev-app": "bun scripts/seed-dev-app.ts",
|
|
22
|
+
"seed:demo-persona": "bun --conditions=development scripts/seed-demo-persona.ts",
|
|
20
23
|
"skill-frameworks": "bun scripts/skill-frameworks.ts",
|
|
21
24
|
"build": "shx rm -rf dist && node bundle.mjs && tsc --p tsconfig.build.json && tsc --showConfig --p tsconfig.build.json > tsconfig.temp.json && tsc-alias --replacer ./tsc-alias-replacer.cjs -p tsconfig.temp.json && shx rm tsconfig.temp.json",
|
|
22
25
|
"typecheck": "tsc --noEmit -p tsconfig.build.json && tsc --noEmit -p tsconfig.entrypoints.json",
|
|
@@ -59,27 +62,30 @@
|
|
|
59
62
|
"@digitalcredentials/issuer-registry-client": "^3.2.0-beta.5",
|
|
60
63
|
"@fastify/cors": "^11.2.0",
|
|
61
64
|
"@google/genai": "^1.27.0",
|
|
62
|
-
"@learncard/
|
|
63
|
-
"@learncard/
|
|
64
|
-
"@learncard/
|
|
65
|
-
"@learncard/
|
|
66
|
-
"@learncard/
|
|
67
|
-
"@learncard/didkit-plugin
|
|
68
|
-
"@learncard/
|
|
69
|
-
"@learncard/
|
|
70
|
-
"@learncard/
|
|
71
|
-
"@learncard/
|
|
72
|
-
"@learncard/
|
|
73
|
-
"@learncard/
|
|
74
|
-
"@learncard/
|
|
75
|
-
"@learncard/
|
|
76
|
-
"@learncard/vc-
|
|
65
|
+
"@learncard/credential-library": "2.0.5",
|
|
66
|
+
"@learncard/core": "9.4.37",
|
|
67
|
+
"@learncard/crypto-plugin": "1.1.37",
|
|
68
|
+
"@learncard/did-web-plugin": "1.1.37",
|
|
69
|
+
"@learncard/didkey-plugin": "1.1.37",
|
|
70
|
+
"@learncard/didkit-plugin": "1.10.2",
|
|
71
|
+
"@learncard/didkit-plugin-node": "0.3.2",
|
|
72
|
+
"@learncard/dynamic-loader-plugin": "1.1.37",
|
|
73
|
+
"@learncard/encryption-plugin": "1.1.37",
|
|
74
|
+
"@learncard/expiration-plugin": "1.2.37",
|
|
75
|
+
"@learncard/email-templates": "1.2.0",
|
|
76
|
+
"@learncard/helpers": "1.6.1",
|
|
77
|
+
"@learncard/learn-card-plugin": "1.2.37",
|
|
78
|
+
"@learncard/types": "5.22.0",
|
|
79
|
+
"@learncard/vc-plugin": "1.6.3",
|
|
80
|
+
"@learncard/vc-templates-plugin": "1.1.37",
|
|
77
81
|
"@sentry/serverless": "7.61.0",
|
|
78
82
|
"@trpc/server": "11.8.0",
|
|
79
83
|
"@types/lodash": "^4.14.191",
|
|
80
84
|
"base64url": "^3.0.1",
|
|
85
|
+
"bs58": "^5.0.0",
|
|
81
86
|
"cors": "^2.8.5",
|
|
82
87
|
"dotenv": "^16.0.3",
|
|
88
|
+
"hash-wasm": "^4.12.0",
|
|
83
89
|
"express": "^4.18.2",
|
|
84
90
|
"fastify": "^5.8.5",
|
|
85
91
|
"fastify-plugin": "^5.1.0",
|
|
@@ -91,6 +97,7 @@
|
|
|
91
97
|
"lodash": "^4.17.21",
|
|
92
98
|
"messagebird": "^4.0.1",
|
|
93
99
|
"multiformats": "^11.0.1",
|
|
100
|
+
"mongodb": "^6.2.0",
|
|
94
101
|
"mustache": "^4.2.0",
|
|
95
102
|
"neo4j-driver": "5.18.0",
|
|
96
103
|
"neogma": "1.13.0",
|
|
@@ -101,6 +108,7 @@
|
|
|
101
108
|
"tsc-alias": "^1.8.10",
|
|
102
109
|
"twilio": "^5.7.1",
|
|
103
110
|
"undici": "^6",
|
|
111
|
+
"tweetnacl": "^1.0.3",
|
|
104
112
|
"uuid": "^14.0.0",
|
|
105
113
|
"zod": "4.4.3",
|
|
106
114
|
"zod-openapi": "^5.0.1"
|