// This file is auto-generated by @hey-api/openapi-ts

export type ClientOptions = {
  baseUrl: `${string}://${string}/console/api` | (string & {})
}

export type DataSourceIntegrateListResponse = {
  data: Array<DataSourceIntegrateResponse>
}

export type SimpleResultResponse = {
  result: string
}

export type DataSourceIntegrateResponse = {
  created_at: number | null
  disabled: boolean | null
  id: string | null
  is_bound: boolean
  link: string
  provider: string
  source_info: DataSourceIntegrateWorkspaceResponse | null
}

export type DataSourceIntegrateWorkspaceResponse = {
  pages: Array<DataSourceIntegratePageResponse>
  total: number
  workspace_icon: string | null
  workspace_id: string | null
  workspace_name: string | null
}

export type DataSourceIntegratePageResponse = {
  page_icon: DataSourceIntegrateIconResponse | null
  page_id: string
  page_name: string
  parent_id: string
  type: string
}

export type DataSourceIntegrateIconResponse = {
  emoji?: string | null
  type?: string | null
  url?: string | null
}

export type GetDataSourceIntegratesData = {
  body?: never
  path?: never
  query?: never
  url: '/data-source/integrates'
}

export type GetDataSourceIntegratesResponses = {
  200: DataSourceIntegrateListResponse
}

export type GetDataSourceIntegratesResponse
  = GetDataSourceIntegratesResponses[keyof GetDataSourceIntegratesResponses]

export type PatchDataSourceIntegratesData = {
  body?: never
  path?: never
  query?: never
  url: '/data-source/integrates'
}

export type PatchDataSourceIntegratesResponses = {
  200: SimpleResultResponse
}

export type PatchDataSourceIntegratesResponse
  = PatchDataSourceIntegratesResponses[keyof PatchDataSourceIntegratesResponses]

export type GetDataSourceIntegratesByBindingIdByActionData = {
  body?: never
  path: {
    action: string
    binding_id: string
  }
  query?: never
  url: '/data-source/integrates/{binding_id}/{action}'
}

export type GetDataSourceIntegratesByBindingIdByActionResponses = {
  200: DataSourceIntegrateListResponse
}

export type GetDataSourceIntegratesByBindingIdByActionResponse
  = GetDataSourceIntegratesByBindingIdByActionResponses[keyof GetDataSourceIntegratesByBindingIdByActionResponses]

export type PatchDataSourceIntegratesByBindingIdByActionData = {
  body?: never
  path: {
    action: string
    binding_id: string
  }
  query?: never
  url: '/data-source/integrates/{binding_id}/{action}'
}

export type PatchDataSourceIntegratesByBindingIdByActionResponses = {
  200: SimpleResultResponse
}

export type PatchDataSourceIntegratesByBindingIdByActionResponse
  = PatchDataSourceIntegratesByBindingIdByActionResponses[keyof PatchDataSourceIntegratesByBindingIdByActionResponses]
