import {
  cudOperationTypesList,
  readOperationTypesList,
} from "@racletteCore/constants/ApiClient"

// Constants for better maintainability
export const CUD_HTTP_METHODS = ["post", "delete", "patch", "put"] as const

export const CUD_OPERATION_TYPES = new Set(cudOperationTypesList)

export const READ_OPERATION_TYPES = new Set(readOperationTypesList)
// Error handling flags
export const PLUGIN_ERROR_FLAGS = {
  CORE: 1,
  NPM: 2,
  APP: 4,
} as const

export const DEFAULT_ERROR_FLAGS =
  PLUGIN_ERROR_FLAGS.CORE | PLUGIN_ERROR_FLAGS.APP
export const PLUGIN_TYPE_ORDER = {
  core: 0,
  npm: 1,
  app: 2,
} as const
