feat(publish): Wechat OffiAccount (#2386)

* feat: OffiAccount fe

* feat: offiaccount

* fix: wecom requires AES key

* fix: OffiAccountEditModal

* chore: change wechat svg icon

* chore: add offiaccount svg

* chore: hide unimplemented wecom entries
This commit is contained in:
Finley Ge
2024-08-15 12:06:13 +08:00
committed by GitHub
parent 5bbaa8264a
commit f8b8fcc172
14 changed files with 486 additions and 13 deletions

View File

@@ -1,6 +1,7 @@
export enum TmpDataEnum {
FeishuAccessToken = 'feishu_access_token',
WecomAccessToken = 'wecom_access_token'
WecomAccessToken = 'wecom_access_token',
OffiAccountAccessToken = 'offiaccount_access_token'
}
type _TmpDataMetadata = {
@@ -11,6 +12,9 @@ type _TmpDataMetadata = {
CorpId: string;
AgentId: string;
};
[TmpDataEnum.OffiAccountAccessToken]: {
AppId: string;
};
};
type _TmpDataType = {
@@ -20,11 +24,15 @@ type _TmpDataType = {
[TmpDataEnum.WecomAccessToken]: {
accessToken: string;
};
[TmpDataEnum.OffiAccountAccessToken]: {
accessToken: string;
};
};
export const TmpDataExpireTime = {
[TmpDataEnum.FeishuAccessToken]: 1000 * 60 * 60 * 1.5, // 1.5 hours
[TmpDataEnum.WecomAccessToken]: 1000 * 60 * 60 * 2 // 2 hours
[TmpDataEnum.WecomAccessToken]: 1000 * 60 * 60 * 2, // 2 hours
[TmpDataEnum.OffiAccountAccessToken]: 1000 * 60 * 60 * 2 // 2 hours
};
export type TmpDataMetadata<T extends TmpDataEnum> = _TmpDataMetadata[T];