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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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