File

src/issuer/oid4vci/dto/offer-request.dto.ts

Index

Properties

Properties

credentialConfigurationIds
Type : string[]
Decorators :
@ArrayNotEmpty()
@IsString({each: true})
Example :
response_type
Type : ResponseType
Decorators :
@ApiProperty({example: 'qrcode', description: 'The type of response expected for the offer request.'})
@IsEnum(ResponseType)
Example :
Optional values
Type : literal type
Decorators :
@IsObject()
@IsOptional()
import {
    ArrayNotEmpty,
    IsEnum,
    IsObject,
    IsOptional,
    IsString,
} from 'class-validator';
import { ResponseType } from '../../../verifier/oid4vp/dto/presentation-request.dto';
import { ApiProperty } from '@nestjs/swagger';

export class OfferRequest {
    /**
     * @example "qrcode"
     */
    @ApiProperty({
        example: 'qrcode',
        description: 'The type of response expected for the offer request.',
    })
    @IsEnum(ResponseType)
    response_type: ResponseType;

    /**
     * @example ["pid"]
     */
    @ArrayNotEmpty()
    @IsString({ each: true })
    credentialConfigurationIds: string[];

    @IsObject()
    @IsOptional()
    values?: { [key: string]: Record<string, any> };
}

export class OfferResponse {
    uri: string;
    session: string;
}

results matching ""

    No results matching ""