mirror of
https://github.com/langgenius/dify.git
synced 2026-03-17 12:57:51 +08:00
697 lines
11 KiB
TypeScript
697 lines
11 KiB
TypeScript
// This file is auto-generated by @hey-api/openapi-ts
|
|
|
|
export type ClientOptions = {
|
|
baseUrl: 'https://petstore3.swagger.io/api/v3' | (string & {})
|
|
}
|
|
|
|
export type Order = {
|
|
id?: number
|
|
petId?: number
|
|
quantity?: number
|
|
shipDate?: string
|
|
/**
|
|
* Order Status
|
|
*/
|
|
status?: '' | string
|
|
/**
|
|
* HTTP Status
|
|
*/
|
|
http_status?: 200 | 400 | 500
|
|
complete?: boolean
|
|
}
|
|
|
|
export type Customer = {
|
|
id?: number
|
|
username?: string
|
|
address?: Array<Address>
|
|
}
|
|
|
|
export type HappyCustomer = Customer & {
|
|
isHappy?: true
|
|
}
|
|
|
|
export type UnhappyCustomer = Customer & {
|
|
reasonToBeUnhappy?: string
|
|
isHappy?: false
|
|
}
|
|
|
|
export type Address = {
|
|
streetName?: string
|
|
streetNumber?: string
|
|
city?: string
|
|
state?: string
|
|
zip?: string
|
|
}
|
|
|
|
export type Category = {
|
|
id?: number
|
|
name?: string
|
|
}
|
|
|
|
export type User = {
|
|
id?: number
|
|
username?: string
|
|
firstName?: string
|
|
lastName?: string
|
|
email?: string
|
|
password?: string
|
|
phone?: string
|
|
/**
|
|
* User Status
|
|
*/
|
|
userStatus?: number
|
|
}
|
|
|
|
export type Tag = {
|
|
id?: number
|
|
name?: string
|
|
}
|
|
|
|
export type Pet = (({
|
|
type: 'dog'
|
|
} & Dog) | ({
|
|
type: 'cat'
|
|
} & Cat)) & {
|
|
id?: number
|
|
type: 'dog' | 'cat'
|
|
name: string
|
|
category?: OpenapiCategory
|
|
photoUrls: Array<string>
|
|
readonly tags?: Array<Tag>
|
|
/**
|
|
* pet status in the store
|
|
*/
|
|
status?: 'available' | 'pending' | 'sold'
|
|
}
|
|
|
|
export type Cat = {
|
|
readonly type?: string
|
|
name?: string
|
|
}
|
|
|
|
export type Dog = {
|
|
readonly type?: string
|
|
bark?: string
|
|
}
|
|
|
|
export type FullAddress = Address & {
|
|
streetName: string
|
|
streetNumber: string
|
|
}
|
|
|
|
export type AddPetRequest = {
|
|
id?: number
|
|
name: string
|
|
category?: Category
|
|
photoUrls: Array<string>
|
|
tags?: Array<Tag>
|
|
/**
|
|
* pet status in the store
|
|
*/
|
|
status?: 'available' | 'pending' | 'sold' | 'in store'
|
|
}
|
|
|
|
export type ApiResponse = {
|
|
code?: number
|
|
type?: string
|
|
message?: string
|
|
}
|
|
|
|
export type OpenapiCategory = {
|
|
id?: number
|
|
name?: string
|
|
}
|
|
|
|
export type PetWritable = (({
|
|
type: 'DogWritable'
|
|
} & DogWritable) | ({
|
|
type: 'CatWritable'
|
|
} & CatWritable)) & {
|
|
id?: number
|
|
name: string
|
|
category?: OpenapiCategory
|
|
photoUrls: Array<string>
|
|
/**
|
|
* pet status in the store
|
|
*/
|
|
status?: 'available' | 'pending' | 'sold'
|
|
}
|
|
|
|
export type CatWritable = {
|
|
name?: string
|
|
}
|
|
|
|
export type DogWritable = {
|
|
bark?: string
|
|
}
|
|
|
|
/**
|
|
* to request with required page number or pagination
|
|
*/
|
|
export type Page = string
|
|
|
|
/**
|
|
* to request with required page size
|
|
*/
|
|
export type PageSize = string
|
|
|
|
/**
|
|
* Pet object that needs to be added to the store
|
|
*/
|
|
export type Pet2 = PetWritable
|
|
|
|
/**
|
|
* List of user object
|
|
*/
|
|
export type UserArray = Array<User>
|
|
|
|
export type AddPetData = {
|
|
/**
|
|
* Create a new pet in the store
|
|
*/
|
|
body: AddPetRequest
|
|
path?: never
|
|
query?: never
|
|
url: '/pet'
|
|
}
|
|
|
|
export type AddPetErrors = {
|
|
/**
|
|
* Pet not found
|
|
*/
|
|
405: {
|
|
code?: number
|
|
message?: string
|
|
}
|
|
}
|
|
|
|
export type AddPetError = AddPetErrors[keyof AddPetErrors]
|
|
|
|
export type AddPetResponses = {
|
|
/**
|
|
* Successful operation
|
|
*/
|
|
200: Pet
|
|
}
|
|
|
|
export type AddPetResponse = AddPetResponses[keyof AddPetResponses]
|
|
|
|
export type UpdatePetData = {
|
|
/**
|
|
* Update an existent pet in the store
|
|
*/
|
|
body: PetWritable
|
|
path?: never
|
|
query?: never
|
|
url: '/pet'
|
|
}
|
|
|
|
export type UpdatePetErrors = {
|
|
/**
|
|
* Invalid ID supplied
|
|
*/
|
|
400: unknown
|
|
/**
|
|
* Pet not found
|
|
*/
|
|
404: unknown
|
|
/**
|
|
* Validation exception
|
|
*/
|
|
405: unknown
|
|
}
|
|
|
|
export type UpdatePetResponses = {
|
|
/**
|
|
* Successful operation
|
|
*/
|
|
200: Pet
|
|
}
|
|
|
|
export type UpdatePetResponse = UpdatePetResponses[keyof UpdatePetResponses]
|
|
|
|
export type FindPetsByStatusData = {
|
|
body?: never
|
|
path?: never
|
|
query?: {
|
|
/**
|
|
* Status values that need to be considered for filter
|
|
*/
|
|
status?: 'available' | 'pending' | 'sold'
|
|
}
|
|
url: '/pet/findByStatus'
|
|
}
|
|
|
|
export type FindPetsByStatusErrors = {
|
|
/**
|
|
* Invalid status value
|
|
*/
|
|
400: unknown
|
|
}
|
|
|
|
export type FindPetsByStatusResponses = {
|
|
/**
|
|
* successful operation
|
|
*/
|
|
200: Array<Pet>
|
|
}
|
|
|
|
export type FindPetsByStatusResponse = FindPetsByStatusResponses[keyof FindPetsByStatusResponses]
|
|
|
|
export type FindPetsByTagsData = {
|
|
body?: never
|
|
path?: never
|
|
query?: {
|
|
/**
|
|
* Tags to filter by
|
|
*/
|
|
tags?: Array<string>
|
|
/**
|
|
* to request with required page number or pagination
|
|
*/
|
|
page?: string
|
|
/**
|
|
* to request with required page size
|
|
*/
|
|
pageSize?: string
|
|
}
|
|
url: '/pet/findByTags'
|
|
}
|
|
|
|
export type FindPetsByTagsErrors = {
|
|
/**
|
|
* Invalid tag value
|
|
*/
|
|
400: unknown
|
|
}
|
|
|
|
export type FindPetsByTagsResponses = {
|
|
/**
|
|
* successful operation
|
|
*/
|
|
200: Array<Pet>
|
|
}
|
|
|
|
export type FindPetsByTagsResponse = FindPetsByTagsResponses[keyof FindPetsByTagsResponses]
|
|
|
|
export type DeletePetData = {
|
|
body?: never
|
|
headers?: {
|
|
api_key?: string
|
|
}
|
|
path: {
|
|
/**
|
|
* Pet id to delete
|
|
*/
|
|
petId: number
|
|
}
|
|
query?: never
|
|
url: '/pet/{petId}'
|
|
}
|
|
|
|
export type DeletePetErrors = {
|
|
/**
|
|
* Invalid pet value
|
|
*/
|
|
400: unknown
|
|
}
|
|
|
|
export type DeletePetResponses = {
|
|
/**
|
|
* items
|
|
*/
|
|
200: Array<'TYPE1' | 'TYPE2' | 'TYPE3'>
|
|
}
|
|
|
|
export type DeletePetResponse = DeletePetResponses[keyof DeletePetResponses]
|
|
|
|
export type GetPetByIdData = {
|
|
body?: never
|
|
path: {
|
|
/**
|
|
* ID of pet to return
|
|
*/
|
|
petId: number
|
|
}
|
|
query?: never
|
|
url: '/pet/{petId}'
|
|
}
|
|
|
|
export type GetPetByIdErrors = {
|
|
/**
|
|
* Invalid ID supplied
|
|
*/
|
|
400: unknown
|
|
/**
|
|
* Pet not found
|
|
*/
|
|
404: unknown
|
|
}
|
|
|
|
export type GetPetByIdResponses = {
|
|
/**
|
|
* successful operation
|
|
*/
|
|
200: Pet
|
|
}
|
|
|
|
export type GetPetByIdResponse = GetPetByIdResponses[keyof GetPetByIdResponses]
|
|
|
|
export type UpdatePetWithFormData = {
|
|
body?: never
|
|
path: {
|
|
/**
|
|
* ID of pet that needs to be updated
|
|
*/
|
|
petId: number
|
|
}
|
|
query?: {
|
|
/**
|
|
* Name of pet that needs to be updated
|
|
*/
|
|
name?: string
|
|
/**
|
|
* Status of pet that needs to be updated
|
|
*/
|
|
status?: string
|
|
}
|
|
url: '/pet/{petId}'
|
|
}
|
|
|
|
export type UpdatePetWithFormErrors = {
|
|
/**
|
|
* Invalid input
|
|
*/
|
|
405: unknown
|
|
}
|
|
|
|
export type UploadFileData = {
|
|
body?: Blob | File
|
|
path: {
|
|
/**
|
|
* ID of pet to update
|
|
*/
|
|
petId: number
|
|
}
|
|
query?: {
|
|
/**
|
|
* Additional Metadata
|
|
*/
|
|
additionalMetadata?: string
|
|
}
|
|
url: '/pet/{petId}/uploadImage'
|
|
}
|
|
|
|
export type UploadFileResponses = {
|
|
/**
|
|
* successful operation
|
|
*/
|
|
200: ApiResponse
|
|
}
|
|
|
|
export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]
|
|
|
|
export type GetInventoryData = {
|
|
body?: never
|
|
path?: never
|
|
query?: never
|
|
url: '/store/inventory'
|
|
}
|
|
|
|
export type GetInventoryResponses = {
|
|
/**
|
|
* successful operation
|
|
*/
|
|
200: {
|
|
[key: string]: number
|
|
}
|
|
}
|
|
|
|
export type GetInventoryResponse = GetInventoryResponses[keyof GetInventoryResponses]
|
|
|
|
export type PlaceOrderPatchData = {
|
|
body?: Order
|
|
path?: never
|
|
query?: never
|
|
url: '/store/order'
|
|
}
|
|
|
|
export type PlaceOrderPatchErrors = {
|
|
/**
|
|
* Invalid input
|
|
*/
|
|
405: unknown
|
|
}
|
|
|
|
export type PlaceOrderPatchResponses = {
|
|
/**
|
|
* successful operation
|
|
*/
|
|
200: Order
|
|
}
|
|
|
|
export type PlaceOrderPatchResponse = PlaceOrderPatchResponses[keyof PlaceOrderPatchResponses]
|
|
|
|
export type PlaceOrderData = {
|
|
/**
|
|
* Order description
|
|
*/
|
|
body?: Order
|
|
path?: never
|
|
query?: never
|
|
url: '/store/order'
|
|
}
|
|
|
|
export type PlaceOrderErrors = {
|
|
/**
|
|
* Invalid input
|
|
*/
|
|
405: unknown
|
|
}
|
|
|
|
export type PlaceOrderResponses = {
|
|
/**
|
|
* successful operation
|
|
*/
|
|
200: Order
|
|
}
|
|
|
|
export type PlaceOrderResponse = PlaceOrderResponses[keyof PlaceOrderResponses]
|
|
|
|
export type DeleteOrderData = {
|
|
body?: never
|
|
path: {
|
|
/**
|
|
* ID of the order that needs to be deleted
|
|
*/
|
|
orderId: number
|
|
}
|
|
query?: never
|
|
url: '/store/order/{orderId}'
|
|
}
|
|
|
|
export type DeleteOrderErrors = {
|
|
/**
|
|
* Invalid ID supplied
|
|
*/
|
|
400: unknown
|
|
/**
|
|
* Order not found
|
|
*/
|
|
404: unknown
|
|
}
|
|
|
|
export type GetOrderByIdData = {
|
|
body?: never
|
|
path: {
|
|
/**
|
|
* ID of order that needs to be fetched
|
|
*/
|
|
orderId: number
|
|
}
|
|
query?: never
|
|
url: '/store/order/{orderId}'
|
|
}
|
|
|
|
export type GetOrderByIdErrors = {
|
|
/**
|
|
* Invalid ID supplied
|
|
*/
|
|
400: unknown
|
|
/**
|
|
* Order not found
|
|
*/
|
|
404: unknown
|
|
}
|
|
|
|
export type GetOrderByIdResponses = {
|
|
/**
|
|
* successful operation
|
|
*/
|
|
200: Order
|
|
}
|
|
|
|
export type GetOrderByIdResponse = GetOrderByIdResponses[keyof GetOrderByIdResponses]
|
|
|
|
export type CreateUserData = {
|
|
/**
|
|
* Created user object
|
|
*/
|
|
body?: User
|
|
path?: never
|
|
query?: never
|
|
url: '/user'
|
|
}
|
|
|
|
export type CreateUserResponses = {
|
|
/**
|
|
* successful operation
|
|
*/
|
|
default: User
|
|
}
|
|
|
|
export type CreateUserResponse = CreateUserResponses[keyof CreateUserResponses]
|
|
|
|
export type CreateUsersWithListInputData = {
|
|
body?: Array<User>
|
|
path?: never
|
|
query?: never
|
|
url: '/user/createWithList'
|
|
}
|
|
|
|
export type CreateUsersWithListInputResponses = {
|
|
/**
|
|
* Successful operation
|
|
*/
|
|
200: User
|
|
/**
|
|
* successful operation
|
|
*/
|
|
default: unknown
|
|
}
|
|
|
|
export type CreateUsersWithListInputResponse = CreateUsersWithListInputResponses[keyof CreateUsersWithListInputResponses]
|
|
|
|
export type LoginUserData = {
|
|
body?: never
|
|
path?: never
|
|
query?: {
|
|
/**
|
|
* The user name for login
|
|
*/
|
|
username?: string
|
|
/**
|
|
* The password for login in clear text
|
|
*/
|
|
password?: string
|
|
}
|
|
url: '/user/login'
|
|
}
|
|
|
|
export type LoginUserErrors = {
|
|
/**
|
|
* Invalid username/password supplied
|
|
*/
|
|
400: unknown
|
|
}
|
|
|
|
export type LoginUserResponses = {
|
|
/**
|
|
* successful operation
|
|
*/
|
|
200: string
|
|
}
|
|
|
|
export type LoginUserResponse = LoginUserResponses[keyof LoginUserResponses]
|
|
|
|
export type LogoutUserData = {
|
|
body?: never
|
|
path?: never
|
|
query?: never
|
|
url: '/user/logout'
|
|
}
|
|
|
|
export type LogoutUserResponses = {
|
|
/**
|
|
* successful operation
|
|
*/
|
|
default: unknown
|
|
}
|
|
|
|
export type DeleteUserData = {
|
|
body?: never
|
|
path: {
|
|
/**
|
|
* The name that needs to be deleted
|
|
*/
|
|
username: string
|
|
}
|
|
query?: never
|
|
url: '/user/{username}'
|
|
}
|
|
|
|
export type DeleteUserErrors = {
|
|
/**
|
|
* Invalid username supplied
|
|
*/
|
|
400: unknown
|
|
/**
|
|
* User not found
|
|
*/
|
|
404: unknown
|
|
}
|
|
|
|
export type GetUserByNameData = {
|
|
body?: never
|
|
path: {
|
|
/**
|
|
* The name that needs to be fetched. Use user1 for testing.
|
|
*/
|
|
username: string
|
|
}
|
|
query?: never
|
|
url: '/user/{username}'
|
|
}
|
|
|
|
export type GetUserByNameErrors = {
|
|
/**
|
|
* Invalid username supplied
|
|
*/
|
|
400: unknown
|
|
/**
|
|
* User not found
|
|
*/
|
|
404: unknown
|
|
}
|
|
|
|
export type GetUserByNameResponses = {
|
|
/**
|
|
* successful operation
|
|
*/
|
|
200: User
|
|
}
|
|
|
|
export type GetUserByNameResponse = GetUserByNameResponses[keyof GetUserByNameResponses]
|
|
|
|
export type UpdateUserData = {
|
|
/**
|
|
* Update an existent user in the store
|
|
*/
|
|
body?: User
|
|
path: {
|
|
/**
|
|
* name that need to be deleted
|
|
*/
|
|
username: string
|
|
}
|
|
query?: never
|
|
url: '/user/{username}'
|
|
}
|
|
|
|
export type UpdateUserResponses = {
|
|
/**
|
|
* successful operation
|
|
*/
|
|
default: unknown
|
|
}
|