@roundtable-bb/sdk 0.1.12 → 0.1.13

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