export type KbxHttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'
export type KbxApiOperationKind = 'query' | 'command' | 'upload'
export type KbxIdempotencyPolicy = 'none' | 'supported' | 'required'

export interface KbxApiOperationDefinition {
  id: string
  method: KbxHttpMethod
  path: string
  permission?: string | null
  kind: KbxApiOperationKind
  idempotency: KbxIdempotencyPolicy
  successStatuses: readonly number[]
  contentType?: string
  responseType?: 'json' | 'blob'
}

export interface KbxApiRequestOptions<TBody = unknown> {
  path?: Record<string, string | number>
  query?: object
  body?: TBody
  headers?: Record<string, string>
  idempotencyKey?: string
  responseType?: 'json' | 'blob'
}
