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
@@ -0,0 +1,59 @@
|
||||
// This file is auto-generated by @hey-api/openapi-ts
|
||||
|
||||
import { oc } from '@orpc/contract'
|
||||
import * as z from 'zod'
|
||||
import { zGetSetupResponse, zPostSetupBody, zPostSetupResponse } from './zod.gen.ts'
|
||||
|
||||
/**
|
||||
* Get system setup status.
|
||||
*
|
||||
* NOTE: This endpoint is unauthenticated by design.
|
||||
*
|
||||
* During first-time bootstrap there is no admin account yet, so frontend initialization must be
|
||||
* able to query setup progress before any login flow exists.
|
||||
*
|
||||
* Only bootstrap-safe status information should be returned by this endpoint.
|
||||
*
|
||||
*/
|
||||
export const get = oc
|
||||
.route({
|
||||
inputStructure: 'detailed',
|
||||
method: 'GET',
|
||||
operationId: 'getSetup',
|
||||
path: '/setup',
|
||||
summary:
|
||||
'Get system setup status.\n\nNOTE: This endpoint is unauthenticated by design.\n\nDuring first-time bootstrap there is no admin account yet, so frontend initialization must be\nable to query setup progress before any login flow exists.\n\nOnly bootstrap-safe status information should be returned by this endpoint.\n',
|
||||
tags: ['console'],
|
||||
})
|
||||
.output(zGetSetupResponse)
|
||||
|
||||
/**
|
||||
* Initialize system setup with admin account.
|
||||
*
|
||||
* NOTE: This endpoint is unauthenticated by design for first-time bootstrap.
|
||||
* Access is restricted to self-hosted editions (`COMMUNITY` and `ENTERPRISE`), one-time setup guards,
|
||||
* and init-password validation rather than user session authentication.
|
||||
*
|
||||
*/
|
||||
export const post = oc
|
||||
.route({
|
||||
inputStructure: 'detailed',
|
||||
method: 'POST',
|
||||
operationId: 'postSetup',
|
||||
path: '/setup',
|
||||
successStatus: 201,
|
||||
summary:
|
||||
'Initialize system setup with admin account.\n\nNOTE: This endpoint is unauthenticated by design for first-time bootstrap.\nAccess is restricted to self-hosted editions (`COMMUNITY` and `ENTERPRISE`), one-time setup guards,\nand init-password validation rather than user session authentication.\n',
|
||||
tags: ['console'],
|
||||
})
|
||||
.input(z.object({ body: zPostSetupBody }))
|
||||
.output(zPostSetupResponse)
|
||||
|
||||
export const setup = {
|
||||
get,
|
||||
post,
|
||||
}
|
||||
|
||||
export const contract = {
|
||||
setup,
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
// This file is auto-generated by @hey-api/openapi-ts
|
||||
|
||||
export type ClientOptions = {
|
||||
baseUrl: `${string}://${string}/console/api` | (string & {})
|
||||
}
|
||||
|
||||
export type SetupStatusResponse = {
|
||||
setup_at?: string | null
|
||||
step: 'finished' | 'not_started'
|
||||
}
|
||||
|
||||
export type SetupRequestPayload = {
|
||||
email: string
|
||||
language?: string | null
|
||||
name: string
|
||||
password: string
|
||||
}
|
||||
|
||||
export type SetupResponse = {
|
||||
result: string
|
||||
}
|
||||
|
||||
export type GetSetupData = {
|
||||
body?: never
|
||||
path?: never
|
||||
query?: never
|
||||
url: '/setup'
|
||||
}
|
||||
|
||||
export type GetSetupResponses = {
|
||||
200: SetupStatusResponse
|
||||
}
|
||||
|
||||
export type GetSetupResponse = GetSetupResponses[keyof GetSetupResponses]
|
||||
|
||||
export type PostSetupData = {
|
||||
body: SetupRequestPayload
|
||||
path?: never
|
||||
query?: never
|
||||
url: '/setup'
|
||||
}
|
||||
|
||||
export type PostSetupResponses = {
|
||||
201: SetupResponse
|
||||
}
|
||||
|
||||
export type PostSetupResponse = PostSetupResponses[keyof PostSetupResponses]
|
||||
@@ -0,0 +1,40 @@
|
||||
// This file is auto-generated by @hey-api/openapi-ts
|
||||
|
||||
import * as z from 'zod'
|
||||
|
||||
/**
|
||||
* SetupStatusResponse
|
||||
*/
|
||||
export const zSetupStatusResponse = z.object({
|
||||
setup_at: z.string().nullish(),
|
||||
step: z.enum(['finished', 'not_started']),
|
||||
})
|
||||
|
||||
/**
|
||||
* SetupRequestPayload
|
||||
*/
|
||||
export const zSetupRequestPayload = z.object({
|
||||
email: z.string(),
|
||||
language: z.string().nullish(),
|
||||
name: z.string().max(30),
|
||||
password: z.string(),
|
||||
})
|
||||
|
||||
/**
|
||||
* SetupResponse
|
||||
*/
|
||||
export const zSetupResponse = z.object({
|
||||
result: z.string(),
|
||||
})
|
||||
|
||||
/**
|
||||
* OK
|
||||
*/
|
||||
export const zGetSetupResponse = zSetupStatusResponse
|
||||
|
||||
export const zPostSetupBody = zSetupRequestPayload
|
||||
|
||||
/**
|
||||
* Created
|
||||
*/
|
||||
export const zPostSetupResponse = zSetupResponse
|
||||
Reference in new issue
Block a user