@roundtable-bb/sdk 0.1.37 → 0.1.38

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/dist/index.js +19 -19
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -94,7 +94,7 @@ class RoundtableClient {
94
94
  }
95
95
  /** Create a post in a thread */
96
96
  createPost(params, body, options) {
97
- return request(this.opts, 'POST', `/tenants/${params.tenantId}/threads/${params.threadId}/posts`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
97
+ return request(this.opts, 'POST', `/tenants/${params.tenantId}/threads/${params.threadId}/posts`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
98
98
  }
99
99
  /** Create a new tenant (requires allow_tenant_creation platform setting or platform owner) */
100
100
  createTenant(body, options) {
@@ -102,7 +102,7 @@ class RoundtableClient {
102
102
  }
103
103
  /** Create a thread (and its first post) */
104
104
  createThread(params, body, options) {
105
- return request(this.opts, 'POST', `/tenants/${params.tenantId}/forums/${params.forumId}/threads`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
105
+ return request(this.opts, 'POST', `/tenants/${params.tenantId}/forums/${params.forumId}/threads`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
106
106
  }
107
107
  /** Delete a platform-scoped API key */
108
108
  deleteApiKey(params, options) {
@@ -130,7 +130,7 @@ class RoundtableClient {
130
130
  }
131
131
  /** Soft-delete a post */
132
132
  deletePost(params, options) {
133
- return request(this.opts, 'DELETE', `/tenants/${params.tenantId}/posts/${params.postId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
133
+ return request(this.opts, 'DELETE', `/tenants/${params.tenantId}/posts/${params.postId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
134
134
  }
135
135
  /** Permanently delete a tenant and all its data (platform owners only) */
136
136
  deleteTenant(params, options) {
@@ -138,7 +138,7 @@ class RoundtableClient {
138
138
  }
139
139
  /** Delete a thread */
140
140
  deleteThread(params, options) {
141
- return request(this.opts, 'DELETE', `/tenants/${params.tenantId}/threads/${params.threadId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
141
+ return request(this.opts, 'DELETE', `/tenants/${params.tenantId}/threads/${params.threadId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
142
142
  }
143
143
  /** Exchange session cookie for a short-lived tenant JWT */
144
144
  exchangeTenantToken(options) {
@@ -146,15 +146,15 @@ class RoundtableClient {
146
146
  }
147
147
  /** Get a single category */
148
148
  getCategory(params, options) {
149
- return request(this.opts, 'GET', `/tenants/${params.tenantId}/categories/${params.categoryId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
149
+ return request(this.opts, 'GET', `/tenants/${params.tenantId}/categories/${params.categoryId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
150
150
  }
151
151
  /** Get a single forum */
152
152
  getForum(params, options) {
153
- return request(this.opts, 'GET', `/tenants/${params.tenantId}/forums/${params.forumId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
153
+ return request(this.opts, 'GET', `/tenants/${params.tenantId}/forums/${params.forumId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
154
154
  }
155
155
  /** Get a group */
156
156
  getGroup(params, options) {
157
- return request(this.opts, 'GET', `/tenants/${params.tenantId}/groups/${params.groupId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
157
+ return request(this.opts, 'GET', `/tenants/${params.tenantId}/groups/${params.groupId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
158
158
  }
159
159
  /** Get own profile */
160
160
  getMe(options) {
@@ -170,19 +170,19 @@ class RoundtableClient {
170
170
  }
171
171
  /** Get a single thread */
172
172
  getThread(params, options) {
173
- return request(this.opts, 'GET', `/tenants/${params.tenantId}/threads/${params.threadId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
173
+ return request(this.opts, 'GET', `/tenants/${params.tenantId}/threads/${params.threadId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
174
174
  }
175
175
  /** Get read status for the current user in a thread */
176
176
  getThreadReadStatus(params, options) {
177
- return request(this.opts, 'GET', `/tenants/${params.tenantId}/threads/${params.threadId}/read-status`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
177
+ return request(this.opts, 'GET', `/tenants/${params.tenantId}/threads/${params.threadId}/read-status`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
178
178
  }
179
179
  /** Get a user profile by ID */
180
180
  getUser(params, options) {
181
- return request(this.opts, 'GET', `/users/${params.userId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
181
+ return request(this.opts, 'GET', `/users/${params.userId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
182
182
  }
183
183
  /** Get user group memberships in the current tenant */
184
184
  getUserMembership(params, options) {
185
- return request(this.opts, 'GET', `/tenants/${params.tenantId}/users/${params.userId}/membership`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
185
+ return request(this.opts, 'GET', `/tenants/${params.tenantId}/users/${params.userId}/membership`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
186
186
  }
187
187
  /** Grant platform owner status to a user (platform owners only) */
188
188
  grantPlatformOwner(body, options) {
@@ -230,7 +230,7 @@ class RoundtableClient {
230
230
  }
231
231
  /** List posts in a thread — cursor pagination or anchor via ?from=postId */
232
232
  listPosts(params, query, options) {
233
- return request(this.opts, 'GET', `/tenants/${params.tenantId}/threads/${params.threadId}/posts`, { ...options, query, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
233
+ return request(this.opts, 'GET', `/tenants/${params.tenantId}/threads/${params.threadId}/posts`, { ...options, query, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
234
234
  }
235
235
  /** List tenants owned by the current user (platform owners see all) */
236
236
  listTenants(query, options) {
@@ -238,7 +238,7 @@ class RoundtableClient {
238
238
  }
239
239
  /** List threads in a forum */
240
240
  listThreads(params, query, options) {
241
- return request(this.opts, 'GET', `/tenants/${params.tenantId}/forums/${params.forumId}/threads`, { ...options, query, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
241
+ return request(this.opts, 'GET', `/tenants/${params.tenantId}/forums/${params.forumId}/threads`, { ...options, query, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
242
242
  }
243
243
  /** Mark all notifications as read */
244
244
  markAllNotificationRead(options) {
@@ -282,7 +282,7 @@ class RoundtableClient {
282
282
  }
283
283
  /** Full-text search across threads and posts (visible categories only) */
284
284
  search(params, query, options) {
285
- return request(this.opts, 'GET', `/tenants/${params.tenantId}/search`, { ...options, query, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
285
+ return request(this.opts, 'GET', `/tenants/${params.tenantId}/search`, { ...options, query, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
286
286
  }
287
287
  /** Search users by display name or email (case-insensitive) */
288
288
  searchUsers(query, options) {
@@ -302,7 +302,7 @@ class RoundtableClient {
302
302
  }
303
303
  /** Mark a thread as read up to a given post */
304
304
  setThreadReadStatus(params, body, options) {
305
- return request(this.opts, 'PUT', `/tenants/${params.tenantId}/threads/${params.threadId}/read-status`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
305
+ return request(this.opts, 'PUT', `/tenants/${params.tenantId}/threads/${params.threadId}/read-status`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
306
306
  }
307
307
  /** Replace user group assignments in the current tenant (requires group.manage permission) */
308
308
  setUserGroups(params, body, options) {
@@ -310,7 +310,7 @@ class RoundtableClient {
310
310
  }
311
311
  /** Subscribe to a thread */
312
312
  subscribeThread(params, options) {
313
- return request(this.opts, 'POST', `/tenants/${params.tenantId}/threads/${params.threadId}/subscribe`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
313
+ return request(this.opts, 'POST', `/tenants/${params.tenantId}/threads/${params.threadId}/subscribe`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
314
314
  }
315
315
  /** Transfer tenant ownership to another existing user (only the current owner can do this) */
316
316
  transferTenantOwner(params, body, options) {
@@ -318,7 +318,7 @@ class RoundtableClient {
318
318
  }
319
319
  /** Unsubscribe from a thread */
320
320
  unsubscribeThread(params, options) {
321
- return request(this.opts, 'DELETE', `/tenants/${params.tenantId}/threads/${params.threadId}/subscribe`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
321
+ return request(this.opts, 'DELETE', `/tenants/${params.tenantId}/threads/${params.threadId}/subscribe`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
322
322
  }
323
323
  /** Update a category (requires category.manage permission) */
324
324
  updateCategory(params, body, options) {
@@ -342,7 +342,7 @@ class RoundtableClient {
342
342
  }
343
343
  /** Edit a post (author or post.edit permission) */
344
344
  updatePost(params, body, options) {
345
- return request(this.opts, 'PATCH', `/tenants/${params.tenantId}/posts/${params.postId}`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
345
+ return request(this.opts, 'PATCH', `/tenants/${params.tenantId}/posts/${params.postId}`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
346
346
  }
347
347
  /** Update a tenant's name, slug, or custom domain (tenant owner or platform owner) */
348
348
  updateTenant(params, body, options) {
@@ -350,7 +350,7 @@ class RoundtableClient {
350
350
  }
351
351
  /** Update a thread (title, pin, lock, move) */
352
352
  updateThread(params, body, options) {
353
- return request(this.opts, 'PATCH', `/tenants/${params.tenantId}/threads/${params.threadId}`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
353
+ return request(this.opts, 'PATCH', `/tenants/${params.tenantId}/threads/${params.threadId}`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
354
354
  }
355
355
  }
356
356
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roundtable-bb/sdk",
3
- "version": "0.1.37",
3
+ "version": "0.1.38",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"