aspect 增加微信删除素材deleteMaterial

This commit is contained in:
Wang Kejun 2023-10-20 20:26:20 +08:00
parent 4db7235871
commit dd60ecd25c
8 changed files with 47 additions and 26 deletions

View File

@ -113,6 +113,12 @@ export type GeneralAspectDict<ED extends EntityDict, Cxt extends BackendRuntimeC
result: string;
times?: number;
}>;
createSession: (params: {
data?: WechatPublicEventData | WechatMpEventData;
type: AppType;
entity?: string;
entityId?: string;
}, context: Cxt) => Promise<string>;
uploadWechatMedia: (params: any, context: Cxt) => Promise<{
mediaId: string;
}>;
@ -160,12 +166,10 @@ export type GeneralAspectDict<ED extends EntityDict, Cxt extends BackendRuntimeC
mediaId: string;
isPermanent?: boolean;
}, context: Cxt) => Promise<any>;
createSession: (params: {
data?: WechatPublicEventData | WechatMpEventData;
type: AppType;
entity?: string;
entityId?: string;
}, context: Cxt) => Promise<string>;
deleteMaterial: (params: {
applicationId: string;
mediaId: string;
}, context: Cxt) => Promise<any>;
createTag: (params: {
applicationId: string;
name: string;

View File

@ -1,6 +1,6 @@
import { loginByMobile, loginWechat, loginWechatMp, syncUserInfoWechatMp, sendCaptcha, switchTo, refreshWechatPublicUserInfo, getWechatMpUserPhoneNumber, logout, loginByWechat, wakeupParasite } from './token';
import { getInfoByUrl } from './extraFile';
import { getApplication, signatureJsSDK, uploadWechatMedia, batchGetArticle, getArticle, batchGetMaterialList, getMaterial } from './application';
import { getApplication, signatureJsSDK, uploadWechatMedia, batchGetArticle, getArticle, batchGetMaterialList, getMaterial, deleteMaterial } from './application';
import { updateConfig, updateApplicationConfig } from './config';
import { updateStyle } from './style2';
import { syncMessageTemplate } from './template';
@ -38,6 +38,7 @@ declare const aspectDict: {
updateUserPassword: typeof updateUserPassword;
getMpUnlimitWxaCode: typeof getMpUnlimitWxaCode;
confirmUserEntityGrant: typeof confirmUserEntityGrant;
createSession: typeof createSession;
uploadWechatMedia: typeof uploadWechatMedia;
getCurrentMenu: typeof getCurrentMenu;
getMenu: typeof getMenu;
@ -49,7 +50,7 @@ declare const aspectDict: {
getArticle: typeof getArticle;
batchGetMaterialList: typeof batchGetMaterialList;
getMaterial: typeof getMaterial;
createSession: typeof createSession;
deleteMaterial: typeof deleteMaterial;
createTag: typeof createTag;
getTags: typeof getTags;
editTag: typeof editTag;

View File

@ -1,6 +1,6 @@
import { loginByMobile, loginWechat, loginWechatMp, syncUserInfoWechatMp, sendCaptcha, switchTo, refreshWechatPublicUserInfo, getWechatMpUserPhoneNumber, logout, loginByWechat, wakeupParasite, } from './token';
import { getInfoByUrl } from './extraFile';
import { getApplication, signatureJsSDK, uploadWechatMedia, batchGetArticle, getArticle, batchGetMaterialList, getMaterial, } from './application';
import { getApplication, signatureJsSDK, uploadWechatMedia, batchGetArticle, getArticle, batchGetMaterialList, getMaterial, deleteMaterial, } from './application';
import { updateConfig, updateApplicationConfig } from './config';
import { updateStyle } from './style2';
import { syncMessageTemplate } from './template';
@ -38,6 +38,7 @@ const aspectDict = {
updateUserPassword,
getMpUnlimitWxaCode,
confirmUserEntityGrant,
createSession,
uploadWechatMedia,
getCurrentMenu,
getMenu,
@ -49,7 +50,7 @@ const aspectDict = {
getArticle,
batchGetMaterialList,
getMaterial,
createSession,
deleteMaterial,
createTag,
getTags,
editTag,

View File

@ -113,6 +113,12 @@ export type GeneralAspectDict<ED extends EntityDict, Cxt extends BackendRuntimeC
result: string;
times?: number;
}>;
createSession: (params: {
data?: WechatPublicEventData | WechatMpEventData;
type: AppType;
entity?: string;
entityId?: string;
}, context: Cxt) => Promise<string>;
uploadWechatMedia: (params: any, context: Cxt) => Promise<{
mediaId: string;
}>;
@ -160,12 +166,10 @@ export type GeneralAspectDict<ED extends EntityDict, Cxt extends BackendRuntimeC
mediaId: string;
isPermanent?: boolean;
}, context: Cxt) => Promise<any>;
createSession: (params: {
data?: WechatPublicEventData | WechatMpEventData;
type: AppType;
entity?: string;
entityId?: string;
}, context: Cxt) => Promise<string>;
deleteMaterial: (params: {
applicationId: string;
mediaId: string;
}, context: Cxt) => Promise<any>;
createTag: (params: {
applicationId: string;
name: string;

View File

@ -1,6 +1,6 @@
import { loginByMobile, loginWechat, loginWechatMp, syncUserInfoWechatMp, sendCaptcha, switchTo, refreshWechatPublicUserInfo, getWechatMpUserPhoneNumber, logout, loginByWechat, wakeupParasite } from './token';
import { getInfoByUrl } from './extraFile';
import { getApplication, signatureJsSDK, uploadWechatMedia, batchGetArticle, getArticle, batchGetMaterialList, getMaterial } from './application';
import { getApplication, signatureJsSDK, uploadWechatMedia, batchGetArticle, getArticle, batchGetMaterialList, getMaterial, deleteMaterial } from './application';
import { updateConfig, updateApplicationConfig } from './config';
import { updateStyle } from './style2';
import { syncMessageTemplate } from './template';
@ -38,6 +38,7 @@ declare const aspectDict: {
updateUserPassword: typeof updateUserPassword;
getMpUnlimitWxaCode: typeof getMpUnlimitWxaCode;
confirmUserEntityGrant: typeof confirmUserEntityGrant;
createSession: typeof createSession;
uploadWechatMedia: typeof uploadWechatMedia;
getCurrentMenu: typeof getCurrentMenu;
getMenu: typeof getMenu;
@ -49,7 +50,7 @@ declare const aspectDict: {
getArticle: typeof getArticle;
batchGetMaterialList: typeof batchGetMaterialList;
getMaterial: typeof getMaterial;
createSession: typeof createSession;
deleteMaterial: typeof deleteMaterial;
createTag: typeof createTag;
getTags: typeof getTags;
editTag: typeof editTag;

View File

@ -40,6 +40,7 @@ const aspectDict = {
updateUserPassword: user_1.updateUserPassword,
getMpUnlimitWxaCode: wechatQrCode_1.getMpUnlimitWxaCode,
confirmUserEntityGrant: userEntityGrant_1.confirmUserEntityGrant,
createSession: session_1.createSession,
uploadWechatMedia: application_1.uploadWechatMedia,
getCurrentMenu: wechatMenu_1.getCurrentMenu,
getMenu: wechatMenu_1.getMenu,
@ -51,7 +52,7 @@ const aspectDict = {
getArticle: application_1.getArticle,
batchGetMaterialList: application_1.batchGetMaterialList,
getMaterial: application_1.getMaterial,
createSession: session_1.createSession,
deleteMaterial: application_1.deleteMaterial,
createTag: wechatPublicTag_1.createTag,
getTags: wechatPublicTag_1.getTags,
editTag: wechatPublicTag_1.editTag,

View File

@ -178,6 +178,15 @@ export type GeneralAspectDict<
},
context: Cxt
) => Promise<{ result: string; times?: number }>;
createSession: (
params: {
data?: WechatPublicEventData | WechatMpEventData;
type: AppType;
entity?: string;
entityId?: string;
},
context: Cxt
) => Promise<string>;
uploadWechatMedia: (
params: any,
context: Cxt
@ -256,15 +265,13 @@ export type GeneralAspectDict<
},
context: Cxt
) => Promise<any>;
createSession: (
deleteMaterial: (
params: {
data?: WechatPublicEventData | WechatMpEventData;
type: AppType;
entity?: string;
entityId?: string;
applicationId: string;
mediaId: string;
},
context: Cxt
) => Promise<string>;
) => Promise<any>;
createTag: (
params: {
applicationId: string;

View File

@ -20,6 +20,7 @@ import {
getArticle,
batchGetMaterialList,
getMaterial,
deleteMaterial,
} from './application';
import { updateConfig, updateApplicationConfig } from './config';
import { updateStyle } from './style2';
@ -82,6 +83,7 @@ const aspectDict = {
updateUserPassword,
getMpUnlimitWxaCode,
confirmUserEntityGrant,
createSession,
uploadWechatMedia,
getCurrentMenu,
getMenu,
@ -93,7 +95,7 @@ const aspectDict = {
getArticle,
batchGetMaterialList,
getMaterial,
createSession,
deleteMaterial,
createTag,
getTags,
editTag,