forked from wangziqi/gongxue-base
14 lines
393 B
TypeScript
14 lines
393 B
TypeScript
export interface DingTalkConfigFormValues {
|
|
agentId: string;
|
|
appSecret?: string;
|
|
corpId: string;
|
|
}
|
|
|
|
export const isAppSecretRequired = (hasSavedConfig: boolean) => !hasSavedConfig;
|
|
|
|
export const buildDingTalkConfigPayload = (values: DingTalkConfigFormValues) => ({
|
|
corpId: values.corpId.trim(),
|
|
agentId: values.agentId.trim(),
|
|
appSecret: values.appSecret?.trim() || undefined,
|
|
});
|