mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
refactor: Convert all enums to const object types in nodes-base (no-changelog) (#14131)
This commit is contained in:
@@ -18,29 +18,35 @@ import {
|
||||
// validateJSON,
|
||||
} from './GenericFunctions';
|
||||
|
||||
const enum Status {
|
||||
Open = 2,
|
||||
Pending = 3,
|
||||
Resolved = 4,
|
||||
Closed = 5,
|
||||
}
|
||||
const Statuses = {
|
||||
Open: 2,
|
||||
Pending: 3,
|
||||
Resolved: 4,
|
||||
Closed: 5,
|
||||
} as const;
|
||||
|
||||
const enum Priority {
|
||||
Low = 1,
|
||||
Medium = 2,
|
||||
High = 3,
|
||||
Urgent = 4,
|
||||
}
|
||||
type Status = (typeof Statuses)[keyof typeof Statuses];
|
||||
|
||||
const enum Source {
|
||||
Email = 1,
|
||||
Portal = 2,
|
||||
Phone = 3,
|
||||
Chat = 7,
|
||||
Mobihelp = 8,
|
||||
FeedbackWidget = 9,
|
||||
OutboundEmail = 10,
|
||||
}
|
||||
const Priorities = {
|
||||
Low: 1,
|
||||
Medium: 2,
|
||||
High: 3,
|
||||
Urgent: 4,
|
||||
} as const;
|
||||
|
||||
type Priority = (typeof Priorities)[keyof typeof Priorities];
|
||||
|
||||
const Sources = {
|
||||
Email: 1,
|
||||
Portal: 2,
|
||||
Phone: 3,
|
||||
Chat: 7,
|
||||
Mobihelp: 8,
|
||||
FeedbackWidget: 9,
|
||||
OutboundEmail: 10,
|
||||
} as const;
|
||||
|
||||
type Source = (typeof Sources)[keyof typeof Sources];
|
||||
|
||||
interface ICreateTicketBody {
|
||||
name?: string;
|
||||
|
||||
Reference in New Issue
Block a user