Skip to content

Commit

Permalink
chore(root): Release 2024-10-03 08:05 (#6606)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Oct 3, 2024
2 parents 5e0692b + 4d64971 commit 8a62e62
Show file tree
Hide file tree
Showing 40 changed files with 259 additions and 234 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { DEFAULT_WORKFLOW_PREFERENCES, PreferencesTypeEnum, StepTypeEnum, WorkflowOriginEnum } from '@novu/shared';
import { ControlValuesEntity, NotificationStepEntity, NotificationTemplateEntity } from '@novu/dal';
import { GetPreferencesResponseDto } from '@novu/application-generic';

import {
ControlsSchema,
DEFAULT_WORKFLOW_PREFERENCES,
PreferencesResponseDto,
PreferencesTypeEnum,
StepResponseDto,
StepTypeEnum,
WorkflowListResponseDto,
} from '../dto/workflow-commons-fields';
import { WorkflowResponseDto } from '../dto/workflow-response-dto';
WorkflowOriginEnum,
WorkflowResponseDto,
} from '@novu/shared';
import { ControlValuesEntity, NotificationStepEntity, NotificationTemplateEntity } from '@novu/dal';
import { GetPreferencesResponseDto } from '@novu/application-generic';

export function toResponseWorkflowDto(
template: NotificationTemplateEntity,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { LimitOffsetPaginationDto } from '@novu/shared';

import { WorkflowResponseDto } from '../dto/workflow-response-dto';
import { LimitOffsetPaginationDto, WorkflowResponseDto } from '@novu/shared';

export class GetListQueryParams extends LimitOffsetPaginationDto<WorkflowResponseDto, 'updatedAt'> {
query?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ import {
NotificationStepEntity,
NotificationTemplateRepository,
} from '@novu/dal';
import { ControlVariablesLevelEnum } from '@novu/shared';
import { ControlVariablesLevelEnum, WorkflowResponseDto } from '@novu/shared';
import { GetPreferences, GetPreferencesCommand } from '@novu/application-generic';

import { GetWorkflowCommand } from './get-workflow.command';
import { WorkflowNotFoundException } from '../../exceptions/workflow-not-found-exception';
import { WorkflowResponseDto } from '../../dto/workflow-response-dto';
import { toResponseWorkflowDto } from '../../mappers/notification-template-mapper';

@Injectable()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Injectable } from '@nestjs/common';

import { NotificationTemplateRepository } from '@novu/dal';
import { ListWorkflowResponse } from '@novu/shared';
import { ListWorkflowsCommand } from './list-workflows.command';
import { ListWorkflowResponse } from '../../dto/workflow-commons-fields';
import { toWorkflowsMinifiedDtos } from '../../mappers/notification-template-mapper';

@Injectable()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { EnvironmentWithUserObjectCommand } from '@novu/application-generic';
import { CreateWorkflowDto } from '../../dto/create-workflow-dto';
import { UpdateWorkflowDto } from '../../dto/update-workflow-dto';
import { CreateWorkflowDto, UpdateWorkflowDto } from '@novu/shared';

export class UpsertWorkflowCommand extends EnvironmentWithUserObjectCommand {
workflowDatabaseIdForUpdate?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,19 @@ import {
UpsertPreferences,
UpsertUserWorkflowPreferencesCommand,
} from '@novu/application-generic';
import { WorkflowCreationSourceEnum, WorkflowOriginEnum, WorkflowTypeEnum } from '@novu/shared';
import {
CreateWorkflowDto,
StepCreateDto,
StepDto,
StepUpdateDto,
WorkflowCreationSourceEnum,
WorkflowOriginEnum,
WorkflowResponseDto,
WorkflowTypeEnum,
} from '@novu/shared';
import { UpsertWorkflowCommand } from './upsert-workflow.command';
import { WorkflowAlreadyExistException } from '../../exceptions/workflow-already-exist';
import { StepCreateDto, StepDto, StepUpdateDto } from '../../dto/workflow-commons-fields';
import { StepUpsertMechanismFailedMissingIdException } from '../../exceptions/step-upsert-mechanism-failed-missing-id.exception';
import { CreateWorkflowDto } from '../../dto/create-workflow-dto';
import { WorkflowResponseDto } from '../../dto/workflow-response-dto';
import { toResponseWorkflowDto } from '../../mappers/notification-template-mapper';

function buildUpsertControlValuesCommand(command: UpsertWorkflowCommand, persistedStep, persistedWorkflow, stepInDto) {
Expand Down
16 changes: 9 additions & 7 deletions apps/api/src/app/workflows-v2/workflow.controller.e2e.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
import { expect } from 'chai';
import { UserSession } from '@novu/testing';
import { DEFAULT_WORKFLOW_PREFERENCES, StepTypeEnum, WorkflowCreationSourceEnum } from '@novu/shared';
import { randomBytes } from 'crypto';
import { JsonSchema } from '@novu/framework';
import {
CreateWorkflowDto,
DEFAULT_WORKFLOW_PREFERENCES,
ListWorkflowResponse,
StepCreateDto,
StepDto,
StepTypeEnum,
StepUpdateDto,
UpdateWorkflowDto,
WorkflowCommonsFields,
WorkflowCreationSourceEnum,
WorkflowListResponseDto,
} from './dto/workflow-commons-fields';
import { WorkflowResponseDto } from './dto/workflow-response-dto';
import { UpdateWorkflowDto } from './dto/update-workflow-dto';
import { CreateWorkflowDto } from './dto/create-workflow-dto';
WorkflowResponseDto,
} from '@novu/shared';
import { randomBytes } from 'crypto';
import { JsonSchema } from '@novu/framework';

const v2Prefix = '/v2';
const PARTIAL_UPDATED_NAME = 'Updated';
Expand Down
13 changes: 8 additions & 5 deletions apps/api/src/app/workflows-v2/workflow.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@ import {
} from '@nestjs/common';

import { ApiTags } from '@nestjs/swagger';
import { DirectionEnum, UserSessionData } from '@novu/shared';
import {
CreateWorkflowDto,
DirectionEnum,
ListWorkflowResponse,
UpdateWorkflowDto,
UserSessionData,
WorkflowResponseDto,
} from '@novu/shared';
import { ExternalApiAccessible, UserAuthGuard, UserSession } from '@novu/application-generic';
import { ApiCommonResponses } from '../shared/framework/response.decorator';
import { UserAuthentication } from '../shared/framework/swagger/api.key.security';
Expand All @@ -25,13 +32,9 @@ import { UpsertWorkflowCommand } from './usecases/upsert-workflow/upsert-workflo
import { GetWorkflowUseCase } from './usecases/get-workflow/get-workflow.usecase';
import { ListWorkflowsUseCase } from './usecases/list-workflows/list-workflow.usecase';
import { ListWorkflowsCommand } from './usecases/list-workflows/list-workflows.command';
import { ListWorkflowResponse } from './dto/workflow-commons-fields';
import { DeleteWorkflowUseCase } from './usecases/delete-workflow/delete-workflow.usecase';
import { DeleteWorkflowCommand } from './usecases/delete-workflow/delete-workflow.command';
import { GetListQueryParams } from './params/get-list-query-params';
import { CreateWorkflowDto } from './dto/create-workflow-dto';
import { UpdateWorkflowDto } from './dto/update-workflow-dto';
import { WorkflowResponseDto } from './dto/workflow-response-dto';

@ApiCommonResponses()
@Controller({ path: `/workflows`, version: '2' })
Expand Down
3 changes: 1 addition & 2 deletions apps/dashboard/src/components/primitives/badge.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import * as React from 'react';
import { cva, type VariantProps } from 'class-variance-authority';

import { cn } from '@/utils/ui';

const badgeVariants = cva(
'inline-flex items-center rounded-md border px-2 py-1 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
{
variants: {
variant: {
default: 'border-transparent bg-muted text-muted-foreground',
default: 'border-transparent bg-primary/5 text-primary/50',
destructive: 'border-transparent bg-destructive/10 text-destructive',
success: 'border-transparent bg-success/10 text-success',
warning: 'border-transparent bg-warning/10 text-warning',
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/src/components/primitives/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const buttonVariants = cva(
novu: 'bg-gradient-to-b from-novu/90 to-novu text-novu-foreground shadow-[inset_0_-4px_2px_-2px_hsl(var(--novu)),inset_0_0_0_1px_rgba(255,255,255,0.16),0_0_0_1px_hsl(var(--novu)),0px_1px_2px_0px_#0E121B3D] after:content-[""] after:absolute after:w-full after:h-full after:bg-gradient-to-b after:from-background/10 after:opacity-0 hover:after:opacity-100 after:rounded-lg after:transition-opacity after:duration-300',
destructive:
'bg-gradient-to-b from-destructive/90 to-destructive text-destructive-foreground shadow-[inset_0_-4px_2px_-2px_hsl(var(--destructive)),inset_0_0_0_1px_rgba(255,255,255,0.16),0_0_0_1px_hsl(var(--destructive)),0px_1px_2px_0px_#0E121B3D] after:content-[""] after:absolute after:w-full after:h-full after:bg-gradient-to-b after:from-background/10 after:opacity-0 hover:after:opacity-100 after:rounded-lg after:transition-opacity after:duration-300',
outline: 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground',
outline: 'border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground',
ghost: 'hover:bg-accent hover:text-accent-foreground',
link: 'text-primary underline-offset-4 hover:underline',
},
Expand Down
12 changes: 6 additions & 6 deletions apps/dashboard/src/components/primitives/step.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import { cva, type VariantProps } from 'class-variance-authority';
import { cn } from '@/utils/ui';

const stepVariants = cva(
'inline-flex items-center rounded-full border-1.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
'inline-flex items-center rounded-full border text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
{
variants: {
variant: {
default: 'border-muted-foreground/5 bg-muted/50 text-muted-foreground/50',
feature: 'border-feature/30 bg-transparent text-feature/30',
information: 'border-information/30 bg-transparent text-information/30',
highlighted: 'border-highlighted/30 bg-transparent text-highlighted/30',
stable: 'border-stable/30 bg-transparent text-stable/30',
default: 'border-primary/5 bg-primary/2.5 text-primary/30',
feature: 'border-feature/30 bg-foreground/2.5 text-feature/30',
information: 'border-information/30 bg-foreground/2.5 text-information/30',
highlighted: 'border-highlighted/30 bg-foreground/2.5 text-highlighted/30',
stable: 'border-stable/30 bg-foreground/2.5 text-stable/30',
},
size: {
default: 'p-2 [&>svg]:size-3.5',
Expand Down
8 changes: 4 additions & 4 deletions apps/dashboard/src/components/primitives/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { cn } from '@/utils/ui';

const Table = React.forwardRef<HTMLTableElement, React.HTMLAttributes<HTMLDivElement>>(
({ className, ...props }, ref) => (
<div className="relative w-full overflow-hidden rounded-md border shadow">
<div className="relative w-full overflow-hidden rounded-md border shadow-sm">
<table ref={ref} className={cn('w-full caption-bottom text-sm', className)} {...props} />
</div>
)
Expand All @@ -30,7 +30,7 @@ const TableRow = React.forwardRef<HTMLTableRowElement, React.HTMLAttributes<HTML
({ className, ...props }, ref) => (
<tr
ref={ref}
className={cn('border-muted first-of-type:border-border border-t transition-colors', className)}
className={cn('border-border/50 first-of-type:border-border border-t transition-colors', className)}
{...props}
/>
)
Expand All @@ -42,7 +42,7 @@ const TableHead = React.forwardRef<HTMLTableCellElement, React.ThHTMLAttributes<
<th
ref={ref}
className={cn(
'text-muted-foreground h-10 px-2 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',
'text-foreground/60 h-10 px-2 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',
className
)}
{...props}
Expand All @@ -58,7 +58,7 @@ TableCell.displayName = 'TableCell';

const TableCaption = React.forwardRef<HTMLTableCaptionElement, React.HTMLAttributes<HTMLTableCaptionElement>>(
({ className, ...props }, ref) => (
<caption ref={ref} className={cn('text-muted-foreground mt-4 text-sm', className)} {...props} />
<caption ref={ref} className={cn('text-foreground/50 mt-4 text-sm', className)} {...props} />
)
);
TableCaption.displayName = 'TableCaption';
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/src/components/primitives/tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const tagVariants = cva(
{
variants: {
variant: {
default: 'border-transparent bg-muted text-muted-foreground',
default: 'border-transparent bg-primary/5 text-primary/50',
feature: 'border-transparent bg-feature/10 text-feature',
information: 'border-transparent bg-information/10 text-information',
},
Expand Down
3 changes: 0 additions & 3 deletions apps/dashboard/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
--primary: 222 32% 8%;
--primary-foreground: 0 0% 100%;

--muted: 0 0% 96.1%;
--muted-foreground: 0 0% 45.1%;

--accent: 0 0% 96.1%;
--accent-foreground: 222 32% 8%;

Expand Down
13 changes: 7 additions & 6 deletions apps/dashboard/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@ export default {
darkMode: ['class'],
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
theme: {
boxShadow: {
xs: '0px 1px 2px 0px #0A0D1408',
sm: '0px 1px 2px 0px #1018280F,0px 1px 3px 0px #1018281A',
DEFAULT: '0px 16px 32px -12px #0E121B1A',
},
extend: {
borderWidth: {
1.5: 1.5,
opacity: {
2.5: 0.025,
},
borderRadius: {
lg: 'var(--radius)',
Expand All @@ -31,10 +36,6 @@ export default {
DEFAULT: 'hsl(var(--novu))',
foreground: 'hsl(var(--novu-foreground))',
},
muted: {
DEFAULT: 'hsl(var(--muted))',
foreground: 'hsl(var(--muted-foreground))',
},
accent: {
DEFAULT: 'hsl(var(--accent))',
foreground: 'hsl(var(--accent-foreground))',
Expand Down
Loading

0 comments on commit 8a62e62

Please sign in to comment.