From dd60ecd25c8bc0b7fe42a03670dbd05eb122fdb3 Mon Sep 17 00:00:00 2001 From: wkj <278599135@qq.com> Date: Fri, 20 Oct 2023 20:26:20 +0800 Subject: [PATCH] =?UTF-8?q?aspect=20=E5=A2=9E=E5=8A=A0=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=B4=A0=E6=9D=90deleteMaterial?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- es/aspects/AspectDict.d.ts | 16 ++++++++++------ es/aspects/index.d.ts | 5 +++-- es/aspects/index.js | 5 +++-- lib/aspects/AspectDict.d.ts | 16 ++++++++++------ lib/aspects/index.d.ts | 5 +++-- lib/aspects/index.js | 3 ++- src/aspects/AspectDict.ts | 19 +++++++++++++------ src/aspects/index.ts | 4 +++- 8 files changed, 47 insertions(+), 26 deletions(-) diff --git a/es/aspects/AspectDict.d.ts b/es/aspects/AspectDict.d.ts index 42a2309bb..6ed9900c6 100644 --- a/es/aspects/AspectDict.d.ts +++ b/es/aspects/AspectDict.d.ts @@ -113,6 +113,12 @@ export type GeneralAspectDict; + createSession: (params: { + data?: WechatPublicEventData | WechatMpEventData; + type: AppType; + entity?: string; + entityId?: string; + }, context: Cxt) => Promise; uploadWechatMedia: (params: any, context: Cxt) => Promise<{ mediaId: string; }>; @@ -160,12 +166,10 @@ export type GeneralAspectDict Promise; - createSession: (params: { - data?: WechatPublicEventData | WechatMpEventData; - type: AppType; - entity?: string; - entityId?: string; - }, context: Cxt) => Promise; + deleteMaterial: (params: { + applicationId: string; + mediaId: string; + }, context: Cxt) => Promise; createTag: (params: { applicationId: string; name: string; diff --git a/es/aspects/index.d.ts b/es/aspects/index.d.ts index c000f4ffb..347cf1711 100644 --- a/es/aspects/index.d.ts +++ b/es/aspects/index.d.ts @@ -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; diff --git a/es/aspects/index.js b/es/aspects/index.js index d9d573fbf..baec3539a 100644 --- a/es/aspects/index.js +++ b/es/aspects/index.js @@ -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, diff --git a/lib/aspects/AspectDict.d.ts b/lib/aspects/AspectDict.d.ts index 42a2309bb..6ed9900c6 100644 --- a/lib/aspects/AspectDict.d.ts +++ b/lib/aspects/AspectDict.d.ts @@ -113,6 +113,12 @@ export type GeneralAspectDict; + createSession: (params: { + data?: WechatPublicEventData | WechatMpEventData; + type: AppType; + entity?: string; + entityId?: string; + }, context: Cxt) => Promise; uploadWechatMedia: (params: any, context: Cxt) => Promise<{ mediaId: string; }>; @@ -160,12 +166,10 @@ export type GeneralAspectDict Promise; - createSession: (params: { - data?: WechatPublicEventData | WechatMpEventData; - type: AppType; - entity?: string; - entityId?: string; - }, context: Cxt) => Promise; + deleteMaterial: (params: { + applicationId: string; + mediaId: string; + }, context: Cxt) => Promise; createTag: (params: { applicationId: string; name: string; diff --git a/lib/aspects/index.d.ts b/lib/aspects/index.d.ts index c000f4ffb..347cf1711 100644 --- a/lib/aspects/index.d.ts +++ b/lib/aspects/index.d.ts @@ -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; diff --git a/lib/aspects/index.js b/lib/aspects/index.js index a1001ca55..d29ae3a3b 100644 --- a/lib/aspects/index.js +++ b/lib/aspects/index.js @@ -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, diff --git a/src/aspects/AspectDict.ts b/src/aspects/AspectDict.ts index a7d6d2a63..60a172fba 100644 --- a/src/aspects/AspectDict.ts +++ b/src/aspects/AspectDict.ts @@ -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; uploadWechatMedia: ( params: any, context: Cxt @@ -256,15 +265,13 @@ export type GeneralAspectDict< }, context: Cxt ) => Promise; - createSession: ( + deleteMaterial: ( params: { - data?: WechatPublicEventData | WechatMpEventData; - type: AppType; - entity?: string; - entityId?: string; + applicationId: string; + mediaId: string; }, context: Cxt - ) => Promise; + ) => Promise; createTag: ( params: { applicationId: string; diff --git a/src/aspects/index.ts b/src/aspects/index.ts index 1d93a4460..ea5428e69 100644 --- a/src/aspects/index.ts +++ b/src/aspects/index.ts @@ -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,