chore: 纳入本地 Dify 1.19.0 源码及品牌与免登改动
演示目录只保留可重建的源码。运行密钥、数据卷、依赖和带口令的本地配置不进入仓库。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
60158935f4
commit
6519682885
15831 files changed
+3063428
No files matched your search
+51
@@ -0,0 +1,51 @@
|
||||
// This file is auto-generated by @hey-api/openapi-ts
|
||||
|
||||
import { oc } from '@orpc/contract'
|
||||
import { zGetFeaturesResponse, zGetFeaturesVectorSpaceResponse } from './zod.gen.ts'
|
||||
|
||||
/**
|
||||
* Get vector-space usage and limit for current tenant
|
||||
*
|
||||
* Get vector-space usage and limit for current tenant
|
||||
*/
|
||||
export const get = oc
|
||||
.route({
|
||||
description: 'Get vector-space usage and limit for current tenant',
|
||||
inputStructure: 'detailed',
|
||||
method: 'GET',
|
||||
operationId: 'getFeaturesVectorSpace',
|
||||
path: '/features/vector-space',
|
||||
summary: 'Get vector-space usage and limit for current tenant',
|
||||
tags: ['console'],
|
||||
})
|
||||
.output(zGetFeaturesVectorSpaceResponse)
|
||||
|
||||
export const vectorSpace = {
|
||||
get,
|
||||
}
|
||||
|
||||
/**
|
||||
* Get current workspace features
|
||||
*
|
||||
* Get feature availability and limits for the current workspace
|
||||
*/
|
||||
export const get2 = oc
|
||||
.route({
|
||||
description: 'Get feature availability and limits for the current workspace',
|
||||
inputStructure: 'detailed',
|
||||
method: 'GET',
|
||||
operationId: 'getFeatures',
|
||||
path: '/features',
|
||||
summary: 'Get current workspace features',
|
||||
tags: ['console'],
|
||||
})
|
||||
.output(zGetFeaturesResponse)
|
||||
|
||||
export const features = {
|
||||
get: get2,
|
||||
vectorSpace,
|
||||
}
|
||||
|
||||
export const contract = {
|
||||
features,
|
||||
}
|
||||
+119
@@ -0,0 +1,119 @@
|
||||
// This file is auto-generated by @hey-api/openapi-ts
|
||||
|
||||
export type ClientOptions = {
|
||||
baseUrl: `${string}://${string}/console/api` | (string & {})
|
||||
}
|
||||
|
||||
export type FeatureModel = {
|
||||
annotation_quota_limit: LimitationModel
|
||||
api_rate_limit: Quota
|
||||
apps: LimitationModel
|
||||
billing: BillingModel
|
||||
can_replace_logo: boolean
|
||||
documents_upload_quota: LimitationModel
|
||||
education: EducationModel
|
||||
enable_knowledge_fs: boolean
|
||||
enable_skill: boolean
|
||||
human_input_email_delivery_enabled: boolean
|
||||
im_centrally_managed: boolean
|
||||
is_allow_transfer_workspace: boolean
|
||||
knowledge_pipeline: KnowledgePipeline
|
||||
members: LimitationModel
|
||||
model_load_balancing_enabled: boolean
|
||||
trigger_event: Quota
|
||||
webapp_copyright_enabled: boolean
|
||||
workspace_members: LicenseLimitationModel
|
||||
}
|
||||
|
||||
export type ErrorResponse = {
|
||||
code: string
|
||||
details?: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
message: string
|
||||
params?: string
|
||||
status: number
|
||||
}
|
||||
|
||||
export type VectorSpaceLimitationModel = {
|
||||
limit: number
|
||||
size: number
|
||||
usage_unknown?: boolean
|
||||
}
|
||||
|
||||
export type LimitationModel = {
|
||||
limit: number
|
||||
size: number
|
||||
}
|
||||
|
||||
export type Quota = {
|
||||
limit: number
|
||||
reset_date: number
|
||||
usage: number
|
||||
}
|
||||
|
||||
export type BillingModel = {
|
||||
subscription: SubscriptionModel
|
||||
}
|
||||
|
||||
export type EducationModel = {
|
||||
activated: boolean
|
||||
enabled: boolean
|
||||
}
|
||||
|
||||
export type KnowledgePipeline = {
|
||||
publish_enabled: boolean
|
||||
}
|
||||
|
||||
export type LicenseLimitationModel = {
|
||||
enabled: boolean
|
||||
limit: number
|
||||
size: number
|
||||
}
|
||||
|
||||
export type SubscriptionModel = {
|
||||
interval: '' | 'month' | 'year'
|
||||
plan: CloudPlan
|
||||
}
|
||||
|
||||
export type CloudPlan = 'professional' | 'sandbox' | 'team'
|
||||
|
||||
export type GetFeaturesData = {
|
||||
body?: never
|
||||
path?: never
|
||||
query?: never
|
||||
url: '/features'
|
||||
}
|
||||
|
||||
export type GetFeaturesErrors = {
|
||||
default: ErrorResponse
|
||||
}
|
||||
|
||||
export type GetFeaturesError = GetFeaturesErrors[keyof GetFeaturesErrors]
|
||||
|
||||
export type GetFeaturesResponses = {
|
||||
200: FeatureModel
|
||||
}
|
||||
|
||||
export type GetFeaturesResponse = GetFeaturesResponses[keyof GetFeaturesResponses]
|
||||
|
||||
export type GetFeaturesVectorSpaceData = {
|
||||
body?: never
|
||||
path?: never
|
||||
query?: never
|
||||
url: '/features/vector-space'
|
||||
}
|
||||
|
||||
export type GetFeaturesVectorSpaceErrors = {
|
||||
default: ErrorResponse
|
||||
}
|
||||
|
||||
export type GetFeaturesVectorSpaceError =
|
||||
GetFeaturesVectorSpaceErrors[keyof GetFeaturesVectorSpaceErrors]
|
||||
|
||||
export type GetFeaturesVectorSpaceResponses = {
|
||||
200: VectorSpaceLimitationModel
|
||||
}
|
||||
|
||||
export type GetFeaturesVectorSpaceResponse =
|
||||
GetFeaturesVectorSpaceResponses[keyof GetFeaturesVectorSpaceResponses]
|
||||
+147
@@ -0,0 +1,147 @@
|
||||
// This file is auto-generated by @hey-api/openapi-ts
|
||||
|
||||
import * as z from 'zod'
|
||||
|
||||
/**
|
||||
* ErrorResponse
|
||||
*
|
||||
* Documented non-2xx body emitted by ``register_external_error_handlers``.
|
||||
*
|
||||
* ``params`` and ``details`` appear only on the errors that set them. The schema
|
||||
* stays open because ``HTTPException.data`` may carry extra keys.
|
||||
*/
|
||||
export const zErrorResponse = z.object({
|
||||
code: z.string(),
|
||||
details: z.record(z.string(), z.unknown()).optional(),
|
||||
message: z.string(),
|
||||
params: z.string().optional(),
|
||||
status: z.int(),
|
||||
})
|
||||
|
||||
/**
|
||||
* VectorSpaceLimitationModel
|
||||
*/
|
||||
export const zVectorSpaceLimitationModel = z.object({
|
||||
limit: z.int(),
|
||||
size: z.int(),
|
||||
usage_unknown: z.boolean().optional().default(false),
|
||||
})
|
||||
|
||||
/**
|
||||
* LimitationModel
|
||||
*/
|
||||
export const zLimitationModel = z.object({
|
||||
limit: z.int().default(0),
|
||||
size: z.int().default(0),
|
||||
})
|
||||
|
||||
/**
|
||||
* Quota
|
||||
*/
|
||||
export const zQuota = z.object({
|
||||
limit: z.int().default(0),
|
||||
reset_date: z.int().default(-1),
|
||||
usage: z.int().default(0),
|
||||
})
|
||||
|
||||
/**
|
||||
* EducationModel
|
||||
*/
|
||||
export const zEducationModel = z.object({
|
||||
activated: z.boolean().default(false),
|
||||
enabled: z.boolean().default(false),
|
||||
})
|
||||
|
||||
/**
|
||||
* KnowledgePipeline
|
||||
*/
|
||||
export const zKnowledgePipeline = z.object({
|
||||
publish_enabled: z.boolean().default(false),
|
||||
})
|
||||
|
||||
/**
|
||||
* LicenseLimitationModel
|
||||
*
|
||||
* - enabled: whether this limit is enforced
|
||||
* - size: current usage count
|
||||
* - limit: maximum allowed count; 0 means unlimited
|
||||
*/
|
||||
export const zLicenseLimitationModel = z.object({
|
||||
enabled: z.boolean().default(false),
|
||||
limit: z.int().default(0),
|
||||
size: z.int().default(0),
|
||||
})
|
||||
|
||||
/**
|
||||
* CloudPlan
|
||||
*
|
||||
* Enum representing user plan types in the cloud platform.
|
||||
*
|
||||
* SANDBOX: Free/default plan with limited features
|
||||
* PROFESSIONAL: Professional paid plan
|
||||
* TEAM: Team collaboration paid plan
|
||||
*/
|
||||
export const zCloudPlan = z.enum(['professional', 'sandbox', 'team'])
|
||||
|
||||
/**
|
||||
* SubscriptionModel
|
||||
*/
|
||||
export const zSubscriptionModel = z.object({
|
||||
interval: z.enum(['', 'month', 'year']).default(''),
|
||||
plan: zCloudPlan.default('sandbox'),
|
||||
})
|
||||
|
||||
/**
|
||||
* BillingModel
|
||||
*/
|
||||
export const zBillingModel = z.object({
|
||||
subscription: zSubscriptionModel.default({ interval: '', plan: 'sandbox' }),
|
||||
})
|
||||
|
||||
/**
|
||||
* FeatureModel
|
||||
*
|
||||
* Effective feature availability and limits for the current workspace.
|
||||
*/
|
||||
export const zFeatureModel = z.object({
|
||||
annotation_quota_limit: zLimitationModel.default({ limit: 10, size: 0 }),
|
||||
api_rate_limit: zQuota.default({
|
||||
limit: 5000,
|
||||
reset_date: 0,
|
||||
usage: 0,
|
||||
}),
|
||||
apps: zLimitationModel.default({ limit: 10, size: 0 }),
|
||||
billing: zBillingModel.default({ subscription: { interval: '', plan: 'sandbox' } }),
|
||||
can_replace_logo: z.boolean().default(false),
|
||||
documents_upload_quota: zLimitationModel.default({ limit: 50, size: 0 }),
|
||||
education: zEducationModel.default({ activated: false, enabled: false }),
|
||||
enable_knowledge_fs: z.boolean().default(false),
|
||||
enable_skill: z.boolean().default(true),
|
||||
human_input_email_delivery_enabled: z.boolean().default(false),
|
||||
im_centrally_managed: z.boolean().default(false),
|
||||
is_allow_transfer_workspace: z.boolean().default(true),
|
||||
knowledge_pipeline: zKnowledgePipeline.default({ publish_enabled: false }),
|
||||
members: zLimitationModel.default({ limit: 1, size: 0 }),
|
||||
model_load_balancing_enabled: z.boolean().default(false),
|
||||
trigger_event: zQuota.default({
|
||||
limit: 3000,
|
||||
reset_date: 0,
|
||||
usage: 0,
|
||||
}),
|
||||
webapp_copyright_enabled: z.boolean().default(false),
|
||||
workspace_members: zLicenseLimitationModel.default({
|
||||
enabled: false,
|
||||
limit: 0,
|
||||
size: 0,
|
||||
}),
|
||||
})
|
||||
|
||||
/**
|
||||
* Success
|
||||
*/
|
||||
export const zGetFeaturesResponse = zFeatureModel
|
||||
|
||||
/**
|
||||
* Success
|
||||
*/
|
||||
export const zGetFeaturesVectorSpaceResponse = zVectorSpaceLimitationModel
|
||||
Reference in new issue
Block a user