mirror of
https://github.com/langgenius/dify.git
synced 2026-06-14 21:01:08 +08:00
180 lines
3.9 KiB
TypeScript
180 lines
3.9 KiB
TypeScript
// This file is auto-generated by @hey-api/openapi-ts
|
|
|
|
import * as z from 'zod'
|
|
|
|
/**
|
|
* OAuthDataSourceBindingResponse
|
|
*/
|
|
export const zOAuthDataSourceBindingResponse = z.object({
|
|
result: z.string(),
|
|
})
|
|
|
|
/**
|
|
* OAuthDataSourceResponse
|
|
*/
|
|
export const zOAuthDataSourceResponse = z.object({
|
|
data: z.string(),
|
|
})
|
|
|
|
/**
|
|
* OAuthDataSourceSyncResponse
|
|
*/
|
|
export const zOAuthDataSourceSyncResponse = z.object({
|
|
result: z.string(),
|
|
})
|
|
|
|
/**
|
|
* PluginOAuthAuthorizationUrlResponse
|
|
*/
|
|
export const zPluginOAuthAuthorizationUrlResponse = z.object({
|
|
authorization_url: z.string(),
|
|
})
|
|
|
|
/**
|
|
* OAuthProviderRequest
|
|
*/
|
|
export const zOAuthProviderRequest = z.object({
|
|
client_id: z.string(),
|
|
redirect_uri: z.string(),
|
|
})
|
|
|
|
/**
|
|
* OAuthProviderAppResponse
|
|
*/
|
|
export const zOAuthProviderAppResponse = z.object({
|
|
app_icon: z.string(),
|
|
app_label: z.record(z.string(), z.unknown()),
|
|
scope: z.string(),
|
|
})
|
|
|
|
/**
|
|
* OAuthClientPayload
|
|
*/
|
|
export const zOAuthClientPayload = z.object({
|
|
client_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* OAuthProviderAccountResponse
|
|
*/
|
|
export const zOAuthProviderAccountResponse = z.object({
|
|
avatar: z.string().nullish(),
|
|
email: z.string(),
|
|
interface_language: z.string(),
|
|
name: z.string(),
|
|
timezone: z.string(),
|
|
})
|
|
|
|
/**
|
|
* OAuthProviderAuthorizeResponse
|
|
*/
|
|
export const zOAuthProviderAuthorizeResponse = z.object({
|
|
code: z.string(),
|
|
})
|
|
|
|
/**
|
|
* OAuthTokenRequest
|
|
*/
|
|
export const zOAuthTokenRequest = z.object({
|
|
client_id: z.string(),
|
|
client_secret: z.string().nullish(),
|
|
code: z.string().nullish(),
|
|
grant_type: z.string(),
|
|
redirect_uri: z.string().nullish(),
|
|
refresh_token: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* OAuthProviderTokenResponse
|
|
*/
|
|
export const zOAuthProviderTokenResponse = z.object({
|
|
access_token: z.string(),
|
|
expires_in: z.int(),
|
|
refresh_token: z.string(),
|
|
token_type: z.string(),
|
|
})
|
|
|
|
export const zGetOauthDataSourceBindingByProviderPath = z.object({
|
|
provider: z.string(),
|
|
})
|
|
|
|
export const zGetOauthDataSourceBindingByProviderQuery = z.object({
|
|
code: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Data source binding success
|
|
*/
|
|
export const zGetOauthDataSourceBindingByProviderResponse = zOAuthDataSourceBindingResponse
|
|
|
|
export const zGetOauthDataSourceByProviderPath = z.object({
|
|
provider: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Authorization URL or internal setup success
|
|
*/
|
|
export const zGetOauthDataSourceByProviderResponse = zOAuthDataSourceResponse
|
|
|
|
export const zGetOauthDataSourceByProviderByBindingIdSyncPath = z.object({
|
|
binding_id: z.string(),
|
|
provider: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Data source sync success
|
|
*/
|
|
export const zGetOauthDataSourceByProviderByBindingIdSyncResponse = zOAuthDataSourceSyncResponse
|
|
|
|
export const zGetOauthPluginByProviderIdDatasourceGetAuthorizationUrlPath = z.object({
|
|
provider_id: z.string(),
|
|
})
|
|
|
|
export const zGetOauthPluginByProviderIdDatasourceGetAuthorizationUrlQuery = z.object({
|
|
credential_id: z.string().optional(),
|
|
})
|
|
|
|
/**
|
|
* Authorization URL retrieved successfully
|
|
*/
|
|
export const zGetOauthPluginByProviderIdDatasourceGetAuthorizationUrlResponse
|
|
= zPluginOAuthAuthorizationUrlResponse
|
|
|
|
export const zGetOauthPluginByProviderToolAuthorizationUrlPath = z.object({
|
|
provider: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Authorization URL retrieved successfully
|
|
*/
|
|
export const zGetOauthPluginByProviderToolAuthorizationUrlResponse
|
|
= zPluginOAuthAuthorizationUrlResponse
|
|
|
|
export const zPostOauthProviderBody = zOAuthProviderRequest
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zPostOauthProviderResponse = zOAuthProviderAppResponse
|
|
|
|
export const zPostOauthProviderAccountBody = zOAuthClientPayload
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zPostOauthProviderAccountResponse = zOAuthProviderAccountResponse
|
|
|
|
export const zPostOauthProviderAuthorizeBody = zOAuthClientPayload
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zPostOauthProviderAuthorizeResponse = zOAuthProviderAuthorizeResponse
|
|
|
|
export const zPostOauthProviderTokenBody = zOAuthTokenRequest
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zPostOauthProviderTokenResponse = zOAuthProviderTokenResponse
|