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

import * as z from 'zod'

/**
 * DatasourceCredentialPayload
 */
export const zDatasourceCredentialPayload = z.object({
  credentials: z.record(z.string(), z.unknown()),
  name: z.string().max(100).nullish(),
})

/**
 * DatasourceCustomClientPayload
 */
export const zDatasourceCustomClientPayload = z.object({
  client_params: z.record(z.string(), z.unknown()).nullish(),
  enable_oauth_custom_client: z.boolean().nullish(),
})

/**
 * DatasourceDefaultPayload
 */
export const zDatasourceDefaultPayload = z.object({
  id: z.string(),
})

/**
 * DatasourceCredentialDeletePayload
 */
export const zDatasourceCredentialDeletePayload = z.object({
  credential_id: z.string(),
})

/**
 * DatasourceCredentialUpdatePayload
 */
export const zDatasourceCredentialUpdatePayload = z.object({
  credential_id: z.string(),
  credentials: z.record(z.string(), z.unknown()).nullish(),
  name: z.string().max(100).nullish(),
})

/**
 * DatasourceUpdateNamePayload
 */
export const zDatasourceUpdateNamePayload = z.object({
  credential_id: z.string(),
  name: z.string().max(100),
})

/**
 * Success
 */
export const zGetAuthPluginDatasourceDefaultListResponse = z.record(z.string(), z.unknown())

/**
 * Success
 */
export const zGetAuthPluginDatasourceListResponse = z.record(z.string(), z.unknown())

export const zGetAuthPluginDatasourceByProviderIdPath = z.object({
  provider_id: z.string(),
})

/**
 * Success
 */
export const zGetAuthPluginDatasourceByProviderIdResponse = z.record(z.string(), z.unknown())

export const zPostAuthPluginDatasourceByProviderIdBody = zDatasourceCredentialPayload

export const zPostAuthPluginDatasourceByProviderIdPath = z.object({
  provider_id: z.string(),
})

/**
 * Success
 */
export const zPostAuthPluginDatasourceByProviderIdResponse = z.record(z.string(), z.unknown())

export const zDeleteAuthPluginDatasourceByProviderIdCustomClientPath = z.object({
  provider_id: z.string(),
})

/**
 * Success
 */
export const zDeleteAuthPluginDatasourceByProviderIdCustomClientResponse = z.record(
  z.string(),
  z.unknown(),
)

export const zPostAuthPluginDatasourceByProviderIdCustomClientBody = zDatasourceCustomClientPayload

export const zPostAuthPluginDatasourceByProviderIdCustomClientPath = z.object({
  provider_id: z.string(),
})

/**
 * Success
 */
export const zPostAuthPluginDatasourceByProviderIdCustomClientResponse = z.record(
  z.string(),
  z.unknown(),
)

export const zPostAuthPluginDatasourceByProviderIdDefaultBody = zDatasourceDefaultPayload

export const zPostAuthPluginDatasourceByProviderIdDefaultPath = z.object({
  provider_id: z.string(),
})

/**
 * Success
 */
export const zPostAuthPluginDatasourceByProviderIdDefaultResponse = z.record(
  z.string(),
  z.unknown(),
)

export const zPostAuthPluginDatasourceByProviderIdDeleteBody = zDatasourceCredentialDeletePayload

export const zPostAuthPluginDatasourceByProviderIdDeletePath = z.object({
  provider_id: z.string(),
})

/**
 * Success
 */
export const zPostAuthPluginDatasourceByProviderIdDeleteResponse = z.record(z.string(), z.unknown())

export const zPostAuthPluginDatasourceByProviderIdUpdateBody = zDatasourceCredentialUpdatePayload

export const zPostAuthPluginDatasourceByProviderIdUpdatePath = z.object({
  provider_id: z.string(),
})

/**
 * Success
 */
export const zPostAuthPluginDatasourceByProviderIdUpdateResponse = z.record(z.string(), z.unknown())

export const zPostAuthPluginDatasourceByProviderIdUpdateNameBody = zDatasourceUpdateNamePayload

export const zPostAuthPluginDatasourceByProviderIdUpdateNamePath = z.object({
  provider_id: z.string(),
})

/**
 * Success
 */
export const zPostAuthPluginDatasourceByProviderIdUpdateNameResponse = z.record(
  z.string(),
  z.unknown(),
)
