-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoperations.go
More file actions
1533 lines (1420 loc) · 81.9 KB
/
Copy pathoperations.go
File metadata and controls
1533 lines (1420 loc) · 81.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// GENERATED by sdk/build.py from openapi.json v1.13.1 — do not edit by hand.
package mindupload
import (
"context"
"errors"
"math/rand"
"time"
)
// CreateCloneParams holds the parameters for CreateClone.
type CreateCloneParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
Codename string `json:"codename,omitempty"`
Nickname string `json:"nickname,omitempty"`
Gender string `json:"gender,omitempty"`
AvatarID string `json:"avatar_id,omitempty"`
AcceptChatroomInvitationByOthers *bool `json:"accept_chatroom_invitation_by_others,omitempty"`
ReinforcementLearning *bool `json:"reinforcement_learning,omitempty"`
}
// GetClonesParams holds the parameters for GetClones.
type GetClonesParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
}
// UpdateCloneParams holds the parameters for UpdateClone.
type UpdateCloneParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
Codename string `json:"codename,omitempty"`
Nickname string `json:"nickname,omitempty"`
Gender string `json:"gender,omitempty"`
AvatarID string `json:"avatar_id,omitempty"`
AcceptChatroomInvitationByOthers *bool `json:"accept_chatroom_invitation_by_others,omitempty"`
AutoKeepExternalMemories *bool `json:"auto_keep_external_memories,omitempty"`
ReinforcementLearning *bool `json:"reinforcement_learning,omitempty"`
}
// GetQuotaParams holds the parameters for GetQuota.
type GetQuotaParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
}
// CheckUsernameParams holds the parameters for CheckUsername.
type CheckUsernameParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
}
// LoginParams holds the parameters for Login.
type LoginParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
}
// LogoutParams holds the parameters for Logout.
type LogoutParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
}
// RegisterParams holds the parameters for Register.
type RegisterParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
Email string `json:"email,omitempty"`
EmailVerificationCode string `json:"email_verification_code,omitempty"`
FirstName string `json:"first_name,omitempty"`
LastName string `json:"last_name,omitempty"`
Nickname string `json:"nickname,omitempty"`
Gender string `json:"gender,omitempty"`
BirthDate *int64 `json:"birth_date,omitempty"`
PhoneNumber string `json:"phone_number,omitempty"`
AvatarID string `json:"avatar_id,omitempty"`
AcceptChatroomInvitationByOthers *bool `json:"accept_chatroom_invitation_by_others,omitempty"`
}
// CheckChatroomUpdatesParams holds the parameters for CheckChatroomUpdates.
type CheckChatroomUpdatesParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
// Chatrooms Rooms to check. Each entry must include `chatroom_id`; include `known_updated_at` from the previous response, or null/omit it on the first poll.
Chatrooms []map[string]any `json:"chatrooms,omitempty"`
}
// CreateChatroomParams holds the parameters for CreateChatroom.
type CreateChatroomParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
ChatroomName string `json:"chatroom_name,omitempty"`
IsPublic *bool `json:"is_public,omitempty"`
AvatarID string `json:"avatar_id,omitempty"`
SoulmateCheckEnabled *bool `json:"soulmate_check_enabled,omitempty"`
}
// CreateChatroomMembershipParams holds the parameters for CreateChatroomMembership.
type CreateChatroomMembershipParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
// ChatroomID Chatroom id as returned by chatroom operations.
ChatroomID string `json:"chatroom_id,omitempty"`
InviteeUsername string `json:"invitee_username,omitempty"`
InviteeCodename string `json:"invitee_codename,omitempty"`
AdminLevel string `json:"admin_level,omitempty"`
}
// CreateChatroomMessageParams holds the parameters for CreateChatroomMessage.
type CreateChatroomMessageParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
// ChatroomID Chatroom id as returned by chatroom operations.
ChatroomID string `json:"chatroom_id,omitempty"`
Text string `json:"text,omitempty"`
}
// GetChatroomMembershipParams holds the parameters for GetChatroomMembership.
type GetChatroomMembershipParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
Page *int64 `json:"page,omitempty"`
// PageSize Maximum records requested for one server-capped page.
PageSize *int64 `json:"page_size,omitempty"`
SortBy string `json:"sort_by,omitempty"`
// SortOrder Sort direction; supported values depend on the operation.
SortOrder *int64 `json:"sort_order,omitempty"`
UseCursorPagination *bool `json:"use_cursor_pagination,omitempty"`
// CursorValue Opaque pagination cursor value from the previous page (`next_cursor_value`).
CursorValue string `json:"cursor_value,omitempty"`
// CursorID Opaque pagination cursor id from the previous page (`next_cursor_id`).
CursorID string `json:"cursor_id,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
// ChatroomID Chatroom id as returned by chatroom operations.
ChatroomID string `json:"chatroom_id,omitempty"`
}
// GetChatroomMessagesParams holds the parameters for GetChatroomMessages.
type GetChatroomMessagesParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
Page *int64 `json:"page,omitempty"`
// PageSize Maximum records requested for one server-capped page.
PageSize *int64 `json:"page_size,omitempty"`
SortBy string `json:"sort_by,omitempty"`
// SortOrder Sort direction; supported values depend on the operation.
SortOrder *int64 `json:"sort_order,omitempty"`
UseCursorPagination *bool `json:"use_cursor_pagination,omitempty"`
// CursorValue Opaque pagination cursor value from the previous page (`next_cursor_value`).
CursorValue string `json:"cursor_value,omitempty"`
// CursorID Opaque pagination cursor id from the previous page (`next_cursor_id`).
CursorID string `json:"cursor_id,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
// ChatroomID Chatroom id as returned by chatroom operations.
ChatroomID string `json:"chatroom_id,omitempty"`
SinceValue *float64 `json:"since_value,omitempty"`
SinceID string `json:"since_id,omitempty"`
}
// GetChatroomMessagesAroundParams holds the parameters for GetChatroomMessagesAround.
type GetChatroomMessagesAroundParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password"`
// ChatroomID Chatroom id as returned by chatroom operations.
ChatroomID string `json:"chatroom_id"`
// MessageID Chatroom message id.
MessageID string `json:"message_id"`
// Before How many earlier neighbors to include around the anchor id.
Before *int64 `json:"before,omitempty"`
// After How many later neighbors to include around the anchor id.
After *int64 `json:"after,omitempty"`
}
// GetChatroomsParams holds the parameters for GetChatrooms.
type GetChatroomsParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
Page *int64 `json:"page,omitempty"`
// PageSize Maximum records requested for one server-capped page.
PageSize *int64 `json:"page_size,omitempty"`
SortBy string `json:"sort_by,omitempty"`
// SortOrder Sort direction; supported values depend on the operation.
SortOrder *int64 `json:"sort_order,omitempty"`
UseCursorPagination *bool `json:"use_cursor_pagination,omitempty"`
// CursorValue Opaque pagination cursor value from the previous page (`next_cursor_value`).
CursorValue string `json:"cursor_value,omitempty"`
// CursorID Opaque pagination cursor id from the previous page (`next_cursor_id`).
CursorID string `json:"cursor_id,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
GetPublic *bool `json:"get_public,omitempty"`
GetPrivate *bool `json:"get_private,omitempty"`
}
// SearchChatroomMessagesParams holds the parameters for SearchChatroomMessages.
type SearchChatroomMessagesParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password"`
// ChatroomID Chatroom id as returned by chatroom operations.
ChatroomID string `json:"chatroom_id"`
// Keyword Optional find query. Whole-word tokens across alphabetic and numeric scripts; character phrases for Chinese / Japanese / Korean; mixed language supported.
Keyword string `json:"keyword,omitempty"`
// ContentMediaTypes Optional list of media kinds to match: `image`, `video`, and/or `audio`.
ContentMediaTypes []string `json:"content_media_types,omitempty"`
// CreatedAfter Optional lower bound on message time as a UNIX timestamp in seconds.
CreatedAfter *int64 `json:"created_after,omitempty"`
// CreatedBefore Optional upper bound on message time as a UNIX timestamp in seconds.
CreatedBefore *int64 `json:"created_before,omitempty"`
// SortOrder Message send-time order: `-1` newest first (default), `1` oldest first.
SortOrder *int64 `json:"sort_order,omitempty"`
// SenderUserID Optional human member id; only messages from that user match. Mutually exclusive with `sender_clone_id`.
SenderUserID string `json:"sender_user_id,omitempty"`
// SenderCloneID Optional AI member id; only messages from that AI match. Mutually exclusive with `sender_user_id`.
SenderCloneID string `json:"sender_clone_id,omitempty"`
// PageSize Maximum Find hits for one page.
PageSize *int64 `json:"page_size,omitempty"`
// CursorValue Opaque pagination cursor value from the previous page (`next_cursor_value`).
CursorValue *float64 `json:"cursor_value,omitempty"`
// CursorID Opaque pagination cursor id from the previous page (`next_cursor_id`).
CursorID string `json:"cursor_id,omitempty"`
}
// TranslateChatroomMessageParams holds the parameters for TranslateChatroomMessage.
type TranslateChatroomMessageParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
// ChatroomID Chatroom id as returned by chatroom operations.
ChatroomID string `json:"chatroom_id,omitempty"`
// MessageID Chatroom message id.
MessageID string `json:"message_id,omitempty"`
}
// GetChatParams holds the parameters for GetChat.
type GetChatParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
Page *int64 `json:"page,omitempty"`
// PageSize Maximum records requested for one server-capped page.
PageSize *int64 `json:"page_size,omitempty"`
SortBy string `json:"sort_by,omitempty"`
// SortOrder Sort direction; supported values depend on the operation.
SortOrder *int64 `json:"sort_order,omitempty"`
UseCursorPagination *bool `json:"use_cursor_pagination,omitempty"`
// CursorValue Opaque pagination cursor value from the previous page (`next_cursor_value`).
CursorValue string `json:"cursor_value,omitempty"`
// CursorID Opaque pagination cursor id from the previous page (`next_cursor_id`).
CursorID string `json:"cursor_id,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
Codename string `json:"codename,omitempty"`
}
// GetChatAroundParams holds the parameters for GetChatAround.
type GetChatAroundParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password"`
// CloneID Owner AI consciousness id from `get_clones` (required for one-on-one jump).
CloneID string `json:"clone_id"`
// ChatID One-on-one chat turn id.
ChatID string `json:"chat_id"`
// Before How many earlier neighbors to include around the anchor id.
Before *int64 `json:"before,omitempty"`
// After How many later neighbors to include around the anchor id.
After *int64 `json:"after,omitempty"`
}
// RagParams holds the parameters for Rag.
type RagParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
Codename string `json:"codename,omitempty"`
Text string `json:"text,omitempty"`
// ChatroomID Chatroom id as returned by chatroom operations.
ChatroomID string `json:"chatroom_id,omitempty"`
}
// SearchChatsParams holds the parameters for SearchChats.
type SearchChatsParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password"`
// CloneID Owner AI consciousness id from `get_clones` (required for one-on-one find).
CloneID string `json:"clone_id"`
// Keyword Optional find query. Whole-word tokens across alphabetic and numeric scripts; character phrases for Chinese / Japanese / Korean; mixed language supported.
Keyword string `json:"keyword,omitempty"`
// ContentMediaTypes Optional list of media kinds to match: `image`, `video`, and/or `audio`.
ContentMediaTypes []string `json:"content_media_types,omitempty"`
// CreatedAfter Optional lower bound on message time as a UNIX timestamp in seconds.
CreatedAfter *int64 `json:"created_after,omitempty"`
// CreatedBefore Optional upper bound on message time as a UNIX timestamp in seconds.
CreatedBefore *int64 `json:"created_before,omitempty"`
// SortOrder Turn send-time order: `-1` newest first (default), `1` oldest first.
SortOrder *int64 `json:"sort_order,omitempty"`
// Side Optional 1v1 side filter: `user` (human), `assistant` (AI), or `both` (turns that include both sides).
Side string `json:"side,omitempty"`
// PageSize Maximum Find hits for one page.
PageSize *int64 `json:"page_size,omitempty"`
// CursorValue Opaque pagination cursor value from the previous page (`next_cursor_value`).
CursorValue *float64 `json:"cursor_value,omitempty"`
// CursorID Opaque pagination cursor id from the previous page (`next_cursor_id`).
CursorID string `json:"cursor_id,omitempty"`
}
// TriggerSocialParams holds the parameters for TriggerSocial.
type TriggerSocialParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
MembershipID string `json:"membership_id,omitempty"`
// ChatroomID Chatroom id as returned by chatroom operations.
ChatroomID string `json:"chatroom_id,omitempty"`
}
// CreateExternalAuthorizationRequestParams holds the parameters for CreateExternalAuthorizationRequest.
type CreateExternalAuthorizationRequestParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// IdempotencyKey A stable opaque event key that makes exact retries return the same outcome.
IdempotencyKey string `json:"idempotency_key"`
// InstallationID Your stable opaque identifier for this app installation.
InstallationID string `json:"installation_id"`
// ExternalSubject Your stable opaque identifier for the person authorizing this installation.
ExternalSubject string `json:"external_subject"`
// InstallationLabel Optional user-readable name for the installation shown during consent.
InstallationLabel string `json:"installation_label,omitempty"`
// ExternalIdentityLabel Optional user-readable external identity shown during consent.
ExternalIdentityLabel string `json:"external_identity_label,omitempty"`
// RequestedScopes Capabilities the owner is being asked to delegate.
RequestedScopes []string `json:"requested_scopes"`
}
// ExchangeExternalAuthorizationParams holds the parameters for ExchangeExternalAuthorization.
type ExchangeExternalAuthorizationParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// DeviceCode Short-lived high-entropy secret used only to poll and exchange this request.
DeviceCode string `json:"device_code"`
}
// InspectExternalAuthorizationParams holds the parameters for InspectExternalAuthorization.
type InspectExternalAuthorizationParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// AccessToken Opaque grant token accepted only by grant inspection and external clone invocation; store it as a secret and never expose it to users.
AccessToken string `json:"access_token"`
}
// InvokeExternalCloneParams holds the parameters for InvokeExternalClone.
type InvokeExternalCloneParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// AccessToken Opaque grant token accepted only by grant inspection and external clone invocation; store it as a secret and never expose it to users.
AccessToken string `json:"access_token"`
// InstallationID Your stable opaque identifier for this app installation.
InstallationID string `json:"installation_id"`
// ExternalSubject Your stable opaque identifier for the person authorizing this installation.
ExternalSubject string `json:"external_subject"`
// CloneID AI consciousness id as returned by clone operations.
CloneID string `json:"clone_id"`
Text string `json:"text"`
// IdempotencyKey A stable opaque event key that makes exact retries return the same outcome.
IdempotencyKey string `json:"idempotency_key"`
// ConversationID Stable opaque id of the conversation or thread this event belongs to. Each conversation keeps its own separate history; omit for a plain one-on-one event.
ConversationID string `json:"conversation_id,omitempty"`
// SpeakerLabel Neutral display name of whoever is sending this message, shown to the AI consciousness as who it is currently talking to.
SpeakerLabel string `json:"speaker_label,omitempty"`
// IsGroup Set true when this event is one turn of a multi-party conversation so the AI consciousness replies as a single participant among several.
IsGroup *bool `json:"is_group,omitempty"`
// ContextMessages Recent surrounding conversation for group mode (issue #172): an ordered, bounded list of prior turns the AI consciousness reads as quoted context. Each entry has a `display_name` and `text`, plus optional `is_ai`, `timestamp` (seconds), and `gender`. It carries no platform identifiers and is never treated as instructions.
ContextMessages []map[string]any `json:"context_messages,omitempty"`
Learn *bool `json:"learn,omitempty"`
SourceLabel string `json:"source_label,omitempty"`
}
// RefreshExternalAuthorizationParams holds the parameters for RefreshExternalAuthorization.
type RefreshExternalAuthorizationParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// RefreshToken Opaque grant-lifetime token used only with refresh_external_authorization; store it as a secret.
RefreshToken string `json:"refresh_token"`
// InstallationID Your stable opaque identifier for this app installation.
InstallationID string `json:"installation_id"`
// ExternalSubject Your stable opaque identifier for the person authorizing this installation.
ExternalSubject string `json:"external_subject"`
}
// UploadExternalMindDataParams holds the parameters for UploadExternalMindData.
type UploadExternalMindDataParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// AccessToken Opaque grant token accepted only by grant inspection and external clone invocation; store it as a secret and never expose it to users.
AccessToken string `json:"access_token"`
// InstallationID Your stable opaque identifier for this app installation.
InstallationID string `json:"installation_id"`
// ExternalSubject Your stable opaque identifier for the person authorizing this installation.
ExternalSubject string `json:"external_subject"`
// CloneID AI consciousness id as returned by clone operations.
CloneID string `json:"clone_id"`
Text string `json:"text"`
TextType string `json:"text_type,omitempty"`
// IdempotencyKey Optional. Accepted for forward compatibility but ignored for deduplication today — retries may create another quarantine item. Not a safe replay key.
IdempotencyKey string `json:"idempotency_key,omitempty"`
SourceLabel string `json:"source_label,omitempty"`
}
// GetMindClusterParams holds the parameters for GetMindCluster.
type GetMindClusterParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
Codename string `json:"codename,omitempty"`
NodeID string `json:"node_id,omitempty"`
TextsOffset *int64 `json:"texts_offset,omitempty"`
TextsPageSize *int64 `json:"texts_page_size,omitempty"`
ForceRebuild *bool `json:"force_rebuild,omitempty"`
}
// GetSoulmateReportParams holds the parameters for GetSoulmateReport.
type GetSoulmateReportParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
MyCloneID string `json:"my_clone_id,omitempty"`
OtherCloneID string `json:"other_clone_id,omitempty"`
// ChatroomID Chatroom id as returned by chatroom operations.
ChatroomID string `json:"chatroom_id,omitempty"`
}
// CreateCallSessionParams holds the parameters for CreateCallSession.
type CreateCallSessionParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
// ChatroomID Chatroom id as returned by chatroom operations.
ChatroomID string `json:"chatroom_id,omitempty"`
// Mode What kind of call to start. `conversation` (the default) admits everyone able to speak and show their camera. `broadcast` admits everyone except the chatroom owner and admins able to watch, listen and ask to speak, until somebody running the call lets them. Only the chatroom owner and admins may start a broadcast; anyone else asking for one starts a conversation.
Mode string `json:"mode,omitempty"`
// MediaTier Whether this call carries a picture. `video` (the default) is a call with cameras; `voice` is a call with none at all — sound only, which asks far less of a slow or metered connection. It is fixed for the whole call and applies to everybody in it — nobody can turn a camera on in a voice call, and nobody can join one as a video participant — so switching means starting a new call. Two things override it. A call already running in the room wins: the caller joins that one, in the kind it is already in. And `mode: broadcast` wins: a broadcast is always a video call, counted and capped as one. Read `media_tier` back off the call in the response to see which kind you got.
MediaTier string `json:"media_tier,omitempty"`
// HostInheritance Whether whoever starts this call runs it. False, and absent, mean the call controls rest only on chatroom standing — so a call whose owner and admins have all left carries on with nobody running it until one of them returns. Only the chatroom owner and admins may turn it on; anyone else asking for it is ignored. Set once, when the call starts.
HostInheritance *bool `json:"host_inheritance,omitempty"`
}
// EndCallSessionParams holds the parameters for EndCallSession.
type EndCallSessionParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
CallSessionID string `json:"call_session_id,omitempty"`
OnlyIfEmpty *bool `json:"only_if_empty,omitempty"`
}
// GetActiveCallSessionParams holds the parameters for GetActiveCallSession.
type GetActiveCallSessionParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
// ChatroomID Chatroom id as returned by chatroom operations.
ChatroomID string `json:"chatroom_id,omitempty"`
}
// JoinCallSessionParams holds the parameters for JoinCallSession.
type JoinCallSessionParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
CallSessionID string `json:"call_session_id,omitempty"`
}
// LeaveCallSessionParams holds the parameters for LeaveCallSession.
type LeaveCallSessionParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
CallSessionID string `json:"call_session_id,omitempty"`
}
// RefreshCallTokenParams holds the parameters for RefreshCallToken.
type RefreshCallTokenParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
CallSessionID string `json:"call_session_id,omitempty"`
}
// SetCallHostParams holds the parameters for SetCallHost.
type SetCallHostParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
CallSessionID string `json:"call_session_id,omitempty"`
// TargetUserID User id of the person whose standing in the call is changing.
TargetUserID string `json:"target_user_id,omitempty"`
// RunsTheCall True to give that person the call controls for the length of this call; false to take them back.
RunsTheCall *bool `json:"runs_the_call,omitempty"`
}
// AbortMultipartUploadParams holds the parameters for AbortMultipartUpload.
type AbortMultipartUploadParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
// R2Key Opaque media object key returned by upload-start operations and reused for multipart upload calls.
R2Key string `json:"r2_key,omitempty"`
// UploadID Multipart upload session id returned by `request_multipart_upload`.
UploadID string `json:"upload_id,omitempty"`
}
// CancelUploadParams holds the parameters for CancelUpload.
type CancelUploadParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
// R2Key Opaque media object key returned by upload-start operations and reused for multipart upload calls.
R2Key string `json:"r2_key,omitempty"`
}
// CompleteMultipartUploadParams holds the parameters for CompleteMultipartUpload.
type CompleteMultipartUploadParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
// R2Key Opaque media object key returned by upload-start operations and reused for multipart upload calls.
R2Key string `json:"r2_key,omitempty"`
// UploadID Multipart upload session id returned by `request_multipart_upload`.
UploadID string `json:"upload_id,omitempty"`
// Parts The successfully uploaded parts, using the `part_number` and `etag` returned by each part upload.
Parts []map[string]any `json:"parts,omitempty"`
}
// ListUploadPartsParams holds the parameters for ListUploadParts.
type ListUploadPartsParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
// R2Key Opaque media object key returned by upload-start operations and reused for multipart upload calls.
R2Key string `json:"r2_key,omitempty"`
// UploadID Multipart upload session id returned by `request_multipart_upload`.
UploadID string `json:"upload_id,omitempty"`
}
// RequestMultipartUploadParams holds the parameters for RequestMultipartUpload.
type RequestMultipartUploadParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
Filename string `json:"filename,omitempty"`
ContentType string `json:"content_type,omitempty"`
FileSizeBytes *int64 `json:"file_size_bytes,omitempty"`
// MediaType The kind of media: `image`, `video`, or `audio`.
MediaType string `json:"media_type,omitempty"`
HasThumbnail *bool `json:"has_thumbnail,omitempty"`
}
// RequestUploadURLParams holds the parameters for RequestUploadURL.
type RequestUploadURLParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
Filename string `json:"filename,omitempty"`
ContentType string `json:"content_type,omitempty"`
FileSizeBytes *int64 `json:"file_size_bytes,omitempty"`
// MediaType The kind of media: `image`, `video`, or `audio`.
MediaType string `json:"media_type,omitempty"`
HasThumbnail *bool `json:"has_thumbnail,omitempty"`
}
// SignUploadPartParams holds the parameters for SignUploadPart.
type SignUploadPartParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
// R2Key Opaque media object key returned by upload-start operations and reused for multipart upload calls.
R2Key string `json:"r2_key,omitempty"`
// UploadID Multipart upload session id returned by `request_multipart_upload`.
UploadID string `json:"upload_id,omitempty"`
// PartNumber One-based multipart part number.
PartNumber *int64 `json:"part_number,omitempty"`
}
// SignUploadPartsBatchParams holds the parameters for SignUploadPartsBatch.
type SignUploadPartsBatchParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
// R2Key Opaque media object key returned by upload-start operations and reused for multipart upload calls.
R2Key string `json:"r2_key,omitempty"`
// UploadID Multipart upload session id returned by `request_multipart_upload`.
UploadID string `json:"upload_id,omitempty"`
// PartNumbers One-based multipart part numbers to sign in a single batch.
PartNumbers []int64 `json:"part_numbers,omitempty"`
}
// StartMediaAnalysisParams holds the parameters for StartMediaAnalysis.
type StartMediaAnalysisParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password"`
// Media The attachment to start describing, as its own call. Send each one as soon as it is uploaded or pasted, while the person is still typing, so nothing is left to do at send time. `maxItems` is the cap; a longer array is rejected, not truncated.
Media []map[string]any `json:"media"`
// Codename The AI consciousness this attachment is for, named the way `rag` and `get_chat` name it. Send this for a one-on-one conversation, or `chatroom_id` for a room — exactly one of the two, and the person must be able to reach it.
Codename string `json:"codename,omitempty"`
// ChatroomID The chatroom this attachment is for, as returned by chatroom operations. Send this for a room, or `codename` for a one-on-one conversation — exactly one of the two, and the person must already be in the room.
ChatroomID string `json:"chatroom_id,omitempty"`
}
// CreateTextParams holds the parameters for CreateText.
type CreateTextParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
Codename string `json:"codename,omitempty"`
// CloneID AI consciousness id as returned by clone operations.
CloneID string `json:"clone_id,omitempty"`
// Text The mind data itself. At most 50000 characters, counted in Unicode code points; longer text is rejected with 400 and nothing is stored.
Text string `json:"text,omitempty"`
Type string `json:"type,omitempty"`
}
// GetTextsParams holds the parameters for GetTexts.
type GetTextsParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
Page *int64 `json:"page,omitempty"`
// PageSize Maximum records requested for one server-capped page.
PageSize *int64 `json:"page_size,omitempty"`
SortBy string `json:"sort_by,omitempty"`
// SortOrder Sort direction; supported values depend on the operation.
SortOrder *int64 `json:"sort_order,omitempty"`
UseCursorPagination *bool `json:"use_cursor_pagination,omitempty"`
// CursorValue Opaque pagination cursor value from the previous page (`next_cursor_value`).
CursorValue string `json:"cursor_value,omitempty"`
// CursorID Opaque pagination cursor id from the previous page (`next_cursor_id`).
CursorID string `json:"cursor_id,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
Codename string `json:"codename,omitempty"`
Type string `json:"type,omitempty"`
}
// GetTransactionHistoryParams holds the parameters for GetTransactionHistory.
type GetTransactionHistoryParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
Page *int64 `json:"page,omitempty"`
// PageSize Maximum records requested for one server-capped page.
PageSize *int64 `json:"page_size,omitempty"`
SortBy string `json:"sort_by,omitempty"`
// SortOrder Sort direction; supported values depend on the operation.
SortOrder *int64 `json:"sort_order,omitempty"`
UseCursorPagination *bool `json:"use_cursor_pagination,omitempty"`
// CursorValue Opaque pagination cursor value from the previous page (`next_cursor_value`).
CursorValue string `json:"cursor_value,omitempty"`
// CursorID Opaque pagination cursor id from the previous page (`next_cursor_id`).
CursorID string `json:"cursor_id,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
TypeFilter string `json:"type_filter,omitempty"`
}
// GetUserParams holds the parameters for GetUser.
type GetUserParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
}
// UpdateUserParams holds the parameters for UpdateUser.
type UpdateUserParams struct {
// PreferredLanguage BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
PreferredLanguage string `json:"preferred_language,omitempty"`
// Username The end-user's username.
Username string `json:"username,omitempty"`
// Password The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
Password string `json:"password,omitempty"`
Email string `json:"email,omitempty"`
EmailVerificationCode string `json:"email_verification_code,omitempty"`
FirstName string `json:"first_name,omitempty"`
LastName string `json:"last_name,omitempty"`
Nickname string `json:"nickname,omitempty"`
Gender string `json:"gender,omitempty"`
BirthDate *int64 `json:"birth_date,omitempty"`
PhoneNumber string `json:"phone_number,omitempty"`
AvatarID string `json:"avatar_id,omitempty"`
AcceptChatroomInvitationByOthers *bool `json:"accept_chatroom_invitation_by_others,omitempty"`
}
// --- AI Consciousnesses ---
// CreateClone Create a new AI consciousness for the user.
//
// Response fields: success, error_message.
// See https://docs.mindupload.app
func (c *Client) CreateClone(ctx context.Context, params CreateCloneParams) (*Response, error) {
return c.do(ctx, "create_clone", structToMap(params))
}
// GetClones List the user's AI consciousnesses.
//
// Response fields: success, error_message, clones.
// See https://docs.mindupload.app
func (c *Client) GetClones(ctx context.Context, params GetClonesParams) (*Response, error) {
return c.do(ctx, "get_clones", structToMap(params))
}
// UpdateClone Update an AI consciousness's profile.
//
// Response fields: success, error_message.
// See https://docs.mindupload.app
func (c *Client) UpdateClone(ctx context.Context, params UpdateCloneParams) (*Response, error) {
return c.do(ctx, "update_clone", structToMap(params))
}
// --- Account ---
// GetQuota Check your partner API rate limits, credit caps, and current usage.
//
// Response fields: success, error_message, per_user_rate_limit_per_min, per_user_daily_credit_cap, partner_rate_limit_per_min, external_authorization_rate_limit_per_min, partner_daily_credit_cap, max_users, registered_users, partner_requests_last_minute, partner_credit_spends_last_day, user, user_requests_last_minute, user_credit_spends_last_day, credit_spending_tasks, calls_enabled, call_minutes_cap_monthly, call_max_concurrent_sessions, call_voice_minutes_cap_monthly, call_video_minutes_cap_monthly, call_voice_participant_minutes_this_month, call_video_participant_minutes_this_month, call_month_start_timestamp, call_sessions_this_month, call_participant_minutes_this_month, call_live_participant_minutes, call_data_transferred_bytes_this_month, call_data_transferred_is_complete, call_live_sessions, call_spending_tasks, operation_duration_ms.
// See https://docs.mindupload.app
func (c *Client) GetQuota(ctx context.Context, params GetQuotaParams) (*Response, error) {
return c.do(ctx, "get_quota", structToMap(params))
}
// --- Authentication ---
// CheckUsername Check whether a username is still available before registering.
//
// Response fields: success, error_message, exists, disabled, rate_limited, flood_window, wait_seconds, operation_duration_ms.
// See https://docs.mindupload.app
func (c *Client) CheckUsername(ctx context.Context, params CheckUsernameParams) (*Response, error) {
return c.do(ctx, "check_username", structToMap(params))
}
// Login Sign a user in and receive a session token (JWT) for subsequent calls.
//
// Response fields: success, error_message, jwt, decrypted_user.
// See https://docs.mindupload.app
func (c *Client) Login(ctx context.Context, params LoginParams) (*Response, error) {
return c.do(ctx, "login", structToMap(params))
}
// Logout End the current user session.
//
// Response fields: success, error_message, revoked, operation_duration_ms.
// See https://docs.mindupload.app
func (c *Client) Logout(ctx context.Context, params LogoutParams) (*Response, error) {
return c.do(ctx, "logout", structToMap(params))
}
// Register Create a user account on your platform.
//
// Response fields: success, error_message, jwt, decrypted_user.
// See https://docs.mindupload.app
func (c *Client) Register(ctx context.Context, params RegisterParams) (*Response, error) {
return c.do(ctx, "register", structToMap(params))
}
// --- Chatrooms ---
// CheckChatroomUpdates Cheaply poll whether the user's chatrooms have new activity.
//
// Response fields: success, error_message, server_time, poll_config, chatrooms.
// See https://docs.mindupload.app
func (c *Client) CheckChatroomUpdates(ctx context.Context, params CheckChatroomUpdatesParams) (*Response, error) {
return c.do(ctx, "check_chatroom_updates", structToMap(params))
}
// CreateChatroom Create a chatroom.
//
// Response fields: success, error_message, chatroom_id.
// See https://docs.mindupload.app
func (c *Client) CreateChatroom(ctx context.Context, params CreateChatroomParams) (*Response, error) {
return c.do(ctx, "create_chatroom", structToMap(params))
}
// CreateChatroomMembership Invite a user or an AI consciousness into a chatroom.
//
// Response fields: success, error_message, membership_id.
// See https://docs.mindupload.app
func (c *Client) CreateChatroomMembership(ctx context.Context, params CreateChatroomMembershipParams) (*Response, error) {
return c.do(ctx, "create_chatroom_membership", structToMap(params))
}
// CreateChatroomMessage Send a message to a chatroom.
//
// Response fields: success, error_message, message_id.
// See https://docs.mindupload.app
func (c *Client) CreateChatroomMessage(ctx context.Context, params CreateChatroomMessageParams) (*Response, error) {
return c.do(ctx, "create_chatroom_message", structToMap(params))
}
// GetChatroomMembership List the members of a chatroom the user belongs to.
//
// Response fields: success, error_message, total_count, page, page_size, total_pages, has_next, has_prev, next_cursor_value, next_cursor_id, memberships.
// See https://docs.mindupload.app
func (c *Client) GetChatroomMembership(ctx context.Context, params GetChatroomMembershipParams) (*Response, error) {
return c.do(ctx, "get_chatroom_membership", structToMap(params))
}
// GetChatroomMessages Fetch messages from a chatroom the user belongs to.
//
// Response fields: success, error_message, total_count, page, page_size, total_pages, has_next, has_prev, next_cursor_value, next_cursor_id, messages, media_thumbnails, media_fallbacks, since_overflow.
// See https://docs.mindupload.app
func (c *Client) GetChatroomMessages(ctx context.Context, params GetChatroomMessagesParams) (*Response, error) {
return c.do(ctx, "get_chatroom_messages", structToMap(params))
}
// GetChatroomMessagesAround Fetch a window of chatroom messages around one message id (for jump-to).
//
// Response fields: success, error_message, messages, media_thumbnails, media_fallbacks, anchor_message_id.
// See https://docs.mindupload.app
func (c *Client) GetChatroomMessagesAround(ctx context.Context, params GetChatroomMessagesAroundParams) (*Response, error) {
if params.Username == "" {
return nil, errors.New("username is required")
}
if params.Password == "" {
return nil, errors.New("password is required")
}
if params.ChatroomID == "" {
return nil, errors.New("chatroom_id is required")
}
if params.MessageID == "" {
return nil, errors.New("message_id is required")
}
return c.do(ctx, "get_chatroom_messages_around", structToMap(params))
}
// GetChatrooms List the chatrooms the user belongs to.
//
// Response fields: success, error_message, total_count, page, page_size, total_pages, has_next, has_prev, next_cursor_value, next_cursor_id, chatrooms.
// See https://docs.mindupload.app
func (c *Client) GetChatrooms(ctx context.Context, params GetChatroomsParams) (*Response, error) {
return c.do(ctx, "get_chatrooms", structToMap(params))
}
// SearchChatroomMessages Find messages in a chatroom by keyword, date, media type, and/or sender.
//
// Response fields: success, error_message, messages, media_thumbnails, media_fallbacks, has_next, next_cursor_value, next_cursor_id, page_size, media_urls_expire_at.
// See https://docs.mindupload.app
func (c *Client) SearchChatroomMessages(ctx context.Context, params SearchChatroomMessagesParams) (*Response, error) {
if params.Username == "" {
return nil, errors.New("username is required")
}
if params.Password == "" {
return nil, errors.New("password is required")
}
if params.ChatroomID == "" {
return nil, errors.New("chatroom_id is required")
}
// Reject unsupported enum values locally before sending the request.
for _, contentMediaTypeValue := range params.ContentMediaTypes {
switch contentMediaTypeValue {
case "image", "video", "audio":
default:
return nil, errors.New("content_media_types contains an unsupported value")
}
}