feat: sdk add send feed function export

This commit is contained in:
moonrailgun 2024-10-05 07:58:08 +08:00
parent 7322ad741d
commit f5933ec054
3 changed files with 15 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "tianji-client-sdk", "name": "tianji-client-sdk",
"version": "1.0.3", "version": "1.1.0",
"description": "", "description": "",
"main": "lib/index.js", "main": "lib/index.js",
"scripts": { "scripts": {

View File

@ -0,0 +1,13 @@
import { $OpenApiTs, FeedService } from './open/client';
export async function sendFeed(
channelId: string,
payload: $OpenApiTs['/feed/{channelId}/send']['post']['req']['requestBody']
) {
const res = await FeedService.feedSendEvent({
channelId,
requestBody: payload,
});
return res;
}

View File

@ -2,3 +2,4 @@ export { initOpenapiSDK } from './config';
export { openApiClient } from './open'; export { openApiClient } from './open';
export * from './tracker'; export * from './tracker';
export * from './survey'; export * from './survey';
export * from './feed';