src/issuer/oid4vci/dto/offer-request.dto.ts
Properties |
|
Optional claimsWebhook |
Type : WebhookConfig
|
Decorators :
@ValidateNested()
|
Webhook configuration for claims |
Optional credentialConfigurationIds |
Type : string[]
|
Decorators :
@IsArray()
|
Overrides the default values for the credential ids. |
issuanceId |
Type : string
|
Decorators :
@IsString()
|
Issuance config id to reference the issuance configuration. |
response_type |
Type : ResponseType
|
Decorators :
@ApiProperty({examples: undefined, description: 'The type of response expected for the offer request.'})
|
Optional session |
Type : string
|
Decorators :
@IsUUID()
|
Pre defined session id |
import { ApiProperty } from "@nestjs/swagger";
import { Type } from "class-transformer";
import {
IsArray,
IsEnum,
IsObject,
IsOptional,
IsString,
IsUUID,
ValidateNested,
} from "class-validator";
import { WebhookConfig } from "../../../utils/webhook/webhook.dto";
import { ResponseType } from "../../../verifier/oid4vp/dto/presentation-request.dto";
export class OfferRequestDto {
@ApiProperty({
examples: [
{
value: "qrcode",
},
],
description: "The type of response expected for the offer request.",
})
@IsEnum(ResponseType)
response_type: ResponseType;
/**
* Issuance config id to reference the issuance configuration.
*/
@IsString()
issuanceId: string;
/**
* Overrides the default values for the credential ids.
*/
@IsArray()
@IsOptional()
credentialConfigurationIds?: string[];
/**
* Override the default values for the credential claims.
*/
@ApiProperty({
type: "object",
description: "Override the default values for the credential claims.",
properties: {},
examples: [
{
pid: {
given_name: "ERIKA",
family_name: "MUSTERMANN",
},
},
],
})
@IsObject()
@IsOptional()
claims?: Record<string, Record<string, any>>;
/**
* Webhook configuration for claims
*/
@ValidateNested()
@Type(() => WebhookConfig)
@IsOptional()
claimsWebhook?: WebhookConfig;
/**
* Pre defined session id
*/
@IsUUID()
@IsOptional()
session?: string;
}
export class OfferResponse {
uri: string;
session: string;
}