/
githubmirror
/
novu
Обзор
Документация
Войти
/
githubmirror
/
novu
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
next
apps/api/src/app/environment-variables/usecases/update-environment-variable/update-environment-variable.command.ts
34 строки
1013 B
Dima Grossman
fix(api-service): scope env variable writes and environment deletes to API key environment fixes NV-8182 (#11781)
05 июл 2026, 15:40
Не верифицирован
05 июл 2026, 15:40
48084bd
Код
Авторство
О чём код?
import { OrganizationLevelWithUserCommand } from '@novu/application-generic'; import { EnvironmentVariableType } from '@novu/shared'; import { Type } from 'class-transformer'; import { IsArray, IsBoolean, IsEnum, IsNotEmpty, IsOptional, IsString, Matches, ValidateNested } from 'class-validator'; import { EnvironmentVariableValueCommand } from '../create-environment-variable/create-environment-variable.command'; export class UpdateEnvironmentVariableCommand extends OrganizationLevelWithUserCommand { @IsString() @IsNotEmpty() variableKey: string; @IsString() @Matches(/^[A-Za-z][A-Za-z0-9_]*$/) @IsOptional() key?: string; @IsEnum(EnvironmentVariableType) @IsOptional() type?: EnvironmentVariableType; @IsBoolean() @IsOptional() isSecret?: boolean; @IsArray() @ValidateNested({ each: true }) @Type(() => EnvironmentVariableValueCommand) @IsOptional() values?: EnvironmentVariableValueCommand[]; @IsBoolean() @IsOptional() restrictToUserEnvironment?: boolean; }