@roundtable-bb/sdk 0.1.28 → 0.1.33
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.
- package/README.md +1 -1
- package/dist/generated/client.js +135 -237
- package/dist/index.d.ts +242 -177
- package/dist/index.js +1 -1
- package/dist/request.js +25 -17
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -59,6 +59,9 @@ declare const TenantUserIdParamsSchema: z.ZodObject<{
|
|
|
59
59
|
declare const NotificationIdParamsSchema: z.ZodObject<{
|
|
60
60
|
notificationId: z.ZodUUID;
|
|
61
61
|
}, z.core.$strip>;
|
|
62
|
+
declare const MessageIdParamsSchema: z.ZodObject<{
|
|
63
|
+
messageId: z.ZodUUID;
|
|
64
|
+
}, z.core.$strip>;
|
|
62
65
|
declare const UserIdParamsSchema: z.ZodObject<{
|
|
63
66
|
userId: z.ZodUUID;
|
|
64
67
|
}, z.core.$strip>;
|
|
@@ -78,6 +81,7 @@ type TenantThreadPostIdParams = z.infer<typeof TenantThreadPostIdParamsSchema>;
|
|
|
78
81
|
type TenantGroupIdParams = z.infer<typeof TenantGroupIdParamsSchema>;
|
|
79
82
|
type TenantUserIdParams = z.infer<typeof TenantUserIdParamsSchema>;
|
|
80
83
|
type NotificationIdParams = z.infer<typeof NotificationIdParamsSchema>;
|
|
84
|
+
type MessageIdParams = z.infer<typeof MessageIdParamsSchema>;
|
|
81
85
|
type UserIdParams = z.infer<typeof UserIdParamsSchema>;
|
|
82
86
|
type KeyIdParams = z.infer<typeof KeyIdParamsSchema>;
|
|
83
87
|
type PlatformSettingKeyParams = z.infer<typeof PlatformSettingKeyParamsSchema>;
|
|
@@ -86,7 +90,6 @@ declare const UserProfileSchema: z.ZodObject<{
|
|
|
86
90
|
userId: z.ZodUUID;
|
|
87
91
|
displayName: z.ZodString;
|
|
88
92
|
avatarUrl: z.ZodNullable<z.ZodURL>;
|
|
89
|
-
bio: z.ZodNullable<z.ZodString>;
|
|
90
93
|
updatedAt: z.ZodISODateTime;
|
|
91
94
|
}, z.core.$strip>;
|
|
92
95
|
declare const UserMembershipSchema: z.ZodObject<{
|
|
@@ -99,7 +102,11 @@ declare const UserMembershipSchema: z.ZodObject<{
|
|
|
99
102
|
declare const UpdateUserProfileSchema: z.ZodObject<{
|
|
100
103
|
displayName: z.ZodOptional<z.ZodString>;
|
|
101
104
|
avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
|
|
102
|
-
|
|
105
|
+
}, z.core.$strip>;
|
|
106
|
+
declare const UserSummarySchema: z.ZodObject<{
|
|
107
|
+
userId: z.ZodUUID;
|
|
108
|
+
displayName: z.ZodString;
|
|
109
|
+
avatarUrl: z.ZodNullable<z.ZodURL>;
|
|
103
110
|
}, z.core.$strip>;
|
|
104
111
|
declare const GroupMemberSchema: z.ZodObject<{
|
|
105
112
|
userId: z.ZodUUID;
|
|
@@ -107,10 +114,17 @@ declare const GroupMemberSchema: z.ZodObject<{
|
|
|
107
114
|
avatarUrl: z.ZodNullable<z.ZodURL>;
|
|
108
115
|
joinedAt: z.ZodISODateTime;
|
|
109
116
|
}, z.core.$strip>;
|
|
117
|
+
declare const UserSearchResultSchema: z.ZodObject<{
|
|
118
|
+
id: z.ZodUUID;
|
|
119
|
+
displayName: z.ZodString;
|
|
120
|
+
avatarUrl: z.ZodNullable<z.ZodURL>;
|
|
121
|
+
}, z.core.$strip>;
|
|
110
122
|
type UserProfile = z.infer<typeof UserProfileSchema>;
|
|
123
|
+
type UserSummary = z.infer<typeof UserSummarySchema>;
|
|
111
124
|
type UserMembership = z.infer<typeof UserMembershipSchema>;
|
|
112
125
|
type UpdateUserProfile = z.infer<typeof UpdateUserProfileSchema>;
|
|
113
126
|
type GroupMember = z.infer<typeof GroupMemberSchema>;
|
|
127
|
+
type UserSearchResult = z.infer<typeof UserSearchResultSchema>;
|
|
114
128
|
|
|
115
129
|
declare const CategorySchema: z.ZodObject<{
|
|
116
130
|
id: z.ZodUUID;
|
|
@@ -175,8 +189,6 @@ declare const ThreadSchema: z.ZodObject<{
|
|
|
175
189
|
userId: z.ZodUUID;
|
|
176
190
|
displayName: z.ZodString;
|
|
177
191
|
avatarUrl: z.ZodNullable<z.ZodURL>;
|
|
178
|
-
bio: z.ZodNullable<z.ZodString>;
|
|
179
|
-
updatedAt: z.ZodISODateTime;
|
|
180
192
|
}, z.core.$strip>;
|
|
181
193
|
postCount: z.ZodNumber;
|
|
182
194
|
isPinned: z.ZodBoolean;
|
|
@@ -214,8 +226,6 @@ declare const PostSchema: z.ZodObject<{
|
|
|
214
226
|
userId: z.ZodUUID;
|
|
215
227
|
displayName: z.ZodString;
|
|
216
228
|
avatarUrl: z.ZodNullable<z.ZodURL>;
|
|
217
|
-
bio: z.ZodNullable<z.ZodString>;
|
|
218
|
-
updatedAt: z.ZodISODateTime;
|
|
219
229
|
}, z.core.$strip>;
|
|
220
230
|
content: z.ZodNullable<z.ZodString>;
|
|
221
231
|
deletedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
@@ -351,6 +361,39 @@ declare const NotificationCountSchema: z.ZodObject<{
|
|
|
351
361
|
}, z.core.$strip>;
|
|
352
362
|
type NotificationCount = z.infer<typeof NotificationCountSchema>;
|
|
353
363
|
|
|
364
|
+
declare const MessageSchema: z.ZodObject<{
|
|
365
|
+
id: z.ZodUUID;
|
|
366
|
+
senderId: z.ZodUUID;
|
|
367
|
+
recipientId: z.ZodUUID;
|
|
368
|
+
tenantId: z.ZodNullable<z.ZodNumber>;
|
|
369
|
+
body: z.ZodString;
|
|
370
|
+
readAt: z.ZodNullable<z.ZodISODateTime>;
|
|
371
|
+
createdAt: z.ZodISODateTime;
|
|
372
|
+
}, z.core.$strip>;
|
|
373
|
+
declare const SendMessageBodySchema: z.ZodObject<{
|
|
374
|
+
recipientId: z.ZodUUID;
|
|
375
|
+
body: z.ZodString;
|
|
376
|
+
}, z.core.$strip>;
|
|
377
|
+
declare const ConversationSummarySchema: z.ZodObject<{
|
|
378
|
+
userId: z.ZodUUID;
|
|
379
|
+
lastMessage: z.ZodObject<{
|
|
380
|
+
id: z.ZodUUID;
|
|
381
|
+
senderId: z.ZodUUID;
|
|
382
|
+
recipientId: z.ZodUUID;
|
|
383
|
+
tenantId: z.ZodNullable<z.ZodNumber>;
|
|
384
|
+
body: z.ZodString;
|
|
385
|
+
readAt: z.ZodNullable<z.ZodISODateTime>;
|
|
386
|
+
createdAt: z.ZodISODateTime;
|
|
387
|
+
}, z.core.$strip>;
|
|
388
|
+
unreadCount: z.ZodNumber;
|
|
389
|
+
}, z.core.$strip>;
|
|
390
|
+
declare const MessageCountSchema: z.ZodObject<{
|
|
391
|
+
unread: z.ZodNumber;
|
|
392
|
+
}, z.core.$strip>;
|
|
393
|
+
type Message = z.infer<typeof MessageSchema>;
|
|
394
|
+
type SendMessageBody = z.infer<typeof SendMessageBodySchema>;
|
|
395
|
+
type ConversationSummary = z.infer<typeof ConversationSummarySchema>;
|
|
396
|
+
|
|
354
397
|
declare const ApiKeySchema: z.ZodObject<{
|
|
355
398
|
id: z.ZodUUID;
|
|
356
399
|
name: z.ZodString;
|
|
@@ -429,6 +472,11 @@ declare const CreateTenantSchema: z.ZodObject<{
|
|
|
429
472
|
name: z.ZodString;
|
|
430
473
|
slug: z.ZodString;
|
|
431
474
|
}, z.core.$strip>;
|
|
475
|
+
declare const UpdateTenantSchema: z.ZodObject<{
|
|
476
|
+
name: z.ZodOptional<z.ZodString>;
|
|
477
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
478
|
+
customDomain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
479
|
+
}, z.core.$strip>;
|
|
432
480
|
declare const SetCustomDomainSchema: z.ZodObject<{
|
|
433
481
|
domain: z.ZodNullable<z.ZodString>;
|
|
434
482
|
}, z.core.$strip>;
|
|
@@ -438,6 +486,16 @@ declare const OwnedTenantSchema: z.ZodObject<{
|
|
|
438
486
|
slug: z.ZodString;
|
|
439
487
|
customDomain: z.ZodNullable<z.ZodString>;
|
|
440
488
|
}, z.core.$strip>;
|
|
489
|
+
declare const TenantOptionsSchema: z.ZodObject<{
|
|
490
|
+
allowedUnsafeMethods: z.ZodObject<{
|
|
491
|
+
notifications: z.ZodBoolean;
|
|
492
|
+
profile: z.ZodBoolean;
|
|
493
|
+
}, z.core.$strip>;
|
|
494
|
+
customOptions: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
495
|
+
}, z.core.$strip>;
|
|
496
|
+
declare const SetTenantOptionsSchema: z.ZodObject<{
|
|
497
|
+
customOptions: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
498
|
+
}, z.core.$strip>;
|
|
441
499
|
declare const TenantTokenSchema: z.ZodObject<{
|
|
442
500
|
token: z.ZodString;
|
|
443
501
|
expiresIn: z.ZodNumber;
|
|
@@ -449,8 +507,11 @@ declare const TenantTokenSchema: z.ZodObject<{
|
|
|
449
507
|
type OwnedTenant = z.infer<typeof OwnedTenantSchema>;
|
|
450
508
|
type Tenant = z.infer<typeof TenantSchema>;
|
|
451
509
|
type CreateTenant = z.infer<typeof CreateTenantSchema>;
|
|
510
|
+
type UpdateTenant = z.infer<typeof UpdateTenantSchema>;
|
|
452
511
|
type SetCustomDomain = z.infer<typeof SetCustomDomainSchema>;
|
|
453
512
|
type TenantToken = z.infer<typeof TenantTokenSchema>;
|
|
513
|
+
type TenantOptions = z.infer<typeof TenantOptionsSchema>;
|
|
514
|
+
type SetTenantOptions = z.infer<typeof SetTenantOptionsSchema>;
|
|
454
515
|
|
|
455
516
|
declare const TenantOwnerSchema: z.ZodObject<{
|
|
456
517
|
userId: z.ZodNullable<z.ZodString>;
|
|
@@ -719,12 +780,14 @@ type PlatformSetting = z.infer<typeof PlatformSettingSchema>;
|
|
|
719
780
|
type UpdatePlatformSetting = z.infer<typeof UpdatePlatformSettingSchema>;
|
|
720
781
|
type GrantPlatformOwner = z.infer<typeof GrantPlatformOwnerSchema>;
|
|
721
782
|
|
|
783
|
+
type AuthMethod = 'apiKey' | 'tenantToken' | 'betterAuth';
|
|
722
784
|
interface RoundtableClientOpts {
|
|
723
785
|
baseURL: string;
|
|
724
|
-
|
|
786
|
+
apiKey?: string;
|
|
787
|
+
tenantToken?: string;
|
|
725
788
|
}
|
|
726
789
|
|
|
727
|
-
declare class
|
|
790
|
+
declare class RoundtableClient {
|
|
728
791
|
private readonly opts;
|
|
729
792
|
constructor(opts: RoundtableClientOpts);
|
|
730
793
|
/** Export a signed tenant backup (platform owners only) */
|
|
@@ -732,141 +795,217 @@ declare class AcpClient {
|
|
|
732
795
|
tenantId: string;
|
|
733
796
|
}, query?: {
|
|
734
797
|
includeContent?: boolean;
|
|
798
|
+
}, options?: {
|
|
799
|
+
authMethod?: AuthMethod;
|
|
735
800
|
}): Promise<BackupPayload>;
|
|
736
801
|
/** Count read and unread notifications */
|
|
737
|
-
countNotifications(
|
|
802
|
+
countNotifications(options?: {
|
|
803
|
+
authMethod?: AuthMethod;
|
|
804
|
+
}): Promise<NotificationCount>;
|
|
738
805
|
/** Create a platform-scoped API key (returned once in full) */
|
|
739
|
-
createApiKey(body: CreateApiKey
|
|
806
|
+
createApiKey(body: CreateApiKey, options?: {
|
|
807
|
+
authMethod?: AuthMethod;
|
|
808
|
+
}): Promise<CreatedApiKey>;
|
|
740
809
|
/** Create a category (requires category.manage permission) */
|
|
741
810
|
createCategory(params: {
|
|
742
811
|
tenantId: string;
|
|
743
|
-
}, body: CreateCategory
|
|
812
|
+
}, body: CreateCategory, options?: {
|
|
813
|
+
authMethod?: AuthMethod;
|
|
814
|
+
}): Promise<Category>;
|
|
744
815
|
/** Create a forum (requires forum.manage permission) */
|
|
745
816
|
createForum(params: {
|
|
746
817
|
tenantId: string;
|
|
747
|
-
}, body: CreateForum
|
|
818
|
+
}, body: CreateForum, options?: {
|
|
819
|
+
authMethod?: AuthMethod;
|
|
820
|
+
}): Promise<Forum>;
|
|
748
821
|
/** Create a group (requires group.manage permission) */
|
|
749
822
|
createGroup(params: {
|
|
750
823
|
tenantId: string;
|
|
751
|
-
}, body: CreateGroup
|
|
824
|
+
}, body: CreateGroup, options?: {
|
|
825
|
+
authMethod?: AuthMethod;
|
|
826
|
+
}): Promise<Group>;
|
|
752
827
|
/** Create a post in a thread */
|
|
753
828
|
createPost(params: {
|
|
754
829
|
tenantId: string;
|
|
755
830
|
threadId: string;
|
|
756
|
-
}, body: CreatePost
|
|
831
|
+
}, body: CreatePost, options?: {
|
|
832
|
+
authMethod?: AuthMethod;
|
|
833
|
+
}): Promise<Post>;
|
|
757
834
|
/** Create a new tenant (requires allow_tenant_creation platform setting or platform owner) */
|
|
758
|
-
createTenant(body: CreateTenant
|
|
835
|
+
createTenant(body: CreateTenant, options?: {
|
|
836
|
+
authMethod?: AuthMethod;
|
|
837
|
+
}): Promise<Tenant>;
|
|
759
838
|
/** Create a thread (and its first post) */
|
|
760
839
|
createThread(params: {
|
|
761
840
|
tenantId: string;
|
|
762
841
|
forumId: string;
|
|
763
|
-
}, body: CreateThread
|
|
842
|
+
}, body: CreateThread, options?: {
|
|
843
|
+
authMethod?: AuthMethod;
|
|
844
|
+
}): Promise<Thread>;
|
|
764
845
|
/** Delete a platform-scoped API key */
|
|
765
846
|
deleteApiKey(params: {
|
|
766
847
|
keyId: string;
|
|
848
|
+
}, options?: {
|
|
849
|
+
authMethod?: AuthMethod;
|
|
767
850
|
}): Promise<void>;
|
|
768
851
|
/** Delete a category (requires category.manage permission) */
|
|
769
852
|
deleteCategory(params: {
|
|
770
853
|
tenantId: string;
|
|
771
854
|
categoryId: string;
|
|
855
|
+
}, options?: {
|
|
856
|
+
authMethod?: AuthMethod;
|
|
772
857
|
}): Promise<void>;
|
|
773
858
|
/** Delete a forum (requires forum.manage permission) */
|
|
774
859
|
deleteForum(params: {
|
|
775
860
|
tenantId: string;
|
|
776
861
|
forumId: string;
|
|
862
|
+
}, options?: {
|
|
863
|
+
authMethod?: AuthMethod;
|
|
777
864
|
}): Promise<void>;
|
|
778
865
|
/** Delete a group (requires group.manage permission) */
|
|
779
866
|
deleteGroup(params: {
|
|
780
867
|
tenantId: string;
|
|
781
868
|
groupId: string;
|
|
869
|
+
}, options?: {
|
|
870
|
+
authMethod?: AuthMethod;
|
|
782
871
|
}): Promise<void>;
|
|
783
872
|
/** Delete a notification */
|
|
784
873
|
deleteNotification(params: {
|
|
785
874
|
notificationId: string;
|
|
875
|
+
}, options?: {
|
|
876
|
+
authMethod?: AuthMethod;
|
|
786
877
|
}): Promise<void>;
|
|
787
878
|
/** Soft-delete a post */
|
|
788
879
|
deletePost(params: {
|
|
789
880
|
tenantId: string;
|
|
790
881
|
postId: string;
|
|
882
|
+
}, options?: {
|
|
883
|
+
authMethod?: AuthMethod;
|
|
791
884
|
}): Promise<void>;
|
|
792
885
|
/** Delete a thread */
|
|
793
886
|
deleteThread(params: {
|
|
794
887
|
tenantId: string;
|
|
795
888
|
threadId: string;
|
|
889
|
+
}, options?: {
|
|
890
|
+
authMethod?: AuthMethod;
|
|
796
891
|
}): Promise<void>;
|
|
797
892
|
/** Exchange session cookie for a short-lived tenant JWT */
|
|
798
|
-
exchangeTenantToken(
|
|
893
|
+
exchangeTenantToken(options?: {
|
|
894
|
+
authMethod?: AuthMethod;
|
|
895
|
+
}): Promise<TenantToken>;
|
|
799
896
|
/** Get a single category */
|
|
800
897
|
getCategory(params: {
|
|
801
898
|
tenantId: string;
|
|
802
899
|
categoryId: string;
|
|
900
|
+
}, options?: {
|
|
901
|
+
authMethod?: AuthMethod;
|
|
803
902
|
}): Promise<Category>;
|
|
804
903
|
/** Get a single forum */
|
|
805
904
|
getForum(params: {
|
|
806
905
|
tenantId: string;
|
|
807
906
|
forumId: string;
|
|
907
|
+
}, options?: {
|
|
908
|
+
authMethod?: AuthMethod;
|
|
808
909
|
}): Promise<Forum>;
|
|
809
910
|
/** Get a group */
|
|
810
911
|
getGroup(params: {
|
|
811
912
|
tenantId: string;
|
|
812
913
|
groupId: string;
|
|
914
|
+
}, options?: {
|
|
915
|
+
authMethod?: AuthMethod;
|
|
813
916
|
}): Promise<Group>;
|
|
814
917
|
/** Get own profile */
|
|
815
|
-
getMe(
|
|
918
|
+
getMe(options?: {
|
|
919
|
+
authMethod?: AuthMethod;
|
|
920
|
+
}): Promise<UserProfile>;
|
|
921
|
+
/** Get tenant options and unsafe methods allowed */
|
|
922
|
+
getTenantOptions(params: {
|
|
923
|
+
tenantId: string;
|
|
924
|
+
}, options?: {
|
|
925
|
+
authMethod?: AuthMethod;
|
|
926
|
+
}): Promise<TenantOptions>;
|
|
816
927
|
/** Get the current owner of a tenant */
|
|
817
928
|
getTenantOwner(params: {
|
|
818
929
|
tenantId: string;
|
|
930
|
+
}, options?: {
|
|
931
|
+
authMethod?: AuthMethod;
|
|
819
932
|
}): Promise<TenantOwner>;
|
|
820
933
|
/** Get a single thread */
|
|
821
934
|
getThread(params: {
|
|
822
935
|
tenantId: string;
|
|
823
936
|
threadId: string;
|
|
937
|
+
}, options?: {
|
|
938
|
+
authMethod?: AuthMethod;
|
|
824
939
|
}): Promise<Thread>;
|
|
825
940
|
/** Get read status for the current user in a thread */
|
|
826
941
|
getThreadReadStatus(params: {
|
|
827
942
|
tenantId: string;
|
|
828
943
|
threadId: string;
|
|
944
|
+
}, options?: {
|
|
945
|
+
authMethod?: AuthMethod;
|
|
829
946
|
}): Promise<ThreadReadStatus>;
|
|
830
947
|
/** Get a user profile by ID */
|
|
831
948
|
getUser(params: {
|
|
832
949
|
userId: string;
|
|
950
|
+
}, options?: {
|
|
951
|
+
authMethod?: AuthMethod;
|
|
833
952
|
}): Promise<UserProfile>;
|
|
834
953
|
/** Get user group memberships in the current tenant */
|
|
835
954
|
getUserMembership(params: {
|
|
836
955
|
tenantId: string;
|
|
837
956
|
userId: string;
|
|
957
|
+
}, options?: {
|
|
958
|
+
authMethod?: AuthMethod;
|
|
838
959
|
}): Promise<UserMembership>;
|
|
839
960
|
/** Grant platform owner status to a user (platform owners only) */
|
|
840
|
-
grantPlatformOwner(body: GrantPlatformOwner
|
|
961
|
+
grantPlatformOwner(body: GrantPlatformOwner, options?: {
|
|
962
|
+
authMethod?: AuthMethod;
|
|
963
|
+
}): Promise<void>;
|
|
841
964
|
/** List your platform-scoped API keys */
|
|
842
|
-
listApiKeys(
|
|
965
|
+
listApiKeys(options?: {
|
|
966
|
+
authMethod?: AuthMethod;
|
|
967
|
+
}): Promise<ApiKey[]>;
|
|
843
968
|
/** List visible categories for the requesting user */
|
|
844
969
|
listCategories(params: {
|
|
845
970
|
tenantId: string;
|
|
971
|
+
}, options?: {
|
|
972
|
+
authMethod?: AuthMethod;
|
|
846
973
|
}): Promise<Category[]>;
|
|
847
974
|
/** List visible forums for the requesting user */
|
|
848
975
|
listForums(params: {
|
|
849
976
|
tenantId: string;
|
|
977
|
+
}, options?: {
|
|
978
|
+
authMethod?: AuthMethod;
|
|
850
979
|
}): Promise<Forum[]>;
|
|
851
980
|
/** List members of a group */
|
|
852
981
|
listGroupMembers(params: {
|
|
853
982
|
tenantId: string;
|
|
854
983
|
groupId: string;
|
|
984
|
+
}, options?: {
|
|
985
|
+
authMethod?: AuthMethod;
|
|
855
986
|
}): Promise<GroupMember[]>;
|
|
856
987
|
/** List groups */
|
|
857
988
|
listGroups(params: {
|
|
858
989
|
tenantId: string;
|
|
990
|
+
}, options?: {
|
|
991
|
+
authMethod?: AuthMethod;
|
|
859
992
|
}): Promise<Group[]>;
|
|
860
993
|
/** Get unified notification inbox */
|
|
861
994
|
listNotifications(query?: {
|
|
862
995
|
cursor?: Id;
|
|
863
996
|
limit?: number;
|
|
864
997
|
unreadOnly?: boolean;
|
|
998
|
+
}, options?: {
|
|
999
|
+
authMethod?: AuthMethod;
|
|
865
1000
|
}): Promise<PaginatedResponse<Notification>>;
|
|
866
1001
|
/** List platform owner user IDs (platform owners only) */
|
|
867
|
-
listPlatformOwners(
|
|
1002
|
+
listPlatformOwners(options?: {
|
|
1003
|
+
authMethod?: AuthMethod;
|
|
1004
|
+
}): Promise<string[]>;
|
|
868
1005
|
/** List all platform settings (platform owners only) */
|
|
869
|
-
listPlatformSettings(
|
|
1006
|
+
listPlatformSettings(options?: {
|
|
1007
|
+
authMethod?: AuthMethod;
|
|
1008
|
+
}): Promise<PlatformSetting[]>;
|
|
870
1009
|
/** List posts in a thread — cursor pagination or anchor via ?from=postId */
|
|
871
1010
|
listPosts(params: {
|
|
872
1011
|
tenantId: string;
|
|
@@ -875,10 +1014,14 @@ declare class AcpClient {
|
|
|
875
1014
|
cursor?: Id;
|
|
876
1015
|
limit?: number;
|
|
877
1016
|
from?: Id;
|
|
1017
|
+
}, options?: {
|
|
1018
|
+
authMethod?: AuthMethod;
|
|
878
1019
|
}): Promise<PaginatedResponse<Post>>;
|
|
879
1020
|
/** List tenants owned by the current user (platform owners see all) */
|
|
880
1021
|
listTenants(query?: {
|
|
881
1022
|
search?: string;
|
|
1023
|
+
}, options?: {
|
|
1024
|
+
authMethod?: AuthMethod;
|
|
882
1025
|
}): Promise<OwnedTenant[]>;
|
|
883
1026
|
/** List threads in a forum */
|
|
884
1027
|
listThreads(params: {
|
|
@@ -887,30 +1030,54 @@ declare class AcpClient {
|
|
|
887
1030
|
}, query?: {
|
|
888
1031
|
cursor?: Id;
|
|
889
1032
|
limit?: number;
|
|
1033
|
+
}, options?: {
|
|
1034
|
+
authMethod?: AuthMethod;
|
|
890
1035
|
}): Promise<PaginatedResponse<Thread>>;
|
|
1036
|
+
/** Mark all notifications as read */
|
|
1037
|
+
markAllNotificationRead(options?: {
|
|
1038
|
+
authMethod?: AuthMethod;
|
|
1039
|
+
}): Promise<void>;
|
|
891
1040
|
/** Mark a notification as read */
|
|
892
1041
|
markNotificationRead(params: {
|
|
893
1042
|
notificationId: string;
|
|
1043
|
+
}, options?: {
|
|
1044
|
+
authMethod?: AuthMethod;
|
|
894
1045
|
}): Promise<Notification>;
|
|
1046
|
+
/** Set tenant options */
|
|
1047
|
+
putTenantOptions(params: {
|
|
1048
|
+
tenantId: string;
|
|
1049
|
+
}, body: SetTenantOptions, options?: {
|
|
1050
|
+
authMethod?: AuthMethod;
|
|
1051
|
+
}): Promise<void>;
|
|
895
1052
|
/** Set the position of each category (requires category.manage permission) */
|
|
896
1053
|
reorderCategories(params: {
|
|
897
1054
|
tenantId: string;
|
|
898
|
-
}, body: ReorderCategory
|
|
1055
|
+
}, body: ReorderCategory, options?: {
|
|
1056
|
+
authMethod?: AuthMethod;
|
|
1057
|
+
}): Promise<void>;
|
|
899
1058
|
/** Set the position of each forum (requires forum.manage permission) */
|
|
900
1059
|
reorderForums(params: {
|
|
901
1060
|
tenantId: string;
|
|
902
|
-
}, body: ReorderCategory
|
|
1061
|
+
}, body: ReorderCategory, options?: {
|
|
1062
|
+
authMethod?: AuthMethod;
|
|
1063
|
+
}): Promise<void>;
|
|
903
1064
|
/** Set the position of each group (requires group.manage permission) */
|
|
904
1065
|
reorderGroups(params: {
|
|
905
1066
|
tenantId: string;
|
|
906
|
-
}, body: ReorderCategory
|
|
1067
|
+
}, body: ReorderCategory, options?: {
|
|
1068
|
+
authMethod?: AuthMethod;
|
|
1069
|
+
}): Promise<void>;
|
|
907
1070
|
/** Restore a tenant from a signed backup (platform owners only) */
|
|
908
1071
|
restoreTenant(params: {
|
|
909
1072
|
tenantId: string;
|
|
910
|
-
}, body: RestoreTenant
|
|
1073
|
+
}, body: RestoreTenant, options?: {
|
|
1074
|
+
authMethod?: AuthMethod;
|
|
1075
|
+
}): Promise<RestoreTenantResponse>;
|
|
911
1076
|
/** Revoke platform owner status from a user (platform owners only) */
|
|
912
1077
|
revokePlatformOwner(params: {
|
|
913
1078
|
userId: string;
|
|
1079
|
+
}, options?: {
|
|
1080
|
+
authMethod?: AuthMethod;
|
|
914
1081
|
}): Promise<void>;
|
|
915
1082
|
/** Full-text search across threads and posts (visible categories only) */
|
|
916
1083
|
search(params: {
|
|
@@ -920,217 +1087,115 @@ declare class AcpClient {
|
|
|
920
1087
|
type?: SearchResultType;
|
|
921
1088
|
categoryId?: Id;
|
|
922
1089
|
limit?: number;
|
|
1090
|
+
}, options?: {
|
|
1091
|
+
authMethod?: AuthMethod;
|
|
923
1092
|
}): Promise<SearchResponse>;
|
|
924
1093
|
/** Search users by display name or email (case-insensitive) */
|
|
925
1094
|
searchUsers(query?: {
|
|
926
1095
|
q: string;
|
|
927
|
-
}
|
|
1096
|
+
}, options?: {
|
|
1097
|
+
authMethod?: AuthMethod;
|
|
1098
|
+
}): Promise<UserSearchResult[]>;
|
|
928
1099
|
/** Set forum visibility for a group (requires group.manage or group.manage_protected permission) */
|
|
929
1100
|
setGroupForums(params: {
|
|
930
1101
|
tenantId: string;
|
|
931
1102
|
groupId: string;
|
|
932
|
-
}, body: SetGroupForums
|
|
1103
|
+
}, body: SetGroupForums, options?: {
|
|
1104
|
+
authMethod?: AuthMethod;
|
|
1105
|
+
}): Promise<Group>;
|
|
933
1106
|
/** Replace all permissions for a group (requires group.manage permission) */
|
|
934
1107
|
setGroupPermissions(params: {
|
|
935
1108
|
tenantId: string;
|
|
936
1109
|
groupId: string;
|
|
937
|
-
}, body: SetGroupPermissions
|
|
1110
|
+
}, body: SetGroupPermissions, options?: {
|
|
1111
|
+
authMethod?: AuthMethod;
|
|
1112
|
+
}): Promise<Group>;
|
|
938
1113
|
/** Set or remove the custom domain for a tenant */
|
|
939
1114
|
setTenantCustomDomain(params: {
|
|
940
1115
|
tenantId: string;
|
|
941
|
-
}, body: SetCustomDomain
|
|
1116
|
+
}, body: SetCustomDomain, options?: {
|
|
1117
|
+
authMethod?: AuthMethod;
|
|
1118
|
+
}): Promise<void>;
|
|
942
1119
|
/** Mark a thread as read up to a given post */
|
|
943
1120
|
setThreadReadStatus(params: {
|
|
944
1121
|
tenantId: string;
|
|
945
1122
|
threadId: string;
|
|
946
|
-
}, body: SetThreadReadStatus
|
|
1123
|
+
}, body: SetThreadReadStatus, options?: {
|
|
1124
|
+
authMethod?: AuthMethod;
|
|
1125
|
+
}): Promise<void>;
|
|
947
1126
|
/** Replace user group assignments in the current tenant (requires group.manage permission) */
|
|
948
1127
|
setUserGroups(params: {
|
|
949
1128
|
tenantId: string;
|
|
950
1129
|
userId: string;
|
|
951
|
-
}, body: SetUserGroups
|
|
1130
|
+
}, body: SetUserGroups, options?: {
|
|
1131
|
+
authMethod?: AuthMethod;
|
|
1132
|
+
}): Promise<UserMembership>;
|
|
952
1133
|
/** Subscribe to a thread */
|
|
953
1134
|
subscribeThread(params: {
|
|
954
1135
|
tenantId: string;
|
|
955
1136
|
threadId: string;
|
|
1137
|
+
}, options?: {
|
|
1138
|
+
authMethod?: AuthMethod;
|
|
956
1139
|
}): Promise<void>;
|
|
957
1140
|
/** Transfer tenant ownership to another existing user (only the current owner can do this) */
|
|
958
1141
|
transferTenantOwner(params: {
|
|
959
1142
|
tenantId: string;
|
|
960
|
-
}, body: TransferTenantOwner
|
|
1143
|
+
}, body: TransferTenantOwner, options?: {
|
|
1144
|
+
authMethod?: AuthMethod;
|
|
1145
|
+
}): Promise<void>;
|
|
961
1146
|
/** Unsubscribe from a thread */
|
|
962
1147
|
unsubscribeThread(params: {
|
|
963
1148
|
tenantId: string;
|
|
964
1149
|
threadId: string;
|
|
1150
|
+
}, options?: {
|
|
1151
|
+
authMethod?: AuthMethod;
|
|
965
1152
|
}): Promise<void>;
|
|
966
1153
|
/** Update a category (requires category.manage permission) */
|
|
967
1154
|
updateCategory(params: {
|
|
968
1155
|
tenantId: string;
|
|
969
1156
|
categoryId: string;
|
|
970
|
-
}, body: UpdateCategory
|
|
1157
|
+
}, body: UpdateCategory, options?: {
|
|
1158
|
+
authMethod?: AuthMethod;
|
|
1159
|
+
}): Promise<Category>;
|
|
971
1160
|
/** Update a forum (requires forum.manage permission) */
|
|
972
1161
|
updateForum(params: {
|
|
973
1162
|
tenantId: string;
|
|
974
1163
|
forumId: string;
|
|
975
|
-
}, body: UpdateForum
|
|
1164
|
+
}, body: UpdateForum, options?: {
|
|
1165
|
+
authMethod?: AuthMethod;
|
|
1166
|
+
}): Promise<Forum>;
|
|
976
1167
|
/** Update a group (requires group.manage permission) */
|
|
977
1168
|
updateGroup(params: {
|
|
978
1169
|
tenantId: string;
|
|
979
1170
|
groupId: string;
|
|
980
|
-
}, body: UpdateGroup
|
|
1171
|
+
}, body: UpdateGroup, options?: {
|
|
1172
|
+
authMethod?: AuthMethod;
|
|
1173
|
+
}): Promise<Group>;
|
|
981
1174
|
/** Update own profile */
|
|
982
|
-
updateMe(body: UpdateUserProfile
|
|
1175
|
+
updateMe(body: UpdateUserProfile, options?: {
|
|
1176
|
+
authMethod?: AuthMethod;
|
|
1177
|
+
}): Promise<UserProfile>;
|
|
983
1178
|
/** Update a platform setting (platform owners only) */
|
|
984
1179
|
updatePlatformSetting(params: {
|
|
985
1180
|
key: string;
|
|
986
|
-
}, body: UpdatePlatformSetting
|
|
1181
|
+
}, body: UpdatePlatformSetting, options?: {
|
|
1182
|
+
authMethod?: AuthMethod;
|
|
1183
|
+
}): Promise<PlatformSetting>;
|
|
987
1184
|
/** Edit a post (author or post.edit permission) */
|
|
988
1185
|
updatePost(params: {
|
|
989
1186
|
tenantId: string;
|
|
990
1187
|
postId: string;
|
|
991
|
-
}, body: CreatePost
|
|
1188
|
+
}, body: CreatePost, options?: {
|
|
1189
|
+
authMethod?: AuthMethod;
|
|
1190
|
+
}): Promise<Post>;
|
|
992
1191
|
/** Update a thread (title, pin, lock, move) */
|
|
993
1192
|
updateThread(params: {
|
|
994
1193
|
tenantId: string;
|
|
995
1194
|
threadId: string;
|
|
996
|
-
}, body: UpdateThread
|
|
997
|
-
|
|
998
|
-
declare class TenantClient {
|
|
999
|
-
private readonly opts;
|
|
1000
|
-
constructor(opts: RoundtableClientOpts);
|
|
1001
|
-
/** Count read and unread notifications */
|
|
1002
|
-
countNotifications(): Promise<NotificationCount>;
|
|
1003
|
-
/** Create a post in a thread */
|
|
1004
|
-
createPost(params: {
|
|
1005
|
-
tenantId: string;
|
|
1006
|
-
threadId: string;
|
|
1007
|
-
}, body: CreatePost): Promise<Post>;
|
|
1008
|
-
/** Create a thread (and its first post) */
|
|
1009
|
-
createThread(params: {
|
|
1010
|
-
tenantId: string;
|
|
1011
|
-
forumId: string;
|
|
1012
|
-
}, body: CreateThread): Promise<Thread>;
|
|
1013
|
-
/** Soft-delete a post */
|
|
1014
|
-
deletePost(params: {
|
|
1015
|
-
tenantId: string;
|
|
1016
|
-
postId: string;
|
|
1017
|
-
}): Promise<void>;
|
|
1018
|
-
/** Delete a thread */
|
|
1019
|
-
deleteThread(params: {
|
|
1020
|
-
tenantId: string;
|
|
1021
|
-
threadId: string;
|
|
1022
|
-
}): Promise<void>;
|
|
1023
|
-
/** Exchange session cookie for a short-lived tenant JWT */
|
|
1024
|
-
exchangeTenantToken(): Promise<TenantToken>;
|
|
1025
|
-
/** Get a single category */
|
|
1026
|
-
getCategory(params: {
|
|
1027
|
-
tenantId: string;
|
|
1028
|
-
categoryId: string;
|
|
1029
|
-
}): Promise<Category>;
|
|
1030
|
-
/** Get a single forum */
|
|
1031
|
-
getForum(params: {
|
|
1032
|
-
tenantId: string;
|
|
1033
|
-
forumId: string;
|
|
1034
|
-
}): Promise<Forum>;
|
|
1035
|
-
/** Get a group */
|
|
1036
|
-
getGroup(params: {
|
|
1037
|
-
tenantId: string;
|
|
1038
|
-
groupId: string;
|
|
1039
|
-
}): Promise<Group>;
|
|
1040
|
-
/** Get own profile */
|
|
1041
|
-
getMe(): Promise<UserProfile>;
|
|
1042
|
-
/** Get a single thread */
|
|
1043
|
-
getThread(params: {
|
|
1044
|
-
tenantId: string;
|
|
1045
|
-
threadId: string;
|
|
1195
|
+
}, body: UpdateThread, options?: {
|
|
1196
|
+
authMethod?: AuthMethod;
|
|
1046
1197
|
}): Promise<Thread>;
|
|
1047
|
-
/** Get read status for the current user in a thread */
|
|
1048
|
-
getThreadReadStatus(params: {
|
|
1049
|
-
tenantId: string;
|
|
1050
|
-
threadId: string;
|
|
1051
|
-
}): Promise<ThreadReadStatus>;
|
|
1052
|
-
/** Get a user profile by ID */
|
|
1053
|
-
getUser(params: {
|
|
1054
|
-
userId: string;
|
|
1055
|
-
}): Promise<UserProfile>;
|
|
1056
|
-
/** Get user group memberships in the current tenant */
|
|
1057
|
-
getUserMembership(params: {
|
|
1058
|
-
tenantId: string;
|
|
1059
|
-
userId: string;
|
|
1060
|
-
}): Promise<UserMembership>;
|
|
1061
|
-
/** List visible categories for the requesting user */
|
|
1062
|
-
listCategories(params: {
|
|
1063
|
-
tenantId: string;
|
|
1064
|
-
}): Promise<Category[]>;
|
|
1065
|
-
/** List visible forums for the requesting user */
|
|
1066
|
-
listForums(params: {
|
|
1067
|
-
tenantId: string;
|
|
1068
|
-
}): Promise<Forum[]>;
|
|
1069
|
-
/** List members of a group */
|
|
1070
|
-
listGroupMembers(params: {
|
|
1071
|
-
tenantId: string;
|
|
1072
|
-
groupId: string;
|
|
1073
|
-
}): Promise<GroupMember[]>;
|
|
1074
|
-
/** List groups */
|
|
1075
|
-
listGroups(params: {
|
|
1076
|
-
tenantId: string;
|
|
1077
|
-
}): Promise<Group[]>;
|
|
1078
|
-
/** List posts in a thread — cursor pagination or anchor via ?from=postId */
|
|
1079
|
-
listPosts(params: {
|
|
1080
|
-
tenantId: string;
|
|
1081
|
-
threadId: string;
|
|
1082
|
-
}, query?: {
|
|
1083
|
-
cursor?: Id;
|
|
1084
|
-
limit?: number;
|
|
1085
|
-
from?: Id;
|
|
1086
|
-
}): Promise<PaginatedResponse<Post>>;
|
|
1087
|
-
/** List threads in a forum */
|
|
1088
|
-
listThreads(params: {
|
|
1089
|
-
tenantId: string;
|
|
1090
|
-
forumId: string;
|
|
1091
|
-
}, query?: {
|
|
1092
|
-
cursor?: Id;
|
|
1093
|
-
limit?: number;
|
|
1094
|
-
}): Promise<PaginatedResponse<Thread>>;
|
|
1095
|
-
/** Full-text search across threads and posts (visible categories only) */
|
|
1096
|
-
search(params: {
|
|
1097
|
-
tenantId: string;
|
|
1098
|
-
}, query?: {
|
|
1099
|
-
q: string;
|
|
1100
|
-
type?: SearchResultType;
|
|
1101
|
-
categoryId?: Id;
|
|
1102
|
-
limit?: number;
|
|
1103
|
-
}): Promise<SearchResponse>;
|
|
1104
|
-
/** Search users by display name or email (case-insensitive) */
|
|
1105
|
-
searchUsers(query?: {
|
|
1106
|
-
q: string;
|
|
1107
|
-
}): Promise<unknown>;
|
|
1108
|
-
/** Mark a thread as read up to a given post */
|
|
1109
|
-
setThreadReadStatus(params: {
|
|
1110
|
-
tenantId: string;
|
|
1111
|
-
threadId: string;
|
|
1112
|
-
}, body: SetThreadReadStatus): Promise<void>;
|
|
1113
|
-
/** Subscribe to a thread */
|
|
1114
|
-
subscribeThread(params: {
|
|
1115
|
-
tenantId: string;
|
|
1116
|
-
threadId: string;
|
|
1117
|
-
}): Promise<void>;
|
|
1118
|
-
/** Unsubscribe from a thread */
|
|
1119
|
-
unsubscribeThread(params: {
|
|
1120
|
-
tenantId: string;
|
|
1121
|
-
threadId: string;
|
|
1122
|
-
}): Promise<void>;
|
|
1123
|
-
/** Edit a post (author or post.edit permission) */
|
|
1124
|
-
updatePost(params: {
|
|
1125
|
-
tenantId: string;
|
|
1126
|
-
postId: string;
|
|
1127
|
-
}, body: CreatePost): Promise<Post>;
|
|
1128
|
-
/** Update a thread (title, pin, lock, move) */
|
|
1129
|
-
updateThread(params: {
|
|
1130
|
-
tenantId: string;
|
|
1131
|
-
threadId: string;
|
|
1132
|
-
}, body: UpdateThread): Promise<Thread>;
|
|
1133
1198
|
}
|
|
1134
1199
|
|
|
1135
|
-
export {
|
|
1136
|
-
export type { ApiError, ApiKey, BackupCategory, BackupData, BackupGroup, BackupMembership, BackupPayload, BackupPost, BackupQuery, BackupSettings, BackupThread, Category, CreateApiKey, CreateCategory, CreateForum, CreateGroup, CreatePost, CreateTenant, CreateThread, CreatedApiKey, Forum, GrantPlatformOwner, Group, GroupMember, Id, KeyIdParams, Notification, NotificationCount, NotificationIdParams, NotificationType, OwnedTenant, PaginatedResponse, PaginationQuery, Permission, PlatformSetting, PlatformSettingKeyParams, Post, PostsQuery, ReorderCategory, ReorderForum, ReorderGroup, RestoreError, RestoreTenant, RestoreTenantResponse, RoundtableClientOpts, SearchQuery, SearchResponse, SearchResult, SearchResultType, SetCustomDomain, SetGroupForums, SetGroupPermissions, SetThreadReadStatus, SetUserGroups, Tenant, TenantBackup, TenantCategoryIdParams, TenantForumIdParams, TenantGroupIdParams, TenantIdParams, TenantOwner, TenantPostIdParams, TenantThreadIdParams, TenantThreadPostIdParams, TenantToken, TenantUserIdParams, TenantUuidParams, Thread, ThreadReadStatus, TransferTenantOwner, UpdateCategory, UpdateForum, UpdateGroup, UpdatePlatformSetting, UpdatePost, UpdateThread, UpdateUserProfile, UserIdParams, UserMembership, UserProfile };
|
|
1200
|
+
export { ApiKeySchema, AssignablePermissionSchema, BackupPayloadSchema, BackupQuerySchema, CategorySchema, ConversationSummarySchema, CreateApiKeySchema, CreateCategorySchema, CreateForumSchema, CreateGroupSchema, CreatePostSchema, CreateTenantSchema, CreateThreadSchema, CreatedApiKeySchema, ErrorSchema, ForumSchema, GrantPlatformOwnerSchema, GroupMemberSchema, GroupSchema, IdSchema, KeyIdParamsSchema, MessageCountSchema, MessageIdParamsSchema, MessageSchema, NotificationCountSchema, NotificationIdParamsSchema, NotificationSchema, NotificationTypeSchema, OwnedTenantSchema, PERMISSIONS, PaginatedResponseSchema, PaginationQuerySchema, PermissionSchema, PlatformSettingKeyParamsSchema, PlatformSettingSchema, PostSchema, PostsQuerySchema, ReorderCategorySchema, ReorderForumSchema, ReorderGroupSchema, RestoreErrorSchema, RestoreTenantResponseSchema, RestoreTenantSchema, RoundtableClient, SearchQuerySchema, SearchResponseSchema, SearchResultSchema, SearchResultTypeSchema, SendMessageBodySchema, SetCustomDomainSchema, SetGroupForumsSchema, SetGroupPermissionsSchema, SetTenantOptionsSchema, SetThreadReadStatusSchema, SetUserGroupsSchema, TenantBackupSchema, TenantCategoryIdParamsSchema, TenantForumIdParamsSchema, TenantGroupIdParamsSchema, TenantIdParamsSchema, TenantOptionsSchema, TenantOwnerSchema, TenantPostIdParamsSchema, TenantSchema, TenantThreadIdParamsSchema, TenantThreadPostIdParamsSchema, TenantTokenSchema, TenantUserIdParamsSchema, TenantUuidParamsSchema, ThreadReadStatusSchema, ThreadSchema, TransferTenantOwnerSchema, UpdateCategorySchema, UpdateForumSchema, UpdateGroupSchema, UpdatePlatformSettingSchema, UpdatePostSchema, UpdateTenantSchema, UpdateThreadSchema, UpdateUserProfileSchema, UserIdParamsSchema, UserMembershipSchema, UserProfileSchema, UserSearchResultSchema, UserSummarySchema };
|
|
1201
|
+
export type { ApiError, ApiKey, BackupCategory, BackupData, BackupGroup, BackupMembership, BackupPayload, BackupPost, BackupQuery, BackupSettings, BackupThread, Category, ConversationSummary, CreateApiKey, CreateCategory, CreateForum, CreateGroup, CreatePost, CreateTenant, CreateThread, CreatedApiKey, Forum, GrantPlatformOwner, Group, GroupMember, Id, KeyIdParams, Message, MessageIdParams, Notification, NotificationCount, NotificationIdParams, NotificationType, OwnedTenant, PaginatedResponse, PaginationQuery, Permission, PlatformSetting, PlatformSettingKeyParams, Post, PostsQuery, ReorderCategory, ReorderForum, ReorderGroup, RestoreError, RestoreTenant, RestoreTenantResponse, RoundtableClientOpts, SearchQuery, SearchResponse, SearchResult, SearchResultType, SendMessageBody, SetCustomDomain, SetGroupForums, SetGroupPermissions, SetTenantOptions, SetThreadReadStatus, SetUserGroups, Tenant, TenantBackup, TenantCategoryIdParams, TenantForumIdParams, TenantGroupIdParams, TenantIdParams, TenantOptions, TenantOwner, TenantPostIdParams, TenantThreadIdParams, TenantThreadPostIdParams, TenantToken, TenantUserIdParams, TenantUuidParams, Thread, ThreadReadStatus, TransferTenantOwner, UpdateCategory, UpdateForum, UpdateGroup, UpdatePlatformSetting, UpdatePost, UpdateTenant, UpdateThread, UpdateUserProfile, UserIdParams, UserMembership, UserProfile, UserSearchResult, UserSummary };
|