n8n/packages/nodes-base/nodes/Clockify/ProjectInterfaces.ts
Iván Ovejero 1084e7d9b5
Add Clockify task resource (#2162)
*  Add Task resource to Clockify Node

* 🔨 Refactor Clockify expansion

* 🔥 Remove logging

*  Add defaults

*  Improvements

*  Minor improvements

Co-authored-by: Frank Silver <dasylva.f@gmail.com>
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-09-03 19:03:15 +02:00

60 lines
1 KiB
TypeScript

import {
IHourlyRateDto,
IMembershipDto,
} from './CommonDtos';
enum EstimateEnum {
AUTO = 'AUTO',
MANUAL = 'MANUAL',
}
interface IEstimateDto {
estimate: string;
type: EstimateEnum;
}
export interface IProjectDto {
archived: boolean;
billable: boolean;
clientId: string;
clientName: string | undefined;
color: string;
duration: string | undefined;
estimate: IEstimateDto | undefined;
hourlyRate: IHourlyRateDto | undefined;
id: string;
memberships: IMembershipDto[] | undefined;
name: string;
isPublic: boolean;
workspaceId: string;
note: string | undefined;
}
export interface IProjectRequest {
name: string;
clientId: string;
isPublic: boolean;
estimate: IEstimateDto;
color: string;
note: string;
billable: boolean;
hourlyRate: IHourlyRateDto;
memberships: IMembershipDto;
tasks: ITaskDto;
}
enum TaskStatusEnum {
ACTIVE = 'ACTIVE',
DONE = 'DONE',
}
export interface ITaskDto {
assigneeIds: object;
estimate: string;
id: string;
name: string;
projectId: string;
status: TaskStatusEnum;
'is-active': boolean;
}