58 lines
1.9 KiB
TypeScript
58 lines
1.9 KiB
TypeScript
import { EntityDict } from '../oak-app-domain';
|
|
import { AppType } from '../oak-app-domain/Application/Schema';
|
|
import { MediaType, MaterialType } from '../types/WeChat';
|
|
import { WebEnv } from 'oak-domain/lib/types/Environment';
|
|
import { File } from 'formidable';
|
|
import { BRC } from '../types/RuntimeCxt';
|
|
export declare function getApplication<ED extends EntityDict>(params: {
|
|
type: AppType;
|
|
domain: string;
|
|
data: ED['application']['Selection']['data'];
|
|
appId?: string;
|
|
}, context: BRC<ED>): Promise<string>;
|
|
export declare function signatureJsSDK<ED extends EntityDict>({ url, env }: {
|
|
url: string;
|
|
env: WebEnv;
|
|
}, context: BRC<ED>): Promise<{
|
|
signature: string;
|
|
noncestr: string;
|
|
timestamp: number;
|
|
appId: string;
|
|
}>;
|
|
export declare function uploadWechatMedia<ED extends EntityDict>(params: {
|
|
applicationId: string;
|
|
file: File;
|
|
type: MediaType;
|
|
isPermanent?: string;
|
|
description?: string;
|
|
extraFileId?: string;
|
|
}, // FormData表单提交 isPermanent 变成 'true' | 'false'
|
|
context: BRC<ED>): Promise<{
|
|
mediaId: string;
|
|
}>;
|
|
export declare function getMaterial<ED extends EntityDict>(params: {
|
|
applicationId: string;
|
|
mediaId: string;
|
|
isPermanent?: boolean;
|
|
}, context: BRC<ED>): Promise<any>;
|
|
export declare function deleteMaterial<ED extends EntityDict>(params: {
|
|
applicationId: string;
|
|
mediaId: string;
|
|
}, context: BRC<ED>): Promise<any>;
|
|
export declare function batchGetArticle<ED extends EntityDict>(params: {
|
|
applicationId: string;
|
|
offset?: number;
|
|
count: number;
|
|
noContent?: 0 | 1;
|
|
}, context: BRC<ED>): Promise<any>;
|
|
export declare function getArticle<ED extends EntityDict>(params: {
|
|
applicationId: string;
|
|
articleId: string;
|
|
}, context: BRC<ED>): Promise<any>;
|
|
export declare function batchGetMaterialList<ED extends EntityDict>(params: {
|
|
applicationId: string;
|
|
type: MaterialType;
|
|
offset?: number;
|
|
count: number;
|
|
}, context: BRC<ED>): Promise<any>;
|