Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions packages/runtime/src/useCases/common/Schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17317,13 +17317,17 @@ export const AcceptAuthorizationRequestRequest: any = {
"type": "object"
},
"attributeId": {
"type": "string"
"$ref": "#/definitions/AttributeIdString"
}
},
"required": [
"attributeId",
"authorizationRequest"
]
},
"AttributeIdString": {
"type": "string",
"pattern": "ATT[A-Za-z0-9]{17}"
}
}
}
Expand All @@ -17336,7 +17340,7 @@ export const CreatePresentationTokenRequest: any = {
"type": "object",
"properties": {
"attributeId": {
"type": "string"
"$ref": "#/definitions/AttributeIdString"
},
"expiresAt": {
"$ref": "#/definitions/ISO8601DateTimeString"
Expand All @@ -17352,6 +17356,10 @@ export const CreatePresentationTokenRequest: any = {
],
"additionalProperties": false
},
"AttributeIdString": {
"type": "string",
"pattern": "ATT[A-Za-z0-9]{17}"
},
"ISO8601DateTimeString": {
"type": "string",
"errorMessage": "must match ISO8601 datetime format",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { Result } from "@js-soft/ts-utils";
import { AttributesController, LocalAttribute, OpenId4VcController, OwnIdentityAttribute } from "@nmshd/consumption";
import { CoreId } from "@nmshd/core-types";
import { Inject } from "@nmshd/typescript-ioc";
import { RuntimeErrors, SchemaRepository, SchemaValidator, UseCase } from "../../common";
import { AttributeIdString, RuntimeErrors, SchemaRepository, SchemaValidator, UseCase } from "../../common";

export interface AbstractAcceptAuthorizationRequestRequest<T> {
authorizationRequest: T;
attributeId: string;
attributeId: AttributeIdString;
}

export interface AcceptAuthorizationRequestRequest extends AbstractAcceptAuthorizationRequestRequest<OpenId4VpResolvedAuthorizationRequest> {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import { CoreDate, CoreId } from "@nmshd/core-types";
import { TokenDTO } from "@nmshd/runtime-types";
import { TokenController } from "@nmshd/transport";
import { Inject } from "@nmshd/typescript-ioc";
import { ISO8601DateTimeString, RuntimeErrors, SchemaRepository, SchemaValidator, UseCase } from "../../common";
import { AttributeIdString, ISO8601DateTimeString, RuntimeErrors, SchemaRepository, SchemaValidator, UseCase } from "../../common";
import { TokenMapper } from "../../transport/tokens/TokenMapper";

export interface CreatePresentationTokenRequest {
attributeId: string;
attributeId: AttributeIdString;
expiresAt: ISO8601DateTimeString;
ephemeral: boolean;
}
Expand Down
Loading