src/crypto/key/dto/cert-import.dto.ts
DTO for creating a certificate.
Properties |
|
| certUsageTypes |
Type : CertUsage[]
|
Decorators :
@IsEnum(CertUsage, {each: true})
|
|
Defined in src/crypto/key/dto/cert-import.dto.ts:33
|
|
Usage types for the certificate. |
| Optional crt |
Type : string
|
Decorators :
@IsString()
|
|
Defined in src/crypto/key/dto/cert-import.dto.ts:40
|
|
Certificate in PEM format, if not provided, a self-signed certificate will be generated. |
| Optional id |
Type : string
|
Decorators :
@IsOptional()
|
|
Defined in src/crypto/key/dto/cert-import.dto.ts:21
|
| keyId |
Type : string
|
Decorators :
@IsString()
|
|
Defined in src/crypto/key/dto/cert-import.dto.ts:27
|
|
Key ID of the certificate's private key. |
| Optional subjectName |
Type : string
|
Decorators :
@IsString()
|
|
Defined in src/crypto/key/dto/cert-import.dto.ts:48
|
|
Subject name (CN) for self-signed certificate generation. If not provided, the tenant name will be used. |
import { OmitType } from "@nestjs/swagger";
import { IsEnum, IsOptional, IsString } from "class-validator";
import { CertEntity } from "../entities/cert.entity";
import { CertUsage } from "../entities/cert-usage.entity";
/**
* DTO for creating a certificate.
*/
export class CertImportDto extends OmitType(CertEntity, [
"tenantId",
"tenant",
"key",
"createdAt",
"updatedAt",
"usages",
"crt",
"id",
] as const) {
@IsOptional()
@IsString()
id?: string;
/**
* Key ID of the certificate's private key.
*/
@IsString()
keyId: string;
/**
* Usage types for the certificate.
*/
@IsEnum(CertUsage, { each: true })
certUsageTypes: CertUsage[];
/**
* Certificate in PEM format, if not provided, a self-signed certificate will be generated.
*/
@IsString()
@IsOptional()
crt?: string;
/**
* Subject name (CN) for self-signed certificate generation.
* If not provided, the tenant name will be used.
*/
@IsString()
@IsOptional()
subjectName?: string;
}