mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor: Convert all enums to const object types in nodes-base (no-changelog) (#14131)
This commit is contained in:
@@ -10,7 +10,8 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeConnectionTypes } from 'n8n-workflow';
|
||||
|
||||
import { EntryTypeEnum } from './EntryTypeEnum';
|
||||
import type { EntryType } from './EntryType';
|
||||
import { EntryTypes } from './EntryType';
|
||||
import { clockifyApiRequest } from './GenericFunctions';
|
||||
import type { IUserDto } from './UserDtos';
|
||||
import type { IWorkspaceDto } from './WorkpaceInterfaces';
|
||||
@@ -56,11 +57,11 @@ export class ClockifyTrigger implements INodeType {
|
||||
options: [
|
||||
{
|
||||
name: 'New Time Entry',
|
||||
value: EntryTypeEnum.NEW_TIME_ENTRY,
|
||||
value: EntryTypes.NEW_TIME_ENTRY,
|
||||
},
|
||||
],
|
||||
required: true,
|
||||
default: EntryTypeEnum.NEW_TIME_ENTRY,
|
||||
default: EntryTypes.NEW_TIME_ENTRY,
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -89,7 +90,7 @@ export class ClockifyTrigger implements INodeType {
|
||||
|
||||
async poll(this: IPollFunctions): Promise<INodeExecutionData[][] | null> {
|
||||
const webhookData = this.getWorkflowStaticData('node');
|
||||
const triggerField = this.getNodeParameter('watchField') as EntryTypeEnum;
|
||||
const triggerField = this.getNodeParameter('watchField') as EntryType;
|
||||
const workspaceId = this.getNodeParameter('workspaceId');
|
||||
|
||||
if (!webhookData.userId) {
|
||||
@@ -103,7 +104,7 @@ export class ClockifyTrigger implements INodeType {
|
||||
let result = null;
|
||||
|
||||
switch (triggerField) {
|
||||
case EntryTypeEnum.NEW_TIME_ENTRY:
|
||||
case EntryTypes.NEW_TIME_ENTRY:
|
||||
default:
|
||||
const workflowTimezone = this.getTimezone();
|
||||
resource = `workspaces/${workspaceId}/user/${webhookData.userId}/time-entries`;
|
||||
|
||||
Reference in New Issue
Block a user