@learncard/network-brain-service 3.17.0 → 3.19.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.
- package/.env.example +4 -0
- package/AGENTS.md +177 -159
- package/CHANGELOG.md +148 -0
- package/README.md +26 -8
- package/compose.inbox.yml +7 -0
- package/dist/accesslayer/app-store-listing/relationships/read.d.ts.map +1 -1
- 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 +3 -2
- package/dist/accesslayer/consentflowcontract/relationships/create.d.ts.map +1 -1
- package/dist/accesslayer/consentflowcontract/relationships/read.d.ts +1 -0
- package/dist/accesslayer/consentflowcontract/relationships/read.d.ts.map +1 -1
- package/dist/accesslayer/consentflowcontract/relationships/update.d.ts +5 -3
- package/dist/accesslayer/consentflowcontract/relationships/update.d.ts.map +1 -1
- package/dist/accesslayer/credential/create.d.ts +2 -1
- package/dist/accesslayer/credential/create.d.ts.map +1 -1
- package/dist/accesslayer/credential/create.test.d.ts +2 -0
- package/dist/accesslayer/credential/create.test.d.ts.map +1 -0
- package/dist/accesslayer/credential/relationships/read.d.ts +1 -0
- package/dist/accesslayer/credential/relationships/read.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/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 +46 -0
- package/dist/config/environment.d.ts.map +1 -1
- package/dist/credential-refresh.d.ts.map +1 -1
- package/dist/didkit_wasm_bg.wasm +0 -0
- package/dist/helpers/activity.helpers.d.ts +4 -0
- package/dist/helpers/activity.helpers.d.ts.map +1 -1
- package/dist/helpers/boost-storage.helpers.test.d.ts +2 -0
- package/dist/helpers/boost-storage.helpers.test.d.ts.map +1 -0
- package/dist/helpers/boost.helpers.d.ts +3 -7
- 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 +4 -2
- package/dist/helpers/credential.helpers.d.ts.map +1 -1
- 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/issuedCredentialStatus.helpers.d.ts +5 -0
- package/dist/helpers/issuedCredentialStatus.helpers.d.ts.map +1 -0
- package/dist/helpers/notifications.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/shim.d.ts +1 -1
- package/dist/helpers/shim.d.ts.map +1 -1
- package/dist/helpers/signingAuthority.helpers.d.ts +3 -2
- package/dist/helpers/signingAuthority.helpers.d.ts.map +1 -1
- package/dist/helpers/signingAuthority.helpers.test.d.ts +2 -0
- package/dist/helpers/signingAuthority.helpers.test.d.ts.map +1 -0
- package/dist/helpers/status-list.helpers.d.ts.map +1 -1
- package/dist/helpers/status-list.helpers.test.d.ts +2 -0
- package/dist/helpers/status-list.helpers.test.d.ts.map +1 -0
- 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/ConsentFlowTerms.d.ts.map +1 -1
- package/dist/models/ConsentFlowTransaction.d.ts.map +1 -1
- package/dist/models/Credential.d.ts +1 -0
- package/dist/models/Credential.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/credential-refresh-constraints.d.ts.map +1 -1
- package/dist/openapi.d.ts.map +1 -1
- 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 +506 -12
- package/dist/routes/boosts.d.ts.map +1 -1
- package/dist/routes/contracts.d.ts +48 -2
- package/dist/routes/contracts.d.ts.map +1 -1
- package/dist/routes/credential-refreshes.d.ts +4 -4
- package/dist/routes/credential-refreshes.d.ts.map +1 -1
- package/dist/routes/credentials.d.ts +8 -2
- package/dist/routes/credentials.d.ts.map +1 -1
- package/dist/routes/did-metadata.d.ts +8 -8
- package/dist/routes/federation.d.ts +2 -2
- package/dist/routes/inbox.d.ts +973 -31
- package/dist/routes/inbox.d.ts.map +1 -1
- package/dist/routes/index.d.ts +47 -127
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/presentations.d.ts +6 -6
- package/dist/routes/storage.d.ts +63 -63
- package/dist/routes/test.d.ts +6 -0
- package/dist/routes/test.d.ts.map +1 -1
- package/dist/routes/workflows.d.ts +14 -14
- 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 +22 -8
- package/dist/types/consentflowcontract.d.ts.map +1 -1
- package/dist/types/credential-refresh.d.ts +10 -1
- package/dist/types/credential-refresh.d.ts.map +1 -1
- package/dist/types/credential.d.ts +7 -0
- package/dist/types/credential.d.ts.map +1 -1
- package/dist/types/did-metadata.d.ts +2 -2
- 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 +61 -16
- package/package.json +18 -16
- package/scripts/setup-inbox-queues.ts +60 -0
- package/serverless-local.yml +2 -0
- package/serverless.yml +75 -0
- package/src/accesslayer/app-store-listing/relationships/read.ts +4 -3
- package/src/accesslayer/auth-grant/read.ts +2 -1
- package/src/accesslayer/consentflowcontract/relationships/create.ts +15 -5
- package/src/accesslayer/consentflowcontract/relationships/read.ts +161 -63
- package/src/accesslayer/consentflowcontract/relationships/update.ts +43 -10
- package/src/accesslayer/credential/create.test.ts +141 -0
- package/src/accesslayer/credential/create.ts +27 -3
- 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/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 +26 -0
- package/src/credential-refresh.ts +5 -1
- package/src/docker-entry.ts +8 -0
- package/src/helpers/activity.helpers.ts +4 -0
- package/src/helpers/app-counter.helpers.ts +1 -1
- package/src/helpers/boost-storage.helpers.test.ts +242 -0
- package/src/helpers/boost.helpers.ts +58 -437
- 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 +385 -107
- package/src/helpers/credential.helpers.ts +6 -2
- package/src/helpers/finalize-inbox.helpers.ts +39 -22
- 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 +301 -50
- package/src/helpers/issuedCredentialStatus.helpers.ts +11 -0
- package/src/helpers/notifications.helpers.ts +4 -2
- package/src/helpers/rateLimit.helpers.ts +2 -5
- package/src/helpers/refresh-send-intent.helpers.ts +273 -0
- package/src/helpers/shim.ts +32 -31
- package/src/helpers/signingAuthority.helpers.test.ts +198 -0
- package/src/helpers/signingAuthority.helpers.ts +41 -18
- package/src/helpers/status-list.helpers.test.ts +77 -0
- package/src/helpers/status-list.helpers.ts +31 -8
- package/src/inbox-queue-local.ts +28 -0
- package/src/models/AuthGrant.ts +1 -0
- package/src/models/ConsentFlowTerms.ts +4 -0
- package/src/models/ConsentFlowTransaction.ts +4 -0
- package/src/models/Credential.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/credential-refresh-constraints.test.ts +8 -3
- package/src/models/credential-refresh-constraints.ts +5 -0
- package/src/openapi.ts +8 -0
- package/src/routes/act-as.test.ts +239 -0
- package/src/routes/app-store.ts +69 -52
- package/src/routes/auth-grants.ts +13 -11
- package/src/routes/boosts.ts +943 -120
- package/src/routes/contracts.ts +55 -7
- 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 +164 -88
- package/src/routes/skills.ts +1 -1
- package/src/routes/workflows.ts +80 -31
- package/src/services/delivery/adapters/postmark.adapter.test.ts +54 -0
- package/src/services/delivery/adapters/postmark.adapter.ts +12 -0
- package/src/services/registry/registry.factory.ts +2 -1
- package/src/types/activity.ts +2 -0
- package/src/types/consentflowcontract.ts +21 -3
- package/src/types/credential-refresh.ts +21 -2
- package/src/types/credential.ts +13 -1
- package/src/types/inbox-batch.ts +46 -0
- package/test/app-store-listing.spec.ts +66 -30
- package/test/atomic-counter.e2e.ts +12 -0
- package/test/auth-grant.spec.ts +21 -21
- package/test/bitstring-status-list.spec.ts +12 -9
- package/test/consentflow.spec.ts +453 -26
- package/test/credential-refresh-email.spec.ts +663 -0
- package/test/credential-refresh-publication.spec.ts +13 -5
- package/test/guardian-gated-routes.spec.ts +337 -180
- package/test/helpers/inbox-e2e-environment.ts +6 -0
- package/test/inbox-batch.spec.ts +1338 -0
- package/test/inbox-refresh.spec.ts +534 -0
- package/test/inbox-security.e2e.ts +48 -3
- package/test/openapi.spec.ts +41 -1
- package/test/refresh-send.spec.ts +1799 -0
- package/test/registry.spec.ts +56 -11
- package/test/revoke-suspend-per-instance.spec.ts +9 -1
- package/vitest.config.ts +13 -0
- package/vitest.inbox-e2e.config.ts +5 -1
- package/vitest.integration.config.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,153 @@
|
|
|
1
1
|
# @learncard/network-brain-service
|
|
2
2
|
|
|
3
|
+
## 3.19.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#1585](https://github.com/learningeconomy/LearnCard/pull/1585) [`0c1bf9a8a33e6392d5fd279479d9ab4fb0449b5e`](https://github.com/learningeconomy/LearnCard/commit/0c1bf9a8a33e6392d5fd279479d9ab4fb0449b5e) Thanks [@goblincore](https://github.com/goblincore)! - Send managed credential update emails to a bound holder's verified email (or a verified manager for managed accounts). Include the issuer display name and a bounded credential title, with a translated link to app notifications; exclude grades, subject data, and update summaries. Keep email failures independent of publication and in-app notifications, and persist a single delivery attempt per publication notification window so retries cannot send duplicate email.
|
|
8
|
+
|
|
9
|
+
Email delivery is best effort: a failed or ambiguous provider attempt is recorded and not retried within that window. A later material update in a new window can send another email. There is no background email retry worker.
|
|
10
|
+
|
|
11
|
+
Existing verified Universal Inbox recipients also receive an initial email pointing to their app notifications when delivery is not suppressed. Local claim and update links use the frontend address.
|
|
12
|
+
|
|
13
|
+
Preserve recipient profile identities when local webhook delivery normalizes notification DIDs, so the subsequent update-email lookup can still find verified contacts.
|
|
14
|
+
|
|
15
|
+
- [#1591](https://github.com/learningeconomy/LearnCard/pull/1591) [`928e587378b3674766cf58a8bbe1cbd4d66d3a9f`](https://github.com/learningeconomy/LearnCard/commit/928e587378b3674766cf58a8bbe1cbd4d66d3a9f) Thanks [@gerardopar](https://github.com/gerardopar)! - Add Universal Inbox batch issuance through `sendCredentialsViaInbox`, tRPC
|
|
16
|
+
`inbox.issueBatch`, and `POST /inbox/issue-batch`, with public batch input and result
|
|
17
|
+
validators/types, shared configuration defaults, ordered per-item outcomes, and
|
|
18
|
+
24-hour issuer-scoped idempotency keys. Later duplicate keys in one batch conflict
|
|
19
|
+
deterministically. Completed issuances include reconciliation IDs if replay storage
|
|
20
|
+
cannot be confirmed; side-effect-free preflight failures release their keys.
|
|
21
|
+
|
|
22
|
+
Enforce a 4 MiB JSON payload budget and atomic batch quota admission without
|
|
23
|
+
charging rejected batches. Batch submission returns HTTP 202 with a durable
|
|
24
|
+
receipt. Poll `GET /inbox/batches/{batchId}` or
|
|
25
|
+
`getInboxCredentialBatch` for ordered progress and outcomes. Batch-level request IDs
|
|
26
|
+
make submission retries safe. Jobs, quota admission, dispatch records, and encrypted
|
|
27
|
+
results are stored in Neo4j; a dedicated SQS queue processes items independently of
|
|
28
|
+
notifications. Submission retries report the current batch state. Transient preparation
|
|
29
|
+
and signing failures retry before delivery. Terminal batches release their original
|
|
30
|
+
payload and remain available for 30 days, including uncertain outcomes; unresolved
|
|
31
|
+
client-keyed replay reservations stay blocked for reconciliation after job expiry.
|
|
32
|
+
Orphaned internal reservations for unkeyed items are collected after job pruning.
|
|
33
|
+
Container-backed tests exercise Neo4j, Redis, and an SQS emulator, including worker
|
|
34
|
+
recovery, duplicate delivery, polling authorization, and submission replay.
|
|
35
|
+
|
|
36
|
+
The existing single-issue route now accepts `configuration.guardianEmail`, exposing
|
|
37
|
+
guardian approval to single-issue clients. Both routes reject guardian self-approval
|
|
38
|
+
case-insensitively. Rate-limit errors use `TOO_MANY_REQUESTS` (HTTP 429); remove stale
|
|
39
|
+
TypeScript casts to `BAD_REQUEST` from existing callers. Those casts did not change
|
|
40
|
+
the runtime status code.
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- [#1585](https://github.com/learningeconomy/LearnCard/pull/1585) [`0c1bf9a8a33e6392d5fd279479d9ab4fb0449b5e`](https://github.com/learningeconomy/LearnCard/commit/0c1bf9a8a33e6392d5fd279479d9ab4fb0449b5e) Thanks [@goblincore](https://github.com/goblincore)! - Managed refreshable sends through the standard send paths (LC-2198). `send({ type: 'boost', refresh: true })` now issues refreshable credentials for profile/DID recipients: with local signing the SDK asks the server to run every managed-send guard, create or reuse the boost and allocate the managed refresh service in one step, injects the service (with its inline JSON-LD context) before signing, and hands the signed credential to the server's unified send so activity/contract behavior and the canonical receipt are preserved; without local signing the request is served by the signing-authority path. Email/phone recipients now use Universal Inbox deferred issuance: allocate a stable refresh service at issue, queue unsigned updates in encrypted inbox escrow, and bind/sign the latest content at verified claim. The deferred receipt is returned at `inbox.refresh`; direct `inbox/issue` returns it at `refresh`.
|
|
45
|
+
|
|
46
|
+
`sendBoost` with literal `{ enableRefresh: true }` now returns `{ credentialUri, refresh }` instead of a plain URI string, where `refresh` is the metadata-only issuance receipt (refreshId, refreshService, credentialId, issuerDid, holderDid, credentialStatus) needed to publish future versions via `publishCredentialRefresh`. Legacy callers — boolean options, omitted options, or object options without `enableRefresh` — still receive the credential URI string; a dynamically typed `enableRefresh` degrades the result to `string | { credentialUri, refresh }`. Delivered managed credentials remain holder-encrypted even when `encrypt: false`. Pending Inbox content uses the existing service-readable encrypted escrow until claim, when it is wiped.
|
|
47
|
+
|
|
48
|
+
`@learncard/types` adds the `ManagedCredentialRefreshReceipt` validator plus optional `refresh` on the unified send input/response validators; `@learncard/helpers` adds the shared managed context preparation helpers (`prepareManagedRefreshContext`, `injectManagedRefreshService`) now also used by SDK `issueCredential` signing.
|
|
49
|
+
|
|
50
|
+
Refreshable `send` accepts an optional `idempotencyKey` so a whole call can be retried without duplicating the boost, refresh allocation or delivery.
|
|
51
|
+
|
|
52
|
+
Completed-send comparisons canonicalize nested result keys so equivalent receipts remain idempotent regardless of property insertion order. Keyed sends reuse the recipient validation already performed in the request.
|
|
53
|
+
|
|
54
|
+
Keyed pre-signed retries now recover the original result when delivery bound successfully but its intent result was not recorded, matching preparation and signing-authority retries. Pending receipt fallbacks use the holder's network profile DID consistently.
|
|
55
|
+
|
|
56
|
+
Signing a credential with a managed refresh service now rejects conflicting inline JSON-LD term definitions (including `authorization`) instead of producing a credential whose refresh terms are not correctly signed. Credentials without a managed service are unaffected.
|
|
57
|
+
|
|
58
|
+
Managed send and refresh publication recover from a stale local issuer DID document after signing-authority registration: if proof verification fails, the server refreshes the authenticated issuer's document and verifies once more without relaxing signature checks.
|
|
59
|
+
|
|
60
|
+
Universal Inbox accepts `refresh: true` and an issuance `idempotencyKey`; both claim paths bind the latest revision atomically. Publication keys survive claim, and issuer `getInboxCredential` exposes the metadata-only receipt with its bound holder DID.
|
|
61
|
+
|
|
62
|
+
- [#1585](https://github.com/learningeconomy/LearnCard/pull/1585) [`0c1bf9a8a33e6392d5fd279479d9ab4fb0449b5e`](https://github.com/learningeconomy/LearnCard/commit/0c1bf9a8a33e6392d5fd279479d9ab4fb0449b5e) Thanks [@goblincore](https://github.com/goblincore)! - Honor delegated boost issuance permissions for managed refresh delivery. Expire saved post-login destinations after 30 minutes, discard legacy untimed destinations, and clear superseded claim redirects during sign-in.
|
|
63
|
+
|
|
64
|
+
- [#1591](https://github.com/learningeconomy/LearnCard/pull/1591) [`928e587378b3674766cf58a8bbe1cbd4d66d3a9f`](https://github.com/learningeconomy/LearnCard/commit/928e587378b3674766cf58a8bbe1cbd4d66d3a9f) Thanks [@gerardopar](https://github.com/gerardopar)! - Support managed refresh through batch and item configuration, with item overrides including explicit false. Forward refresh options and template anchors to issuance, preserve caller permissions for background processing, and return refresh receipts in item results and replays.
|
|
65
|
+
|
|
66
|
+
- Updated dependencies [[`2991bd32b03e26736239dd8e586e2f720d9bcd45`](https://github.com/learningeconomy/LearnCard/commit/2991bd32b03e26736239dd8e586e2f720d9bcd45), [`0c1bf9a8a33e6392d5fd279479d9ab4fb0449b5e`](https://github.com/learningeconomy/LearnCard/commit/0c1bf9a8a33e6392d5fd279479d9ab4fb0449b5e), [`0c1bf9a8a33e6392d5fd279479d9ab4fb0449b5e`](https://github.com/learningeconomy/LearnCard/commit/0c1bf9a8a33e6392d5fd279479d9ab4fb0449b5e), [`3174c09b97fde6f7b5251390245038cf6b7ea9ba`](https://github.com/learningeconomy/LearnCard/commit/3174c09b97fde6f7b5251390245038cf6b7ea9ba), [`928e587378b3674766cf58a8bbe1cbd4d66d3a9f`](https://github.com/learningeconomy/LearnCard/commit/928e587378b3674766cf58a8bbe1cbd4d66d3a9f), [`928e587378b3674766cf58a8bbe1cbd4d66d3a9f`](https://github.com/learningeconomy/LearnCard/commit/928e587378b3674766cf58a8bbe1cbd4d66d3a9f)]:
|
|
67
|
+
- @learncard/types@5.21.0
|
|
68
|
+
- @learncard/helpers@1.6.0
|
|
69
|
+
- @learncard/vc-plugin@1.6.2
|
|
70
|
+
- @learncard/email-templates@1.1.0
|
|
71
|
+
- @learncard/core@9.4.36
|
|
72
|
+
- @learncard/did-web-plugin@1.1.36
|
|
73
|
+
- @learncard/didkey-plugin@1.1.36
|
|
74
|
+
- @learncard/didkit-plugin@1.10.1
|
|
75
|
+
- @learncard/didkit-plugin-node@0.3.1
|
|
76
|
+
- @learncard/encryption-plugin@1.1.36
|
|
77
|
+
- @learncard/learn-card-plugin@1.2.36
|
|
78
|
+
- @learncard/vc-templates-plugin@1.1.36
|
|
79
|
+
- @learncard/crypto-plugin@1.1.36
|
|
80
|
+
- @learncard/dynamic-loader-plugin@1.1.36
|
|
81
|
+
- @learncard/expiration-plugin@1.2.36
|
|
82
|
+
|
|
83
|
+
## 3.18.0
|
|
84
|
+
|
|
85
|
+
### Minor Changes
|
|
86
|
+
|
|
87
|
+
- [#1541](https://github.com/learningeconomy/LearnCard/pull/1541) [`20b3844ddb7e649c9964308214ec4c395e9fc8db`](https://github.com/learningeconomy/LearnCard/commit/20b3844ddb7e649c9964308214ec4c395e9fc8db) Thanks [@TaylorBeeston](https://github.com/TaylorBeeston)! - Support final-spec P-256 `ecdsa-rdfc-2019` verification in the rebuilt DIDKit engines and public proof options. Require authentication-purpose DIDAuth proofs in both VCALM exchange verification branches. Preserve existing EdDSA behavior and outgoing Ed25519 wallet suite negotiation; this does not add key-aware P-256 wallet production.
|
|
88
|
+
|
|
89
|
+
External VCALM responders must sign DIDAuth presentations with `proofPurpose: 'authentication'`, echo the requested `challenge` and `domain`, and use a verification method authorized for authentication by the holder's DID document. Presentations signed with `assertionMethod` (including the previous `issuePresentation` default) are now rejected by claim-link and inbox-claim exchanges. First-party LearnCard and ScoutPass responders already use authentication proofs.
|
|
90
|
+
|
|
91
|
+
Allow `created` to be omitted only on final `ecdsa-rdfc-2019` DataIntegrityProofs in shared VC/VP schemas, while preserving the timestamp requirement for other proof suites.
|
|
92
|
+
|
|
93
|
+
Inbox claims retain a holder-encrypted recovery copy and therefore also require a supported X25519 key-agreement method. A `did:web` holder can use P-256 for authentication and a separate X25519 key for delivery. Signing-only P-256 `did:key` holders remain supported by generic claim links, but cannot claim inbox deliveries. Failed delivery encryption now returns an error without consuming the pending credential or exchange challenge.
|
|
94
|
+
|
|
95
|
+
### Patch Changes
|
|
96
|
+
|
|
97
|
+
- [#1566](https://github.com/learningeconomy/LearnCard/pull/1566) [`e46c302eaed8b98686d21e2f3b5d11b189567304`](https://github.com/learningeconomy/LearnCard/commit/e46c302eaed8b98686d21e2f3b5d11b189567304) Thanks [@gerardopar](https://github.com/gerardopar)! - Restore sending pre-signed and ordinary credentials without a `boostId` claim.
|
|
98
|
+
Preserve the signed payload unchanged and reject explicit conflicting Boost claims;
|
|
99
|
+
credentials without signed association metadata do not gain Boost authenticity.
|
|
100
|
+
|
|
101
|
+
- [#1536](https://github.com/learningeconomy/LearnCard/pull/1536) [`b4f94f5a5ffbd52bad6cd26dc3dd627df8d5e6fb`](https://github.com/learningeconomy/LearnCard/commit/b4f94f5a5ffbd52bad6cd26dc3dd627df8d5e6fb) Thanks [@TaylorBeeston](https://github.com/TaylorBeeston)! - Return live, unexpired consent metadata for server-side AI authorization, preserving original adult grants and exposing current manager-backed guardian approval for child profiles. Record verified guardian approval with consent terms and audit transactions; require reapproval for legacy child grants or changed contracts. Bind client approval caching and request headers to the specific child, and prevent failed signing from authorizing a guarded action.
|
|
102
|
+
|
|
103
|
+
Require current app-owned consent when resolving learner context, including credential sharing exclusions and withdrawn or expired grants. The formatter client sends only selected storage URIs and personal-field names to the configured AI service, refreshes consented data for each request, and exposes the server's consent revision and cache metadata. Remove browser prompt caching and legacy DID-based AI authentication; invalidate sessions and WebSocket tickets across wallet or service changes, including in-flight negotiations.
|
|
104
|
+
|
|
105
|
+
Refresh guardian approval at final consent submission if it expired while editing. Issue standards-valid signed credentials in the learner-context benchmark so the formatter exercises real proof verification rather than accepting unverifiable fixtures.
|
|
106
|
+
|
|
107
|
+
Breaking partner-connect change (minor release while on 0.x): `LearnerContextCacheStatus` no longer includes `browser-hit` or `browser-miss`, and `LearnerContextTimingBreakdown` no longer exposes `cacheLookupMs` or `prewarmAgeMs`. Remove those browser-cache branches and timing reads. Use `backend-hit` / `backend-miss` for prompt responses and `structured` for structured-only responses; use `totalMs` / `sdkRoundTripMs` for end-to-end timing. Server cache hits still require current consent authorization; do not use cache status as permission to reuse a previous response.
|
|
108
|
+
|
|
109
|
+
- [#1566](https://github.com/learningeconomy/LearnCard/pull/1566) [`e46c302eaed8b98686d21e2f3b5d11b189567304`](https://github.com/learningeconomy/LearnCard/commit/e46c302eaed8b98686d21e2f3b5d11b189567304) Thanks [@gerardopar](https://github.com/gerardopar)! - feat: [LC-2155] - Eliminate CertifiedBoostCredential wrapper
|
|
110
|
+
|
|
111
|
+
Direct credentials use their signed Boost network URI for the trusted-network check.
|
|
112
|
+
Plaintext sends reject mismatched Boost IDs. Encrypted signing-authority issuance
|
|
113
|
+
includes all subjects and, for delegated consent AutoBoosts, the contract owner.
|
|
114
|
+
|
|
115
|
+
Compatibility limitation: pre-signed `signedCredential` payloads (both plaintext and
|
|
116
|
+
client-encrypted) are stored unchanged, without a server-generated wrapper or status
|
|
117
|
+
entries. This includes plaintext credentials from older SDKs or third-party issuers
|
|
118
|
+
that omit `credentialStatus`. Without embedded status entries or server-retained status
|
|
119
|
+
coordinates, network revocation changes the recipient relationship only and is not
|
|
120
|
+
reflected by a holder's `verifyCredential` call. Such integrations must publish their
|
|
121
|
+
own signed status-list updates or use server-managed signing-authority issuance with
|
|
122
|
+
a VC v2 template. Storage now warns for both plaintext and encrypted credentials when
|
|
123
|
+
status metadata is missing or empty, including VC v1 issuance results.
|
|
124
|
+
|
|
125
|
+
- [#1566](https://github.com/learningeconomy/LearnCard/pull/1566) [`e46c302eaed8b98686d21e2f3b5d11b189567304`](https://github.com/learningeconomy/LearnCard/commit/e46c302eaed8b98686d21e2f3b5d11b189567304) Thanks [@gerardopar](https://github.com/gerardopar)! - Encrypt signing-authority credentials using a single snapshot of each recipient's
|
|
126
|
+
X25519 keys. Keep DAG-JWE compatibility while eliminating repeated DID resolution
|
|
127
|
+
and post-encryption key-ID matching.
|
|
128
|
+
|
|
129
|
+
Carry status entries explicitly in serializable internal issuance results so copied
|
|
130
|
+
or cached credentials retain revocation metadata. Reject missing internal metadata,
|
|
131
|
+
and return false when persisted status JSON is malformed or fails validation.
|
|
132
|
+
|
|
133
|
+
Report an explicit Boost-authenticity warning when credential verification fails.
|
|
134
|
+
|
|
135
|
+
- Updated dependencies [[`20b3844ddb7e649c9964308214ec4c395e9fc8db`](https://github.com/learningeconomy/LearnCard/commit/20b3844ddb7e649c9964308214ec4c395e9fc8db), [`b4f94f5a5ffbd52bad6cd26dc3dd627df8d5e6fb`](https://github.com/learningeconomy/LearnCard/commit/b4f94f5a5ffbd52bad6cd26dc3dd627df8d5e6fb), [`19bb79b1355dd9de7f71554fdb608f38b78ed6bb`](https://github.com/learningeconomy/LearnCard/commit/19bb79b1355dd9de7f71554fdb608f38b78ed6bb)]:
|
|
136
|
+
- @learncard/didkit-plugin@1.10.0
|
|
137
|
+
- @learncard/didkit-plugin-node@0.3.0
|
|
138
|
+
- @learncard/types@5.20.0
|
|
139
|
+
- @learncard/core@9.4.35
|
|
140
|
+
- @learncard/helpers@1.5.1
|
|
141
|
+
- @learncard/did-web-plugin@1.1.35
|
|
142
|
+
- @learncard/didkey-plugin@1.1.35
|
|
143
|
+
- @learncard/encryption-plugin@1.1.35
|
|
144
|
+
- @learncard/learn-card-plugin@1.2.35
|
|
145
|
+
- @learncard/vc-plugin@1.6.1
|
|
146
|
+
- @learncard/vc-templates-plugin@1.1.35
|
|
147
|
+
- @learncard/crypto-plugin@1.1.35
|
|
148
|
+
- @learncard/dynamic-loader-plugin@1.1.35
|
|
149
|
+
- @learncard/expiration-plugin@1.2.35
|
|
150
|
+
|
|
3
151
|
## 3.17.0
|
|
4
152
|
|
|
5
153
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -2,16 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
This service exposes the LearnCard Network API and local Neo4j-backed skills flows.
|
|
4
4
|
|
|
5
|
+
## Live consent data for AI consumers
|
|
6
|
+
|
|
7
|
+
`getConsentedDataForDid` returns data from live grants and authorized one-time grants (`oneTime: true`, stored with `status: 'stale'`) between the authenticated contract owner and the requested profile. Withdrawn grants and other stale grants are excluded. Term, contract and category expirations are enforced; empty expiry values mean no expiry, while malformed nonempty dates never authorize access. One-time means a fixed sharing grant, not a destructive read-once API; withdrawal still revokes subsequent retrieval. Malformed legacy terms are omitted rather than authorizing data or failing every grant in the response.
|
|
8
|
+
|
|
9
|
+
- `termsUri`, `contractUri`, `status` and `terms` identify the current grant and its permissions.
|
|
10
|
+
- `createdAt` is the original grant time when known. `date` is the latest consent update time. No historical timestamp is invented.
|
|
11
|
+
- `contractUpdatedAt` identifies the current contract revision; `contractExpiresAt` and `reasonForAccessing` report existing contract metadata. These fields do not imply acceptance of a new privacy notice.
|
|
12
|
+
- `guardian.required` uses LearnCard's existing manager-based guardian rules, including authorized role-based managers. Persisted guardian approval history keeps this requirement after manager removal.
|
|
13
|
+
- `guardian.approved` requires a recorded approval for the current contract revision and a guardian who is still an authorized manager. Approval is server-recorded alongside the exact consent terms and transaction; it is not accepted from client-supplied terms. Raw approval presentations are not retained.
|
|
14
|
+
|
|
15
|
+
Existing adult grants remain eligible without new guardian or privacy-notice attestations. Existing managed-profile grants without recorded approval return `required: true, approved: false` and need a guardian-confirmed consent update. Consumers must enforce that distinction before AI processing; receipt metadata alone is not an authorization check.
|
|
16
|
+
|
|
17
|
+
Removing all managers is not an adulthood transition. Guardian approval history survives withdrawal, so withdrawing and consenting again does **not** remove the requirement. Recovery first requires current manager authority: the existing verified-contact / `inbox.claimPendingGuardianLinks` flow can relink a guardian only when their verified email matches an eligible guardian-approved inbox credential for that child. Without that evidence, account/guardian-link recovery is a prerequisite; there is no generic self-service existing-child manager restoration or adult-conversion endpoint here. After authority is restored, obtain fresh approval to update live terms or reconsent withdrawn terms.
|
|
18
|
+
|
|
19
|
+
Guardian presentations retain a maximum five-minute signed lifetime. The backend permits up to 60 seconds of issuance clock skew, but never accepts a presentation whose signed expiry has passed. The client aligns its cache to the signed expiry and stops reusing it 60 seconds early; final submission rechecks approval after credential preparation. Verification still requires a valid JWS, no verification errors, matching signer/holder/claimed identity, child identity, and current manager authority. Nonfatal verifier warnings do not independently reject a valid approval; diagnostic logs contain fixed reason categories, not presentations or identities. This is LearnCard's existing guardian policy, not a new legal-guardianship determination.
|
|
20
|
+
|
|
21
|
+
Deploy this producer before an AI Passport consumer that requires the new guardian metadata.
|
|
22
|
+
|
|
5
23
|
## Skill framework seeding
|
|
6
24
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
25
|
+
- **Auto-bootstrap**: on local/dev startup, if no `SkillFramework` nodes exist, the service seeds a default public set owned by the `network-seed` profile.
|
|
26
|
+
- **Disable auto-bootstrap**: set `SKIP_SKILL_FRAMEWORK_SEED=true`.
|
|
27
|
+
- **Re-seed manually**: run `bun run skill-frameworks seed [local|staging]` from `services/learn-card-network/brain-service`.
|
|
28
|
+
- **Add an admin**: run `bun run skill-frameworks add-admin [local|staging]` and enter the profile id when prompted.
|
|
29
|
+
- **Default environment**: if you omit the stage, the command defaults to `local` and prints a note.
|
|
30
|
+
- **Production safety**: the manual seed command still refuses to run in production unless `--force` is provided.
|
|
13
31
|
|
|
14
32
|
## Notes
|
|
15
33
|
|
|
16
|
-
-
|
|
17
|
-
-
|
|
34
|
+
- The default fixture is idempotent by framework and skill ID, so running the seed command multiple times does not duplicate data.
|
|
35
|
+
- Seeded skills are compatible with the existing skill search, boost alignment, and OBv3 alignment flows.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../../src/accesslayer/app-store-listing/relationships/read.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAS,aAAa,EAAE,MAAM,SAAS,CAAC;AAK/C,eAAO,MAAM,wBAAwB,GACjC,iBAAiB,MAAM,KACxB,OAAO,CAAC,eAAe,GAAG,IAAI,CAchC,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAU,WAAW,MAAM,KAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAa7F,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAChC,WAAW,MAAM,EACjB,mBAAmB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,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CAAC;AAEF,eAAO,MAAM,oCAAoC,GAC7C,WAAW,MAAM,EACjB,WAAW,MAAM,EACjB,SAAS;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,KAC5C,OAAO,CACN,KAAK,CAAC;IACF,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,CAAC;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC,CAwDL,CAAC;AAEF,eAAO,MAAM,sCAAsC,GAC/C,WAAW,MAAM,EACjB,WAAW,MAAM,KAClB,OAAO,CAAC,MAAM,CAWhB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAU,WAAW,MAAM,KAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAwB5F,CAAC"}
|
|
@@ -12,5 +12,6 @@ export declare const isAuthGrantAssociatedWithProfile: (authGrantId: string, pro
|
|
|
12
12
|
export declare const isAuthGrantChallengeValidForDID: (challenge: string, did: string) => Promise<{
|
|
13
13
|
isChallengeValid: boolean;
|
|
14
14
|
scope: string;
|
|
15
|
+
actAs?: string;
|
|
15
16
|
}>;
|
|
16
17
|
//# sourceMappingURL=read.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../src/accesslayer/auth-grant/read.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,aAAa,EAA4B,MAAM,kBAAkB,CA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AEF,eAAO,MAAM,gCAAgC,GACzC,aAAa,MAAM,EACnB,WAAW,MAAM,KAClB,OAAO,CAAC,OAAO,CAmBjB,CAAC;AAEF,eAAO,MAAM,+BAA+B,GACxC,WAAW,MAAM,EACjB,KAAK,MAAM,KACZ,OAAO,CAAC;IAAE,gBAAgB,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CA8BtE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConsentFlowTerms as ConsentFlowTermsType, LCNProfile } from '@learncard/types';
|
|
1
|
+
import { ConsentFlowTerms as ConsentFlowTermsType, ConsentFlowGuardianApproval, LCNProfile } from '@learncard/types';
|
|
2
2
|
import { DbContractType } from '../../../types/consentflowcontract';
|
|
3
3
|
import { BoostType } from '../../../types/boost';
|
|
4
4
|
export declare const setCreatorForContract: (contract: DbContractType, profile: LCNProfile) => Promise<number>;
|
|
@@ -10,10 +10,11 @@ export declare const setRelatedBoostForContract: (contract: DbContractType, boos
|
|
|
10
10
|
export declare const consentToContract: (consenter: LCNProfile, { contract, contractOwner }: {
|
|
11
11
|
contract: DbContractType;
|
|
12
12
|
contractOwner: LCNProfile;
|
|
13
|
-
}, { terms: _terms, expiresAt, oneTime, }: {
|
|
13
|
+
}, { terms: _terms, expiresAt, oneTime, guardianApproval, }: {
|
|
14
14
|
terms: ConsentFlowTermsType;
|
|
15
15
|
expiresAt?: string;
|
|
16
16
|
liveSyncing?: boolean;
|
|
17
17
|
oneTime?: boolean;
|
|
18
|
+
guardianApproval?: ConsentFlowGuardianApproval;
|
|
18
19
|
}, domain: string) => Promise<boolean>;
|
|
19
20
|
//# sourceMappingURL=create.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/accesslayer/consentflowcontract/relationships/create.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,gBAAgB,IAAI,oBAAoB,
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/accesslayer/consentflowcontract/relationships/create.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,gBAAgB,IAAI,oBAAoB,EAExC,2BAA2B,EAE3B,UAAU,EAGb,MAAM,kBAAkB,CAAC;AAS1B,OAAO,EAAE,cAAc,EAAmB,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAiBxC,eAAO,MAAM,qBAAqB,GAAU,UAAU,cAAc,EAAE,SAAS,UAAU,oBAQxF,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAChC,UAAU,cAAc,EACxB,OAAO,SAAS,EAChB,kBAAkB;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EACpD,SAAS,MAAM,oBAWlB,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACnC,UAAU,cAAc,EACxB,OAAO,SAAS,KACjB,OAAO,CAAC,IAAI,CAKd,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC1B,WAAW,UAAU,EACrB,6BAA6B;IAAE,QAAQ,EAAE,cAAc,CAAC;IAAC,aAAa,EAAE,UAAU,CAAA;CAAE,EACpF,0DAKG;IACC,KAAK,EAAE,oBAAoB,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,2BAA2B,CAAC;CAClD,EACD,QAAQ,MAAM,qBAgRjB,CAAC"}
|
|
@@ -5,6 +5,7 @@ import { ProfileType } from '../../../types/profile';
|
|
|
5
5
|
import { CredentialType } from '../../../types/credential';
|
|
6
6
|
export declare const isProfileConsentFlowContractAdmin: (profile: ProfileType, contract: DbContractType) => Promise<boolean>;
|
|
7
7
|
export declare const hasProfileConsentedToContract: (profile: ProfileType | string, contract: DbContractType) => Promise<boolean>;
|
|
8
|
+
export declare const hasGuardianApprovalHistory: (terms: DbTermsType) => Promise<boolean>;
|
|
8
9
|
export declare const getContractDetailsById: (id: string) => Promise<{
|
|
9
10
|
contractOwner: LCNProfile;
|
|
10
11
|
contract: DbContractType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../../src/accesslayer/consentflowcontract/relationships/read.ts"],"names":[],"mappings":"AAeA,OAAO,EACH,WAAW,
|
|
1
|
+
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../../src/accesslayer/consentflowcontract/relationships/read.ts"],"names":[],"mappings":"AAeA,OAAO,EACH,WAAW,EAGX,cAAc,EAId,iBAAiB,EACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACH,uBAAuB,EACvB,6BAA6B,EAC7B,wBAAwB,EACxB,0BAA0B,EAC1B,oBAAoB,EACpB,qBAAqB,EACrB,4BAA4B,EAC5B,oBAAoB,EACpB,UAAU,EACb,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAI5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAMlD,eAAO,MAAM,iCAAiC,GAC1C,SAAS,WAAW,EACpB,UAAU,cAAc,KACzB,OAAO,CAAC,OAAO,CAYjB,CAAC;AAEF,eAAO,MAAM,6BAA6B,GACtC,SAAS,WAAW,GAAG,MAAM,EAC7B,UAAU,cAAc,KACzB,OAAO,CAAC,OAAO,CAiBjB,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAU,OAAO,WAAW,KAAG,OAAO,CAAC,OAAO,CAiBpF,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAC/B,IAAI,MAAM,KACX,OAAO,CAAC;IAAE,aAAa,EAAE,UAAU,CAAC;IAAC,QAAQ,EAAE,cAAc,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c,EAAE,CAAA;CAAE,CAAC,EAAE,CA0CnE,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAU,YAAY,MAAM,KAAG,OAAO,CAAC,aAAa,EAAE,CAa7F,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACjC,YAAY,MAAM,EAClB,QAAQ,MAAM,KACf,OAAO,CAAC,MAAM,EAAE,CAGlB,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAU,UAAU,cAAc,KAAG,OAAO,CAAC,WAAW,EAAE,CAiB3F,CAAC"}
|
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
import { ConsentFlowTerms as ConsentFlowTermsType, LCNProfile } from '@learncard/types';
|
|
1
|
+
import { ConsentFlowTerms as ConsentFlowTermsType, ConsentFlowGuardianApproval, LCNProfile } from '@learncard/types';
|
|
2
2
|
import { DbContractType, DbTermsType } from '../../../types/consentflowcontract';
|
|
3
3
|
export declare const reconsentTerms: (relationship: {
|
|
4
4
|
terms: DbTermsType;
|
|
5
5
|
consenter: LCNProfile;
|
|
6
6
|
contract: DbContractType;
|
|
7
7
|
contractOwner: LCNProfile;
|
|
8
|
-
}, { terms, expiresAt, oneTime, }: {
|
|
8
|
+
}, { terms, expiresAt, oneTime, guardianApproval, }: {
|
|
9
9
|
terms: ConsentFlowTermsType;
|
|
10
10
|
expiresAt?: string;
|
|
11
11
|
oneTime?: boolean;
|
|
12
|
+
guardianApproval?: ConsentFlowGuardianApproval;
|
|
12
13
|
}, domain: string) => Promise<boolean>;
|
|
13
14
|
export declare const updateTerms: (relationship: {
|
|
14
15
|
terms: DbTermsType;
|
|
15
16
|
consenter: LCNProfile;
|
|
16
17
|
contract: DbContractType;
|
|
17
18
|
contractOwner: LCNProfile;
|
|
18
|
-
}, { terms, expiresAt, oneTime, }: {
|
|
19
|
+
}, { terms, expiresAt, oneTime, guardianApproval, }: {
|
|
19
20
|
terms: ConsentFlowTermsType;
|
|
20
21
|
expiresAt?: string;
|
|
21
22
|
oneTime?: boolean;
|
|
23
|
+
guardianApproval?: ConsentFlowGuardianApproval;
|
|
22
24
|
}, domain: string) => Promise<boolean>;
|
|
23
25
|
export declare const withdrawTerms: (relationship: {
|
|
24
26
|
terms: DbTermsType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../src/accesslayer/consentflowcontract/relationships/update.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,gBAAgB,IAAI,oBAAoB,
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../src/accesslayer/consentflowcontract/relationships/update.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,gBAAgB,IAAI,oBAAoB,EAExC,2BAA2B,EAE3B,UAAU,EAGb,MAAM,kBAAkB,CAAC;AAO1B,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AASxE,eAAO,MAAM,cAAc,GACvB,cAAc;IACV,KAAK,EAAE,WAAW,CAAC;IACnB,SAAS,EAAE,UAAU,CAAC;IACtB,QAAQ,EAAE,cAAc,CAAC;IACzB,aAAa,EAAE,UAAU,CAAC;CAC7B,EACD,kDAKG;IACC,KAAK,EAAE,oBAAoB,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,2BAA2B,CAAC;CAClD,EACD,QAAQ,MAAM,KACf,OAAO,CAAC,OAAO,CA8MjB,CAAC;AAEF,eAAO,MAAM,WAAW,GACpB,cAAc;IACV,KAAK,EAAE,WAAW,CAAC;IACnB,SAAS,EAAE,UAAU,CAAC;IACtB,QAAQ,EAAE,cAAc,CAAC;IACzB,aAAa,EAAE,UAAU,CAAC;CAC7B,EACD,kDAKG;IACC,KAAK,EAAE,oBAAoB,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,2BAA2B,CAAC;CAClD,EACD,QAAQ,MAAM,KACf,OAAO,CAAC,OAAO,CAiNjB,CAAC;AAEF,eAAO,MAAM,aAAa,GAAU,cAAc;IAC9C,KAAK,EAAE,WAAW,CAAC;IACnB,SAAS,EAAE,UAAU,CAAC;IACtB,QAAQ,EAAE,cAAc,CAAC;IACzB,aAAa,EAAE,UAAU,CAAC;CAC7B,KAAG,OAAO,CAAC,OAAO,CAqDlB,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAClC,cAAc;IACV,KAAK,EAAE,WAAW,CAAC;IACnB,SAAS,EAAE,UAAU,CAAC;IACtB,QAAQ,EAAE,cAAc,CAAC;IACzB,aAAa,EAAE,UAAU,CAAC;CAC7B,EACD,YAAY,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,KACrC,OAAO,CAAC,OAAO,CAoHjB,CAAC;AAEF,eAAO,MAAM,gCAAgC,GACzC,OAAO,WAAW,EAClB,aAAa,MAAM,EAAE,KACtB,OAAO,CAAC,MAAM,CAkEhB,CAAC;AAEF,eAAO,MAAM,gCAAgC,GACzC,IAAI,MAAM,EACV,WAAW,MAAM,EACjB,QAAQ,SAAS,GAAG,UAAU,GAAG,QAAQ,KAC1C,OAAO,CAAC,IAAI,CAOd,CAAC;AAEF,eAAO,MAAM,8BAA8B,GACvC,IAAI,MAAM,EACV,WAAW,MAAM,EACjB,SAAS,SAAS,GAAG,UAAU,GAAG,QAAQ,EAC1C,aAAa,MAAM,GAAG,QAAQ,GAAG,IAAI,kBAgBxC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { UnsignedVC, VC, JWE } from '@learncard/types';
|
|
2
|
+
import type { IssuedCredential } from '../../types/credential';
|
|
2
3
|
import { CredentialInstance } from '../.././models/index';
|
|
3
|
-
export declare const storeCredential: (
|
|
4
|
+
export declare const storeCredential: (input: UnsignedVC | VC | JWE | IssuedCredential) => Promise<CredentialInstance>;
|
|
4
5
|
//# sourceMappingURL=create.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/accesslayer/credential/create.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/accesslayer/credential/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,UAAU,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAI1F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,EAAc,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAEzD,eAAO,MAAM,eAAe,GACxB,OAAO,UAAU,GAAG,EAAE,GAAG,GAAG,GAAG,gBAAgB,KAChD,OAAO,CAAC,kBAAkB,CAyB5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.test.d.ts","sourceRoot":"","sources":["../../../src/accesslayer/credential/create.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../../src/accesslayer/credential/relationships/read.ts"],"names":[],"mappings":"AACA,OAAO,EACH,kBAAkB,EAElB,oBAAoB,EAOvB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAO9D,eAAO,MAAM,0BAA0B,GACnC,IAAI,MAAM,EACV,IAAI,WAAW,KAChB,OAAO,CACJ;IACI,MAAM,EAAE,WAAW,GAAG,mBAAmB,CAAC;IAC1C,YAAY,EAAE,oBAAoB,CAAC,gBAAgB,CAAC,CAAC,wBAAwB,CAAC,CAAC;IAC/E,MAAM,EAAE,kBAAkB,CAAC;CAC9B,GACD,SAAS,CAuCd,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAC3B,YAAY,kBAAkB,KAC/B,OAAO,CAAC,WAAW,GAAG,SAAS,CAUjC,CAAC;AAEF,eAAO,MAAM,8BAA8B,GACvC,cAAc,MAAM,EACpB,SAAS,WAAW,EACpB,wBAAsB,KACvB,OAAO,CAAC,OAAO,CAkBjB,CAAC;AASF,eAAO,MAAM,8BAA8B,GACvC,SAAS,MAAM,EACf,UAAS;IACL,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACjB;;;;;;IAiET,CAAC;AASF,eAAO,MAAM,gCAAgC,GACzC,WAAW,MAAM,EACjB,UAAS;IACL,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,OAAO,CAAC;CACxB
|
|
1
|
+
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../../src/accesslayer/credential/relationships/read.ts"],"names":[],"mappings":"AACA,OAAO,EACH,kBAAkB,EAElB,oBAAoB,EAOvB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAO9D,eAAO,MAAM,0BAA0B,GACnC,IAAI,MAAM,EACV,IAAI,WAAW,KAChB,OAAO,CACJ;IACI,MAAM,EAAE,WAAW,GAAG,mBAAmB,CAAC;IAC1C,YAAY,EAAE,oBAAoB,CAAC,gBAAgB,CAAC,CAAC,wBAAwB,CAAC,CAAC;IAC/E,MAAM,EAAE,kBAAkB,CAAC;CAC9B,GACD,SAAS,CAuCd,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAC3B,YAAY,kBAAkB,KAC/B,OAAO,CAAC,WAAW,GAAG,SAAS,CAUjC,CAAC;AAEF,eAAO,MAAM,8BAA8B,GACvC,cAAc,MAAM,EACpB,SAAS,WAAW,EACpB,wBAAsB,KACvB,OAAO,CAAC,OAAO,CAkBjB,CAAC;AASF,eAAO,MAAM,8BAA8B,GACvC,SAAS,MAAM,EACf,UAAS;IACL,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACjB;;;;;;IAiET,CAAC;AASF,eAAO,MAAM,gCAAgC,GACzC,WAAW,MAAM,EACjB,UAAS;IACL,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,OAAO,CAAC;CACxB;;;;;;;;;;;;IA6ET,CAAC;AAEF,eAAO,MAAM,+BAA+B,GACxC,YAAY,kBAAkB,KAC/B,OAAO,CAAC,MAAM,GAAG,SAAS,CAgB5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/accesslayer/credential-activity/create.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAQ7D,eAAO,MAAM,wBAAwB,GACjC,QAAQ,2BAA2B,KACpC,OAAO,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/accesslayer/credential-activity/create.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAQ7D,eAAO,MAAM,wBAAwB,GACjC,QAAQ,2BAA2B,KACpC,OAAO,CAAC,MAAM,CAqDhB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type CredentialRefreshEmailDeliveryState = 'claimed' | 'delivered' | 'failed';
|
|
2
|
+
export declare const claimCredentialRefreshEmailDelivery: (params: {
|
|
3
|
+
refreshId: string;
|
|
4
|
+
windowKey: string;
|
|
5
|
+
}) => Promise<"claimed" | "duplicate">;
|
|
6
|
+
export declare const finalizeCredentialRefreshEmailDelivery: (params: {
|
|
7
|
+
refreshId: string;
|
|
8
|
+
windowKey: string;
|
|
9
|
+
state: Extract<CredentialRefreshEmailDeliveryState, "delivered" | "failed">;
|
|
10
|
+
}) => Promise<void>;
|
|
11
|
+
export declare const getCredentialRefreshEmailDelivery: (refreshId: string, windowKey: string) => Promise<{
|
|
12
|
+
deliveryKey: string;
|
|
13
|
+
refreshId: string;
|
|
14
|
+
windowKey: string;
|
|
15
|
+
state: CredentialRefreshEmailDeliveryState;
|
|
16
|
+
attempts: number;
|
|
17
|
+
} | null>;
|
|
18
|
+
//# sourceMappingURL=email-delivery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-delivery.d.ts","sourceRoot":"","sources":["../../../src/accesslayer/credential-refresh/email-delivery.ts"],"names":[],"mappings":"AAkBA,MAAM,MAAM,mCAAmC,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;AAkBrF,eAAO,MAAM,mCAAmC,GAAU,QAAQ;IAC9D,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACrB,KAAG,OAAO,CAAC,SAAS,GAAG,WAAW,CA6BlC,CAAC;AAGF,eAAO,MAAM,sCAAsC,GAAU,QAAQ;IACjE,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC,mCAAmC,EAAE,WAAW,GAAG,QAAQ,CAAC,CAAC;CAC/E,KAAG,OAAO,CAAC,IAAI,CASf,CAAC;AAGF,eAAO,MAAM,iCAAiC,GAC1C,WAAW,MAAM,EACjB,WAAW,MAAM,KAClB,OAAO,CAAC;IACP,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,mCAAmC,CAAC;IAC3C,QAAQ,EAAE,MAAM,CAAC;CACpB,GAAG,IAAI,CAmBP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/accesslayer/credential-refresh/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/accesslayer/credential-refresh/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../src/accesslayer/credential-refresh/read.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,uBAAuB,EAEvB,4BAA4B,EAE5B,8BAA8B,EAEjC,MAAM,0BAA0B,CAAC;AAgBlC,eAAO,MAAM,oBAAoB,GAC7B,WAAW,MAAM,KAClB,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAWxC,CAAC;AAGF,eAAO,MAAM,wBAAwB,GACjC,WAAW,MAAM,KAClB,OAAO,CAAC,4BAA4B,GAAG,IAAI,CAY7C,CAAC;AAGF,eAAO,MAAM,2BAA2B,GACpC,WAAW,MAAM,EACjB,SAAS,MAAM,KAChB,OAAO,CAAC,4BAA4B,GAAG,IAAI,CAY7C,CAAC;AAGF,eAAO,MAAM,2CAA2C,GACpD,WAAW,MAAM,EACjB,gBAAgB,MAAM,KACvB,OAAO,CAAC,4BAA4B,GAAG,IAAI,CAW7C,CAAC;AAEF,MAAM,MAAM,mCAAmC,GAAG;IAE9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG;IAC7C,OAAO,EAAE,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AAC,mCAAmC,GAAG,IAAI,CAoBpD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/accesslayer/credential-refresh/update.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,kCAAkC,EAElC,kCAAkC,EAClC,uBAAuB,EAEvB,sBAAsB,EACzB,MAAM,0BAA0B,CAAC;AAuDlC,eAAO,MAAM,4BAA4B,GACrC,QAAQ,kCAAkC,KAC3C,OAAO,CAAC,kCAAkC,
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/accesslayer/credential-refresh/update.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,kCAAkC,EAElC,kCAAkC,EAClC,uBAAuB,EAEvB,sBAAsB,EACzB,MAAM,0BAA0B,CAAC;AAuDlC,eAAO,MAAM,4BAA4B,GACrC,QAAQ,kCAAkC,KAC3C,OAAO,CAAC,kCAAkC,CA2K5C,CAAC;AASF,eAAO,MAAM,mCAAmC,GAAU,QAAQ;IAC9D,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAEhB,cAAc,EAAE,MAAM,CAAC;IAEvB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACtB,KAAG,OAAO,CAAC,IAAI,CAyBf,CAAC;AAGF,eAAO,MAAM,yBAAyB,GAClC,WAAW,MAAM,EACjB,OAAO,sBAAsB,EAC7B,gBAAgB,sBAAsB,KACvC,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAgBxC,CAAC;AAWF,eAAO,MAAM,8CAA8C,GACvD,kBAAkB,MAAM,EACxB,iBAAiB,MAAM,KACxB,OAAO,CAAC,OAAO,CAYjB,CAAC;AAOF,eAAO,MAAM,oCAAoC,GAC7C,kBAAkB,MAAM,KACzB,OAAO,CAAC,OAAO,CAYjB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { InboxBatchReceipt, IssueInboxCredentialBatchItemResult } from '@learncard/types';
|
|
2
|
+
import type { BatchItem, BatchJob, BatchReplayStore, InboxDispatchLease } from '../../types/inbox-batch';
|
|
3
|
+
export declare const DAY = 86400000;
|
|
4
|
+
export declare const LEASE_MS = 360000;
|
|
5
|
+
export declare const ensureInboxBatchConstraints: () => Promise<void>;
|
|
6
|
+
export declare const createBatchJob: (input: {
|
|
7
|
+
issuer: string;
|
|
8
|
+
requestId?: string;
|
|
9
|
+
requestHash: string;
|
|
10
|
+
payload: string;
|
|
11
|
+
items: {
|
|
12
|
+
replayKey: string;
|
|
13
|
+
duplicate: boolean;
|
|
14
|
+
correlation?: string;
|
|
15
|
+
}[];
|
|
16
|
+
limit: number;
|
|
17
|
+
}) => Promise<InboxBatchReceipt>;
|
|
18
|
+
export declare const readBatchJob: (id: string, issuer: string) => Promise<{
|
|
19
|
+
job: BatchJob;
|
|
20
|
+
items: BatchItem[];
|
|
21
|
+
}>;
|
|
22
|
+
export declare const claimBatchItem: (id: string, owner: string) => Promise<{
|
|
23
|
+
job: BatchJob;
|
|
24
|
+
item: BatchItem;
|
|
25
|
+
} | undefined>;
|
|
26
|
+
export declare const markBatchIssuanceStarted: (id: string, owner: string) => Promise<void>;
|
|
27
|
+
export declare const batchReplayStore: (itemId: string, owner: string, replayKey: string) => BatchReplayStore;
|
|
28
|
+
export declare const finishBatchItem: (id: string, owner: string, result: IssueInboxCredentialBatchItemResult) => Promise<void>;
|
|
29
|
+
export declare const takeInboxDispatches: () => Promise<InboxDispatchLease[]>;
|
|
30
|
+
export declare const acknowledgeInboxDispatches: (leases: InboxDispatchLease[]) => Promise<void>;
|
|
31
|
+
export declare const deadLetterBatchItem: (id: string) => Promise<void>;
|
|
32
|
+
export declare const recoverInboxJobs: (deadline?: number) => Promise<void>;
|
|
33
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/accesslay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AClB,gBA2DD,CAAC;AAgBH,eAAO,MAAM,eAAe,GACxB,IAAI,MAAM,EACV,OAAO,MAAM,EACb,QAAQ,mCAAmC,KAC5C,OAAO,CAAC,IAAI,CA+Bd,CAAC;AAGF,eAAO,MAAM,mBAAmB,QAAa,OAAO,CAAC,kBAAkB,EAAE,CAanE,CAAC;AAEP,eAAO,MAAM,0BAA0B,GAAU,QAAQ,kBAAkB,EAAE,KAAG,OAAO,CAAC,IAAI,CAQ3F,CAAC;AAGF,eAAO,MAAM,mBAAmB,GAAU,IAAI,MAAM,KAAG,OAAO,CAAC,IAAI,CA8B7D,CAAC;AAGP,eAAO,MAAM,gBAAgB,GAAU,iBAA8B,KAAG,OAAO,CAAC,IAAI,CAsFnF,CAAC"}
|
|
@@ -3,6 +3,11 @@ import { ProfileType } from '../../types/profile';
|
|
|
3
3
|
export declare const DEFAULT_INBOX_EXPIRY_DAYS = 30;
|
|
4
4
|
export declare const createInboxCredential: (input: {
|
|
5
5
|
credential: string;
|
|
6
|
+
refresh?: {
|
|
7
|
+
aggregate: Record<string, unknown>;
|
|
8
|
+
issueKey: string;
|
|
9
|
+
requestDigest: string;
|
|
10
|
+
};
|
|
6
11
|
delivered?: boolean;
|
|
7
12
|
isSigned: boolean;
|
|
8
13
|
isAccepted?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/accesslayer/inbox-credential/create.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAK/E,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/accesslayer/inbox-credential/create.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAK/E,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAK5C,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAE5C,eAAO,MAAM,qBAAqB,GAAU,OAAO;IAC/C,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,CAAC;IAE1F,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,sBAAsB,CAAC;IAClC,aAAa,EAAE,WAAW,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,mBAAmB,GAAG,mBAAmB,GAAG,mBAAmB,CAAC;CACpF,KAAG,OAAO,CAAC,mBAAmB,CAoI9B,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { InboxCredentialType, PublishCredentialRefreshResult } from '@learncard/types';
|
|
2
|
+
export declare const getInboxRefreshIssue: (issueKey: string) => Promise<{
|
|
3
|
+
inbox: InboxCredentialType;
|
|
4
|
+
requestDigest: string;
|
|
5
|
+
claimUrl?: string;
|
|
6
|
+
} | null>;
|
|
7
|
+
export declare const createPendingInboxRefresh: (params: {
|
|
8
|
+
inbox: Record<string, unknown>;
|
|
9
|
+
aggregate: Record<string, unknown>;
|
|
10
|
+
issueKey: string;
|
|
11
|
+
requestDigest: string;
|
|
12
|
+
}) => Promise<InboxCredentialType>;
|
|
13
|
+
export declare const getPendingInboxPublication: (refreshId: string, idempotencyKey?: string) => Promise<PublishCredentialRefreshResult | null>;
|
|
14
|
+
export declare const advancePendingInboxRefresh: (params: {
|
|
15
|
+
refreshId: string;
|
|
16
|
+
expectedVersion: number;
|
|
17
|
+
credential: string;
|
|
18
|
+
credentialName?: string;
|
|
19
|
+
materialDigest: string;
|
|
20
|
+
idempotencyKey?: string;
|
|
21
|
+
updateSummary?: string;
|
|
22
|
+
}) => Promise<PublishCredentialRefreshResult | null>;
|
|
23
|
+
export declare const bindPendingInboxRefresh: (params: {
|
|
24
|
+
inboxId: string;
|
|
25
|
+
refreshId: string;
|
|
26
|
+
expectedVersion: number;
|
|
27
|
+
holderDid: string;
|
|
28
|
+
holderProfileId?: string;
|
|
29
|
+
issuerProfileId: string;
|
|
30
|
+
root: Record<string, unknown>;
|
|
31
|
+
aggregate: Record<string, unknown>;
|
|
32
|
+
deliveryCredential: string;
|
|
33
|
+
deliveryExpiresAt: string;
|
|
34
|
+
accepted: boolean;
|
|
35
|
+
boostId?: string;
|
|
36
|
+
}) => Promise<boolean>;
|
|
37
|
+
export declare const getInboxRefreshSnapshot: (inboxId: string) => Promise<{
|
|
38
|
+
inbox: any;
|
|
39
|
+
aggregate: {
|
|
40
|
+
refreshId: string;
|
|
41
|
+
issuerProfileId: string;
|
|
42
|
+
issuerDid: string;
|
|
43
|
+
credentialId: string;
|
|
44
|
+
state: "active" | "revoked" | "pending_holder" | "awaiting_claim";
|
|
45
|
+
currentVersion: number;
|
|
46
|
+
createdAt: string;
|
|
47
|
+
updatedAt: string;
|
|
48
|
+
inboxCredentialId?: string | undefined;
|
|
49
|
+
inboxCredentialStatus?: string | undefined;
|
|
50
|
+
holderProfileId?: string | undefined;
|
|
51
|
+
holderDid?: string | undefined;
|
|
52
|
+
etag?: string | undefined;
|
|
53
|
+
materialDigest?: string | undefined;
|
|
54
|
+
rootMaterialDigest?: string | undefined;
|
|
55
|
+
credentialStatusDigest?: string | undefined;
|
|
56
|
+
credentialSubjectDigest?: string | undefined;
|
|
57
|
+
boostId?: string | undefined;
|
|
58
|
+
signingMode?: "issuer-signed" | "signing-authority" | undefined;
|
|
59
|
+
idempotencyKey?: string | undefined;
|
|
60
|
+
updateSummary?: string | undefined;
|
|
61
|
+
credentialDisplayName?: string | undefined;
|
|
62
|
+
lastPublishedAt?: string | undefined;
|
|
63
|
+
notificationWindowKey?: string | undefined;
|
|
64
|
+
lastNotificationId?: string | undefined;
|
|
65
|
+
lastNotificationAt?: string | undefined;
|
|
66
|
+
initialNotificationSentAt?: string | undefined;
|
|
67
|
+
initialNotificationSuppressed?: boolean | undefined;
|
|
68
|
+
};
|
|
69
|
+
} | null>;
|
|
70
|
+
export declare const recordInboxRefreshClaimUrl: (id: string, claimUrl: string) => Promise<string>;
|
|
71
|
+
//# sourceMappingURL=refresh.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refresh.d.ts","sourceRoot":"","sources":["../../../src/accesslayer/inbox-credential/refresh.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,8BAA8B,EAAE,MAAM,kBAAkB,CAAC;AAG5F,eAAO,MAAM,oBAAoB,GAC7B,UAAU,MAAM,KACjB,OAAO,CAAC;IACP,KAAK,EAAE,mBAAmB,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,IAAI,CAaP,CAAC;AAGF,eAAO,MAAM,yBAAyB,GAAU,QAAQ;IACpD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAA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6 +1,6 @@
|
|
|
1
1
|
import { InboxCredentialType } from '@learncard/types';
|
|
2
2
|
import { InboxDelivery } from '../../types/inbox-delivery';
|
|
3
|
-
export declare const updateInboxCredential: (id: string, updates: Partial<Omit<InboxCredentialType, "id" | "createdAt" | "credential">>) => Promise<InboxCredentialType | null>;
|
|
3
|
+
export declare const updateInboxCredential: (id: string, updates: Partial<Omit<InboxCredentialType, "id" | "createdAt" | "credential" | "refresh">>) => Promise<InboxCredentialType | null>;
|
|
4
4
|
export declare const finalizeAndWipeInboxCredential: (id: string, delivery: InboxDelivery, { isAccepted }?: {
|
|
5
5
|
isAccepted?: boolean;
|
|
6
6
|
}) => Promise<InboxCredentialType | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/accesslayer/inbox-credential/update.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EACH,aAAa,EAGhB,MAAM,sBAAsB,CAAC;AAE9B,eAAO,MAAM,qBAAqB,GAC9B,IAAI,MAAM,EACV,SAAS,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,IAAI,GAAG,WAAW,GAAG,YAAY,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/accesslayer/inbox-credential/update.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EACH,aAAa,EAGhB,MAAM,sBAAsB,CAAC;AAE9B,eAAO,MAAM,qBAAqB,GAC9B,IAAI,MAAM,EACV,SAAS,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,IAAI,GAAG,WAAW,GAAG,YAAY,GAAG,SAAS,CAAC,CAAC,KAC3F,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAcpC,CAAC;AAGF,eAAO,MAAM,8BAA8B,GACvC,IAAI,MAAM,EACV,UAAU,aAAa,EACvB,iBAAuB;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAO,KACrD,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAsCpC,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAC/B,cAAoC,KACrC,OAAO,CAAC,MAAM,CAyBhB,CAAC;AAKF,eAAO,MAAM,0BAA0B,GACnC,cAAoC,KACrC,OAAO,CAAC,MAAM,CAWhB,CAAC"}
|