diff --git a/packages/client-sdk/package.json b/packages/client-sdk/package.json index e6a2cd6..8e946f7 100644 --- a/packages/client-sdk/package.json +++ b/packages/client-sdk/package.json @@ -1,6 +1,6 @@ { "name": "tianji-client-sdk", - "version": "1.0.3", + "version": "1.1.0", "description": "", "main": "lib/index.js", "scripts": { diff --git a/packages/client-sdk/src/feed.ts b/packages/client-sdk/src/feed.ts new file mode 100644 index 0000000..39848b5 --- /dev/null +++ b/packages/client-sdk/src/feed.ts @@ -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; +} diff --git a/packages/client-sdk/src/index.ts b/packages/client-sdk/src/index.ts index 7b52310..3ab3b92 100644 --- a/packages/client-sdk/src/index.ts +++ b/packages/client-sdk/src/index.ts @@ -2,3 +2,4 @@ export { initOpenapiSDK } from './config'; export { openApiClient } from './open'; export * from './tracker'; export * from './survey'; +export * from './feed';