File

src/auth/tenant/dto/create-tenant.dto.ts

Extends

OmitType(TenantEntity, [ "clients", "status", "sessionConfig", ] as const)

Index

Properties

Properties

Optional roles
Type : Role[]
Decorators :
@IsOptional()
@IsString({each: true})
Optional sessionConfig
Type : SessionStorageConfig
Decorators :
@ApiPropertyOptional({description: 'Session storage configuration. Controls TTL and cleanup behavior.', type: () => SessionStorageConfig})
@IsOptional()
@ValidateNested()
@Type(undefined)

Session storage configuration for this tenant. Controls how long sessions are kept and how they are cleaned up.

import { ApiPropertyOptional, OmitType } from "@nestjs/swagger";
import { Type } from "class-transformer";
import { IsOptional, IsString, ValidateNested } from "class-validator";
import { Role } from "../../roles/role.enum";
import { SessionStorageConfig } from "../entitites/session-storage-config";
import { TenantEntity } from "../entitites/tenant.entity";

export class CreateTenantDto extends OmitType(TenantEntity, [
    "clients",
    "status",
    "sessionConfig",
] as const) {
    @IsOptional()
    @IsString({ each: true })
    roles?: Role[];

    /**
     * Session storage configuration for this tenant.
     * Controls how long sessions are kept and how they are cleaned up.
     */
    @ApiPropertyOptional({
        description:
            "Session storage configuration. Controls TTL and cleanup behavior.",
        type: () => SessionStorageConfig,
    })
    @IsOptional()
    @ValidateNested()
    @Type(() => SessionStorageConfig)
    sessionConfig?: SessionStorageConfig;
}

results matching ""

    No results matching ""