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

@@ -3,5 +3,6 @@ export enum PublishChannelEnum {
iframe = 'iframe',
apikey = 'apikey',
feishu = 'feishu',
wecom = 'wecom'
wecom = 'wecom',
officialAccount = 'official_account'
}

View File

@@ -25,7 +25,18 @@ export interface WecomAppType {
// TODO: unused
export interface WechatAppType {}
export type OutlinkAppType = FeishuAppType | WecomAppType | undefined;
export interface OffiAccountAppType {
appId: string;
isVerified?: boolean; // if isVerified, we could use '客服接口' to reply
secret: string;
CallbackToken: string;
CallbackEncodingAesKey?: string;
timeoutReply?: string; // if timeout (15s), will reply this content.
// timeout reply is optional, but when isVerified is false, the wechat will reply a default message which is `该公众号暂时无法提供服务,请稍后再试`
// because we can not reply anything in 15s. Thus, the wechat server will treat this request as a failed request.
}
export type OutlinkAppType = FeishuAppType | WecomAppType | OffiAccountAppType | undefined;
export type OutLinkSchema<T extends OutlinkAppType = undefined> = {
_id: string;