File

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

Index

Properties

Properties

Optional claims
Type : Record<string | Record<string, any>>
Decorators :
@ApiProperty({type: 'object', description: 'Override the default values for the credential claims.', properties: undefined, examples: undefined})
@IsObject()
@IsOptional()

Override the default values for the credential claims.

Optional claimsWebhook
Type : WebhookConfig
Decorators :
@ValidateNested()
@Type(undefined)
@IsOptional()

Webhook configuration for claims

Optional credentialConfigurationIds
Type : string[]
Decorators :
@IsArray()
@IsOptional()

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.'})
@IsEnum(ResponseType)
Optional session
Type : string
Decorators :
@IsUUID()
@IsOptional()

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;
}

results matching ""

    No results matching ""