File

src/issuer/lifecycle/status/dto/status-list-response.dto.ts

Description

DTO representing a status list entity for API responses.

Index

Properties

Properties

availableEntries
Type : number
Decorators :
@ApiProperty({description: 'Number of available entries', example: 9850})

Number of available entries.

bits
Type : BitsPerStatus
Decorators :
@ApiProperty({description: 'Bits per status value', enum: undefined, example: 1})

The number of bits used for each status.

capacity
Type : number
Decorators :
@ApiProperty({description: 'Total capacity of the status list', example: 10000})

Total capacity of the status list.

Optional certId
Type : string | null
Decorators :
@ApiPropertyOptional({description: 'Certificate ID used for signing. Null means using the tenant's default.', example: 'my-status-list-cert', nullable: true})

Optional certificate ID used for signing this status list's JWT.

createdAt
Type : Date
Decorators :
@ApiProperty({description: 'Creation timestamp', example: '2024-01-15T10:30:00.000Z'})

Timestamp when this status list was created.

Optional credentialConfigurationId
Type : string | null
Decorators :
@ApiPropertyOptional({description: 'Credential configuration ID this list is bound to. Null means shared.', example: 'org.iso.18013.5.1.mDL', nullable: true})

Optional credential configuration ID that this status list is bound to.

Optional expiresAt
Type : Date | null
Decorators :
@ApiPropertyOptional({description: 'JWT expiration timestamp. Null if JWT has not been generated yet.', example: '2024-01-15T11:30:00.000Z', nullable: true})

Timestamp when the JWT for this status list expires. If null, the JWT has not been generated yet.

id
Type : string
Decorators :
@ApiProperty({description: 'Unique identifier for the status list', example: '550e8400-e29b-41d4-a716-446655440000'})

Unique identifier for the status list.

tenantId
Type : string
Decorators :
@ApiProperty({description: 'The tenant ID', example: 'root'})

The tenant ID that owns this status list.

uri
Type : string
Decorators :
@ApiProperty({description: 'The public URI for this status list', example: 'https://example.com/root/status-management/status-list/550e8400-e29b-41d4-a716-446655440000'})

The URI where this status list can be accessed.

usedEntries
Type : number
Decorators :
@ApiProperty({description: 'Number of entries in use', example: 150})

Number of entries currently in use.

import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
import { BitsPerStatus } from "@sd-jwt/jwt-status-list";

/**
 * DTO representing a status list entity for API responses.
 */
export class StatusListResponseDto {
    /**
     * Unique identifier for the status list.
     */
    @ApiProperty({
        description: "Unique identifier for the status list",
        example: "550e8400-e29b-41d4-a716-446655440000",
    })
    id!: string;

    /**
     * The tenant ID that owns this status list.
     */
    @ApiProperty({
        description: "The tenant ID",
        example: "root",
    })
    tenantId!: string;

    /**
     * Optional credential configuration ID that this status list is bound to.
     */
    @ApiPropertyOptional({
        description:
            "Credential configuration ID this list is bound to. Null means shared.",
        example: "org.iso.18013.5.1.mDL",
        nullable: true,
    })
    credentialConfigurationId?: string | null;

    /**
     * Optional certificate ID used for signing this status list's JWT.
     */
    @ApiPropertyOptional({
        description:
            "Certificate ID used for signing. Null means using the tenant's default.",
        example: "my-status-list-cert",
        nullable: true,
    })
    certId?: string | null;

    /**
     * The number of bits used for each status.
     */
    @ApiProperty({
        description: "Bits per status value",
        enum: [1, 2, 4, 8],
        example: 1,
    })
    bits!: BitsPerStatus;

    /**
     * Total capacity of the status list.
     */
    @ApiProperty({
        description: "Total capacity of the status list",
        example: 10000,
    })
    capacity!: number;

    /**
     * Number of entries currently in use.
     */
    @ApiProperty({
        description: "Number of entries in use",
        example: 150,
    })
    usedEntries!: number;

    /**
     * Number of available entries.
     */
    @ApiProperty({
        description: "Number of available entries",
        example: 9850,
    })
    availableEntries!: number;

    /**
     * The URI where this status list can be accessed.
     */
    @ApiProperty({
        description: "The public URI for this status list",
        example:
            "https://example.com/root/status-management/status-list/550e8400-e29b-41d4-a716-446655440000",
    })
    uri!: string;

    /**
     * Timestamp when this status list was created.
     */
    @ApiProperty({
        description: "Creation timestamp",
        example: "2024-01-15T10:30:00.000Z",
    })
    createdAt!: Date;

    /**
     * Timestamp when the JWT for this status list expires.
     * If null, the JWT has not been generated yet.
     */
    @ApiPropertyOptional({
        description:
            "JWT expiration timestamp. Null if JWT has not been generated yet.",
        example: "2024-01-15T11:30:00.000Z",
        nullable: true,
    })
    expiresAt?: Date | null;
}

results matching ""

    No results matching ""