mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
refactor(api): establish dataset application boundaries (#41729)
Co-authored-by: Jyong <jyong@dify.ai>
This commit is contained in:
1 parent
c005932db9
commit
a67cd87eb0
417 files changed
+30522
-23751
No files matched your search
@@ -3,25 +3,11 @@
|
||||
import { oc } from '@orpc/contract'
|
||||
import * as z from 'zod'
|
||||
import {
|
||||
zGetDataSourceIntegratesByBindingIdByActionPath,
|
||||
zGetDataSourceIntegratesByBindingIdByActionResponse,
|
||||
zGetDataSourceIntegratesResponse,
|
||||
zPatchDataSourceIntegratesByBindingIdByActionPath,
|
||||
zPatchDataSourceIntegratesByBindingIdByActionResponse,
|
||||
zPatchDataSourceIntegratesResponse,
|
||||
} from './zod.gen.ts'
|
||||
|
||||
export const get = oc
|
||||
.route({
|
||||
inputStructure: 'detailed',
|
||||
method: 'GET',
|
||||
operationId: 'getDataSourceIntegratesByBindingIdByAction',
|
||||
path: '/data-source/integrates/{binding_id}/{action}',
|
||||
tags: ['console'],
|
||||
})
|
||||
.input(z.object({ params: zGetDataSourceIntegratesByBindingIdByActionPath }))
|
||||
.output(zGetDataSourceIntegratesByBindingIdByActionResponse)
|
||||
|
||||
export const patch = oc
|
||||
.route({
|
||||
inputStructure: 'detailed',
|
||||
@@ -34,7 +20,6 @@ export const patch = oc
|
||||
.output(zPatchDataSourceIntegratesByBindingIdByActionResponse)
|
||||
|
||||
export const byAction = {
|
||||
get,
|
||||
patch,
|
||||
}
|
||||
|
||||
@@ -42,7 +27,7 @@ export const byBindingId = {
|
||||
byAction,
|
||||
}
|
||||
|
||||
export const get2 = oc
|
||||
export const get = oc
|
||||
.route({
|
||||
inputStructure: 'detailed',
|
||||
method: 'GET',
|
||||
@@ -52,19 +37,8 @@ export const get2 = oc
|
||||
})
|
||||
.output(zGetDataSourceIntegratesResponse)
|
||||
|
||||
export const patch2 = oc
|
||||
.route({
|
||||
inputStructure: 'detailed',
|
||||
method: 'PATCH',
|
||||
operationId: 'patchDataSourceIntegrates',
|
||||
path: '/data-source/integrates',
|
||||
tags: ['console'],
|
||||
})
|
||||
.output(zPatchDataSourceIntegratesResponse)
|
||||
|
||||
export const integrates = {
|
||||
get: get2,
|
||||
patch: patch2,
|
||||
get,
|
||||
byBindingId,
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user