@learncard/network-brain-service 3.18.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/CHANGELOG.md +80 -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/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/helpers/activity.helpers.d.ts +4 -0
- package/dist/helpers/activity.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/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/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/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/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/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/credential-refreshes.d.ts.map +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 +42 -126
- package/dist/routes/index.d.ts.map +1 -1
- 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/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 +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/auth-grant/read.ts +2 -1
- 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/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/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 +268 -32
- 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/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/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 +2 -2
- package/src/routes/auth-grants.ts +13 -11
- package/src/routes/boosts.ts +914 -92
- 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 +82 -7
- 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 +12 -0
- 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/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/openapi.spec.ts +41 -1
- package/test/refresh-send.spec.ts +1799 -0
- package/test/registry.spec.ts +56 -11
- package/vitest.config.ts +9 -0
- package/vitest.inbox-e2e.config.ts +5 -1
- package/vitest.integration.config.ts +2 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export declare const MAX_CREDENTIAL_DISPLAY_TITLE_LENGTH = 120;
|
|
2
|
+
export declare const extractBoundedCredentialDisplayTitle: (value: unknown, maxLength?: number) => string | undefined;
|
|
3
|
+
export type CredentialRefreshEmailContactMethod = {
|
|
4
|
+
type: string;
|
|
5
|
+
value: string;
|
|
6
|
+
isVerified: boolean;
|
|
7
|
+
isPrimary?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type CredentialRefreshEmailManager = {
|
|
10
|
+
locale?: string;
|
|
11
|
+
contactMethods: CredentialRefreshEmailContactMethod[];
|
|
12
|
+
};
|
|
13
|
+
export type CredentialRefreshEmailTargetParams = {
|
|
14
|
+
holder: {
|
|
15
|
+
locale?: string;
|
|
16
|
+
};
|
|
17
|
+
holderContactMethods: CredentialRefreshEmailContactMethod[];
|
|
18
|
+
managers: CredentialRefreshEmailManager[];
|
|
19
|
+
};
|
|
20
|
+
export type CredentialRefreshEmailTarget = {
|
|
21
|
+
status: 'resolved';
|
|
22
|
+
kind: 'holder' | 'guardian';
|
|
23
|
+
locale?: string;
|
|
24
|
+
contactMethod: {
|
|
25
|
+
type: 'email';
|
|
26
|
+
value: string;
|
|
27
|
+
};
|
|
28
|
+
} | {
|
|
29
|
+
status: 'skipped';
|
|
30
|
+
reason: 'no-verified-holder-email' | 'no-verified-guardian-email';
|
|
31
|
+
};
|
|
32
|
+
export declare const chooseCredentialRefreshEmailTarget: (params: CredentialRefreshEmailTargetParams) => CredentialRefreshEmailTarget;
|
|
33
|
+
export declare const buildCredentialUpdatedEmailModel: (params: {
|
|
34
|
+
issuerDisplayName?: string;
|
|
35
|
+
credentialTitle?: string;
|
|
36
|
+
}) => {
|
|
37
|
+
issuer?: {
|
|
38
|
+
name?: string;
|
|
39
|
+
};
|
|
40
|
+
credential?: {
|
|
41
|
+
name?: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=credential-refresh-email-content.helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-refresh-email-content.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/credential-refresh-email-content.helpers.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,mCAAmC,MAAM,CAAC;AASvD,eAAO,MAAM,oCAAoC,GAC7C,OAAO,OAAO,EACd,YAAW,MAA4C,KACxD,MAAM,GAAG,SAiBX,CAAC;AAGF,MAAM,MAAM,mCAAmC,GAAG;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAGF,MAAM,MAAM,6BAA6B,GAAG;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,mCAAmC,EAAE,CAAC;CACzD,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG;IAC7C,MAAM,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5B,oBAAoB,EAAE,mCAAmC,EAAE,CAAC;IAE5D,QAAQ,EAAE,6BAA6B,EAAE,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAClC;IACI,MAAM,EAAE,UAAU,CAAC;IACnB,IAAI,EAAE,QAAQ,GAAG,UAAU,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CACnD,GACD;IACI,MAAM,EAAE,SAAS,CAAC;IAClB,MAAM,EAAE,0BAA0B,GAAG,4BAA4B,CAAC;CACrE,CAAC;AA0BR,eAAO,MAAM,kCAAkC,GAC3C,QAAQ,kCAAkC,KAC3C,4BAgCF,CAAC;AASF,eAAO,MAAM,gCAAgC,GAAI,QAAQ;IACrD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B,KAAG;IAAE,MAAM,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAAC,UAAU,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAQ/D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-refresh-email-content.helpers.test.d.ts","sourceRoot":"","sources":["../../src/helpers/credential-refresh-email-content.helpers.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { TenantBranding } from '@learncard/email-templates';
|
|
2
|
+
import type { CredentialRefreshVersionNode } from '../types/credential-refresh';
|
|
3
|
+
import type { ProfileType } from '../types/profile';
|
|
4
|
+
import { type CredentialRefreshEmailTarget } from './credential-refresh-email-content.helpers';
|
|
5
|
+
export type CredentialRefreshEmailDeliveryOutcome = 'sent' | 'duplicate-window' | 'skipped-no-recipient' | 'failed';
|
|
6
|
+
export declare const resolveCredentialRefreshEmailTarget: (holderProfile: ProfileType) => Promise<CredentialRefreshEmailTarget>;
|
|
7
|
+
export declare const resolveCredentialRefreshEmailDisplayTitle: (params: {
|
|
8
|
+
version: CredentialRefreshVersionNode;
|
|
9
|
+
refreshId: string;
|
|
10
|
+
}) => Promise<string | undefined>;
|
|
11
|
+
export declare const deliverCredentialRefreshEmailNotification: (params: {
|
|
12
|
+
version: CredentialRefreshVersionNode;
|
|
13
|
+
issuerProfile: ProfileType;
|
|
14
|
+
holderProfile: ProfileType;
|
|
15
|
+
branding?: Partial<TenantBranding>;
|
|
16
|
+
}) => Promise<CredentialRefreshEmailDeliveryOutcome>;
|
|
17
|
+
//# sourceMappingURL=credential-refresh-email.helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-refresh-email.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/credential-refresh-email.helpers.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAIjD,OAAO,EAMH,KAAK,4BAA4B,EACpC,MAAM,4CAA4C,CAAC;AAqBpD,MAAM,MAAM,qCAAqC,GAC7C,MAAM,GAAG,kBAAkB,GAAG,sBAAsB,GAAG,QAAQ,CAAC;AAGpE,eAAO,MAAM,mCAAmC,GAC5C,eAAe,WAAW,KAC3B,OAAO,CAAC,4BAA4B,CA+BtC,CAAC;AAOF,eAAO,MAAM,yCAAyC,GAAU,QAAQ;IACpE,OAAO,EAAE,4BAA4B,CAAC;IACtC,SAAS,EAAE,MAAM,CAAC;CACrB,KAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAgB7B,CAAC;AAOF,eAAO,MAAM,yCAAyC,GAAU,QAAQ;IACpE,OAAO,EAAE,4BAA4B,CAAC;IACtC,aAAa,EAAE,WAAW,CAAC;IAC3B,aAAa,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;CACtC,KAAG,OAAO,CAAC,qCAAqC,CA+EhD,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { VC } from '@learncard/types';
|
|
2
|
+
import type { SeedLearnCard } from './learnCard.helpers';
|
|
3
|
+
export declare const verifyManagedRefreshProof: (verifier: Pick<SeedLearnCard["invoke"], "verifyCredential" | "resolveDid">, credential: VC, localIssuerDid: string) => Promise<void>;
|
|
4
|
+
//# sourceMappingURL=credential-refresh-proof.helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-refresh-proof.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/credential-refresh-proof.helpers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAqB,MAAM,kBAAkB,CAAC;AAG9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAWzD,eAAO,MAAM,yBAAyB,GAClC,UAAU,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE,kBAAkB,GAAG,YAAY,CAAC,EAC1E,YAAY,EAAE,EACd,gBAAgB,MAAM,KACvB,OAAO,CAAC,IAAI,CAuBd,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-refresh-proof.helpers.test.d.ts","sourceRoot":"","sources":["../../src/helpers/credential-refresh-proof.helpers.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { VC, type AllocateCredentialRefreshResult, type PublishCredentialRefreshInput, type PublishCredentialRefreshNotification, type PublishCredentialRefreshResult } from '@learncard/types';
|
|
1
|
+
import { VC, type AllocateCredentialRefreshResult, type ManagedCredentialRefreshReceipt, type ManagedCredentialRefreshService, type PublishCredentialRefreshInput, type PublishCredentialRefreshNotification, type PublishCredentialRefreshResult } from '@learncard/types';
|
|
2
|
+
import type { DbTermsType } from '../types/consentflowcontract';
|
|
3
|
+
import type { TenantBranding } from '@learncard/email-templates';
|
|
2
4
|
import { ProfileType } from '../types/profile';
|
|
3
5
|
export declare const getCredentialRefreshServiceUrl: (refreshId: string, domain: string) => string;
|
|
6
|
+
export declare const getManagedCredentialUri: (id: string, domain: string) => string;
|
|
4
7
|
export type AllocateCredentialRefreshParams = {
|
|
5
8
|
issuerProfile: ProfileType;
|
|
6
9
|
holderProfile: ProfileType;
|
|
@@ -9,25 +12,65 @@ export type AllocateCredentialRefreshParams = {
|
|
|
9
12
|
domain: string;
|
|
10
13
|
};
|
|
11
14
|
export declare const allocateCredentialRefresh: (params: AllocateCredentialRefreshParams) => Promise<AllocateCredentialRefreshResult>;
|
|
15
|
+
export type ManagedRefreshHandoff = {
|
|
16
|
+
refreshId: string;
|
|
17
|
+
refreshService: ManagedCredentialRefreshService;
|
|
18
|
+
};
|
|
19
|
+
export declare const extractManagedRefreshHandoff: (credential: VC, domain: string) => ManagedRefreshHandoff | null;
|
|
20
|
+
export type ManagedRefreshInitialBindingInfo = {
|
|
21
|
+
bound: boolean;
|
|
22
|
+
activityId?: string;
|
|
23
|
+
integrationId?: string;
|
|
24
|
+
};
|
|
25
|
+
export declare const peekCredentialRefreshInitialBinding: (params: {
|
|
26
|
+
refreshId: string;
|
|
27
|
+
credential: VC;
|
|
28
|
+
boostId?: string;
|
|
29
|
+
}) => Promise<ManagedRefreshInitialBindingInfo>;
|
|
12
30
|
export type SendRefreshableCredentialParams = {
|
|
13
31
|
issuerProfile: ProfileType;
|
|
14
32
|
refreshId: string;
|
|
15
33
|
credential: VC;
|
|
16
34
|
boostUri?: string;
|
|
17
35
|
skipNotification?: boolean;
|
|
36
|
+
activityId?: string;
|
|
37
|
+
integrationId?: string;
|
|
38
|
+
contractTerms?: DbTermsType;
|
|
18
39
|
domain: string;
|
|
19
40
|
};
|
|
20
|
-
export
|
|
41
|
+
export type SendRefreshableCredentialResult = {
|
|
42
|
+
uri: string;
|
|
43
|
+
receipt: ManagedCredentialRefreshReceipt;
|
|
44
|
+
};
|
|
45
|
+
type InitialRefreshRoot = {
|
|
46
|
+
rootId: string;
|
|
47
|
+
materialDigest?: string;
|
|
48
|
+
credentialStatusDigest?: string;
|
|
49
|
+
boostId?: string;
|
|
50
|
+
};
|
|
51
|
+
export declare const getInitialRefreshRoot: (refreshId: string) => Promise<InitialRefreshRoot | null>;
|
|
52
|
+
export declare const getBoundRefreshBoostId: (refreshId: string) => Promise<string | undefined>;
|
|
53
|
+
export declare const sendInitialCredentialNotificationOnce: (params: {
|
|
54
|
+
refreshId: string;
|
|
55
|
+
uri: string;
|
|
56
|
+
issuerProfile: ProfileType;
|
|
57
|
+
holderProfile: ProfileType;
|
|
58
|
+
initialNotificationSuppressed: boolean;
|
|
59
|
+
}) => Promise<void>;
|
|
60
|
+
export declare const sendRefreshableCredential: (params: SendRefreshableCredentialParams) => Promise<SendRefreshableCredentialResult>;
|
|
21
61
|
export declare const computeRefreshEtag: (encryptedCredential: string) => string;
|
|
22
62
|
export declare const deliverPendingCredentialRefreshNotificationForAcceptedCredential: (params: {
|
|
23
63
|
credentialNodeId: string;
|
|
24
64
|
issuerProfile: ProfileType;
|
|
25
65
|
holderProfile: ProfileType;
|
|
66
|
+
branding?: Partial<TenantBranding>;
|
|
26
67
|
}) => Promise<PublishCredentialRefreshNotification>;
|
|
27
68
|
export type PublishCredentialRefreshParams = {
|
|
28
69
|
issuerProfile: ProfileType;
|
|
29
70
|
input: PublishCredentialRefreshInput;
|
|
30
71
|
domain: string;
|
|
72
|
+
branding?: Partial<TenantBranding>;
|
|
31
73
|
};
|
|
32
74
|
export declare const publishCredentialRefresh: (params: PublishCredentialRefreshParams) => Promise<PublishCredentialRefreshResult>;
|
|
75
|
+
export {};
|
|
33
76
|
//# sourceMappingURL=credential-refresh.helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential-refresh.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/credential-refresh.helpers.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,EAAE,EACF,KAAK,+BAA+B,EAEpC,KAAK,6BAA6B,EAClC,KAAK,oCAAoC,EACzC,KAAK,8BAA8B,EACtC,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"credential-refresh.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/credential-refresh.helpers.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,EAAE,EACF,KAAK,+BAA+B,EAEpC,KAAK,+BAA+B,EACpC,KAAK,+BAA+B,EACpC,KAAK,6BAA6B,EAClC,KAAK,oCAAoC,EACzC,KAAK,8BAA8B,EACtC,MAAM,kBAAkB,CAAC;AAkC1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAsB7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAGjE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAa5C,eAAO,MAAM,8BAA8B,GAAI,WAAW,MAAM,EAAE,QAAQ,MAAM,KAAG,MACzB,CAAC;AAE3D,eAAO,MAAM,uBAAuB,GAAI,IAAI,MAAM,EAAE,QAAQ,MAAM,KAAG,MAC3B,CAAC;AAE3C,MAAM,MAAM,+BAA+B,GAAG;IAC1C,aAAa,EAAE,WAAW,CAAC;IAC3B,aAAa,EAAE,WAAW,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAClB,CAAC;AAOF,eAAO,MAAM,yBAAyB,GAClC,QAAQ,+BAA+B,KACxC,OAAO,CAAC,+BAA+B,CA+CzC,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,+BAA+B,CAAC;CACnD,CAAC;AAaF,eAAO,MAAM,4BAA4B,GACrC,YAAY,EAAE,EACd,QAAQ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AqC,GAAU,QAAQ;IAChE,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,WAAW,CAAC;IAC3B,aAAa,EAAE,WAAW,CAAC;IAC3B,6BAA6B,EAAE,OAAO,CAAC;CAC1C,KAAG,OAAO,CAAC,IAAI,CAyBf,CAAC;AA4BF,eAAO,MAAM,yBAAyB,GAClC,QAAQ,+BAA+B,KACxC,OAAO,CAAC,+BAA+B,CA6UzC,CAAC;AAiBF,eAAO,MAAM,kBAAkB,GAAI,qBAAqB,MAAM,KAAG,MACO,CAAC;AAwFzE,eAAO,MAAM,gEAAgE,GAAU,QAAQ;IAC3F,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,WAAW,CAAC;IAC3B,aAAa,EAAE,WAAW,CAAC;IAE3B,QAAQ,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;CACtC,KAAG,OAAO,CAAC,oCAAoC,CAyB/C,CAAC;AAqEF,MAAM,MAAM,8BAA8B,GAAG;IACzC,aAAa,EAAE,WAAW,CAAC;IAC3B,KAAK,EAAE,6BAA6B,CAAC;IACrC,MAAM,EAAE,MAAM,CAAC;IAEf,QAAQ,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;CACtC,CAAC;AAYF,eAAO,MAAM,wBAAwB,GACjC,QAAQ,8BAA8B,KACvC,OAAO,CAAC,8BAA8B,CAkSxC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TenantBranding } from '@learncard/email-templates';
|
|
1
2
|
import { UnsignedVC, VC, JWE } from '@learncard/types';
|
|
2
3
|
import type { IssuedCredential } from '../types/credential';
|
|
3
4
|
import { ProfileType } from '../types/profile';
|
|
@@ -6,5 +7,5 @@ export declare const sendCredential: (from: ProfileType, to: ProfileType, creden
|
|
|
6
7
|
export declare const acceptCredential: (profile: ProfileType, uri: string, options?: {
|
|
7
8
|
skipNotification?: boolean;
|
|
8
9
|
metadata?: Record<string, unknown>;
|
|
9
|
-
}) => Promise<boolean>;
|
|
10
|
+
}, branding?: Partial<TenantBranding>) => Promise<boolean>;
|
|
10
11
|
//# sourceMappingURL=credential.helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/credential.helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"credential.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/credential.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,GAAG,EAAoC,MAAM,kBAAkB,CAAC;AAGzF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAiBzD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAY5C,eAAO,MAAM,gBAAgB,GAAI,IAAI,MAAM,EAAE,QAAQ,MAAM,KAAG,MACpB,CAAC;AAE3C,eAAO,MAAM,cAAc,GACvB,MAAM,WAAW,EACjB,IAAI,WAAW,EACf,YAAY,EAAE,GAAG,UAAU,GAAG,GAAG,GAAG,gBAAgB,EACpD,QAAQ,MAAM,EACd,WAAW,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAC9C,aAAa,MAAM,EACnB,gBAAgB,MAAM,KACvB,OAAO,CAAC,MAAM,CAkChB,CAAC;AAEF,eAAO,MAAM,gBAAgB,GACzB,SAAS,WAAW,EACpB,KAAK,MAAM,EACX,UAAS;IAAE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAExE,EACD,WAAW,OAAO,CAAC,cAAc,CAAC,KACnC,OAAO,CAAC,OAAO,CA+KjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"finalize-inbox.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/finalize-inbox.helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"finalize-inbox.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/finalize-inbox.helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAGH,EAAE,EAEL,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAiB5C,wBAAsB,kCAAkC,CACpD,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,MAAM,GACf,OAAO,CAAC;IACP,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,qBAAqB,EAAE,EAAE,EAAE,CAAC;IAC5B,UAAU,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,EAAE,CAAA;KAAE,EAAE,CAAC;CAChD,CAAC,CA6QD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { FastifyInstance } from 'fastify';
|
|
2
|
+
import type { APIGatewayProxyEvent, APIGatewayProxyEventV2, APIGatewayProxyResult, Context } from 'aws-lambda';
|
|
3
|
+
export declare const INBOX_BATCH_MAX_BYTES: number;
|
|
4
|
+
export declare const isInboxBatchRequest: (url: string) => boolean;
|
|
5
|
+
export declare const configureInboxBatchBodyLimit: (server: FastifyInstance) => void;
|
|
6
|
+
export declare const inboxBatchResponseMeta: ({ paths, errors, }: {
|
|
7
|
+
paths?: readonly string[];
|
|
8
|
+
errors: readonly unknown[];
|
|
9
|
+
}) => {
|
|
10
|
+
status?: number;
|
|
11
|
+
};
|
|
12
|
+
type GatewayEvent = APIGatewayProxyEvent | APIGatewayProxyEventV2;
|
|
13
|
+
export declare const withInboxBatchBodyLimit: <TEvent extends GatewayEvent, TResult>(handler: (event: TEvent, context: Context) => Promise<TResult>, transport: "openapi" | "trpc") => ((event: TEvent, context: Context) => Promise<TResult | APIGatewayProxyResult>);
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=inbox-batch-http.helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inbox-batch-http.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/inbox-batch-http.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EACR,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,OAAO,EACV,MAAM,YAAY,CAAC;AAKpB,eAAO,MAAM,qBAAqB,QAAkB,CAAC;AAgBrD,eAAO,MAAM,mBAAmB,GAAI,KAAK,MAAM,KAAG,OAQjD,CAAC;AAUF,eAAO,MAAM,4BAA4B,GAAI,QAAQ,eAAe,KAAG,IAgCtE,CAAC;AAGF,eAAO,MAAM,sBAAsB,GAAI,oBAGpC;IACC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,MAAM,EAAE,SAAS,OAAO,EAAE,CAAC;CAC9B,KAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAC2D,CAAC;AAEjF,KAAK,YAAY,GAAG,oBAAoB,GAAG,sBAAsB,CAAC;AAOlE,eAAO,MAAM,uBAAuB,GAC/B,MAAM,SAAS,YAAY,EAAE,OAAO,EACjC,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,EAC9D,WAAW,SAAS,GAAG,MAAM,KAC9B,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,GAAG,qBAAqB,CAAC,CAiDhF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inbox-batch-http.helpers.test.d.ts","sourceRoot":"","sources":["../../src/helpers/inbox-batch-http.helpers.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inbox-batch-status.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/inbox-batch-status.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAGzD,eAAO,MAAM,kBAAkB,GAC3B,QAAQ,gBAAgB,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,KACrD,gBAAgB,CAAC,QAAQ,CAK3B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IssueInboxCredentialBatch, IssueInboxCredentialBatchResponse } from '@learncard/types';
|
|
2
|
+
import type { Context } from '.././routes/index';
|
|
3
|
+
import type { ProfileType } from '../types/profile';
|
|
4
|
+
import type { BatchReplayStore } from '../types/inbox-batch';
|
|
5
|
+
export declare const fingerprint: (input: unknown) => string;
|
|
6
|
+
export declare const issueInboxBatch: (profile: ProfileType, batch: IssueInboxCredentialBatch, ctx: Context, execution: {
|
|
7
|
+
cache: BatchReplayStore;
|
|
8
|
+
beforeIssue: () => Promise<void>;
|
|
9
|
+
}) => Promise<IssueInboxCredentialBatchResponse>;
|
|
10
|
+
//# sourceMappingURL=inbox-batch.helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inbox-batch.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/inbox-batch.helpers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAER,yBAAyB,EAEzB,iCAAiC,EACpC,MAAM,kBAAkB,CAAC;AAK1B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAsB1D,eAAO,MAAM,WAAW,GAAI,OAAO,OAAO,KAAG,MAavB,CAAC;AAqDvB,eAAO,MAAM,eAAe,GACxB,SAAS,WAAW,EACpB,OAAO,yBAAyB,EAChC,KAAK,OAAO,EACZ,WAAW;IAEP,KAAK,EAAE,gBAAgB,CAAC;IACxB,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACpC,KACF,OAAO,CAAC,iCAAiC,CAqQ3C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inbox-batch.helpers.test.d.ts","sourceRoot":"","sources":["../../src/helpers/inbox-batch.helpers.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TRPCError } from '@trpc/server';
|
|
2
|
+
import type { IssueInboxCredentialBatchItemResult } from '@learncard/types';
|
|
3
|
+
export declare class InboxIssuancePreflightError extends TRPCError {
|
|
4
|
+
}
|
|
5
|
+
export declare class InboxDeliveryCheckpointError extends Error {
|
|
6
|
+
readonly result: Pick<Extract<IssueInboxCredentialBatchItemResult, {
|
|
7
|
+
success: true;
|
|
8
|
+
}>, 'issuanceId' | 'status' | 'claimUrl' | 'recipientDid' | 'guardianStatus'>;
|
|
9
|
+
constructor(result: Pick<Extract<IssueInboxCredentialBatchItemResult, {
|
|
10
|
+
success: true;
|
|
11
|
+
}>, 'issuanceId' | 'status' | 'claimUrl' | 'recipientDid' | 'guardianStatus'>);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=inbox-issuance-error.helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inbox-issuance-error.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/inbox-issuance-error.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,kBAAkB,CAAC;AAO5E,qBAAa,2BAA4B,SAAQ,SAAS;CAAG;AAM7D,qBAAa,4BAA6B,SAAQ,KAAK;aAE/B,MAAM,EAAE,IAAI,CACxB,OAAO,CAAC,mCAAmC,EAAE;QAAE,OAAO,EAAE,IAAI,CAAA;KAAE,CAAC,EAC/D,YAAY,GAAG,QAAQ,GAAG,UAAU,GAAG,cAAc,GAAG,gBAAgB,CAC3E;gBAHe,MAAM,EAAE,IAAI,CACxB,OAAO,CAAC,mCAAmC,EAAE;QAAE,OAAO,EAAE,IAAI,CAAA;KAAE,CAAC,EAC/D,YAAY,GAAG,QAAQ,GAAG,UAAU,GAAG,cAAc,GAAG,gBAAgB,CAC3E;CAKR"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { InboxBatchReceipt, InboxBatchStatus, IssueInboxCredentialBatch } from '@learncard/types';
|
|
2
|
+
import type { Context } from '.././routes/index';
|
|
3
|
+
import type { ProfileType } from '../types/profile';
|
|
4
|
+
export declare const submitInboxBatch: (profile: ProfileType, batch: IssueInboxCredentialBatch, ctx: Context) => Promise<InboxBatchReceipt>;
|
|
5
|
+
export declare const getInboxBatch: (issuer: string, batchId: string) => Promise<InboxBatchStatus>;
|
|
6
|
+
export declare const processInboxQueueMessage: (body: string) => Promise<void>;
|
|
7
|
+
export declare const processInboxDeadLetter: (body: string) => Promise<void>;
|
|
8
|
+
export declare const dispatchInboxJobs: (maintenanceDeadline?: number) => Promise<void>;
|
|
9
|
+
export declare const consumeInboxQueueOnce: (waitSeconds?: number) => Promise<void>;
|
|
10
|
+
export declare const consumeInboxDeadLettersOnce: () => Promise<void>;
|
|
11
|
+
//# sourceMappingURL=inbox-queue.helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inbox-queue.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/inbox-queue.helpers.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACR,iBAAiB,EACjB,gBAAgB,EAChB,yBAAyB,EAE5B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAyCjD,eAAO,MAAM,gBAAgB,GACzB,SAAS,WAAW,EACpB,OAAO,yBAAyB,EAChC,KAAK,OAAO,KACb,OAAO,CAAC,iBAAiB,CA+C3B,CAAC;AAEF,eAAO,MAAM,aAAa,GAAU,QAAQ,MAAM,EAAE,SAAS,MAAM,KAAG,OAAO,CAAC,gBAAgB,CA6D7F,CAAC;AAGF,eAAO,MAAM,wBAAwB,GAAU,MAAM,MAAM,KAAG,OAAO,CAAC,IAAI,CAuEzE,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAU,MAAM,MAAM,KAAG,OAAO,CAAC,IAAI,CAmBvE,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC1B,4BAAyC,KAC1C,OAAO,CAAC,IAAI,CA+Cd,CAAC;AAGF,eAAO,MAAM,qBAAqB,GAAU,oBAAe,KAAG,OAAO,CAAC,IAAI,CA4BzE,CAAC;AAEF,eAAO,MAAM,2BAA2B,QAAa,OAAO,CAAC,IAAI,CAqBhE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inbox-queue.helpers.test.d.ts","sourceRoot":"","sources":["../../src/helpers/inbox-queue.helpers.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import type { InboxCredentialRefreshReceipt, PublishCredentialRefreshInput, PublishCredentialRefreshResult, VC } from '@learncard/types';
|
|
2
|
+
import type { ProfileType } from '../types/profile';
|
|
3
|
+
import type { CredentialRefreshRecord } from '../types/credential-refresh';
|
|
4
|
+
export declare const assertInboxRefreshEnabled: (scope?: string) => Promise<void>;
|
|
5
|
+
export declare const inboxRefreshRequestDigest: (request: unknown) => string;
|
|
6
|
+
export declare const getInboxRefreshIssueKey: (issuerProfileId: string, key: string) => string;
|
|
7
|
+
export declare const getInboxRefreshReplay: (issuerProfileId: string, key: string | undefined, requestDigest: string) => Promise<{
|
|
8
|
+
inbox: import("@learncard/types").InboxCredentialType;
|
|
9
|
+
requestDigest: string;
|
|
10
|
+
claimUrl?: string;
|
|
11
|
+
} | null>;
|
|
12
|
+
export declare const getInboxRefreshReceipt: (refreshId: string, domain: string) => Promise<InboxCredentialRefreshReceipt>;
|
|
13
|
+
export declare const prepareInboxRefresh: (credential: unknown, issuer: ProfileType, domain: string) => Promise<{
|
|
14
|
+
credential: {
|
|
15
|
+
[x: string]: any;
|
|
16
|
+
'@context': (string | Record<string, any>)[];
|
|
17
|
+
type: string[];
|
|
18
|
+
issuer: string | {
|
|
19
|
+
[x: string]: any;
|
|
20
|
+
id?: string | undefined;
|
|
21
|
+
type?: string | string[] | undefined;
|
|
22
|
+
name?: string | undefined;
|
|
23
|
+
url?: string | undefined;
|
|
24
|
+
phone?: string | undefined;
|
|
25
|
+
description?: string | undefined;
|
|
26
|
+
endorsement?: any[] | undefined;
|
|
27
|
+
image?: string | {
|
|
28
|
+
id: string;
|
|
29
|
+
type: string;
|
|
30
|
+
caption?: string | undefined;
|
|
31
|
+
} | undefined;
|
|
32
|
+
email?: string | undefined;
|
|
33
|
+
address?: {
|
|
34
|
+
type: string | string[];
|
|
35
|
+
addressCountry?: string | undefined;
|
|
36
|
+
addressCountryCode?: string | undefined;
|
|
37
|
+
addressRegion?: string | undefined;
|
|
38
|
+
addressLocality?: string | undefined;
|
|
39
|
+
streetAddress?: string | undefined;
|
|
40
|
+
postOfficeBoxNumber?: string | undefined;
|
|
41
|
+
postalCode?: string | undefined;
|
|
42
|
+
geo?: {
|
|
43
|
+
type: string | string[];
|
|
44
|
+
latitude: number;
|
|
45
|
+
longitude: number;
|
|
46
|
+
} | undefined;
|
|
47
|
+
} | undefined;
|
|
48
|
+
otherIdentifier?: {
|
|
49
|
+
type: string | string[];
|
|
50
|
+
identifier: string;
|
|
51
|
+
identifierType: string;
|
|
52
|
+
}[] | undefined;
|
|
53
|
+
official?: string | undefined;
|
|
54
|
+
parentOrg?: any;
|
|
55
|
+
familyName?: string | undefined;
|
|
56
|
+
givenName?: string | undefined;
|
|
57
|
+
additionalName?: string | undefined;
|
|
58
|
+
patronymicName?: string | undefined;
|
|
59
|
+
honorificPrefix?: string | undefined;
|
|
60
|
+
honorificSuffix?: string | undefined;
|
|
61
|
+
familyNamePrefix?: string | undefined;
|
|
62
|
+
dateOfBirth?: string | undefined;
|
|
63
|
+
};
|
|
64
|
+
credentialSubject: {
|
|
65
|
+
[x: string]: any;
|
|
66
|
+
id?: string | undefined;
|
|
67
|
+
} | {
|
|
68
|
+
[x: string]: any;
|
|
69
|
+
id?: string | undefined;
|
|
70
|
+
}[];
|
|
71
|
+
id?: string | undefined;
|
|
72
|
+
refreshService?: {
|
|
73
|
+
[x: string]: any;
|
|
74
|
+
type: string;
|
|
75
|
+
id?: string | undefined;
|
|
76
|
+
} | {
|
|
77
|
+
[x: string]: any;
|
|
78
|
+
type: string;
|
|
79
|
+
id?: string | undefined;
|
|
80
|
+
}[] | undefined;
|
|
81
|
+
credentialSchema?: {
|
|
82
|
+
[x: string]: any;
|
|
83
|
+
id: string;
|
|
84
|
+
type: string;
|
|
85
|
+
} | {
|
|
86
|
+
[x: string]: any;
|
|
87
|
+
id: string;
|
|
88
|
+
type: string;
|
|
89
|
+
}[] | undefined;
|
|
90
|
+
issuanceDate?: string | undefined;
|
|
91
|
+
expirationDate?: string | undefined;
|
|
92
|
+
credentialStatus?: {
|
|
93
|
+
[x: string]: any;
|
|
94
|
+
type: string;
|
|
95
|
+
id?: string | undefined;
|
|
96
|
+
} | {
|
|
97
|
+
[x: string]: any;
|
|
98
|
+
type: string;
|
|
99
|
+
id?: string | undefined;
|
|
100
|
+
}[] | undefined;
|
|
101
|
+
name?: string | undefined;
|
|
102
|
+
description?: string | undefined;
|
|
103
|
+
validFrom?: string | undefined;
|
|
104
|
+
validUntil?: string | undefined;
|
|
105
|
+
status?: {
|
|
106
|
+
[x: string]: any;
|
|
107
|
+
type: string;
|
|
108
|
+
id?: string | undefined;
|
|
109
|
+
} | {
|
|
110
|
+
[x: string]: any;
|
|
111
|
+
type: string;
|
|
112
|
+
id?: string | undefined;
|
|
113
|
+
}[] | undefined;
|
|
114
|
+
termsOfUse?: {
|
|
115
|
+
[x: string]: any;
|
|
116
|
+
type: string;
|
|
117
|
+
id?: string | undefined;
|
|
118
|
+
} | {
|
|
119
|
+
[x: string]: any;
|
|
120
|
+
type: string;
|
|
121
|
+
id?: string | undefined;
|
|
122
|
+
}[] | undefined;
|
|
123
|
+
evidence?: {
|
|
124
|
+
[x: string]: any;
|
|
125
|
+
type: string[];
|
|
126
|
+
id?: string | undefined;
|
|
127
|
+
name?: string | undefined;
|
|
128
|
+
narrative?: string | undefined;
|
|
129
|
+
description?: string | undefined;
|
|
130
|
+
genre?: string | undefined;
|
|
131
|
+
audience?: string | undefined;
|
|
132
|
+
} | {
|
|
133
|
+
[x: string]: any;
|
|
134
|
+
type: string[];
|
|
135
|
+
id?: string | undefined;
|
|
136
|
+
name?: string | undefined;
|
|
137
|
+
narrative?: string | undefined;
|
|
138
|
+
description?: string | undefined;
|
|
139
|
+
genre?: string | undefined;
|
|
140
|
+
audience?: string | undefined;
|
|
141
|
+
}[] | undefined;
|
|
142
|
+
renderMethod?: Record<string, any> | {
|
|
143
|
+
type: "TemplateRenderMethod";
|
|
144
|
+
renderSuite: string;
|
|
145
|
+
template: string;
|
|
146
|
+
renderProperty?: string[] | undefined;
|
|
147
|
+
outputPreference?: {
|
|
148
|
+
mediaType: string;
|
|
149
|
+
} | undefined;
|
|
150
|
+
} | (Record<string, any> | {
|
|
151
|
+
type: "TemplateRenderMethod";
|
|
152
|
+
renderSuite: string;
|
|
153
|
+
template: string;
|
|
154
|
+
renderProperty?: string[] | undefined;
|
|
155
|
+
outputPreference?: {
|
|
156
|
+
mediaType: string;
|
|
157
|
+
} | undefined;
|
|
158
|
+
})[] | undefined;
|
|
159
|
+
};
|
|
160
|
+
aggregate: {
|
|
161
|
+
refreshId: string;
|
|
162
|
+
issuerProfileId: string;
|
|
163
|
+
issuerDid: string;
|
|
164
|
+
credentialId: string;
|
|
165
|
+
state: string;
|
|
166
|
+
currentVersion: number;
|
|
167
|
+
createdAt: string;
|
|
168
|
+
updatedAt: string;
|
|
169
|
+
credentialStatusDigest: string;
|
|
170
|
+
inboxCredentialStatus: string;
|
|
171
|
+
materialDigest: string;
|
|
172
|
+
};
|
|
173
|
+
}>;
|
|
174
|
+
export declare const publishPendingInboxRefresh: (aggregate: CredentialRefreshRecord, issuer: ProfileType, input: PublishCredentialRefreshInput, domain: string) => Promise<PublishCredentialRefreshResult>;
|
|
175
|
+
export declare const finalizeInboxRefresh: (params: {
|
|
176
|
+
inboxId: string;
|
|
177
|
+
holderDid: string;
|
|
178
|
+
holderProfile?: ProfileType | null;
|
|
179
|
+
domain: string;
|
|
180
|
+
accepted?: boolean;
|
|
181
|
+
}) => Promise<{
|
|
182
|
+
credential: VC;
|
|
183
|
+
uri: string;
|
|
184
|
+
}>;
|
|
185
|
+
export declare const resumeInboxRefreshDelivery: (refreshId: string, domain: string) => Promise<void>;
|
|
186
|
+
//# sourceMappingURL=inbox-refresh.helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inbox-refresh.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/inbox-refresh.helpers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACR,6BAA6B,EAC7B,6BAA6B,EAC7B,8BAA8B,EAC9B,EAAE,EACL,MAAM,kBAAkB,CAAC;AA0B1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAuBxE,eAAO,MAAM,yBAAyB,GAAU,QAAQ,MAAM,KAAG,OAAO,CAAC,IAAI,CAS5E,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,SAAS,OAAO,KAAG,MAIjC,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|
15
15
|
activityId?: string;
|
|
16
16
|
integrationId?: string;
|
|
17
17
|
guardianEmail?: string;
|
|
18
|
-
|
|
18
|
+
refresh?: boolean;
|
|
19
|
+
idempotencyKey?: string;
|
|
20
|
+
refreshRequestDigest?: string;
|
|
21
|
+
}) | undefined, ctx: Context, beforeDelivery?: () => Promise<void>) => Promise<{
|
|
22
|
+
refresh?: import("@learncard/types").InboxCredentialRefreshReceipt;
|
|
19
23
|
status: "PENDING" | "ISSUED" | "EXPIRED" | "DELIVERED" | "CLAIMED";
|
|
20
24
|
inboxCredential: InboxCredentialType;
|
|
21
25
|
claimUrl?: string;
|
|
22
26
|
recipientDid?: string;
|
|
23
27
|
guardianStatus?: "AWAITING_GUARDIAN" | "GUARDIAN_APPROVED" | "GUARDIAN_REJECTED";
|
|
24
28
|
}>;
|
|
29
|
+
export declare const resolveInboxCredentialInput: (input: IssueInboxCredentialType, ctx: Context) => Promise<{
|
|
30
|
+
credential: VC | UnsignedVC | VP;
|
|
31
|
+
resolvedBoostUri?: string;
|
|
32
|
+
}>;
|
|
25
33
|
//# sourceMappingURL=inbox.helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inbox.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/inbox.helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"inbox.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/inbox.helpers.ts"],"names":[],"mappings":"AAgBA,OAAO,EACH,EAAE,EACF,UAAU,EAGV,EAAE,EACF,sBAAsB,EACtB,mBAAmB,EACnB,wBAAwB,EAE3B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAIzE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAmClC,eAAO,MAAM,2BAA2B,GAAU,YAAY,UAAU,KAAG,OAAO,CAAC,OAAO,CAUzF,CAAC;AAEF,eAAO,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C;AAEF,eAAO,MAAM,6BAA6B,GACtC,cAAc,eAAe,KAC9B,MAAM,GAAG,SAKX,CAAC;AAUF,wBAAsB,sBAAsB,CACxC,YAAY,EAAE,eAAe,EAC7B,OAAO,GAAE,2BAAgC,yFA+B5C;AAED,wBAAsB,gBAAgB,CAClC,YAAY,EAAE,eAAe,EAC7B,OAAO,GAAE,2BAAgC,oBA8H5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rateLimit.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/rateLimit.helpers.ts"],"names":[],"mappings":"AAcA,MAAM,MAAM,eAAe,GAAG;IAE1B,GAAG,EAAE,MAAM,CAAC;IAEZ,KAAK,EAAE,MAAM,CAAC;IAEd,aAAa,EAAE,MAAM,CAAC;IAEtB,WAAW,EAAE,MAAM,CAAC;CACvB,CAAC;AAeF,eAAO,MAAM,iBAAiB,GAAU,SAAS,eAAe,EAAE,KAAG,OAAO,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"rateLimit.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/rateLimit.helpers.ts"],"names":[],"mappings":"AAcA,MAAM,MAAM,eAAe,GAAG;IAE1B,GAAG,EAAE,MAAM,CAAC;IAEZ,KAAK,EAAE,MAAM,CAAC;IAEd,aAAa,EAAE,MAAM,CAAC;IAEtB,WAAW,EAAE,MAAM,CAAC;CACvB,CAAC;AAeF,eAAO,MAAM,iBAAiB,GAAU,SAAS,eAAe,EAAE,KAAG,OAAO,CAAC,IAAI,CAkBhF,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { ManagedCredentialRefreshReceipt, SendBoostResponse } from '@learncard/types';
|
|
2
|
+
export declare const REFRESH_SEND_INTENT_STALE_MS: number;
|
|
3
|
+
export type RefreshSendIntentState = 'preparing' | 'prepared' | 'delivered';
|
|
4
|
+
export type RefreshSendIntent = {
|
|
5
|
+
intentKey: string;
|
|
6
|
+
issuerProfileId: string;
|
|
7
|
+
requestDigest: string;
|
|
8
|
+
state: RefreshSendIntentState;
|
|
9
|
+
claimToken: string;
|
|
10
|
+
boostUri?: string;
|
|
11
|
+
credentialId?: string;
|
|
12
|
+
refreshId?: string;
|
|
13
|
+
holderDid?: string;
|
|
14
|
+
pendingReceipt?: ManagedCredentialRefreshReceipt;
|
|
15
|
+
pendingActivityId?: string;
|
|
16
|
+
result?: SendBoostResponse;
|
|
17
|
+
updatedAt: string;
|
|
18
|
+
};
|
|
19
|
+
export type ClaimRefreshSendIntentResult = {
|
|
20
|
+
kind: 'owned';
|
|
21
|
+
intent: RefreshSendIntent;
|
|
22
|
+
} | {
|
|
23
|
+
kind: 'prepared';
|
|
24
|
+
intent: RefreshSendIntent;
|
|
25
|
+
} | {
|
|
26
|
+
kind: 'delivered';
|
|
27
|
+
intent: RefreshSendIntent;
|
|
28
|
+
};
|
|
29
|
+
export declare const computeRefreshSendRequestDigest: (request: {
|
|
30
|
+
recipientProfileId: string;
|
|
31
|
+
holderDid: string;
|
|
32
|
+
templateUri?: string;
|
|
33
|
+
template?: unknown;
|
|
34
|
+
contractUri?: string;
|
|
35
|
+
templateData?: Record<string, unknown>;
|
|
36
|
+
integrationId?: string;
|
|
37
|
+
credentialId?: string;
|
|
38
|
+
}) => string;
|
|
39
|
+
export declare const getRefreshSendIntent: (issuerProfileId: string, idempotencyKey: string) => Promise<RefreshSendIntent | null>;
|
|
40
|
+
export declare const claimRefreshSendIntent: (params: {
|
|
41
|
+
issuerProfileId: string;
|
|
42
|
+
idempotencyKey: string;
|
|
43
|
+
requestDigest: string;
|
|
44
|
+
}) => Promise<ClaimRefreshSendIntentResult>;
|
|
45
|
+
export declare const recordRefreshSendIntent: (intent: RefreshSendIntent, fields: Partial<Pick<RefreshSendIntent, "boostUri" | "credentialId" | "refreshId" | "holderDid">> & {
|
|
46
|
+
state?: "prepared";
|
|
47
|
+
}) => Promise<RefreshSendIntent>;
|
|
48
|
+
export declare const recordRefreshSendIntentPending: (intent: RefreshSendIntent, pendingReceipt: ManagedCredentialRefreshReceipt, pendingActivityId?: string) => Promise<void>;
|
|
49
|
+
export declare const markRefreshSendIntentDelivered: (intent: RefreshSendIntent, result: SendBoostResponse) => Promise<void>;
|
|
50
|
+
export declare const reconcileBoundRefreshSendIntent: (intent: RefreshSendIntent, domain: string) => Promise<SendBoostResponse | null>;
|
|
51
|
+
//# sourceMappingURL=refresh-send-intent.helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refresh-send-intent.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/refresh-send-intent.helpers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,+BAA+B,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAQ3F,eAAO,MAAM,4BAA4B,QAAa,CAAC;AAEvD,MAAM,MAAM,sBAAsB,GAAG,WAAW,GAAG,UAAU,GAAG,WAAW,CAAC;AAM5E,MAAM,MAAM,iBAAiB,GAAG;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,sBAAsB,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,+BAA+B,CAAC;IACjD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAClC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,iBAAiB,CAAA;CAAE,GAC5C;IAAE,IAAI,EAAE,UAAU,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