refactor: Convert all enums to const object types in nodes-base (no-changelog) (#14131)

This commit is contained in:
Alex Grozav
2025-03-24 14:40:19 +02:00
committed by GitHub
parent defeb2e817
commit b9608647ca
31 changed files with 422 additions and 345 deletions

View File

@@ -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;