mirror of
https://github.com/langgenius/dify.git
synced 2026-07-25 05:28:35 +08:00
61 lines
1.7 KiB
TypeScript
61 lines
1.7 KiB
TypeScript
// This file is auto-generated by @hey-api/openapi-ts
|
|
|
|
import { oc } from '@orpc/contract'
|
|
import * as z from 'zod'
|
|
import {
|
|
zGetActivateCheckQuery,
|
|
zGetActivateCheckResponse,
|
|
zPostActivateBody,
|
|
zPostActivateResponse,
|
|
} from './zod.gen'
|
|
|
|
/**
|
|
* Check if activation token is valid
|
|
*/
|
|
export const get = oc
|
|
.route({
|
|
description: 'Check if activation token is valid',
|
|
inputStructure: 'detailed',
|
|
method: 'GET',
|
|
operationId: 'getActivateCheck',
|
|
path: '/activate/check',
|
|
tags: ['console'],
|
|
})
|
|
.input(z.object({ query: zGetActivateCheckQuery }))
|
|
.output(zGetActivateCheckResponse)
|
|
|
|
export const check = {
|
|
get,
|
|
}
|
|
|
|
/**
|
|
* Accept an invitation without letting an existing session act for another account
|
|
*
|
|
* Activate account with invitation token
|
|
* Token-only activation remains available for legacy clients. When the request already
|
|
* carries a console session, that session must belong to the account encoded in the
|
|
* invitation before the token is consumed or tenant membership is changed.
|
|
*/
|
|
export const post = oc
|
|
.route({
|
|
description:
|
|
'Activate account with invitation token\nToken-only activation remains available for legacy clients. When the request already\ncarries a console session, that session must belong to the account encoded in the\ninvitation before the token is consumed or tenant membership is changed.',
|
|
inputStructure: 'detailed',
|
|
method: 'POST',
|
|
operationId: 'postActivate',
|
|
path: '/activate',
|
|
summary: 'Accept an invitation without letting an existing session act for another account',
|
|
tags: ['console'],
|
|
})
|
|
.input(z.object({ body: zPostActivateBody }))
|
|
.output(zPostActivateResponse)
|
|
|
|
export const activate = {
|
|
post,
|
|
check,
|
|
}
|
|
|
|
export const contract = {
|
|
activate,
|
|
}
|