@kookee/sdk 0.0.33 → 0.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +106 -39
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -102,6 +102,9 @@ const postById = await kookee.blog.getById('post-uuid');
102
102
  // Get all tags with post counts
103
103
  const tags = await kookee.blog.getTags();
104
104
 
105
+ // Get comments on a post
106
+ const comments = await kookee.blog.getComments('post-id', { page: 1, limit: 20 });
107
+
105
108
  // React to a post
106
109
  await kookee.blog.react('post-id', { reactionType: 'heart', action: 'add' });
107
110
 
@@ -133,6 +136,12 @@ const articleById = await kookee.help.getById('article-uuid');
133
136
  const translationsBySlug = await kookee.help.getTranslationsBySlug('getting-started');
134
137
  const translationsById = await kookee.help.getTranslationsById('article-uuid');
135
138
 
139
+ // Get comments on an article
140
+ const comments = await kookee.help.getComments('article-id', { page: 1, limit: 20 });
141
+
142
+ // React to an article
143
+ await kookee.help.react('article-id', { reactionType: 'heart', action: 'add' });
144
+
136
145
  // AI-powered chat
137
146
  const response = await kookee.help.chat({
138
147
  messages: [{ role: 'user', content: 'How do I reset my password?' }],
@@ -146,15 +155,6 @@ for await (const chunk of kookee.help.chatStream({ messages })) {
146
155
  if (chunk.type === 'done') console.log('Stream finished');
147
156
  if (chunk.type === 'error') console.error(chunk.message);
148
157
  }
149
-
150
- // Vote on article usefulness
151
- await kookee.help.voteUsefulness('article-id', 'yes');
152
-
153
- // Change a previous vote
154
- await kookee.help.voteUsefulness('article-id', 'no', 'yes');
155
-
156
- // Remove a vote
157
- await kookee.help.voteUsefulness('article-id', null, 'yes');
158
158
  ```
159
159
 
160
160
  ## Changelog
@@ -163,15 +163,9 @@ await kookee.help.voteUsefulness('article-id', null, 'yes');
163
163
  // List entries
164
164
  const entries = await kookee.changelog.list({ page: 1, limit: 10 });
165
165
 
166
- // Filter by type: 'feature' | 'fix' | 'improvement' | 'breaking' | 'security' | 'deprecated' | 'other'
167
- const fixes = await kookee.changelog.list({ type: 'fix' });
168
-
169
166
  // Search entries
170
167
  const results = await kookee.changelog.list({ search: 'authentication' });
171
168
 
172
- // Order by version or date
173
- const sorted = await kookee.changelog.list({ orderBy: 'version', order: 'desc' });
174
-
175
169
  // Get single entry
176
170
  const entry = await kookee.changelog.getBySlug('v1-0-0');
177
171
  const entryById = await kookee.changelog.getById('entry-uuid');
@@ -180,6 +174,9 @@ const entryById = await kookee.changelog.getById('entry-uuid');
180
174
  const translationsBySlug = await kookee.changelog.getTranslationsBySlug('v1-0-0');
181
175
  const translationsById = await kookee.changelog.getTranslationsById('entry-uuid');
182
176
 
177
+ // Get comments on an entry
178
+ const comments = await kookee.changelog.getComments('entry-id', { page: 1, limit: 20 });
179
+
183
180
  // React to an entry
184
181
  await kookee.changelog.react('entry-id', { reactionType: 'fire', action: 'add' });
185
182
  ```
@@ -190,20 +187,14 @@ await kookee.changelog.react('entry-id', { reactionType: 'fire', action: 'add' }
190
187
  // List announcements
191
188
  const announcements = await kookee.announcements.list({ page: 1, limit: 10 });
192
189
 
193
- // Filter by type: 'info' | 'warning' | 'critical' | 'promotion' | 'maintenance' | 'newFeature'
194
- const critical = await kookee.announcements.list({ type: 'critical' });
195
-
196
- // Order announcements
197
- const sorted = await kookee.announcements.list({ orderBy: 'publishedAt', order: 'desc' });
198
-
199
- // Exclude already-seen announcements
200
- const unseen = await kookee.announcements.list({ excludeIds: ['id1', 'id2'] });
201
-
202
190
  // Get single announcement
203
191
  const announcement = await kookee.announcements.getById('announcement-uuid');
204
192
 
205
193
  // Get translations
206
194
  const translations = await kookee.announcements.getTranslationsById('announcement-uuid');
195
+
196
+ // Get comments on an announcement
197
+ const comments = await kookee.announcements.getComments('announcement-id', { page: 1, limit: 20 });
207
198
  ```
208
199
 
209
200
  ## Pages
@@ -222,6 +213,37 @@ const pageById = await kookee.pages.getById('page-uuid');
222
213
  // Get translations
223
214
  const translationsBySlug = await kookee.pages.getTranslationsBySlug('privacy-policy');
224
215
  const translationsById = await kookee.pages.getTranslationsById('page-uuid');
216
+
217
+ // Get comments on a page
218
+ const comments = await kookee.pages.getComments('page-id', { page: 1, limit: 20 });
219
+ ```
220
+
221
+ ## Entries (Generic)
222
+
223
+ The `entries` module provides low-level access to all entry types through a unified API:
224
+
225
+ ```typescript
226
+ // List entries by type
227
+ const blogPosts = await kookee.entries.list({ type: 'blog', page: 1, limit: 10 });
228
+ const articles = await kookee.entries.list({ type: 'help_article', category: 'getting-started' });
229
+
230
+ // Get entry by slug or ID
231
+ const entry = await kookee.entries.getBySlug('my-post', { type: 'blog' });
232
+ const entryById = await kookee.entries.getById('entry-uuid');
233
+
234
+ // Get translations
235
+ const translationsBySlug = await kookee.entries.getTranslationsBySlug('my-post');
236
+ const translationsById = await kookee.entries.getTranslationsById('entry-uuid');
237
+
238
+ // Get comments
239
+ const comments = await kookee.entries.getComments('entry-id', { page: 1, limit: 20 });
240
+
241
+ // React to any entry
242
+ await kookee.entries.react('entry-id', { reactionType: 'heart', action: 'add' });
243
+
244
+ // Get tags or categories for a type
245
+ const tags = await kookee.entries.getTags('blog');
246
+ const categories = await kookee.entries.getCategories('help_article');
225
247
  ```
226
248
 
227
249
  ## Feedback
@@ -310,7 +332,7 @@ const health = await kookee.health();
310
332
 
311
333
  ## Reactions
312
334
 
313
- Blog posts and changelog entries support reactions:
335
+ Blog posts, help articles, and changelog entries support reactions:
314
336
 
315
337
  ```typescript
316
338
  // Available reaction types: 'fire' | 'heart' | 'rocket' | 'eyes' | 'mindblown'
@@ -336,7 +358,7 @@ Translation endpoints return a `Record<string, T>` keyed by locale code:
336
358
 
337
359
  ```typescript
338
360
  const translations = await kookee.blog.getTranslationsBySlug('hello-world');
339
- // { en: BlogPost, de: BlogPost, fr: BlogPost, ... }
361
+ // { en: BlogEntry, de: BlogEntry, fr: BlogEntry, ... }
340
362
  ```
341
363
 
342
364
  ## Paginated Response
@@ -395,31 +417,76 @@ The SDK is written in TypeScript and provides full type definitions:
395
417
 
396
418
  ```typescript
397
419
  import type {
398
- BlogPost,
399
- BlogPostListItem,
400
- BlogTag,
401
- BlogTagWithCount,
402
- Page,
403
- PageListItem,
404
- HelpArticle,
405
- HelpArticleListItem,
406
- HelpCategory,
420
+ // Entry types
421
+ BaseEntry,
422
+ GenericEntry,
423
+ BlogEntry,
424
+ PageEntry,
425
+ HelpArticleEntry,
426
+ ChangelogEntry,
427
+ AnnouncementEntry,
428
+ TypedEntry,
429
+ AnyEntry,
430
+ EntryType,
431
+ EntryStatus,
432
+ EntryAuthor,
433
+ EntryTag,
434
+ EntryTagWithCount,
435
+ EntryCategory,
436
+ EntryComment,
437
+
438
+ // Changelog & Announcement specific
439
+ ChangelogType,
440
+ AnnouncementType,
441
+
442
+ // Help Center
407
443
  HelpSearchResult,
444
+ HelpArticleVisibility,
445
+ HelpChatMessage,
446
+ HelpChatParams,
408
447
  HelpChatResponse,
448
+ HelpChatSource,
449
+ HelpChatSourceCategory,
409
450
  HelpChatStreamChunk,
410
- ChangelogEntry,
411
- ChangelogEntryListItem,
412
- Announcement,
413
- AnnouncementListItem,
451
+
452
+ // Feedback
414
453
  FeedbackPost,
415
454
  FeedbackPostListItem,
455
+ FeedbackPostStatus,
456
+ FeedbackPostCategory,
457
+ FeedbackSortOption,
458
+ FeedbackAuthor,
459
+ FeedbackAssignee,
416
460
  FeedbackComment,
417
461
  FeedbackTopContributor,
462
+ FeedbackVoteResponse,
463
+ CreateFeedbackPostParams,
464
+ CreateFeedbackCommentParams,
465
+ CreatedFeedbackPost,
466
+ CreatedFeedbackComment,
467
+ ListMyFeedbackPostsParams,
468
+ DeleteFeedbackPostParams,
469
+ DeleteFeedbackPostResponse,
470
+ DeleteFeedbackCommentParams,
471
+ DeleteFeedbackCommentResponse,
472
+
473
+ // User & Identity
418
474
  KookeeUser,
419
475
  ExternalUser,
476
+
477
+ // Reactions
478
+ ReactionType,
479
+ ReactParams,
480
+ ReactResponse,
481
+
482
+ // Common
420
483
  PublicConfig,
421
484
  PaginatedResponse,
485
+ PaginationParams,
486
+ LocaleOptions,
487
+ OrderDirection,
422
488
  KookeeConfig,
489
+ HealthCheckResponse,
423
490
  } from '@kookee/sdk';
424
491
  ```
425
492
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kookee/sdk",
3
- "version": "0.0.33",
3
+ "version": "0.0.34",
4
4
  "description": "Official Kookee SDK - Access your blog, changelog, help center, and more",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",