Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api-service): remove skip ref #7357

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { z } from 'zod';
import { zodToJsonSchema } from 'zod-to-json-schema';

import { JSONSchemaDto, UiComponentEnum, UiSchema, UiSchemaGroupEnum } from '@novu/shared';
import { skipStepUiSchema, skipZodSchema } from './skip-control.schema';
import { skipStepUiSchema } from './skip-control.schema';

export const chatControlZodSchema = z
.object({
skip: skipZodSchema,
skip: z.object({}).catchall(z.unknown()).optional(),
body: z.string(),
})
.strict();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import {
UiSchema,
UiSchemaGroupEnum,
} from '@novu/shared';
import { skipStepUiSchema, skipZodSchema } from './skip-control.schema';
import { skipStepUiSchema } from './skip-control.schema';

export const delayControlZodSchema = z
.object({
skip: skipZodSchema,
skip: z.object({}).catchall(z.unknown()).optional(),
type: z.enum(['regular']).default('regular'),
amount: z.union([z.number().min(1), z.string()]),
unit: z.nativeEnum(TimeUnitEnum),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import {
UiSchema,
UiSchemaGroupEnum,
} from '@novu/shared';
import { skipStepUiSchema, skipZodSchema } from './skip-control.schema';
import { skipStepUiSchema } from './skip-control.schema';

const digestRegularControlZodSchema = z
.object({
skip: skipZodSchema,
skip: z.object({}).catchall(z.unknown()).optional(),
amount: z.union([z.number().min(1), z.string().min(1)]),
unit: z.nativeEnum(TimeUnitEnum).default(TimeUnitEnum.SECONDS),
digestKey: z.string().optional(),
Expand All @@ -27,7 +27,7 @@ const digestRegularControlZodSchema = z
.strict();
const digestTimedControlZodSchema = z
.object({
skip: skipZodSchema,
skip: z.object({}).catchall(z.unknown()).optional(),
cron: z.string().min(1),
digestKey: z.string().optional(),
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { JSONSchemaDto, UiComponentEnum, UiSchema, UiSchemaGroupEnum } from '@no
import { z } from 'zod';
import { zodToJsonSchema } from 'zod-to-json-schema';
import { TipTapSchema } from '../../../environments-v1/usecases/output-renderers';
import { skipZodSchema, skipStepUiSchema } from './skip-control.schema';
import { skipStepUiSchema } from './skip-control.schema';

export const emailControlZodSchema = z
.object({
skip: skipZodSchema,
skip: z.object({}).catchall(z.unknown()).optional(),
/*
* todo: we need to validate the email editor (body) by type and not string,
* updating it to TipTapSchema will break the existing upsert issues generation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { z } from 'zod';
import { zodToJsonSchema } from 'zod-to-json-schema';
import { JSONSchemaDto, UiComponentEnum, UiSchema, UiSchemaGroupEnum } from '@novu/shared';
import { skipStepUiSchema, skipZodSchema } from './skip-control.schema';
import { skipStepUiSchema } from './skip-control.schema';

const redirectZodSchema = z
.object({
Expand All @@ -23,7 +23,7 @@ const actionZodSchema = z

export const inAppControlZodSchema = z
.object({
skip: skipZodSchema,
skip: z.object({}).catchall(z.unknown()).optional(),
subject: z.string().optional(),
body: z.string(),
avatar: z.string().optional(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { z } from 'zod';
import { zodToJsonSchema } from 'zod-to-json-schema';

import { JSONSchemaDto, UiComponentEnum, UiSchema, UiSchemaGroupEnum } from '@novu/shared';
import { skipZodSchema, skipStepUiSchema } from './skip-control.schema';
import { skipStepUiSchema } from './skip-control.schema';

export const pushControlZodSchema = z
.object({
skip: skipZodSchema,
skip: z.object({}).catchall(z.unknown()).optional(),
subject: z.string(),
body: z.string(),
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import { UiSchemaGroupEnum, UiSchema, UiComponentEnum } from '@novu/shared';
import { z } from 'zod';

export const skipZodSchema = z.object({}).catchall(z.unknown()).optional();

export const skipStepUiSchema = {
group: UiSchemaGroupEnum.SKIP,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { z } from 'zod';
import { zodToJsonSchema } from 'zod-to-json-schema';

import { JSONSchemaDto, UiComponentEnum, UiSchema, UiSchemaGroupEnum } from '@novu/shared';
import { skipZodSchema, skipStepUiSchema } from './skip-control.schema';
import { skipStepUiSchema } from './skip-control.schema';

export const smsControlZodSchema = z
.object({
skip: skipZodSchema,
skip: z.object({}).catchall(z.unknown()).optional(),
body: z.string(),
})
.strict();
Expand Down
Loading