Skip to content

Commit

Permalink
add push delegate to deep link issuing
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelavoyan committed Dec 26, 2023
1 parent b6472c5 commit 5916cf4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/sample-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@fastify/autoload": "~5.7.1",
"env-var": "~7.3.0",
"fastify": "~4.15.0",
"@velocitycareerlabs/vnf-nodejs-wallet-sdk": "^0.3.0"
"@velocitycareerlabs/vnf-nodejs-wallet-sdk": "^0.4.0"
},
"devDependencies": {
"@jest/globals": "~29.5.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@velocitycareerlabs/vnf-nodejs-wallet-sdk",
"version": "0.3.0",
"version": "0.4.0",
"description": "VNF Wallet SDK Nodejs",
"main": "dist/index.js",
"types": "dist/global.d.ts",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import VCLCredentialManifestDescriptor from "./VCLCredentialManifestDescriptor";
import VCLDeepLink from "./VCLDeepLink";
import VCLIssuingType from "./VCLIssuingType";
import VCLPushDelegate from "./VCLPushDelegate";

export default class VCLCredentialManifestDescriptorByDeepLink extends VCLCredentialManifestDescriptor {
constructor(
public deeplink: VCLDeepLink,
public issuingType: VCLIssuingType = VCLIssuingType.Career
public issuingType: VCLIssuingType = VCLIssuingType.Career,
public readonly pushDelegate: Nullish<VCLPushDelegate> = null,
) {
super(
deeplink.requestUri,
issuingType,
null,
null,
pushDelegate,
deeplink.vendorOriginContext
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import VCLCredentialManifestDescriptorByDeepLink from "../../src/api/entities/VC
import VCLIssuingType from "../../src/api/entities/VCLIssuingType";
import { CredentialManifestDescriptorMocks } from "../infrastructure/resources/valid/CredentialManifestDescriptorMocks";
import "../../src/impl/extensions/StringExtensions";
import VCLPushDelegate from "../../src/api/entities/VCLPushDelegate";

describe("VCLCredentialManifestDescriptorByDeepLink Tests", () => {
let subject: VCLCredentialManifestDescriptorByDeepLink;
Expand All @@ -14,7 +15,8 @@ describe("VCLCredentialManifestDescriptorByDeepLink Tests", () => {
test("testCredentialManifestDescriptorFullValidByDeepLinkSuccess", () => {
subject = new VCLCredentialManifestDescriptorByDeepLink(
CredentialManifestDescriptorMocks.DeepLink,
VCLIssuingType.Career
VCLIssuingType.Career,
new VCLPushDelegate("some push url", "some push token")
);

expect.stringMatching(
Expand All @@ -23,5 +25,8 @@ describe("VCLCredentialManifestDescriptorByDeepLink Tests", () => {
expect(subject.did).toEqual(
CredentialManifestDescriptorMocks.IssuerDid
);
expect(subject.issuingType).toEqual(VCLIssuingType.Career);
expect(subject.pushDelegate?.pushUrl).toEqual("some push url");
expect(subject.pushDelegate?.pushToken).toEqual("some push token");
});
});

0 comments on commit 5916cf4

Please sign in to comment.