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.

632 B
Raw Blame
import type { CreateAppPayload, PostAppsResponse } from '@dify/contracts/api/console/apps/types.gen'
import type { ConsoleClient } from './console-client.ts'
import { assertE2EResourceName, createE2EResourceName } from '../naming.ts'

export async function createTestApp(
  client: ConsoleClient,
  name = createE2EResourceName('App'),
  mode: CreateAppPayload['mode'] = 'workflow',
): Promise<PostAppsResponse> {
  assertE2EResourceName(name, 'App')
  const body = {
    name,
    mode,
    icon_type: 'emoji',
    icon: '🤖',
    icon_background: '#FFEAD5',
  } satisfies CreateAppPayload

  return client.apps.post({ body })
}