Skip to content

Commit a03b921

Browse files
Merge pull request #339 from credebl/fix-oid4vc-vp-fixes
Made dcql query type as any to support all combination for now, suppo…
2 parents bbad6fd + 328a72b commit a03b921

3 files changed

Lines changed: 21 additions & 122 deletions

File tree

src/controllers/openid4vc/types/verifier.types.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,26 +34,26 @@ export interface PresentationDefinition {
3434
/* DCQL MODELS */
3535
/* -------------------------------------------------------------------------- */
3636

37-
export interface DcqlClaim {
38-
path: string[]
39-
intent_to_retain?: boolean
40-
}
41-
42-
export interface DcqlCredential {
43-
id: string
44-
format: string
45-
meta?: Record<string, any>
46-
require_cryptographic_holder_binding?: boolean
47-
claims: DcqlClaim[]
48-
}
49-
50-
export interface DcqlQuery {
51-
combine?: 'all' | 'any'
52-
credentials: DcqlCredential[]
53-
}
37+
// export interface DcqlClaim {
38+
// path: string[]
39+
// intent_to_retain?: boolean
40+
// }
41+
42+
// export interface DcqlCredential {
43+
// id: string
44+
// format: string
45+
// meta?: Record<string, any>
46+
// require_cryptographic_holder_binding?: boolean
47+
// claims: DcqlClaim[]
48+
// }
49+
50+
// export interface DcqlQuery {
51+
// combine?: 'all' | 'any'
52+
// credentials: DcqlCredential[]
53+
// }
5454

5555
export interface DcqlDefinition {
56-
query: DcqlQuery
56+
query: any
5757
}
5858

5959
/* -------------------------------------------------------------------------- */

src/routes/routes.ts

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,7 +1693,7 @@ const models: TsoaRoute.Models = {
16931693
"publicIssuerId": {"dataType":"string","required":true},
16941694
"credentials": {"dataType":"array","array":{"dataType":"union","subSchemas":[{"ref":"OpenId4VciOfferSdJwtCredential"},{"ref":"OpenId4VciOfferMdocCredential"},{"ref":"OpenId4VciOfferW3cCredential"}]},"required":true},
16951695
"authorizationCodeFlowConfig": {"dataType":"nestedObjectLiteral","nestedProperties":{"issuerState":{"dataType":"string"},"requirePresentationDuringIssuance":{"dataType":"boolean"},"authorizationServerUrl":{"dataType":"string","required":true}}},
1696-
"preAuthorizedCodeFlowConfig": {"dataType":"nestedObjectLiteral","nestedProperties":{"authorizationServerUrl":{"dataType":"string","required":true},"txCode":{"dataType":"nestedObjectLiteral","nestedProperties":{"input_mode":{"dataType":"union","subSchemas":[{"dataType":"enum","enums":["numeric"]},{"dataType":"enum","enums":["text"]}]},"length":{"dataType":"double"},"description":{"dataType":"string"}}},"preAuthorizedCode":{"dataType":"string"}}},
1696+
"preAuthorizedCodeFlowConfig": {"dataType":"nestedObjectLiteral","nestedProperties":{"authorizationServerUrl":{"dataType":"string","required":true},"txCode":{"dataType":"union","subSchemas":[{"dataType":"nestedObjectLiteral","nestedProperties":{"input_mode":{"dataType":"union","subSchemas":[{"dataType":"enum","enums":["numeric"]},{"dataType":"enum","enums":["text"]}]},"length":{"dataType":"double"},"description":{"dataType":"string"}}},{"dataType":"undefined"}]},"preAuthorizedCode":{"dataType":"string"}}},
16971697
"issuanceMetadata": {"ref":"Record_string.unknown_"},
16981698
},
16991699
"additionalProperties": false,
@@ -2114,40 +2114,10 @@ const models: TsoaRoute.Models = {
21142114
"additionalProperties": false,
21152115
},
21162116
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
2117-
"DcqlClaim": {
2118-
"dataType": "refObject",
2119-
"properties": {
2120-
"path": {"dataType":"array","array":{"dataType":"string"},"required":true},
2121-
"intent_to_retain": {"dataType":"boolean"},
2122-
},
2123-
"additionalProperties": false,
2124-
},
2125-
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
2126-
"DcqlCredential": {
2127-
"dataType": "refObject",
2128-
"properties": {
2129-
"id": {"dataType":"string","required":true},
2130-
"format": {"dataType":"string","required":true},
2131-
"meta": {"ref":"Record_string.any_"},
2132-
"require_cryptographic_holder_binding": {"dataType":"boolean"},
2133-
"claims": {"dataType":"array","array":{"dataType":"refObject","ref":"DcqlClaim"},"required":true},
2134-
},
2135-
"additionalProperties": false,
2136-
},
2137-
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
2138-
"DcqlQuery": {
2139-
"dataType": "refObject",
2140-
"properties": {
2141-
"combine": {"dataType":"union","subSchemas":[{"dataType":"enum","enums":["all"]},{"dataType":"enum","enums":["any"]}]},
2142-
"credentials": {"dataType":"array","array":{"dataType":"refObject","ref":"DcqlCredential"},"required":true},
2143-
},
2144-
"additionalProperties": false,
2145-
},
2146-
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
21472117
"DcqlDefinition": {
21482118
"dataType": "refObject",
21492119
"properties": {
2150-
"query": {"ref":"DcqlQuery","required":true},
2120+
"query": {"dataType":"any","required":true},
21512121
},
21522122
"additionalProperties": false,
21532123
},

src/routes/swagger.json

Lines changed: 1 addition & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -4868,80 +4868,9 @@
48684868
"type": "object",
48694869
"additionalProperties": false
48704870
},
4871-
"DcqlClaim": {
4872-
"properties": {
4873-
"path": {
4874-
"items": {
4875-
"type": "string"
4876-
},
4877-
"type": "array"
4878-
},
4879-
"intent_to_retain": {
4880-
"type": "boolean"
4881-
}
4882-
},
4883-
"required": [
4884-
"path"
4885-
],
4886-
"type": "object",
4887-
"additionalProperties": false
4888-
},
4889-
"DcqlCredential": {
4890-
"properties": {
4891-
"id": {
4892-
"type": "string"
4893-
},
4894-
"format": {
4895-
"type": "string"
4896-
},
4897-
"meta": {
4898-
"$ref": "#/components/schemas/Record_string.any_"
4899-
},
4900-
"require_cryptographic_holder_binding": {
4901-
"type": "boolean"
4902-
},
4903-
"claims": {
4904-
"items": {
4905-
"$ref": "#/components/schemas/DcqlClaim"
4906-
},
4907-
"type": "array"
4908-
}
4909-
},
4910-
"required": [
4911-
"id",
4912-
"format",
4913-
"claims"
4914-
],
4915-
"type": "object",
4916-
"additionalProperties": false
4917-
},
4918-
"DcqlQuery": {
4919-
"properties": {
4920-
"combine": {
4921-
"type": "string",
4922-
"enum": [
4923-
"all",
4924-
"any"
4925-
]
4926-
},
4927-
"credentials": {
4928-
"items": {
4929-
"$ref": "#/components/schemas/DcqlCredential"
4930-
},
4931-
"type": "array"
4932-
}
4933-
},
4934-
"required": [
4935-
"credentials"
4936-
],
4937-
"type": "object",
4938-
"additionalProperties": false
4939-
},
49404871
"DcqlDefinition": {
49414872
"properties": {
4942-
"query": {
4943-
"$ref": "#/components/schemas/DcqlQuery"
4944-
}
4873+
"query": {}
49454874
},
49464875
"required": [
49474876
"query"

0 commit comments

Comments
 (0)