chore: prepare JavaScript SDK for npm publish

This commit is contained in:
Mo Elzubeir
2026-05-29 13:46:11 -05:00
parent c860cf6d88
commit d820a39223
4 changed files with 91 additions and 3 deletions
+44 -1
View File
@@ -4,7 +4,7 @@ Public API reference for `@socialhose/api`, the TypeScript SDK for the Socialhos
The SDK is intended for server-side JavaScript/TypeScript. It authenticates requests with an API key, wraps Socialhose REST endpoints, normalizes common response shapes, retries transient failures, applies request timeouts, and caches GET responses.
## Package exports
## Common imports
```ts
import {
@@ -18,9 +18,52 @@ import {
type RequestOptions,
type AnalyticsFilters,
type MentionFilters,
type Mention,
type Paginated,
type EntityBrief,
type EntityStats,
} from '@socialhose/api';
```
## Public exports
Runtime exports:
- `SocialhoseClient`
- `createSocialhoseClient`
- `SocialhoseError`
- `MemoryCache`
- `NoopCache`
Type exports:
- `AnalyticsFilters`
- `Cache`
- `Campaign`
- `EntityBrief`
- `EntityStats`
- `InviteOutcome`
- `InviteResult`
- `KeywordStat`
- `MailingList`
- `MailingListInvitation`
- `Mention`
- `MentionFilters`
- `Overview`
- `Paginated`
- `PlatformShare`
- `PlatformStat`
- `QueryParams`
- `QueryValue`
- `RequestOptions`
- `Sentiment`
- `SentimentSplit`
- `ShareOfVoiceItem`
- `SocialhoseClientOptions`
- `TimelinePoint`
- `TopMention`
- `TrendingItem`
## Authentication
Every request sends: