@velocitycareerlabs/server-webwallet 1.26.0-dev-build.1e2478a02 → 1.26.0-dev-build.123ec3ed9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velocitycareerlabs/server-webwallet",
3
- "version": "1.26.0-dev-build.1e2478a02",
3
+ "version": "1.26.0-dev-build.123ec3ed9",
4
4
  "description": "Web Wallet application",
5
5
  "repository": "https://github.com/velocitycareerlabs/packages",
6
6
  "engines": {
@@ -33,7 +33,7 @@
33
33
  "@fastify/swagger": "^9.0.0",
34
34
  "@fastify/swagger-ui": "^5.0.0",
35
35
  "@spencejs/spence-mongo-repos": "^0.10.2",
36
- "@velocitycareerlabs/migrations": "1.26.0-dev-build.1e2478a02",
36
+ "@velocitycareerlabs/migrations": "1.26.0-dev-build.123ec3ed9",
37
37
  "@verii/auth": "1.0.0-pre.1754862905",
38
38
  "@verii/common-functions": "1.0.0-pre.1754862905",
39
39
  "@verii/common-schemas": "1.0.0-pre.1754862905",
@@ -73,5 +73,5 @@
73
73
  "nodemon": "3.1.10",
74
74
  "prettier": "2.8.8"
75
75
  },
76
- "gitHead": "c431282fe26c43bb91fefc7d5120ef40383454d9"
76
+ "gitHead": "fac101ee19bac921e21ed9c36c54522288839a11"
77
77
  }
@@ -11,10 +11,6 @@ const webWalletGetFeedsResponseSchema = {
11
11
  properties: {
12
12
  id: { type: 'string' },
13
13
  inspectorDid: { type: 'string' },
14
- credentialTypes: {
15
- type: 'array',
16
- items: { type: 'string' },
17
- },
18
14
  presentationMetadata: {
19
15
  type: 'object',
20
16
  additionalProperties: true,
@@ -25,6 +21,17 @@ const webWalletGetFeedsResponseSchema = {
25
21
  type: 'string',
26
22
  },
27
23
  },
24
+ inputDescriptors: {
25
+ type: 'array',
26
+ items: {
27
+ type: 'object',
28
+ properties: {
29
+ id: { type: 'string' },
30
+ name: { type: 'string' },
31
+ },
32
+ required: ['id', 'name'],
33
+ },
34
+ },
28
35
  disclosureId: { type: 'string' },
29
36
  createdAt: { type: 'string' },
30
37
  updatedAt: { type: 'string' },
@@ -33,7 +40,7 @@ const webWalletGetFeedsResponseSchema = {
33
40
  'id',
34
41
  'disclosureId',
35
42
  'inspectorDid',
36
- 'credentialTypes',
43
+ 'inputDescriptors',
37
44
  'presentationMetadata',
38
45
  'sharedCredentials',
39
46
  'createdAt',
@@ -42,6 +42,9 @@ const createDisclosureMap = (disclosures) => {
42
42
  [disclosureId]: {
43
43
  presentationMetadata: disclosure.presentation?.metadata || {},
44
44
  sharedCredentials: disclosure.sharedCredentials || [],
45
+ inputDescriptors:
46
+ disclosure.presentation.presentation_definition
47
+ ?.input_descriptors || [],
45
48
  },
46
49
  };
47
50
  }
@@ -76,6 +79,7 @@ const enrichFeedsWithDisclosureData = (feeds, disclosureMap) => {
76
79
  disclosureMap[feed.disclosureId]?.presentationMetadata || {},
77
80
  sharedCredentials:
78
81
  disclosureMap[feed.disclosureId]?.sharedCredentials || [],
82
+ inputDescriptors: disclosureMap[feed.disclosureId]?.inputDescriptors || [],
79
83
  }));
80
84
  };
81
85
 
@@ -88,7 +92,7 @@ const enrichFeedsWithDisclosureData = (feeds, disclosureMap) => {
88
92
  const buildDisclosureFilter = (auth0UserId, disclosureIds) => {
89
93
  return {
90
94
  auth0UserId,
91
- feed: true,
95
+ 'presentation.metadata.feed': true,
92
96
  $expr: {
93
97
  $in: [
94
98
  { $arrayElemAt: [{ $split: ['$presentationDefinitionId', '.'] }, 1] },
@@ -67,6 +67,7 @@ describe('Feeds Controller', () => {
67
67
  client_name: 'University of Massachusetts Amherst',
68
68
  logo_uri: 'https://example.com/logo.png',
69
69
  tos_uri: 'https://example.com/terms',
70
+ feed: true,
70
71
  },
71
72
  },
72
73
  });
@@ -90,6 +91,7 @@ describe('Feeds Controller', () => {
90
91
  client_name: 'University of Massachusetts Amherst',
91
92
  logo_uri: 'https://example.com/logo.png',
92
93
  tos_uri: 'https://example.com/terms',
94
+ feed: true,
93
95
  });
94
96
  expect(feed).toHaveProperty('sharedCredentials');
95
97
  expect(feed.sharedCredentials).toEqual(['credential1', 'credential2']);