-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSquare.thrift
More file actions
1569 lines (1297 loc) · 36.9 KB
/
Square.thrift
File metadata and controls
1569 lines (1297 loc) · 36.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
enum BooleanState {
NONE = 0,
OFF = 1,
ON = 2,
}
enum ContentType {
NONE = 0,
IMAGE = 1,
VIDEO = 2,
AUDIO = 3,
HTML = 4,
PDF = 5,
CALL = 6,
STICKER = 7,
PRESENCE = 8,
GIFT = 9,
GROUPBOARD = 10,
APPLINK = 11,
LINK = 12,
CONTACT = 13,
FILE = 14,
LOCATION = 15,
POSTNOTIFICATION = 16,
RICH = 17,
CHATEVENT = 18,
MUSIC = 19,
PAYMENT = 20,
EXTIMAGE = 21,
FLEX = 22,
}
enum FetchDirection {
FORWARD = 1,
BACKWARD = 2,
}
enum GeolocationProvider {
GOOGLE = 0,
BAIDU = 1,
FOURSQUARE = 2,
}
enum MIDType {
USER = 0,
ROOM = 1,
GROUP = 2,
SQUARE = 3,
SQUARE_CHAT = 4,
SQUARE_MEMBER = 5,
BOT = 6,
}
enum MessageRelationType {
FORWARD = 0,
AUTO_REPLY = 1,
SUBORDINATE = 2,
REPLY = 3,
}
enum NotifiedMessageType {
MENTION = 1,
REPLY = 2,
}
enum PreconditionFailedExtraInfo {
DUPLICATED_DISPLAY_NAME = 0,
}
enum RelatedMessageServiceCode {
UNKNOWN = 0,
TALK = 1,
SQUARE = 2,
}
enum ReportType {
ADVERTISING = 1,
GENDER_HARASSMENT = 2,
HARASSMENT = 3,
OTHER = 4,
}
enum SquareAttribute {
NAME = 1,
WELCOME_MESSAGE = 2,
PROFILE_IMAGE = 3,
DESCRIPTION = 4,
SEARCHABLE = 6,
CATEGORY = 7,
INVITATION_URL = 8,
ABLE_TO_USE_INVITATION_URL = 9,
STATE = 10,
}
enum SquareAuthorityAttribute {
UPDATE_SQUARE_PROFILE = 1,
INVITE_NEW_MEMBER = 2,
APPROVE_JOIN_REQUEST = 3,
CREATE_POST = 4,
CREATE_OPEN_SQUARE_CHAT = 5,
DELETE_SQUARE_CHAT_OR_POST = 6,
REMOVE_SQUARE_MEMBER = 7,
GRANT_ROLE = 8,
ENABLE_INVITATION_TICKET = 9,
CREATE_CHAT_ANNOUNCEMENT = 10,
UPDATE_MAX_CHAT_MEMBER_COUNT = 11,
}
enum SquareChatAnnouncementType {
TEXT_MESSAGE = 0,
}
enum SquareChatAttribute {
NAME = 2,
SQUARE_CHAT_IMAGE = 3,
STATE = 4,
TYPE = 5,
MAX_MEMBER_COUNT = 6,
}
enum SquareChatMemberAttribute {
MEMBERSHIP_STATE = 4,
NOTIFICATION_MESSAGE = 6,
}
enum SquareChatMembershipState {
JOINED = 1,
LEFT = 2,
}
enum SquareChatState {
ALIVE = 0,
DELETED = 1,
SUSPENDED = 2,
}
enum SquareChatType {
OPEN = 1,
SECRET = 2,
ONE_ON_ONE = 3,
SQUARE_DEFAULT = 4,
}
enum SquareErrorCode {
UNKNOWN = 0,
INTERNAL_ERROR = 500,
NOT_IMPLEMENTED = 501,
TRY_AGAIN_LATER = 503,
MAINTENANCE = 505,
ILLEGAL_ARGUMENT = 400,
AUTHENTICATION_FAILURE = 401,
FORBIDDEN = 403,
NOT_FOUND = 404,
REVISION_MISMATCH = 409,
PRECONDITION_FAILED = 410,
}
enum SquareEventStatus {
NORMAL = 1,
ALERT_DISABLED = 2,
}
enum SquareEventType {
RECEIVE_MESSAGE = 0,
SEND_MESSAGE = 1,
NOTIFIED_JOIN_SQUARE_CHAT = 2,
NOTIFIED_INVITE_INTO_SQUARE_CHAT = 3,
NOTIFIED_LEAVE_SQUARE_CHAT = 4,
NOTIFIED_DESTROY_MESSAGE = 5,
NOTIFIED_MARK_AS_READ = 6,
NOTIFIED_UPDATE_SQUARE_MEMBER_PROFILE = 7,
NOTIFIED_KICKOUT_FROM_SQUARE = 19,
NOTIFIED_SHUTDOWN_SQUARE = 18,
NOTIFIED_DELETE_SQUARE_CHAT = 20,
NOTIFIED_UPDATE_SQUARE_CHAT_PROFILE_NAME = 30,
NOTIFIED_UPDATE_SQUARE_CHAT_PROFILE_IMAGE = 31,
NOTIFIED_UPDATE_SQUARE_CHAT_MAX_MEMBER_COUNT = 38,
NOTIFIED_UPDATE_SQUARE_CHAT_ANNOUNCEMENT = 37,
NOTIFIED_ADD_BOT = 33,
NOTIFIED_REMOVE_BOT = 34,
NOTIFIED_UPDATE_SQUARE = 8,
NOTIFIED_UPDATE_SQUARE_STATUS = 9,
NOTIFIED_UPDATE_SQUARE_AUTHORITY = 10,
NOTIFIED_UPDATE_SQUARE_MEMBER = 11,
NOTIFIED_UPDATE_SQUARE_CHAT = 12,
NOTIFIED_UPDATE_SQUARE_CHAT_STATUS = 13,
NOTIFIED_UPDATE_SQUARE_CHAT_MEMBER = 14,
NOTIFIED_CREATE_SQUARE_MEMBER = 15,
NOTIFIED_CREATE_SQUARE_CHAT_MEMBER = 16,
NOTIFIED_UPDATE_SQUARE_MEMBER_RELATION = 17,
NOTIFIED_UPDATE_SQUARE_FEATURE_SET = 32,
NOTIFIED_UPDATE_SQUARE_NOTE_STATUS = 36,
NOTIFICATION_JOIN_REQUEST = 21,
NOTIFICATION_JOINED = 22,
NOTIFICATION_PROMOTED_COADMIN = 23,
NOTIFICATION_PROMOTED_ADMIN = 24,
NOTIFICATION_DEMOTED_MEMBER = 25,
NOTIFICATION_KICKED_OUT = 26,
NOTIFICATION_SQUARE_DELETE = 27,
NOTIFICATION_SQUARE_CHAT_DELETE = 28,
NOTIFICATION_MESSAGE = 29,
NOTIFICATION_POST_ANNOUNCEMENT = 39,
}
enum SquareFeatureControlState {
DISABLED = 1,
ENABLED = 2,
}
enum SquareFeatureSetAttribute {
CREATING_SECRET_SQUARE_CHAT = 1,
INVITING_INTO_OPEN_SQUARE_CHAT = 2,
}
enum SquareMemberAttribute {
DISPLAY_NAME = 1,
PROFILE_IMAGE = 2,
ABLE_TO_RECEIVE_MESSAGE = 3,
MEMBERSHIP_STATE = 5,
ROLE = 6,
PREFERENCE = 7,
}
enum SquareMemberRelationAttribute {
BLOCKED = 1,
}
enum SquareMemberRelationState {
NONE = 1,
BLOCKED = 2,
}
enum SquareMemberRole {
ADMIN = 1,
CO_ADMIN = 2,
MEMBER = 10,
}
enum SquareMembershipState {
JOIN_REQUESTED = 1,
JOINED = 2,
REJECTED = 3,
LEFT = 4,
KICK_OUT = 5,
BANNED = 6,
DELETED = 7,
}
enum SquarePreferenceAttribute {
FAVORITE = 1,
NOTI_FOR_NEW_JOIN_REQUEST = 2,
}
enum SquareState {
ALIVE = 0,
DELETED = 1,
SUSPENDED = 2,
}
enum SquareType {
CLOSED = 0,
OPEN = 1,
}
exception SquareException {
1: SquareErrorCode errorCode;
2: ErrorExtraInfo errorExtraInfo;
3: string reason;
}
struct ApproveSquareMembersRequest {
2: string squareMid;
3: list<string> requestedMemberMids;
}
struct ApproveSquareMembersResponse {
1: list<SquareMember> approvedMembers;
2: SquareStatus status;
}
struct Category {
1: i32 id;
2: string name;
}
struct CreateSquareChatAnnouncementRequest {
1: i32 reqSeq;
2: string squareChatMid;
3: SquareChatAnnouncement squareChatAnnouncement;
}
struct CreateSquareChatAnnouncementResponse {
1: SquareChatAnnouncement announcement;
}
struct CreateSquareChatRequest {
1: i32 reqSeq;
2: SquareChat squareChat;
3: list<string> squareMemberMids;
}
struct CreateSquareChatResponse {
1: SquareChat squareChat;
2: SquareChatStatus squareChatStatus;
3: SquareChatMember squareChatMember;
}
struct CreateSquareRequest {
1: i32 reqSeq;
2: Square square;
3: SquareMember creator;
}
struct CreateSquareResponse {
1: Square square;
2: SquareMember creator;
3: SquareAuthority authority;
4: SquareStatus status;
5: SquareFeatureSet featureSet;
6: NoteStatus noteStatus;
}
struct DeleteSquareChatAnnouncementRequest {
2: string squareChatMid;
3: i64 announcementSeq;
}
struct DeleteSquareChatAnnouncementResponse {}
struct DeleteSquareChatRequest {
2: string squareChatMid;
3: i64 revision;
}
struct DeleteSquareChatResponse {}
struct DeleteSquareRequest {
2: string mid;
3: i64 revision;
}
struct DeleteSquareResponse {}
struct DestroyMessageRequest {
2: string squareChatMid;
4: string messageId;
}
struct DestroyMessageResponse {}
struct DestroyMessagesRequest {
2: string squareChatMid;
4: set<string> messageIds;
}
struct DestroyMessagesResponse {}
struct ErrorExtraInfo {
1: PreconditionFailedExtraInfo preconditionFailedExtraInfo;
}
struct FetchMyEventsRequest {
1: i64 subscriptionId;
2: string syncToken;
3: i32 limit;
4: string continuationToken;
}
struct FetchMyEventsResponse {
1: SubscriptionState subscription;
2: list<SquareEvent> events;
3: string syncToken;
4: string continuationToken;
}
struct FetchSquareChatEventsRequest {
1: i64 subscriptionId;
2: string squareChatMid;
3: string syncToken;
4: i32 limit;
5: FetchDirection direction;
6: BooleanState inclusive;
}
struct FetchSquareChatEventsResponse {
1: SubscriptionState subscription;
2: list<SquareEvent> events;
3: string syncToken;
4: string continuationToken;
}
struct FindSquareByEmidRequest {
1: string emid;
}
struct FindSquareByEmidResponse {
1: Square square;
2: SquareMember myMembership;
3: SquareAuthority squareAuthority;
4: SquareStatus squareStatus;
5: SquareFeatureSet squareFeatureSet;
6: NoteStatus noteStatus;
}
struct FindSquareByInvitationTicketRequest {
2: string invitationTicket;
}
struct FindSquareByInvitationTicketResponse {
1: Square square;
2: SquareMember myMembership;
3: SquareAuthority squareAuthority;
4: SquareStatus squareStatus;
5: SquareFeatureSet squareFeatureSet;
6: NoteStatus noteStatus;
7: SquareChat chat;
8: SquareChatStatus chatStatus;
}
struct GeolocationAccuracy {
1: double radiusMeters;
2: double radiusConfidence;
}
struct GetInvitationTicketUrlRequest {
2: string mid;
}
struct GetInvitationTicketUrlResponse {
1: string invitationURL;
}
struct GetJoinableSquareChatsRequest {
1: string squareMid;
10: string continuationToken;
11: i32 limit;
}
struct GetJoinableSquareChatsResponse {
1: list<SquareChat> squareChats;
2: string continuationToken;
3: i32 totalSquareChatCount;
4: map<string, SquareChatStatus> squareChatStatuses;
}
struct GetJoinedSquareChatsRequest {
2: string continuationToken;
3: i32 limit;
}
struct GetJoinedSquareChatsResponse {
1: list<SquareChat> chats;
2: map<string, SquareChatMember> chatMembers;
3: map<string, SquareChatStatus> statuses;
4: string continuationToken;
}
struct GetJoinedSquaresRequest {
2: string continuationToken;
3: i32 limit;
}
struct GetJoinedSquaresResponse {
1: list<Square> squares;
2: map<string, SquareMember> members;
3: map<string, SquareAuthority> authorities;
4: map<string, SquareStatus> statuses;
5: string continuationToken;
6: map<string, NoteStatus> noteStatuses;
}
struct GetNoteStatusRequest {
2: string squareMid;
}
struct GetNoteStatusResponse {
1: string squareMid;
2: NoteStatus status;
}
struct GetSquareAuthoritiesRequest {
2: set<string> squareMids;
}
struct GetSquareAuthoritiesResponse {
1: map<string, SquareAuthority> authorities;
}
struct GetSquareAuthorityRequest {
1: string squareMid;
}
struct GetSquareAuthorityResponse {
1: SquareAuthority authority;
}
struct GetSquareCategoriesRequest {}
struct GetSquareCategoriesResponse {
1: list<Category> categoryList;
}
struct GetSquareChatAnnouncementsRequest {
2: string squareChatMid;
}
struct GetSquareChatAnnouncementsResponse {
1: list<SquareChatAnnouncement> announcements;
}
struct GetSquareChatMemberRequest {
2: string squareMemberMid;
3: string squareChatMid;
}
struct GetSquareChatMemberResponse {
1: SquareChatMember squareChatMember;
}
struct GetSquareChatMembersRequest {
1: string squareChatMid;
2: string continuationToken;
3: i32 limit;
}
struct GetSquareChatMembersResponse {
1: list<SquareMember> squareChatMembers;
2: string continuationToken;
}
struct GetSquareChatRequest {
1: string squareChatMid;
}
struct GetSquareChatResponse {
1: SquareChat squareChat;
2: SquareChatMember squareChatMember;
3: SquareChatStatus squareChatStatus;
}
struct GetSquareChatStatusRequest {
2: string squareChatMid;
}
struct GetSquareChatStatusResponse {
1: SquareChatStatus chatStatus;
}
struct GetSquareFeatureSetRequest {
2: string squareMid;
}
struct GetSquareFeatureSetResponse {
1: SquareFeatureSet squareFeatureSet;
}
struct GetSquareMemberRelationRequest {
2: string squareMid;
3: string targetSquareMemberMid;
}
struct GetSquareMemberRelationResponse {
1: string squareMid;
2: string targetSquareMemberMid;
3: SquareMemberRelation relation;
}
struct GetSquareMemberRelationsRequest {
2: SquareMemberRelationState state;
3: string continuationToken;
4: i32 limit;
}
struct GetSquareMemberRelationsResponse {
1: list<SquareMember> squareMembers;
2: map<string, SquareMemberRelation> relations;
3: string continuationToken;
}
struct GetSquareMemberRequest {
2: string squareMemberMid;
}
struct GetSquareMemberResponse {
1: SquareMember squareMember;
2: SquareMemberRelation relation;
3: string oneOnOneChatMid;
}
struct GetSquareMembersRequest {
2: set<string> mids;
}
struct GetSquareMembersResponse {
1: map<string, SquareMember> members;
}
struct GetSquareRequest {
2: string mid;
}
struct GetSquareResponse {
1: Square square;
2: SquareMember myMembership;
3: SquareAuthority squareAuthority;
4: SquareStatus squareStatus;
5: SquareFeatureSet squareFeatureSet;
6: NoteStatus noteStatus;
}
struct GetSquareStatusRequest {
2: string squareMid;
}
struct GetSquareStatusResponse {
1: SquareStatus squareStatus;
}
struct InviteIntoSquareChatRequest {
1: list<string> inviteeMids;
2: string squareChatMid;
}
struct InviteIntoSquareChatResponse {
1: list<string> inviteeMids;
}
struct InviteToSquareRequest {
2: string squareMid;
3: list<string> invitees;
4: string squareChatMid;
}
struct InviteToSquareResponse {}
struct JoinSquareChatRequest {
1: string squareChatMid;
}
struct JoinSquareChatResponse {
1: SquareChat squareChat;
2: SquareChatStatus squareChatStatus;
3: SquareChatMember squareChatMember;
}
struct JoinSquareRequest {
2: string squareMid;
3: SquareMember member;
}
struct JoinSquareResponse {
1: Square square;
2: SquareAuthority squareAuthority;
3: SquareStatus squareStatus;
4: SquareMember squareMember;
5: SquareFeatureSet squareFeatureSet;
6: NoteStatus noteStatus;
}
struct LeaveSquareChatRequest {
2: string squareChatMid;
3: bool sayGoodbye;
4: i64 squareChatMemberRevision;
}
struct LeaveSquareChatResponse {}
struct LeaveSquareRequest {
2: string squareMid;
}
struct LeaveSquareResponse {}
struct Location {
1: string title;
2: string address;
3: double latitude;
4: double longitude;
5: string phone;
6: string categoryId;
7: GeolocationProvider provider;
8: GeolocationAccuracy accuracy;
}
struct MarkAsReadRequest {
2: string squareChatMid;
4: string messageId;
}
struct MarkAsReadResponse {}
struct Message {
1: string from_;
2: string to;
3: MIDType toType;
4: string id;
5: i64 createdTime;
6: i64 deliveredTime;
10: string text;
11: Location location;
14: bool hasContent;
15: ContentType contentType;
18: map<string, string> contentMetadata;
17: string contentPreview;
19: binary sessionId;
20: list<binary> chunks;
21: string relatedMessageId;
22: MessageRelationType messageRelationType;
23: i32 readCount;
24: RelatedMessageServiceCode relatedMessageServiceCode;
}
struct NoteStatus {
1: i32 noteCount;
2: i64 latestCreatedAt;
}
struct RefreshSubscriptionsRequest {
2: list<i64> subscriptions;
}
struct RefreshSubscriptionsResponse {
1: i64 ttlMillis;
2: map<i64, SubscriptionState> subscriptionStates;
}
struct RejectSquareMembersRequest {
2: string squareMid;
3: list<string> requestedMemberMids;
}
struct RejectSquareMembersResponse {
1: list<SquareMember> rejectedMembers;
2: SquareStatus status;
}
struct RemoveSubscriptionsRequest {
2: list<i64> unsubscriptions;
}
struct RemoveSubscriptionsResponse {}
struct ReportSquareChatRequest {
2: string squareMid;
3: string squareChatMid;
5: ReportType reportType;
6: string otherReason;
}
struct ReportSquareChatResponse {}
struct ReportSquareMemberRequest {
2: string squareMemberMid;
3: ReportType reportType;
4: string otherReason;
5: string squareChatMid;
}
struct ReportSquareMemberResponse {}
struct ReportSquareMessageRequest {
2: string squareMid;
3: string squareChatMid;
4: string squareMessageId;
5: ReportType reportType;
6: string otherReason;
}
struct ReportSquareMessageResponse {}
struct ReportSquareRequest {
2: string squareMid;
3: ReportType reportType;
4: string otherReason;
}
struct ReportSquareResponse {}
struct SearchSquareChatMembersRequest {
1: string squareChatMid;
2: SquareChatMemberSearchOption searchOption;
3: string continuationToken;
4: i32 limit;
}
struct SearchSquareChatMembersResponse {
1: list<SquareMember> members;
2: string continuationToken;
}
struct SearchSquareMembersRequest {
2: string squareMid;
3: SquareChatMemberSearchOption searchOption;
4: string continuationToken;
5: i32 limit;
}
struct SearchSquareMembersResponse {
1: list<SquareMember> members;
2: i64 revision;
3: string continuationToken;
4: i32 totalCount;
}
struct SearchSquaresRequest {
2: string query;
3: string continuationToken;
4: i32 limit;
}
struct SearchSquaresResponse {
1: list<Square> squares;
2: map<string, SquareStatus> squareStatuses;
3: map<string, SquareMember> myMemberships;
4: string continuationToken;
5: map<string, NoteStatus> noteStatuses;
}
struct SendMessageRequest {
1: i32 reqSeq;
2: string squareChatMid;
3: SquareMessage squareMessage;
}
struct SendMessageResponse {
1: SquareMessage createdSquareMessage;
}
struct Square {
1: string mid;
2: string name;
3: string welcomeMessage;
4: string profileImageObsHash;
5: string desc;
6: bool searchable;
7: SquareType type;
8: i32 categoryId;
9: string invitationURL;
10: i64 revision;
11: bool ableToUseInvitationTicket;
12: SquareState state;
}
struct SquareAuthority {
1: string squareMid;
2: SquareMemberRole updateSquareProfile;
3: SquareMemberRole inviteNewMember;
4: SquareMemberRole approveJoinRequest;
5: SquareMemberRole createPost;
6: SquareMemberRole createOpenSquareChat;
7: SquareMemberRole deleteSquareChatOrPost;
8: SquareMemberRole removeSquareMember;
9: SquareMemberRole grantRole;
10: SquareMemberRole enableInvitationTicket;
11: i64 revision;
12: SquareMemberRole createSquareChatAnnouncement;
13: SquareMemberRole updateMaxChatMemberCount;
}
struct SquareChat {
1: string squareChatMid;
2: string squareMid;
3: SquareChatType type;
4: string name;
5: string chatImageObsHash;
6: i64 squareChatRevision;
7: i32 maxMemberCount;
8: SquareChatState state;
}
struct SquareChatAnnouncement {
1: i64 announcementSeq;
2: SquareChatAnnouncementType type;
3: SquareChatAnnouncementContents contents;
}
struct SquareChatAnnouncementContents {
1: TextMessageAnnouncementContents textMessageAnnouncementContents;
}
struct SquareChatMember {
1: string squareMemberMid;
2: string squareChatMid;
3: i64 revision;
4: SquareChatMembershipState membershipState;
5: bool notificationForMessage;
}
struct SquareChatMemberSearchOption {
1: string displayName;
}
struct SquareChatStatus {
3: SquareMessage lastMessage;
4: string senderDisplayName;
5: SquareChatStatusWithoutMessage otherStatus;
}
struct SquareChatStatusWithoutMessage {
1: i32 memberCount;
2: i32 unreadMessageCount;
3: string markedAsReadMessageId;
4: string mentionedMessageId;
5: NotifiedMessageType notifiedMessageType;
}
struct SquareEvent {
2: i64 createdTime;
3: SquareEventType type;
4: SquareEventPayload payload;
5: string syncToken;
6: SquareEventStatus eventStatus;
}
struct SquareEventNotificationJoinRequest {
1: string squareMid;
2: string squareName;
3: string requestMemberName;
4: string profileImageObsHash;
}
struct SquareEventNotificationMemberUpdate {
1: string squareMid;
2: string squareName;
3: string profileImageObsHash;
}
struct SquareEventNotificationMessage {
1: string squareChatMid;
2: SquareMessage squareMessage;
3: string senderDisplayName;
4: i32 unreadCount;
5: bool requiredToFetchChatEvents;
6: string mentionedMessageId;
7: NotifiedMessageType notifiedMessageType;
}
struct SquareEventNotificationPostAnnouncement {
1: string squareMid;
2: string squareName;
3: string squareProfileImageObsHash;
4: string actionUrl;
}
struct SquareEventNotificationSquareChatDelete {
1: string squareChatMid;
2: string squareChatName;
3: string profileImageObsHash;
}
struct SquareEventNotificationSquareDelete {
1: string squareMid;
2: string squareName;
3: string profileImageObsHash;
}
struct SquareEventNotifiedAddBot {
1: string squareChatMid;
2: SquareMember squareMember;
3: string botMid;
4: string botDisplayName;
}
struct SquareEventNotifiedCreateSquareChatMember {
1: SquareChat chat;
2: SquareChatStatus chatStatus;
3: SquareChatMember chatMember;
4: i64 joinedAt;
5: SquareMember peerSquareMember;
}
struct SquareEventNotifiedCreateSquareMember {
1: Square square;
2: SquareAuthority squareAuthority;
3: SquareStatus squareStatus;
4: SquareMember squareMember;
5: SquareFeatureSet squareFeatureSet;
6: NoteStatus noteStatus;
}
struct SquareEventNotifiedDeleteSquareChat {
1: SquareChat squareChat;
}
struct SquareEventNotifiedDestroyMessage {
1: string squareChatMid;
3: string messageId;
}
struct SquareEventNotifiedInviteIntoSquareChat {
1: string squareChatMid;
2: list<SquareMember> invitees;
3: SquareMember invitor;
4: SquareMemberRelation invitorRelation;
}
struct SquareEventNotifiedJoinSquareChat {
1: string squareChatMid;
2: SquareMember joinedMember;
}