mirror of
https://github.com/langgenius/dify.git
synced 2026-11-13 14:51:39 +08:00
feat(rbac): agent RBAC/ACL scenes and resource-locator check bundles (#41768)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
60e983c493
commit
86134ea99e
152 files changed
+5360
-3405
No files matched your search
@@ -4,46 +4,6 @@ export type ClientOptions = {
|
||||
baseUrl: `${string}://${string}/console/api` | (string & {})
|
||||
}
|
||||
|
||||
export type DataSourceIntegrateListResponse = {
|
||||
data: Array<DataSourceIntegrateResponse>
|
||||
}
|
||||
|
||||
export type SimpleResultResponse = {
|
||||
result: string
|
||||
}
|
||||
|
||||
export type DataSourceIntegrateResponse = {
|
||||
created_at: number | null
|
||||
disabled: boolean | null
|
||||
id: string | null
|
||||
is_bound: boolean
|
||||
link: string
|
||||
provider: string
|
||||
source_info: DataSourceIntegrateWorkspaceResponse | null
|
||||
}
|
||||
|
||||
export type DataSourceIntegrateWorkspaceResponse = {
|
||||
pages: Array<DataSourceIntegratePageResponse>
|
||||
total: number
|
||||
workspace_icon: string | null
|
||||
workspace_id: string | null
|
||||
workspace_name: string | null
|
||||
}
|
||||
|
||||
export type DataSourceIntegratePageResponse = {
|
||||
page_icon: DataSourceIntegrateIconResponse | null
|
||||
page_id: string
|
||||
page_name: string
|
||||
parent_id: string
|
||||
type: string
|
||||
}
|
||||
|
||||
export type DataSourceIntegrateIconResponse = {
|
||||
emoji?: string | null
|
||||
type?: string | null
|
||||
url?: string | null
|
||||
}
|
||||
|
||||
export type GetDataSourceIntegratesData = {
|
||||
body?: never
|
||||
path?: never
|
||||
@@ -52,7 +12,9 @@ export type GetDataSourceIntegratesData = {
|
||||
}
|
||||
|
||||
export type GetDataSourceIntegratesResponses = {
|
||||
200: DataSourceIntegrateListResponse
|
||||
200: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
}
|
||||
|
||||
export type GetDataSourceIntegratesResponse =
|
||||
@@ -66,7 +28,9 @@ export type PatchDataSourceIntegratesData = {
|
||||
}
|
||||
|
||||
export type PatchDataSourceIntegratesResponses = {
|
||||
200: SimpleResultResponse
|
||||
200: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
}
|
||||
|
||||
export type PatchDataSourceIntegratesResponse =
|
||||
@@ -83,7 +47,9 @@ export type GetDataSourceIntegratesByBindingIdByActionData = {
|
||||
}
|
||||
|
||||
export type GetDataSourceIntegratesByBindingIdByActionResponses = {
|
||||
200: DataSourceIntegrateListResponse
|
||||
200: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
}
|
||||
|
||||
export type GetDataSourceIntegratesByBindingIdByActionResponse =
|
||||
@@ -100,7 +66,9 @@ export type PatchDataSourceIntegratesByBindingIdByActionData = {
|
||||
}
|
||||
|
||||
export type PatchDataSourceIntegratesByBindingIdByActionResponses = {
|
||||
200: SimpleResultResponse
|
||||
200: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
}
|
||||
|
||||
export type PatchDataSourceIntegratesByBindingIdByActionResponse =
|
||||
|
||||
@@ -3,72 +3,14 @@
|
||||
import * as z from 'zod'
|
||||
|
||||
/**
|
||||
* SimpleResultResponse
|
||||
* Success
|
||||
*/
|
||||
export const zSimpleResultResponse = z.object({
|
||||
result: z.string(),
|
||||
})
|
||||
|
||||
/**
|
||||
* DataSourceIntegrateIconResponse
|
||||
*/
|
||||
export const zDataSourceIntegrateIconResponse = z.object({
|
||||
emoji: z.string().nullish(),
|
||||
type: z.string().nullish(),
|
||||
url: z.string().nullish(),
|
||||
})
|
||||
|
||||
/**
|
||||
* DataSourceIntegratePageResponse
|
||||
*/
|
||||
export const zDataSourceIntegratePageResponse = z.object({
|
||||
page_icon: zDataSourceIntegrateIconResponse.nullable(),
|
||||
page_id: z.string(),
|
||||
page_name: z.string(),
|
||||
parent_id: z.string(),
|
||||
type: z.string(),
|
||||
})
|
||||
|
||||
/**
|
||||
* DataSourceIntegrateWorkspaceResponse
|
||||
*/
|
||||
export const zDataSourceIntegrateWorkspaceResponse = z.object({
|
||||
pages: z.array(zDataSourceIntegratePageResponse),
|
||||
total: z.int(),
|
||||
workspace_icon: z.string().nullable(),
|
||||
workspace_id: z.string().nullable(),
|
||||
workspace_name: z.string().nullable(),
|
||||
})
|
||||
|
||||
/**
|
||||
* DataSourceIntegrateResponse
|
||||
*/
|
||||
export const zDataSourceIntegrateResponse = z.object({
|
||||
created_at: z.int().nullable(),
|
||||
disabled: z.boolean().nullable(),
|
||||
id: z.string().nullable(),
|
||||
is_bound: z.boolean(),
|
||||
link: z.string(),
|
||||
provider: z.string(),
|
||||
source_info: zDataSourceIntegrateWorkspaceResponse.nullable(),
|
||||
})
|
||||
|
||||
/**
|
||||
* DataSourceIntegrateListResponse
|
||||
*/
|
||||
export const zDataSourceIntegrateListResponse = z.object({
|
||||
data: z.array(zDataSourceIntegrateResponse),
|
||||
})
|
||||
export const zGetDataSourceIntegratesResponse = z.record(z.string(), z.unknown())
|
||||
|
||||
/**
|
||||
* Success
|
||||
*/
|
||||
export const zGetDataSourceIntegratesResponse = zDataSourceIntegrateListResponse
|
||||
|
||||
/**
|
||||
* Success
|
||||
*/
|
||||
export const zPatchDataSourceIntegratesResponse = zSimpleResultResponse
|
||||
export const zPatchDataSourceIntegratesResponse = z.record(z.string(), z.unknown())
|
||||
|
||||
export const zGetDataSourceIntegratesByBindingIdByActionPath = z.object({
|
||||
action: z.string(),
|
||||
@@ -78,7 +20,7 @@ export const zGetDataSourceIntegratesByBindingIdByActionPath = z.object({
|
||||
/**
|
||||
* Success
|
||||
*/
|
||||
export const zGetDataSourceIntegratesByBindingIdByActionResponse = zDataSourceIntegrateListResponse
|
||||
export const zGetDataSourceIntegratesByBindingIdByActionResponse = z.record(z.string(), z.unknown())
|
||||
|
||||
export const zPatchDataSourceIntegratesByBindingIdByActionPath = z.object({
|
||||
action: z.string(),
|
||||
@@ -88,4 +30,7 @@ export const zPatchDataSourceIntegratesByBindingIdByActionPath = z.object({
|
||||
/**
|
||||
* Success
|
||||
*/
|
||||
export const zPatchDataSourceIntegratesByBindingIdByActionResponse = zSimpleResultResponse
|
||||
export const zPatchDataSourceIntegratesByBindingIdByActionResponse = z.record(
|
||||
z.string(),
|
||||
z.unknown(),
|
||||
)
|
||||
Reference in new issue
Block a user