oak-general-business/es/features/wechatMenu.d.ts

67 lines
1.9 KiB
TypeScript

import { Feature } from 'oak-frontend-base/es/types/Feature';
import { EntityDict } from '../oak-app-domain';
import { Cache } from 'oak-frontend-base/es/features/cache';
import { LocalStorage } from 'oak-frontend-base/es/features/localStorage';
import { MediaType, MediaVideoDescription, MaterialType } from '../types/WeChat';
export declare class WechatMenu<ED extends EntityDict> extends Feature {
private cache;
private storage;
constructor(cache: Cache<ED>, storage: LocalStorage);
getCurrentMenu(params: {
applicationId: string;
}): Promise<any>;
getMenu(params: {
applicationId: string;
}): Promise<any>;
createMenu(params: {
applicationId: string;
menuConfig: any;
id: string;
}): Promise<any>;
createConditionalMenu(params: {
applicationId: string;
menuConfig: any;
id: string;
}): Promise<any>;
deleteConditionalMenu(params: {
applicationId: string;
menuId: number;
}): Promise<any>;
deleteMenu(params: {
applicationId: string;
}): Promise<any>;
batchGetArticle(params: {
applicationId: string;
offset?: number;
count: number;
noContent?: 0 | 1;
}): Promise<any>;
getArticle(params: {
applicationId: string;
articleId: string;
}): Promise<any>;
createMaterial(params: {
applicationId: string;
type: MediaType;
file: File;
description?: MediaVideoDescription;
isPermanent?: boolean;
}): Promise<any>;
batchGetMaterialList(params: {
applicationId: string;
type: MaterialType;
offset?: number;
count: number;
}): Promise<any>;
/**
* 获取素材详情
* @param params
* @returns
*/
getMaterial(params: {
applicationId: string;
mediaId: string;
isPermanent?: boolean;
}): Promise<any>;
}