@roundtable-bb/sdk 0.1.35 → 0.1.36

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.
@@ -8,290 +8,290 @@ export class RoundtableClient {
8
8
  }
9
9
  /** Export a signed tenant backup (platform owners only) */
10
10
  backupTenant(params, query, options) {
11
- return request(this.opts, 'GET', `/api/tenants/${params.tenantId}/backup`, { ...options, query, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
11
+ return request(this.opts, 'GET', `/tenants/${params.tenantId}/backup`, { ...options, query, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
12
12
  }
13
13
  /** Count read and unread notifications */
14
14
  countNotifications(options) {
15
- return request(this.opts, 'GET', '/api/notifications/count', { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
15
+ return request(this.opts, 'GET', '/notifications/count', { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
16
16
  }
17
17
  /** Count unread private messages */
18
18
  countUnreadMessages(options) {
19
- return request(this.opts, 'GET', '/api/messages/count', { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
19
+ return request(this.opts, 'GET', '/messages/count', { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
20
20
  }
21
21
  /** Create a platform-scoped API key (returned once in full) */
22
22
  createApiKey(body, options) {
23
- return request(this.opts, 'POST', '/api/platform/api-keys', { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
23
+ return request(this.opts, 'POST', '/platform/api-keys', { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
24
24
  }
25
25
  /** Create a category (requires category.manage permission) */
26
26
  createCategory(params, body, options) {
27
- return request(this.opts, 'POST', `/api/tenants/${params.tenantId}/categories`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
27
+ return request(this.opts, 'POST', `/tenants/${params.tenantId}/categories`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
28
28
  }
29
29
  /** Create a forum (requires forum.manage permission) */
30
30
  createForum(params, body, options) {
31
- return request(this.opts, 'POST', `/api/tenants/${params.tenantId}/forums`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
31
+ return request(this.opts, 'POST', `/tenants/${params.tenantId}/forums`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
32
32
  }
33
33
  /** Create a group (requires group.manage permission) */
34
34
  createGroup(params, body, options) {
35
- return request(this.opts, 'POST', `/api/tenants/${params.tenantId}/groups`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
35
+ return request(this.opts, 'POST', `/tenants/${params.tenantId}/groups`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
36
36
  }
37
37
  /** Create a post in a thread */
38
38
  createPost(params, body, options) {
39
- return request(this.opts, 'POST', `/api/tenants/${params.tenantId}/threads/${params.threadId}/posts`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
39
+ return request(this.opts, 'POST', `/tenants/${params.tenantId}/threads/${params.threadId}/posts`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
40
40
  }
41
41
  /** Create a new tenant (requires allow_tenant_creation platform setting or platform owner) */
42
42
  createTenant(body, options) {
43
- return request(this.opts, 'POST', '/api/tenants', { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
43
+ return request(this.opts, 'POST', '/tenants', { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
44
44
  }
45
45
  /** Create a thread (and its first post) */
46
46
  createThread(params, body, options) {
47
- return request(this.opts, 'POST', `/api/tenants/${params.tenantId}/forums/${params.forumId}/threads`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
47
+ return request(this.opts, 'POST', `/tenants/${params.tenantId}/forums/${params.forumId}/threads`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
48
48
  }
49
49
  /** Delete a platform-scoped API key */
50
50
  deleteApiKey(params, options) {
51
- return request(this.opts, 'DELETE', `/api/platform/api-keys/${params.keyId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
51
+ return request(this.opts, 'DELETE', `/platform/api-keys/${params.keyId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
52
52
  }
53
53
  /** Delete a category (requires category.manage permission) */
54
54
  deleteCategory(params, options) {
55
- return request(this.opts, 'DELETE', `/api/tenants/${params.tenantId}/categories/${params.categoryId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
55
+ return request(this.opts, 'DELETE', `/tenants/${params.tenantId}/categories/${params.categoryId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
56
56
  }
57
57
  /** Delete a forum (requires forum.manage permission) */
58
58
  deleteForum(params, options) {
59
- return request(this.opts, 'DELETE', `/api/tenants/${params.tenantId}/forums/${params.forumId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
59
+ return request(this.opts, 'DELETE', `/tenants/${params.tenantId}/forums/${params.forumId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
60
60
  }
61
61
  /** Delete a group (requires group.manage permission) */
62
62
  deleteGroup(params, options) {
63
- return request(this.opts, 'DELETE', `/api/tenants/${params.tenantId}/groups/${params.groupId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
63
+ return request(this.opts, 'DELETE', `/tenants/${params.tenantId}/groups/${params.groupId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
64
64
  }
65
65
  /** Delete a private message */
66
66
  deleteMessage(params, options) {
67
- return request(this.opts, 'DELETE', `/api/messages/${params.messageId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
67
+ return request(this.opts, 'DELETE', `/messages/${params.messageId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
68
68
  }
69
69
  /** Delete a notification */
70
70
  deleteNotification(params, options) {
71
- return request(this.opts, 'DELETE', `/api/notifications/${params.notificationId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
71
+ return request(this.opts, 'DELETE', `/notifications/${params.notificationId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
72
72
  }
73
73
  /** Soft-delete a post */
74
74
  deletePost(params, options) {
75
- return request(this.opts, 'DELETE', `/api/tenants/${params.tenantId}/posts/${params.postId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
75
+ return request(this.opts, 'DELETE', `/tenants/${params.tenantId}/posts/${params.postId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
76
76
  }
77
77
  /** Permanently delete a tenant and all its data (platform owners only) */
78
78
  deleteTenant(params, options) {
79
- return request(this.opts, 'DELETE', `/api/tenants/${params.tenantId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
79
+ return request(this.opts, 'DELETE', `/tenants/${params.tenantId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
80
80
  }
81
81
  /** Delete a thread */
82
82
  deleteThread(params, options) {
83
- return request(this.opts, 'DELETE', `/api/tenants/${params.tenantId}/threads/${params.threadId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
83
+ return request(this.opts, 'DELETE', `/tenants/${params.tenantId}/threads/${params.threadId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
84
84
  }
85
85
  /** Exchange session cookie for a short-lived tenant JWT */
86
86
  exchangeTenantToken(options) {
87
- return request(this.opts, 'POST', '/api/tenant-token', { ...options, routeAuth: { acceptsBetterAuth: true } });
87
+ return request(this.opts, 'POST', '/tenant-token', { ...options, routeAuth: { acceptsBetterAuth: true } });
88
88
  }
89
89
  /** Get a single category */
90
90
  getCategory(params, options) {
91
- return request(this.opts, 'GET', `/api/tenants/${params.tenantId}/categories/${params.categoryId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
91
+ return request(this.opts, 'GET', `/tenants/${params.tenantId}/categories/${params.categoryId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
92
92
  }
93
93
  /** Get a single forum */
94
94
  getForum(params, options) {
95
- return request(this.opts, 'GET', `/api/tenants/${params.tenantId}/forums/${params.forumId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
95
+ return request(this.opts, 'GET', `/tenants/${params.tenantId}/forums/${params.forumId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
96
96
  }
97
97
  /** Get a group */
98
98
  getGroup(params, options) {
99
- return request(this.opts, 'GET', `/api/tenants/${params.tenantId}/groups/${params.groupId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
99
+ return request(this.opts, 'GET', `/tenants/${params.tenantId}/groups/${params.groupId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
100
100
  }
101
101
  /** Get own profile */
102
102
  getMe(options) {
103
- return request(this.opts, 'GET', '/api/users/me', { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
103
+ return request(this.opts, 'GET', '/users/me', { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
104
104
  }
105
105
  /** Get tenant options and unsafe methods allowed */
106
106
  getTenantOptions(params, options) {
107
- return request(this.opts, 'GET', `/api/tenants/${params.tenantId}/options`, { ...options });
107
+ return request(this.opts, 'GET', `/tenants/${params.tenantId}/options`, { ...options });
108
108
  }
109
109
  /** Get the current owner of a tenant */
110
110
  getTenantOwner(params, options) {
111
- return request(this.opts, 'GET', `/api/tenants/${params.tenantId}/owner`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
111
+ return request(this.opts, 'GET', `/tenants/${params.tenantId}/owner`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
112
112
  }
113
113
  /** Get a single thread */
114
114
  getThread(params, options) {
115
- return request(this.opts, 'GET', `/api/tenants/${params.tenantId}/threads/${params.threadId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
115
+ return request(this.opts, 'GET', `/tenants/${params.tenantId}/threads/${params.threadId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
116
116
  }
117
117
  /** Get read status for the current user in a thread */
118
118
  getThreadReadStatus(params, options) {
119
- return request(this.opts, 'GET', `/api/tenants/${params.tenantId}/threads/${params.threadId}/read-status`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
119
+ return request(this.opts, 'GET', `/tenants/${params.tenantId}/threads/${params.threadId}/read-status`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
120
120
  }
121
121
  /** Get a user profile by ID */
122
122
  getUser(params, options) {
123
- return request(this.opts, 'GET', `/api/users/${params.userId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
123
+ return request(this.opts, 'GET', `/users/${params.userId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
124
124
  }
125
125
  /** Get user group memberships in the current tenant */
126
126
  getUserMembership(params, options) {
127
- return request(this.opts, 'GET', `/api/tenants/${params.tenantId}/users/${params.userId}/membership`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
127
+ return request(this.opts, 'GET', `/tenants/${params.tenantId}/users/${params.userId}/membership`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
128
128
  }
129
129
  /** Grant platform owner status to a user (platform owners only) */
130
130
  grantPlatformOwner(body, options) {
131
- return request(this.opts, 'POST', '/api/platform/owners', { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
131
+ return request(this.opts, 'POST', '/platform/owners', { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
132
132
  }
133
133
  /** List your platform-scoped API keys */
134
134
  listApiKeys(options) {
135
- return request(this.opts, 'GET', '/api/platform/api-keys', { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
135
+ return request(this.opts, 'GET', '/platform/api-keys', { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
136
136
  }
137
137
  /** List visible categories for the requesting user */
138
138
  listCategories(params, options) {
139
- return request(this.opts, 'GET', `/api/tenants/${params.tenantId}/categories`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
139
+ return request(this.opts, 'GET', `/tenants/${params.tenantId}/categories`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
140
140
  }
141
141
  /** List messages exchanged with a specific user */
142
142
  listConversationMessages(params, query, options) {
143
- return request(this.opts, 'GET', `/api/messages/conversations/${params.userId}`, { ...options, query, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
143
+ return request(this.opts, 'GET', `/messages/conversations/${params.userId}`, { ...options, query, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
144
144
  }
145
145
  /** List conversations for the current user */
146
146
  listConversations(options) {
147
- return request(this.opts, 'GET', '/api/messages/conversations', { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
147
+ return request(this.opts, 'GET', '/messages/conversations', { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
148
148
  }
149
149
  /** List visible forums for the requesting user */
150
150
  listForums(params, options) {
151
- return request(this.opts, 'GET', `/api/tenants/${params.tenantId}/forums`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
151
+ return request(this.opts, 'GET', `/tenants/${params.tenantId}/forums`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
152
152
  }
153
153
  /** List members of a group */
154
154
  listGroupMembers(params, options) {
155
- return request(this.opts, 'GET', `/api/tenants/${params.tenantId}/groups/${params.groupId}/members`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
155
+ return request(this.opts, 'GET', `/tenants/${params.tenantId}/groups/${params.groupId}/members`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
156
156
  }
157
157
  /** List groups */
158
158
  listGroups(params, options) {
159
- return request(this.opts, 'GET', `/api/tenants/${params.tenantId}/groups`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
159
+ return request(this.opts, 'GET', `/tenants/${params.tenantId}/groups`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
160
160
  }
161
161
  /** Get unified notification inbox */
162
162
  listNotifications(query, options) {
163
- return request(this.opts, 'GET', '/api/notifications', { ...options, query, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
163
+ return request(this.opts, 'GET', '/notifications', { ...options, query, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
164
164
  }
165
165
  /** List platform owner user IDs (platform owners only) */
166
166
  listPlatformOwners(options) {
167
- return request(this.opts, 'GET', '/api/platform/owners', { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
167
+ return request(this.opts, 'GET', '/platform/owners', { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
168
168
  }
169
169
  /** List all platform settings (platform owners only) */
170
170
  listPlatformSettings(options) {
171
- return request(this.opts, 'GET', '/api/platform/settings', { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
171
+ return request(this.opts, 'GET', '/platform/settings', { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
172
172
  }
173
173
  /** List posts in a thread — cursor pagination or anchor via ?from=postId */
174
174
  listPosts(params, query, options) {
175
- return request(this.opts, 'GET', `/api/tenants/${params.tenantId}/threads/${params.threadId}/posts`, { ...options, query, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
175
+ return request(this.opts, 'GET', `/tenants/${params.tenantId}/threads/${params.threadId}/posts`, { ...options, query, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
176
176
  }
177
177
  /** List tenants owned by the current user (platform owners see all) */
178
178
  listTenants(query, options) {
179
- return request(this.opts, 'GET', '/api/tenants', { ...options, query, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
179
+ return request(this.opts, 'GET', '/tenants', { ...options, query, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
180
180
  }
181
181
  /** List threads in a forum */
182
182
  listThreads(params, query, options) {
183
- return request(this.opts, 'GET', `/api/tenants/${params.tenantId}/forums/${params.forumId}/threads`, { ...options, query, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
183
+ return request(this.opts, 'GET', `/tenants/${params.tenantId}/forums/${params.forumId}/threads`, { ...options, query, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
184
184
  }
185
185
  /** Mark all notifications as read */
186
186
  markAllNotificationRead(options) {
187
- return request(this.opts, 'POST', '/api/notifications/read-all', { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
187
+ return request(this.opts, 'POST', '/notifications/read-all', { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
188
188
  }
189
189
  /** Mark all messages from a user as read */
190
190
  markConversationRead(params, options) {
191
- return request(this.opts, 'PATCH', `/api/messages/conversations/${params.userId}/read`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
191
+ return request(this.opts, 'PATCH', `/messages/conversations/${params.userId}/read`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
192
192
  }
193
193
  /** Mark a message as read */
194
194
  markMessageRead(params, options) {
195
- return request(this.opts, 'PATCH', `/api/messages/${params.messageId}/read`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
195
+ return request(this.opts, 'PATCH', `/messages/${params.messageId}/read`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
196
196
  }
197
197
  /** Mark a notification as read */
198
198
  markNotificationRead(params, options) {
199
- return request(this.opts, 'PATCH', `/api/notifications/${params.notificationId}/read`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
199
+ return request(this.opts, 'PATCH', `/notifications/${params.notificationId}/read`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
200
200
  }
201
201
  /** Set tenant options */
202
202
  putTenantOptions(params, body, options) {
203
- return request(this.opts, 'PUT', `/api/tenants/${params.tenantId}/options`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
203
+ return request(this.opts, 'PUT', `/tenants/${params.tenantId}/options`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
204
204
  }
205
205
  /** Set the position of each category (requires category.manage permission) */
206
206
  reorderCategories(params, body, options) {
207
- return request(this.opts, 'PUT', `/api/tenants/${params.tenantId}/categories/reorder`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
207
+ return request(this.opts, 'PUT', `/tenants/${params.tenantId}/categories/reorder`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
208
208
  }
209
209
  /** Set the position of each forum (requires forum.manage permission) */
210
210
  reorderForums(params, body, options) {
211
- return request(this.opts, 'PUT', `/api/tenants/${params.tenantId}/forums/reorder`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
211
+ return request(this.opts, 'PUT', `/tenants/${params.tenantId}/forums/reorder`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
212
212
  }
213
213
  /** Set the position of each group (requires group.manage permission) */
214
214
  reorderGroups(params, body, options) {
215
- return request(this.opts, 'PUT', `/api/tenants/${params.tenantId}/groups/reorder`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
215
+ return request(this.opts, 'PUT', `/tenants/${params.tenantId}/groups/reorder`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
216
216
  }
217
217
  /** Restore a tenant from a signed backup (platform owners only) */
218
218
  restoreTenant(params, body, options) {
219
- return request(this.opts, 'POST', `/api/tenants/${params.tenantId}/restore`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
219
+ return request(this.opts, 'POST', `/tenants/${params.tenantId}/restore`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
220
220
  }
221
221
  /** Revoke platform owner status from a user (platform owners only) */
222
222
  revokePlatformOwner(params, options) {
223
- return request(this.opts, 'DELETE', `/api/platform/owners/${params.userId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
223
+ return request(this.opts, 'DELETE', `/platform/owners/${params.userId}`, { ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
224
224
  }
225
225
  /** Full-text search across threads and posts (visible categories only) */
226
226
  search(params, query, options) {
227
- return request(this.opts, 'GET', `/api/tenants/${params.tenantId}/search`, { ...options, query, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
227
+ return request(this.opts, 'GET', `/tenants/${params.tenantId}/search`, { ...options, query, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
228
228
  }
229
229
  /** Search users by display name or email (case-insensitive) */
230
230
  searchUsers(query, options) {
231
- return request(this.opts, 'GET', '/api/users/search', { ...options, query, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
231
+ return request(this.opts, 'GET', '/users/search', { ...options, query, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
232
232
  }
233
233
  /** Send a private message to another user */
234
234
  sendMessage(body, options) {
235
- return request(this.opts, 'POST', '/api/messages', { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
235
+ return request(this.opts, 'POST', '/messages', { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true, acceptsTenantJwt: true } });
236
236
  }
237
237
  /** Set forum visibility for a group (requires group.manage or group.manage_protected permission) */
238
238
  setGroupForums(params, body, options) {
239
- return request(this.opts, 'PUT', `/api/tenants/${params.tenantId}/groups/${params.groupId}/forums`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
239
+ return request(this.opts, 'PUT', `/tenants/${params.tenantId}/groups/${params.groupId}/forums`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
240
240
  }
241
241
  /** Replace all permissions for a group (requires group.manage permission) */
242
242
  setGroupPermissions(params, body, options) {
243
- return request(this.opts, 'PUT', `/api/tenants/${params.tenantId}/groups/${params.groupId}/permissions`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
243
+ return request(this.opts, 'PUT', `/tenants/${params.tenantId}/groups/${params.groupId}/permissions`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
244
244
  }
245
245
  /** Mark a thread as read up to a given post */
246
246
  setThreadReadStatus(params, body, options) {
247
- return request(this.opts, 'PUT', `/api/tenants/${params.tenantId}/threads/${params.threadId}/read-status`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
247
+ return request(this.opts, 'PUT', `/tenants/${params.tenantId}/threads/${params.threadId}/read-status`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
248
248
  }
249
249
  /** Replace user group assignments in the current tenant (requires group.manage permission) */
250
250
  setUserGroups(params, body, options) {
251
- return request(this.opts, 'PUT', `/api/tenants/${params.tenantId}/users/${params.userId}/membership`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
251
+ return request(this.opts, 'PUT', `/tenants/${params.tenantId}/users/${params.userId}/membership`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
252
252
  }
253
253
  /** Subscribe to a thread */
254
254
  subscribeThread(params, options) {
255
- return request(this.opts, 'POST', `/api/tenants/${params.tenantId}/threads/${params.threadId}/subscribe`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
255
+ return request(this.opts, 'POST', `/tenants/${params.tenantId}/threads/${params.threadId}/subscribe`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
256
256
  }
257
257
  /** Transfer tenant ownership to another existing user (only the current owner can do this) */
258
258
  transferTenantOwner(params, body, options) {
259
- return request(this.opts, 'PUT', `/api/tenants/${params.tenantId}/owner`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
259
+ return request(this.opts, 'PUT', `/tenants/${params.tenantId}/owner`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
260
260
  }
261
261
  /** Unsubscribe from a thread */
262
262
  unsubscribeThread(params, options) {
263
- return request(this.opts, 'DELETE', `/api/tenants/${params.tenantId}/threads/${params.threadId}/subscribe`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
263
+ return request(this.opts, 'DELETE', `/tenants/${params.tenantId}/threads/${params.threadId}/subscribe`, { ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
264
264
  }
265
265
  /** Update a category (requires category.manage permission) */
266
266
  updateCategory(params, body, options) {
267
- return request(this.opts, 'PATCH', `/api/tenants/${params.tenantId}/categories/${params.categoryId}`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
267
+ return request(this.opts, 'PATCH', `/tenants/${params.tenantId}/categories/${params.categoryId}`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
268
268
  }
269
269
  /** Update a forum (requires forum.manage permission) */
270
270
  updateForum(params, body, options) {
271
- return request(this.opts, 'PATCH', `/api/tenants/${params.tenantId}/forums/${params.forumId}`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
271
+ return request(this.opts, 'PATCH', `/tenants/${params.tenantId}/forums/${params.forumId}`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
272
272
  }
273
273
  /** Update a group (requires group.manage permission) */
274
274
  updateGroup(params, body, options) {
275
- return request(this.opts, 'PATCH', `/api/tenants/${params.tenantId}/groups/${params.groupId}`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
275
+ return request(this.opts, 'PATCH', `/tenants/${params.tenantId}/groups/${params.groupId}`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
276
276
  }
277
277
  /** Update own profile */
278
278
  updateMe(body, options) {
279
- return request(this.opts, 'PATCH', '/api/users/me', { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
279
+ return request(this.opts, 'PATCH', '/users/me', { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
280
280
  }
281
281
  /** Update a platform setting (platform owners only) */
282
282
  updatePlatformSetting(params, body, options) {
283
- return request(this.opts, 'PATCH', `/api/platform/settings/${params.key}`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
283
+ return request(this.opts, 'PATCH', `/platform/settings/${params.key}`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
284
284
  }
285
285
  /** Edit a post (author or post.edit permission) */
286
286
  updatePost(params, body, options) {
287
- return request(this.opts, 'PATCH', `/api/tenants/${params.tenantId}/posts/${params.postId}`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
287
+ return request(this.opts, 'PATCH', `/tenants/${params.tenantId}/posts/${params.postId}`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
288
288
  }
289
289
  /** Update a tenant's name, slug, or custom domain (tenant owner or platform owner) */
290
290
  updateTenant(params, body, options) {
291
- return request(this.opts, 'PATCH', `/api/tenants/${params.tenantId}`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
291
+ return request(this.opts, 'PATCH', `/tenants/${params.tenantId}`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsBetterAuth: true } });
292
292
  }
293
293
  /** Update a thread (title, pin, lock, move) */
294
294
  updateThread(params, body, options) {
295
- return request(this.opts, 'PATCH', `/api/tenants/${params.tenantId}/threads/${params.threadId}`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
295
+ return request(this.opts, 'PATCH', `/tenants/${params.tenantId}/threads/${params.threadId}`, { body, ...options, routeAuth: { acceptsApiKey: true, acceptsTenantJwt: true } });
296
296
  }
297
297
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roundtable-bb/sdk",
3
- "version": "0.1.35",
3
+ "version": "0.1.36",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"