/
githubmirror
/
novu
Обзор
Документация
Войти
/
githubmirror
/
novu
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
next
apps/api/src/app/bridge/usecases/sync/sync.command.ts
90 строк
2 KB
Adam Chmara
chore(root): apply biome formatter & linter fixes NV-6436 (#8838)
31 июл 2025, 14:59
Не верифицирован
31 июл 2025, 14:59
855fb8f
Код
Авторство
О чём код?
import { EnvironmentWithUserCommand, IStepControl } from '@novu/application-generic'; import type { CustomDataType, IPreferenceChannels, JSONSchemaDto, StepType } from '@novu/shared'; import { Type } from 'class-transformer'; import { IsDefined, IsOptional, IsString, ValidateNested } from 'class-validator'; interface IStepOutput { schema: JSONSchemaDto; } interface IWorkflowDefineStep { stepId: string; type: StepType; controls: IStepControl; outputs: IStepOutput; description: string; preferenceSettings?: IPreferenceChannels; data?: CustomDataType; } interface IStepDefineOptions { version: `${number}.${number}.${number}`; failOnErrorEnabled: boolean; skip: boolean; active?: boolean; } class WorkflowDefineStep implements IWorkflowDefineStep { description: string; preferenceSettings?: any; data?: any; @IsString() stepId: string; @IsString() type: StepType; controls: IStepControl; outputs: IStepOutput; code: string; } export interface IWorkflowDefine { workflowId: string; code: string; steps: IWorkflowDefineStep[]; controls?: IStepControl; } export class WorkflowDefine implements IWorkflowDefine { @IsString() workflowId: string; code: string; @ValidateNested({ each: true }) @Type(() => WorkflowDefineStep) steps: IWorkflowDefineStep[]; controls?: IStepControl; } export interface ICreateBridges { workflows?: IWorkflowDefine[]; } export class SyncCommand extends EnvironmentWithUserCommand implements ICreateBridges { @IsOptional() @ValidateNested({ each: true }) @Type(() => WorkflowDefine) workflows?: WorkflowDefine[]; @IsString() @IsDefined() bridgeUrl: string; @IsOptional() @IsString() source?: string; }