import { NativeEnv, WebEnv, WechatMpEnv } from 'oak-domain/lib/types/Environment'; import { AppType } from '../oak-app-domain/Application/Schema'; import { EntityDict } from '../oak-app-domain'; import { Config } from '../types/Config'; import { Style } from '../types/Style'; import { MaterialType } from '../types/WeChat'; import { BackendRuntimeContext } from '../context/BackendRuntimeContext'; import { WechatPublicEventData, WechatMpEventData } from 'oak-external-sdk'; export type GeneralAspectDict> = { mergeUser: (params: { from: string; to: string; }, context: Cxt) => Promise; refreshWechatPublicUserInfo: (params: {}, context: Cxt) => Promise; getWechatMpUserPhoneNumber: (params: { code: string; env: WechatMpEnv; }, context: Cxt) => Promise; loginByMobile: (params: { captcha?: string; password?: string; mobile: string; disableRegister?: boolean; env: WebEnv | WechatMpEnv | NativeEnv; }, context: Cxt) => Promise; loginWechat: ({ code, env, wechatLoginId, }: { code: string; env: WebEnv; wechatLoginId?: string; }, context: Cxt) => Promise; logout: (params: { tokenValue: string; }, context: Cxt) => Promise; loginWechatMp: ({ code, env, }: { code: string; env: WechatMpEnv; }, context: Cxt) => Promise; syncUserInfoWechatMp: ({ nickname, avatarUrl, encryptedData, iv, signature, }: { nickname: string; avatarUrl: string; encryptedData: string; iv: string; signature: string; }, context: Cxt) => Promise; wakeupParasite: (params: { id: string; env: WebEnv | WechatMpEnv; }, context: Cxt) => Promise; refreshToken: (params: { tokenValue: string; env: WebEnv | WechatMpEnv | NativeEnv; }, context: Cxt) => Promise; sendCaptcha: (params: { mobile: string; env: WechatMpEnv | WebEnv; type: 'login' | 'changePassword' | 'confirm'; }, context: Cxt) => Promise; getApplication: (params: { type: AppType; domain: string; data: ED['application']['Selection']['data']; appId?: string; }, context: Cxt) => Promise; signatureJsSDK: (params: { url: string; env: WebEnv; }, context: Cxt) => Promise<{ signature: any; noncestr: string; timestamp: number; appId: string; }>; updateConfig: (params: { entity: 'platform' | 'system'; entityId: string; config: Config; }, context: Cxt) => Promise; updateStyle: (params: { entity: 'platform' | 'system' | 'application'; entityId: string; style: Style; }, context: Cxt) => Promise; updateApplicationConfig: (params: { entity: 'application'; entityId: string; config: EntityDict['application']['Schema']['config']; }, context: Cxt) => Promise; switchTo: (params: { userId: string; }, context: Cxt) => Promise; getMpUnlimitWxaCode: (wechatQrCodeId: string, context: Cxt) => Promise; createWechatLogin: (params: { type: EntityDict['wechatLogin']['Schema']['type']; interval: number; }, context: Cxt) => Promise; unbindingWechat: (params: { wechatUserId: string; captcha?: string; mobile?: string; }, context: Cxt) => Promise; loginByWechat: (params: { wechatLoginId: string; env: WebEnv; }, context: Cxt) => Promise; getInfoByUrl: (params: { url: string; }) => Promise<{ title: string; publishDate: number | undefined; imageList: string[]; }>; getChangePasswordChannels: (params: { userId: string; }, context: Cxt) => Promise; updateUserPassword: (params: { userId: string; prevPassword?: string; mobile?: string; captcha?: string; newPassword: string; }, context: Cxt) => Promise<{ result: string; times?: number; }>; createSession: (params: { data?: WechatPublicEventData | WechatMpEventData; type: AppType; entity?: string; entityId?: string; }, context: Cxt) => Promise; uploadWechatMedia: (params: any, context: Cxt) => Promise<{ mediaId: string; }>; getCurrentMenu: (params: { applicationId: string; }, context: Cxt) => Promise; getMenu: (params: { applicationId: string; }, context: Cxt) => Promise; createMenu: (params: { applicationId: string; menuConfig: any; id: string; }, context: Cxt) => Promise; createConditionalMenu: (params: { applicationId: string; menuConfig: any; id: string; }, context: Cxt) => Promise; deleteConditionalMenu: (params: { applicationId: string; menuId: number; }, context: Cxt) => Promise; deleteMenu: (params: { applicationId: string; }, context: Cxt) => Promise; batchGetArticle: (params: { applicationId: string; offset?: number; count: number; noContent?: 0 | 1; }, context: Cxt) => Promise; getArticle: (params: { applicationId: string; articleId: string; }, context: Cxt) => Promise; batchGetMaterialList: (params: { applicationId: string; type: MaterialType; offset?: number; count: number; }, context: Cxt) => Promise; getMaterial: (params: { applicationId: string; mediaId: string; isPermanent?: boolean; }, context: Cxt) => Promise; deleteMaterial: (params: { applicationId: string; mediaId: string; }, context: Cxt) => Promise; createTag: (params: { applicationId: string; name: string; }, context: Cxt) => Promise; getTags: (params: { applicationId: string; }, context: Cxt) => Promise; editTag: (params: { applicationId: string; id: number; name: string; }, context: Cxt) => Promise; deleteTag: (params: { applicationId: string; id: string; wechatId: number; }, context: Cxt) => Promise; syncMessageTemplate: (params: { applicationId: string; }, context: Cxt) => Promise; getMessageType: (params: {}, content: Cxt) => Promise; syncTag: (params: { applicationId: string; id: string; }, context: Cxt) => Promise; oneKeySync: (params: { applicationId: string; }, context: Cxt) => Promise; getTagUsers: (params: { applicationId: string; tagId: number; }, context: Cxt) => Promise; batchtagging: (params: { applicationId: string; openIdList: string[]; tagId: number; }, context: Cxt) => Promise; batchuntagging: (params: { applicationId: string; openIdList: string[]; tagId: number; }, context: Cxt) => Promise; getUserTags: (params: { applicationId: string; openId: string; }, context: Cxt) => Promise; getUsers: (params: { applicationId: string; nextOpenId: string; }, context: Cxt) => Promise; tagging: (params: { applicationId: string; openId: string; tagIdList: number[]; }, context: Cxt) => Promise; syncToLocale: (params: { applicationId: string; openId: string; }, context: Cxt) => Promise; syncToWechat: (params: { applicationId: string; id: string; openId: string; }, context: Cxt) => Promise; syncSmsTemplate: (params: { systemId: string; origin: string; }, context: Cxt) => Promise; }; export default GeneralAspectDict;