const _METHOD = {
  GET: 'get',
  DELETE: 'delete',
  POST: 'post',
  PUT: 'put',
  PATCH: 'patch',
} as const;

type ObjectValues<T> = T[keyof T];
type Method = ObjectValues<typeof _METHOD>;

export default Method;

export const StoryblokContentVersion = {
  DRAFT: 'draft',
  PUBLISHED: 'published',
} as const;

export type StoryblokContentVersionKeys =
  typeof StoryblokContentVersion[keyof typeof StoryblokContentVersion];

export const StoryblokContentVersionValues = Object.values(
  StoryblokContentVersion,
) as StoryblokContentVersionKeys[];

/**
 * Default per_page value for Storyblok API requests
 */
export const DEFAULT_PER_PAGE = 25;

/**
 * Per-page tier thresholds for rate limiting
 */
export const PER_PAGE_THRESHOLDS = {
  SMALL: 25,
  MEDIUM: 50,
  LARGE: 75,
} as const;
