适配了common的编译声明
This commit is contained in:
parent
3bd50bf988
commit
beae8eb15a
|
|
@ -6,65 +6,65 @@ import { Style } from '../types/Style';
|
||||||
import { MaterialType } from '../types/WeChat';
|
import { MaterialType } from '../types/WeChat';
|
||||||
import { BackendRuntimeContext } from '../context/BackendRuntimeContext';
|
import { BackendRuntimeContext } from '../context/BackendRuntimeContext';
|
||||||
import { WechatPublicEventData, WechatMpEventData } from 'oak-external-sdk';
|
import { WechatPublicEventData, WechatMpEventData } from 'oak-external-sdk';
|
||||||
export type GeneralAspectDict<ED extends EntityDict, Cxt extends BackendRuntimeContext<ED>> = {
|
export type AspectDict<ED extends EntityDict> = {
|
||||||
mergeUser: (params: {
|
mergeUser: (params: {
|
||||||
from: string;
|
from: string;
|
||||||
to: string;
|
to: string;
|
||||||
}, context: Cxt) => Promise<void>;
|
}, context: BackendRuntimeContext<ED>) => Promise<void>;
|
||||||
refreshWechatPublicUserInfo: (params: {}, context: Cxt) => Promise<void>;
|
refreshWechatPublicUserInfo: (params: {}, context: BackendRuntimeContext<ED>) => Promise<void>;
|
||||||
getWechatMpUserPhoneNumber: (params: {
|
getWechatMpUserPhoneNumber: (params: {
|
||||||
code: string;
|
code: string;
|
||||||
env: WechatMpEnv;
|
env: WechatMpEnv;
|
||||||
}, context: Cxt) => Promise<string>;
|
}, context: BackendRuntimeContext<ED>) => Promise<string>;
|
||||||
loginByMobile: (params: {
|
loginByMobile: (params: {
|
||||||
captcha?: string;
|
captcha?: string;
|
||||||
password?: string;
|
password?: string;
|
||||||
mobile: string;
|
mobile: string;
|
||||||
disableRegister?: boolean;
|
disableRegister?: boolean;
|
||||||
env: WebEnv | WechatMpEnv | NativeEnv;
|
env: WebEnv | WechatMpEnv | NativeEnv;
|
||||||
}, context: Cxt) => Promise<string>;
|
}, context: BackendRuntimeContext<ED>) => Promise<string>;
|
||||||
loginWechat: ({ code, env, wechatLoginId, }: {
|
loginWechat: ({ code, env, wechatLoginId, }: {
|
||||||
code: string;
|
code: string;
|
||||||
env: WebEnv;
|
env: WebEnv;
|
||||||
wechatLoginId?: string;
|
wechatLoginId?: string;
|
||||||
}, context: Cxt) => Promise<string>;
|
}, context: BackendRuntimeContext<ED>) => Promise<string>;
|
||||||
logout: (params: {
|
logout: (params: {
|
||||||
tokenValue: string;
|
tokenValue: string;
|
||||||
}, context: Cxt) => Promise<void>;
|
}, context: BackendRuntimeContext<ED>) => Promise<void>;
|
||||||
loginWechatMp: ({ code, env, }: {
|
loginWechatMp: ({ code, env, }: {
|
||||||
code: string;
|
code: string;
|
||||||
env: WechatMpEnv;
|
env: WechatMpEnv;
|
||||||
}, context: Cxt) => Promise<string>;
|
}, context: BackendRuntimeContext<ED>) => Promise<string>;
|
||||||
syncUserInfoWechatMp: ({ nickname, avatarUrl, encryptedData, iv, signature, }: {
|
syncUserInfoWechatMp: ({ nickname, avatarUrl, encryptedData, iv, signature, }: {
|
||||||
nickname: string;
|
nickname: string;
|
||||||
avatarUrl: string;
|
avatarUrl: string;
|
||||||
encryptedData: string;
|
encryptedData: string;
|
||||||
iv: string;
|
iv: string;
|
||||||
signature: string;
|
signature: string;
|
||||||
}, context: Cxt) => Promise<void>;
|
}, context: BackendRuntimeContext<ED>) => Promise<void>;
|
||||||
wakeupParasite: (params: {
|
wakeupParasite: (params: {
|
||||||
id: string;
|
id: string;
|
||||||
env: WebEnv | WechatMpEnv;
|
env: WebEnv | WechatMpEnv;
|
||||||
}, context: Cxt) => Promise<string>;
|
}, context: BackendRuntimeContext<ED>) => Promise<string>;
|
||||||
refreshToken: (params: {
|
refreshToken: (params: {
|
||||||
tokenValue: string;
|
tokenValue: string;
|
||||||
env: WebEnv | WechatMpEnv | NativeEnv;
|
env: WebEnv | WechatMpEnv | NativeEnv;
|
||||||
}, context: Cxt) => Promise<string>;
|
}, context: BackendRuntimeContext<ED>) => Promise<string>;
|
||||||
sendCaptcha: (params: {
|
sendCaptcha: (params: {
|
||||||
mobile: string;
|
mobile: string;
|
||||||
env: WechatMpEnv | WebEnv;
|
env: WechatMpEnv | WebEnv;
|
||||||
type: 'login' | 'changePassword' | 'confirm';
|
type: 'login' | 'changePassword' | 'confirm';
|
||||||
}, context: Cxt) => Promise<string>;
|
}, context: BackendRuntimeContext<ED>) => Promise<string>;
|
||||||
getApplication: (params: {
|
getApplication: (params: {
|
||||||
type: AppType;
|
type: AppType;
|
||||||
domain: string;
|
domain: string;
|
||||||
data: ED['application']['Selection']['data'];
|
data: ED['application']['Selection']['data'];
|
||||||
appId?: string;
|
appId?: string;
|
||||||
}, context: Cxt) => Promise<string>;
|
}, context: BackendRuntimeContext<ED>) => Promise<string>;
|
||||||
signatureJsSDK: (params: {
|
signatureJsSDK: (params: {
|
||||||
url: string;
|
url: string;
|
||||||
env: WebEnv;
|
env: WebEnv;
|
||||||
}, context: Cxt) => Promise<{
|
}, context: BackendRuntimeContext<ED>) => Promise<{
|
||||||
signature: any;
|
signature: any;
|
||||||
noncestr: string;
|
noncestr: string;
|
||||||
timestamp: number;
|
timestamp: number;
|
||||||
|
|
@ -74,34 +74,34 @@ export type GeneralAspectDict<ED extends EntityDict, Cxt extends BackendRuntimeC
|
||||||
entity: 'platform' | 'system';
|
entity: 'platform' | 'system';
|
||||||
entityId: string;
|
entityId: string;
|
||||||
config: Config;
|
config: Config;
|
||||||
}, context: Cxt) => Promise<void>;
|
}, context: BackendRuntimeContext<ED>) => Promise<void>;
|
||||||
updateStyle: (params: {
|
updateStyle: (params: {
|
||||||
entity: 'platform' | 'system' | 'application';
|
entity: 'platform' | 'system' | 'application';
|
||||||
entityId: string;
|
entityId: string;
|
||||||
style: Style;
|
style: Style;
|
||||||
}, context: Cxt) => Promise<void>;
|
}, context: BackendRuntimeContext<ED>) => Promise<void>;
|
||||||
updateApplicationConfig: (params: {
|
updateApplicationConfig: (params: {
|
||||||
entity: 'application';
|
entity: 'application';
|
||||||
entityId: string;
|
entityId: string;
|
||||||
config: EntityDict['application']['Schema']['config'];
|
config: EntityDict['application']['Schema']['config'];
|
||||||
}, context: Cxt) => Promise<void>;
|
}, context: BackendRuntimeContext<ED>) => Promise<void>;
|
||||||
switchTo: (params: {
|
switchTo: (params: {
|
||||||
userId: string;
|
userId: string;
|
||||||
}, context: Cxt) => Promise<void>;
|
}, context: BackendRuntimeContext<ED>) => Promise<void>;
|
||||||
getMpUnlimitWxaCode: (wechatQrCodeId: string, context: Cxt) => Promise<string>;
|
getMpUnlimitWxaCode: (wechatQrCodeId: string, context: BackendRuntimeContext<ED>) => Promise<string>;
|
||||||
createWechatLogin: (params: {
|
createWechatLogin: (params: {
|
||||||
type: EntityDict['wechatLogin']['Schema']['type'];
|
type: EntityDict['wechatLogin']['Schema']['type'];
|
||||||
interval: number;
|
interval: number;
|
||||||
}, context: Cxt) => Promise<string>;
|
}, context: BackendRuntimeContext<ED>) => Promise<string>;
|
||||||
unbindingWechat: (params: {
|
unbindingWechat: (params: {
|
||||||
wechatUserId: string;
|
wechatUserId: string;
|
||||||
captcha?: string;
|
captcha?: string;
|
||||||
mobile?: string;
|
mobile?: string;
|
||||||
}, context: Cxt) => Promise<void>;
|
}, context: BackendRuntimeContext<ED>) => Promise<void>;
|
||||||
loginByWechat: (params: {
|
loginByWechat: (params: {
|
||||||
wechatLoginId: string;
|
wechatLoginId: string;
|
||||||
env: WebEnv;
|
env: WebEnv;
|
||||||
}, context: Cxt) => Promise<string>;
|
}, context: BackendRuntimeContext<ED>) => Promise<string>;
|
||||||
getInfoByUrl: (params: {
|
getInfoByUrl: (params: {
|
||||||
url: string;
|
url: string;
|
||||||
}) => Promise<{
|
}) => Promise<{
|
||||||
|
|
@ -111,14 +111,14 @@ export type GeneralAspectDict<ED extends EntityDict, Cxt extends BackendRuntimeC
|
||||||
}>;
|
}>;
|
||||||
getChangePasswordChannels: (params: {
|
getChangePasswordChannels: (params: {
|
||||||
userId: string;
|
userId: string;
|
||||||
}, context: Cxt) => Promise<string[]>;
|
}, context: BackendRuntimeContext<ED>) => Promise<string[]>;
|
||||||
updateUserPassword: (params: {
|
updateUserPassword: (params: {
|
||||||
userId: string;
|
userId: string;
|
||||||
prevPassword?: string;
|
prevPassword?: string;
|
||||||
mobile?: string;
|
mobile?: string;
|
||||||
captcha?: string;
|
captcha?: string;
|
||||||
newPassword: string;
|
newPassword: string;
|
||||||
}, context: Cxt) => Promise<{
|
}, context: BackendRuntimeContext<ED>) => Promise<{
|
||||||
result: string;
|
result: string;
|
||||||
times?: number;
|
times?: number;
|
||||||
}>;
|
}>;
|
||||||
|
|
@ -127,125 +127,125 @@ export type GeneralAspectDict<ED extends EntityDict, Cxt extends BackendRuntimeC
|
||||||
type: AppType;
|
type: AppType;
|
||||||
entity?: string;
|
entity?: string;
|
||||||
entityId?: string;
|
entityId?: string;
|
||||||
}, context: Cxt) => Promise<string>;
|
}, context: BackendRuntimeContext<ED>) => Promise<string>;
|
||||||
uploadWechatMedia: (params: any, context: Cxt) => Promise<{
|
uploadWechatMedia: (params: any, context: BackendRuntimeContext<ED>) => Promise<{
|
||||||
mediaId: string;
|
mediaId: string;
|
||||||
}>;
|
}>;
|
||||||
getCurrentMenu: (params: {
|
getCurrentMenu: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
getMenu: (params: {
|
getMenu: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
createMenu: (params: {
|
createMenu: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
menuConfig: any;
|
menuConfig: any;
|
||||||
id: string;
|
id: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
createConditionalMenu: (params: {
|
createConditionalMenu: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
menuConfig: any;
|
menuConfig: any;
|
||||||
id: string;
|
id: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
deleteConditionalMenu: (params: {
|
deleteConditionalMenu: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
menuId: number;
|
menuId: number;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
deleteMenu: (params: {
|
deleteMenu: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
batchGetArticle: (params: {
|
batchGetArticle: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
offset?: number;
|
offset?: number;
|
||||||
count: number;
|
count: number;
|
||||||
noContent?: 0 | 1;
|
noContent?: 0 | 1;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
getArticle: (params: {
|
getArticle: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
articleId: string;
|
articleId: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
batchGetMaterialList: (params: {
|
batchGetMaterialList: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
type: MaterialType;
|
type: MaterialType;
|
||||||
offset?: number;
|
offset?: number;
|
||||||
count: number;
|
count: number;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
getMaterial: (params: {
|
getMaterial: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
mediaId: string;
|
mediaId: string;
|
||||||
isPermanent?: boolean;
|
isPermanent?: boolean;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
deleteMaterial: (params: {
|
deleteMaterial: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
mediaId: string;
|
mediaId: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
createTag: (params: {
|
createTag: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
name: string;
|
name: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
getTags: (params: {
|
getTags: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
editTag: (params: {
|
editTag: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
deleteTag: (params: {
|
deleteTag: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
id: string;
|
id: string;
|
||||||
wechatId: number;
|
wechatId: number;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
syncMessageTemplate: (params: {
|
syncMessageTemplate: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
getMessageType: (params: {}, content: Cxt) => Promise<string[]>;
|
getMessageType: (params: {}, content: BackendRuntimeContext<ED>) => Promise<string[]>;
|
||||||
syncTag: (params: {
|
syncTag: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
id: string;
|
id: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
oneKeySync: (params: {
|
oneKeySync: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
getTagUsers: (params: {
|
getTagUsers: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
tagId: number;
|
tagId: number;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
batchtagging: (params: {
|
batchtagging: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
openIdList: string[];
|
openIdList: string[];
|
||||||
tagId: number;
|
tagId: number;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
batchuntagging: (params: {
|
batchuntagging: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
openIdList: string[];
|
openIdList: string[];
|
||||||
tagId: number;
|
tagId: number;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
getUserTags: (params: {
|
getUserTags: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
openId: string;
|
openId: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
getUsers: (params: {
|
getUsers: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
nextOpenId: string;
|
nextOpenId: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
tagging: (params: {
|
tagging: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
openId: string;
|
openId: string;
|
||||||
tagIdList: number[];
|
tagIdList: number[];
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
syncToLocale: (params: {
|
syncToLocale: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
openId: string;
|
openId: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
syncToWechat: (params: {
|
syncToWechat: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
id: string;
|
id: string;
|
||||||
openId: string;
|
openId: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
syncSmsTemplate: (params: {
|
syncSmsTemplate: (params: {
|
||||||
systemId: string;
|
systemId: string;
|
||||||
origin: string;
|
origin: string;
|
||||||
}, context: Cxt) => Promise<void>;
|
}, context: BackendRuntimeContext<ED>) => Promise<void>;
|
||||||
};
|
};
|
||||||
export default GeneralAspectDict;
|
export default AspectDict;
|
||||||
|
|
|
||||||
|
|
@ -71,4 +71,4 @@ declare const aspectDict: {
|
||||||
syncSmsTemplate: typeof syncSmsTemplate;
|
syncSmsTemplate: typeof syncSmsTemplate;
|
||||||
};
|
};
|
||||||
export default aspectDict;
|
export default aspectDict;
|
||||||
export { GeneralAspectDict as AspectDict } from './AspectDict';
|
export { AspectDict } from './AspectDict';
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
declare const checkers: (import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "address", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "application", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "token", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "user", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "mobile", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "message", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "parasite", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>>)[];
|
declare const checkers: (import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "parasite", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "message", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "mobile", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "user", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "token", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "application", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "address", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>>)[];
|
||||||
export default checkers;
|
export default checkers;
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
|
||||||
type?: ButtonProps['type'] | AmButtonProps['type'];
|
type?: ButtonProps['type'] | AmButtonProps['type'];
|
||||||
executeText?: string | undefined;
|
executeText?: string | undefined;
|
||||||
buttonProps?: (ButtonProps & {
|
buttonProps?: (ButtonProps & {
|
||||||
color?: "default" | "success" | "primary" | "warning" | "danger" | undefined;
|
color?: "default" | "success" | "warning" | "primary" | "danger" | undefined;
|
||||||
fill?: "none" | "solid" | "outline" | undefined;
|
fill?: "none" | "solid" | "outline" | undefined;
|
||||||
size?: "small" | "large" | "middle" | "mini" | undefined;
|
size?: "small" | "large" | "middle" | "mini" | undefined;
|
||||||
block?: boolean | undefined;
|
block?: boolean | undefined;
|
||||||
|
|
|
||||||
|
|
@ -3,19 +3,15 @@ import { FrontendRuntimeContext as Frc, SerializedData as Fsd } from 'oak-fronte
|
||||||
import { BasicFeatures } from 'oak-frontend-base';
|
import { BasicFeatures } from 'oak-frontend-base';
|
||||||
import { EntityDict } from '../oak-app-domain';
|
import { EntityDict } from '../oak-app-domain';
|
||||||
import { RuntimeContext } from './RuntimeContext';
|
import { RuntimeContext } from './RuntimeContext';
|
||||||
import GeneralAspectDict from '../aspects/AspectDict';
|
|
||||||
import { CommonAspectDict } from 'oak-common-aspect';
|
|
||||||
import { SyncRowStore } from 'oak-domain/lib/store/SyncRowStore';
|
import { SyncRowStore } from 'oak-domain/lib/store/SyncRowStore';
|
||||||
import { FeatureDict } from '../features';
|
import { FeatureDict } from '../features';
|
||||||
import { BackendRuntimeContext } from './BackendRuntimeContext';
|
|
||||||
export type AspectDict<ED extends EntityDict & BaseEntityDict> = GeneralAspectDict<ED, BackendRuntimeContext<ED>> & CommonAspectDict<ED, BackendRuntimeContext<ED>>;
|
|
||||||
export interface SerializedData extends Fsd {
|
export interface SerializedData extends Fsd {
|
||||||
a?: string;
|
a?: string;
|
||||||
t?: string;
|
t?: string;
|
||||||
userId?: string;
|
userId?: string;
|
||||||
rm?: boolean;
|
rm?: boolean;
|
||||||
}
|
}
|
||||||
export declare abstract class FrontendRuntimeContext<ED extends EntityDict & BaseEntityDict> extends Frc<ED, BackendRuntimeContext<ED>, GeneralAspectDict<ED, BackendRuntimeContext<ED>>> implements RuntimeContext {
|
export declare abstract class FrontendRuntimeContext<ED extends EntityDict & BaseEntityDict> extends Frc<ED> implements RuntimeContext {
|
||||||
private application;
|
private application;
|
||||||
private token;
|
private token;
|
||||||
constructor(store: SyncRowStore<ED, FrontendRuntimeContext<ED>>, features: FeatureDict<ED> & BasicFeatures<ED>);
|
constructor(store: SyncRowStore<ED, FrontendRuntimeContext<ED>>, features: FeatureDict<ED> & BasicFeatures<ED>);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
export type { FeatureDict as GeneralFeatures } from './features';
|
export type { FeatureDict } from './features';
|
||||||
export type { GeneralAspectDict } from './aspects/AspectDict';
|
export type { AspectDict } from './aspects/AspectDict';
|
||||||
export * from './types/Exception';
|
export * from './types/Exception';
|
||||||
export * from './types/Message';
|
export * from './types/Message';
|
||||||
export * from './types/RuntimeCxt';
|
export * from './types/RuntimeCxt';
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
declare const _default: (import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "account", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "address", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "application", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "article", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "articleMenu", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "extraFile", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "user", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "message", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "notification", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatLogin", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "parasite", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "sessionMessage", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatMenu", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatMpJump", import("..").BRC<import("../oak-app-domain").EntityDict>>)[];
|
declare const _default: (import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatMpJump", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatMenu", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "sessionMessage", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "parasite", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatLogin", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "notification", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "message", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "user", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "extraFile", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "articleMenu", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "article", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "application", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "address", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "account", import("..").BRC<import("../oak-app-domain").EntityDict>>)[];
|
||||||
export default _default;
|
export default _default;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ export declare function createToDo<ED extends EntityDict & BaseEntityDict, T ext
|
||||||
redirectTo: EntityDict['toDo']['OpSchema']['redirectTo'];
|
redirectTo: EntityDict['toDo']['OpSchema']['redirectTo'];
|
||||||
entity: any;
|
entity: any;
|
||||||
entityId: string;
|
entityId: string;
|
||||||
}, userIds?: string[]): Promise<0 | 1>;
|
}, userIds?: string[]): Promise<1 | 0>;
|
||||||
/**
|
/**
|
||||||
* 完成todo例程,当在entity对象上进行action操作时(操作条件是filter),将对应的todo完成
|
* 完成todo例程,当在entity对象上进行action操作时(操作条件是filter),将对应的todo完成
|
||||||
* 必须在entity的action的后trigger中调用
|
* 必须在entity的action的后trigger中调用
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
import { CommonAspectDict } from 'oak-common-aspect';
|
|
||||||
import GeneralAspectDict from '../aspects/AspectDict';
|
|
||||||
import { BackendRuntimeContext } from '../context/BackendRuntimeContext';
|
import { BackendRuntimeContext } from '../context/BackendRuntimeContext';
|
||||||
import { FrontendRuntimeContext } from '../context/FrontendRuntimeContext';
|
import { FrontendRuntimeContext } from '../context/FrontendRuntimeContext';
|
||||||
import { EntityDict } from '../oak-app-domain';
|
import { EntityDict } from '../oak-app-domain';
|
||||||
export type BRC<ED extends EntityDict> = BackendRuntimeContext<ED>;
|
export type BRC<ED extends EntityDict> = BackendRuntimeContext<ED>;
|
||||||
export type AD<ED extends EntityDict> = GeneralAspectDict<ED, BRC<ED>> & CommonAspectDict<ED, BRC<ED>>;
|
|
||||||
export type FRC<ED extends EntityDict> = FrontendRuntimeContext<ED>;
|
export type FRC<ED extends EntityDict> = FrontendRuntimeContext<ED>;
|
||||||
export type RuntimeCxt<ED extends EntityDict> = FRC<ED> | BRC<ED>;
|
export type RuntimeCxt<ED extends EntityDict> = FRC<ED> | BRC<ED>;
|
||||||
|
|
|
||||||
|
|
@ -6,65 +6,65 @@ import { Style } from '../types/Style';
|
||||||
import { MaterialType } from '../types/WeChat';
|
import { MaterialType } from '../types/WeChat';
|
||||||
import { BackendRuntimeContext } from '../context/BackendRuntimeContext';
|
import { BackendRuntimeContext } from '../context/BackendRuntimeContext';
|
||||||
import { WechatPublicEventData, WechatMpEventData } from 'oak-external-sdk';
|
import { WechatPublicEventData, WechatMpEventData } from 'oak-external-sdk';
|
||||||
export type GeneralAspectDict<ED extends EntityDict, Cxt extends BackendRuntimeContext<ED>> = {
|
export type AspectDict<ED extends EntityDict> = {
|
||||||
mergeUser: (params: {
|
mergeUser: (params: {
|
||||||
from: string;
|
from: string;
|
||||||
to: string;
|
to: string;
|
||||||
}, context: Cxt) => Promise<void>;
|
}, context: BackendRuntimeContext<ED>) => Promise<void>;
|
||||||
refreshWechatPublicUserInfo: (params: {}, context: Cxt) => Promise<void>;
|
refreshWechatPublicUserInfo: (params: {}, context: BackendRuntimeContext<ED>) => Promise<void>;
|
||||||
getWechatMpUserPhoneNumber: (params: {
|
getWechatMpUserPhoneNumber: (params: {
|
||||||
code: string;
|
code: string;
|
||||||
env: WechatMpEnv;
|
env: WechatMpEnv;
|
||||||
}, context: Cxt) => Promise<string>;
|
}, context: BackendRuntimeContext<ED>) => Promise<string>;
|
||||||
loginByMobile: (params: {
|
loginByMobile: (params: {
|
||||||
captcha?: string;
|
captcha?: string;
|
||||||
password?: string;
|
password?: string;
|
||||||
mobile: string;
|
mobile: string;
|
||||||
disableRegister?: boolean;
|
disableRegister?: boolean;
|
||||||
env: WebEnv | WechatMpEnv | NativeEnv;
|
env: WebEnv | WechatMpEnv | NativeEnv;
|
||||||
}, context: Cxt) => Promise<string>;
|
}, context: BackendRuntimeContext<ED>) => Promise<string>;
|
||||||
loginWechat: ({ code, env, wechatLoginId, }: {
|
loginWechat: ({ code, env, wechatLoginId, }: {
|
||||||
code: string;
|
code: string;
|
||||||
env: WebEnv;
|
env: WebEnv;
|
||||||
wechatLoginId?: string;
|
wechatLoginId?: string;
|
||||||
}, context: Cxt) => Promise<string>;
|
}, context: BackendRuntimeContext<ED>) => Promise<string>;
|
||||||
logout: (params: {
|
logout: (params: {
|
||||||
tokenValue: string;
|
tokenValue: string;
|
||||||
}, context: Cxt) => Promise<void>;
|
}, context: BackendRuntimeContext<ED>) => Promise<void>;
|
||||||
loginWechatMp: ({ code, env, }: {
|
loginWechatMp: ({ code, env, }: {
|
||||||
code: string;
|
code: string;
|
||||||
env: WechatMpEnv;
|
env: WechatMpEnv;
|
||||||
}, context: Cxt) => Promise<string>;
|
}, context: BackendRuntimeContext<ED>) => Promise<string>;
|
||||||
syncUserInfoWechatMp: ({ nickname, avatarUrl, encryptedData, iv, signature, }: {
|
syncUserInfoWechatMp: ({ nickname, avatarUrl, encryptedData, iv, signature, }: {
|
||||||
nickname: string;
|
nickname: string;
|
||||||
avatarUrl: string;
|
avatarUrl: string;
|
||||||
encryptedData: string;
|
encryptedData: string;
|
||||||
iv: string;
|
iv: string;
|
||||||
signature: string;
|
signature: string;
|
||||||
}, context: Cxt) => Promise<void>;
|
}, context: BackendRuntimeContext<ED>) => Promise<void>;
|
||||||
wakeupParasite: (params: {
|
wakeupParasite: (params: {
|
||||||
id: string;
|
id: string;
|
||||||
env: WebEnv | WechatMpEnv;
|
env: WebEnv | WechatMpEnv;
|
||||||
}, context: Cxt) => Promise<string>;
|
}, context: BackendRuntimeContext<ED>) => Promise<string>;
|
||||||
refreshToken: (params: {
|
refreshToken: (params: {
|
||||||
tokenValue: string;
|
tokenValue: string;
|
||||||
env: WebEnv | WechatMpEnv | NativeEnv;
|
env: WebEnv | WechatMpEnv | NativeEnv;
|
||||||
}, context: Cxt) => Promise<string>;
|
}, context: BackendRuntimeContext<ED>) => Promise<string>;
|
||||||
sendCaptcha: (params: {
|
sendCaptcha: (params: {
|
||||||
mobile: string;
|
mobile: string;
|
||||||
env: WechatMpEnv | WebEnv;
|
env: WechatMpEnv | WebEnv;
|
||||||
type: 'login' | 'changePassword' | 'confirm';
|
type: 'login' | 'changePassword' | 'confirm';
|
||||||
}, context: Cxt) => Promise<string>;
|
}, context: BackendRuntimeContext<ED>) => Promise<string>;
|
||||||
getApplication: (params: {
|
getApplication: (params: {
|
||||||
type: AppType;
|
type: AppType;
|
||||||
domain: string;
|
domain: string;
|
||||||
data: ED['application']['Selection']['data'];
|
data: ED['application']['Selection']['data'];
|
||||||
appId?: string;
|
appId?: string;
|
||||||
}, context: Cxt) => Promise<string>;
|
}, context: BackendRuntimeContext<ED>) => Promise<string>;
|
||||||
signatureJsSDK: (params: {
|
signatureJsSDK: (params: {
|
||||||
url: string;
|
url: string;
|
||||||
env: WebEnv;
|
env: WebEnv;
|
||||||
}, context: Cxt) => Promise<{
|
}, context: BackendRuntimeContext<ED>) => Promise<{
|
||||||
signature: any;
|
signature: any;
|
||||||
noncestr: string;
|
noncestr: string;
|
||||||
timestamp: number;
|
timestamp: number;
|
||||||
|
|
@ -74,34 +74,34 @@ export type GeneralAspectDict<ED extends EntityDict, Cxt extends BackendRuntimeC
|
||||||
entity: 'platform' | 'system';
|
entity: 'platform' | 'system';
|
||||||
entityId: string;
|
entityId: string;
|
||||||
config: Config;
|
config: Config;
|
||||||
}, context: Cxt) => Promise<void>;
|
}, context: BackendRuntimeContext<ED>) => Promise<void>;
|
||||||
updateStyle: (params: {
|
updateStyle: (params: {
|
||||||
entity: 'platform' | 'system' | 'application';
|
entity: 'platform' | 'system' | 'application';
|
||||||
entityId: string;
|
entityId: string;
|
||||||
style: Style;
|
style: Style;
|
||||||
}, context: Cxt) => Promise<void>;
|
}, context: BackendRuntimeContext<ED>) => Promise<void>;
|
||||||
updateApplicationConfig: (params: {
|
updateApplicationConfig: (params: {
|
||||||
entity: 'application';
|
entity: 'application';
|
||||||
entityId: string;
|
entityId: string;
|
||||||
config: EntityDict['application']['Schema']['config'];
|
config: EntityDict['application']['Schema']['config'];
|
||||||
}, context: Cxt) => Promise<void>;
|
}, context: BackendRuntimeContext<ED>) => Promise<void>;
|
||||||
switchTo: (params: {
|
switchTo: (params: {
|
||||||
userId: string;
|
userId: string;
|
||||||
}, context: Cxt) => Promise<void>;
|
}, context: BackendRuntimeContext<ED>) => Promise<void>;
|
||||||
getMpUnlimitWxaCode: (wechatQrCodeId: string, context: Cxt) => Promise<string>;
|
getMpUnlimitWxaCode: (wechatQrCodeId: string, context: BackendRuntimeContext<ED>) => Promise<string>;
|
||||||
createWechatLogin: (params: {
|
createWechatLogin: (params: {
|
||||||
type: EntityDict['wechatLogin']['Schema']['type'];
|
type: EntityDict['wechatLogin']['Schema']['type'];
|
||||||
interval: number;
|
interval: number;
|
||||||
}, context: Cxt) => Promise<string>;
|
}, context: BackendRuntimeContext<ED>) => Promise<string>;
|
||||||
unbindingWechat: (params: {
|
unbindingWechat: (params: {
|
||||||
wechatUserId: string;
|
wechatUserId: string;
|
||||||
captcha?: string;
|
captcha?: string;
|
||||||
mobile?: string;
|
mobile?: string;
|
||||||
}, context: Cxt) => Promise<void>;
|
}, context: BackendRuntimeContext<ED>) => Promise<void>;
|
||||||
loginByWechat: (params: {
|
loginByWechat: (params: {
|
||||||
wechatLoginId: string;
|
wechatLoginId: string;
|
||||||
env: WebEnv;
|
env: WebEnv;
|
||||||
}, context: Cxt) => Promise<string>;
|
}, context: BackendRuntimeContext<ED>) => Promise<string>;
|
||||||
getInfoByUrl: (params: {
|
getInfoByUrl: (params: {
|
||||||
url: string;
|
url: string;
|
||||||
}) => Promise<{
|
}) => Promise<{
|
||||||
|
|
@ -111,14 +111,14 @@ export type GeneralAspectDict<ED extends EntityDict, Cxt extends BackendRuntimeC
|
||||||
}>;
|
}>;
|
||||||
getChangePasswordChannels: (params: {
|
getChangePasswordChannels: (params: {
|
||||||
userId: string;
|
userId: string;
|
||||||
}, context: Cxt) => Promise<string[]>;
|
}, context: BackendRuntimeContext<ED>) => Promise<string[]>;
|
||||||
updateUserPassword: (params: {
|
updateUserPassword: (params: {
|
||||||
userId: string;
|
userId: string;
|
||||||
prevPassword?: string;
|
prevPassword?: string;
|
||||||
mobile?: string;
|
mobile?: string;
|
||||||
captcha?: string;
|
captcha?: string;
|
||||||
newPassword: string;
|
newPassword: string;
|
||||||
}, context: Cxt) => Promise<{
|
}, context: BackendRuntimeContext<ED>) => Promise<{
|
||||||
result: string;
|
result: string;
|
||||||
times?: number;
|
times?: number;
|
||||||
}>;
|
}>;
|
||||||
|
|
@ -127,125 +127,125 @@ export type GeneralAspectDict<ED extends EntityDict, Cxt extends BackendRuntimeC
|
||||||
type: AppType;
|
type: AppType;
|
||||||
entity?: string;
|
entity?: string;
|
||||||
entityId?: string;
|
entityId?: string;
|
||||||
}, context: Cxt) => Promise<string>;
|
}, context: BackendRuntimeContext<ED>) => Promise<string>;
|
||||||
uploadWechatMedia: (params: any, context: Cxt) => Promise<{
|
uploadWechatMedia: (params: any, context: BackendRuntimeContext<ED>) => Promise<{
|
||||||
mediaId: string;
|
mediaId: string;
|
||||||
}>;
|
}>;
|
||||||
getCurrentMenu: (params: {
|
getCurrentMenu: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
getMenu: (params: {
|
getMenu: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
createMenu: (params: {
|
createMenu: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
menuConfig: any;
|
menuConfig: any;
|
||||||
id: string;
|
id: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
createConditionalMenu: (params: {
|
createConditionalMenu: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
menuConfig: any;
|
menuConfig: any;
|
||||||
id: string;
|
id: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
deleteConditionalMenu: (params: {
|
deleteConditionalMenu: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
menuId: number;
|
menuId: number;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
deleteMenu: (params: {
|
deleteMenu: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
batchGetArticle: (params: {
|
batchGetArticle: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
offset?: number;
|
offset?: number;
|
||||||
count: number;
|
count: number;
|
||||||
noContent?: 0 | 1;
|
noContent?: 0 | 1;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
getArticle: (params: {
|
getArticle: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
articleId: string;
|
articleId: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
batchGetMaterialList: (params: {
|
batchGetMaterialList: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
type: MaterialType;
|
type: MaterialType;
|
||||||
offset?: number;
|
offset?: number;
|
||||||
count: number;
|
count: number;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
getMaterial: (params: {
|
getMaterial: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
mediaId: string;
|
mediaId: string;
|
||||||
isPermanent?: boolean;
|
isPermanent?: boolean;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
deleteMaterial: (params: {
|
deleteMaterial: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
mediaId: string;
|
mediaId: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
createTag: (params: {
|
createTag: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
name: string;
|
name: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
getTags: (params: {
|
getTags: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
editTag: (params: {
|
editTag: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
deleteTag: (params: {
|
deleteTag: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
id: string;
|
id: string;
|
||||||
wechatId: number;
|
wechatId: number;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
syncMessageTemplate: (params: {
|
syncMessageTemplate: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
getMessageType: (params: {}, content: Cxt) => Promise<string[]>;
|
getMessageType: (params: {}, content: BackendRuntimeContext<ED>) => Promise<string[]>;
|
||||||
syncTag: (params: {
|
syncTag: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
id: string;
|
id: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
oneKeySync: (params: {
|
oneKeySync: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
getTagUsers: (params: {
|
getTagUsers: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
tagId: number;
|
tagId: number;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
batchtagging: (params: {
|
batchtagging: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
openIdList: string[];
|
openIdList: string[];
|
||||||
tagId: number;
|
tagId: number;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
batchuntagging: (params: {
|
batchuntagging: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
openIdList: string[];
|
openIdList: string[];
|
||||||
tagId: number;
|
tagId: number;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
getUserTags: (params: {
|
getUserTags: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
openId: string;
|
openId: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
getUsers: (params: {
|
getUsers: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
nextOpenId: string;
|
nextOpenId: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
tagging: (params: {
|
tagging: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
openId: string;
|
openId: string;
|
||||||
tagIdList: number[];
|
tagIdList: number[];
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
syncToLocale: (params: {
|
syncToLocale: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
openId: string;
|
openId: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
syncToWechat: (params: {
|
syncToWechat: (params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
id: string;
|
id: string;
|
||||||
openId: string;
|
openId: string;
|
||||||
}, context: Cxt) => Promise<any>;
|
}, context: BackendRuntimeContext<ED>) => Promise<any>;
|
||||||
syncSmsTemplate: (params: {
|
syncSmsTemplate: (params: {
|
||||||
systemId: string;
|
systemId: string;
|
||||||
origin: string;
|
origin: string;
|
||||||
}, context: Cxt) => Promise<void>;
|
}, context: BackendRuntimeContext<ED>) => Promise<void>;
|
||||||
};
|
};
|
||||||
export default GeneralAspectDict;
|
export default AspectDict;
|
||||||
|
|
|
||||||
|
|
@ -71,4 +71,4 @@ declare const aspectDict: {
|
||||||
syncSmsTemplate: typeof syncSmsTemplate;
|
syncSmsTemplate: typeof syncSmsTemplate;
|
||||||
};
|
};
|
||||||
export default aspectDict;
|
export default aspectDict;
|
||||||
export { GeneralAspectDict as AspectDict } from './AspectDict';
|
export { AspectDict } from './AspectDict';
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
declare const checkers: (import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "address", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "application", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "token", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "user", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "mobile", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "message", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "parasite", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>>)[];
|
declare const checkers: (import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "parasite", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "message", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "mobile", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "user", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "token", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "application", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "address", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>>)[];
|
||||||
export default checkers;
|
export default checkers;
|
||||||
|
|
|
||||||
|
|
@ -3,19 +3,15 @@ import { FrontendRuntimeContext as Frc, SerializedData as Fsd } from 'oak-fronte
|
||||||
import { BasicFeatures } from 'oak-frontend-base';
|
import { BasicFeatures } from 'oak-frontend-base';
|
||||||
import { EntityDict } from '../oak-app-domain';
|
import { EntityDict } from '../oak-app-domain';
|
||||||
import { RuntimeContext } from './RuntimeContext';
|
import { RuntimeContext } from './RuntimeContext';
|
||||||
import GeneralAspectDict from '../aspects/AspectDict';
|
|
||||||
import { CommonAspectDict } from 'oak-common-aspect';
|
|
||||||
import { SyncRowStore } from 'oak-domain/lib/store/SyncRowStore';
|
import { SyncRowStore } from 'oak-domain/lib/store/SyncRowStore';
|
||||||
import { FeatureDict } from '../features';
|
import { FeatureDict } from '../features';
|
||||||
import { BackendRuntimeContext } from './BackendRuntimeContext';
|
|
||||||
export type AspectDict<ED extends EntityDict & BaseEntityDict> = GeneralAspectDict<ED, BackendRuntimeContext<ED>> & CommonAspectDict<ED, BackendRuntimeContext<ED>>;
|
|
||||||
export interface SerializedData extends Fsd {
|
export interface SerializedData extends Fsd {
|
||||||
a?: string;
|
a?: string;
|
||||||
t?: string;
|
t?: string;
|
||||||
userId?: string;
|
userId?: string;
|
||||||
rm?: boolean;
|
rm?: boolean;
|
||||||
}
|
}
|
||||||
export declare abstract class FrontendRuntimeContext<ED extends EntityDict & BaseEntityDict> extends Frc<ED, BackendRuntimeContext<ED>, GeneralAspectDict<ED, BackendRuntimeContext<ED>>> implements RuntimeContext {
|
export declare abstract class FrontendRuntimeContext<ED extends EntityDict & BaseEntityDict> extends Frc<ED> implements RuntimeContext {
|
||||||
private application;
|
private application;
|
||||||
private token;
|
private token;
|
||||||
constructor(store: SyncRowStore<ED, FrontendRuntimeContext<ED>>, features: FeatureDict<ED> & BasicFeatures<ED>);
|
constructor(store: SyncRowStore<ED, FrontendRuntimeContext<ED>>, features: FeatureDict<ED> & BasicFeatures<ED>);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
export type { FeatureDict as GeneralFeatures } from './features';
|
export type { FeatureDict } from './features';
|
||||||
export type { GeneralAspectDict } from './aspects/AspectDict';
|
export type { AspectDict } from './aspects/AspectDict';
|
||||||
export * from './types/Exception';
|
export * from './types/Exception';
|
||||||
export * from './types/Message';
|
export * from './types/Message';
|
||||||
export * from './types/RuntimeCxt';
|
export * from './types/RuntimeCxt';
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
declare const _default: (import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "account", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "address", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "application", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "article", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "articleMenu", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "extraFile", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "user", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "message", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "notification", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatLogin", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "parasite", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "sessionMessage", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatMenu", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatMpJump", import("..").BRC<import("../oak-app-domain").EntityDict>>)[];
|
declare const _default: (import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatMpJump", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatMenu", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "sessionMessage", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "parasite", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatLogin", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "notification", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "message", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "user", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "extraFile", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "articleMenu", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "article", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "application", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "address", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "account", import("..").BRC<import("../oak-app-domain").EntityDict>>)[];
|
||||||
export default _default;
|
export default _default;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ export declare function createToDo<ED extends EntityDict & BaseEntityDict, T ext
|
||||||
redirectTo: EntityDict['toDo']['OpSchema']['redirectTo'];
|
redirectTo: EntityDict['toDo']['OpSchema']['redirectTo'];
|
||||||
entity: any;
|
entity: any;
|
||||||
entityId: string;
|
entityId: string;
|
||||||
}, userIds?: string[]): Promise<0 | 1>;
|
}, userIds?: string[]): Promise<1 | 0>;
|
||||||
/**
|
/**
|
||||||
* 完成todo例程,当在entity对象上进行action操作时(操作条件是filter),将对应的todo完成
|
* 完成todo例程,当在entity对象上进行action操作时(操作条件是filter),将对应的todo完成
|
||||||
* 必须在entity的action的后trigger中调用
|
* 必须在entity的action的后trigger中调用
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
import { CommonAspectDict } from 'oak-common-aspect';
|
|
||||||
import GeneralAspectDict from '../aspects/AspectDict';
|
|
||||||
import { BackendRuntimeContext } from '../context/BackendRuntimeContext';
|
import { BackendRuntimeContext } from '../context/BackendRuntimeContext';
|
||||||
import { FrontendRuntimeContext } from '../context/FrontendRuntimeContext';
|
import { FrontendRuntimeContext } from '../context/FrontendRuntimeContext';
|
||||||
import { EntityDict } from '../oak-app-domain';
|
import { EntityDict } from '../oak-app-domain';
|
||||||
export type BRC<ED extends EntityDict> = BackendRuntimeContext<ED>;
|
export type BRC<ED extends EntityDict> = BackendRuntimeContext<ED>;
|
||||||
export type AD<ED extends EntityDict> = GeneralAspectDict<ED, BRC<ED>> & CommonAspectDict<ED, BRC<ED>>;
|
|
||||||
export type FRC<ED extends EntityDict> = FrontendRuntimeContext<ED>;
|
export type FRC<ED extends EntityDict> = FrontendRuntimeContext<ED>;
|
||||||
export type RuntimeCxt<ED extends EntityDict> = FRC<ED> | BRC<ED>;
|
export type RuntimeCxt<ED extends EntityDict> = FRC<ED> | BRC<ED>;
|
||||||
|
|
|
||||||
|
|
@ -7,18 +7,17 @@ import { MediaType, MaterialType } from '../types/WeChat';
|
||||||
import { BackendRuntimeContext } from '../context/BackendRuntimeContext';
|
import { BackendRuntimeContext } from '../context/BackendRuntimeContext';
|
||||||
import { WechatPublicEventData, WechatMpEventData } from 'oak-external-sdk';
|
import { WechatPublicEventData, WechatMpEventData } from 'oak-external-sdk';
|
||||||
|
|
||||||
export type GeneralAspectDict<
|
export type AspectDict<
|
||||||
ED extends EntityDict,
|
ED extends EntityDict
|
||||||
Cxt extends BackendRuntimeContext<ED>
|
|
||||||
> = {
|
> = {
|
||||||
mergeUser: (
|
mergeUser: (
|
||||||
params: { from: string; to: string },
|
params: { from: string; to: string },
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
refreshWechatPublicUserInfo: (params: {}, context: Cxt) => Promise<void>;
|
refreshWechatPublicUserInfo: (params: {}, context: BackendRuntimeContext<ED>) => Promise<void>;
|
||||||
getWechatMpUserPhoneNumber: (
|
getWechatMpUserPhoneNumber: (
|
||||||
params: { code: string; env: WechatMpEnv },
|
params: { code: string; env: WechatMpEnv },
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<string>;
|
) => Promise<string>;
|
||||||
loginByMobile: (
|
loginByMobile: (
|
||||||
params: {
|
params: {
|
||||||
|
|
@ -28,7 +27,7 @@ export type GeneralAspectDict<
|
||||||
disableRegister?: boolean;
|
disableRegister?: boolean;
|
||||||
env: WebEnv | WechatMpEnv | NativeEnv;
|
env: WebEnv | WechatMpEnv | NativeEnv;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<string>;
|
) => Promise<string>;
|
||||||
loginWechat: (
|
loginWechat: (
|
||||||
{
|
{
|
||||||
|
|
@ -40,9 +39,9 @@ export type GeneralAspectDict<
|
||||||
env: WebEnv;
|
env: WebEnv;
|
||||||
wechatLoginId?: string;
|
wechatLoginId?: string;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<string>;
|
) => Promise<string>;
|
||||||
logout: (params: { tokenValue: string }, context: Cxt) => Promise<void>;
|
logout: (params: { tokenValue: string }, context: BackendRuntimeContext<ED>) => Promise<void>;
|
||||||
loginWechatMp: (
|
loginWechatMp: (
|
||||||
{
|
{
|
||||||
code,
|
code,
|
||||||
|
|
@ -51,7 +50,7 @@ export type GeneralAspectDict<
|
||||||
code: string;
|
code: string;
|
||||||
env: WechatMpEnv;
|
env: WechatMpEnv;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<string>;
|
) => Promise<string>;
|
||||||
syncUserInfoWechatMp: (
|
syncUserInfoWechatMp: (
|
||||||
{
|
{
|
||||||
|
|
@ -67,21 +66,21 @@ export type GeneralAspectDict<
|
||||||
iv: string;
|
iv: string;
|
||||||
signature: string;
|
signature: string;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
wakeupParasite: (
|
wakeupParasite: (
|
||||||
params: {
|
params: {
|
||||||
id: string;
|
id: string;
|
||||||
env: WebEnv | WechatMpEnv;
|
env: WebEnv | WechatMpEnv;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<string>;
|
) => Promise<string>;
|
||||||
refreshToken: (
|
refreshToken: (
|
||||||
params: {
|
params: {
|
||||||
tokenValue: string;
|
tokenValue: string;
|
||||||
env: WebEnv | WechatMpEnv | NativeEnv;
|
env: WebEnv | WechatMpEnv | NativeEnv;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<string>;
|
) => Promise<string>;
|
||||||
sendCaptcha: (
|
sendCaptcha: (
|
||||||
params: {
|
params: {
|
||||||
|
|
@ -89,7 +88,7 @@ export type GeneralAspectDict<
|
||||||
env: WechatMpEnv | WebEnv;
|
env: WechatMpEnv | WebEnv;
|
||||||
type: 'login' | 'changePassword' | 'confirm';
|
type: 'login' | 'changePassword' | 'confirm';
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<string>;
|
) => Promise<string>;
|
||||||
getApplication: (
|
getApplication: (
|
||||||
params: {
|
params: {
|
||||||
|
|
@ -98,14 +97,14 @@ export type GeneralAspectDict<
|
||||||
data: ED['application']['Selection']['data'],
|
data: ED['application']['Selection']['data'],
|
||||||
appId?: string;
|
appId?: string;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<string>;
|
) => Promise<string>;
|
||||||
signatureJsSDK: (
|
signatureJsSDK: (
|
||||||
params: {
|
params: {
|
||||||
url: string;
|
url: string;
|
||||||
env: WebEnv;
|
env: WebEnv;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<{
|
) => Promise<{
|
||||||
signature: any;
|
signature: any;
|
||||||
noncestr: string;
|
noncestr: string;
|
||||||
|
|
@ -118,7 +117,7 @@ export type GeneralAspectDict<
|
||||||
entityId: string;
|
entityId: string;
|
||||||
config: Config;
|
config: Config;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
updateStyle: (
|
updateStyle: (
|
||||||
params: {
|
params: {
|
||||||
|
|
@ -126,7 +125,7 @@ export type GeneralAspectDict<
|
||||||
entityId: string;
|
entityId: string;
|
||||||
style: Style;
|
style: Style;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
updateApplicationConfig: (
|
updateApplicationConfig: (
|
||||||
params: {
|
params: {
|
||||||
|
|
@ -134,24 +133,24 @@ export type GeneralAspectDict<
|
||||||
entityId: string;
|
entityId: string;
|
||||||
config: EntityDict['application']['Schema']['config'];
|
config: EntityDict['application']['Schema']['config'];
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
switchTo: (
|
switchTo: (
|
||||||
params: {
|
params: {
|
||||||
userId: string;
|
userId: string;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
getMpUnlimitWxaCode: (
|
getMpUnlimitWxaCode: (
|
||||||
wechatQrCodeId: string,
|
wechatQrCodeId: string,
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<string>;
|
) => Promise<string>;
|
||||||
createWechatLogin: (
|
createWechatLogin: (
|
||||||
params: {
|
params: {
|
||||||
type: EntityDict['wechatLogin']['Schema']['type'];
|
type: EntityDict['wechatLogin']['Schema']['type'];
|
||||||
interval: number;
|
interval: number;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<string>;
|
) => Promise<string>;
|
||||||
unbindingWechat: (
|
unbindingWechat: (
|
||||||
params: {
|
params: {
|
||||||
|
|
@ -159,14 +158,14 @@ export type GeneralAspectDict<
|
||||||
captcha?: string;
|
captcha?: string;
|
||||||
mobile?: string;
|
mobile?: string;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
loginByWechat: (
|
loginByWechat: (
|
||||||
params: {
|
params: {
|
||||||
wechatLoginId: string;
|
wechatLoginId: string;
|
||||||
env: WebEnv;
|
env: WebEnv;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<string>;
|
) => Promise<string>;
|
||||||
getInfoByUrl: (params: { url: string }) => Promise<{
|
getInfoByUrl: (params: { url: string }) => Promise<{
|
||||||
title: string;
|
title: string;
|
||||||
|
|
@ -175,7 +174,7 @@ export type GeneralAspectDict<
|
||||||
}>;
|
}>;
|
||||||
getChangePasswordChannels: (
|
getChangePasswordChannels: (
|
||||||
params: { userId: string },
|
params: { userId: string },
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<string[]>;
|
) => Promise<string[]>;
|
||||||
updateUserPassword: (
|
updateUserPassword: (
|
||||||
params: {
|
params: {
|
||||||
|
|
@ -185,7 +184,7 @@ export type GeneralAspectDict<
|
||||||
captcha?: string;
|
captcha?: string;
|
||||||
newPassword: string;
|
newPassword: string;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<{ result: string; times?: number }>;
|
) => Promise<{ result: string; times?: number }>;
|
||||||
createSession: (
|
createSession: (
|
||||||
params: {
|
params: {
|
||||||
|
|
@ -194,23 +193,23 @@ export type GeneralAspectDict<
|
||||||
entity?: string;
|
entity?: string;
|
||||||
entityId?: string;
|
entityId?: string;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<string>;
|
) => Promise<string>;
|
||||||
uploadWechatMedia: (
|
uploadWechatMedia: (
|
||||||
params: any,
|
params: any,
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<{ mediaId: string }>;
|
) => Promise<{ mediaId: string }>;
|
||||||
getCurrentMenu: (
|
getCurrentMenu: (
|
||||||
params: {
|
params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
getMenu: (
|
getMenu: (
|
||||||
params: {
|
params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
createMenu: (
|
createMenu: (
|
||||||
params: {
|
params: {
|
||||||
|
|
@ -218,7 +217,7 @@ export type GeneralAspectDict<
|
||||||
menuConfig: any;
|
menuConfig: any;
|
||||||
id: string;
|
id: string;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
createConditionalMenu: (
|
createConditionalMenu: (
|
||||||
params: {
|
params: {
|
||||||
|
|
@ -226,20 +225,20 @@ export type GeneralAspectDict<
|
||||||
menuConfig: any;
|
menuConfig: any;
|
||||||
id: string;
|
id: string;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
deleteConditionalMenu: (
|
deleteConditionalMenu: (
|
||||||
params: {
|
params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
menuId: number;
|
menuId: number;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
deleteMenu: (
|
deleteMenu: (
|
||||||
params: {
|
params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
batchGetArticle: (
|
batchGetArticle: (
|
||||||
params: {
|
params: {
|
||||||
|
|
@ -248,14 +247,14 @@ export type GeneralAspectDict<
|
||||||
count: number;
|
count: number;
|
||||||
noContent?: 0 | 1;
|
noContent?: 0 | 1;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
getArticle: (
|
getArticle: (
|
||||||
params: {
|
params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
articleId: string;
|
articleId: string;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
batchGetMaterialList: (
|
batchGetMaterialList: (
|
||||||
params: {
|
params: {
|
||||||
|
|
@ -264,7 +263,7 @@ export type GeneralAspectDict<
|
||||||
offset?: number;
|
offset?: number;
|
||||||
count: number;
|
count: number;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
getMaterial: (
|
getMaterial: (
|
||||||
params: {
|
params: {
|
||||||
|
|
@ -272,27 +271,27 @@ export type GeneralAspectDict<
|
||||||
mediaId: string;
|
mediaId: string;
|
||||||
isPermanent?: boolean; // 获取临时素材或永久素材 默认获取临时
|
isPermanent?: boolean; // 获取临时素材或永久素材 默认获取临时
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
deleteMaterial: (
|
deleteMaterial: (
|
||||||
params: {
|
params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
mediaId: string;
|
mediaId: string;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
createTag: (
|
createTag: (
|
||||||
params: {
|
params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
name: string;
|
name: string;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
getTags: (
|
getTags: (
|
||||||
params: {
|
params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
editTag: (
|
editTag: (
|
||||||
params: {
|
params: {
|
||||||
|
|
@ -300,7 +299,7 @@ export type GeneralAspectDict<
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
deleteTag: (
|
deleteTag: (
|
||||||
params: {
|
params: {
|
||||||
|
|
@ -308,34 +307,34 @@ export type GeneralAspectDict<
|
||||||
id: string;
|
id: string;
|
||||||
wechatId: number;
|
wechatId: number;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
syncMessageTemplate: (
|
syncMessageTemplate: (
|
||||||
params: {
|
params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
getMessageType: (params: {}, content: Cxt) => Promise<string[]>;
|
getMessageType: (params: {}, content: BackendRuntimeContext<ED>) => Promise<string[]>;
|
||||||
syncTag: (
|
syncTag: (
|
||||||
params: {
|
params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
id: string;
|
id: string;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
oneKeySync: (
|
oneKeySync: (
|
||||||
params: {
|
params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
getTagUsers: (
|
getTagUsers: (
|
||||||
params: {
|
params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
tagId: number;
|
tagId: number;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
batchtagging: (
|
batchtagging: (
|
||||||
params: {
|
params: {
|
||||||
|
|
@ -343,7 +342,7 @@ export type GeneralAspectDict<
|
||||||
openIdList: string[];
|
openIdList: string[];
|
||||||
tagId: number;
|
tagId: number;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
batchuntagging: (
|
batchuntagging: (
|
||||||
params: {
|
params: {
|
||||||
|
|
@ -351,21 +350,21 @@ export type GeneralAspectDict<
|
||||||
openIdList: string[];
|
openIdList: string[];
|
||||||
tagId: number;
|
tagId: number;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
getUserTags: (
|
getUserTags: (
|
||||||
params: {
|
params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
openId: string;
|
openId: string;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
getUsers: (
|
getUsers: (
|
||||||
params: {
|
params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
nextOpenId: string;
|
nextOpenId: string;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
tagging: (
|
tagging: (
|
||||||
params: {
|
params: {
|
||||||
|
|
@ -373,14 +372,14 @@ export type GeneralAspectDict<
|
||||||
openId: string;
|
openId: string;
|
||||||
tagIdList: number[];
|
tagIdList: number[];
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
syncToLocale: (
|
syncToLocale: (
|
||||||
params: {
|
params: {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
openId: string;
|
openId: string;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
syncToWechat: (
|
syncToWechat: (
|
||||||
params: {
|
params: {
|
||||||
|
|
@ -388,15 +387,15 @@ export type GeneralAspectDict<
|
||||||
id: string;
|
id: string;
|
||||||
openId: string;
|
openId: string;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<any>;
|
) => Promise<any>;
|
||||||
syncSmsTemplate: (
|
syncSmsTemplate: (
|
||||||
params: {
|
params: {
|
||||||
systemId: string;
|
systemId: string;
|
||||||
origin: string;
|
origin: string;
|
||||||
},
|
},
|
||||||
context: Cxt
|
context: BackendRuntimeContext<ED>
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default GeneralAspectDict;
|
export default AspectDict;
|
||||||
|
|
|
||||||
|
|
@ -120,4 +120,4 @@ const aspectDict = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export default aspectDict;
|
export default aspectDict;
|
||||||
export { GeneralAspectDict as AspectDict } from './AspectDict';
|
export { AspectDict } from './AspectDict';
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import { RuntimeContext } from './RuntimeContext';
|
||||||
import { Application } from '../features/application';
|
import { Application } from '../features/application';
|
||||||
import { Token } from '../features/token';
|
import { Token } from '../features/token';
|
||||||
import GeneralAspectDict from '../aspects/AspectDict';
|
import GeneralAspectDict from '../aspects/AspectDict';
|
||||||
import { CommonAspectDict } from 'oak-common-aspect';
|
|
||||||
import { SyncRowStore } from 'oak-domain/lib/store/SyncRowStore';
|
import { SyncRowStore } from 'oak-domain/lib/store/SyncRowStore';
|
||||||
import { FeatureDict } from '../features';
|
import { FeatureDict } from '../features';
|
||||||
import { BackendRuntimeContext } from './BackendRuntimeContext';
|
import { BackendRuntimeContext } from './BackendRuntimeContext';
|
||||||
|
|
@ -20,7 +19,6 @@ import {
|
||||||
} from '../types/Exception';
|
} from '../types/Exception';
|
||||||
import { OakUnloggedInException } from 'oak-domain/lib/types';
|
import { OakUnloggedInException } from 'oak-domain/lib/types';
|
||||||
|
|
||||||
export type AspectDict<ED extends EntityDict & BaseEntityDict> = GeneralAspectDict<ED, BackendRuntimeContext<ED>> & CommonAspectDict<ED, BackendRuntimeContext<ED>>;
|
|
||||||
// 上下文被serialize后的数据内容
|
// 上下文被serialize后的数据内容
|
||||||
export interface SerializedData extends Fsd {
|
export interface SerializedData extends Fsd {
|
||||||
a?: string;
|
a?: string;
|
||||||
|
|
@ -30,7 +28,7 @@ export interface SerializedData extends Fsd {
|
||||||
};
|
};
|
||||||
|
|
||||||
export abstract class FrontendRuntimeContext<ED extends EntityDict & BaseEntityDict>
|
export abstract class FrontendRuntimeContext<ED extends EntityDict & BaseEntityDict>
|
||||||
extends Frc<ED, BackendRuntimeContext<ED>, GeneralAspectDict<ED, BackendRuntimeContext<ED>>>
|
extends Frc<ED>
|
||||||
implements RuntimeContext {
|
implements RuntimeContext {
|
||||||
private application: Application<ED>;
|
private application: Application<ED>;
|
||||||
private token: Token<ED>;
|
private token: Token<ED>;
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ import { MediaType, MediaVideoDescription } from '../types/WeChat';
|
||||||
import {
|
import {
|
||||||
OakApplicationLoadingException,
|
OakApplicationLoadingException,
|
||||||
} from '../types/Exception';
|
} from '../types/Exception';
|
||||||
import { FRC, BRC, AD } from '../types/RuntimeCxt';
|
|
||||||
|
|
||||||
export class Application<ED extends EntityDict> extends Feature {
|
export class Application<ED extends EntityDict> extends Feature {
|
||||||
private applicationId?: string;
|
private applicationId?: string;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ import { EntityDict } from '../oak-app-domain';
|
||||||
import { Cache } from 'oak-frontend-base/es/features/cache';
|
import { Cache } from 'oak-frontend-base/es/features/cache';
|
||||||
import { Config as ConfigDef } from '../types/Config';
|
import { Config as ConfigDef } from '../types/Config';
|
||||||
import { Style as StyleDef } from '../types/Style';
|
import { Style as StyleDef } from '../types/Style';
|
||||||
import { FRC, BRC, AD } from '../types/RuntimeCxt';
|
|
||||||
|
|
||||||
export class Config<ED extends EntityDict> extends Feature {
|
export class Config<ED extends EntityDict> extends Feature {
|
||||||
private cache: Cache<ED>;
|
private cache: Cache<ED>;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import { Feature } from 'oak-frontend-base/es/types/Feature';
|
import { Feature } from 'oak-frontend-base/es/types/Feature';
|
||||||
import { Upload } from 'oak-frontend-base/es/utils/upload';
|
import { Upload } from 'oak-frontend-base/es/utils/upload';
|
||||||
import { Cache } from 'oak-frontend-base/es/features/cache';
|
import { Cache } from 'oak-frontend-base/es/features/cache';
|
||||||
import { CommonAspectDict } from 'oak-common-aspect';
|
|
||||||
import { EntityDict } from '../oak-app-domain';
|
import { EntityDict } from '../oak-app-domain';
|
||||||
import { Application } from './application'
|
import { Application } from './application'
|
||||||
import { bytesToSize, getFileURL } from '../utils/extraFile';
|
import { bytesToSize, getFileURL } from '../utils/extraFile';
|
||||||
|
|
@ -11,7 +10,6 @@ import { OpSchema } from '../oak-app-domain/ExtraFile/Schema';
|
||||||
import { unset } from 'oak-domain/lib/utils/lodash';
|
import { unset } from 'oak-domain/lib/utils/lodash';
|
||||||
import { generateNewId, generateNewIdAsync } from 'oak-domain/lib/utils/uuid';
|
import { generateNewId, generateNewIdAsync } from 'oak-domain/lib/utils/uuid';
|
||||||
import { extraFileProjection } from '../types/Projection';
|
import { extraFileProjection } from '../types/Projection';
|
||||||
import { FRC, BRC, AD } from '../types/RuntimeCxt';
|
|
||||||
|
|
||||||
export type FileState = 'local' | 'uploading' | 'uploaded' | 'failed';
|
export type FileState = 'local' | 'uploading' | 'uploaded' | 'failed';
|
||||||
|
|
||||||
|
|
@ -289,7 +287,7 @@ export class ExtraFile<ED extends EntityDict> extends Feature {
|
||||||
formData2.append(name || 'file', file as File);
|
formData2.append(name || 'file', file as File);
|
||||||
|
|
||||||
const { result } = await this.cache.exec(
|
const { result } = await this.cache.exec(
|
||||||
aspectName as keyof AD<ED>,
|
aspectName,
|
||||||
formData2
|
formData2
|
||||||
);
|
);
|
||||||
return result;
|
return result;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ import { Feature } from 'oak-frontend-base/es/types/Feature';
|
||||||
import { EntityDict } from '../oak-app-domain';
|
import { EntityDict } from '../oak-app-domain';
|
||||||
import { Cache } from 'oak-frontend-base/es/features/cache';
|
import { Cache } from 'oak-frontend-base/es/features/cache';
|
||||||
import { LocalStorage } from 'oak-frontend-base/es/features/localStorage';
|
import { LocalStorage } from 'oak-frontend-base/es/features/localStorage';
|
||||||
import { FRC, BRC, AD } from '../types/RuntimeCxt';
|
|
||||||
|
|
||||||
export class WechatPublicTag<ED extends EntityDict> extends Feature {
|
export class WechatPublicTag<ED extends EntityDict> extends Feature {
|
||||||
private cache: Cache<ED>;
|
private cache: Cache<ED>;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ import { EntityDict } from '../oak-app-domain';
|
||||||
import { Cache } from 'oak-frontend-base/es/features/cache';
|
import { Cache } from 'oak-frontend-base/es/features/cache';
|
||||||
import { Message } from 'oak-frontend-base/es/features/message';
|
import { Message } from 'oak-frontend-base/es/features/message';
|
||||||
import { OakMpHaveToSubscribeMessage } from '../types/Exception';
|
import { OakMpHaveToSubscribeMessage } from '../types/Exception';
|
||||||
import { FRC, BRC, AD } from '../types/RuntimeCxt';
|
|
||||||
import assert from 'assert';
|
import assert from 'assert';
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,6 @@ import { Feature } from 'oak-frontend-base/es/types/Feature';
|
||||||
import { EntityDict } from '../oak-app-domain';
|
import { EntityDict } from '../oak-app-domain';
|
||||||
import { Cache } from 'oak-frontend-base/es/features/cache';
|
import { Cache } from 'oak-frontend-base/es/features/cache';
|
||||||
import { LocalStorage } from 'oak-frontend-base/es/features/localStorage';
|
import { LocalStorage } from 'oak-frontend-base/es/features/localStorage';
|
||||||
import { FRC, BRC, AD } from '../types/RuntimeCxt';
|
|
||||||
|
|
||||||
|
|
||||||
export class WechatSdk<ED extends EntityDict> extends Feature {
|
export class WechatSdk<ED extends EntityDict> extends Feature {
|
||||||
private cache: Cache<ED>;
|
private cache: Cache<ED>;
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ import { LocalStorage } from 'oak-frontend-base/es/features/localStorage';
|
||||||
import { Environment } from 'oak-frontend-base/es/features/environment';
|
import { Environment } from 'oak-frontend-base/es/features/environment';
|
||||||
import { WebEnv } from 'oak-domain/lib/types/Environment';
|
import { WebEnv } from 'oak-domain/lib/types/Environment';
|
||||||
import { uniq } from 'oak-domain/lib/utils/lodash';
|
import { uniq } from 'oak-domain/lib/utils/lodash';
|
||||||
import { FRC, BRC, AD } from '../types/RuntimeCxt';
|
|
||||||
|
|
||||||
import wx from 'weixin-js-sdk';
|
import wx from 'weixin-js-sdk';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
// import { registerMessageNotificationConverters } from './triggers/message';
|
// import { registerMessageNotificationConverters } from './triggers/message';
|
||||||
// import { registerWeChatPublicEventCallback } from './endpoints';
|
// import { registerWeChatPublicEventCallback } from './endpoints';
|
||||||
|
|
||||||
export type { FeatureDict as GeneralFeatures } from './features';
|
export type { FeatureDict } from './features';
|
||||||
export type { GeneralAspectDict } from './aspects/AspectDict';
|
export type { AspectDict } from './aspects/AspectDict';
|
||||||
export * from './types/Exception';
|
export * from './types/Exception';
|
||||||
export * from './types/Message';
|
export * from './types/Message';
|
||||||
export * from './types/RuntimeCxt';
|
export * from './types/RuntimeCxt';
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
import { CommonAspectDict } from 'oak-common-aspect';
|
import { AspectDict as CommonAspectDict } from 'oak-common-aspect';
|
||||||
import GeneralAspectDict from '../aspects/AspectDict';
|
import GeneralAspectDict from '../aspects/AspectDict';
|
||||||
import { BackendRuntimeContext } from '../context/BackendRuntimeContext';
|
import { BackendRuntimeContext } from '../context/BackendRuntimeContext';
|
||||||
import { FrontendRuntimeContext } from '../context/FrontendRuntimeContext';
|
import { FrontendRuntimeContext } from '../context/FrontendRuntimeContext';
|
||||||
import { EntityDict } from '../oak-app-domain';
|
import { EntityDict } from '../oak-app-domain';
|
||||||
|
|
||||||
export type BRC<ED extends EntityDict> = BackendRuntimeContext<ED>;
|
export type BRC<ED extends EntityDict> = BackendRuntimeContext<ED>;
|
||||||
export type AD<ED extends EntityDict> = GeneralAspectDict<ED, BRC<ED>> &
|
|
||||||
CommonAspectDict<ED, BRC<ED>>;
|
|
||||||
export type FRC<ED extends EntityDict> = FrontendRuntimeContext<ED>;
|
export type FRC<ED extends EntityDict> = FrontendRuntimeContext<ED>;
|
||||||
export type RuntimeCxt<ED extends EntityDict> = FRC<ED> | BRC<ED>;
|
export type RuntimeCxt<ED extends EntityDict> = FRC<ED> | BRC<ED>;
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
import { assert } from 'oak-domain/lib/utils/assert';
|
import { assert } from 'oak-domain/lib/utils/assert';
|
||||||
import { BackendRuntimeContext } from '../../context/BackendRuntimeContext';
|
|
||||||
import {
|
|
||||||
FrontendRuntimeContext,
|
|
||||||
AspectDict,
|
|
||||||
} from '../../context/FrontendRuntimeContext';
|
|
||||||
import { BRC, FRC } from '../../types/RuntimeCxt';
|
import { BRC, FRC } from '../../types/RuntimeCxt';
|
||||||
import { EntityDict } from '../../oak-app-domain';
|
import { EntityDict } from '../../oak-app-domain';
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue