mirror of
https://github.com/langgenius/dify.git
synced 2025-11-18 04:13:35 +00:00
24 lines
591 B
TypeScript
24 lines
591 B
TypeScript
import { IS_CE_EDITION } from '@/config'
|
|
|
|
export type ConversationField = {
|
|
id: string,
|
|
value: any,
|
|
}
|
|
|
|
declare global {
|
|
// eslint-disable-next-line ts/consistent-type-definitions
|
|
interface Window {
|
|
zE?: (
|
|
command: string,
|
|
value: string,
|
|
payload?: ConversationField[] | string | string[] | (() => any),
|
|
callback?: () => any,
|
|
) => void;
|
|
}
|
|
}
|
|
|
|
export const setZendeskConversationFields = (fields: ConversationField[], callback?: () => any) => {
|
|
if (!IS_CE_EDITION && window.zE)
|
|
window.zE('messenger:set', 'conversationFields', fields, callback)
|
|
}
|