mirror of
https://github.com/langgenius/dify.git
synced 2026-05-13 08:57:28 +08:00
30 lines
946 B
TypeScript
30 lines
946 B
TypeScript
import type { ListAppDeploymentsQuery } from '@/contract/console/deployments'
|
|
import { skipToken } from '@tanstack/react-query'
|
|
import { consoleQuery } from '@/service/client'
|
|
import { SOURCE_APPS_PAGE_SIZE } from './data'
|
|
|
|
export const deploymentsListQueryOptions = (query: ListAppDeploymentsQuery = {}) =>
|
|
consoleQuery.deployments.list.queryOptions({
|
|
input: {
|
|
query: {
|
|
pageNumber: 1,
|
|
resultsPerPage: SOURCE_APPS_PAGE_SIZE,
|
|
...query,
|
|
},
|
|
},
|
|
})
|
|
|
|
export const deploymentOverviewQueryOptions = (appInstanceId?: string) =>
|
|
consoleQuery.deployments.overview.queryOptions({
|
|
input: appInstanceId
|
|
? { params: { appInstanceId } }
|
|
: skipToken,
|
|
})
|
|
|
|
export const deploymentEnvironmentDeploymentsQueryOptions = (appInstanceId?: string) =>
|
|
consoleQuery.deployments.environmentDeployments.queryOptions({
|
|
input: appInstanceId
|
|
? { params: { appInstanceId } }
|
|
: skipToken,
|
|
})
|