Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

1.5 KB
Raw Blame
// This file is auto-generated by @hey-api/openapi-ts

import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
  zAccountBannedError,
  zAccountInFreezeError,
  zAccountNotFoundError,
  zAuthenticationFailedError,
  zEmailCodeLoginLimitError,
  zEmailDomainSuspendedError,
  zInvalidAccountPasswordError,
  zInvalidEmailError,
  zLimitExceededError,
} from './zod.gen.ts'
import { zPostLoginBody, zPostLoginResponse } from './zod.gen.ts'

/**
 * Authenticate user and login
 */
export const post = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postLogin',
    path: '/login',
    summary: 'Authenticate user and login',
    tags: ['console'],
  })
  .input(z.object({ body: zPostLoginBody }))
  .output(zPostLoginResponse)
  .errors({
    account_banned: { status: 400, data: zAccountBannedError },
    account_in_freeze: { status: 400, data: zAccountInFreezeError },
    account_not_found: { status: 400, data: zAccountNotFoundError },
    authentication_failed: { status: 401, data: zAuthenticationFailedError },
    email_code_login_limit: { status: 429, data: zEmailCodeLoginLimitError },
    email_domain_suspended: { status: 400, data: zEmailDomainSuspendedError },
    invalid_account_password: { status: 400, data: zInvalidAccountPasswordError },
    invalid_email: { status: 400, data: zInvalidEmailError },
    limit_exceeded: { status: 400, data: zLimitExceededError },
  })

export const login = {
  post,
}

export const contract = {
  login,
}