mirror of
https://github.com/langgenius/dify.git
synced 2026-05-02 16:38:04 +08:00
Merge remote-tracking branch 'origin/main' into feat/trigger
This commit is contained in:
@ -15,6 +15,7 @@ import {
|
||||
import { useGetApi } from './use-get-api'
|
||||
import type { PluginPayload } from '../types'
|
||||
import type { CredentialTypeEnum } from '../types'
|
||||
import { useInvalidToolsByType } from '@/service/use-tools'
|
||||
|
||||
export const useGetPluginCredentialInfoHook = (pluginPayload: PluginPayload, enable?: boolean) => {
|
||||
const apiMap = useGetApi(pluginPayload)
|
||||
@ -29,8 +30,14 @@ export const useDeletePluginCredentialHook = (pluginPayload: PluginPayload) => {
|
||||
|
||||
export const useInvalidPluginCredentialInfoHook = (pluginPayload: PluginPayload) => {
|
||||
const apiMap = useGetApi(pluginPayload)
|
||||
const invalidPluginCredentialInfo = useInvalidPluginCredentialInfo(apiMap.getCredentialInfo)
|
||||
const providerType = pluginPayload.providerType
|
||||
const invalidToolsByType = useInvalidToolsByType(providerType)
|
||||
|
||||
return useInvalidPluginCredentialInfo(apiMap.getCredentialInfo)
|
||||
return () => {
|
||||
invalidPluginCredentialInfo()
|
||||
invalidToolsByType()
|
||||
}
|
||||
}
|
||||
|
||||
export const useSetPluginDefaultCredentialHook = (pluginPayload: PluginPayload) => {
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import type { CollectionType } from '../../tools/types'
|
||||
import type { PluginDetail } from '../types'
|
||||
|
||||
export type { AddApiKeyButtonProps } from './authorize/add-api-key-button'
|
||||
@ -13,7 +14,8 @@ export enum AuthCategory {
|
||||
export type PluginPayload = {
|
||||
category: AuthCategory
|
||||
provider: string
|
||||
detail: PluginDetail
|
||||
providerType?: CollectionType | string
|
||||
detail?: PluginDetail
|
||||
}
|
||||
|
||||
export enum CredentialTypeEnum {
|
||||
|
||||
Reference in New Issue
Block a user