mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(core): Remove linting exceptions in nodes-base (no-changelog) (#4944)
This commit is contained in:
@@ -12,6 +12,57 @@ export interface OperationHandler {
|
||||
handleOperation(ctx: Context, itemIndex: number): Promise<TodoistResponse>;
|
||||
}
|
||||
|
||||
export interface CreateTaskRequest {
|
||||
content?: string;
|
||||
description?: string;
|
||||
project_id?: number;
|
||||
section_id?: number;
|
||||
parent_id?: string;
|
||||
order?: number;
|
||||
labels?: string[];
|
||||
priority?: number;
|
||||
due_string?: string;
|
||||
due_datetime?: string;
|
||||
due_date?: string;
|
||||
due_lang?: string;
|
||||
}
|
||||
|
||||
export interface SyncRequest {
|
||||
commands: Command[];
|
||||
temp_id_mapping?: IDataObject;
|
||||
}
|
||||
|
||||
export interface Command {
|
||||
type: CommandType;
|
||||
uuid: string;
|
||||
temp_id?: string;
|
||||
args: {
|
||||
id?: number;
|
||||
section_id?: number;
|
||||
project_id?: number | string;
|
||||
section?: string;
|
||||
content?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export enum CommandType {
|
||||
ITEM_MOVE = 'item_move',
|
||||
ITEM_ADD = 'item_add',
|
||||
ITEM_UPDATE = 'item_update',
|
||||
ITEM_REORDER = 'item_reorder',
|
||||
ITEM_DELETE = 'item_delete',
|
||||
ITEM_COMPLETE = 'item_complete',
|
||||
}
|
||||
|
||||
async function getLabelNameFromId(ctx: Context, labelIds: number[]): Promise<string[]> {
|
||||
const labelList = [];
|
||||
for (const label of labelIds) {
|
||||
const thisLabel = await todoistApiRequest.call(ctx, 'GET', `/labels/${label}`);
|
||||
labelList.push(thisLabel.name);
|
||||
}
|
||||
return labelList;
|
||||
}
|
||||
|
||||
export class CreateHandler implements OperationHandler {
|
||||
async handleOperation(ctx: Context, itemIndex: number): Promise<TodoistResponse> {
|
||||
//https://developer.todoist.com/rest/v2/#create-a-new-task
|
||||
@@ -301,54 +352,3 @@ export class SyncHandler implements OperationHandler {
|
||||
return command.type === CommandType.ITEM_ADD;
|
||||
}
|
||||
}
|
||||
|
||||
async function getLabelNameFromId(ctx: Context, labelIds: number[]): Promise<string[]> {
|
||||
const labelList = [];
|
||||
for (const label of labelIds) {
|
||||
const thisLabel = await todoistApiRequest.call(ctx, 'GET', `/labels/${label}`);
|
||||
labelList.push(thisLabel.name);
|
||||
}
|
||||
return labelList;
|
||||
}
|
||||
|
||||
export interface CreateTaskRequest {
|
||||
content?: string;
|
||||
description?: string;
|
||||
project_id?: number;
|
||||
section_id?: number;
|
||||
parent_id?: string;
|
||||
order?: number;
|
||||
labels?: string[];
|
||||
priority?: number;
|
||||
due_string?: string;
|
||||
due_datetime?: string;
|
||||
due_date?: string;
|
||||
due_lang?: string;
|
||||
}
|
||||
|
||||
export interface SyncRequest {
|
||||
commands: Command[];
|
||||
temp_id_mapping?: IDataObject;
|
||||
}
|
||||
|
||||
export interface Command {
|
||||
type: CommandType;
|
||||
uuid: string;
|
||||
temp_id?: string;
|
||||
args: {
|
||||
id?: number;
|
||||
section_id?: number;
|
||||
project_id?: number | string;
|
||||
section?: string;
|
||||
content?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export enum CommandType {
|
||||
ITEM_MOVE = 'item_move',
|
||||
ITEM_ADD = 'item_add',
|
||||
ITEM_UPDATE = 'item_update',
|
||||
ITEM_REORDER = 'item_reorder',
|
||||
ITEM_DELETE = 'item_delete',
|
||||
ITEM_COMPLETE = 'item_complete',
|
||||
}
|
||||
|
||||
@@ -12,6 +12,48 @@ export interface OperationHandler {
|
||||
handleOperation(ctx: Context, itemIndex: number): Promise<TodoistResponse>;
|
||||
}
|
||||
|
||||
export interface CreateTaskRequest {
|
||||
content?: string;
|
||||
description?: string;
|
||||
project_id?: number;
|
||||
section_id?: number;
|
||||
parent_id?: string;
|
||||
order?: number;
|
||||
labels?: string[];
|
||||
priority?: number;
|
||||
due_string?: string;
|
||||
due_datetime?: string;
|
||||
due_date?: string;
|
||||
due_lang?: string;
|
||||
}
|
||||
|
||||
export interface SyncRequest {
|
||||
commands: Command[];
|
||||
temp_id_mapping?: IDataObject;
|
||||
}
|
||||
|
||||
export interface Command {
|
||||
type: CommandType;
|
||||
uuid: string;
|
||||
temp_id?: string;
|
||||
args: {
|
||||
id?: number;
|
||||
section_id?: number;
|
||||
project_id?: number | string;
|
||||
section?: string;
|
||||
content?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export enum CommandType {
|
||||
ITEM_MOVE = 'item_move',
|
||||
ITEM_ADD = 'item_add',
|
||||
ITEM_UPDATE = 'item_update',
|
||||
ITEM_REORDER = 'item_reorder',
|
||||
ITEM_DELETE = 'item_delete',
|
||||
ITEM_COMPLETE = 'item_complete',
|
||||
}
|
||||
|
||||
export class CreateHandler implements OperationHandler {
|
||||
async handleOperation(ctx: Context, itemIndex: number): Promise<TodoistResponse> {
|
||||
//https://developer.todoist.com/rest/v2/#create-a-new-task
|
||||
@@ -301,45 +343,3 @@ export class SyncHandler implements OperationHandler {
|
||||
return command.type === CommandType.ITEM_ADD;
|
||||
}
|
||||
}
|
||||
|
||||
export interface CreateTaskRequest {
|
||||
content?: string;
|
||||
description?: string;
|
||||
project_id?: number;
|
||||
section_id?: number;
|
||||
parent_id?: string;
|
||||
order?: number;
|
||||
labels?: string[];
|
||||
priority?: number;
|
||||
due_string?: string;
|
||||
due_datetime?: string;
|
||||
due_date?: string;
|
||||
due_lang?: string;
|
||||
}
|
||||
|
||||
export interface SyncRequest {
|
||||
commands: Command[];
|
||||
temp_id_mapping?: IDataObject;
|
||||
}
|
||||
|
||||
export interface Command {
|
||||
type: CommandType;
|
||||
uuid: string;
|
||||
temp_id?: string;
|
||||
args: {
|
||||
id?: number;
|
||||
section_id?: number;
|
||||
project_id?: number | string;
|
||||
section?: string;
|
||||
content?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export enum CommandType {
|
||||
ITEM_MOVE = 'item_move',
|
||||
ITEM_ADD = 'item_add',
|
||||
ITEM_UPDATE = 'item_update',
|
||||
ITEM_REORDER = 'item_reorder',
|
||||
ITEM_DELETE = 'item_delete',
|
||||
ITEM_COMPLETE = 'item_complete',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user